agentopology 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -7
- package/dist/bindings/__tests__/bindings.test.js +148 -2
- package/dist/bindings/__tests__/bindings.test.js.map +1 -1
- package/dist/bindings/__tests__/claude-code-hybrid.test.d.ts +2 -0
- package/dist/bindings/__tests__/claude-code-hybrid.test.d.ts.map +1 -0
- package/dist/bindings/__tests__/claude-code-hybrid.test.js +152 -0
- package/dist/bindings/__tests__/claude-code-hybrid.test.js.map +1 -0
- package/dist/bindings/__tests__/claude-workflow.test.d.ts +2 -0
- package/dist/bindings/__tests__/claude-workflow.test.d.ts.map +1 -0
- package/dist/bindings/__tests__/claude-workflow.test.js +204 -0
- package/dist/bindings/__tests__/claude-workflow.test.js.map +1 -0
- package/dist/bindings/__tests__/hybrid-e2e.test.d.ts +15 -0
- package/dist/bindings/__tests__/hybrid-e2e.test.d.ts.map +1 -0
- package/dist/bindings/__tests__/hybrid-e2e.test.js +94 -0
- package/dist/bindings/__tests__/hybrid-e2e.test.js.map +1 -0
- package/dist/bindings/claude-code.d.ts.map +1 -1
- package/dist/bindings/claude-code.js +389 -8
- package/dist/bindings/claude-code.js.map +1 -1
- package/dist/bindings/claude-workflow.d.ts +28 -0
- package/dist/bindings/claude-workflow.d.ts.map +1 -0
- package/dist/bindings/claude-workflow.js +684 -0
- package/dist/bindings/claude-workflow.js.map +1 -0
- package/dist/bindings/index.d.ts +1 -0
- package/dist/bindings/index.d.ts.map +1 -1
- package/dist/bindings/index.js +3 -0
- package/dist/bindings/index.js.map +1 -1
- package/dist/bindings/lib/seam.d.ts +35 -0
- package/dist/bindings/lib/seam.d.ts.map +1 -0
- package/dist/bindings/lib/seam.js +42 -0
- package/dist/bindings/lib/seam.js.map +1 -0
- package/dist/docs/content.d.ts.map +1 -1
- package/dist/docs/content.js +10 -0
- package/dist/docs/content.js.map +1 -1
- package/dist/parser/__tests__/parser.test.js +57 -0
- package/dist/parser/__tests__/parser.test.js.map +1 -1
- package/dist/parser/ast.d.ts +15 -0
- package/dist/parser/ast.d.ts.map +1 -1
- package/dist/parser/index.d.ts.map +1 -1
- package/dist/parser/index.js +12 -0
- package/dist/parser/index.js.map +1 -1
- package/dist/parser/validator.d.ts.map +1 -1
- package/dist/parser/validator.js +37 -1
- package/dist/parser/validator.js.map +1 -1
- package/examples/matchmat-ship.at +249 -0
- package/package.json +1 -1
- package/spec/grammar.md +21 -1
package/package.json
CHANGED
package/spec/grammar.md
CHANGED
|
@@ -271,6 +271,7 @@ orchestrator {
|
|
|
271
271
|
model: opus
|
|
272
272
|
generates: "commands/ship.md"
|
|
273
273
|
handles: [intake, classify, context]
|
|
274
|
+
delegation: subagent
|
|
274
275
|
outputs: {
|
|
275
276
|
depth: 1 | 2 | 3
|
|
276
277
|
}
|
|
@@ -282,10 +283,18 @@ orchestrator {
|
|
|
282
283
|
| `model` | model-id | yes | -- |
|
|
283
284
|
| `generates` | string | no | -- |
|
|
284
285
|
| `handles` | name-list | yes | -- |
|
|
286
|
+
| `delegation` | `subagent` \| `inline` | no | `subagent` |
|
|
285
287
|
| `outputs` | typed-map | no | `{}` |
|
|
286
288
|
|
|
287
289
|
**Orchestrator outputs** are referenced in flow as `orchestrator.<output>`.
|
|
288
290
|
|
|
291
|
+
**Delegation modes:**
|
|
292
|
+
|
|
293
|
+
- `subagent` (default): the orchestrator spawns each agent step via the platform's subagent / Task-tool mechanism. Each agent runs in its own context window. On claude-code, `SubagentStop` hooks fire when each subagent completes — gates with `after:` an agent compile to those hooks.
|
|
294
|
+
- `inline`: the orchestrator drives every agent step in its own session context. Agent `AGENT.md` files are read as prompt fragments by the main session; no subagent is ever spawned. On claude-code, `SubagentStop` hooks would never fire, so the binding suppresses them entirely and emits a "Gates to invoke" cheat sheet in the trigger playbook instead. Use this mode for orchestrator-driven pipelines that don't actually delegate.
|
|
295
|
+
|
|
296
|
+
Setting an unrecognized value is a topology error (V87).
|
|
297
|
+
|
|
289
298
|
---
|
|
290
299
|
|
|
291
300
|
### 4.6 `agent`
|
|
@@ -1473,6 +1482,8 @@ agent explorer {
|
|
|
1473
1482
|
|
|
1474
1483
|
**Why extensions:** The core `.at` language defines universal constructs that work across all platforms. Extensions allow bindings to expose platform-specific features (e.g., Claude Code's `memory: project`, Codex's `sandbox: true`) without adding fields to the core spec that only one platform uses. This keeps the language clean while remaining fully extensible.
|
|
1475
1484
|
|
|
1485
|
+
**Seam marker for the hybrid:** `extensions { claude-workflow { execution: workflow } }` on an agent marks its phase for the embedded-workflow rung — the deterministic fan-out compiled by the `claude-workflow` binding while the rest of the topology compiles to the `claude-code` host. Unmarked topologies compile to pure `claude-code`, unchanged (the hybrid is opt-in). See `docs/AT_VS_WORKFLOW_STRATEGY.md`.
|
|
1486
|
+
|
|
1476
1487
|
**LL(2) note:** `extensions` is a block keyword. The parser sees `extensions` `{` and enters the extensions production. Inside, each `<identifier>` `{` starts a binding namespace block. No ambiguity -- `extensions` only appears inside other blocks, never at the top level.
|
|
1477
1488
|
|
|
1478
1489
|
---
|
|
@@ -1781,11 +1792,20 @@ Bindings map universal permissions to platform-specific modes:
|
|
|
1781
1792
|
|
|
1782
1793
|
| Binding | Status | Target |
|
|
1783
1794
|
|---------|--------|--------|
|
|
1784
|
-
| `claude-code` | Stable | Claude Code agent files, settings, MCP config |
|
|
1795
|
+
| `claude-code` | Stable | Claude Code agent files, settings, MCP config (the event-driven HOST layer) |
|
|
1796
|
+
| `claude-workflow` | Stable | Claude Workflow tool script (`<topology>.workflow.js`) for the deterministic fan-out rung, plus SEAM/README/LOSSY-REPORT companion files |
|
|
1797
|
+
| `codex` | Stable | Codex agent definitions and config |
|
|
1798
|
+
| `gemini-cli` | Stable | Gemini CLI agent definitions and config |
|
|
1799
|
+
| `copilot-cli` | Stable | GitHub Copilot CLI agent definitions and config |
|
|
1800
|
+
| `openclaw` | Stable | OpenClaw soul.md, skill files, channel/gateway/workspace config |
|
|
1801
|
+
| `kiro` | Stable | Kiro agent definitions and config |
|
|
1802
|
+
| `cursor` | Stable | Cursor rules and agent config |
|
|
1785
1803
|
| `agent-sdk` | Planned | Anthropic Agent SDK tool definitions |
|
|
1786
1804
|
| `e2b` | Planned | E2B sandbox configuration |
|
|
1787
1805
|
| `openai-swarm` | Planned | OpenAI Swarm agent definitions |
|
|
1788
1806
|
|
|
1807
|
+
**The `claude-code` + `claude-workflow` hybrid.** A single `.at` topology can compile to BOTH targets. `claude-code` is the HOST — the event-driven layer that owns agents, hooks, the Blackboard, concurrent observability, and the human/gate/branching nodes. `claude-workflow` is the embedded DETERMINISTIC rung — the parallel fan-out phases. They couple through the Blackboard files (`memory.workspace`): the host launches the rung and observes its Blackboard writes via a `PostToolUse` hook, giving concurrent observability the Workflow runtime can't do internally. The seam is opt-in: a phase joins the rung only when its agents carry `extensions { claude-workflow { execution: workflow } }`. Topologies with no such marker compile to pure `claude-code` exactly as before (backward compatible). See `docs/AT_VS_WORKFLOW_STRATEGY.md` for the rationale and `docs/bindings/claude-workflow-mapping.md` for the full primitive mapping.
|
|
1808
|
+
|
|
1789
1809
|
See `docs/bindings.md` for details on creating new bindings.
|
|
1790
1810
|
|
|
1791
1811
|
---
|