@anhlp/alp 0.0.1-beta.3 → 0.0.1-beta.4

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.
Files changed (54) hide show
  1. package/README.md +18 -16
  2. package/dist/acp.js +37 -4
  3. package/dist/alpd.js +10350 -3346
  4. package/docs/modular-monorepo.md +17 -13
  5. package/package.json +8 -6
  6. package/packages/cli/dist/THIRD-PARTY-NOTICES.txt +25 -0
  7. package/packages/cli/dist/acp/main.js +1 -1
  8. package/packages/cli/dist/acp.js +37 -4
  9. package/packages/cli/dist/alp-web/THIRD-PARTY-NOTICES.txt +2590 -0
  10. package/packages/cli/dist/alp-web/alp-boundary.json +15 -0
  11. package/packages/cli/dist/alp-web/apple-touch-icon.png +0 -0
  12. package/packages/cli/dist/alp-web/assets/TerminalPanel-DLuoa74B.css +1 -0
  13. package/packages/cli/dist/alp-web/assets/TerminalPanel-PrU2l3u5.js +16 -0
  14. package/packages/cli/dist/alp-web/assets/index-BJdBTDFX.css +1 -0
  15. package/packages/cli/dist/alp-web/assets/index-DpfiPv5s.js +52 -0
  16. package/packages/cli/dist/alp-web/favicon-attention.svg +6 -0
  17. package/packages/cli/dist/alp-web/favicon-running.svg +6 -0
  18. package/packages/cli/dist/alp-web/favicon.svg +5 -0
  19. package/packages/cli/dist/alp-web/index.html +20 -0
  20. package/packages/cli/dist/alp-web.js +9640 -0
  21. package/packages/cli/dist/alpd.js +10350 -3346
  22. package/packages/cli/dist/backup.js +2 -2
  23. package/packages/cli/dist/build-manifest.json +99 -1
  24. package/packages/cli/dist/cli.js +4 -2
  25. package/packages/cli/dist/interfaces.d.ts +9 -1
  26. package/packages/cli/dist/interfaces.js +99 -39
  27. package/packages/cli/dist/schedules.d.ts +2 -0
  28. package/packages/cli/dist/schedules.js +45 -0
  29. package/packages/cli/dist/sessions.d.ts +3 -1
  30. package/packages/cli/dist/sessions.js +22 -11
  31. package/packages/cli/dist/terminal.d.ts +8 -0
  32. package/packages/cli/dist/terminal.js +79 -0
  33. package/packages/cli/dist/usage.d.ts +1 -1
  34. package/packages/cli/dist/usage.js +8 -2
  35. package/packages/cli/dist/web-service.d.ts +38 -0
  36. package/packages/cli/dist/web-service.js +119 -0
  37. package/packages/client/README.md +6 -1
  38. package/packages/client/dist/index.d.ts +37 -2
  39. package/packages/client/dist/index.js +55 -22
  40. package/packages/client/dist/integration-lock.d.ts +35 -0
  41. package/packages/client/dist/integration-lock.js +179 -0
  42. package/packages/client/dist/portable.d.ts +1 -0
  43. package/packages/client/dist/portable.js +7 -1
  44. package/packages/client/dist/rpc/registry.d.ts +211 -0
  45. package/packages/client/dist/rpc/registry.js +145 -0
  46. package/packages/client/dist/supervise.d.ts +2 -0
  47. package/packages/client/dist/supervise.js +4 -4
  48. package/packages/core/dist/backup.js +103 -4
  49. package/packages/core/dist/index.d.ts +1 -0
  50. package/packages/core/dist/index.js +2 -0
  51. package/packages/core/dist/migrations.js +1 -1
  52. package/packages/core/dist/user-worktree.d.ts +29 -0
  53. package/packages/core/dist/user-worktree.js +242 -0
  54. package/packages/core/dist/validation.js +3 -2
@@ -9,7 +9,7 @@ packages/ ALP libraries and executables, published as @anhlp/alp-*
9
9
  protocol core runtime client daemon cli
10
10
  integrations/ optional adapters to external hosts, each a separate package
11
11
  paseo/ @anhlp/alp-paseo (Paseo plugin, web app, relay)
12
- web.json development-only descriptor; not shipped in core
12
+ paseo.json development-only descriptor; not shipped in core
13
13
  apps/ standalone applications
14
14
  tui/ @anhlp/alp-tui (reserved, private)
15
15
  ```
@@ -83,16 +83,15 @@ npm test -w @anhlp/alp-core # one package, independently
83
83
 
84
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
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:
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 needs only the packages' own builds:
87
87
 
88
88
  ```sh
89
- npm run build:web
90
89
  npm run build:packages
91
90
  npm run release:pack-check
92
91
  npm run test:packages:smoke
93
92
  ```
94
93
 
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.
94
+ Plugin prepack builds the plugin; core prepack runs only the core build. The daemon distribution carries `alpd.js`; the CLI carries `alpd.js`, `acp.js` and `alp web`'s service with ALP's own app (`dist/alp-web.js`, `dist/alp-web/`); the plugin ships the bridge and the integration entry (`server/dist/main.js`) with Paseo's licence (`LICENSE.paseo.txt`), and no web app since Paseo's web app (`paseo-web/`) was removed (t-55ce.3); the root `@anhlp/alp` distribution ships only core artifacts. The existing Claude SDK external dependency remains declared in the executable distributions.
96
95
 
97
96
  ### Breaking migration: the daemon no longer serves the web app
98
97
 
@@ -100,9 +99,9 @@ The web/Paseo surface moved out of the neutral daemon into the optional plugin.
100
99
 
101
100
  | Removed | Replacement |
102
101
  | --- | --- |
103
- | `@anhlp/alp-daemon/web` (`createWebServer`, `createPaseoBridge`, `webAppDir`, `webFile`, `DEFAULT_WEB_PORT`) | `@anhlp/alp-paseo/web` (same named exports) |
102
+ | `@anhlp/alp-daemon/web` (`createWebServer`, `createPaseoBridge`, `webAppDir`, `webFile`, `DEFAULT_WEB_PORT`) | `@anhlp/alp-paseo/web` (the same named exports, except `webAppDir`, removed with Paseo's web app in t-55ce.3; `createWebServer` takes `gateway`, and its `app` option is deprecated) |
104
103
 
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`.
104
+ `@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/paseo.json` using `alp-paseo-integration --register` (`alp-web-integration` is an alias for one release).
106
105
 
107
106
  Migrate an in-repo consumer in two steps:
108
107
 
@@ -122,7 +121,7 @@ The six core workspaces depend only on `@anhlp/*` packages and their own declare
122
121
  | Package | Declares `@getpaseo/*` | Provides |
123
122
  | --- | --- | --- |
124
123
  | `@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 |
124
+ | `@anhlp/alp-paseo` | peers `@getpaseo/plugin`, `@getpaseo/client`, `@getpaseo/protocol`, `@getpaseo/relay` (and React) | the Paseo host adapter, the bridge and relay, and the panels |
126
125
 
127
126
  `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
127
 
@@ -130,15 +129,19 @@ The six core workspaces depend only on `@anhlp/*` packages and their own declare
130
129
 
131
130
  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
131
 
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.
132
+ The plugin's per-process data stays under the selected home, never inside the daemon: the integration is named `paseo`: its lock is `<home>/integrations/paseo.lock`, the ready address is `<home>/paseo.json`, the registered descriptor is `<home>/integrations/paseo.json`, and the log is `<home>/logs/integrations/paseo.log`. `alp web pair` reads the lock and `paseo.json` and ignores a stale file named by another pid. `alp web` itself runs the CLI's `alp-web` service, which owns `integrations/web.lock` and `<home>/web.json` ([docs/alp/web.md](alp/web.md) §3.1). Set `ALP_HOME` to keep everything in one directory.
133
+
134
+ The Paseo integration serializes every lock mutation with the exclusive directory `<home>/integrations/paseo.lock.reclaim`. The protocol is `createIntegrationLock(home, name)` from `@anhlp/alp-client/integration-lock`; an integration named `<name>` uses `integrations/<name>.lock` and `integrations/<name>.lock.reclaim` with the same rules (the Paseo integration uses `paseo`; `alp-web` uses `web`). It never reaps this guard by age or PID. A stalled initializer/reclaimer retains exclusion; a crash during even a short guarded operation can require manual recovery. A complete recognized lock is automatically recovered only when its positive PID is absent (`ESRCH`) in the same boot context. Live PIDs (including reused PIDs), permission errors, unknown liveness errors, boot uncertainty, malformed locks and unsupported metadata never authorize takeover. Ready updates and release check the acquired lifetime nonce and file identity.
135
+
136
+ This guarantee requires a private local filesystem on one host in the same PID namespace, with **all integration writers using this protocol**. Stop all old integration processes before upgrading; the directory guard alone does not make competing old/new writers safe. Network/shared homes, live manual lock deletion/replacement and storage power-loss durability are outside the guarantee. After a stranded guard or malformed lock, first stop and wait for **ALL integration processes using that ALP_HOME**. Only then remove that integration's `integrations/<name>.lock` and `integrations/<name>.lock.reclaim` (including its guard token), and restart. Retain the web configuration, daemon state and separate `state/paseo-create/writer.lock`/receipt journal; this recovery procedure does not authorize changing them.
134
137
 
135
138
  #### Restart and upgrade
136
139
 
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.
140
+ 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: run `alp daemon restart` to move to the new build, so a restart to migrate is always explicit.
138
141
 
139
142
  ## Independent versions and publishing
140
143
 
141
- > **For the beta `0.0.1-beta.3`, do not use the commands in this section.** The beta gives all
144
+ > **For the beta `0.0.1-beta.4`, do not use the commands in this section.** The beta gives all
142
145
  > eight published packages one version, packs them once and publishes those tarballs with
143
146
  > `--tag beta`, following the manual checklist in [beta-scope.md](alp/beta-scope.md) §7. The
144
147
  > `npm publish` below has no `--tag`, so it would set `latest`.
@@ -205,6 +208,7 @@ ACP stdio handshake, prompt and streamed response with a fake provider. Installe
205
208
  artifacts and the complete npm dependency tree are checked for Paseo leakage.
206
209
  The existing runtime/reconnect test also runs against the six installed packages.
207
210
 
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).
211
+ `alp web` ships in the CLI (the `alp-web` service) and needs no plugin. To pair
212
+ Paseo's app on another device after upgrading core, install `@anhlp/alp-paseo`
213
+ separately and run `alp-paseo-integration --register` in the intended `ALP_HOME`
214
+ (global PATH discovery also works). See the [plugin installation and compatibility notes](../integrations/paseo/README.md#optional-web-installation).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anhlp/alp",
3
- "version": "0.0.1-beta.3",
3
+ "version": "0.0.1-beta.4",
4
4
  "description": "ALP command line and alpd, the per-user daemon that runs filesystem-defined Codex and Claude Code agent teams",
5
5
  "type": "module",
6
6
  "files": [
@@ -41,7 +41,6 @@
41
41
  "test:e2e:human": "node test/e2e/human-e2e.mjs cli && node test/e2e/human-e2e.mjs paseo",
42
42
  "test:e2e:board": "node scripts/build-core.mjs && node test/e2e/board-e2e.mjs",
43
43
  "prepack": "npm run build",
44
- "build:web": "node scripts/build-paseo-web.mjs",
45
44
  "build:packages": "npm run build --workspaces --if-present",
46
45
  "test:packages": "npm run test --workspaces --if-present",
47
46
  "check:boundaries": "node scripts/check-boundaries.mjs",
@@ -91,9 +90,9 @@
91
90
  "zod": "4.4.3"
92
91
  },
93
92
  "dependencies": {
94
- "@anhlp/alp-client": "0.0.1-beta.3",
95
- "@anhlp/alp-core": "0.0.1-beta.3",
96
- "@anhlp/alp-protocol": "0.0.1-beta.3",
93
+ "@anhlp/alp-client": "0.0.1-beta.4",
94
+ "@anhlp/alp-core": "0.0.1-beta.4",
95
+ "@anhlp/alp-protocol": "0.0.1-beta.4",
97
96
  "@anthropic-ai/claude-agent-sdk": "^0.3.292",
98
97
  "smol-toml": "1.9.0"
99
98
  },
@@ -122,5 +121,8 @@
122
121
  "apps/gateway",
123
122
  "integrations/paseo",
124
123
  "apps/web"
125
- ]
124
+ ],
125
+ "optionalDependencies": {
126
+ "node-pty": "1.2.0-beta.15"
127
+ }
126
128
  }
@@ -579,6 +579,31 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
579
579
  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
580
580
  IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
581
581
 
582
+ ================================================================================
583
+ ws@8.22.0 (MIT)
584
+ ================================================================================
585
+
586
+ Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>
587
+ Copyright (c) 2013 Arnout Kazemier and contributors
588
+ Copyright (c) 2016 Luigi Pinca and contributors
589
+
590
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
591
+ this software and associated documentation files (the "Software"), to deal in
592
+ the Software without restriction, including without limitation the rights to
593
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
594
+ the Software, and to permit persons to whom the Software is furnished to do so,
595
+ subject to the following conditions:
596
+
597
+ The above copyright notice and this permission notice shall be included in all
598
+ copies or substantial portions of the Software.
599
+
600
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
601
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
602
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
603
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
604
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
605
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
606
+
582
607
  ================================================================================
583
608
  zod@4.4.3 (MIT)
584
609
  ================================================================================
@@ -6,7 +6,7 @@ import { startDaemon } from "@anhlp/alp-client/supervise";
6
6
  import { createLogger } from "@anhlp/alp-core/log";
7
7
  import { createAcpAgent } from "./agent.js";
8
8
  async function runAcp({ daemonEntry }) {
9
- const version = true ? "0.0.1-beta.3" : "0.0.0";
9
+ const version = true ? "0.0.1-beta.4" : "0.0.0";
10
10
  const logger = createLogger({ component: "acp" });
11
11
  const log = (message, fields) => logger.warn(message, fields);
12
12
  const app = createAcpAgent({
@@ -18552,10 +18552,40 @@ var AlpRpcError = class extends Error {
18552
18552
  };
18553
18553
  var ERROR = Object.freeze({ failed: 1e3, notFound: 1001, forbidden: 1003, conflict: 1004, unavailable: 1005, protocol: 1006 });
18554
18554
  var RPC_ERROR = Object.freeze({ parseError: -32700, invalidRequest: -32600, methodNotFound: -32601, invalidParams: -32602 });
18555
- var CAPABILITY = Object.freeze({ attachAfter: "attach.after", promptReceipts: "prompt.receipts", extensionMethods: "extension.methods", team: "team", task: "task", library: "library", libraryProjectWrite: "library.project.write", settingsLanguage: "settings.language", sessionListPage: "session.list.page", questionWatch: "question.watch", questionWatchTurns: "question.watch.turns", workspaceFiles: "workspace.files", workspaceFilesRead: "workspace.files.read", promptImages: "prompt.images" });
18555
+ var CAPABILITY = Object.freeze({ sessionInterruptTurn: "session.interrupt.turn", attachAfter: "attach.after", sessionHistory: "session.history", workspaceRegistry: "workspace.registry", workspaceWorktree: "workspace.worktree", workspaceGit: "workspace.git", promptReceipts: "prompt.receipts", extensionMethods: "extension.methods", team: "team", task: "task", library: "library", libraryProjectWrite: "library.project.write", settingsLanguage: "settings.language", sessionListPage: "session.list.page", questionWatch: "question.watch", questionWatchTurns: "question.watch.turns", sessionAttention: "session.attention", workspaceFiles: "workspace.files", workspaceFilesRead: "workspace.files.read", promptImages: "prompt.images", schedule: "schedule", attachments: "attachments", sessionFork: "session.fork", sessionRewind: "session.rewind", sessionReload: "session.reload", sessionResumeCommand: "session.resumeCommand", sessionConfigureLive: "session.configure.live", terminal: "terminal" });
18556
18556
  var PROMPT_IMAGES = Object.freeze({ mimeTypes: Object.freeze(["image/png", "image/jpeg", "image/gif", "image/webp"]), maxCount: 8, maxBytes: 5 * 1024 * 1024, maxTotalBytes: 11 * 1024 * 1024 });
18557
- var RPC_METHODS = Object.freeze(["assignment.recall", "board.list", "catalog.get", "daemon.hello", "daemon.pause", "daemon.pauses", "daemon.resume", "daemon.shutdown", "daemon.status", "daemon.usage", "extension.register", "extension.unregister", "library.delete", "library.duplicate", "library.get", "library.list", "library.models", "library.rename", "library.save", "library.skills.set", "question.answer", "question.list", "question.watch", "session.archive", "session.attach", "session.close", "session.configure", "session.create", "session.get", "session.interrupt", "session.list", "session.log", "session.message", "session.preview", "session.prompt", "session.release", "session.rename", "session.status", "settings.language.get", "settings.language.set", "task.create", "task.gate.resolve", "task.list", "task.update", "team.list", "workspace.files.list", "workspace.files.read", "workspace.files.search"]);
18557
+ var RPC_METHODS = Object.freeze(["assignment.recall", "attachment.abort", "attachment.begin", "attachment.chunk", "attachment.commit", "attachment.delete", "attachment.get", "board.list", "catalog.get", "daemon.hello", "daemon.pause", "daemon.pauses", "daemon.resume", "daemon.shutdown", "daemon.status", "daemon.usage", "extension.register", "extension.unregister", "library.delete", "library.duplicate", "library.get", "library.list", "library.models", "library.rename", "library.save", "library.skills.set", "project.list", "project.register", "project.remove", "question.answer", "question.list", "question.watch", "registry.owner", "registry.worktree", "schedule.cancel", "schedule.create", "schedule.get", "schedule.list", "session.archive", "session.attach", "session.attention.clear", "session.close", "session.configure", "session.configure.preview", "session.create", "session.fork", "session.get", "session.history", "session.interrupt", "session.list", "session.log", "session.message", "session.preview", "session.prompt", "session.release", "session.reload", "session.rename", "session.resumeCommand", "session.rewind", "session.status", "settings.language.get", "settings.language.set", "task.create", "task.gate.resolve", "task.list", "task.update", "team.list", "terminal.attach", "terminal.close", "terminal.create", "terminal.input", "terminal.list", "terminal.resize", "terminal.revoke", "workspace.files.list", "workspace.files.read", "workspace.files.search", "workspace.get", "workspace.git.diff", "workspace.git.status", "workspace.list", "workspace.update", "workspace.worktree.create", "workspace.worktree.options", "workspace.worktree.remove"]);
18558
18558
  var WORKSPACE_FILES = Object.freeze({ maxReadBytes: 1024 * 1024, maxListEntries: 1e3, maxPathLength: 4096 });
18559
+ var WORKSPACE_GIT = Object.freeze({ maxFileBytes: 1024 * 1024, maxTotalBytes: 2 * 1024 * 1024, maxUntracked: 200, maxStatusFiles: 1e3, maxRefLength: 255 });
18560
+ var ATTACHMENTS = Object.freeze({
18561
+ maxObjectBytes: 20 * 1024 * 1024,
18562
+ maxPerPrompt: 8,
18563
+ maxPromptBytes: 40 * 1024 * 1024,
18564
+ maxChunkBytes: 256 * 1024,
18565
+ maxActiveUploads: 2,
18566
+ maxPrincipalBytes: 200 * 1024 * 1024,
18567
+ maxDaemonBytes: 1024 * 1024 * 1024,
18568
+ uploadTimeoutMs: 60 * 60 * 1e3,
18569
+ unreferencedRetentionMs: 24 * 60 * 60 * 1e3,
18570
+ releasedGraceMs: 7 * 24 * 60 * 60 * 1e3,
18571
+ maxNameBytes: 255
18572
+ });
18573
+ var TERMINAL = Object.freeze({
18574
+ maxPerPrincipal: 4,
18575
+ maxPerDaemon: 16,
18576
+ maxInputBytes: 64 * 1024,
18577
+ maxOutputFrameBytes: 64 * 1024,
18578
+ replayBytes: 1024 * 1024,
18579
+ idleMs: 30 * 60 * 1e3,
18580
+ maxLifetimeMs: 8 * 60 * 60 * 1e3,
18581
+ reconnectMs: 60 * 1e3,
18582
+ minCols: 2,
18583
+ maxCols: 500,
18584
+ minRows: 1,
18585
+ maxRows: 200
18586
+ });
18587
+ var TERMINAL_LIMIT_KEYS = Object.freeze(["maxPerPrincipal", "maxPerDaemon", "maxInputBytes", "maxOutputFrameBytes", "replayBytes", "idleMs", "maxLifetimeMs", "reconnectMs"]);
18588
+ var ATTACHMENT_CHUNK_OVERHEAD = 64 * 1024;
18559
18589
 
18560
18590
  // packages/client/src/rpc/errors.js
18561
18591
  var BRAND = Symbol.for("@anhlp/alp-client/AlpClientError");
@@ -19108,6 +19138,8 @@ function lockAlive(lock) {
19108
19138
  }
19109
19139
  }
19110
19140
  var AlpClient = class extends AlpRpcClient {
19141
+ /** Host features captured by connect's handshake. @type {readonly string[]} */
19142
+ capabilities = [];
19111
19143
  /**
19112
19144
  * @param {import('node:net').Socket} socket a connected or connecting socket; the client owns it
19113
19145
  * @param {import('./rpc/client.js').AlpRpcClientOptions & import('./ipc.js').SocketTransportOptions} [options]
@@ -19133,7 +19165,8 @@ async function openSocket(socketPath) {
19133
19165
  async function connect(socketPath, client = { name: "alp", version: "0" }, options = {}) {
19134
19166
  const connection = new AlpClient(await openSocket(socketPath), options);
19135
19167
  try {
19136
- await hello(connection, client);
19168
+ const greeting = await hello(connection, client);
19169
+ connection.capabilities = Object.freeze(Array.isArray(greeting.capabilities) ? greeting.capabilities.filter((value) => typeof value === "string") : []);
19137
19170
  } catch (error51) {
19138
19171
  connection.close();
19139
19172
  throw error51;
@@ -19886,7 +19919,7 @@ ${item2.text}`;
19886
19919
 
19887
19920
  // packages/cli/src/acp/main.ts
19888
19921
  async function runAcp({ daemonEntry }) {
19889
- const version2 = true ? "0.0.1-beta.3" : "0.0.0";
19922
+ const version2 = true ? "0.0.1-beta.4" : "0.0.0";
19890
19923
  const logger = createLogger({ component: "acp" });
19891
19924
  const log = (message, fields) => logger.warn(message, fields);
19892
19925
  const app = createAcpAgent({