Skip to content

Commit a355bbf

Browse files
kapaleshreyasclaude
andcommitted
add computeragent umbrella package + update scaffold
`npm install computeragent` now installs the SDK + LocalSubstrate in one dependency. The scaffold (`npx create-computeragent`) generates a project with `computeragent` as its only dep and imports from it directly. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 4ddb549 commit a355bbf

8 files changed

Lines changed: 215 additions & 12 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
"computeragent": minor
3+
"create-computeragent": patch
4+
---
5+
6+
Add the `computeragent` umbrella package as the one-line entry point.
7+
8+
`npm install computeragent` now installs the SDK + `LocalSubstrate` in a
9+
single dependency. The 13 scoped `@computeragent/*` packages remain
10+
independently publishable for power users who want minimal deps. Same
11+
pattern as `next` (umbrella) + `@next/*` (parts).
12+
13+
The `create-computeragent` scaffold now generates a `package.json` with
14+
`computeragent` as its only dependency, and `index.ts` imports from
15+
`"computeragent"` instead of two scoped packages.

README.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,25 @@ ComputerAgent decomposes the agent stack into **four orthogonal axes** — any c
4949

5050
## 60-second getting started
5151

52-
Requires [Bun](https://bun.sh) ≥ 1.1 and [pnpm](https://pnpm.io) ≥ 9.
52+
Two ways. Either scaffolds a runnable project; pick one.
53+
54+
**Fastest — `npx create-computeragent`:**
55+
56+
```bash
57+
npx create-computeragent my-agent
58+
cd my-agent && npm install
59+
ANTHROPIC_API_KEY=sk-ant-... npm start
60+
```
61+
62+
**Or wire it up yourself:**
5363

5464
```bash
55-
git clone https://github.com/open-gitagent/ComputerAgent
56-
cd ComputerAgent
57-
pnpm install
58-
pnpm build
65+
npm install computeragent
5966
```
6067

6168
```ts
6269
// my-first-agent.ts
63-
import { runTask } from "@computeragent/sdk";
64-
import { LocalSubstrate } from "@computeragent/runtime-local";
70+
import { runTask, LocalSubstrate } from "computeragent";
6571

6672
const result = await runTask({
6773
source: {
@@ -88,11 +94,13 @@ console.log(result.ended.reason); // "complete"
8894
```
8995

9096
```bash
91-
ANTHROPIC_API_KEY=sk-... bun run my-first-agent.ts
97+
ANTHROPIC_API_KEY=sk-... node --experimental-strip-types my-first-agent.ts
9298
```
9399

94100
That's it. No harness server to boot, no session lifecycle to manage — `runTask` handles everything and tears the substrate down before returning.
95101

102+
The `computeragent` umbrella package gives you the SDK + `LocalSubstrate` in one install. For other substrates / engines / memory backends, install the scoped packages alongside (see [Packages](#packages)).
103+
96104
## Swap the substrate. Same code.
97105

98106
```ts
@@ -167,6 +175,8 @@ See [`PLAN.md`](./PLAN.md) for the full architecture history.
167175

168176
| Package | Role |
169177
|---|---|
178+
| **`computeragent`** | Umbrella — re-exports SDK + `LocalSubstrate`. The one-line install. |
179+
| `create-computeragent` | `npx create-computeragent my-agent` scaffolder |
170180
| `@computeragent/protocol` | Type defs + zod schemas + `EngineDriver` / `IdentityLoader` / `SessionStore` contracts |
171181
| `@computeragent/harness-server` | Generic HTTP+SSE framework with workspace FS API + built-in stores (Memory, File) |
172182
| `@computeragent/engine-claude-agent-sdk` | Wraps `@anthropic-ai/claude-agent-sdk` |

packages/computeragent/README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# computeragent
2+
3+
> Run any AI agent, anywhere, with any loop, and any memory backend.
4+
5+
The umbrella entry point for [ComputerAgent](https://github.com/open-gitagent/ComputerAgent). One install, one import, a running agent.
6+
7+
```bash
8+
npm install computeragent
9+
```
10+
11+
```ts
12+
import { runTask, LocalSubstrate } from "computeragent";
13+
14+
const result = await runTask({
15+
source: {
16+
type: "inline",
17+
manifest: { name: "hello", version: "0.1.0" },
18+
files: {
19+
"agent.yaml": [
20+
'spec_version: "0.1.0"',
21+
"name: hello",
22+
"version: 0.1.0",
23+
"model:",
24+
" preferred: claude-haiku-4-5-20251001",
25+
].join("\n"),
26+
"SOUL.md": "Respond in one short sentence.",
27+
},
28+
},
29+
harness: "claude-agent-sdk",
30+
envs: { ANTHROPIC_API_KEY: process.env.ANTHROPIC_API_KEY! },
31+
runtime: new LocalSubstrate(),
32+
message: "Say hi.",
33+
});
34+
```
35+
36+
## What's in the box
37+
38+
This package re-exports:
39+
40+
- **`ComputerAgent`**, **`ChatHandle`**, **`runTask`** — the user-facing SDK
41+
- **`LocalSubstrate`** — the default (subprocess) runtime
42+
- All the SDK's TypeScript types
43+
44+
That's enough for a complete agent in one import. For other substrates, session stores, or engines, install the scoped packages alongside:
45+
46+
```bash
47+
npm install @computeragent/runtime-e2b # cloud sandbox
48+
npm install @computeragent/runtime-vzvm # Apple VZ via Tart
49+
npm install @computeragent/session-store-mongo # MongoDB-backed memory
50+
npm install @computeragent/session-store-sqlite # SQLite-backed memory
51+
npm install @computeragent/engine-gitagent # gitclaw engine
52+
```
53+
54+
## Why an umbrella package
55+
56+
`computeragent` is the one-line entry point for the common case. The 13 scoped `@computeragent/*` packages stay independently publishable for power users who want minimal deps (a custom `harness-server` build with no SDK, or just the protocol types for a non-JS client).
57+
58+
This is the same shape as `next` (the umbrella) + `@next/*` (the parts) — install the one you need, ignore the rest.
59+
60+
## See also
61+
62+
- **Repo / docs:** https://github.com/open-gitagent/ComputerAgent
63+
- **Scaffold a project in 60 seconds:** `npx create-computeragent my-agent`
64+
- **Conformance suite for plug-in authors:** `@computeragent/testing`
65+
66+
## License
67+
68+
[MIT](../../LICENSE)
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"name": "computeragent",
3+
"version": "0.1.0",
4+
"description": "Run any AI agent, anywhere, with any loop, and any memory backend. The umbrella entry point for the ComputerAgent stack — re-exports the SDK + the local substrate so `npm install computeragent` is the one-line install.",
5+
"license": "MIT",
6+
"type": "module",
7+
"main": "./dist/index.js",
8+
"types": "./dist/index.d.ts",
9+
"exports": {
10+
".": {
11+
"types": "./dist/index.d.ts",
12+
"import": "./dist/index.js"
13+
}
14+
},
15+
"files": ["dist", "src", "README.md"],
16+
"keywords": [
17+
"ai-agents",
18+
"agent-framework",
19+
"agent-protocol",
20+
"anthropic",
21+
"claude",
22+
"claude-agent-sdk",
23+
"harness-protocol",
24+
"session-store",
25+
"computeragent",
26+
"typescript"
27+
],
28+
"homepage": "https://github.com/open-gitagent/ComputerAgent",
29+
"repository": {
30+
"type": "git",
31+
"url": "https://github.com/open-gitagent/ComputerAgent.git",
32+
"directory": "packages/computeragent"
33+
},
34+
"scripts": {
35+
"build": "tsc -p tsconfig.json",
36+
"typecheck": "tsc -p tsconfig.json --noEmit",
37+
"test": "vitest run --passWithNoTests",
38+
"clean": "rm -rf dist .turbo *.tsbuildinfo"
39+
},
40+
"dependencies": {
41+
"@computeragent/sdk": "workspace:*",
42+
"@computeragent/runtime-local": "workspace:*"
43+
},
44+
"devDependencies": {
45+
"typescript": "^5.5.0",
46+
"vitest": "^2.0.0"
47+
},
48+
"engines": {
49+
"node": ">=20"
50+
}
51+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/**
2+
* `computeragent` — the umbrella entry point.
3+
*
4+
* One-line install for the common case:
5+
*
6+
* npm install computeragent
7+
*
8+
* import { runTask, ComputerAgent, LocalSubstrate } from "computeragent";
9+
*
10+
* Re-exports the user-facing SDK plus the default `LocalSubstrate` so a
11+
* fresh project can get to a running agent without touching the scoped
12+
* `@computeragent/*` packages directly. For other substrates (E2B, VZVM)
13+
* or other session-store backends (Mongo, SQLite), install those scoped
14+
* packages alongside.
15+
*/
16+
export {
17+
ComputerAgent,
18+
ChatHandle,
19+
runTask,
20+
} from "@computeragent/sdk";
21+
export type {
22+
ChatInput,
23+
ChatResult,
24+
ComputerAgentOptions,
25+
PermissionDecision,
26+
RunTaskOptions,
27+
ToolCallContext,
28+
Substrate,
29+
BootHarnessOptions,
30+
BootedHarness,
31+
HarnessEvent,
32+
IdentitySource,
33+
UserMessage,
34+
} from "@computeragent/sdk";
35+
36+
export { LocalSubstrate } from "@computeragent/runtime-local";
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "../../tsconfig.base.json",
3+
"compilerOptions": {
4+
"rootDir": "src",
5+
"outDir": "dist"
6+
},
7+
"include": ["src/**/*"],
8+
"exclude": ["node_modules", "dist", "**/*.test.ts"]
9+
}

packages/create-computeragent/src/cli.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ await writeFile(
5252
start: "node --experimental-strip-types index.ts",
5353
},
5454
dependencies: {
55-
"@computeragent/sdk": "^0.1.0",
56-
"@computeragent/runtime-local": "^0.1.0",
55+
computeragent: "^0.1.0",
5756
},
5857
engines: { node: ">=22.6.0" },
5958
},
@@ -64,8 +63,7 @@ await writeFile(
6463

6564
await writeFile(
6665
join(targetDir, "index.ts"),
67-
`import { runTask } from "@computeragent/sdk";
68-
import { LocalSubstrate } from "@computeragent/runtime-local";
66+
`import { runTask, LocalSubstrate } from "computeragent";
6967
7068
const apiKey = process.env.ANTHROPIC_API_KEY;
7169
if (!apiKey) {

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)