Skip to content

Commit 4e763c3

Browse files
tarasclaude
andcommitted
Extract the Agent package from Core on current main
Move Core's Agent vocabulary, conversation, journal and their tests into @executablemd/agent with its ./api and ./host entries, and migrate every consumer to them. The components keep the registered origin @executablemd/core, the held conversation keeps its exact retained root, and Prompt records keep their shapes, append order and withheld encoding. Core gains only the neutral host readers the package needs; the Agent documentation contribution moves to the Agent package's own installer. The pending reply review and acceptance work stays out of this change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent b7d8fe2 commit 4e763c3

186 files changed

Lines changed: 1700 additions & 1047 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/publish-packages.yml‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Validate the manifests declare this version
3131
run: |
3232
VERSION="${{ steps.resolve.outputs.value }}"
33-
for f in packages/durable-streams/deno.json packages/runtime/deno.json packages/core/deno.json packages/acp/deno.json packages/workflow/deno.json packages/git/deno.json packages/testing/deno.json packages/test-agent/deno.json packages/web/deno.json packages/cli/deno.json; do
33+
for f in packages/durable-streams/deno.json packages/runtime/deno.json packages/core/deno.json packages/agent/deno.json packages/acp/deno.json packages/workflow/deno.json packages/git/deno.json packages/testing/deno.json packages/test-agent/deno.json packages/web/deno.json packages/cli/deno.json; do
3434
declared="$(jq -r .version "$f")"
3535
if [ "$declared" != "$VERSION" ]; then
3636
echo "::error::$f declares $declared, not $VERSION — the tag does not match the manifests"
@@ -82,15 +82,22 @@ jobs:
8282
package: packages/core
8383
version: ${{ needs.version.outputs.value }}
8484

85+
agent:
86+
needs: [version, core, durable-streams, runtime]
87+
uses: ./.github/workflows/publish-one.yml
88+
with:
89+
package: packages/agent
90+
version: ${{ needs.version.outputs.value }}
91+
8592
acp:
86-
needs: [version, core, runtime]
93+
needs: [version, agent, core, runtime]
8794
uses: ./.github/workflows/publish-one.yml
8895
with:
8996
package: packages/acp
9097
version: ${{ needs.version.outputs.value }}
9198

9299
workflow:
93-
needs: [version, core, durable-streams, runtime]
100+
needs: [version, agent, core, durable-streams, runtime]
94101
uses: ./.github/workflows/publish-one.yml
95102
with:
96103
package: packages/workflow
@@ -111,7 +118,7 @@ jobs:
111118
version: ${{ needs.version.outputs.value }}
112119

113120
test-agent:
114-
needs: [version, acp, core, durable-streams, runtime, testing]
121+
needs: [version, acp, agent, core, durable-streams, runtime, testing]
115122
uses: ./.github/workflows/publish-one.yml
116123
with:
117124
package: packages/test-agent
@@ -125,7 +132,7 @@ jobs:
125132
version: ${{ needs.version.outputs.value }}
126133

127134
cli:
128-
needs: [version, acp, core, durable-streams, git, runtime, test-agent, testing, web, workflow]
135+
needs: [version, acp, agent, core, durable-streams, git, runtime, test-agent, testing, web, workflow]
129136
uses: ./.github/workflows/publish-one.yml
130137
with:
131138
package: packages/cli

‎README.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ Locate the package that owns the behavior you are about to change:
4141

4242
- `packages/core/` — the engine: the boundary scanner, component expansion,
4343
`exec` and `eval`, modifiers, and the `execute()` entry point.
44+
- `packages/agent/` — the Agent components (`<AgentProvider>`, `<Agent>`,
45+
`<Session>`, `<Prompt>` and the permission regions), the `Agent` Api, Prompt
46+
journaling and held conversations. A Plugin imports `Agent` from
47+
`@executablemd/agent/api`; a host installs the components from
48+
`@executablemd/agent/host`.
4449
- `packages/cli/` — the `xmd` command. `src/cli.ts` is runtime-neutral;
4550
`src/{deno,node,bun,compiled}.ts` install the host adapters each runtime needs.
4651
- `packages/runtime/` — the contextual host APIs — process, filesystem, env,

‎architecture.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,18 @@ Providers answer those operations. Runtime entrypoints install the appropriate a
8282

8383
`@executablemd/git` owns repository composition, Git operations, Git-host behavior, issues, and pull requests. It extends Workflow through Workflow’s published boundaries; Workflow imports no Git feature.
8484

85+
`@executablemd/agent` owns the Agent vocabulary over Core: the `Agent` Api,
86+
the Agent, Session and Prompt components, Prompt journaling, provider
87+
installation and held conversations. It depends on Core, durable-streams and
88+
runtime, and reaches Core only through Core's published entries; Core imports no
89+
Agent package and registers no Agent component by itself. Components and
90+
Plugins compose agent work through `@executablemd/agent/api`; a host installs
91+
the vocabulary, a provider and a held conversation through
92+
`@executablemd/agent/host`, and its generic `Plugin` and execution imports stay
93+
Core's. The components keep the origin `@executablemd/core` they had when Core
94+
shipped them, so authored documents and retained journals read the same. ACP,
95+
Workflow, Test Agent and the CLI import Agent's entries directly.
96+
8597
An Agent provider supplies conversation behavior. The Agent proposes source; canonical generated evaluation admits and performs it. Provider conversation continuity has its own contract in the [ACP client specification](specs/acp-client-spec.md).
8698

8799
Ordinary Agent Session placement is inert: a placed session contacts nothing

‎bun.lock‎

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎deno.lock‎

Lines changed: 14 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎examples/adversarial-implementation/components/Delivery/Inspect.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Agent } from "@executablemd/core/api";
1+
import { Agent } from "@executablemd/agent/api";
22
import type { Operation } from "effection";
33
import { z } from "zod";
44
import { describeFailure, isFilesFailure } from "./failure.ts";

‎examples/adversarial-implementation/components/Delivery/Turn.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { AgentPromptError } from "@executablemd/core";
2-
import { Agent, Component } from "@executablemd/core/api";
3-
import type { AgentPromptEvent } from "@executablemd/core/api";
1+
import { AgentPromptError } from "@executablemd/agent/api";
2+
import { Component } from "@executablemd/core/api";
3+
import { Agent } from "@executablemd/agent/api";
4+
import type { AgentPromptEvent } from "@executablemd/agent/api";
45
import type { Operation, Stream } from "effection";
56
import { z } from "zod";
67
import {

‎examples/adversarial-implementation/components/Phase/Session.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { Agent, Component } from "@executablemd/core/api";
2-
import type { AgentPromptEvent } from "@executablemd/core/api";
1+
import { Component } from "@executablemd/core/api";
2+
import { Agent } from "@executablemd/agent/api";
3+
import type { AgentPromptEvent } from "@executablemd/agent/api";
34
import { API, cwd, parseFilesFailure } from "@executablemd/runtime";
45
import { ensure, type Stream } from "effection";
56
import { z } from "zod";

‎examples/adversarial-implementation/tests/acp-overlap/local-workers.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createAcpRuntime, createAcpxProvider, createAcpxSessionStore } from "@executablemd/acp";
2-
import { AgentProviders, registerAgentProvider } from "@executablemd/core";
2+
import { AgentProviders, registerAgentProvider } from "@executablemd/agent/api";
33
import { Component, Plugin } from "@executablemd/core/api";
44
import { API, command, env, readTextFile } from "@executablemd/runtime";
55
import { useTestAgentController } from "@executablemd/test-agent";

‎examples/adversarial-implementation/tests/components/Fixture/Session.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { Agent, Component } from "@executablemd/core/api";
2-
import type { AgentPromptEvent } from "@executablemd/core/api";
1+
import { Component } from "@executablemd/core/api";
2+
import { Agent } from "@executablemd/agent/api";
3+
import type { AgentPromptEvent } from "@executablemd/agent/api";
34
import type { Stream } from "effection";
45
import { z } from "zod";
56

0 commit comments

Comments
 (0)