@cleocode/core 2026.6.12 → 2026.6.13
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/dist/conduit/local-transport.d.ts +12 -0
- package/dist/conduit/local-transport.d.ts.map +1 -1
- package/dist/conduit/local-transport.js +53 -23
- package/dist/conduit/local-transport.js.map +1 -1
- package/dist/crypto/credentials.d.ts +37 -0
- package/dist/crypto/credentials.d.ts.map +1 -1
- package/dist/crypto/credentials.js +110 -0
- package/dist/crypto/credentials.js.map +1 -1
- package/dist/dispatch/contracts/derive-output-contract.d.ts +86 -0
- package/dist/dispatch/contracts/derive-output-contract.d.ts.map +1 -0
- package/dist/dispatch/contracts/derive-output-contract.js +347 -0
- package/dist/dispatch/contracts/derive-output-contract.js.map +1 -0
- package/dist/dispatch/contracts/ensures-schema.d.ts +77 -0
- package/dist/dispatch/contracts/ensures-schema.d.ts.map +1 -0
- package/dist/dispatch/contracts/ensures-schema.js +91 -0
- package/dist/dispatch/contracts/ensures-schema.js.map +1 -0
- package/dist/dispatch/contracts/output-contracts.d.ts +27 -5
- package/dist/dispatch/contracts/output-contracts.d.ts.map +1 -1
- package/dist/dispatch/contracts/output-contracts.js +29 -6
- package/dist/dispatch/contracts/output-contracts.js.map +1 -1
- package/dist/docs/export-document.js +2294 -1250
- package/dist/docs/export-document.js.map +3 -3
- package/dist/go/driver.d.ts +132 -7
- package/dist/go/driver.d.ts.map +1 -1
- package/dist/go/driver.js +135 -10
- package/dist/go/driver.js.map +1 -1
- package/dist/go/index.d.ts +1 -1
- package/dist/go/index.d.ts.map +1 -1
- package/dist/go/index.js +1 -1
- package/dist/go/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +13 -10
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +11 -11
- package/dist/internal.js.map +1 -1
- package/dist/lifecycle/engine-ops.d.ts.map +1 -1
- package/dist/lifecycle/engine-ops.js +7 -4
- package/dist/lifecycle/engine-ops.js.map +1 -1
- package/dist/lifecycle/ivtr-loop.d.ts +108 -183
- package/dist/lifecycle/ivtr-loop.d.ts.map +1 -1
- package/dist/lifecycle/ivtr-loop.js +207 -522
- package/dist/lifecycle/ivtr-loop.js.map +1 -1
- package/dist/llm/auxiliary-fallback.js +1 -1
- package/dist/llm/auxiliary-fallback.js.map +1 -1
- package/dist/llm/cli-ops.d.ts +14 -1
- package/dist/llm/cli-ops.d.ts.map +1 -1
- package/dist/llm/cli-ops.js +41 -12
- package/dist/llm/cli-ops.js.map +1 -1
- package/dist/llm/concrete-session.d.ts.map +1 -1
- package/dist/llm/concrete-session.js +4 -0
- package/dist/llm/concrete-session.js.map +1 -1
- package/dist/llm/credentials.d.ts +35 -0
- package/dist/llm/credentials.d.ts.map +1 -1
- package/dist/llm/credentials.js +49 -0
- package/dist/llm/credentials.js.map +1 -1
- package/dist/llm/index.d.ts +4 -0
- package/dist/llm/index.d.ts.map +1 -1
- package/dist/llm/index.js +4 -0
- package/dist/llm/index.js.map +1 -1
- package/dist/llm/pi/gondolin-loader.d.ts +241 -0
- package/dist/llm/pi/gondolin-loader.d.ts.map +1 -0
- package/dist/llm/pi/gondolin-loader.js +195 -0
- package/dist/llm/pi/gondolin-loader.js.map +1 -0
- package/dist/llm/pi/index.d.ts +28 -0
- package/dist/llm/pi/index.d.ts.map +1 -0
- package/dist/llm/pi/index.js +27 -0
- package/dist/llm/pi/index.js.map +1 -0
- package/dist/llm/pi/pi-agent-adapter.d.ts +135 -0
- package/dist/llm/pi/pi-agent-adapter.d.ts.map +1 -0
- package/dist/llm/pi/pi-agent-adapter.js +329 -0
- package/dist/llm/pi/pi-agent-adapter.js.map +1 -0
- package/dist/llm/pi/pi-errors.d.ts +161 -0
- package/dist/llm/pi/pi-errors.d.ts.map +1 -0
- package/dist/llm/pi/pi-errors.js +296 -0
- package/dist/llm/pi/pi-errors.js.map +1 -0
- package/dist/llm/pi/pi-execution-env.d.ts +286 -0
- package/dist/llm/pi/pi-execution-env.d.ts.map +1 -0
- package/dist/llm/pi/pi-execution-env.js +406 -0
- package/dist/llm/pi/pi-execution-env.js.map +1 -0
- package/dist/llm/pi/pi-gondolin-env.d.ts +227 -0
- package/dist/llm/pi/pi-gondolin-env.d.ts.map +1 -0
- package/dist/llm/pi/pi-gondolin-env.js +541 -0
- package/dist/llm/pi/pi-gondolin-env.js.map +1 -0
- package/dist/llm/pi/pi-session-storage.d.ts +154 -0
- package/dist/llm/pi/pi-session-storage.d.ts.map +1 -0
- package/dist/llm/pi/pi-session-storage.js +314 -0
- package/dist/llm/pi/pi-session-storage.js.map +1 -0
- package/dist/llm/pi/pi-stream-fn.d.ts +124 -0
- package/dist/llm/pi/pi-stream-fn.d.ts.map +1 -0
- package/dist/llm/pi/pi-stream-fn.js +504 -0
- package/dist/llm/pi/pi-stream-fn.js.map +1 -0
- package/dist/llm/pi/pi-tool-bridge.d.ts +99 -0
- package/dist/llm/pi/pi-tool-bridge.d.ts.map +1 -0
- package/dist/llm/pi/pi-tool-bridge.js +117 -0
- package/dist/llm/pi/pi-tool-bridge.js.map +1 -0
- package/dist/llm/pi/pi-types.d.ts +56 -0
- package/dist/llm/pi/pi-types.d.ts.map +1 -0
- package/dist/llm/pi/pi-types.js +16 -0
- package/dist/llm/pi/pi-types.js.map +1 -0
- package/dist/llm/pi/resolve-execution-env.d.ts +194 -0
- package/dist/llm/pi/resolve-execution-env.d.ts.map +1 -0
- package/dist/llm/pi/resolve-execution-env.js +132 -0
- package/dist/llm/pi/resolve-execution-env.js.map +1 -0
- package/dist/llm/plugin-facade.js +2253 -1151
- package/dist/llm/plugin-facade.js.map +3 -3
- package/dist/llm/role-executor.d.ts.map +1 -1
- package/dist/llm/role-executor.js +8 -5
- package/dist/llm/role-executor.js.map +1 -1
- package/dist/llm/role-resolver.d.ts +46 -14
- package/dist/llm/role-resolver.d.ts.map +1 -1
- package/dist/llm/role-resolver.js +178 -20
- package/dist/llm/role-resolver.js.map +1 -1
- package/dist/llm/sealed-credential.d.ts +125 -0
- package/dist/llm/sealed-credential.d.ts.map +1 -0
- package/dist/llm/sealed-credential.js +133 -0
- package/dist/llm/sealed-credential.js.map +1 -0
- package/dist/llm/session-factory.d.ts.map +1 -1
- package/dist/llm/session-factory.js +6 -2
- package/dist/llm/session-factory.js.map +1 -1
- package/dist/llm/system-key.d.ts +67 -0
- package/dist/llm/system-key.d.ts.map +1 -0
- package/dist/llm/system-key.js +87 -0
- package/dist/llm/system-key.js.map +1 -0
- package/dist/llm/system-of-use-registry.d.ts +119 -0
- package/dist/llm/system-of-use-registry.d.ts.map +1 -0
- package/dist/llm/system-of-use-registry.js +200 -0
- package/dist/llm/system-of-use-registry.js.map +1 -0
- package/dist/llm/system-resolver.d.ts +32 -10
- package/dist/llm/system-resolver.d.ts.map +1 -1
- package/dist/llm/system-resolver.js +70 -18
- package/dist/llm/system-resolver.js.map +1 -1
- package/dist/memory/brain-writer-thread.d.ts.map +1 -1
- package/dist/memory/brain-writer-thread.js +116 -11
- package/dist/memory/brain-writer-thread.js.map +1 -1
- package/dist/memory/claude-mem-migration.d.ts.map +1 -1
- package/dist/memory/claude-mem-migration.js +21 -0
- package/dist/memory/claude-mem-migration.js.map +1 -1
- package/dist/memory/graph-memory-bridge.d.ts.map +1 -1
- package/dist/memory/graph-memory-bridge.js +32 -25
- package/dist/memory/graph-memory-bridge.js.map +1 -1
- package/dist/memory/llm-backend-resolver.js +23 -5
- package/dist/memory/llm-backend-resolver.js.map +1 -1
- package/dist/nexus/migrations/M-split-graph.d.ts.map +1 -1
- package/dist/nexus/migrations/M-split-graph.js +60 -53
- package/dist/nexus/migrations/M-split-graph.js.map +1 -1
- package/dist/orchestrate/pivot.d.ts.map +1 -1
- package/dist/orchestrate/pivot.js +20 -2
- package/dist/orchestrate/pivot.js.map +1 -1
- package/dist/release/engine-ops.js +2 -2
- package/dist/release/engine-ops.js.map +1 -1
- package/dist/routing/capability-matrix.d.ts.map +1 -1
- package/dist/routing/capability-matrix.js +0 -57
- package/dist/routing/capability-matrix.js.map +1 -1
- package/dist/selfimprove/budget.d.ts +206 -0
- package/dist/selfimprove/budget.d.ts.map +1 -0
- package/dist/selfimprove/budget.js +203 -0
- package/dist/selfimprove/budget.js.map +1 -0
- package/dist/selfimprove/dhq-adapter.d.ts +105 -0
- package/dist/selfimprove/dhq-adapter.d.ts.map +1 -0
- package/dist/selfimprove/dhq-adapter.js +95 -0
- package/dist/selfimprove/dhq-adapter.js.map +1 -0
- package/dist/selfimprove/draft-pr.d.ts +129 -0
- package/dist/selfimprove/draft-pr.d.ts.map +1 -0
- package/dist/selfimprove/draft-pr.js +158 -0
- package/dist/selfimprove/draft-pr.js.map +1 -0
- package/dist/selfimprove/envelope-diff.d.ts +162 -0
- package/dist/selfimprove/envelope-diff.d.ts.map +1 -0
- package/dist/selfimprove/envelope-diff.js +321 -0
- package/dist/selfimprove/envelope-diff.js.map +1 -0
- package/dist/selfimprove/replay.d.ts +121 -0
- package/dist/selfimprove/replay.d.ts.map +1 -0
- package/dist/selfimprove/replay.js +109 -0
- package/dist/selfimprove/replay.js.map +1 -0
- package/dist/selfimprove/run-loop.d.ts +148 -0
- package/dist/selfimprove/run-loop.d.ts.map +1 -0
- package/dist/selfimprove/run-loop.js +240 -0
- package/dist/selfimprove/run-loop.js.map +1 -0
- package/dist/selfimprove/scenario.d.ts +145 -0
- package/dist/selfimprove/scenario.d.ts.map +1 -0
- package/dist/selfimprove/scenario.js +243 -0
- package/dist/selfimprove/scenario.js.map +1 -0
- package/dist/sentient/daemon-entry.js +5 -0
- package/dist/sentient/daemon-entry.js.map +1 -1
- package/dist/sentient/daemon.d.ts.map +1 -1
- package/dist/sentient/daemon.js +19 -0
- package/dist/sentient/daemon.js.map +1 -1
- package/dist/sentient/hygiene-scan.d.ts.map +1 -1
- package/dist/sentient/hygiene-scan.js +14 -6
- package/dist/sentient/hygiene-scan.js.map +1 -1
- package/dist/sessions/briefing.d.ts.map +1 -1
- package/dist/sessions/briefing.js +13 -9
- package/dist/sessions/briefing.js.map +1 -1
- package/dist/sessions/connection-session-handle.d.ts +161 -0
- package/dist/sessions/connection-session-handle.d.ts.map +1 -0
- package/dist/sessions/connection-session-handle.js +168 -0
- package/dist/sessions/connection-session-handle.js.map +1 -0
- package/dist/sessions/handoff.d.ts.map +1 -1
- package/dist/sessions/handoff.js +9 -0
- package/dist/sessions/handoff.js.map +1 -1
- package/dist/sessions/index.d.ts +4 -1
- package/dist/sessions/index.d.ts.map +1 -1
- package/dist/sessions/index.js +31 -1
- package/dist/sessions/index.js.map +1 -1
- package/dist/sessions/session-id.d.ts +34 -0
- package/dist/sessions/session-id.d.ts.map +1 -1
- package/dist/sessions/session-id.js +37 -0
- package/dist/sessions/session-id.js.map +1 -1
- package/dist/sessions/session-manifest-mirror.d.ts +115 -0
- package/dist/sessions/session-manifest-mirror.d.ts.map +1 -0
- package/dist/sessions/session-manifest-mirror.js +250 -0
- package/dist/sessions/session-manifest-mirror.js.map +1 -0
- package/dist/sessions/session-switch.d.ts.map +1 -1
- package/dist/sessions/session-switch.js +5 -2
- package/dist/sessions/session-switch.js.map +1 -1
- package/dist/store/converters.d.ts.map +1 -1
- package/dist/store/converters.js +2 -0
- package/dist/store/converters.js.map +1 -1
- package/dist/store/db-helpers.d.ts.map +1 -1
- package/dist/store/db-helpers.js +2 -0
- package/dist/store/db-helpers.js.map +1 -1
- package/dist/store/dual-scope-db.d.ts.map +1 -1
- package/dist/store/dual-scope-db.js +87 -47
- package/dist/store/dual-scope-db.js.map +1 -1
- package/dist/store/pi-session-store.d.ts +151 -0
- package/dist/store/pi-session-store.d.ts.map +1 -0
- package/dist/store/pi-session-store.js +166 -0
- package/dist/store/pi-session-store.js.map +1 -0
- package/dist/store/safety-data-accessor.d.ts +1 -0
- package/dist/store/safety-data-accessor.d.ts.map +1 -1
- package/dist/store/safety-data-accessor.js +5 -0
- package/dist/store/safety-data-accessor.js.map +1 -1
- package/dist/store/schema/cleo-global/accounts.d.ts +357 -0
- package/dist/store/schema/cleo-global/accounts.d.ts.map +1 -0
- package/dist/store/schema/cleo-global/accounts.js +136 -0
- package/dist/store/schema/cleo-global/accounts.js.map +1 -0
- package/dist/store/schema/cleo-global/index.d.ts +2 -0
- package/dist/store/schema/cleo-global/index.d.ts.map +1 -1
- package/dist/store/schema/cleo-global/index.js +2 -0
- package/dist/store/schema/cleo-global/index.js.map +1 -1
- package/dist/store/schema/cleo-global/session-manifest.d.ts +217 -0
- package/dist/store/schema/cleo-global/session-manifest.d.ts.map +1 -0
- package/dist/store/schema/cleo-global/session-manifest.js +99 -0
- package/dist/store/schema/cleo-global/session-manifest.js.map +1 -0
- package/dist/store/schema/cleo-project/tasks-core.d.ts +16 -0
- package/dist/store/schema/cleo-project/tasks-core.d.ts.map +1 -1
- package/dist/store/schema/cleo-project/tasks-core.js +14 -0
- package/dist/store/schema/cleo-project/tasks-core.js.map +1 -1
- package/dist/store/schema/tasks.d.ts +16 -0
- package/dist/store/schema/tasks.d.ts.map +1 -1
- package/dist/store/schema/tasks.js +10 -0
- package/dist/store/schema/tasks.js.map +1 -1
- package/dist/store/selfimprove-dhq-schema.d.ts +284 -0
- package/dist/store/selfimprove-dhq-schema.d.ts.map +1 -0
- package/dist/store/selfimprove-dhq-schema.js +128 -0
- package/dist/store/selfimprove-dhq-schema.js.map +1 -0
- package/dist/store/selfimprove-dhq-store.d.ts +175 -0
- package/dist/store/selfimprove-dhq-store.d.ts.map +1 -0
- package/dist/store/selfimprove-dhq-store.js +182 -0
- package/dist/store/selfimprove-dhq-store.js.map +1 -0
- package/dist/store/session-store.d.ts +52 -13
- package/dist/store/session-store.d.ts.map +1 -1
- package/dist/store/session-store.js +71 -13
- package/dist/store/session-store.js.map +1 -1
- package/dist/store/sqlite-data-accessor.d.ts.map +1 -1
- package/dist/store/sqlite-data-accessor.js +7 -0
- package/dist/store/sqlite-data-accessor.js.map +1 -1
- package/dist/store/umbrella-data-accessor.d.ts +1 -0
- package/dist/store/umbrella-data-accessor.d.ts.map +1 -1
- package/dist/store/umbrella-data-accessor.js +5 -0
- package/dist/store/umbrella-data-accessor.js.map +1 -1
- package/dist/store/validation-schemas.d.ts +32 -0
- package/dist/store/validation-schemas.d.ts.map +1 -1
- package/dist/store/writer-lease-schema.d.ts +392 -0
- package/dist/store/writer-lease-schema.d.ts.map +1 -0
- package/dist/store/writer-lease-schema.js +142 -0
- package/dist/store/writer-lease-schema.js.map +1 -0
- package/dist/store/writer-lease.d.ts +368 -0
- package/dist/store/writer-lease.d.ts.map +1 -0
- package/dist/store/writer-lease.js +1002 -0
- package/dist/store/writer-lease.js.map +1 -0
- package/dist/tasks/backfill-child-projections.d.ts.map +1 -1
- package/dist/tasks/backfill-child-projections.js +14 -9
- package/dist/tasks/backfill-child-projections.js.map +1 -1
- package/dist/tasks/complete.d.ts.map +1 -1
- package/dist/tasks/complete.js +7 -10
- package/dist/tasks/complete.js.map +1 -1
- package/dist/tasks/duplicate-detector.d.ts.map +1 -1
- package/dist/tasks/duplicate-detector.js +14 -7
- package/dist/tasks/duplicate-detector.js.map +1 -1
- package/dist/telemetry/index.d.ts.map +1 -1
- package/dist/telemetry/index.js +10 -4
- package/dist/telemetry/index.js.map +1 -1
- package/dist/tools/agent-registry.d.ts +250 -0
- package/dist/tools/agent-registry.d.ts.map +1 -0
- package/dist/tools/agent-registry.js +292 -0
- package/dist/tools/agent-registry.js.map +1 -0
- package/dist/tools/agent-tool-families.d.ts +107 -0
- package/dist/tools/agent-tool-families.d.ts.map +1 -0
- package/dist/tools/agent-tool-families.js +527 -0
- package/dist/tools/agent-tool-families.js.map +1 -0
- package/dist/tools/browser-driver.d.ts +183 -0
- package/dist/tools/browser-driver.d.ts.map +1 -0
- package/dist/tools/browser-driver.js +242 -0
- package/dist/tools/browser-driver.js.map +1 -0
- package/dist/tools/builtin-agent-tools.d.ts +36 -0
- package/dist/tools/builtin-agent-tools.d.ts.map +1 -0
- package/dist/tools/builtin-agent-tools.js +150 -0
- package/dist/tools/builtin-agent-tools.js.map +1 -0
- package/dist/tools/dispatch.d.ts +370 -0
- package/dist/tools/dispatch.d.ts.map +1 -0
- package/dist/tools/dispatch.js +505 -0
- package/dist/tools/dispatch.js.map +1 -0
- package/dist/tools/env-scrub.d.ts +93 -0
- package/dist/tools/env-scrub.d.ts.map +1 -0
- package/dist/tools/env-scrub.js +176 -0
- package/dist/tools/env-scrub.js.map +1 -0
- package/dist/tools/fs.d.ts +30 -0
- package/dist/tools/fs.d.ts.map +1 -1
- package/dist/tools/fs.js +55 -2
- package/dist/tools/fs.js.map +1 -1
- package/dist/tools/guard.d.ts +15 -0
- package/dist/tools/guard.d.ts.map +1 -1
- package/dist/tools/guard.js +49 -12
- package/dist/tools/guard.js.map +1 -1
- package/dist/tools/index.d.ts +10 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +37 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/pty.d.ts +45 -0
- package/dist/tools/pty.d.ts.map +1 -0
- package/dist/tools/pty.js +166 -0
- package/dist/tools/pty.js.map +1 -0
- package/dist/tools/schema-gen.d.ts +57 -0
- package/dist/tools/schema-gen.d.ts.map +1 -0
- package/dist/tools/schema-gen.js +52 -0
- package/dist/tools/schema-gen.js.map +1 -0
- package/dist/tools/shell.d.ts +12 -0
- package/dist/tools/shell.d.ts.map +1 -1
- package/dist/tools/shell.js +14 -1
- package/dist/tools/shell.js.map +1 -1
- package/dist/tools/web-agent-tools.d.ts +72 -0
- package/dist/tools/web-agent-tools.d.ts.map +1 -0
- package/dist/tools/web-agent-tools.js +393 -0
- package/dist/tools/web-agent-tools.js.map +1 -0
- package/dist/tools/web-search-backends.d.ts +156 -0
- package/dist/tools/web-search-backends.d.ts.map +1 -0
- package/dist/tools/web-search-backends.js +290 -0
- package/dist/tools/web-search-backends.js.map +1 -0
- package/dist/validation/ops.d.ts +1 -15
- package/dist/validation/ops.d.ts.map +1 -1
- package/dist/validation/ops.js +0 -20
- package/dist/validation/ops.js.map +1 -1
- package/migrations/drizzle-cleo-global/20260607000000_t11891-writer-leases/migration.sql +55 -0
- package/migrations/drizzle-cleo-global/20260607010000_t11639-session-manifest/migration.sql +43 -0
- package/migrations/drizzle-cleo-global/20260608000000_t11899-pi-session-tree/migration.sql +52 -0
- package/migrations/drizzle-cleo-global/20260608010000_t11709-accounts-credential-pool/migration.sql +72 -0
- package/migrations/drizzle-cleo-global/20260608020000_t11889-selfimprove-dhq/migration.sql +64 -0
- package/migrations/drizzle-cleo-project/20260607000000_t11891-writer-leases/migration.sql +55 -0
- package/migrations/drizzle-cleo-project/20260607010000_t11639-session-parent/migration.sql +22 -0
- package/migrations/drizzle-cleo-project/20260608000000_t11899-pi-session-tree/migration.sql +52 -0
- package/migrations/drizzle-cleo-project/20260608020000_t11889-selfimprove-dhq/migration.sql +64 -0
- package/package.json +15 -13
- package/dist/lifecycle/chain-composition.d.ts +0 -30
- package/dist/lifecycle/chain-composition.d.ts.map +0 -1
- package/dist/lifecycle/chain-composition.js +0 -152
- package/dist/lifecycle/chain-composition.js.map +0 -1
- package/dist/lifecycle/chain-store.d.ts +0 -70
- package/dist/lifecycle/chain-store.d.ts.map +0 -1
- package/dist/lifecycle/chain-store.js +0 -246
- package/dist/lifecycle/chain-store.js.map +0 -1
- package/dist/lifecycle/default-chain.d.ts +0 -39
- package/dist/lifecycle/default-chain.d.ts.map +0 -1
- package/dist/lifecycle/default-chain.js +0 -176
- package/dist/lifecycle/default-chain.js.map +0 -1
- package/dist/lifecycle/tessera-engine.d.ts +0 -48
- package/dist/lifecycle/tessera-engine.d.ts.map +0 -1
- package/dist/lifecycle/tessera-engine.js +0 -249
- package/dist/lifecycle/tessera-engine.js.map +0 -1
- package/dist/validation/chain-validation.d.ts +0 -43
- package/dist/validation/chain-validation.d.ts.map +0 -1
- package/dist/validation/chain-validation.js +0 -146
- package/dist/validation/chain-validation.js.map +0 -1
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `PiAgentAdapter` — the in-process Pi agent-loop embed (T11761 · S2 · T11898).
|
|
3
|
+
*
|
|
4
|
+
* THE KEYSTONE of the Pi-harness work: the Pi agent loop runs **in-process**
|
|
5
|
+
* inside the Cleo daemon as the body of the `SkillRunner` strategy slot, with
|
|
6
|
+
* ZERO authority. It:
|
|
7
|
+
*
|
|
8
|
+
* - resolves its LLM ONLY through the E9 chokepoint (`resolveLLMForSystem` →
|
|
9
|
+
* `ModelRunner`) via the Cleo-owned {@link createPiStreamFn} — `pi-ai`'s
|
|
10
|
+
* registry env-fallback is never reached;
|
|
11
|
+
* - touches the filesystem/shell ONLY through the deny-first
|
|
12
|
+
* {@link GuardedExecutionEnv} (S1) bound to the injected guarded tool surface;
|
|
13
|
+
* - reads its session identity from the daemon-stamped env (NEVER mints one);
|
|
14
|
+
* - runs under {@link wrapPiCall} containment so a `process.exit()` from any Pi
|
|
15
|
+
* code path becomes a thrown typed error, not a daemon-fatal exit;
|
|
16
|
+
* - is gated behind a **default-OFF** feature flag ({@link isPiRunnerEnabled}).
|
|
17
|
+
*
|
|
18
|
+
* The `SkillRunner` slot (`SkillExecutorAdapterOptions.runner`, line 124 of
|
|
19
|
+
* `skill-executor-adapter.ts`) CALLS this adapter via {@link createPiSkillRunner};
|
|
20
|
+
* the adapter is NOT hosted inside `defaultSkillRunner` (which stays untouched).
|
|
21
|
+
*
|
|
22
|
+
* Session durability is S3's concern: this subtask uses
|
|
23
|
+
* {@link InMemorySessionStorage} (in-RAM, no DB writer, no lease) so the
|
|
24
|
+
* read/stream path is buildable with ZERO write authority.
|
|
25
|
+
*
|
|
26
|
+
* @epic T10403
|
|
27
|
+
* @task T11761
|
|
28
|
+
* @task T11898
|
|
29
|
+
*/
|
|
30
|
+
import { InMemorySessionRepo, runAgentLoop } from '@earendil-works/pi-agent-core';
|
|
31
|
+
import { getLogger } from '../../logger.js';
|
|
32
|
+
import { resolveAgentIdFromEnv, resolveParentSessionIdFromEnv, resolveSessionIdFromEnv, } from '../../sessions/session-id.js';
|
|
33
|
+
import { ToolCallBudget, ToolDispatchEngine } from '../../tools/dispatch.js';
|
|
34
|
+
import { PiContainmentError, wrapPiCall } from './pi-errors.js';
|
|
35
|
+
import { createPiStreamFn } from './pi-stream-fn.js';
|
|
36
|
+
import { buildPiAgentTools } from './pi-tool-bridge.js';
|
|
37
|
+
const logger = getLogger('pi-agent-adapter');
|
|
38
|
+
/**
|
|
39
|
+
* Default-OFF feature flag controlling whether the Pi runner is constructed and
|
|
40
|
+
* used. Reads `CLEO_PI_RUNNER_ENABLED === '1'`. The whole adapter is gated by
|
|
41
|
+
* this — when disabled, {@link createPiSkillRunner} is never wired into the
|
|
42
|
+
* dispatcher and `defaultSkillRunner` runs instead.
|
|
43
|
+
*
|
|
44
|
+
* @returns `true` when the Pi runner is explicitly enabled.
|
|
45
|
+
*/
|
|
46
|
+
export function isPiRunnerEnabled() {
|
|
47
|
+
return process.env['CLEO_PI_RUNNER_ENABLED'] === '1';
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* In-process Pi agent-loop adapter with ZERO authority.
|
|
51
|
+
*
|
|
52
|
+
* {@link run} drives `pi-agent-core`'s `runAgentLoop` with a Cleo-owned streamFn
|
|
53
|
+
* (Gate-13), an in-RAM session (no DB writer), and `wrapPiCall` exit/error
|
|
54
|
+
* containment, then projects the terminal assistant message onto a
|
|
55
|
+
* {@link PiAgentResult}. It NEVER throws past the containment boundary for a Pi
|
|
56
|
+
* failure — a Pi error becomes a `{ status: 'failure', error }` result.
|
|
57
|
+
*/
|
|
58
|
+
export class PiAgentAdapter {
|
|
59
|
+
/** Construction defaults merged under the per-run {@link PiAgentRunContext}. */
|
|
60
|
+
#deps;
|
|
61
|
+
/**
|
|
62
|
+
* Construct the adapter.
|
|
63
|
+
*
|
|
64
|
+
* `deps` supplies the construction-time defaults (resolution system + project
|
|
65
|
+
* root) that {@link run} merges UNDER the per-call context — a field the call
|
|
66
|
+
* supplies on `ctx` always wins. The factory {@link createPiSkillRunner} builds
|
|
67
|
+
* the full `ctx` from these same deps; a direct caller may pass a partial `ctx`
|
|
68
|
+
* and rely on the deps for the rest.
|
|
69
|
+
*
|
|
70
|
+
* @param deps - Resolution system + optional project root defaults.
|
|
71
|
+
*/
|
|
72
|
+
constructor(deps = {}) {
|
|
73
|
+
this.#deps = deps;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Run one Pi agent turn over the guarded tool surface.
|
|
77
|
+
*
|
|
78
|
+
* The `tools` surface is the injected {@link GuardedToolSurface}; the v0
|
|
79
|
+
* read/stream path threads it into the loop for future tool wiring (S3+ maps
|
|
80
|
+
* Pi's `ExecutionEnv` onto it). Resolution + streaming are owned by
|
|
81
|
+
* {@link createPiStreamFn} (Gate-13). The session id MUST already be
|
|
82
|
+
* daemon-stamped (read from env in {@link createPiSkillRunner}); the adapter
|
|
83
|
+
* never mints one.
|
|
84
|
+
*
|
|
85
|
+
* @param prompt - The user prompt for this turn.
|
|
86
|
+
* @param tools - The deny-first guarded tool surface (injected, never built here).
|
|
87
|
+
* @param ctx - The run context (system label + daemon-stamped identity + signal).
|
|
88
|
+
* @returns The terminal {@link PiAgentResult}; never throws for a Pi failure.
|
|
89
|
+
*/
|
|
90
|
+
async run(prompt, tools, ctx) {
|
|
91
|
+
// Merge construction defaults UNDER the per-call ctx — a field the caller
|
|
92
|
+
// supplied on `ctx` always wins; deps fill the `projectRoot` gap.
|
|
93
|
+
const runCtx = ctx.projectRoot === undefined && this.#deps.projectRoot !== undefined
|
|
94
|
+
? { ...ctx, projectRoot: this.#deps.projectRoot }
|
|
95
|
+
: ctx;
|
|
96
|
+
try {
|
|
97
|
+
const messages = await wrapPiCall(async (signal) => {
|
|
98
|
+
// In-RAM session seeded with the daemon-stamped id — the default
|
|
99
|
+
// `createSessionId()` uuidv7 mint is never reached (ZERO authority,
|
|
100
|
+
// no DB writer, no lease).
|
|
101
|
+
const repo = new InMemorySessionRepo();
|
|
102
|
+
const session = await repo.create({ id: runCtx.sessionId });
|
|
103
|
+
const metadata = await session.getMetadata();
|
|
104
|
+
if (metadata.id !== runCtx.sessionId) {
|
|
105
|
+
// Identity contract violation — refuse rather than run under a minted id.
|
|
106
|
+
throw new PiContainmentError('E_PI_LOOP_FAILED', `Pi session id mismatch: expected daemon-stamped "${runCtx.sessionId}", got "${metadata.id}"`);
|
|
107
|
+
}
|
|
108
|
+
// The streamFn is the single Gate-13 LLM route; `signal` is the
|
|
109
|
+
// containment-managed abort threaded into the loop.
|
|
110
|
+
const streamFn = createPiStreamFn({ ...runCtx, signal });
|
|
111
|
+
const config = this.#buildConfig();
|
|
112
|
+
const events = [];
|
|
113
|
+
const emit = (event) => {
|
|
114
|
+
events.push(event);
|
|
115
|
+
};
|
|
116
|
+
// AC6 — close the tool-call loop. When a registry is wired, build the
|
|
117
|
+
// T1740 dispatch engine over it + the injected guarded surface, project
|
|
118
|
+
// executable `AgentTool`s onto the loop context, and (separately) advertise
|
|
119
|
+
// the same schemas to the model on the wire (Context.tools is read by the
|
|
120
|
+
// streamFn). When NO registry is supplied the loop is text-only — the
|
|
121
|
+
// guarded surface is still asserted so the seam is never ambient.
|
|
122
|
+
void tools;
|
|
123
|
+
const agentContext = this.#buildAgentContext(tools);
|
|
124
|
+
const result = await runAgentLoop([userMessage(prompt)], agentContext, config, emit, signal, streamFn);
|
|
125
|
+
return result;
|
|
126
|
+
}, runCtx.signal);
|
|
127
|
+
return projectResult(messages);
|
|
128
|
+
}
|
|
129
|
+
catch (err) {
|
|
130
|
+
// Containment already mapped Pi exits/aborts/failures to a typed error.
|
|
131
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
132
|
+
logger.warn({ system: runCtx.system, error: message }, 'pi agent run failed (contained)');
|
|
133
|
+
return { status: 'failure', output: {}, error: message };
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Build the {@link AgentLoopConfig} for this run.
|
|
138
|
+
*
|
|
139
|
+
* The `model` is a syntactically-valid placeholder ONLY — the actual provider/
|
|
140
|
+
* model/credential is resolved inside the streamFn by `ctx.system`, never by
|
|
141
|
+
* this descriptor (the resolver/registry is the SSoT, NOT a literal here). The
|
|
142
|
+
* placeholder id is a non-model-literal sentinel so it cannot trip Gate-13's
|
|
143
|
+
* `hardcoded-model-literal` rule.
|
|
144
|
+
*
|
|
145
|
+
* @returns The loop config.
|
|
146
|
+
*/
|
|
147
|
+
#buildConfig() {
|
|
148
|
+
return {
|
|
149
|
+
model: placeholderModel(),
|
|
150
|
+
// Pass AgentMessages straight through to the LLM boundary — the streamFn
|
|
151
|
+
// re-projects them onto cleo transport messages. Must not throw (Pi contract).
|
|
152
|
+
convertToLlm: (messages) => messages,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Build the loop's {@link AgentContext}, wiring the executable tools when a
|
|
157
|
+
* registry is configured (T1740 · AC6).
|
|
158
|
+
*
|
|
159
|
+
* With a registry: a {@link ToolDispatchEngine} is constructed over it + the
|
|
160
|
+
* injected guarded surface + the optional run-scoped budget, and {@link
|
|
161
|
+
* buildPiAgentTools} projects executable `AgentTool`s onto `context.tools`. The
|
|
162
|
+
* loop reads those `execute` bodies when the model emits a tool-call, so the
|
|
163
|
+
* call runs through the dispatch engine (lookup → validate → availability →
|
|
164
|
+
* budget → guarded side effect → formatted result) and the result is fed back.
|
|
165
|
+
* Without a registry the context is text-only — the prior behaviour.
|
|
166
|
+
*
|
|
167
|
+
* @param tools - The injected guarded tool surface every executable runs through.
|
|
168
|
+
* @returns The loop context (`systemPrompt` + empty transcript + optional tools).
|
|
169
|
+
*/
|
|
170
|
+
#buildAgentContext(tools) {
|
|
171
|
+
if (!this.#deps.registry) {
|
|
172
|
+
return { systemPrompt: '', messages: [] };
|
|
173
|
+
}
|
|
174
|
+
const engine = new ToolDispatchEngine({
|
|
175
|
+
registry: this.#deps.registry,
|
|
176
|
+
tools,
|
|
177
|
+
...(this.#deps.budget !== undefined ? { budget: new ToolCallBudget(this.#deps.budget) } : {}),
|
|
178
|
+
});
|
|
179
|
+
const agentTools = buildPiAgentTools(engine, this.#deps.registry);
|
|
180
|
+
// `buildPiAgentTools` returns the structural `AgentTool` subset the loop
|
|
181
|
+
// reads (name/description/parameters/label/execute); the cast bridges to
|
|
182
|
+
// `pi-agent-core`'s generic `AgentTool<TSchema, TDetails>` without importing
|
|
183
|
+
// its TypeBox-parameterized type into the bridge (Gate-10 quarantine).
|
|
184
|
+
return {
|
|
185
|
+
systemPrompt: '',
|
|
186
|
+
messages: [],
|
|
187
|
+
tools: agentTools,
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Factory returning a {@link SkillRunner} whose body delegates to
|
|
193
|
+
* {@link PiAgentAdapter.run}.
|
|
194
|
+
*
|
|
195
|
+
* This is the seam adaptation: the real `SkillRunner` shape is
|
|
196
|
+
* `(skill, input) => Promise<SkillExecuteResult>` — it carries NO free `prompt`
|
|
197
|
+
* / `ctx`, so the closure DERIVES the prompt from the skill+context and reads
|
|
198
|
+
* the daemon-stamped identity from env. When the env is un-stamped the runner
|
|
199
|
+
* fails closed (it NEVER mints a session id).
|
|
200
|
+
*
|
|
201
|
+
* Wire it into the dispatcher behind the default-OFF flag:
|
|
202
|
+
* ```ts
|
|
203
|
+
* new SkillExecutorAdapter({
|
|
204
|
+
* runner: isPiRunnerEnabled() ? createPiSkillRunner(deps) : undefined,
|
|
205
|
+
* });
|
|
206
|
+
* ```
|
|
207
|
+
*
|
|
208
|
+
* @param deps - Adapter construction deps (resolution system + project root).
|
|
209
|
+
* @returns A `SkillRunner` that runs the Pi loop in-process.
|
|
210
|
+
*/
|
|
211
|
+
export function createPiSkillRunner(deps = {}) {
|
|
212
|
+
// The adapter receives the full deps (incl. the optional tool registry + budget
|
|
213
|
+
// for AC6 tool-call dispatch).
|
|
214
|
+
const adapter = new PiAgentAdapter(deps);
|
|
215
|
+
return async (skill, input) => {
|
|
216
|
+
const sessionId = resolveSessionIdFromEnv();
|
|
217
|
+
if (sessionId === null) {
|
|
218
|
+
// ZERO authority: a Pi-in-process run without a daemon-stamped session is
|
|
219
|
+
// a contract violation. Fail closed — never mint.
|
|
220
|
+
return {
|
|
221
|
+
status: 'failure',
|
|
222
|
+
output: {},
|
|
223
|
+
error: 'E_PI_NO_SESSION_IDENTITY: CLEO_SESSION_ID is not set; the Pi runner refuses to mint a session id',
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
const ctx = {
|
|
227
|
+
system: deps.system ?? 'task-executor',
|
|
228
|
+
sessionId,
|
|
229
|
+
agentId: resolveAgentIdFromEnv(),
|
|
230
|
+
parentSessionId: resolveParentSessionIdFromEnv(),
|
|
231
|
+
...(deps.projectRoot !== undefined ? { projectRoot: deps.projectRoot } : {}),
|
|
232
|
+
};
|
|
233
|
+
const prompt = buildPromptFromSkill(skill, input);
|
|
234
|
+
const result = await adapter.run(prompt, input.tools, ctx);
|
|
235
|
+
return result.status === 'success'
|
|
236
|
+
? { status: 'success', output: result.output }
|
|
237
|
+
: {
|
|
238
|
+
status: 'failure',
|
|
239
|
+
output: result.output,
|
|
240
|
+
...(result.error !== undefined ? { error: result.error } : {}),
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Derive the Pi prompt from a resolved skill + its execution input.
|
|
246
|
+
*
|
|
247
|
+
* v0: the skill's content is the instruction body; the accumulated context is
|
|
248
|
+
* appended as a JSON block so the model can read prior bindings. Kept small and
|
|
249
|
+
* deterministic — the richer prompt-template path is a later subtask.
|
|
250
|
+
*
|
|
251
|
+
* @param skill - The resolved skill (frontmatter + content).
|
|
252
|
+
* @param input - The execution input (skill id + context + tools).
|
|
253
|
+
* @returns The composed prompt string.
|
|
254
|
+
*/
|
|
255
|
+
function buildPromptFromSkill(skill, input) {
|
|
256
|
+
const body = skill.content ?? skill.frontmatter.description ?? skill.name;
|
|
257
|
+
const contextKeys = Object.keys(input.context);
|
|
258
|
+
const contextBlock = contextKeys.length > 0 ? `\n\n## Context\n${JSON.stringify(input.context, null, 2)}` : '';
|
|
259
|
+
return `${body}${contextBlock}`;
|
|
260
|
+
}
|
|
261
|
+
/** Build a Pi user {@link AgentMessage} from a prompt string. */
|
|
262
|
+
function userMessage(prompt) {
|
|
263
|
+
return {
|
|
264
|
+
role: 'user',
|
|
265
|
+
content: prompt,
|
|
266
|
+
timestamp: Date.now(),
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Project the loop's terminal assistant message onto a {@link PiAgentResult}.
|
|
271
|
+
*
|
|
272
|
+
* The loop returns the full `AgentMessage[]`; the last assistant message's text
|
|
273
|
+
* is the terminal output. A `stopReason: 'error'` message becomes a failure.
|
|
274
|
+
*
|
|
275
|
+
* @param messages - The loop's returned message list.
|
|
276
|
+
* @returns The projected result.
|
|
277
|
+
*/
|
|
278
|
+
function projectResult(messages) {
|
|
279
|
+
const last = [...messages].reverse().find((m) => m.role === 'assistant');
|
|
280
|
+
if (!last) {
|
|
281
|
+
return { status: 'success', output: { text: '' } };
|
|
282
|
+
}
|
|
283
|
+
const text = assistantText(last);
|
|
284
|
+
const stopReason = last.stopReason;
|
|
285
|
+
if (stopReason === 'error') {
|
|
286
|
+
const errorMessage = last.errorMessage ?? 'pi loop error';
|
|
287
|
+
return { status: 'failure', output: { text }, error: errorMessage };
|
|
288
|
+
}
|
|
289
|
+
return { status: 'success', output: { text } };
|
|
290
|
+
}
|
|
291
|
+
/** Extract concatenated visible text from a Pi assistant message. */
|
|
292
|
+
function assistantText(message) {
|
|
293
|
+
const content = message.content;
|
|
294
|
+
if (typeof content === 'string')
|
|
295
|
+
return content;
|
|
296
|
+
if (Array.isArray(content)) {
|
|
297
|
+
return content
|
|
298
|
+
.map((c) => typeof c === 'object' && c !== null && 'text' in c
|
|
299
|
+
? String(c.text)
|
|
300
|
+
: '')
|
|
301
|
+
.join('');
|
|
302
|
+
}
|
|
303
|
+
return '';
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Build a syntactically-valid placeholder {@link Model} for the loop config.
|
|
307
|
+
*
|
|
308
|
+
* The streamFn ignores this model for resolution (it resolves by `ctx.system`),
|
|
309
|
+
* so the fields are inert sentinels. The `id`/`name` are NON-model-literals so
|
|
310
|
+
* they never trip Gate-13's `hardcoded-model-literal` rule, and `provider` is a
|
|
311
|
+
* neutral marker (NOT a real provider's credential trigger).
|
|
312
|
+
*
|
|
313
|
+
* @returns A placeholder model.
|
|
314
|
+
*/
|
|
315
|
+
function placeholderModel() {
|
|
316
|
+
return {
|
|
317
|
+
id: 'cleo-resolved',
|
|
318
|
+
name: 'cleo-resolved',
|
|
319
|
+
api: 'anthropic-messages',
|
|
320
|
+
provider: 'cleo',
|
|
321
|
+
baseUrl: '',
|
|
322
|
+
reasoning: false,
|
|
323
|
+
input: ['text'],
|
|
324
|
+
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
325
|
+
contextWindow: 0,
|
|
326
|
+
maxTokens: 0,
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
//# sourceMappingURL=pi-agent-adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pi-agent-adapter.js","sourceRoot":"","sources":["../../../src/llm/pi/pi-agent-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAaH,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElF,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EACL,qBAAqB,EACrB,6BAA6B,EAC7B,uBAAuB,GACxB,MAAM,8BAA8B,CAAC;AAItC,OAAO,EAAyB,cAAc,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACpG,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,gBA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*
|
|
4
|
+
* The Pi agent loop runs **in-process** inside the Cleo daemon with ZERO
|
|
5
|
+
* authority. Two library packages are in the safe import set
|
|
6
|
+
* (`@earendil-works/pi-agent-core` + `@earendil-works/pi-ai`) and both are
|
|
7
|
+
* verified exit-clean, but the daemon MUST be protected from a process
|
|
8
|
+
* termination originating from a Pi code path. This module is the containment
|
|
9
|
+
* boundary: it converts a `process.exit()` call or a `process.exitCode` mutation
|
|
10
|
+
* attempted while running Pi code into a typed {@link PiContainmentError} thrown
|
|
11
|
+
* back to the caller.
|
|
12
|
+
*
|
|
13
|
+
* ## Containment scope (honest guarantee)
|
|
14
|
+
*
|
|
15
|
+
* The `process.exit` trap is process-global and REF-COUNTED across overlapping
|
|
16
|
+
* {@link wrapPiCall} scopes, so it covers the synchronous body, every awaited
|
|
17
|
+
* continuation, AND any deferred/detached exit (`setTimeout`, un-awaited
|
|
18
|
+
* promise, microtask) that fires while ANY Pi call is still active. The ONLY
|
|
19
|
+
* residual window is an exit fired AFTER the last active call has settled. To
|
|
20
|
+
* close that too — a daemon-lifetime guarantee covering ANY present/future Pi
|
|
21
|
+
* exit, synchronous or detached — the daemon calls {@link installDaemonExitGuard}
|
|
22
|
+
* once at startup to PIN the trap for its whole lifetime.
|
|
23
|
+
*
|
|
24
|
+
* Scope discipline (S1): NO `pi-ai`/`pi-agent-core` imports, NO DB access, NO
|
|
25
|
+
* LLM calls. Import-time side-effect free — the logger is resolved lazily
|
|
26
|
+
* (never at module top level).
|
|
27
|
+
*
|
|
28
|
+
* @epic T10403
|
|
29
|
+
* @task T11761
|
|
30
|
+
* @task T11897
|
|
31
|
+
*/
|
|
32
|
+
import { ExitCode } from '@cleocode/contracts';
|
|
33
|
+
import { CleoError } from '../../errors.js';
|
|
34
|
+
/**
|
|
35
|
+
* Stable string codes for the Pi-containment error surface.
|
|
36
|
+
*
|
|
37
|
+
* `CleoError` carries a NUMERIC {@link ExitCode}; these string codes are the
|
|
38
|
+
* machine-readable discriminators a caller switches on, carried on
|
|
39
|
+
* {@link PiContainmentError.piCode} (and mirrored into the LAFS error `details`
|
|
40
|
+
* via `CleoErrorDetails`). They are NOT exit codes themselves.
|
|
41
|
+
*/
|
|
42
|
+
export type PiContainmentCode =
|
|
43
|
+
/** Pi (or a transitive dep) called `process.exit()` while in-process. */
|
|
44
|
+
'E_PI_PROCESS_EXIT_TRAPPED'
|
|
45
|
+
/** Pi (or a transitive dep) mutated `process.exitCode` while in-process. */
|
|
46
|
+
| 'E_PI_EXIT_CODE_MUTATION_TRAPPED'
|
|
47
|
+
/** The wrapped Pi call was aborted via the supplied `AbortSignal`. */
|
|
48
|
+
| 'E_PI_ABORTED'
|
|
49
|
+
/** The wrapped Pi call threw an unexpected error. */
|
|
50
|
+
| 'E_PI_LOOP_FAILED';
|
|
51
|
+
/**
|
|
52
|
+
* Typed containment error for the Pi in-process embed.
|
|
53
|
+
*
|
|
54
|
+
* Extends {@link CleoError} so it flows through the existing LAFS error
|
|
55
|
+
* projection (`toLAFSError`/`toProblemDetails`). It carries the Pi-specific
|
|
56
|
+
* string {@link PiContainmentCode} on {@link piCode} (the numeric `ExitCode`
|
|
57
|
+
* super-field is `INTERNAL`/`GENERAL_ERROR`-class — it is the daemon, not the
|
|
58
|
+
* caller, that is being protected, so the failure is an internal one).
|
|
59
|
+
*/
|
|
60
|
+
export declare class PiContainmentError extends CleoError {
|
|
61
|
+
/** Machine-readable Pi-containment discriminator. */
|
|
62
|
+
readonly piCode: PiContainmentCode;
|
|
63
|
+
/**
|
|
64
|
+
* @param piCode - The Pi-containment discriminator.
|
|
65
|
+
* @param message - Human-readable description.
|
|
66
|
+
* @param options - Optional `cause` and the numeric `ExitCode` (defaults to
|
|
67
|
+
* {@link ExitCode.GENERAL_ERROR}).
|
|
68
|
+
*/
|
|
69
|
+
constructor(piCode: PiContainmentCode, message: string, options?: {
|
|
70
|
+
cause?: unknown;
|
|
71
|
+
exitCode?: ExitCode;
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Type guard for {@link PiContainmentError} (cross-realm-safe via `piCode`).
|
|
76
|
+
*
|
|
77
|
+
* @param err - The value to test.
|
|
78
|
+
* @returns `true` when `err` is a {@link PiContainmentError}.
|
|
79
|
+
*/
|
|
80
|
+
export declare function isPiContainmentError(err: unknown): err is PiContainmentError;
|
|
81
|
+
/**
|
|
82
|
+
* Convert an arbitrary thrown value into a {@link PiContainmentError}.
|
|
83
|
+
*
|
|
84
|
+
* A value that is ALREADY a {@link PiContainmentError} passes through unchanged
|
|
85
|
+
* (so an exit-trap error is not re-wrapped as a generic loop failure). Anything
|
|
86
|
+
* else becomes an `E_PI_LOOP_FAILED` carrying the original as `cause`.
|
|
87
|
+
*
|
|
88
|
+
* @param err - The thrown value.
|
|
89
|
+
* @returns A typed {@link PiContainmentError}.
|
|
90
|
+
*/
|
|
91
|
+
export declare function wrapPiError(err: unknown): PiContainmentError;
|
|
92
|
+
/**
|
|
93
|
+
* Pin the `process.exit` trap for the ENTIRE daemon lifetime.
|
|
94
|
+
*
|
|
95
|
+
* This is the durable, complete fix for the async-exit leak: once pinned, the
|
|
96
|
+
* trap is NEVER restored, so a `process.exit()` originating from ANY Pi code path
|
|
97
|
+
* — synchronous, awaited, deferred (`setTimeout`), detached (fire-and-forget),
|
|
98
|
+
* present or future — is neutralized for as long as the daemon runs. Call this
|
|
99
|
+
* once at daemon startup BEFORE any Pi-touching work is dispatched.
|
|
100
|
+
*
|
|
101
|
+
* Idempotent. The returned function un-pins (e.g. for a graceful shutdown that
|
|
102
|
+
* legitimately needs to exit); after un-pinning, the trap is restored when no
|
|
103
|
+
* {@link wrapPiCall} scope is active.
|
|
104
|
+
*
|
|
105
|
+
* @returns A function that un-pins the daemon-lifetime trap.
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* ```ts
|
|
109
|
+
* // daemon bootstrap, before serving requests:
|
|
110
|
+
* const unpin = installDaemonExitGuard();
|
|
111
|
+
* // ... daemon runs; all Pi exits are trapped for the whole lifetime ...
|
|
112
|
+
* unpin(); // only if a controlled shutdown must reach the real process.exit
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
export declare function installDaemonExitGuard(): () => void;
|
|
116
|
+
/**
|
|
117
|
+
* Un-pin the daemon-lifetime `process.exit` trap (idempotent).
|
|
118
|
+
*
|
|
119
|
+
* Identical to the closure returned by {@link installDaemonExitGuard}, but
|
|
120
|
+
* callable WITHOUT that handle — for code paths that must reach the real
|
|
121
|
+
* `process.exit` yet do not hold the closure (e.g. a daemon bootstrap-failure
|
|
122
|
+
* handler in a different module). After un-pinning, the trap is restored once no
|
|
123
|
+
* {@link wrapPiCall} scope is active. A no-op if the guard was never pinned.
|
|
124
|
+
*
|
|
125
|
+
* Idempotent: safe to call multiple times and from multiple paths.
|
|
126
|
+
*/
|
|
127
|
+
export declare function releaseDaemonExitGuard(): void;
|
|
128
|
+
/**
|
|
129
|
+
* Run a Pi-touching async function under process-exit containment + abort
|
|
130
|
+
* routing.
|
|
131
|
+
*
|
|
132
|
+
* Behaviour:
|
|
133
|
+
* - Acquires the REF-COUNTED, process-global {@link acquireExitTrap} for the
|
|
134
|
+
* duration of `fn` and releases it in a `finally`. A `process.exit()` call —
|
|
135
|
+
* synchronous, awaited, OR deferred/detached but firing while ANY Pi call is
|
|
136
|
+
* still active — becomes a thrown {@link PiContainmentError} (the daemon
|
|
137
|
+
* survives). A `process.exitCode` mutation is detected-and-restored the instant
|
|
138
|
+
* `fn` settles, then surfaced as a thrown `E_PI_EXIT_CODE_MUTATION_TRAPPED`.
|
|
139
|
+
* For a guarantee that spans even an exit fired AFTER the last call settles,
|
|
140
|
+
* the daemon should additionally pin the trap once at startup via
|
|
141
|
+
* {@link installDaemonExitGuard}.
|
|
142
|
+
* - If `signal` is already aborted, rejects with `E_PI_ABORTED` WITHOUT invoking
|
|
143
|
+
* `fn`. Otherwise the signal is propagated to `fn` (the caller threads it into
|
|
144
|
+
* Pi's agent loop); an abort that surfaces as a thrown `AbortError`/`DOMException`
|
|
145
|
+
* is normalized to `E_PI_ABORTED`.
|
|
146
|
+
* - Any other thrown value is normalized via {@link wrapPiError}.
|
|
147
|
+
*
|
|
148
|
+
* @typeParam T - The resolved value type of the wrapped call.
|
|
149
|
+
* @param fn - The Pi-touching async function. Receives the (live) `AbortSignal`
|
|
150
|
+
* so it can thread cancellation into the agent loop.
|
|
151
|
+
* @param signal - Optional cancellation signal.
|
|
152
|
+
* @returns The resolved value of `fn`.
|
|
153
|
+
* @throws {PiContainmentError} On exit-trap, abort, or any failure from `fn`.
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* ```ts
|
|
157
|
+
* const result = await wrapPiCall(async (sig) => runAgentLoop(prompts, ctx, cfg, emit, sig), signal);
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
export declare function wrapPiCall<T>(fn: (signal: AbortSignal) => Promise<T>, signal?: AbortSignal): Promise<T>;
|
|
161
|
+
//# sourceMappingURL=pi-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pi-errors.d.ts","sourceRoot":"","sources":["../../../src/llm/pi/pi-errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB;AAC3B,yEAAyE;AACvE,2BAA2B;AAC7B,4EAA4E;GAC1E,iCAAiC;AACnC,sEAAsE;GACpE,cAAc;AAChB,qDAAqD;GACnD,kBAAkB,CAAC;AAEvB;;;;;;;;GAQG;AACH,qBAAa,kBAAmB,SAAQ,SAAS;IAC/C,qDAAqD;IACrD,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IAEnC;;;;;OAKG;gBAED,MAAM,EAAE,iBAAiB,EACzB,OAA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