Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @michaelheller
29 changes: 29 additions & 0 deletions agentos-spine/agentos-spine/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Local archives / extracted repos (do not commit)
_archives/
spine/
components/

# OS/editor noise
.DS_Store
Thumbs.db
__MACOSX/

# Python noise
.venv/
venv/
env/
__pycache__/
*.pyc
*.pyo

# Node
node_modules/

# Rust/Go build artifacts
target/
dist/
build/

# IDE
.idea/
.vscode/
21 changes: 21 additions & 0 deletions agentos-spine/agentos-spine/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 SocioProphet

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
12 changes: 12 additions & 0 deletions agentos-spine/agentos-spine/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.PHONY: help ingest validate

help:
@echo "Targets:"
@echo " make ingest - extract _archives/Archive.zip into spine/"
@echo " make validate - run hygiene + license validation over spine/"

ingest:
python3 scripts/ingest_archives.py --archive _archives/Archive.zip

validate:
python3 scripts/validate_spine.py
45 changes: 45 additions & 0 deletions agentos-spine/agentos-spine/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# AgentOS Spine

This repository is the **integration spine** for the SocioProphet / SourceOS ecosystem.

It is intentionally **contract-first**:

- **Standards and artifacts are authoritative** (git + AIWG artifacts)
- Tools integrate **only via stable interfaces** (adapters + contract tests)
- Higher-risk components (copyleft / source-available / proprietary / unclear license) are **boxed** behind
service boundaries and can be replaced without rewriting the world.

## Quick start (local)

1) Put your downloaded archives in `_archives/`:

- `_archives/Archive.zip` (the spine bundle: SourceOS, TriTRPC, standards, etc.)
- optionally other repo zips you want to inspect

2) Extract + normalize the spine workspace:

```bash
python3 scripts/ingest_archives.py --archive _archives/Archive.zip
```

This creates `spine/` with normalized folder names (and strips `.git`, `.DS_Store`, `.venv`, `__pycache__`, `*.pyc`).

3) Validate hygiene + license posture:

```bash
python3 scripts/validate_spine.py
```

## Repo contents

- `registry/` — canonical tool/repo registry (license + lane + replacement posture)
- `interfaces/` — stable contracts (Executor, Orchestrator, BrowserOps, MemoryAPI, MeaningGraphAPI, etc.)
- `docs/` — rollout plan, guardrails, replacement strategy
- `scripts/` — ingestion + validation utilities (safe defaults)

## Non-goals

This repo is **not** a monorepo of all components. It is a control plane for:
- what we integrate,
- how we integrate it,
- and how we keep it swappable.
21 changes: 21 additions & 0 deletions agentos-spine/agentos-spine/docs/REPLACEMENT_STRATEGY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Replacement strategy (provider + contract tests)

We adopt components quickly **without getting trapped** by:

1) Defining a stable interface (e.g., MeaningGraphAPI, KnowledgeBaseAPI)
2) Writing contract tests against the interface
3) Adopting an initial provider (AD4M, Fortemi, Inbox Zero, etc.) behind an adapter
4) Building a permissive replacement that passes the same contract tests

## Priorities

Replace-first:
- Fortemi (BUSL)

Use-now, replace-if-needed:
- AD4M (boxed behind MeaningGraphAPI)
- Inbox Zero (GPL/AGPL lane; boxed behind MailOpsAPI)

Security-boxed:
- Desktop automation (Agent-S)
- Anything with marketplace/skills ingestion (must be allowlisted)
28 changes: 28 additions & 0 deletions agentos-spine/agentos-spine/docs/ROLL_OUT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Rollout plan (first 90 days)

## Phase 0: Hygiene + license truth (blocking)

- Ensure every spine repo has an explicit LICENSE file
- Remove accidental junk from snapshots: .DS_Store, .venv, __pycache__, *.pyc, nested .git
- Add CI gates so junk cannot re-enter

## Phase 1: Conformance gates

- TriTRPC fixtures + determinism tests are executable and green
- Standards repos validate schema IDs and enforce formatting

## Phase 2: Workspace materialization

- Use sociosphere runner (or equivalent) to materialize pinned repos
- One command runs: fetch -> validate -> verify fixtures

## Phase 3: OS integration substrate (local)

- Base packages, sandbox runner, secrets broker
- Install core tools (executors, orchestrator) behind agentctl

## Phase 4: Providers boxed + replacement projects

- AD4M behind MeaningGraphAPI + contract tests
- Fortemi behind KnowledgeBaseAPI + start KB-Core replacement
- Inbox Zero behind MailOpsAPI + start MailOps-Core replacement (optional)
30 changes: 30 additions & 0 deletions agentos-spine/agentos-spine/docs/STANDARDS_GUARDRAILS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Standards and architecture guardrails

These guardrails exist to prevent accidental architectural drift while integrating many repos/tools.

## 1) SourceOS independence

SourceOS must operate without socios.
Socios is **opt-in** and gated (Proof-of-Life + signed intent).

## 2) Protocol directionality

If we use sociosphere as workspace/orchestrator and TritRPC as protocol:
- sociosphere -> tritrpc is allowed
- tritrpc -> sociosphere is forbidden

This prevents circular dependencies between the orchestrator and the protocol spec.

## 3) Canonical truth

- Canonical standards live in the SocioProphet standards repos (+ TriTRPC spec/fixtures).
- Canonical project truth is git + AIWG artifacts.
- Memory providers (Mem0/Fortemi/etc.) are caches/services and must be exportable.

## 4) Boxing rule

Anything not permissively licensed (MIT/Apache/BSD/CC0) is boxed behind:
- an adapter interface, and
- a runtime boundary (separate process/container/VM).

This keeps replacements cheap.
17 changes: 17 additions & 0 deletions agentos-spine/agentos-spine/interfaces/browser_ops.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# BrowserOpsAPI (v0.1)

Goal: auditable browser automation with deterministic trace capture.

## Required operations

- `open(url)`
- `click(selector|text)`
- `type(selector, text)`
- `extract(selector|pattern) -> data`
- `screenshot() -> image`
- `trace_export() -> TraceRef`

## Providers

- Stagehand (primary)
- browser-use (alternate)
14 changes: 14 additions & 0 deletions agentos-spine/agentos-spine/interfaces/desktop_ops.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# DesktopOpsAPI (v0.1)

Goal: OS/GUI automation when browser-only is insufficient.

## Safety requirements (hard)

- runs in a sandbox (VM / container + display proxy)
- no ambient secrets
- explicit allowlist of filesystem mounts
- explicit network egress rules

## Provider

- Agent-S
26 changes: 26 additions & 0 deletions agentos-spine/agentos-spine/interfaces/executor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# ExecutorAPI (v0.1)

Goal: a stable contract for tools that **apply changes** and **run commands** in a working tree.

## Required operations

- `plan(task, context) -> Plan`
- `apply(plan) -> ApplyResult`
- `run(command, cwd, env) -> RunResult`
- `diff() -> Diff`
- `snapshot() -> SnapshotRef` (optional; for evidence)

## Evidence requirements

Every Executor must emit:
- applied diff (unified diff or patch ID)
- stdout/stderr + exit code
- tool/version identifiers
- inputs (task ID, repo ref) and outputs (artifacts)

## Providers (examples)

- OpenCode
- Goose
- Aider
- Continue
16 changes: 16 additions & 0 deletions agentos-spine/agentos-spine/interfaces/knowledge_base_api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# KnowledgeBaseAPI (v0.1)

Goal: durable project knowledge base (documents + semantic search), swappable.

## Required operations

- `ingest(doc, metadata) -> doc_id`
- `search(query, filters) -> hits`
- `get(doc_id) -> doc`
- `export_snapshot() -> snapshot_ref`
- `import_snapshot(snapshot_ref)`

## Providers

- Fortemi (evaluation / boxed)
- KB-Core (planned permissive replacement: pgvector/qdrant/etc.)
16 changes: 16 additions & 0 deletions agentos-spine/agentos-spine/interfaces/mail_ops_api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# MailOpsAPI (v0.1)

Goal: email triage and automation behind a swappable contract.

## Required operations

- `sync()`
- `triage_queue() -> threads`
- `classify(thread_id) -> labels`
- `draft(thread_id, intent) -> draft`
- `apply(thread_id, actions)`

## Providers

- Inbox Zero (boxed service)
- MailOps-Core (planned permissive replacement)
16 changes: 16 additions & 0 deletions agentos-spine/agentos-spine/interfaces/meaning_graph_api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# MeaningGraphAPI (v0.1)

Goal: represent agent/claim graphs (identity + assertions + relations) with portability.

## Required operations

- `put_claim(agent_id, claim, provenance) -> claim_id`
- `link(src_claim_id, rel, dst_claim_id, provenance) -> link_id`
- `query(query_spec) -> results`
- `export_snapshot() -> snapshot_ref`
- `import_snapshot(snapshot_ref)`

## Providers

- AD4M (current provider)
- MG-Core (planned permissive replacement)
16 changes: 16 additions & 0 deletions agentos-spine/agentos-spine/interfaces/memory_api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# MemoryAPI (v0.1)

Goal: cross-session memory store for agents.

## Required operations

- `put(item: MemoryItem) -> id`
- `get(id) -> MemoryItem`
- `search(query, filters) -> MemoryItem[]`
- `export() -> ArchiveRef`
- `import(ArchiveRef)`

## Providers

- Mem0 (primary)
- (optional) local sqlite/jsonl for offline mode
16 changes: 16 additions & 0 deletions agentos-spine/agentos-spine/interfaces/orchestrator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# OrchestratorAPI (v0.1)

Goal: coordinate multiple roles/agents over one or more repos, while collecting evidence and enforcing gates.

## Required operations

- `spawn(role, config) -> AgentHandle`
- `assign(agent, task) -> TaskHandle`
- `collect(task) -> EvidenceBundle`
- `synthesize(evidence[]) -> Decision`
- `gate(decision, policy) -> GateResult`

## Providers (examples)

- Gastown
- (optional) AIWG ensemble patterns
51 changes: 51 additions & 0 deletions agentos-spine/agentos-spine/manifest/workspace.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[workspace]
name = "agentos-spine"
version = "0.1"

# This manifest mirrors sociosphere's format so we can reuse their runner tooling.
# All entries below assume local materialization under `spine/`.

[[repos]]
name = "sourceos"
role = "os"
local_path = "spine/sourceos"

[[repos]]
name = "sociosphere"
role = "workspace_orchestrator"
local_path = "spine/sociosphere"

[[repos]]
name = "tritrpc"
role = "protocol"
local_path = "spine/tritrpc"

[[repos]]
name = "standards_storage"
role = "standards"
local_path = "spine/standards-storage"

[[repos]]
name = "standards_knowledge"
role = "standards"
local_path = "spine/standards-knowledge"

[[repos]]
name = "agentplane"
role = "execution_plane"
local_path = "spine/agentplane"

[[repos]]
name = "tritfabric"
role = "runtime"
local_path = "spine/tritfabric"

[[repos]]
name = "socios"
role = "opt_in_automation"
local_path = "spine/socios"

[[repos]]
name = "global_devsecops_intelligence"
role = "spec_bundle"
local_path = "spine/global-devsecops-intelligence"
Loading