zooid 0.6.1 → 0.7.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 +1 -1
- package/README.md +36 -444
- package/dist/bin.js +1891 -0
- package/dist/bin.js.map +1 -0
- package/dist/chunk-SUPTPSN3.js +31434 -0
- package/dist/chunk-SUPTPSN3.js.map +1 -0
- package/dist/index.d.ts +64 -0
- package/dist/index.js +4 -3790
- package/dist/index.js.map +1 -0
- package/dist/web/assets/geist-cyrillic-wght-normal-CHSlOQsW.woff2 +0 -0
- package/dist/web/assets/geist-latin-ext-wght-normal-DMtmJ5ZE.woff2 +0 -0
- package/dist/web/assets/geist-latin-wght-normal-Dm3htQBi.woff2 +0 -0
- package/dist/web/assets/index-C2MAIew3.css +1 -0
- package/dist/web/assets/index-CqfWXqvO.js +118066 -0
- package/dist/web/assets/index-Cz5fEZBc.js +295 -0
- package/dist/web/assets/reaction-picker-emoji-cME0vOsX.js +716 -0
- package/dist/web/favicon.svg +1 -0
- package/dist/web/index.html +14 -0
- package/package.json +43 -22
- package/src/bin.ts +115 -0
- package/src/bootstrap/admin.test.ts +69 -0
- package/src/bootstrap/admin.ts +37 -0
- package/src/bootstrap/configs.test.ts +24 -0
- package/src/bootstrap/configs.ts +64 -0
- package/src/bootstrap/data-layout.test.ts +25 -0
- package/src/bootstrap/data-layout.ts +20 -0
- package/src/bootstrap/derive.test.ts +74 -0
- package/src/bootstrap/derive.ts +40 -0
- package/src/bootstrap/paths.test.ts +22 -0
- package/src/bootstrap/paths.ts +27 -0
- package/src/bootstrap/tokens.test.ts +44 -0
- package/src/bootstrap/tokens.ts +43 -0
- package/src/build-registry.context.test.ts +61 -0
- package/src/build-registry.test.ts +59 -0
- package/src/build-registry.ts +343 -0
- package/src/build-registry.zod043.test.ts +64 -0
- package/src/build-registry.zod044.test.ts +261 -0
- package/src/commands/dev-cascade.test.ts +38 -0
- package/src/commands/dev-cascade.ts +35 -0
- package/src/commands/dev-data-layout.test.ts +55 -0
- package/src/commands/dev.ts +316 -0
- package/src/commands/init/generators.test.ts +97 -0
- package/src/commands/init/generators.ts +124 -0
- package/src/commands/init/prompts.ts +123 -0
- package/src/commands/init/registry.test.ts +33 -0
- package/src/commands/init/registry.ts +75 -0
- package/src/commands/init/sniff.test.ts +41 -0
- package/src/commands/init/sniff.ts +30 -0
- package/src/commands/init.test.ts +131 -0
- package/src/commands/init.ts +158 -0
- package/src/commands/logs.test.ts +105 -0
- package/src/commands/logs.ts +108 -0
- package/src/commands/start.ts +28 -0
- package/src/commands/status.test.ts +73 -0
- package/src/commands/status.ts +105 -0
- package/src/daemon/start-daemon.test.ts +67 -0
- package/src/daemon/start-daemon.ts +270 -0
- package/src/index.ts +2 -0
- package/src/observability/capture-agent.ts +58 -0
- package/src/observability/capture-tuwunel.test.ts +57 -0
- package/src/observability/capture-tuwunel.ts +24 -0
- package/src/observability/file-sink.test.ts +68 -0
- package/src/observability/file-sink.ts +78 -0
- package/src/observability/observability.integration.test.ts +162 -0
- package/src/observability/paths.test.ts +104 -0
- package/src/observability/paths.ts +94 -0
- package/src/prepull-images.test.ts +149 -0
- package/src/prepull-images.ts +100 -0
- package/src/services/tuwunel.test.ts +64 -0
- package/src/services/tuwunel.ts +91 -0
- package/src/web/resolve.test.ts +50 -0
- package/src/web/resolve.ts +31 -0
- package/src/web/static.test.ts +51 -0
- package/src/web/static.ts +61 -0
- package/src/web/watch.ts +103 -0
- package/dist/chunk-67ZRMVHO.js +0 -174
- package/dist/chunk-AR456MHY.js +0 -29
- package/dist/chunk-VBGU2NST.js +0 -139
- package/dist/client-4VMFEFDX.js +0 -22
- package/dist/config-2KK5GX42.js +0 -27
- package/dist/template-T5IB4YWC.js +0 -92
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { AcpRuntime, ApprovalCorrelator, TapEvent, ZooidConfig, AcpAgentRegistry } from '@zooid/core';
|
|
2
|
+
import { SpawnRegistry } from '@zooid/context-mcp';
|
|
3
|
+
|
|
4
|
+
interface BuildAcpRegistryOptions {
|
|
5
|
+
/** Override the runtime selection (tests). */
|
|
6
|
+
runtime?: AcpRuntime;
|
|
7
|
+
/** When set, the registry's approval handler routes through this correlator. */
|
|
8
|
+
approvals?: ApprovalCorrelator;
|
|
9
|
+
/** Observability tap forwarded to each AcpClient. */
|
|
10
|
+
onTap?: (agentName: string, event: TapEvent) => void;
|
|
11
|
+
/**
|
|
12
|
+
* Per-agent state root (`<dataRoot>/agents/`). When set, each AcpClient
|
|
13
|
+
* persists its `(threadId → sessionId)` map under
|
|
14
|
+
* `<agentsDir>/<agentName>/sessions.json` so threads survive daemon restarts.
|
|
15
|
+
*/
|
|
16
|
+
agentsDir?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Per-spawn binding store for the zooid-context MCP server. When set
|
|
19
|
+
* together with `daemonSockPath`, agents bound to a transport that owns
|
|
20
|
+
* conversation context get a `contextSpawn` factory threaded into their
|
|
21
|
+
* AcpClient so `session/new mcpServers` includes the zooid-context entry.
|
|
22
|
+
*/
|
|
23
|
+
contextSpawnRegistry?: SpawnRegistry;
|
|
24
|
+
/** Path to the daemon's context Unix socket. Passed to the MCP server bin. */
|
|
25
|
+
daemonSockPath?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Directory containing zooid.yaml. Required when any agent uses the
|
|
28
|
+
* workspace auto-mount (the default under `runtime: docker | podman`):
|
|
29
|
+
* relative `agent.workdir` paths are resolved against this dir.
|
|
30
|
+
*/
|
|
31
|
+
configDir?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Daemon data root. Each agent's preset mounts target
|
|
34
|
+
* `<dataDir>/agents/<agentName>` on the host.
|
|
35
|
+
*/
|
|
36
|
+
dataDir?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Daemon user's `$HOME`. Sourced by the v1 preset `home` / `data` /
|
|
39
|
+
* `config` mounts. Tests inject a stub; production threads
|
|
40
|
+
* `process.env.HOME` from `start-daemon`.
|
|
41
|
+
*/
|
|
42
|
+
daemonHome?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Sink for the per-agent "resolved image + mounts" startup log lines.
|
|
45
|
+
* Defaults to `console.log`. Tests pass a capture array.
|
|
46
|
+
*/
|
|
47
|
+
log?: (line: string) => void;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Build an `AcpAgentRegistry` from a parsed workforce config.
|
|
51
|
+
*
|
|
52
|
+
* - `runtime: local` → `LocalAcpRuntime`
|
|
53
|
+
* - `runtime: docker` → `DockerAcpRuntime` (engine: docker)
|
|
54
|
+
* - `runtime: podman` → `DockerAcpRuntime` (engine: podman)
|
|
55
|
+
*
|
|
56
|
+
* Compose layers (docker/podman only): workspace auto-mount → preset-declared
|
|
57
|
+
* canonical-id mounts (filtered by `container.disable_mounts`) → user mounts.
|
|
58
|
+
* Image resolution: agent.container.image > workforce container.image >
|
|
59
|
+
* preset.image. Under `runtime: docker | podman`, throws at startup if any
|
|
60
|
+
* agent has no resolvable image.
|
|
61
|
+
*/
|
|
62
|
+
declare function buildAcpRegistry(cfg: ZooidConfig, opts?: BuildAcpRegistryOptions): AcpAgentRegistry;
|
|
63
|
+
|
|
64
|
+
export { type BuildAcpRegistryOptions, buildAcpRegistry };
|