@anhlp/alp 0.0.0-beta.1
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/LICENSE +202 -0
- package/NOTICE +7 -0
- package/README.md +416 -0
- package/dist/THIRD-PARTY-NOTICES.txt +626 -0
- package/dist/acp.js +19723 -0
- package/dist/alpd.js +41053 -0
- package/docs/modular-monorepo.md +210 -0
- package/package.json +126 -0
- package/packages/cli/README.md +7 -0
- package/packages/cli/dist/THIRD-PARTY-NOTICES.txt +626 -0
- package/packages/cli/dist/acp/agent.d.ts +29 -0
- package/packages/cli/dist/acp/agent.js +390 -0
- package/packages/cli/dist/acp/main.d.ts +4 -0
- package/packages/cli/dist/acp/main.js +23 -0
- package/packages/cli/dist/acp.js +19723 -0
- package/packages/cli/dist/alpd.js +41053 -0
- package/packages/cli/dist/backup.d.ts +4 -0
- package/packages/cli/dist/backup.js +146 -0
- package/packages/cli/dist/build-manifest.json +139 -0
- package/packages/cli/dist/cli.d.ts +2 -0
- package/packages/cli/dist/cli.js +24 -0
- package/packages/cli/dist/daemon.d.ts +35 -0
- package/packages/cli/dist/daemon.js +122 -0
- package/packages/cli/dist/index.d.ts +1 -0
- package/packages/cli/dist/index.js +5 -0
- package/packages/cli/dist/interfaces.d.ts +16 -0
- package/packages/cli/dist/interfaces.js +96 -0
- package/packages/cli/dist/library.d.ts +140 -0
- package/packages/cli/dist/library.js +319 -0
- package/packages/cli/dist/paths.d.ts +3 -0
- package/packages/cli/dist/paths.js +18 -0
- package/packages/cli/dist/projects.d.ts +9 -0
- package/packages/cli/dist/projects.js +159 -0
- package/packages/cli/dist/sessions.d.ts +39 -0
- package/packages/cli/dist/sessions.js +425 -0
- package/packages/cli/dist/tasks.d.ts +29 -0
- package/packages/cli/dist/tasks.js +345 -0
- package/packages/cli/dist/usage.d.ts +3 -0
- package/packages/cli/dist/usage.js +72 -0
- package/packages/client/README.md +24 -0
- package/packages/client/dist/acp-probe.d.ts +44 -0
- package/packages/client/dist/acp-probe.js +37 -0
- package/packages/client/dist/antigravity-probe.d.ts +34 -0
- package/packages/client/dist/antigravity-probe.js +95 -0
- package/packages/client/dist/command.d.ts +5 -0
- package/packages/client/dist/command.js +33 -0
- package/packages/client/dist/doctor.d.ts +13 -0
- package/packages/client/dist/doctor.js +587 -0
- package/packages/client/dist/index.d.ts +101 -0
- package/packages/client/dist/index.js +422 -0
- package/packages/client/dist/ipc.d.ts +42 -0
- package/packages/client/dist/ipc.js +69 -0
- package/packages/client/dist/library-test.d.ts +94 -0
- package/packages/client/dist/library-test.js +37 -0
- package/packages/client/dist/mcp-probe.d.ts +24 -0
- package/packages/client/dist/mcp-probe.js +147 -0
- package/packages/client/dist/portable.d.ts +18 -0
- package/packages/client/dist/portable.js +27 -0
- package/packages/client/dist/prompt.d.ts +32 -0
- package/packages/client/dist/prompt.js +59 -0
- package/packages/client/dist/render.d.ts +6 -0
- package/packages/client/dist/render.js +120 -0
- package/packages/client/dist/rpc/client.d.ts +82 -0
- package/packages/client/dist/rpc/client.js +292 -0
- package/packages/client/dist/rpc/errors.d.ts +42 -0
- package/packages/client/dist/rpc/errors.js +34 -0
- package/packages/client/dist/rpc/framing.d.ts +21 -0
- package/packages/client/dist/rpc/framing.js +57 -0
- package/packages/client/dist/rpc/handshake.d.ts +19 -0
- package/packages/client/dist/rpc/handshake.js +8 -0
- package/packages/client/dist/rpc/reconnect.d.ts +97 -0
- package/packages/client/dist/rpc/reconnect.js +227 -0
- package/packages/client/dist/rpc/timers.d.ts +11 -0
- package/packages/client/dist/rpc/timers.js +11 -0
- package/packages/client/dist/service.d.ts +50 -0
- package/packages/client/dist/service.js +143 -0
- package/packages/client/dist/setup.d.ts +2 -0
- package/packages/client/dist/setup.js +146 -0
- package/packages/client/dist/supervise.d.ts +12 -0
- package/packages/client/dist/supervise.js +81 -0
- package/packages/client/dist/websocket.d.ts +51 -0
- package/packages/client/dist/websocket.js +190 -0
- package/packages/core/README.md +7 -0
- package/packages/core/dist/adapter.d.ts +20 -0
- package/packages/core/dist/adapter.js +30 -0
- package/packages/core/dist/atomic.d.ts +2 -0
- package/packages/core/dist/atomic.js +28 -0
- package/packages/core/dist/backup.d.ts +27 -0
- package/packages/core/dist/backup.js +582 -0
- package/packages/core/dist/beads.d.ts +65 -0
- package/packages/core/dist/beads.js +213 -0
- package/packages/core/dist/delegation.d.ts +2 -0
- package/packages/core/dist/delegation.js +32 -0
- package/packages/core/dist/errors.d.ts +4 -0
- package/packages/core/dist/errors.js +11 -0
- package/packages/core/dist/formulas.d.ts +25 -0
- package/packages/core/dist/formulas.js +201 -0
- package/packages/core/dist/hook-run.d.ts +44 -0
- package/packages/core/dist/hook-run.js +60 -0
- package/packages/core/dist/hooks.d.ts +35 -0
- package/packages/core/dist/hooks.js +30 -0
- package/packages/core/dist/index.d.ts +30 -0
- package/packages/core/dist/index.js +63 -0
- package/packages/core/dist/init.d.ts +30 -0
- package/packages/core/dist/init.js +88 -0
- package/packages/core/dist/library-edit.d.ts +90 -0
- package/packages/core/dist/library-edit.js +315 -0
- package/packages/core/dist/library.d.ts +28 -0
- package/packages/core/dist/library.js +108 -0
- package/packages/core/dist/log.d.ts +37 -0
- package/packages/core/dist/log.js +156 -0
- package/packages/core/dist/migrations.d.ts +9 -0
- package/packages/core/dist/migrations.js +95 -0
- package/packages/core/dist/models.d.ts +11 -0
- package/packages/core/dist/models.js +44 -0
- package/packages/core/dist/permissions.d.ts +14 -0
- package/packages/core/dist/permissions.js +229 -0
- package/packages/core/dist/profiles.d.ts +27 -0
- package/packages/core/dist/profiles.js +122 -0
- package/packages/core/dist/promptsafe.d.ts +1 -0
- package/packages/core/dist/promptsafe.js +13 -0
- package/packages/core/dist/providers.d.ts +90 -0
- package/packages/core/dist/providers.js +101 -0
- package/packages/core/dist/resolver.d.ts +41 -0
- package/packages/core/dist/resolver.js +240 -0
- package/packages/core/dist/safe-path.d.ts +2 -0
- package/packages/core/dist/safe-path.js +24 -0
- package/packages/core/dist/shell.d.ts +16 -0
- package/packages/core/dist/shell.js +22 -0
- package/packages/core/dist/state-schema.d.ts +9 -0
- package/packages/core/dist/state-schema.js +54 -0
- package/packages/core/dist/task-rows.d.ts +47 -0
- package/packages/core/dist/task-rows.js +45 -0
- package/packages/core/dist/tasks.d.ts +128 -0
- package/packages/core/dist/tasks.js +835 -0
- package/packages/core/dist/teams.d.ts +69 -0
- package/packages/core/dist/teams.js +159 -0
- package/packages/core/dist/template-path.d.ts +2 -0
- package/packages/core/dist/template-path.js +10 -0
- package/packages/core/dist/trust.d.ts +8 -0
- package/packages/core/dist/trust.js +47 -0
- package/packages/core/dist/types.d.ts +51 -0
- package/packages/core/dist/upgrade.d.ts +10 -0
- package/packages/core/dist/upgrade.js +200 -0
- package/packages/core/dist/user-settings.d.ts +6 -0
- package/packages/core/dist/user-settings.js +72 -0
- package/packages/core/dist/validation.d.ts +17 -0
- package/packages/core/dist/validation.js +295 -0
- package/packages/core/dist/verify.d.ts +15 -0
- package/packages/core/dist/verify.js +123 -0
- package/packages/core/dist/workflow.d.ts +14 -0
- package/packages/core/dist/workflow.js +24 -0
- package/templates/ALP.md +52 -0
- package/templates/agents/lead/AGENT.md +90 -0
- package/templates/agents/main/AGENT.md +150 -0
- package/templates/agents/oracle/AGENT.md +44 -0
- package/templates/agents/peer/AGENT.md +55 -0
- package/templates/agents/reviewer/AGENT.md +80 -0
- package/templates/agents/supervisor/AGENT.md +72 -0
- package/templates/providers/antigravity.json +6 -0
- package/templates/providers/opencode.json +7 -0
- package/templates/role-skills.json +8 -0
- package/templates/skills/bug-loop/SKILL.md +44 -0
- package/templates/skills/bug-loop/references/test-proof.md +25 -0
- package/templates/skills/goal-griller/SKILL.md +49 -0
- package/templates/skills/prompt-leverage/SKILL.md +37 -0
- package/templates/skills/prompt-leverage/references/brief-template.md +27 -0
- package/templates/skills/sequence-execution-plan/SKILL.md +42 -0
- package/templates/skills/sequence-execution-plan/references/plan-template.md +22 -0
- package/templates/skills/smart-commits/SKILL.md +40 -0
- package/templates/skills/xia/SKILL.md +42 -0
- package/templates/teams/cafe/HOUSE_RULES.md +1 -0
- package/templates/teams/cafe/team.json +15 -0
- package/templates/teams/pho/HOUSE_RULES.md +1 -0
- package/templates/teams/pho/team.json +14 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
# Modular ALP monorepo
|
|
2
|
+
|
|
3
|
+
ALP uses npm workspaces inspired by [Paseo's package layout](https://github.com/getpaseo/paseo/blob/main/package.json). The `@anhlp/alp` root package now uses the canonical workspace builds; root source shims and legacy checkout directories have been removed.
|
|
4
|
+
|
|
5
|
+
## Repository layout
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
packages/ ALP libraries and executables, published as @anhlp/alp-*
|
|
9
|
+
protocol core runtime client daemon cli
|
|
10
|
+
integrations/ optional adapters to external hosts, each a separate package
|
|
11
|
+
paseo/ @anhlp/alp-paseo (Paseo plugin, web app, relay)
|
|
12
|
+
web.json development-only descriptor; not shipped in core
|
|
13
|
+
apps/ standalone applications
|
|
14
|
+
tui/ @anhlp/alp-tui (reserved, private)
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Workspaces are `packages/*` (the six libraries), `integrations/paseo` and `apps/tui`; package names, versions and public exports did not change with the move. Dependencies run one way: `packages/*` never depend on `integrations/*` or `apps/*`, and nothing depends on an integration or an app. `npm run check:boundaries` fails on any such edge, on dependencies outside the allowed graph, and on cycles. Update path-based tooling through `scripts/test-lib.mjs` (`workspaceDirectory`) and `scripts/build-workspace.mjs` (`locations`).
|
|
18
|
+
|
|
19
|
+
The plugin depends on the daemon only for its embedded mode and for the `alpd` it bundles; every other interaction goes through `@anhlp/alp-client` and `@anhlp/alp-protocol` over IPC. The daemon, runtime, core, client and cli packages do not import it.
|
|
20
|
+
|
|
21
|
+
## Ownership and dependency rules
|
|
22
|
+
|
|
23
|
+
| Workspace | Public API | Owns | ALP dependencies |
|
|
24
|
+
|---|---|---|---|
|
|
25
|
+
| `@anhlp/alp-protocol` | version/constants/errors, JSON Schemas, event/session DTOs, connection contract | wire and data contracts | none |
|
|
26
|
+
| `@anhlp/alp-core` | named domain namespaces and exported domain subpaths | configuration, resolution, teams, tasks, hooks, permissions, templates | protocol |
|
|
27
|
+
| `@anhlp/alp-runtime` | `createAlpRuntime`, native transports, provider registry, runtime subpaths | sessions, delegation, mailbox, board, provider execution | core, protocol |
|
|
28
|
+
| `@anhlp/alp-client` | `AlpClient`, `connect`, discovery/lifecycle and helper subpaths | IPC client, supervision, service definitions, setup/diagnostics | core, protocol |
|
|
29
|
+
| `@anhlp/alp-daemon` | `createDaemonServer`, stores, neutral IPC extensions | runtime hosting, persistence and server surfaces | runtime, core, client, protocol |
|
|
30
|
+
| `@anhlp/alp-cli` | `alp` executable; ACP subpaths | command domains and ACP editor adapter | client, core, protocol |
|
|
31
|
+
| `@anhlp/alp-paseo` | existing Paseo server/client entrypoints | Paseo host adapter and panels | daemon, runtime, client, core, protocol |
|
|
32
|
+
| `@anhlp/alp-tui` | none | reserved private workspace | none |
|
|
33
|
+
|
|
34
|
+
Cross-package code imports package exports, never sibling source paths. Public domain subpaths omit `.js`, for example `@anhlp/alp-core/tasks`. Imports inside a package remain relative. `npm run check:boundaries` checks source imports, declared dependencies, the allowed graph and cycles. Native SDKs stay in runtime or host adapters; core/protocol do not import them.
|
|
35
|
+
|
|
36
|
+
Canonical implementations live in `packages/*/src`, `integrations/paseo` and `apps/tui`; the root package exposes built compatibility artifacts rather than source shims. Shared server-side panel RPC handlers belong to the plugin; the daemon hosts only neutral IPC extensions and does not depend on the plugin package.
|
|
37
|
+
|
|
38
|
+
The root `templates/` remains the editable source of truth. Build scripts copy it into the core package's generated `templates/` for standalone installation. Do not edit the generated copy. Existing template and data formats are unchanged.
|
|
39
|
+
|
|
40
|
+
## Build and test
|
|
41
|
+
|
|
42
|
+
`npm run validate` is the shared local/CI baseline. Run `validate:core`,
|
|
43
|
+
`validate:paseo`, or `validate:packages` separately to isolate failures. See
|
|
44
|
+
[CI baseline](ci-baseline.md) for build ordering, requirements and recorded results.
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
npm ci
|
|
48
|
+
npm run check:boundaries
|
|
49
|
+
npm run check
|
|
50
|
+
npm test
|
|
51
|
+
npm run build:packages
|
|
52
|
+
npm run build --workspace=@anhlp/alp-runtime
|
|
53
|
+
npm run test --workspace=@anhlp/alp-runtime
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Root `npm run build` retains the neutral legacy bundle paths and builds the CLI without Paseo. `npm run build:paseo` builds the optional plugin. Workspace builds compile the selected package and its dependencies, preserving individual module imports and emitting declarations. The `alp-source` export condition is only for repository builds/typechecking; published consumers use ordinary JavaScript and declaration exports.
|
|
57
|
+
|
|
58
|
+
## Test layout
|
|
59
|
+
|
|
60
|
+
Tests follow package ownership. A test that imports only one package and the packages it declares as dependencies lives in `<workspace>/tests/` (`packages/<name>`, or `integrations/paseo` for the plugin) and runs with that package's `npm test`, which builds the package and its dependencies first. A test that crosses packages (several runtimes through the CLI, a daemon with a client and the plugin, repository-wide checks) lives in `test/integration/`. Live-provider scripts live in `test/e2e/`. Shared fixture transports stay in `test/support/`; they are plain files, not a package, and package tests may import them (and only them) from outside the package.
|
|
61
|
+
|
|
62
|
+
| Package | Tests |
|
|
63
|
+
| --- | --- |
|
|
64
|
+
| protocol | wire contract: fixtures, schema, method and event inventories |
|
|
65
|
+
| core | adapter, delegation, IR validation, library editing, resolver, upgrade |
|
|
66
|
+
| runtime | sessions, context, hardening, limits, pause, recall, supervisor, verdicts, worktrees, providers, v1 events |
|
|
67
|
+
| client | prompt, golden output, daemon endpoints |
|
|
68
|
+
| daemon | daemon lifecycle, board, extensions RPC, recovery, settings, usage, method inventory |
|
|
69
|
+
| cli | init, library, default providers, doctor, web pairing |
|
|
70
|
+
| @anhlp/alp-paseo | plugin bridge, panel, settings screen, web, relay, providers, skills, workflow, supervise, integration process logs |
|
|
71
|
+
| `test/integration` | ACP, Antigravity, beads, epics, hooks, language, permissions, service, setup, tasks, teams, template sync, verify, library tools, distribution layout, boundaries, web process and discovery, test layout |
|
|
72
|
+
|
|
73
|
+
Commands, from the repository root:
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
npm test # unit + integration, hermetic, each file once
|
|
77
|
+
npm run test:unit # every packages/*/tests
|
|
78
|
+
npm run test:integration # test/integration
|
|
79
|
+
npm run test:e2e # test/e2e, live providers (opt-in)
|
|
80
|
+
npm run test:all # all of the above
|
|
81
|
+
npm test -w @anhlp/alp-core # one package, independently
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Every run uses an isolated `ALP_HOME`. `npm run test:packages` runs each package's own `npm test` in turn; it overlaps with `test:unit` and is meant for checking that a package tests on its own. Live `test:e2e:*` scripts require authenticated providers (and sometimes a running Paseo host). `test/integration/layout.test.js` fails when a test file sits outside these directories, is selected twice, or names a package its own package does not depend on.
|
|
85
|
+
|
|
86
|
+
Every core workspace — protocol, core, runtime, client, daemon and CLI — compiles and tests without a web build; `scripts/build-core.mjs` emits the neutral core bundles and the six core packages' tests never build the plugin. Packing the optional plugin requires the pinned web app; packing `@anhlp/alp` does not:
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
npm run build:web
|
|
90
|
+
npm run build:packages
|
|
91
|
+
npm run release:pack-check
|
|
92
|
+
npm run test:packages:smoke
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Plugin prepack verifies its web artifact's pinned Paseo commit and patch inventory; core prepack runs only the core build. The daemon and CLI distributions carry `alpd.js` (CLI also `acp.js`) but no web app; the plugin ships the web app and the integration entry (`server/dist/main.js`), and the root `@anhlp/alp` distribution ships only core artifacts. The existing Claude SDK external dependency remains declared in the executable distributions.
|
|
96
|
+
|
|
97
|
+
### Breaking migration: the daemon no longer serves the web app
|
|
98
|
+
|
|
99
|
+
The web/Paseo surface moved out of the neutral daemon into the optional plugin. Consumers that reached the web app through `@anhlp/alp-daemon` must move to the plugin package:
|
|
100
|
+
|
|
101
|
+
| Removed | Replacement |
|
|
102
|
+
| --- | --- |
|
|
103
|
+
| `@anhlp/alp-daemon/web` (`createWebServer`, `createPaseoBridge`, `webAppDir`, `webFile`, `DEFAULT_WEB_PORT`) | `@anhlp/alp-paseo/web` (same named exports) |
|
|
104
|
+
|
|
105
|
+
`@anhlp/alp-daemon` keeps only its `index`, `lock`, `main`, `server` and `store` subpaths; the `web` export and `src/web.ts` are gone, so an `alp-daemon/web` import now fails at resolution. The daemon's neutral core bundles (`dist/runtime/index.js`, `dist/daemon/index.js`, `dist/alpd.js`, `dist/acp.js`, `dist/acp/agent.js`) never include the plugin or `@getpaseo`; `npm run check:boundaries` reads `dist/build-manifest.json` to prove it. The plugin's own subpaths (`@anhlp/alp-paseo`, `/main`, `/web`, `/paseo/*`, `/panel/*`) replace the old in-daemon copies, and Paseo's installed integration can register its descriptor at `$ALP_HOME/integrations/web.json` using `alp-web-integration --register`.
|
|
106
|
+
|
|
107
|
+
Migrate an in-repo consumer in two steps:
|
|
108
|
+
|
|
109
|
+
```sh
|
|
110
|
+
# 1. Install the optional integration beside the CLI.
|
|
111
|
+
npm install -g @anhlp/alp-paseo@beta
|
|
112
|
+
# 2. Move the import to the plugin and restart the daemon so it picks up the new build.
|
|
113
|
+
# -import { createWebServer } from '@anhlp/alp-daemon/web';
|
|
114
|
+
# +import { createWebServer } from '@anhlp/alp-paseo/web';
|
|
115
|
+
alp daemon restart
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
#### Dependency inventory
|
|
119
|
+
|
|
120
|
+
The six core workspaces depend only on `@anhlp/*` packages and their own declared SDKs; none declares or imports `@getpaseo/*`. The plugin is an optional consumer and declares Paseo as peer dependencies:
|
|
121
|
+
|
|
122
|
+
| Package | Declares `@getpaseo/*` | Provides |
|
|
123
|
+
| --- | --- | --- |
|
|
124
|
+
| `@anhlp/alp-protocol` … `@anhlp/alp-cli` | no | the neutral core |
|
|
125
|
+
| `@anhlp/alp-paseo` | peers `@getpaseo/plugin`, `@getpaseo/client`, `@getpaseo/protocol`, `@getpaseo/relay` (and React) | the Paseo host adapter, the web app and the panels |
|
|
126
|
+
|
|
127
|
+
`npm run release:pack-check` packs the main distribution and each public workspace, rejects Paseo paths in core tarballs and verifies public exports; `npm run release:tarball-check` then installs the tarballs in isolation — the core set with no `@getpaseo`, plugin or React package must import and typecheck, and the plugin must install with its declared peers.
|
|
128
|
+
|
|
129
|
+
#### Neutral extensions and the plugin's process data
|
|
130
|
+
|
|
131
|
+
The daemon hosts *neutral* IPC extensions: a connection registers a method with `extension.register`, owns it until it disconnects or calls `extension.unregister`, and the daemon routes `extension.invoke` calls back to the owner (bounded pending calls, torn down on disconnect). The daemon assigns no meaning to a method. The plugin registers `web.pairing` on its alpd connection and re-registers it after a daemon restart; `alp web pair` waits for the fresh registration instead of failing on an unknown method.
|
|
132
|
+
|
|
133
|
+
The plugin's per-process data stays under the selected home, never inside the daemon: the integration lock is `<home>/integrations/web.lock`, the ready address is `<home>/web.json`, the registered descriptor is `<home>/integrations/web.json`, and the log is `<home>/logs/integrations/paseo.log`. `alp web` reads the lock and `web.json` and ignores a stale file named by another pid. Set `ALP_HOME` to keep everything in one directory.
|
|
134
|
+
|
|
135
|
+
#### Restart and upgrade
|
|
136
|
+
|
|
137
|
+
Restarting is non-destructive. `alp daemon restart` (or the plugin's supervision) starts a fresh daemon; the plugin reconnects and re-registers its extensions, and sessions resume from their threads at the next prompt. A daemon left running by an older install is never killed or migrated in place: `alp web` reports that it is "older than this alp (alp daemon restart)" and waits for the operator, so a restart to migrate is always explicit.
|
|
138
|
+
|
|
139
|
+
## Independent versions and publishing
|
|
140
|
+
|
|
141
|
+
> **For the beta `0.0.0-beta.1`, do not use the commands in this section.** The beta gives all
|
|
142
|
+
> eight published packages one version, packs them once and publishes those tarballs with
|
|
143
|
+
> `--tag beta`, following the manual checklist in [beta-scope.md](alp/beta-scope.md) §7. The
|
|
144
|
+
> `npm publish` below has no `--tag`, so it would set `latest`.
|
|
145
|
+
|
|
146
|
+
Versions are per manifest. Bump one package and update its dependency references/lockfile with:
|
|
147
|
+
|
|
148
|
+
```sh
|
|
149
|
+
npm run version:package -- @anhlp/alp-protocol 0.9.6
|
|
150
|
+
npm run build --workspace=@anhlp/alp-protocol
|
|
151
|
+
npm run test --workspace=@anhlp/alp-protocol
|
|
152
|
+
npm pack --workspace=@anhlp/alp-protocol --dry-run
|
|
153
|
+
npm publish --workspace=@anhlp/alp-protocol --access public
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Publishing is an explicit operator action. Publish changed dependencies before dependents: protocol → core → runtime/client → daemon/CLI → plugin/compatibility root. The helper does not bump or publish unrelated package versions. TUI remains private and contains no implementation.
|
|
157
|
+
|
|
158
|
+
## Provider extension
|
|
159
|
+
|
|
160
|
+
The normalized request/notification/lifecycle interface is `RuntimeTransport`. Existing `RuntimeOptions.transport(cwd, env, kind, acp, antigravity)` remains the highest-priority injection hook. Each runtime can instead receive adapter overrides in `providers`, or an explicit `ProviderRegistry`:
|
|
161
|
+
|
|
162
|
+
```ts
|
|
163
|
+
import { createAlpRuntime, createProviderRegistry } from '@anhlp/alp-runtime';
|
|
164
|
+
const registry = createProviderRegistry();
|
|
165
|
+
registry.register('acp:my-agent', context => myTransport(context));
|
|
166
|
+
const runtime = createAlpRuntime({ providerRegistry: registry });
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Codex, Claude, ACP and Antigravity factories retain existing command/environment precedence. Named ACP factories fall back to the generic ACP adapter. Provider normalization, sandbox configuration and native SDK specifics remain behind runtime adapters. No global registry is mutated.
|
|
170
|
+
|
|
171
|
+
## Protocol and future Rust modules
|
|
172
|
+
|
|
173
|
+
`packages/protocol/schema/ipc-v1.json` defines JSON-RPC frames and discriminated session events. `methods-v1.json` inventories built-in methods and parameter shapes. JSONL fixtures exercise handshake, success, error and event notification frames; tests compare method/event inventories with their implementations and validate emitted events.
|
|
174
|
+
|
|
175
|
+
The portable seam is JSON, not a TypeScript object or an in-process callback:
|
|
176
|
+
|
|
177
|
+
- Local sockets/named pipes carry UTF-8 newline-delimited JSON-RPC 2.0; event notifications use method `event`.
|
|
178
|
+
- Protocol version remains 1; the existing handshake, method names and error codes remain unchanged.
|
|
179
|
+
- Events retain opaque session ids, runtime epoch, per-session sequence and ISO timestamps. Replay cursors never cross epochs.
|
|
180
|
+
- Schemas accept additive fields, matching existing clients. Preserve JSON field names, nullability and persisted version-1 records when replacing implementations.
|
|
181
|
+
- Incompatible method/event semantics require a negotiated new protocol version. Package SemVer and wire protocol version are separate.
|
|
182
|
+
- The current frame guard is `MAX_FRAME` (16 × 1024 × 1024 decoded JavaScript string units); a Rust replacement must preserve that guard or negotiate a changed byte limit.
|
|
183
|
+
|
|
184
|
+
A Rust daemon can implement the same method/event contract and run the JSON fixtures plus client/daemon tests. An in-process Rust runtime replacement must preserve the exported `AlpRuntime` interface through a Node binding or package-owned proxy, including synchronous snapshot/list reads, event ordering and lifecycle behavior. Client, CLI and Paseo surfaces then continue over IPC. A Rust core would need an explicit serialized command boundary around current filesystem operations before replacing the in-process core API; this migration does not pretend TypeScript function calls are language-neutral IPC. No Rust implementation or TUI is introduced.
|
|
185
|
+
|
|
186
|
+
The Paseo plugin workspace lives in `integrations/paseo` and uses the npm name `@anhlp/alp-paseo`. Build with `npm run build -w @anhlp/alp-paseo` and test with `npm run test -w @anhlp/alp-paseo`. Tool selectors accept `paseo`; the previous `paseo-plugin` selector remains an alias.
|
|
187
|
+
|
|
188
|
+
## Paseo isolation
|
|
189
|
+
|
|
190
|
+
The ALP core six workspaces (`protocol`, `core`, `runtime`, `client`, `daemon`, `cli`) now contain no `@getpaseo/*` imports or dependencies. Paseo-specific protocol handling, panel RPC implementations, shared RPC mapping, and the `createPaseoBridge` web/relay gateway moved to `integrations/paseo`; daemon artifacts expose them no longer. The Paseo integration remains an optional consumer of ALP daemon IPC and may be shipped separately or bundled as an optional executable/app. `check-boundaries` additionally validates packed `dist` artifacts for leaked Paseo dependencies.
|
|
191
|
+
|
|
192
|
+
### Main distribution and standalone proof
|
|
193
|
+
|
|
194
|
+
`@anhlp/alp` has no required, optional, peer or bundled `@getpaseo/*` dependency,
|
|
195
|
+
and ships neither the web app nor integration descriptors/server artifacts.
|
|
196
|
+
The root build/prepack and all six workspace builds are core-only. Declaration
|
|
197
|
+
emission uses `packages/daemon/src/alp-templates.d.ts`, with no Paseo source input.
|
|
198
|
+
|
|
199
|
+
`npm run test:core:standalone` copies only the six core sources, templates and
|
|
200
|
+
build scripts into a temporary source tree, installs build dependencies there,
|
|
201
|
+
and runs actual npm prepack lifecycles without `integrations/paseo` or a web
|
|
202
|
+
build. It installs the resulting six tarballs in one consumer and `@anhlp/alp`
|
|
203
|
+
with only its declared ALP dependencies in another. Both run CLI/daemon/IPC and
|
|
204
|
+
ACP stdio handshake, prompt and streamed response with a fake provider. Installed
|
|
205
|
+
artifacts and the complete npm dependency tree are checked for Paseo leakage.
|
|
206
|
+
The existing runtime/reconnect test also runs against the six installed packages.
|
|
207
|
+
|
|
208
|
+
To retain the web UI after upgrading core, install `@anhlp/alp-paseo` separately
|
|
209
|
+
and run `alp-web-integration --register` in the intended `ALP_HOME` (global PATH
|
|
210
|
+
discovery also works). See the [plugin installation and compatibility notes](../integrations/paseo/README.md#optional-web-installation).
|
package/package.json
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@anhlp/alp",
|
|
3
|
+
"version": "0.0.0-beta.1",
|
|
4
|
+
"description": "ALP command line and alpd, the per-user daemon that runs filesystem-defined Codex and Claude Code agent teams",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"packages/cli/dist",
|
|
8
|
+
"packages/core/dist",
|
|
9
|
+
"packages/client/dist",
|
|
10
|
+
"dist/alpd.js",
|
|
11
|
+
"dist/acp.js",
|
|
12
|
+
"templates",
|
|
13
|
+
"README.md",
|
|
14
|
+
"docs/modular-monorepo.md",
|
|
15
|
+
"/NOTICE",
|
|
16
|
+
"dist/THIRD-PARTY-NOTICES.txt"
|
|
17
|
+
],
|
|
18
|
+
"bin": {
|
|
19
|
+
"alp": "packages/cli/dist/cli.js"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"test": "node scripts/test.mjs",
|
|
23
|
+
"test:unit": "node scripts/test.mjs unit",
|
|
24
|
+
"test:integration": "node scripts/test.mjs integration",
|
|
25
|
+
"test:e2e": "node scripts/test.mjs e2e",
|
|
26
|
+
"test:all": "node scripts/test.mjs all",
|
|
27
|
+
"check": "tsc -p tsconfig.paseo.json && tsc -p tsconfig.client.json",
|
|
28
|
+
"build": "node scripts/build-workspace.mjs cli && node scripts/build-core.mjs",
|
|
29
|
+
"test:e2e:workflow": "node test/e2e/workflow-e2e.mjs pho && node test/e2e/workflow-e2e.mjs cafe",
|
|
30
|
+
"test:e2e:mailbox": "node test/e2e/mailbox-e2e.mjs ask && node test/e2e/mailbox-e2e.mjs wake && node test/e2e/mailbox-e2e.mjs steer",
|
|
31
|
+
"test:e2e:team": "node test/e2e/team-e2e.mjs",
|
|
32
|
+
"test:e2e:claude": "node test/e2e/claude-e2e.mjs",
|
|
33
|
+
"test:e2e:claude-runtime": "node test/e2e/claude-runtime-e2e.mjs",
|
|
34
|
+
"test:e2e:paseo": "node test/e2e/paseo-e2e.mjs",
|
|
35
|
+
"test:e2e:paseo-remote": "node test/e2e/paseo-remote-e2e.mjs",
|
|
36
|
+
"test:e2e:alpd": "node scripts/build-core.mjs && node test/e2e/alpd-e2e.mjs",
|
|
37
|
+
"test:e2e:detach": "node test/e2e/viewer-detach-e2e.mjs",
|
|
38
|
+
"test:e2e:persistence": "node scripts/build-core.mjs && node test/e2e/persistence-e2e.mjs",
|
|
39
|
+
"test:e2e:import": "node test/e2e/import-e2e.mjs",
|
|
40
|
+
"test:e2e:worktree": "node scripts/build-core.mjs && node test/e2e/worktree-e2e.mjs",
|
|
41
|
+
"test:e2e:human": "node test/e2e/human-e2e.mjs cli && node test/e2e/human-e2e.mjs paseo",
|
|
42
|
+
"test:e2e:board": "node scripts/build-core.mjs && node test/e2e/board-e2e.mjs",
|
|
43
|
+
"prepack": "npm run build",
|
|
44
|
+
"build:web": "node scripts/build-paseo-web.mjs",
|
|
45
|
+
"build:packages": "npm run build --workspaces --if-present",
|
|
46
|
+
"test:packages": "npm run test --workspaces --if-present",
|
|
47
|
+
"check:boundaries": "node scripts/check-boundaries.mjs",
|
|
48
|
+
"release:check": "npm run check:boundaries && npm run check && npm test && npm run build:packages && npm run release:pack-check",
|
|
49
|
+
"version:package": "node scripts/version-package.mjs",
|
|
50
|
+
"release:pack-check": "node scripts/pack-check.mjs",
|
|
51
|
+
"release:tarball-check": "node scripts/tarball-consumer.mjs",
|
|
52
|
+
"release:check-version": "node scripts/release-check.mjs",
|
|
53
|
+
"release:pack": "node scripts/release-pack.mjs",
|
|
54
|
+
"release:verify": "node scripts/release-verify.mjs",
|
|
55
|
+
"release:consumer": "node scripts/release-consumer.mjs",
|
|
56
|
+
"release:gate": "node scripts/release-gate.mjs",
|
|
57
|
+
"test:packages:smoke": "node scripts/package-smoke.mjs",
|
|
58
|
+
"test:gateway:smoke": "node scripts/gateway-smoke.mjs",
|
|
59
|
+
"validate": "node scripts/validate.mjs",
|
|
60
|
+
"validate:core": "node scripts/validate.mjs core",
|
|
61
|
+
"validate:paseo": "node scripts/validate.mjs paseo",
|
|
62
|
+
"validate:packages": "node scripts/validate.mjs packages",
|
|
63
|
+
"check:core": "tsc -p tsconfig.core.json",
|
|
64
|
+
"test:core:standalone": "node scripts/core-standalone-smoke.mjs",
|
|
65
|
+
"build:paseo": "node scripts/build-workspace.mjs paseo",
|
|
66
|
+
"dev:alp-web": "npm run dev --workspace @anhlp/alp-web",
|
|
67
|
+
"build:alp-web": "npm run build --workspace @anhlp/alp-web",
|
|
68
|
+
"typecheck:alp-web": "npm run typecheck --workspace @anhlp/alp-web",
|
|
69
|
+
"test:alp-web": "npm test --workspace @anhlp/alp-web",
|
|
70
|
+
"test:alp-web:e2e": "node scripts/build-workspace.mjs cli && node scripts/build-workspace.mjs daemon && npm run build --workspace @anhlp/alp-web && npm run test:e2e --workspace @anhlp/alp-web",
|
|
71
|
+
"validate:web": "node scripts/validate.mjs web"
|
|
72
|
+
},
|
|
73
|
+
"engines": {
|
|
74
|
+
"node": ">=22.12"
|
|
75
|
+
},
|
|
76
|
+
"devDependencies": {
|
|
77
|
+
"@agentclientprotocol/sdk": "1.7.0",
|
|
78
|
+
"@anthropic-ai/sdk": "^0.131.0",
|
|
79
|
+
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
80
|
+
"@types/node": "22.20.5",
|
|
81
|
+
"@types/react": "19.1.17",
|
|
82
|
+
"@types/react-dom": "19.1",
|
|
83
|
+
"@types/ws": "^8.18.2",
|
|
84
|
+
"ajv": "8.20.0",
|
|
85
|
+
"esbuild": "0.25.12",
|
|
86
|
+
"react": "19.1.0",
|
|
87
|
+
"react-dom": "19.1.0",
|
|
88
|
+
"react-native": "0.81.5",
|
|
89
|
+
"typescript": "5.9.3",
|
|
90
|
+
"ws": "^8.22.0",
|
|
91
|
+
"zod": "4.4.3"
|
|
92
|
+
},
|
|
93
|
+
"dependencies": {
|
|
94
|
+
"@anhlp/alp-client": "0.0.0-beta.1",
|
|
95
|
+
"@anhlp/alp-core": "0.0.0-beta.1",
|
|
96
|
+
"@anhlp/alp-protocol": "0.0.0-beta.1",
|
|
97
|
+
"@anthropic-ai/claude-agent-sdk": "^0.3.292",
|
|
98
|
+
"smol-toml": "1.9.0"
|
|
99
|
+
},
|
|
100
|
+
"license": "Apache-2.0",
|
|
101
|
+
"repository": {
|
|
102
|
+
"type": "git",
|
|
103
|
+
"url": "git+https://github.com/phucanh08/alp.git"
|
|
104
|
+
},
|
|
105
|
+
"homepage": "https://github.com/phucanh08/alp#readme",
|
|
106
|
+
"bugs": {
|
|
107
|
+
"url": "https://github.com/phucanh08/alp/issues"
|
|
108
|
+
},
|
|
109
|
+
"publishConfig": {
|
|
110
|
+
"access": "public",
|
|
111
|
+
"registry": "https://registry.npmjs.org/",
|
|
112
|
+
"tag": "beta"
|
|
113
|
+
},
|
|
114
|
+
"workspaces": [
|
|
115
|
+
"packages/protocol",
|
|
116
|
+
"packages/core",
|
|
117
|
+
"packages/runtime",
|
|
118
|
+
"packages/client",
|
|
119
|
+
"packages/daemon",
|
|
120
|
+
"packages/cli",
|
|
121
|
+
"apps/tui",
|
|
122
|
+
"apps/gateway",
|
|
123
|
+
"integrations/paseo",
|
|
124
|
+
"apps/web"
|
|
125
|
+
]
|
|
126
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# @anhlp/alp-cli
|
|
2
|
+
|
|
3
|
+
The alp executable and ACP editor surface.
|
|
4
|
+
|
|
5
|
+
Build: `npm run build --workspace=@anhlp/alp-cli`. Test: `npm run test --workspace=@anhlp/alp-cli`.
|
|
6
|
+
|
|
7
|
+
Public imports use the package root and its explicitly exported subpaths. See [architecture, provider extension, compatibility and release instructions](../../docs/modular-monorepo.md).
|