@pleri/olam-cli 0.1.201 → 0.1.205
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/README.md +102 -169
- package/dist/agent-stream/agent-sdk-to-chunks.js +1 -1
- package/dist/agent-stream/driver-runner.js +73 -7
- package/dist/agent-stream/host-driver-launch.js +14 -1
- package/dist/agent-stream/prototype-gen-launch.js +113 -0
- package/dist/agent-stream/question-broker-bridge.js +335 -0
- package/dist/agent-stream/sdk-env-merge.demo.js +35 -0
- package/dist/agent-stream/sdk-env-merge.js +98 -0
- package/dist/image-digests.json +8 -8
- package/dist/index.js +9533 -6258
- package/dist/index.js.map +1 -1
- package/dist/mcp-server.js +24721 -12934
- package/hermes-bundle/version.json +1 -1
- package/hooks/__tests__/_loader.py +26 -0
- package/hooks/__tests__/prompts.py +63 -0
- package/hooks/__tests__/test_classify_bench.py +94 -0
- package/hooks/__tests__/test_classify_pins.py +78 -0
- package/hooks/model-router.py +17 -4
- package/host-cp/k8s/manifests/50-deployment.yaml +1 -1
- package/host-cp/k8s/manifests/auth-service/50-deployment.yaml +1 -1
- package/host-cp/k8s/manifests/kg-service/50-deployment.yaml +1 -1
- package/host-cp/k8s/manifests/mcp-auth-service/50-deployment.yaml +1 -1
- package/host-cp/k8s/manifests/memory-service/50-deployment.yaml +1 -1
- package/host-cp/src/op-side-longpoll.mjs +212 -0
- package/host-cp/src/plan-chat-proxy-headers.mjs +53 -0
- package/host-cp/src/plan-chat-service.mjs +100 -0
- package/host-cp/src/plan-orchestrator.mjs +100 -6
- package/host-cp/src/server.mjs +607 -45
- package/memory-hooks/agentmemory-classify-queue.mjs +363 -0
- package/memory-hooks/agentmemory-recall-trigger.mjs +233 -0
- package/memory-hooks/agentmemory-reflect-cite.mjs +332 -0
- package/memory-hooks/agentmemory-session-recall.js +332 -0
- package/memory-hooks/recall-log.mjs +185 -0
- package/package.json +9 -4
- package/dist/ask/checkout.d.ts +0 -19
- package/dist/ask/checkout.d.ts.map +0 -1
- package/dist/ask/checkout.js +0 -40
- package/dist/ask/checkout.js.map +0 -1
- package/dist/ask/knowledge-pack-builder.d.ts +0 -72
- package/dist/ask/knowledge-pack-builder.d.ts.map +0 -1
- package/dist/ask/knowledge-pack-builder.js +0 -96
- package/dist/ask/knowledge-pack-builder.js.map +0 -1
- package/dist/ask/knowledge-pack.generated.d.ts +0 -8
- package/dist/ask/knowledge-pack.generated.d.ts.map +0 -1
- package/dist/ask/knowledge-pack.generated.js +0 -2362
- package/dist/ask/knowledge-pack.generated.js.map +0 -1
- package/dist/ask/one-shot.d.ts +0 -21
- package/dist/ask/one-shot.d.ts.map +0 -1
- package/dist/ask/one-shot.js +0 -50
- package/dist/ask/one-shot.js.map +0 -1
- package/dist/ask/repl.d.ts +0 -30
- package/dist/ask/repl.d.ts.map +0 -1
- package/dist/ask/repl.js +0 -109
- package/dist/ask/repl.js.map +0 -1
- package/dist/ask/sdk-client.d.ts +0 -87
- package/dist/ask/sdk-client.d.ts.map +0 -1
- package/dist/ask/sdk-client.js +0 -118
- package/dist/ask/sdk-client.js.map +0 -1
- package/dist/ask/system-prompt.d.ts +0 -30
- package/dist/ask/system-prompt.d.ts.map +0 -1
- package/dist/ask/system-prompt.js +0 -31
- package/dist/ask/system-prompt.js.map +0 -1
- package/dist/cli-version.d.ts +0 -16
- package/dist/cli-version.d.ts.map +0 -1
- package/dist/cli-version.js +0 -39
- package/dist/cli-version.js.map +0 -1
- package/dist/commands/ask.d.ts +0 -27
- package/dist/commands/ask.d.ts.map +0 -1
- package/dist/commands/ask.js +0 -63
- package/dist/commands/ask.js.map +0 -1
- package/dist/commands/auth-list-json.d.ts +0 -87
- package/dist/commands/auth-list-json.d.ts.map +0 -1
- package/dist/commands/auth-list-json.js +0 -71
- package/dist/commands/auth-list-json.js.map +0 -1
- package/dist/commands/auth-migrate.d.ts +0 -212
- package/dist/commands/auth-migrate.d.ts.map +0 -1
- package/dist/commands/auth-migrate.js +0 -465
- package/dist/commands/auth-migrate.js.map +0 -1
- package/dist/commands/auth-status.d.ts +0 -51
- package/dist/commands/auth-status.d.ts.map +0 -1
- package/dist/commands/auth-status.js +0 -250
- package/dist/commands/auth-status.js.map +0 -1
- package/dist/commands/auth-upgrade.d.ts +0 -88
- package/dist/commands/auth-upgrade.d.ts.map +0 -1
- package/dist/commands/auth-upgrade.js +0 -431
- package/dist/commands/auth-upgrade.js.map +0 -1
- package/dist/commands/auth.d.ts +0 -31
- package/dist/commands/auth.d.ts.map +0 -1
- package/dist/commands/auth.js +0 -784
- package/dist/commands/auth.js.map +0 -1
- package/dist/commands/begin.d.ts +0 -27
- package/dist/commands/begin.d.ts.map +0 -1
- package/dist/commands/begin.js +0 -45
- package/dist/commands/begin.js.map +0 -1
- package/dist/commands/bootstrap.d.ts +0 -111
- package/dist/commands/bootstrap.d.ts.map +0 -1
- package/dist/commands/bootstrap.js +0 -485
- package/dist/commands/bootstrap.js.map +0 -1
- package/dist/commands/clean.d.ts +0 -41
- package/dist/commands/clean.d.ts.map +0 -1
- package/dist/commands/clean.js +0 -382
- package/dist/commands/clean.js.map +0 -1
- package/dist/commands/completion.d.ts +0 -30
- package/dist/commands/completion.d.ts.map +0 -1
- package/dist/commands/completion.js +0 -50
- package/dist/commands/completion.js.map +0 -1
- package/dist/commands/config.d.ts +0 -3
- package/dist/commands/config.d.ts.map +0 -1
- package/dist/commands/config.js +0 -146
- package/dist/commands/config.js.map +0 -1
- package/dist/commands/create.d.ts +0 -8
- package/dist/commands/create.d.ts.map +0 -1
- package/dist/commands/create.js +0 -775
- package/dist/commands/create.js.map +0 -1
- package/dist/commands/crystallize.d.ts +0 -18
- package/dist/commands/crystallize.d.ts.map +0 -1
- package/dist/commands/crystallize.js +0 -123
- package/dist/commands/crystallize.js.map +0 -1
- package/dist/commands/destroy.d.ts +0 -59
- package/dist/commands/destroy.d.ts.map +0 -1
- package/dist/commands/destroy.js +0 -148
- package/dist/commands/destroy.js.map +0 -1
- package/dist/commands/diagnose.d.ts +0 -36
- package/dist/commands/diagnose.d.ts.map +0 -1
- package/dist/commands/diagnose.js +0 -177
- package/dist/commands/diagnose.js.map +0 -1
- package/dist/commands/dispatch-resolve.d.ts +0 -54
- package/dist/commands/dispatch-resolve.d.ts.map +0 -1
- package/dist/commands/dispatch-resolve.js +0 -105
- package/dist/commands/dispatch-resolve.js.map +0 -1
- package/dist/commands/dispatch.d.ts +0 -18
- package/dist/commands/dispatch.d.ts.map +0 -1
- package/dist/commands/dispatch.js +0 -159
- package/dist/commands/dispatch.js.map +0 -1
- package/dist/commands/doctor.d.ts +0 -258
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js +0 -1073
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/enter.d.ts +0 -63
- package/dist/commands/enter.d.ts.map +0 -1
- package/dist/commands/enter.js +0 -230
- package/dist/commands/enter.js.map +0 -1
- package/dist/commands/flywheel/check-persona-skeleton.d.ts +0 -35
- package/dist/commands/flywheel/check-persona-skeleton.d.ts.map +0 -1
- package/dist/commands/flywheel/check-persona-skeleton.js +0 -151
- package/dist/commands/flywheel/check-persona-skeleton.js.map +0 -1
- package/dist/commands/flywheel/diversity-check.d.ts +0 -17
- package/dist/commands/flywheel/diversity-check.d.ts.map +0 -1
- package/dist/commands/flywheel/diversity-check.js +0 -64
- package/dist/commands/flywheel/diversity-check.js.map +0 -1
- package/dist/commands/flywheel/emit-breadcrumb.d.ts +0 -20
- package/dist/commands/flywheel/emit-breadcrumb.d.ts.map +0 -1
- package/dist/commands/flywheel/emit-breadcrumb.js +0 -137
- package/dist/commands/flywheel/emit-breadcrumb.js.map +0 -1
- package/dist/commands/flywheel/index.d.ts +0 -27
- package/dist/commands/flywheel/index.d.ts.map +0 -1
- package/dist/commands/flywheel/index.js +0 -54
- package/dist/commands/flywheel/index.js.map +0 -1
- package/dist/commands/flywheel/install-sessionstart-hook.d.ts +0 -64
- package/dist/commands/flywheel/install-sessionstart-hook.d.ts.map +0 -1
- package/dist/commands/flywheel/install-sessionstart-hook.js +0 -197
- package/dist/commands/flywheel/install-sessionstart-hook.js.map +0 -1
- package/dist/commands/flywheel/install-shims.d.ts +0 -41
- package/dist/commands/flywheel/install-shims.d.ts.map +0 -1
- package/dist/commands/flywheel/install-shims.js +0 -126
- package/dist/commands/flywheel/install-shims.js.map +0 -1
- package/dist/commands/flywheel/k10-measure.d.ts +0 -17
- package/dist/commands/flywheel/k10-measure.d.ts.map +0 -1
- package/dist/commands/flywheel/k10-measure.js +0 -63
- package/dist/commands/flywheel/k10-measure.js.map +0 -1
- package/dist/commands/flywheel/k5-score.d.ts +0 -14
- package/dist/commands/flywheel/k5-score.d.ts.map +0 -1
- package/dist/commands/flywheel/k5-score.js +0 -59
- package/dist/commands/flywheel/k5-score.js.map +0 -1
- package/dist/commands/flywheel/k5-validate.d.ts +0 -46
- package/dist/commands/flywheel/k5-validate.d.ts.map +0 -1
- package/dist/commands/flywheel/k5-validate.js +0 -246
- package/dist/commands/flywheel/k5-validate.js.map +0 -1
- package/dist/commands/flywheel/migrate-overlays.d.ts +0 -116
- package/dist/commands/flywheel/migrate-overlays.d.ts.map +0 -1
- package/dist/commands/flywheel/migrate-overlays.js +0 -792
- package/dist/commands/flywheel/migrate-overlays.js.map +0 -1
- package/dist/commands/flywheel/ping.d.ts +0 -21
- package/dist/commands/flywheel/ping.d.ts.map +0 -1
- package/dist/commands/flywheel/ping.js +0 -79
- package/dist/commands/flywheel/ping.js.map +0 -1
- package/dist/commands/flywheel/sanitize-persona-output.d.ts +0 -38
- package/dist/commands/flywheel/sanitize-persona-output.d.ts.map +0 -1
- package/dist/commands/flywheel/sanitize-persona-output.js +0 -102
- package/dist/commands/flywheel/sanitize-persona-output.js.map +0 -1
- package/dist/commands/flywheel/session-start.d.ts +0 -26
- package/dist/commands/flywheel/session-start.d.ts.map +0 -1
- package/dist/commands/flywheel/session-start.js +0 -119
- package/dist/commands/flywheel/session-start.js.map +0 -1
- package/dist/commands/hermes-kg-hook.d.ts +0 -36
- package/dist/commands/hermes-kg-hook.d.ts.map +0 -1
- package/dist/commands/hermes-kg-hook.js +0 -80
- package/dist/commands/hermes-kg-hook.js.map +0 -1
- package/dist/commands/hermes.d.ts +0 -46
- package/dist/commands/hermes.d.ts.map +0 -1
- package/dist/commands/hermes.js +0 -320
- package/dist/commands/hermes.js.map +0 -1
- package/dist/commands/host-cp.d.ts +0 -216
- package/dist/commands/host-cp.d.ts.map +0 -1
- package/dist/commands/host-cp.js +0 -913
- package/dist/commands/host-cp.js.map +0 -1
- package/dist/commands/implode.d.ts +0 -86
- package/dist/commands/implode.d.ts.map +0 -1
- package/dist/commands/implode.js +0 -468
- package/dist/commands/implode.js.map +0 -1
- package/dist/commands/init.d.ts +0 -86
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -357
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/install.d.ts +0 -22
- package/dist/commands/install.d.ts.map +0 -1
- package/dist/commands/install.js +0 -203
- package/dist/commands/install.js.map +0 -1
- package/dist/commands/keys-list-json.d.ts +0 -55
- package/dist/commands/keys-list-json.d.ts.map +0 -1
- package/dist/commands/keys-list-json.js +0 -54
- package/dist/commands/keys-list-json.js.map +0 -1
- package/dist/commands/keys.d.ts +0 -26
- package/dist/commands/keys.d.ts.map +0 -1
- package/dist/commands/keys.js +0 -157
- package/dist/commands/keys.js.map +0 -1
- package/dist/commands/kg-build.d.ts +0 -80
- package/dist/commands/kg-build.d.ts.map +0 -1
- package/dist/commands/kg-build.js +0 -282
- package/dist/commands/kg-build.js.map +0 -1
- package/dist/commands/kg-classify.d.ts +0 -30
- package/dist/commands/kg-classify.d.ts.map +0 -1
- package/dist/commands/kg-classify.js +0 -88
- package/dist/commands/kg-classify.js.map +0 -1
- package/dist/commands/kg-doctor.d.ts +0 -76
- package/dist/commands/kg-doctor.d.ts.map +0 -1
- package/dist/commands/kg-doctor.js +0 -262
- package/dist/commands/kg-doctor.js.map +0 -1
- package/dist/commands/kg-install-hook.d.ts +0 -20
- package/dist/commands/kg-install-hook.d.ts.map +0 -1
- package/dist/commands/kg-install-hook.js +0 -208
- package/dist/commands/kg-install-hook.js.map +0 -1
- package/dist/commands/kg-mirror.d.ts +0 -72
- package/dist/commands/kg-mirror.d.ts.map +0 -1
- package/dist/commands/kg-mirror.js +0 -397
- package/dist/commands/kg-mirror.js.map +0 -1
- package/dist/commands/kg-savings.d.ts +0 -20
- package/dist/commands/kg-savings.d.ts.map +0 -1
- package/dist/commands/kg-savings.js +0 -77
- package/dist/commands/kg-savings.js.map +0 -1
- package/dist/commands/kg-service-container.d.ts +0 -68
- package/dist/commands/kg-service-container.d.ts.map +0 -1
- package/dist/commands/kg-service-container.js +0 -191
- package/dist/commands/kg-service-container.js.map +0 -1
- package/dist/commands/kg-status.d.ts +0 -59
- package/dist/commands/kg-status.d.ts.map +0 -1
- package/dist/commands/kg-status.js +0 -344
- package/dist/commands/kg-status.js.map +0 -1
- package/dist/commands/kg-uninstall-hook.d.ts +0 -12
- package/dist/commands/kg-uninstall-hook.d.ts.map +0 -1
- package/dist/commands/kg-uninstall-hook.js +0 -121
- package/dist/commands/kg-uninstall-hook.js.map +0 -1
- package/dist/commands/kg-watch.d.ts +0 -49
- package/dist/commands/kg-watch.d.ts.map +0 -1
- package/dist/commands/kg-watch.js +0 -172
- package/dist/commands/kg-watch.js.map +0 -1
- package/dist/commands/lanes-list-json.d.ts +0 -69
- package/dist/commands/lanes-list-json.d.ts.map +0 -1
- package/dist/commands/lanes-list-json.js +0 -42
- package/dist/commands/lanes-list-json.js.map +0 -1
- package/dist/commands/lanes.d.ts +0 -18
- package/dist/commands/lanes.d.ts.map +0 -1
- package/dist/commands/lanes.js +0 -133
- package/dist/commands/lanes.js.map +0 -1
- package/dist/commands/list.d.ts +0 -33
- package/dist/commands/list.d.ts.map +0 -1
- package/dist/commands/list.js +0 -87
- package/dist/commands/list.js.map +0 -1
- package/dist/commands/logs.d.ts +0 -52
- package/dist/commands/logs.d.ts.map +0 -1
- package/dist/commands/logs.js +0 -180
- package/dist/commands/logs.js.map +0 -1
- package/dist/commands/mcp/add.d.ts +0 -9
- package/dist/commands/mcp/add.d.ts.map +0 -1
- package/dist/commands/mcp/add.js +0 -87
- package/dist/commands/mcp/add.js.map +0 -1
- package/dist/commands/mcp/client.d.ts +0 -60
- package/dist/commands/mcp/client.d.ts.map +0 -1
- package/dist/commands/mcp/client.js +0 -70
- package/dist/commands/mcp/client.js.map +0 -1
- package/dist/commands/mcp/complete.d.ts +0 -36
- package/dist/commands/mcp/complete.d.ts.map +0 -1
- package/dist/commands/mcp/complete.js +0 -66
- package/dist/commands/mcp/complete.js.map +0 -1
- package/dist/commands/mcp/import-discovery.d.ts +0 -25
- package/dist/commands/mcp/import-discovery.d.ts.map +0 -1
- package/dist/commands/mcp/import-discovery.js +0 -135
- package/dist/commands/mcp/import-discovery.js.map +0 -1
- package/dist/commands/mcp/import-validate.d.ts +0 -15
- package/dist/commands/mcp/import-validate.d.ts.map +0 -1
- package/dist/commands/mcp/import-validate.js +0 -55
- package/dist/commands/mcp/import-validate.js.map +0 -1
- package/dist/commands/mcp/import.d.ts +0 -12
- package/dist/commands/mcp/import.d.ts.map +0 -1
- package/dist/commands/mcp/import.js +0 -126
- package/dist/commands/mcp/import.js.map +0 -1
- package/dist/commands/mcp/index.d.ts +0 -14
- package/dist/commands/mcp/index.d.ts.map +0 -1
- package/dist/commands/mcp/index.js +0 -39
- package/dist/commands/mcp/index.js.map +0 -1
- package/dist/commands/mcp/install-shared.d.ts +0 -24
- package/dist/commands/mcp/install-shared.d.ts.map +0 -1
- package/dist/commands/mcp/install-shared.js +0 -42
- package/dist/commands/mcp/install-shared.js.map +0 -1
- package/dist/commands/mcp/install.d.ts +0 -20
- package/dist/commands/mcp/install.d.ts.map +0 -1
- package/dist/commands/mcp/install.js +0 -59
- package/dist/commands/mcp/install.js.map +0 -1
- package/dist/commands/mcp/list.d.ts +0 -6
- package/dist/commands/mcp/list.d.ts.map +0 -1
- package/dist/commands/mcp/list.js +0 -56
- package/dist/commands/mcp/list.js.map +0 -1
- package/dist/commands/mcp/login.d.ts +0 -6
- package/dist/commands/mcp/login.d.ts.map +0 -1
- package/dist/commands/mcp/login.js +0 -38
- package/dist/commands/mcp/login.js.map +0 -1
- package/dist/commands/mcp/remove.d.ts +0 -6
- package/dist/commands/mcp/remove.d.ts.map +0 -1
- package/dist/commands/mcp/remove.js +0 -21
- package/dist/commands/mcp/remove.js.map +0 -1
- package/dist/commands/mcp/revoke.d.ts +0 -11
- package/dist/commands/mcp/revoke.d.ts.map +0 -1
- package/dist/commands/mcp/revoke.js +0 -51
- package/dist/commands/mcp/revoke.js.map +0 -1
- package/dist/commands/mcp/serve.d.ts +0 -23
- package/dist/commands/mcp/serve.d.ts.map +0 -1
- package/dist/commands/mcp/serve.js +0 -55
- package/dist/commands/mcp/serve.js.map +0 -1
- package/dist/commands/mcp/status.d.ts +0 -6
- package/dist/commands/mcp/status.d.ts.map +0 -1
- package/dist/commands/mcp/status.js +0 -57
- package/dist/commands/mcp/status.js.map +0 -1
- package/dist/commands/mcp/uninstall.d.ts +0 -20
- package/dist/commands/mcp/uninstall.d.ts.map +0 -1
- package/dist/commands/mcp/uninstall.js +0 -60
- package/dist/commands/mcp/uninstall.js.map +0 -1
- package/dist/commands/memory/_paths.d.ts +0 -25
- package/dist/commands/memory/_paths.d.ts.map +0 -1
- package/dist/commands/memory/_paths.js +0 -57
- package/dist/commands/memory/_paths.js.map +0 -1
- package/dist/commands/memory/bridge.d.ts +0 -57
- package/dist/commands/memory/bridge.d.ts.map +0 -1
- package/dist/commands/memory/bridge.js +0 -152
- package/dist/commands/memory/bridge.js.map +0 -1
- package/dist/commands/memory/index.d.ts +0 -20
- package/dist/commands/memory/index.d.ts.map +0 -1
- package/dist/commands/memory/index.js +0 -47
- package/dist/commands/memory/index.js.map +0 -1
- package/dist/commands/memory/install-hooks.d.ts +0 -22
- package/dist/commands/memory/install-hooks.d.ts.map +0 -1
- package/dist/commands/memory/install-hooks.js +0 -156
- package/dist/commands/memory/install-hooks.js.map +0 -1
- package/dist/commands/memory/install.d.ts +0 -57
- package/dist/commands/memory/install.d.ts.map +0 -1
- package/dist/commands/memory/install.js +0 -114
- package/dist/commands/memory/install.js.map +0 -1
- package/dist/commands/memory/logs.d.ts +0 -19
- package/dist/commands/memory/logs.d.ts.map +0 -1
- package/dist/commands/memory/logs.js +0 -50
- package/dist/commands/memory/logs.js.map +0 -1
- package/dist/commands/memory/mode.d.ts +0 -47
- package/dist/commands/memory/mode.d.ts.map +0 -1
- package/dist/commands/memory/mode.js +0 -185
- package/dist/commands/memory/mode.js.map +0 -1
- package/dist/commands/memory/reclassify.d.ts +0 -56
- package/dist/commands/memory/reclassify.d.ts.map +0 -1
- package/dist/commands/memory/reclassify.js +0 -177
- package/dist/commands/memory/reclassify.js.map +0 -1
- package/dist/commands/memory/secret.d.ts +0 -16
- package/dist/commands/memory/secret.d.ts.map +0 -1
- package/dist/commands/memory/secret.js +0 -80
- package/dist/commands/memory/secret.js.map +0 -1
- package/dist/commands/memory/start.d.ts +0 -25
- package/dist/commands/memory/start.d.ts.map +0 -1
- package/dist/commands/memory/start.js +0 -83
- package/dist/commands/memory/start.js.map +0 -1
- package/dist/commands/memory/stats.d.ts +0 -69
- package/dist/commands/memory/stats.d.ts.map +0 -1
- package/dist/commands/memory/stats.js +0 -164
- package/dist/commands/memory/stats.js.map +0 -1
- package/dist/commands/memory/status.d.ts +0 -45
- package/dist/commands/memory/status.d.ts.map +0 -1
- package/dist/commands/memory/status.js +0 -134
- package/dist/commands/memory/status.js.map +0 -1
- package/dist/commands/memory/stop.d.ts +0 -13
- package/dist/commands/memory/stop.d.ts.map +0 -1
- package/dist/commands/memory/stop.js +0 -52
- package/dist/commands/memory/stop.js.map +0 -1
- package/dist/commands/memory/uninstall.d.ts +0 -19
- package/dist/commands/memory/uninstall.d.ts.map +0 -1
- package/dist/commands/memory/uninstall.js +0 -60
- package/dist/commands/memory/uninstall.js.map +0 -1
- package/dist/commands/memory-service-container.d.ts +0 -130
- package/dist/commands/memory-service-container.d.ts.map +0 -1
- package/dist/commands/memory-service-container.js +0 -251
- package/dist/commands/memory-service-container.js.map +0 -1
- package/dist/commands/observe.d.ts +0 -9
- package/dist/commands/observe.d.ts.map +0 -1
- package/dist/commands/observe.js +0 -42
- package/dist/commands/observe.js.map +0 -1
- package/dist/commands/plans-list-json.d.ts +0 -77
- package/dist/commands/plans-list-json.d.ts.map +0 -1
- package/dist/commands/plans-list-json.js +0 -61
- package/dist/commands/plans-list-json.js.map +0 -1
- package/dist/commands/plans.d.ts +0 -3
- package/dist/commands/plans.d.ts.map +0 -1
- package/dist/commands/plans.js +0 -221
- package/dist/commands/plans.js.map +0 -1
- package/dist/commands/policy-check.d.ts +0 -14
- package/dist/commands/policy-check.d.ts.map +0 -1
- package/dist/commands/policy-check.js +0 -76
- package/dist/commands/policy-check.js.map +0 -1
- package/dist/commands/pr.d.ts +0 -17
- package/dist/commands/pr.d.ts.map +0 -1
- package/dist/commands/pr.js +0 -148
- package/dist/commands/pr.js.map +0 -1
- package/dist/commands/ps.d.ts +0 -57
- package/dist/commands/ps.d.ts.map +0 -1
- package/dist/commands/ps.js +0 -202
- package/dist/commands/ps.js.map +0 -1
- package/dist/commands/refresh-helpers.d.ts +0 -25
- package/dist/commands/refresh-helpers.d.ts.map +0 -1
- package/dist/commands/refresh-helpers.js +0 -56
- package/dist/commands/refresh-helpers.js.map +0 -1
- package/dist/commands/refresh.d.ts +0 -23
- package/dist/commands/refresh.d.ts.map +0 -1
- package/dist/commands/refresh.js +0 -237
- package/dist/commands/refresh.js.map +0 -1
- package/dist/commands/rekey.d.ts +0 -84
- package/dist/commands/rekey.d.ts.map +0 -1
- package/dist/commands/rekey.js +0 -209
- package/dist/commands/rekey.js.map +0 -1
- package/dist/commands/repos-list-json.d.ts +0 -58
- package/dist/commands/repos-list-json.d.ts.map +0 -1
- package/dist/commands/repos-list-json.js +0 -45
- package/dist/commands/repos-list-json.js.map +0 -1
- package/dist/commands/repos.d.ts +0 -11
- package/dist/commands/repos.d.ts.map +0 -1
- package/dist/commands/repos.js +0 -102
- package/dist/commands/repos.js.map +0 -1
- package/dist/commands/restart.d.ts +0 -18
- package/dist/commands/restart.d.ts.map +0 -1
- package/dist/commands/restart.js +0 -113
- package/dist/commands/restart.js.map +0 -1
- package/dist/commands/resume.d.ts +0 -63
- package/dist/commands/resume.d.ts.map +0 -1
- package/dist/commands/resume.js +0 -174
- package/dist/commands/resume.js.map +0 -1
- package/dist/commands/runbooks.d.ts +0 -45
- package/dist/commands/runbooks.d.ts.map +0 -1
- package/dist/commands/runbooks.js +0 -313
- package/dist/commands/runbooks.js.map +0 -1
- package/dist/commands/seed.d.ts +0 -27
- package/dist/commands/seed.d.ts.map +0 -1
- package/dist/commands/seed.js +0 -303
- package/dist/commands/seed.js.map +0 -1
- package/dist/commands/services-tls.d.ts +0 -120
- package/dist/commands/services-tls.d.ts.map +0 -1
- package/dist/commands/services-tls.js +0 -489
- package/dist/commands/services-tls.js.map +0 -1
- package/dist/commands/services.d.ts +0 -218
- package/dist/commands/services.d.ts.map +0 -1
- package/dist/commands/services.js +0 -830
- package/dist/commands/services.js.map +0 -1
- package/dist/commands/setup-linux-gate.d.ts +0 -26
- package/dist/commands/setup-linux-gate.d.ts.map +0 -1
- package/dist/commands/setup-linux-gate.js +0 -40
- package/dist/commands/setup-linux-gate.js.map +0 -1
- package/dist/commands/setup-metrics.d.ts +0 -26
- package/dist/commands/setup-metrics.d.ts.map +0 -1
- package/dist/commands/setup-metrics.js +0 -56
- package/dist/commands/setup-metrics.js.map +0 -1
- package/dist/commands/setup-phase-5a-skill-source.d.ts +0 -84
- package/dist/commands/setup-phase-5a-skill-source.d.ts.map +0 -1
- package/dist/commands/setup-phase-5a-skill-source.js +0 -259
- package/dist/commands/setup-phase-5a-skill-source.js.map +0 -1
- package/dist/commands/setup-phase-5b-project-sweep.d.ts +0 -38
- package/dist/commands/setup-phase-5b-project-sweep.d.ts.map +0 -1
- package/dist/commands/setup-phase-5b-project-sweep.js +0 -175
- package/dist/commands/setup-phase-5b-project-sweep.js.map +0 -1
- package/dist/commands/setup-phase-8-kg-hook.d.ts +0 -48
- package/dist/commands/setup-phase-8-kg-hook.d.ts.map +0 -1
- package/dist/commands/setup-phase-8-kg-hook.js +0 -93
- package/dist/commands/setup-phase-8-kg-hook.js.map +0 -1
- package/dist/commands/setup-phase-9-memory-bridge.d.ts +0 -36
- package/dist/commands/setup-phase-9-memory-bridge.d.ts.map +0 -1
- package/dist/commands/setup-phase-9-memory-bridge.js +0 -59
- package/dist/commands/setup-phase-9-memory-bridge.js.map +0 -1
- package/dist/commands/setup.d.ts +0 -231
- package/dist/commands/setup.d.ts.map +0 -1
- package/dist/commands/setup.js +0 -1374
- package/dist/commands/setup.js.map +0 -1
- package/dist/commands/skills-100x.d.ts +0 -34
- package/dist/commands/skills-100x.d.ts.map +0 -1
- package/dist/commands/skills-100x.js +0 -405
- package/dist/commands/skills-100x.js.map +0 -1
- package/dist/commands/skills-doctor.d.ts +0 -14
- package/dist/commands/skills-doctor.d.ts.map +0 -1
- package/dist/commands/skills-doctor.js +0 -126
- package/dist/commands/skills-doctor.js.map +0 -1
- package/dist/commands/skills-hook.d.ts +0 -19
- package/dist/commands/skills-hook.d.ts.map +0 -1
- package/dist/commands/skills-hook.js +0 -99
- package/dist/commands/skills-hook.js.map +0 -1
- package/dist/commands/skills-install-model-router.d.ts +0 -20
- package/dist/commands/skills-install-model-router.d.ts.map +0 -1
- package/dist/commands/skills-install-model-router.js +0 -55
- package/dist/commands/skills-install-model-router.js.map +0 -1
- package/dist/commands/skills-migrate-back.d.ts +0 -21
- package/dist/commands/skills-migrate-back.d.ts.map +0 -1
- package/dist/commands/skills-migrate-back.js +0 -222
- package/dist/commands/skills-migrate-back.js.map +0 -1
- package/dist/commands/skills-migrate-hooks-back.d.ts +0 -19
- package/dist/commands/skills-migrate-hooks-back.d.ts.map +0 -1
- package/dist/commands/skills-migrate-hooks-back.js +0 -83
- package/dist/commands/skills-migrate-hooks-back.js.map +0 -1
- package/dist/commands/skills-migrate-hooks.d.ts +0 -40
- package/dist/commands/skills-migrate-hooks.d.ts.map +0 -1
- package/dist/commands/skills-migrate-hooks.js +0 -178
- package/dist/commands/skills-migrate-hooks.js.map +0 -1
- package/dist/commands/skills-migrate.d.ts +0 -33
- package/dist/commands/skills-migrate.d.ts.map +0 -1
- package/dist/commands/skills-migrate.js +0 -216
- package/dist/commands/skills-migrate.js.map +0 -1
- package/dist/commands/skills-onboard.d.ts +0 -26
- package/dist/commands/skills-onboard.d.ts.map +0 -1
- package/dist/commands/skills-onboard.js +0 -230
- package/dist/commands/skills-onboard.js.map +0 -1
- package/dist/commands/skills-shadow-backups.d.ts +0 -15
- package/dist/commands/skills-shadow-backups.d.ts.map +0 -1
- package/dist/commands/skills-shadow-backups.js +0 -132
- package/dist/commands/skills-shadow-backups.js.map +0 -1
- package/dist/commands/skills-source.d.ts +0 -61
- package/dist/commands/skills-source.d.ts.map +0 -1
- package/dist/commands/skills-source.js +0 -895
- package/dist/commands/skills-source.js.map +0 -1
- package/dist/commands/skills.d.ts +0 -59
- package/dist/commands/skills.d.ts.map +0 -1
- package/dist/commands/skills.js +0 -461
- package/dist/commands/skills.js.map +0 -1
- package/dist/commands/status.d.ts +0 -65
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js +0 -249
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/stop.d.ts +0 -10
- package/dist/commands/stop.d.ts.map +0 -1
- package/dist/commands/stop.js +0 -17
- package/dist/commands/stop.js.map +0 -1
- package/dist/commands/substrate-audit-log.d.ts +0 -51
- package/dist/commands/substrate-audit-log.d.ts.map +0 -1
- package/dist/commands/substrate-audit-log.js +0 -161
- package/dist/commands/substrate-audit-log.js.map +0 -1
- package/dist/commands/substrate.d.ts +0 -87
- package/dist/commands/substrate.d.ts.map +0 -1
- package/dist/commands/substrate.js +0 -194
- package/dist/commands/substrate.js.map +0 -1
- package/dist/commands/update.d.ts +0 -89
- package/dist/commands/update.d.ts.map +0 -1
- package/dist/commands/update.js +0 -331
- package/dist/commands/update.js.map +0 -1
- package/dist/commands/upgrade-history.d.ts +0 -15
- package/dist/commands/upgrade-history.d.ts.map +0 -1
- package/dist/commands/upgrade-history.js +0 -34
- package/dist/commands/upgrade-history.js.map +0 -1
- package/dist/commands/upgrade-lock.d.ts +0 -93
- package/dist/commands/upgrade-lock.d.ts.map +0 -1
- package/dist/commands/upgrade-lock.js +0 -225
- package/dist/commands/upgrade-lock.js.map +0 -1
- package/dist/commands/upgrade-log.d.ts +0 -86
- package/dist/commands/upgrade-log.d.ts.map +0 -1
- package/dist/commands/upgrade-log.js +0 -146
- package/dist/commands/upgrade-log.js.map +0 -1
- package/dist/commands/upgrade.d.ts +0 -445
- package/dist/commands/upgrade.d.ts.map +0 -1
- package/dist/commands/upgrade.js +0 -1718
- package/dist/commands/upgrade.js.map +0 -1
- package/dist/commands/workspace-list-json.d.ts +0 -73
- package/dist/commands/workspace-list-json.d.ts.map +0 -1
- package/dist/commands/workspace-list-json.js +0 -59
- package/dist/commands/workspace-list-json.js.map +0 -1
- package/dist/commands/workspace.d.ts +0 -23
- package/dist/commands/workspace.d.ts.map +0 -1
- package/dist/commands/workspace.js +0 -203
- package/dist/commands/workspace.js.map +0 -1
- package/dist/commands/world-snapshot.d.ts +0 -32
- package/dist/commands/world-snapshot.d.ts.map +0 -1
- package/dist/commands/world-snapshot.js +0 -531
- package/dist/commands/world-snapshot.js.map +0 -1
- package/dist/commands/world-upgrade.d.ts +0 -33
- package/dist/commands/world-upgrade.d.ts.map +0 -1
- package/dist/commands/world-upgrade.js +0 -82
- package/dist/commands/world-upgrade.js.map +0 -1
- package/dist/commands/world.d.ts +0 -12
- package/dist/commands/world.d.ts.map +0 -1
- package/dist/commands/world.js +0 -18
- package/dist/commands/world.js.map +0 -1
- package/dist/commands/worldspec/compile.d.ts +0 -20
- package/dist/commands/worldspec/compile.d.ts.map +0 -1
- package/dist/commands/worldspec/compile.js +0 -130
- package/dist/commands/worldspec/compile.js.map +0 -1
- package/dist/commands/worldspec/index.d.ts +0 -12
- package/dist/commands/worldspec/index.d.ts.map +0 -1
- package/dist/commands/worldspec/index.js +0 -23
- package/dist/commands/worldspec/index.js.map +0 -1
- package/dist/commands/worldspec/init.d.ts +0 -15
- package/dist/commands/worldspec/init.d.ts.map +0 -1
- package/dist/commands/worldspec/init.js +0 -166
- package/dist/commands/worldspec/init.js.map +0 -1
- package/dist/commands/worldspec/schema.d.ts +0 -11
- package/dist/commands/worldspec/schema.d.ts.map +0 -1
- package/dist/commands/worldspec/schema.js +0 -55
- package/dist/commands/worldspec/schema.js.map +0 -1
- package/dist/commands/worldspec/validate.d.ts +0 -15
- package/dist/commands/worldspec/validate.d.ts.map +0 -1
- package/dist/commands/worldspec/validate.js +0 -66
- package/dist/commands/worldspec/validate.js.map +0 -1
- package/dist/commands/yolo.d.ts +0 -95
- package/dist/commands/yolo.d.ts.map +0 -1
- package/dist/commands/yolo.js +0 -377
- package/dist/commands/yolo.js.map +0 -1
- package/dist/context.d.ts +0 -30
- package/dist/context.d.ts.map +0 -1
- package/dist/context.js +0 -56
- package/dist/context.js.map +0 -1
- package/dist/docker-host.d.ts +0 -18
- package/dist/docker-host.d.ts.map +0 -1
- package/dist/docker-host.js +0 -17
- package/dist/docker-host.js.map +0 -1
- package/dist/exit-codes.d.ts +0 -67
- package/dist/exit-codes.d.ts.map +0 -1
- package/dist/exit-codes.js +0 -67
- package/dist/exit-codes.js.map +0 -1
- package/dist/from-manifest.d.ts +0 -53
- package/dist/from-manifest.d.ts.map +0 -1
- package/dist/from-manifest.js +0 -95
- package/dist/from-manifest.js.map +0 -1
- package/dist/image-presence.d.ts +0 -40
- package/dist/image-presence.d.ts.map +0 -1
- package/dist/image-presence.js +0 -39
- package/dist/image-presence.js.map +0 -1
- package/dist/index.d.ts +0 -9
- package/dist/index.d.ts.map +0 -1
- package/dist/install-root.d.ts +0 -74
- package/dist/install-root.d.ts.map +0 -1
- package/dist/install-root.js +0 -98
- package/dist/install-root.js.map +0 -1
- package/dist/lib/anthropic-base-url-file.d.ts +0 -37
- package/dist/lib/anthropic-base-url-file.d.ts.map +0 -1
- package/dist/lib/anthropic-base-url-file.js +0 -46
- package/dist/lib/anthropic-base-url-file.js.map +0 -1
- package/dist/lib/auth-backend.d.ts +0 -168
- package/dist/lib/auth-backend.d.ts.map +0 -1
- package/dist/lib/auth-backend.js +0 -172
- package/dist/lib/auth-backend.js.map +0 -1
- package/dist/lib/auth-list-cache.d.ts +0 -67
- package/dist/lib/auth-list-cache.d.ts.map +0 -1
- package/dist/lib/auth-list-cache.js +0 -84
- package/dist/lib/auth-list-cache.js.map +0 -1
- package/dist/lib/auth-list.d.ts +0 -107
- package/dist/lib/auth-list.d.ts.map +0 -1
- package/dist/lib/auth-list.js +0 -123
- package/dist/lib/auth-list.js.map +0 -1
- package/dist/lib/auth-login.d.ts +0 -92
- package/dist/lib/auth-login.d.ts.map +0 -1
- package/dist/lib/auth-login.js +0 -124
- package/dist/lib/auth-login.js.map +0 -1
- package/dist/lib/auth-mutator-backend.d.ts +0 -54
- package/dist/lib/auth-mutator-backend.d.ts.map +0 -1
- package/dist/lib/auth-mutator-backend.js +0 -62
- package/dist/lib/auth-mutator-backend.js.map +0 -1
- package/dist/lib/auth-refresh-kubernetes.d.ts +0 -65
- package/dist/lib/auth-refresh-kubernetes.d.ts.map +0 -1
- package/dist/lib/auth-refresh-kubernetes.js +0 -125
- package/dist/lib/auth-refresh-kubernetes.js.map +0 -1
- package/dist/lib/auth-remote.d.ts +0 -172
- package/dist/lib/auth-remote.d.ts.map +0 -1
- package/dist/lib/auth-remote.js +0 -394
- package/dist/lib/auth-remote.js.map +0 -1
- package/dist/lib/bootstrap-kubernetes.d.ts +0 -164
- package/dist/lib/bootstrap-kubernetes.d.ts.map +0 -1
- package/dist/lib/bootstrap-kubernetes.js +0 -1002
- package/dist/lib/bootstrap-kubernetes.js.map +0 -1
- package/dist/lib/build-if-stale.d.ts +0 -33
- package/dist/lib/build-if-stale.d.ts.map +0 -1
- package/dist/lib/build-if-stale.js +0 -156
- package/dist/lib/build-if-stale.js.map +0 -1
- package/dist/lib/bundle-freshness.d.ts +0 -57
- package/dist/lib/bundle-freshness.d.ts.map +0 -1
- package/dist/lib/bundle-freshness.js +0 -223
- package/dist/lib/bundle-freshness.js.map +0 -1
- package/dist/lib/bundle-source.d.ts +0 -52
- package/dist/lib/bundle-source.d.ts.map +0 -1
- package/dist/lib/bundle-source.js +0 -83
- package/dist/lib/bundle-source.js.map +0 -1
- package/dist/lib/cf-access-token.d.ts +0 -32
- package/dist/lib/cf-access-token.d.ts.map +0 -1
- package/dist/lib/cf-access-token.js +0 -51
- package/dist/lib/cf-access-token.js.map +0 -1
- package/dist/lib/completion-generator.d.ts +0 -107
- package/dist/lib/completion-generator.d.ts.map +0 -1
- package/dist/lib/completion-generator.js +0 -226
- package/dist/lib/completion-generator.js.map +0 -1
- package/dist/lib/config.d.ts +0 -114
- package/dist/lib/config.d.ts.map +0 -1
- package/dist/lib/config.js +0 -246
- package/dist/lib/config.js.map +0 -1
- package/dist/lib/flywheel-probes.d.ts +0 -58
- package/dist/lib/flywheel-probes.d.ts.map +0 -1
- package/dist/lib/flywheel-probes.js +0 -163
- package/dist/lib/flywheel-probes.js.map +0 -1
- package/dist/lib/health-probes.d.ts +0 -267
- package/dist/lib/health-probes.d.ts.map +0 -1
- package/dist/lib/health-probes.js +0 -933
- package/dist/lib/health-probes.js.map +0 -1
- package/dist/lib/help-groups.d.ts +0 -36
- package/dist/lib/help-groups.d.ts.map +0 -1
- package/dist/lib/help-groups.js +0 -124
- package/dist/lib/help-groups.js.map +0 -1
- package/dist/lib/host-side-proxy.d.ts +0 -67
- package/dist/lib/host-side-proxy.d.ts.map +0 -1
- package/dist/lib/host-side-proxy.js +0 -177
- package/dist/lib/host-side-proxy.js.map +0 -1
- package/dist/lib/instrumentation.d.ts +0 -85
- package/dist/lib/instrumentation.d.ts.map +0 -1
- package/dist/lib/instrumentation.js +0 -104
- package/dist/lib/instrumentation.js.map +0 -1
- package/dist/lib/k8s-bootstrap.d.ts +0 -126
- package/dist/lib/k8s-bootstrap.d.ts.map +0 -1
- package/dist/lib/k8s-bootstrap.js +0 -218
- package/dist/lib/k8s-bootstrap.js.map +0 -1
- package/dist/lib/k8s-context-discovery.d.ts +0 -80
- package/dist/lib/k8s-context-discovery.d.ts.map +0 -1
- package/dist/lib/k8s-context-discovery.js +0 -102
- package/dist/lib/k8s-context-discovery.js.map +0 -1
- package/dist/lib/k8s-secret-render.d.ts +0 -141
- package/dist/lib/k8s-secret-render.d.ts.map +0 -1
- package/dist/lib/k8s-secret-render.js +0 -318
- package/dist/lib/k8s-secret-render.js.map +0 -1
- package/dist/lib/kg-caps.d.ts +0 -19
- package/dist/lib/kg-caps.d.ts.map +0 -1
- package/dist/lib/kg-caps.js +0 -19
- package/dist/lib/kg-caps.js.map +0 -1
- package/dist/lib/kubectl-context.d.ts +0 -87
- package/dist/lib/kubectl-context.d.ts.map +0 -1
- package/dist/lib/kubectl-context.js +0 -105
- package/dist/lib/kubectl-context.js.map +0 -1
- package/dist/lib/kubectl-wrap.d.ts +0 -65
- package/dist/lib/kubectl-wrap.d.ts.map +0 -1
- package/dist/lib/kubectl-wrap.js +0 -135
- package/dist/lib/kubectl-wrap.js.map +0 -1
- package/dist/lib/manifest-refresh.d.ts +0 -136
- package/dist/lib/manifest-refresh.d.ts.map +0 -1
- package/dist/lib/manifest-refresh.js +0 -298
- package/dist/lib/manifest-refresh.js.map +0 -1
- package/dist/lib/memory-host-process-migration.d.ts +0 -56
- package/dist/lib/memory-host-process-migration.d.ts.map +0 -1
- package/dist/lib/memory-host-process-migration.js +0 -156
- package/dist/lib/memory-host-process-migration.js.map +0 -1
- package/dist/lib/memory-secret.d.ts +0 -83
- package/dist/lib/memory-secret.d.ts.map +0 -1
- package/dist/lib/memory-secret.js +0 -147
- package/dist/lib/memory-secret.js.map +0 -1
- package/dist/lib/peripheral-registry.d.ts +0 -53
- package/dist/lib/peripheral-registry.d.ts.map +0 -1
- package/dist/lib/peripheral-registry.js +0 -73
- package/dist/lib/peripheral-registry.js.map +0 -1
- package/dist/lib/plans-client.d.ts +0 -69
- package/dist/lib/plans-client.d.ts.map +0 -1
- package/dist/lib/plans-client.js +0 -140
- package/dist/lib/plans-client.js.map +0 -1
- package/dist/lib/port-forward.d.ts +0 -168
- package/dist/lib/port-forward.d.ts.map +0 -1
- package/dist/lib/port-forward.js +0 -393
- package/dist/lib/port-forward.js.map +0 -1
- package/dist/lib/shell-rc.d.ts +0 -90
- package/dist/lib/shell-rc.d.ts.map +0 -1
- package/dist/lib/shell-rc.js +0 -91
- package/dist/lib/shell-rc.js.map +0 -1
- package/dist/lib/shim-generator.d.ts +0 -51
- package/dist/lib/shim-generator.d.ts.map +0 -1
- package/dist/lib/shim-generator.js +0 -88
- package/dist/lib/shim-generator.js.map +0 -1
- package/dist/lib/skills-apply-overlays.d.ts +0 -35
- package/dist/lib/skills-apply-overlays.d.ts.map +0 -1
- package/dist/lib/skills-apply-overlays.js +0 -243
- package/dist/lib/skills-apply-overlays.js.map +0 -1
- package/dist/lib/symlink-reconcile.d.ts +0 -32
- package/dist/lib/symlink-reconcile.d.ts.map +0 -1
- package/dist/lib/symlink-reconcile.js +0 -80
- package/dist/lib/symlink-reconcile.js.map +0 -1
- package/dist/lib/upgrade-check.d.ts +0 -60
- package/dist/lib/upgrade-check.d.ts.map +0 -1
- package/dist/lib/upgrade-check.js +0 -169
- package/dist/lib/upgrade-check.js.map +0 -1
- package/dist/lib/upgrade-kubernetes.d.ts +0 -193
- package/dist/lib/upgrade-kubernetes.d.ts.map +0 -1
- package/dist/lib/upgrade-kubernetes.js +0 -1014
- package/dist/lib/upgrade-kubernetes.js.map +0 -1
- package/dist/lib/world-mcp-register.d.ts +0 -98
- package/dist/lib/world-mcp-register.d.ts.map +0 -1
- package/dist/lib/world-mcp-register.js +0 -117
- package/dist/lib/world-mcp-register.js.map +0 -1
- package/dist/output.d.ts +0 -10
- package/dist/output.d.ts.map +0 -1
- package/dist/output.js +0 -31
- package/dist/output.js.map +0 -1
- package/dist/pleri-config.d.ts +0 -22
- package/dist/pleri-config.d.ts.map +0 -1
- package/dist/pleri-config.js +0 -42
- package/dist/pleri-config.js.map +0 -1
- package/dist/protocol-version.d.ts +0 -79
- package/dist/protocol-version.d.ts.map +0 -1
- package/dist/protocol-version.js +0 -133
- package/dist/protocol-version.js.map +0 -1
- package/dist/registry-allowlist.d.ts +0 -47
- package/dist/registry-allowlist.d.ts.map +0 -1
- package/dist/registry-allowlist.js +0 -67
- package/dist/registry-allowlist.js.map +0 -1
- package/dist/spawn/home-override.d.ts +0 -82
- package/dist/spawn/home-override.d.ts.map +0 -1
- package/dist/spawn/home-override.js +0 -107
- package/dist/spawn/home-override.js.map +0 -1
- package/host-cp/src/linear-sync.mjs +0 -43
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* question-broker-bridge.ts — the CLIENT-side `canUseTool` seam for the
|
|
3
|
+
* mobile-question-inbox (Phase B). The load-bearing universal interceptor:
|
|
4
|
+
* it sits at the Agent SDK permission boundary, so it covers EVERY runtime
|
|
5
|
+
* tier (stdio/IPC default, CF Sandbox, in-DO HTTPS) transport-agnostically.
|
|
6
|
+
*
|
|
7
|
+
* Flow for an `AskUserQuestion` tool call:
|
|
8
|
+
* 1. POST {tool_use_id, world/session, payload, nonce} to the broker
|
|
9
|
+
* (`POST /v1/questions`, operator bearer). Registration is best-effort
|
|
10
|
+
* (Decision #4: only the ANSWER path fails closed) — a broker error here
|
|
11
|
+
* simply means we fall through to the local picker.
|
|
12
|
+
* 2. AWAIT the operator's answer by polling `GET /v1/questions/:id/answer`
|
|
13
|
+
* until status flips to 'answered', bounded by an AbortSignal timeout
|
|
14
|
+
* (default ~120s, configurable). The SDK already passes an
|
|
15
|
+
* `options.signal` that aborts when the whole query() is cancelled; we
|
|
16
|
+
* compose BOTH signals so a query abort OR our own timeout ends the wait.
|
|
17
|
+
* 3. On a matching answer, return `{ behavior: 'allow', updatedInput:<answer>,
|
|
18
|
+
* toolUseID }` so the SDK applies the operator's chosen answer as the tool
|
|
19
|
+
* input.
|
|
20
|
+
* 4. On timeout / network-fail / broker-down / **toolUseId mismatch**, return
|
|
21
|
+
* a fall-through result that lets the SDK's own AskUserQuestion local
|
|
22
|
+
* picker run. A down broker MUST NEVER hang the session (T3 / Decision #6).
|
|
23
|
+
*
|
|
24
|
+
* SECURITY GATES implemented here:
|
|
25
|
+
*
|
|
26
|
+
* F2 (T8, client half) — the answer is bound end-to-end to the EXACT
|
|
27
|
+
* toolUseId. The await registers under `options.toolUseID`; the broker only
|
|
28
|
+
* ever returns the answer for that exact id (`GET /v1/questions/:id/answer`,
|
|
29
|
+
* broker half). Before resolving the callback we ADDITIONALLY verify the
|
|
30
|
+
* returned `tool_use_id === options.toolUseID` — a defence-in-depth assert
|
|
31
|
+
* that rejects ANY cross-question/cross-session answer delivery. A
|
|
32
|
+
* mismatched id is treated as a non-answer → local-picker fallback (never
|
|
33
|
+
* a silent mis-steer where "delete database" inherits "choose theme").
|
|
34
|
+
*
|
|
35
|
+
* T3 / Decision #6 — a down/slow broker never hangs the session. Every await
|
|
36
|
+
* is AbortSignal-bounded; on ANY failure mode the decision is 'ask'
|
|
37
|
+
* (fall through to the local picker), so the session is never worse off
|
|
38
|
+
* than today.
|
|
39
|
+
*
|
|
40
|
+
* Pure-core / impure-shell split (so F2 + the fallback logic are unit-tested
|
|
41
|
+
* without HTTP or the real SDK):
|
|
42
|
+
* - `decideFromBrokerAnswer()` — pure: maps a broker poll result to a typed
|
|
43
|
+
* `BridgeDecision`. This is where the F2 toolUseId verification lives.
|
|
44
|
+
* - `awaitBrokerAnswer()` — impure: register + poll loop, fetch injected.
|
|
45
|
+
* - `makeAskUserQuestionCanUseTool()` — the SDK-shaped factory that maps a
|
|
46
|
+
* `BridgeDecision` to a real `PermissionResult`.
|
|
47
|
+
*/
|
|
48
|
+
/**
|
|
49
|
+
* Pure: map a broker poll response to a `BridgeDecision`, enforcing F2.
|
|
50
|
+
*
|
|
51
|
+
* The answer is accepted ONLY when:
|
|
52
|
+
* - status === 'answered', AND
|
|
53
|
+
* - the returned tool_use_id === the toolUseId WE submitted (F2 client half),
|
|
54
|
+
* AND
|
|
55
|
+
* - the answer payload is a plain object (usable as `updatedInput`).
|
|
56
|
+
*
|
|
57
|
+
* Any other shape → 'ask' with a precise reason (the caller logs it loud so
|
|
58
|
+
* the inbox can show "fell back to terminal" — never a silent downgrade).
|
|
59
|
+
*
|
|
60
|
+
* A `tool_use_id` that does not match is the cross-question race the gate F2
|
|
61
|
+
* exists to stop: we refuse it and fall through to the local picker rather
|
|
62
|
+
* than apply an answer meant for a different tool call.
|
|
63
|
+
*/
|
|
64
|
+
export function decideFromBrokerAnswer(submittedToolUseId, poll) {
|
|
65
|
+
if (poll.status !== 'answered') {
|
|
66
|
+
return { kind: 'ask', reason: 'not_answered' };
|
|
67
|
+
}
|
|
68
|
+
// F2 — the answer MUST be for the exact tool call we registered. A broker
|
|
69
|
+
// (or a bug, or an attacker who somehow forced a different row) returning a
|
|
70
|
+
// mismatched id is rejected here: never resolve an await for X with an
|
|
71
|
+
// answer minted for Y.
|
|
72
|
+
if (typeof poll.tool_use_id !== 'string' ||
|
|
73
|
+
poll.tool_use_id !== submittedToolUseId) {
|
|
74
|
+
return { kind: 'ask', reason: 'tool_use_id_mismatch' };
|
|
75
|
+
}
|
|
76
|
+
const answer = poll.answer;
|
|
77
|
+
if (answer === null || typeof answer !== 'object' || Array.isArray(answer)) {
|
|
78
|
+
return { kind: 'ask', reason: 'malformed_answer' };
|
|
79
|
+
}
|
|
80
|
+
return { kind: 'allow', answer: answer };
|
|
81
|
+
}
|
|
82
|
+
export const DEFAULT_TIMEOUT_MS = 120_000;
|
|
83
|
+
export const DEFAULT_POLL_INTERVAL_MS = 1_000;
|
|
84
|
+
function defaultSleep(ms, signal) {
|
|
85
|
+
return new Promise((resolve) => {
|
|
86
|
+
if (signal?.aborted) {
|
|
87
|
+
resolve();
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const t = setTimeout(() => {
|
|
91
|
+
signal?.removeEventListener('abort', onAbort);
|
|
92
|
+
resolve();
|
|
93
|
+
}, ms);
|
|
94
|
+
const onAbort = () => {
|
|
95
|
+
clearTimeout(t);
|
|
96
|
+
resolve();
|
|
97
|
+
};
|
|
98
|
+
signal?.addEventListener('abort', onAbort, { once: true });
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
function defaultNonce() {
|
|
102
|
+
// crypto.randomUUID is available in Workers, Node ≥16, and modern browsers.
|
|
103
|
+
// Fall back to a time+random token where it is somehow absent.
|
|
104
|
+
const c = globalThis.crypto;
|
|
105
|
+
if (c?.randomUUID)
|
|
106
|
+
return c.randomUUID();
|
|
107
|
+
return `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
|
|
108
|
+
}
|
|
109
|
+
function defaultOnFallback(info) {
|
|
110
|
+
// LOUD: every local-picker fallback is surfaced (downgrade-oracle defence /
|
|
111
|
+
// T11 spirit). The inbox/observability can key on `question.broker_timeout`.
|
|
112
|
+
// eslint-disable-next-line no-console
|
|
113
|
+
console.error(JSON.stringify({
|
|
114
|
+
event: info.reason === 'timeout'
|
|
115
|
+
? 'question.broker_timeout'
|
|
116
|
+
: 'question.broker_fallback',
|
|
117
|
+
tool_use_id: info.toolUseId,
|
|
118
|
+
reason: info.reason,
|
|
119
|
+
}));
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Register the question, then await the operator's answer (bounded by the
|
|
123
|
+
* AbortSignal/timeout). Returns a `BridgeDecision`.
|
|
124
|
+
*
|
|
125
|
+
* Registration is best-effort: a non-2xx register response does NOT abort the
|
|
126
|
+
* await — we still poll, because another seam (e.g. the cloud observe-tee) may
|
|
127
|
+
* have registered the same toolUseId. But a hard network failure on register
|
|
128
|
+
* with no chance of a row existing short-circuits to 'ask' immediately so we
|
|
129
|
+
* don't burn the full timeout on a guaranteed-empty poll.
|
|
130
|
+
*
|
|
131
|
+
* `signal` (from the SDK's `options.signal`) composes with the internal
|
|
132
|
+
* timeout: whichever fires first ends the await. The session is NEVER hung —
|
|
133
|
+
* the worst case is `timeoutMs` then a local-picker fallback.
|
|
134
|
+
*/
|
|
135
|
+
export async function awaitBrokerAnswer(input, config) {
|
|
136
|
+
const fetchImpl = config.fetchImpl ?? globalThis.fetch;
|
|
137
|
+
const sleep = config.sleepImpl ?? defaultSleep;
|
|
138
|
+
const nonce = (config.nonceImpl ?? defaultNonce)();
|
|
139
|
+
const timeoutMs = config.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
140
|
+
const pollIntervalMs = config.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS;
|
|
141
|
+
const onFallback = config.onFallback ?? defaultOnFallback;
|
|
142
|
+
const base = config.brokerBaseUrl.replace(/\/+$/, '');
|
|
143
|
+
// Compose the SDK abort signal with our own timeout into one controller.
|
|
144
|
+
const timeoutController = new AbortController();
|
|
145
|
+
const composite = timeoutController.signal;
|
|
146
|
+
const timer = setTimeout(() => timeoutController.abort(), timeoutMs);
|
|
147
|
+
const forwardAbort = () => timeoutController.abort();
|
|
148
|
+
if (input.signal) {
|
|
149
|
+
if (input.signal.aborted)
|
|
150
|
+
timeoutController.abort();
|
|
151
|
+
else
|
|
152
|
+
input.signal.addEventListener('abort', forwardAbort, { once: true });
|
|
153
|
+
}
|
|
154
|
+
const finish = (decision) => {
|
|
155
|
+
clearTimeout(timer);
|
|
156
|
+
input.signal?.removeEventListener('abort', forwardAbort);
|
|
157
|
+
if (decision.kind === 'ask') {
|
|
158
|
+
onFallback({ toolUseId: input.toolUseId, reason: decision.reason });
|
|
159
|
+
}
|
|
160
|
+
return decision;
|
|
161
|
+
};
|
|
162
|
+
// ── Step 1: register (best-effort). ──────────────────────────────────────
|
|
163
|
+
try {
|
|
164
|
+
await fetchImpl(`${base}/v1/questions`, {
|
|
165
|
+
method: 'POST',
|
|
166
|
+
headers: {
|
|
167
|
+
'Content-Type': 'application/json',
|
|
168
|
+
Authorization: config.bearer,
|
|
169
|
+
},
|
|
170
|
+
body: JSON.stringify({
|
|
171
|
+
tool_use_id: input.toolUseId,
|
|
172
|
+
world_id: config.worldId,
|
|
173
|
+
session_id: config.sessionId,
|
|
174
|
+
payload: input.payload ?? null,
|
|
175
|
+
nonce,
|
|
176
|
+
}),
|
|
177
|
+
signal: composite,
|
|
178
|
+
});
|
|
179
|
+
// We intentionally do NOT branch on the register status: a 429 (flood) or
|
|
180
|
+
// 403 (not-owned) still leaves us to poll (another seam may own the row),
|
|
181
|
+
// and the poll's own not_found handling drives the eventual fallback.
|
|
182
|
+
}
|
|
183
|
+
catch {
|
|
184
|
+
// Hard network failure on register: the broker is unreachable. Don't burn
|
|
185
|
+
// the timeout — fall through to the local picker now.
|
|
186
|
+
return finish({ kind: 'ask', reason: 'broker_error' });
|
|
187
|
+
}
|
|
188
|
+
// ── Step 2: poll for the answer until answered / aborted / timed-out. ─────
|
|
189
|
+
// world_id scopes the read to the owning world (intra-tenant isolation, F1
|
|
190
|
+
// read half): the broker rejects a poll whose world_id != the one the
|
|
191
|
+
// question was registered under. We registered under config.worldId above.
|
|
192
|
+
const answerUrl = `${base}/v1/questions/${encodeURIComponent(input.toolUseId)}/answer?world_id=${encodeURIComponent(config.worldId)}`;
|
|
193
|
+
// eslint-disable-next-line no-constant-condition
|
|
194
|
+
while (true) {
|
|
195
|
+
if (composite.aborted) {
|
|
196
|
+
// Distinguish our timeout from an external (query) abort for the reason
|
|
197
|
+
// string, but both fall through to the local picker.
|
|
198
|
+
const reason = input.signal?.aborted
|
|
199
|
+
? 'broker_error'
|
|
200
|
+
: 'timeout';
|
|
201
|
+
return finish({ kind: 'ask', reason });
|
|
202
|
+
}
|
|
203
|
+
let poll = null;
|
|
204
|
+
try {
|
|
205
|
+
const res = await fetchImpl(answerUrl, {
|
|
206
|
+
method: 'GET',
|
|
207
|
+
headers: { Authorization: config.bearer },
|
|
208
|
+
signal: composite,
|
|
209
|
+
});
|
|
210
|
+
if (res.ok) {
|
|
211
|
+
poll = (await res.json());
|
|
212
|
+
}
|
|
213
|
+
// Non-2xx (e.g. 404 not-found before another seam registered, or a
|
|
214
|
+
// transient 5xx) → keep polling until the deadline; do NOT give up early.
|
|
215
|
+
}
|
|
216
|
+
catch {
|
|
217
|
+
// Transient fetch error mid-poll → keep trying until the deadline.
|
|
218
|
+
poll = null;
|
|
219
|
+
}
|
|
220
|
+
if (poll !== null) {
|
|
221
|
+
const decision = decideFromBrokerAnswer(input.toolUseId, poll);
|
|
222
|
+
if (decision.kind === 'allow') {
|
|
223
|
+
return finish(decision);
|
|
224
|
+
}
|
|
225
|
+
// A 'tool_use_id_mismatch' is a hard stop — never apply, fall back now.
|
|
226
|
+
if (decision.reason === 'tool_use_id_mismatch') {
|
|
227
|
+
return finish(decision);
|
|
228
|
+
}
|
|
229
|
+
// 'not_answered' / 'malformed_answer' → keep polling (still pending).
|
|
230
|
+
}
|
|
231
|
+
await sleep(pollIntervalMs, composite);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Build the SDK-shaped `canUseTool` callback. It intercepts ONLY
|
|
236
|
+
* `AskUserQuestion`; every other tool falls through unchanged (allow with the
|
|
237
|
+
* original input — the bridge is not a general permission gate, it is the
|
|
238
|
+
* question-answer seam).
|
|
239
|
+
*
|
|
240
|
+
* The returned callback matches the SDK `CanUseTool` shape:
|
|
241
|
+
* (toolName, input, { signal, toolUseID, … }) => Promise<PermissionResult>
|
|
242
|
+
*
|
|
243
|
+
* F2 wiring: the await registers under `options.toolUseID`, and the resolved
|
|
244
|
+
* `PermissionResult.toolUseID` is set to that same id. The SDK matches the
|
|
245
|
+
* result back to the originating tool call by id — so a result built for one
|
|
246
|
+
* toolUseID can never satisfy another.
|
|
247
|
+
*/
|
|
248
|
+
/**
|
|
249
|
+
* Map a stored broker answer onto the Agent SDK's AskUserQuestion result shape.
|
|
250
|
+
*
|
|
251
|
+
* The SDK expects `updatedInput = { questions: <original questions>, answers:
|
|
252
|
+
* { "<question text>": "<selected label or labels>" } }` (clarifying-questions
|
|
253
|
+
* contract). The broker stores the operator's selections as the batch
|
|
254
|
+
* `{ answers: [{ questionId: "q<i>", value: "<label>", index }], toolUseId }`
|
|
255
|
+
* (or a legacy single value). This pure mapper reconciles the two using the
|
|
256
|
+
* original tool `input` (which carries the question text + options).
|
|
257
|
+
*
|
|
258
|
+
* Pure + exported for unit testing.
|
|
259
|
+
*/
|
|
260
|
+
export function buildAskUserQuestionResult(input, brokerAnswer) {
|
|
261
|
+
const questions = Array.isArray(input.questions)
|
|
262
|
+
? (input.questions)
|
|
263
|
+
: [];
|
|
264
|
+
// Normalise the broker answer to a list of { questionId, value, index? } items.
|
|
265
|
+
let items = [];
|
|
266
|
+
if (Array.isArray(brokerAnswer)) {
|
|
267
|
+
items = brokerAnswer;
|
|
268
|
+
}
|
|
269
|
+
else if (brokerAnswer != null &&
|
|
270
|
+
typeof brokerAnswer === 'object' &&
|
|
271
|
+
Array.isArray(brokerAnswer.answers)) {
|
|
272
|
+
items = brokerAnswer.answers;
|
|
273
|
+
}
|
|
274
|
+
const answers = {};
|
|
275
|
+
questions.forEach((q, i) => {
|
|
276
|
+
const qObj = (q ?? {});
|
|
277
|
+
const text = qObj.question != null ? String(qObj.question) : `q${i}`;
|
|
278
|
+
const item = items.find((a) => a && a.questionId === `q${i}`);
|
|
279
|
+
let label;
|
|
280
|
+
if (item && item.value != null) {
|
|
281
|
+
label = String(item.value);
|
|
282
|
+
}
|
|
283
|
+
else if (i === 0 &&
|
|
284
|
+
items.length === 0 &&
|
|
285
|
+
(typeof brokerAnswer === 'string' || typeof brokerAnswer === 'number')) {
|
|
286
|
+
// Legacy single-value answer applies to the first question.
|
|
287
|
+
label = String(brokerAnswer);
|
|
288
|
+
}
|
|
289
|
+
else {
|
|
290
|
+
const opts = Array.isArray(qObj.options) ? qObj.options : [];
|
|
291
|
+
const first = opts[0];
|
|
292
|
+
label =
|
|
293
|
+
typeof first === 'string'
|
|
294
|
+
? first
|
|
295
|
+
: first && first.label != null
|
|
296
|
+
? String(first.label)
|
|
297
|
+
: '';
|
|
298
|
+
}
|
|
299
|
+
answers[text] = label;
|
|
300
|
+
});
|
|
301
|
+
return { questions, answers };
|
|
302
|
+
}
|
|
303
|
+
export function makeAskUserQuestionCanUseTool(config, deps = {}) {
|
|
304
|
+
const awaitImpl = deps.awaitImpl ?? awaitBrokerAnswer;
|
|
305
|
+
return async (toolName, input, options) => {
|
|
306
|
+
// Only intercept AskUserQuestion; let everything else proceed untouched.
|
|
307
|
+
if (toolName !== 'AskUserQuestion') {
|
|
308
|
+
return { behavior: 'allow', toolUseID: options.toolUseID };
|
|
309
|
+
}
|
|
310
|
+
const decision = await awaitImpl({
|
|
311
|
+
toolUseId: options.toolUseID,
|
|
312
|
+
payload: input,
|
|
313
|
+
signal: options.signal,
|
|
314
|
+
}, config);
|
|
315
|
+
if (decision.kind === 'allow') {
|
|
316
|
+
// Build the EXACT shape the Agent SDK applies for AskUserQuestion:
|
|
317
|
+
// { questions: <original questions>, answers: { "<question text>": "<label>" } }
|
|
318
|
+
// (per the SDK clarifying-questions contract). The broker stores the
|
|
319
|
+
// operator's selections as a batch ({answers:[{questionId,value,index}]});
|
|
320
|
+
// map each back onto its question text using the original `input`. Without
|
|
321
|
+
// this transform the model can't apply the answer and the session stalls.
|
|
322
|
+
// toolUseID is echoed so the SDK binds the result to the originating call.
|
|
323
|
+
return {
|
|
324
|
+
behavior: 'allow',
|
|
325
|
+
updatedInput: buildAskUserQuestionResult(input, decision.answer),
|
|
326
|
+
toolUseID: options.toolUseID,
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
// Fall through to the local picker: allow WITHOUT updatedInput ⇒ the SDK
|
|
330
|
+
// runs AskUserQuestion's own interactive prompt. A down broker never hangs
|
|
331
|
+
// the session (T3 / Decision #6).
|
|
332
|
+
return { behavior: 'allow', toolUseID: options.toolUseID };
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
//# sourceMappingURL=question-broker-bridge.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* sdk-env-merge.demo.ts — value-signal demo for the 0.3.149 env foot-gun.
|
|
3
|
+
*
|
|
4
|
+
* Run: npx tsx packages/intelligence/src/agent-stream/sdk-env-merge.demo.ts
|
|
5
|
+
* (or `node --import tsx ...`). Prints a before/after showing how many
|
|
6
|
+
* load-bearing keys a naive bare-literal `Options.env` would strip vs. the
|
|
7
|
+
* safe merge helper.
|
|
8
|
+
*/
|
|
9
|
+
import { mergeSubprocessEnv, findStrippedEnvKeys, OLAM_LOAD_BEARING_SUBPROCESS_ENV, } from './sdk-env-merge';
|
|
10
|
+
// A realistic supervisor env an olam Claude Code subprocess inherits.
|
|
11
|
+
const inherited = {
|
|
12
|
+
PATH: '/usr/local/bin:/usr/bin',
|
|
13
|
+
HOME: '/root',
|
|
14
|
+
ANTHROPIC_BASE_URL: 'http://127.0.0.1:8787',
|
|
15
|
+
HOST_CP_URL: 'http://host.docker.internal:3112',
|
|
16
|
+
HOST_CP_BEARER: 'redacted',
|
|
17
|
+
AGENT_DRIVER_TOOLS_ENABLED: '1',
|
|
18
|
+
};
|
|
19
|
+
// The mistake: inject ONE var as a bare Options.env literal.
|
|
20
|
+
const naive = { OLAM_QUESTION_BROKER_URL: 'https://broker' };
|
|
21
|
+
const naiveStripped = findStrippedEnvKeys(naive, OLAM_LOAD_BEARING_SUBPROCESS_ENV, inherited);
|
|
22
|
+
// The fix: merge on top of the inherited env.
|
|
23
|
+
const safe = mergeSubprocessEnv(naive, inherited);
|
|
24
|
+
const safeStripped = findStrippedEnvKeys(safe, OLAM_LOAD_BEARING_SUBPROCESS_ENV, inherited);
|
|
25
|
+
/* eslint-disable no-console */
|
|
26
|
+
console.log('SDK 0.3.149 Options.env = REPLACE (not merge). Value signal:');
|
|
27
|
+
console.log(` inherited load-bearing keys present: ${OLAM_LOAD_BEARING_SUBPROCESS_ENV.filter((k) => typeof inherited[k] === 'string').length}`);
|
|
28
|
+
console.log(` bare-literal env keys: ${Object.keys(naive).length}`);
|
|
29
|
+
console.log(` -> bare literal STRIPS ${naiveStripped.length} load-bearing keys: ${naiveStripped.join(', ')}`);
|
|
30
|
+
console.log(` -> mergeSubprocessEnv STRIPS ${safeStripped.length} keys (env size ${Object.keys(safe).length})`);
|
|
31
|
+
console.log(naiveStripped.length > 0 && safeStripped.length === 0
|
|
32
|
+
? 'PASS: helper prevents the silent env-wipe.'
|
|
33
|
+
: 'FAIL: unexpected result.');
|
|
34
|
+
/* eslint-enable no-console */
|
|
35
|
+
//# sourceMappingURL=sdk-env-merge.demo.js.map
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* sdk-env-merge.ts — SDK 0.3.149 `Options.env` replace-not-merge guard.
|
|
3
|
+
*
|
|
4
|
+
* Finding (claude-agent-sdk-typescript CHANGELOG 0.3.149, late May 2026):
|
|
5
|
+
*
|
|
6
|
+
* "Clarified that `Options.env` REPLACES the subprocess environment rather
|
|
7
|
+
* than merging with `process.env`."
|
|
8
|
+
*
|
|
9
|
+
* This is a silent foot-gun. Olam's SDK launch options (`buildSdkOptions` in
|
|
10
|
+
* driver-runner.ts, `buildAskQueryOptions` in cli/src/ask/sdk-client.ts)
|
|
11
|
+
* deliberately set NO `env` field — they rely on the spawned Claude Code
|
|
12
|
+
* subprocess inheriting the supervisor's `process.env` (PATH, HOME,
|
|
13
|
+
* ANTHROPIC_BASE_URL, HOST_CP_URL/BEARER, AGENT_DRIVER_TOOLS_ENABLED, the
|
|
14
|
+
* vault-routing vars, etc.). See the comment at driver-runner.ts:159-161.
|
|
15
|
+
*
|
|
16
|
+
* If a future change ever sets `options.env = { ONE_VAR: 'x' }` to inject a
|
|
17
|
+
* single variable, the SDK would WIPE the entire inherited environment —
|
|
18
|
+
* breaking `withCredential` routing, the chunk-poster URL, the bearer auth,
|
|
19
|
+
* and the tools escape-hatch all at once, with no error (the subprocess just
|
|
20
|
+
* boots with an empty env and fails downstream in confusing ways).
|
|
21
|
+
*
|
|
22
|
+
* This module provides the SAFE way to inject env into SDK Options: always
|
|
23
|
+
* MERGE on top of `process.env`. Pair it with the audit guard in
|
|
24
|
+
* `sdk-env-merge.audit.test.ts`, which fails red if any olam Options builder
|
|
25
|
+
* sets `env` to a non-merged literal.
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* Build a subprocess environment for `Options.env` that MERGES the given
|
|
29
|
+
* overrides on top of the inherited base env (default `process.env`).
|
|
30
|
+
*
|
|
31
|
+
* Because SDK 0.3.149+ treats `Options.env` as a full REPLACEMENT, you must
|
|
32
|
+
* never pass a bare `{ MY_VAR: 'x' }` literal — that strips PATH/HOME/auth.
|
|
33
|
+
* This helper guarantees the inherited env survives.
|
|
34
|
+
*
|
|
35
|
+
* `undefined` values in `base` (the natural shape of `process.env`) are
|
|
36
|
+
* dropped, so the result is a clean `Record<string, string>` the SDK accepts.
|
|
37
|
+
* Overrides win over base on key collision (immutable — a fresh object is
|
|
38
|
+
* returned; neither input is mutated).
|
|
39
|
+
*
|
|
40
|
+
* @param overrides Variables to set/replace on top of the inherited env.
|
|
41
|
+
* @param base Inherited env to merge onto. Defaults to `process.env`.
|
|
42
|
+
*/
|
|
43
|
+
export function mergeSubprocessEnv(overrides, base = process.env) {
|
|
44
|
+
const merged = {};
|
|
45
|
+
for (const [k, v] of Object.entries(base)) {
|
|
46
|
+
if (typeof v === 'string')
|
|
47
|
+
merged[k] = v;
|
|
48
|
+
}
|
|
49
|
+
for (const [k, v] of Object.entries(overrides)) {
|
|
50
|
+
merged[k] = v;
|
|
51
|
+
}
|
|
52
|
+
return merged;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Assert that an SDK Options object's `env` field (if present) is a SAFE
|
|
56
|
+
* merge — i.e. it preserves the load-bearing inherited keys rather than being
|
|
57
|
+
* a bare replacement literal. Returns the list of MISSING load-bearing keys
|
|
58
|
+
* (empty = safe). Use in tests/guards; do not throw from hot paths.
|
|
59
|
+
*
|
|
60
|
+
* "Safe" here is intentionally conservative: if `env` is absent, the
|
|
61
|
+
* subprocess inherits everything → always safe (returns `[]`). If `env` is
|
|
62
|
+
* present, every key in `requiredKeys` that exists in the inherited base env
|
|
63
|
+
* MUST also appear in `env`, or it is flagged.
|
|
64
|
+
*
|
|
65
|
+
* @param env The `Options.env` value (or undefined if unset).
|
|
66
|
+
* @param requiredKeys Inherited keys that MUST survive into the subprocess.
|
|
67
|
+
* @param base Inherited env to check against. Defaults to `process.env`.
|
|
68
|
+
*/
|
|
69
|
+
export function findStrippedEnvKeys(env, requiredKeys, base = process.env) {
|
|
70
|
+
if (env === undefined)
|
|
71
|
+
return []; // inherit-all → safe
|
|
72
|
+
const missing = [];
|
|
73
|
+
for (const key of requiredKeys) {
|
|
74
|
+
const inheritedHasIt = typeof base[key] === 'string';
|
|
75
|
+
if (inheritedHasIt && !(key in env))
|
|
76
|
+
missing.push(key);
|
|
77
|
+
}
|
|
78
|
+
return missing;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* The load-bearing env keys an olam Claude Code subprocess depends on. If any
|
|
82
|
+
* of these is silently stripped by a bare `Options.env` replacement, the
|
|
83
|
+
* subprocess breaks in a confusing, non-erroring way. Used by the audit guard.
|
|
84
|
+
*/
|
|
85
|
+
export const OLAM_LOAD_BEARING_SUBPROCESS_ENV = [
|
|
86
|
+
'PATH',
|
|
87
|
+
'HOME',
|
|
88
|
+
// Auth / vault routing (see root CLAUDE.md "Outbound Claude API calls").
|
|
89
|
+
'ANTHROPIC_BASE_URL',
|
|
90
|
+
'ANTHROPIC_API_KEY',
|
|
91
|
+
'OLAM_ANTHROPIC_BASE_URL',
|
|
92
|
+
// Host control-plane wiring read by driver-runner.ts main().
|
|
93
|
+
'HOST_CP_URL',
|
|
94
|
+
'HOST_CP_BEARER',
|
|
95
|
+
// Tools escape-hatch read from the child process (driver-runner.ts:173).
|
|
96
|
+
'AGENT_DRIVER_TOOLS_ENABLED',
|
|
97
|
+
];
|
|
98
|
+
//# sourceMappingURL=sdk-env-merge.js.map
|
package/dist/image-digests.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"auth": "sha256:
|
|
3
|
-
"devbox": "sha256:
|
|
4
|
-
"devbox-base": "sha256:
|
|
5
|
-
"host-cp": "sha256:
|
|
6
|
-
"kg-service": "sha256:
|
|
7
|
-
"memory-service": "sha256:
|
|
8
|
-
"mcp-auth": "sha256:
|
|
2
|
+
"auth": "sha256:06c9cd39405e650141a78927f1701bf7b06a86cd98eeaef9b22eb53d46f6f523",
|
|
3
|
+
"devbox": "sha256:467e0da5ce48ce281c9799f52b2efabc2eba2228e4ab807412523bdb00a52917",
|
|
4
|
+
"devbox-base": "sha256:4fd8d2797b6126778c034e442a8429cbbc2e90f772ff11061bcb317d735d9293",
|
|
5
|
+
"host-cp": "sha256:501037587e33d0a1c13df88d72ad9b855508e4c0163cb65673211cd3ddd9227b",
|
|
6
|
+
"kg-service": "sha256:a739f0fdf60aef0d26b51314698a07bba423c3d43571616cffd7b1195abb205d",
|
|
7
|
+
"memory-service": "sha256:b10649ba9b56bb11b99e5142559d4b8a37a2b8ae2ad8ce38fb8b535449d26f85",
|
|
8
|
+
"mcp-auth": "sha256:cdeb8813619f0198dbbcc80b2c98dbeb3a842e8d1ec38796d459ad254c5e1d98",
|
|
9
9
|
"$schema_version": 1,
|
|
10
|
-
"$published_version": "0.1.
|
|
10
|
+
"$published_version": "0.1.205",
|
|
11
11
|
"$registry": "ghcr.io/pleri"
|
|
12
12
|
}
|