@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
package/dist/commands/create.js
DELETED
|
@@ -1,775 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* olam create — Provision a new isolated development world.
|
|
3
|
-
*
|
|
4
|
-
* Delegates to WorldManager.createWorld, same as the MCP server tool.
|
|
5
|
-
*/
|
|
6
|
-
import { spawnSync } from 'node:child_process';
|
|
7
|
-
import { existsSync } from 'node:fs';
|
|
8
|
-
import { dirname, resolve } from 'node:path';
|
|
9
|
-
import ora from 'ora';
|
|
10
|
-
import pc from 'picocolors';
|
|
11
|
-
import { AuthPreflightError, TaskDispatchError, ContainerOrphanError, } from '@olam/core/src/world/manager.js';
|
|
12
|
-
import { getDevboxFreshness, formatFreshnessWarning, } from '@olam/core/src/world/devbox-freshness.js';
|
|
13
|
-
import { inferRepos, PICKER_CONFIDENCE_THRESHOLD, } from '@olam/core/src/world/infer-repos.js';
|
|
14
|
-
import { decideWorkspaceMatch, } from '@olam/core/src/world/match-workspace.js';
|
|
15
|
-
import { loadContext } from '../context.js';
|
|
16
|
-
import { printError, printInfo, printHeader, printWarning } from '../output.js';
|
|
17
|
-
import { probeHostCp, gatherProbeFailureDiagnostics, callHostCpProxy, openHostCpUrl } from './host-cp.js';
|
|
18
|
-
import { readMemorySecretOrNull } from '../lib/memory-secret.js';
|
|
19
|
-
import { registerAgentMemoryMcp } from '../lib/world-mcp-register.js';
|
|
20
|
-
import { buildIfStale } from '../lib/build-if-stale.js';
|
|
21
|
-
import { resolveBundleSource, BundleSourceNotFoundError } from '../lib/bundle-source.js';
|
|
22
|
-
import { isDevMode } from '../install-root.js';
|
|
23
|
-
// Phase B1 — mirror of AGENTMEMORY_HOST_INTERNAL_URL in
|
|
24
|
-
// packages/adapters/src/docker/container.ts. Hardcoded here for the
|
|
25
|
-
// post-spawn MCP registration call so the host knows what URL was
|
|
26
|
-
// injected into the world's env. Phase C makes this configurable for
|
|
27
|
-
// cloud mode.
|
|
28
|
-
const AGENTMEMORY_LOCAL_URL = 'http://host.docker.internal:3111';
|
|
29
|
-
const HOST_CP_URL = 'http://127.0.0.1:19000';
|
|
30
|
-
/** Read the host-cp token from ~/.olam/host-cp.token for use in create. */
|
|
31
|
-
async function readHostCpTokenForCreate() {
|
|
32
|
-
try {
|
|
33
|
-
const { default: fs } = await import('node:fs');
|
|
34
|
-
const { default: os } = await import('node:os');
|
|
35
|
-
const { default: path } = await import('node:path');
|
|
36
|
-
const tp = path.join(process.env.OLAM_HOME ?? path.join(os.homedir(), '.olam'), 'host-cp.token');
|
|
37
|
-
if (!fs.existsSync(tp))
|
|
38
|
-
return null;
|
|
39
|
-
return fs.readFileSync(tp, 'utf-8').trim();
|
|
40
|
-
}
|
|
41
|
-
catch {
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
export function registerCreate(program) {
|
|
46
|
-
program
|
|
47
|
-
.command('create')
|
|
48
|
-
.description('Create a new development world')
|
|
49
|
-
.option('--name <name>', 'World name (required unless --from-prompt is set; auto-derived in that case)')
|
|
50
|
-
.option('--repos <repos...>', 'Repos to include (names from .olam/config.yaml; wins over --workspace)')
|
|
51
|
-
.option('--workspace <name>', 'Named workspace from the host catalog (~/.olam/workspaces/<name>.yaml)')
|
|
52
|
-
.option('--task <task>', 'Initial task to dispatch')
|
|
53
|
-
.option('--branch <branch>', 'Override default branch name')
|
|
54
|
-
.option('--plan <file>', 'Path to a plan file to inject')
|
|
55
|
-
.option('--no-auth', 'Skip auto-injecting host credentials')
|
|
56
|
-
// Phase F-2-D (D4): host CP integration. Default: emit a one-line
|
|
57
|
-
// hint if host CP is not running. --no-host-cp suppresses the hint
|
|
58
|
-
// entirely. Real auto-start ships in a future iteration; for now
|
|
59
|
-
// the hint keeps the operator's existing workflow unblocked while
|
|
60
|
-
// surfacing the host CP UI option.
|
|
61
|
-
.option('--no-host-cp', 'Suppress the host CP "you might want to start it" hint')
|
|
62
|
-
// Phase C9 (olam-dogfood-vision): opt-in flag spawns a parallel
|
|
63
|
-
// claude-lane-codex-review session alongside claude-main, prompted
|
|
64
|
-
// to monitor + critique main's work. Lives on the same world; sees
|
|
65
|
-
// the same workspace + thoughts. Auto-spawned at world creation
|
|
66
|
-
// time; the operator can destroy it via `olam lanes destroy <world>
|
|
67
|
-
// codex-review` if it gets noisy.
|
|
68
|
-
.option('--auto-codex-review', 'Spawn a parallel codex-review lane that critiques main as it works')
|
|
69
|
-
// Phase D6 (olam-dogfood-vision): open Host CP UI in browser on
|
|
70
|
-
// successful create. Default-on for interactive sessions; suppress
|
|
71
|
-
// with --no-open. Headless / CI / piped-output runs auto-skip.
|
|
72
|
-
.option('--no-open', 'Suppress auto-opening the Host CP UI in the browser on success')
|
|
73
|
-
// M5 dogfood follow-up (B1): when the devbox image is older than
|
|
74
|
-
// the source files baked into it, fresh worlds run stale code.
|
|
75
|
-
// --rebuild-base auto-invokes the build script; --no-freshness-check
|
|
76
|
-
// skips the warning entirely (CI/automation).
|
|
77
|
-
.option('--rebuild-base', 'Rebuild olam-devbox:latest before creating (slow)')
|
|
78
|
-
.option('--no-freshness-check', 'Skip the devbox image freshness check')
|
|
79
|
-
// CLI parity for the MCP `olam_create_from_prompt` tool. The prompt
|
|
80
|
-
// is dispatched as the world's task AND drives the workspace
|
|
81
|
-
// inference (same heuristic the MCP tool uses). When passed:
|
|
82
|
-
// - --name is auto-derived from the prompt (slugified, capped at 40 chars)
|
|
83
|
-
// - --workspace + --repos are inferred against the host-cp catalog
|
|
84
|
-
// - On low-confidence inference or N-way ambiguity, the CLI prints
|
|
85
|
-
// the picker payload and exits 1 so the operator can re-run with
|
|
86
|
-
// an explicit --workspace / --repos.
|
|
87
|
-
// Mutually exclusive with --task (the prompt IS the task) and
|
|
88
|
-
// overrides --name. --workspace/--repos still win if explicitly set.
|
|
89
|
-
.option('--from-prompt <prompt>', 'NL prompt → infer workspace + dispatch (CLI parity for olam_create_from_prompt MCP tool)')
|
|
90
|
-
// ADR 044 — trace-replay v2. Seed a new world from a v1 fork manifest
|
|
91
|
-
// (`scripts/olam-trace-replay.mjs`). The manifest's `newPrompt` becomes
|
|
92
|
-
// the world's task; `--name` is auto-derived from the original worldId
|
|
93
|
-
// when not set. Mutually exclusive with --task and --from-prompt (the
|
|
94
|
-
// manifest IS the source of the task). --workspace / --repos still must
|
|
95
|
-
// be specified by the operator — v1 manifests do not capture them.
|
|
96
|
-
.option('--from-manifest <path>', 'Spawn a world from a trace-replay fork manifest (ADR 044)')
|
|
97
|
-
.option('--keep-after-merge', "Disable auto-destroy when the world's PR merges (useful for inspection/debugging)")
|
|
98
|
-
// Phase B B3 (olam-session-stability): opt out of B1's strip step
|
|
99
|
-
// so the operator's in-progress edits make it into the world's
|
|
100
|
-
// worktree. Default OFF: world starts with a clean tree (the
|
|
101
|
-
// baseline-diff snapshot still runs so the reaper can scope claude's
|
|
102
|
-
// footprint). Use this when you've explicitly staged or modified
|
|
103
|
-
// files in your local checkout and want claude to continue from
|
|
104
|
-
// there.
|
|
105
|
-
.option('--carry-uncommitted', "Preserve operator's uncommitted edits in the world's worktree")
|
|
106
|
-
.option('--allow-bootstrap-failure', 'Treat bootstrap step failures as warnings instead of destroying the world (dogfood escape hatch for cross-repo seed coupling)')
|
|
107
|
-
// C4 (Phase C — fresh-install self-bootstrap): operator override of
|
|
108
|
-
// the default devbox image. `OLAM_DEVBOX_IMAGE=<ref>` env var is the
|
|
109
|
-
// alternate input path. Refs outside the default allowlist
|
|
110
|
-
// (ghcr.io/pleri/*) require --allow-custom-registry per Decision #19.
|
|
111
|
-
// Full digest-pinned-pull integration with image-digests.json
|
|
112
|
-
// arrives in Phase B; this flag pair locks the surface now and
|
|
113
|
-
// validates input early.
|
|
114
|
-
.option('--devbox-image <ref>', 'Override the default devbox image (full registry/name:tag or @sha256: ref)')
|
|
115
|
-
.option('--allow-custom-registry', 'Allow --devbox-image refs outside ghcr.io/pleri/* (logs a warning)')
|
|
116
|
-
.option('--runbook <name>', 'Named runbook profile from ~/.olam/config.json')
|
|
117
|
-
// ADR 045 — multi-account Claude Code instance isolation. When set, the
|
|
118
|
-
// world's Claude config snapshot is sourced from
|
|
119
|
-
// `~/.olam/claude-homes/<id>/` instead of the operator's `~/.claude/`.
|
|
120
|
-
// Each id gets its own login, hooks, MCP topology, and 429 bucket. The
|
|
121
|
-
// id is persisted to world metadata so subsequent `olam enter <id>` uses
|
|
122
|
-
// the same home. Absolute paths are accepted verbatim.
|
|
123
|
-
.option('--claude-home <id-or-path>', 'Use a per-world Claude Code HOME (multi-account isolation; see docs/decisions/045-claude-home-override.md)')
|
|
124
|
-
// --json: emit machine-readable output (suppresses dashboard/enter hints).
|
|
125
|
-
// The handler branches on opts.json at the success-print step.
|
|
126
|
-
.option('--json', 'Emit machine-readable JSON on success (suppresses interactive hints)')
|
|
127
|
-
.action(async (opts) => {
|
|
128
|
-
// C4 — early validation of the devbox-image override (if any).
|
|
129
|
-
// Runs BEFORE any docker / world-provisioning work so a rejected
|
|
130
|
-
// ref never produces partial state.
|
|
131
|
-
const { resolveDevboxImageOverride, decideAllowlist } = await import('../registry-allowlist.js');
|
|
132
|
-
const overrideRef = resolveDevboxImageOverride(opts.devboxImage);
|
|
133
|
-
if (overrideRef) {
|
|
134
|
-
const decision = decideAllowlist({
|
|
135
|
-
imageRef: overrideRef,
|
|
136
|
-
allowCustomRegistry: opts.allowCustomRegistry === true,
|
|
137
|
-
});
|
|
138
|
-
if (!decision.accepted) {
|
|
139
|
-
process.stderr.write(decision.stderrLine + '\n');
|
|
140
|
-
process.exitCode = 1;
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
if (decision.stderrLine) {
|
|
144
|
-
process.stderr.write(decision.stderrLine + '\n');
|
|
145
|
-
}
|
|
146
|
-
// C4b — protocol-version handshake on the override. Bootstrap
|
|
147
|
-
// already enforces this for the 3 default images; user-supplied
|
|
148
|
-
// overrides must satisfy the same contract or `olam create`
|
|
149
|
-
// would happily spin a container that's incompatible with the
|
|
150
|
-
// rest of the stack.
|
|
151
|
-
//
|
|
152
|
-
// Best-effort pull first (tolerate failure for locally-built
|
|
153
|
-
// images that aren't in any registry). Then inspect the LABEL.
|
|
154
|
-
// Failed inspect or no-overlap → exit EXIT_PROTOCOL_MISMATCH.
|
|
155
|
-
spawnSync('docker', ['pull', overrideRef], { stdio: 'pipe' }); // ignore errors
|
|
156
|
-
const { inspectImageProtocolVersions, checkProtocolOverlap } = await import('../protocol-version.js');
|
|
157
|
-
const inspect = inspectImageProtocolVersions(overrideRef);
|
|
158
|
-
if (inspect.inspectFailed) {
|
|
159
|
-
printError(`Devbox image '${overrideRef}' is not present locally and could not be pulled. ` +
|
|
160
|
-
`Run \`docker pull ${overrideRef}\` to verify the ref, then re-run.`);
|
|
161
|
-
const { EXIT_PROTOCOL_MISMATCH } = await import('../exit-codes.js');
|
|
162
|
-
process.exitCode = EXIT_PROTOCOL_MISMATCH;
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
165
|
-
const handshake = checkProtocolOverlap(inspect.versions);
|
|
166
|
-
if (!handshake.compatible) {
|
|
167
|
-
printError(handshake.remedy);
|
|
168
|
-
const { EXIT_PROTOCOL_MISMATCH } = await import('../exit-codes.js');
|
|
169
|
-
process.exitCode = EXIT_PROTOCOL_MISMATCH;
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
// CLI parity for the MCP tool: when --from-prompt is set, treat
|
|
174
|
-
// it as the world's task AND use it to infer workspace + repos.
|
|
175
|
-
// Mutually exclusive with --task; explicit --workspace / --repos
|
|
176
|
-
// still win (operator override).
|
|
177
|
-
let resolvedName = opts.name;
|
|
178
|
-
let resolvedWorkspace = opts.workspace;
|
|
179
|
-
let resolvedRepos = opts.repos;
|
|
180
|
-
let resolvedTask = opts.task;
|
|
181
|
-
// ADR 044 — trace-replay v2. Seed task + default name from the
|
|
182
|
-
// fork manifest before --from-prompt inference so the two surfaces
|
|
183
|
-
// stay mutually exclusive and the manifest path is honored even
|
|
184
|
-
// when --task is also passed (we reject the combination explicitly).
|
|
185
|
-
if (opts.fromManifest) {
|
|
186
|
-
if (opts.task) {
|
|
187
|
-
printError('--from-manifest and --task are mutually exclusive (the manifest carries the task).');
|
|
188
|
-
process.exitCode = 1;
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
if (opts.fromPrompt) {
|
|
192
|
-
printError('--from-manifest and --from-prompt are mutually exclusive.');
|
|
193
|
-
process.exitCode = 1;
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
|
-
const { parseForkManifest, defaultNameFromManifest, provenanceLine } = await import('../from-manifest.js');
|
|
197
|
-
let manifest;
|
|
198
|
-
try {
|
|
199
|
-
manifest = parseForkManifest(opts.fromManifest);
|
|
200
|
-
}
|
|
201
|
-
catch (err) {
|
|
202
|
-
printError(err.message);
|
|
203
|
-
process.exitCode = 1;
|
|
204
|
-
return;
|
|
205
|
-
}
|
|
206
|
-
resolvedTask = manifest.newPrompt;
|
|
207
|
-
if (!resolvedName) {
|
|
208
|
-
resolvedName = defaultNameFromManifest(manifest);
|
|
209
|
-
}
|
|
210
|
-
printInfo('Replay', provenanceLine(manifest));
|
|
211
|
-
}
|
|
212
|
-
if (opts.fromPrompt) {
|
|
213
|
-
if (opts.task) {
|
|
214
|
-
printError('--from-prompt and --task are mutually exclusive (the prompt IS the task).');
|
|
215
|
-
process.exitCode = 1;
|
|
216
|
-
return;
|
|
217
|
-
}
|
|
218
|
-
resolvedTask = opts.fromPrompt;
|
|
219
|
-
if (!resolvedName) {
|
|
220
|
-
resolvedName = defaultNameFromPrompt(opts.fromPrompt);
|
|
221
|
-
}
|
|
222
|
-
// Infer when caller didn't already pin workspace + repos.
|
|
223
|
-
if (!resolvedWorkspace && !resolvedRepos) {
|
|
224
|
-
const inferenceSpinner = ora('Inferring workspace from prompt…').start();
|
|
225
|
-
try {
|
|
226
|
-
const catalog = await fetchHostCpWorkspaces();
|
|
227
|
-
const catalogRepos = Array.from(new Set(catalog.flatMap((w) => w.projects)));
|
|
228
|
-
const inferred = inferRepos({
|
|
229
|
-
prompt: opts.fromPrompt,
|
|
230
|
-
catalog: catalogRepos,
|
|
231
|
-
});
|
|
232
|
-
if (!inferred.proceed) {
|
|
233
|
-
inferenceSpinner.fail('Inference confidence too low');
|
|
234
|
-
const reason = inferred.repos.length === 0
|
|
235
|
-
? 'no repo names extracted from prompt'
|
|
236
|
-
: `inference confidence ${inferred.confidence.toFixed(2)} below ${PICKER_CONFIDENCE_THRESHOLD}`;
|
|
237
|
-
printError(`Picker needed: ${reason}`);
|
|
238
|
-
if (catalogRepos.length > 0) {
|
|
239
|
-
console.log(pc.dim(` available repos: ${catalogRepos.join(', ')}`));
|
|
240
|
-
}
|
|
241
|
-
console.log(pc.dim(' rerun with explicit --workspace <name> or --repos <a> <b> <c>'));
|
|
242
|
-
process.exitCode = 1;
|
|
243
|
-
return;
|
|
244
|
-
}
|
|
245
|
-
const exactMatches = await fetchHostCpExactMatches(inferred.repos);
|
|
246
|
-
const decision = decideWorkspaceMatch({
|
|
247
|
-
inferredRepos: inferred.repos,
|
|
248
|
-
exactMatches,
|
|
249
|
-
fullCatalog: catalog,
|
|
250
|
-
});
|
|
251
|
-
if (decision.result === 'exact-1') {
|
|
252
|
-
resolvedWorkspace = decision.workspace.name;
|
|
253
|
-
}
|
|
254
|
-
else if (decision.result === 'subset-1') {
|
|
255
|
-
resolvedWorkspace = decision.workspace.name;
|
|
256
|
-
}
|
|
257
|
-
else if (decision.result === 'exact-N' || decision.result === 'subset-N') {
|
|
258
|
-
inferenceSpinner.fail(`Multiple workspaces match (${decision.result})`);
|
|
259
|
-
const cands = decision.result === 'exact-N'
|
|
260
|
-
? decision.candidates.map((w) => w.name)
|
|
261
|
-
: decision.candidates.map((c) => c.workspace.name);
|
|
262
|
-
printError(`Picker needed: ${cands.join(', ')}`);
|
|
263
|
-
console.log(pc.dim(' rerun with explicit --workspace <name>'));
|
|
264
|
-
process.exitCode = 1;
|
|
265
|
-
return;
|
|
266
|
-
}
|
|
267
|
-
else {
|
|
268
|
-
// create-new — no existing workspace covers the inferred
|
|
269
|
-
// repo set. Pass repos through; WorldManager creates one.
|
|
270
|
-
resolvedRepos = [...inferred.repos];
|
|
271
|
-
}
|
|
272
|
-
inferenceSpinner.succeed(resolvedWorkspace
|
|
273
|
-
? `Inferred workspace: ${resolvedWorkspace} (confidence ${inferred.confidence.toFixed(2)})`
|
|
274
|
-
: `Inferred new workspace from repos: ${inferred.repos.join(', ')}`);
|
|
275
|
-
}
|
|
276
|
-
catch (err) {
|
|
277
|
-
inferenceSpinner.fail('Inference failed');
|
|
278
|
-
printError(err instanceof Error ? err.message : String(err));
|
|
279
|
-
process.exitCode = 1;
|
|
280
|
-
return;
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
if (!resolvedName) {
|
|
285
|
-
printError('--name is required (omit only when --from-prompt is set).');
|
|
286
|
-
process.exitCode = 1;
|
|
287
|
-
return;
|
|
288
|
-
}
|
|
289
|
-
const { ctx, error } = await loadContext();
|
|
290
|
-
if (!ctx) {
|
|
291
|
-
printError(error?.message ?? 'Olam is not configured. Run `olam init` first.');
|
|
292
|
-
process.exitCode = 1;
|
|
293
|
-
return;
|
|
294
|
-
}
|
|
295
|
-
if (ctx.configIsFallback) {
|
|
296
|
-
printError('This command requires .olam/config.yaml in the current directory or an ancestor.\n' +
|
|
297
|
-
'Run `olam init` to set up Olam in this project.');
|
|
298
|
-
process.exitCode = 1;
|
|
299
|
-
return;
|
|
300
|
-
}
|
|
301
|
-
// M5 dogfood follow-up (B1): devbox staleness check. Resolves
|
|
302
|
-
// repo root by walking up from cwd until we hit a directory
|
|
303
|
-
// containing `packages/`. Falls back to cwd if not found.
|
|
304
|
-
// Phase B6: --rebuild-base routes through resolveBuildScript so
|
|
305
|
-
// a published-CLI run gets the named remedy instead of a silent
|
|
306
|
-
// bash-not-found stderr.
|
|
307
|
-
if (opts.freshnessCheck) {
|
|
308
|
-
const repoRoot = resolveRepoRoot(process.cwd());
|
|
309
|
-
const freshness = getDevboxFreshness({ repoRoot });
|
|
310
|
-
if (freshness.isStale) {
|
|
311
|
-
if (opts.rebuildBase) {
|
|
312
|
-
const { resolveBuildScript, MissingBuildScriptError } = await import('../install-root.js');
|
|
313
|
-
let buildScript;
|
|
314
|
-
try {
|
|
315
|
-
buildScript = resolveBuildScript({
|
|
316
|
-
scriptRelPath: 'packages/adapters/src/docker/build-devbox.sh',
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
catch (err) {
|
|
320
|
-
if (err instanceof MissingBuildScriptError) {
|
|
321
|
-
printError(err.message);
|
|
322
|
-
process.exitCode = 1;
|
|
323
|
-
return;
|
|
324
|
-
}
|
|
325
|
-
throw err;
|
|
326
|
-
}
|
|
327
|
-
const spinner = ora('Rebuilding olam-devbox:latest…').start();
|
|
328
|
-
const rebuild = spawnSync('bash', [buildScript], { cwd: repoRoot, stdio: 'inherit' });
|
|
329
|
-
if (rebuild.status !== 0) {
|
|
330
|
-
spinner.fail('Devbox rebuild failed');
|
|
331
|
-
process.exitCode = 1;
|
|
332
|
-
return;
|
|
333
|
-
}
|
|
334
|
-
spinner.succeed('Devbox image rebuilt');
|
|
335
|
-
}
|
|
336
|
-
else {
|
|
337
|
-
const warning = formatFreshnessWarning(freshness);
|
|
338
|
-
if (warning)
|
|
339
|
-
printWarning(warning);
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
// C2 (olam-world-bundle-freshness): resolve the agent-stream bundle
|
|
344
|
-
// source. Handles both source-mode (OLAM_DEV=1 + packages/ sibling →
|
|
345
|
-
// auto-build if stale) and install-mode (CLI's own dist/agent-stream/).
|
|
346
|
-
let agentStreamDistPath;
|
|
347
|
-
try {
|
|
348
|
-
const bundleSource = resolveBundleSource();
|
|
349
|
-
if (bundleSource.mode === 'source') {
|
|
350
|
-
// B3 path: auto-build when dist is stale.
|
|
351
|
-
const bundleRepoRoot = resolveRepoRoot(process.cwd());
|
|
352
|
-
const buildResult = buildIfStale(bundleRepoRoot);
|
|
353
|
-
if (!buildResult.ok) {
|
|
354
|
-
printError('Agent-stream bundle build failed. Not creating world with a stale bundle.\n' +
|
|
355
|
-
'Fix the build error and re-run `olam create`.');
|
|
356
|
-
process.exitCode = 1;
|
|
357
|
-
return;
|
|
358
|
-
}
|
|
359
|
-
if (buildResult.built) {
|
|
360
|
-
printInfo('Bundle', buildResult.message);
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
// Both modes: pass the resolved path so the docker provider bind-mounts
|
|
364
|
-
// the correct dist (source-mode: repo dist; install-mode: CLI dist).
|
|
365
|
-
agentStreamDistPath = bundleSource.path;
|
|
366
|
-
}
|
|
367
|
-
catch (err) {
|
|
368
|
-
if (err instanceof BundleSourceNotFoundError) {
|
|
369
|
-
// Graceful degradation: warn but do not block world create.
|
|
370
|
-
// The world will use the image-baked bundle as fallback.
|
|
371
|
-
printWarning(`agent-stream bundle path unresolved; world will use image-baked bundle.\n` +
|
|
372
|
-
` ${err.message}`);
|
|
373
|
-
}
|
|
374
|
-
else {
|
|
375
|
-
throw err;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
// ADR 045 — resolve and pre-create the Claude home dir if the flag was
|
|
379
|
-
// given. Resolution is host-side + path-only (no IO inside the helper);
|
|
380
|
-
// dir creation lands the sentinel so first-use detection works.
|
|
381
|
-
let resolvedClaudeHome;
|
|
382
|
-
if (opts.claudeHome !== undefined && opts.claudeHome.length > 0) {
|
|
383
|
-
try {
|
|
384
|
-
const { resolveClaudeHome, ensureClaudeHomeDir } = await import('../spawn/home-override.js');
|
|
385
|
-
const target = resolveClaudeHome({ flag: opts.claudeHome });
|
|
386
|
-
await ensureClaudeHomeDir(target);
|
|
387
|
-
resolvedClaudeHome = target;
|
|
388
|
-
printInfo('Claude home', `${target} (per-world Claude Code instance — see ADR 045)`);
|
|
389
|
-
}
|
|
390
|
-
catch (err) {
|
|
391
|
-
printError(`Invalid --claude-home: ${err instanceof Error ? err.message : String(err)}`);
|
|
392
|
-
process.exitCode = 1;
|
|
393
|
-
return;
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
const spinner = ora('Creating world...').start();
|
|
397
|
-
try {
|
|
398
|
-
const world = await ctx.worldManager.createWorld({
|
|
399
|
-
name: resolvedName,
|
|
400
|
-
repos: resolvedRepos,
|
|
401
|
-
...(resolvedWorkspace ? { workspace: resolvedWorkspace } : {}),
|
|
402
|
-
task: resolvedTask,
|
|
403
|
-
branchName: opts.branch,
|
|
404
|
-
planFile: opts.plan,
|
|
405
|
-
noAuth: !opts.auth,
|
|
406
|
-
...(agentStreamDistPath ? { agentStreamDistPath } : {}),
|
|
407
|
-
// ADV-B3-LOW2: strict-boolean coercion. `?? false` would pass through
|
|
408
|
-
// truthy non-booleans (e.g. if the flag's shape ever grows to
|
|
409
|
-
// `--carry-uncommitted [mode]` where commander returns a string).
|
|
410
|
-
// `=== true` ensures only the literal boolean true reaches the
|
|
411
|
-
// manager, matching the manager's strict `if (!opts.carryUncommitted)`.
|
|
412
|
-
carryUncommitted: opts.carryUncommitted === true,
|
|
413
|
-
allowBootstrapFailure: opts.allowBootstrapFailure === true,
|
|
414
|
-
...(opts.runbook ? { runbookName: opts.runbook } : {}),
|
|
415
|
-
...(resolvedClaudeHome ? { claudeHome: resolvedClaudeHome } : {}),
|
|
416
|
-
});
|
|
417
|
-
spinner.succeed('World created');
|
|
418
|
-
// Phase B3 — register the agentmemory MCP server inside the
|
|
419
|
-
// freshly-spawned world's claude config so the in-world claude
|
|
420
|
-
// session reaches the host agent-memory pool. Gracefully skipped
|
|
421
|
-
// when the host memory service was absent at spawn time (B1's
|
|
422
|
-
// env injection only runs when the secret file exists). Spec:
|
|
423
|
-
// docs/plans/olam-agent-memory-distributed/phase-b-tasks.md B3
|
|
424
|
-
try {
|
|
425
|
-
const memorySecret = readMemorySecretOrNull() ?? '';
|
|
426
|
-
const containerName = `olam-${world.id}-devbox`;
|
|
427
|
-
const result = registerAgentMemoryMcp({
|
|
428
|
-
containerName,
|
|
429
|
-
agentmemoryUrl: AGENTMEMORY_LOCAL_URL,
|
|
430
|
-
agentmemorySecret: memorySecret,
|
|
431
|
-
});
|
|
432
|
-
switch (result.outcome) {
|
|
433
|
-
case 'registered':
|
|
434
|
-
printInfo('Agent memory', `MCP registered in-world (--scope ${result.scope})`);
|
|
435
|
-
break;
|
|
436
|
-
case 'already-registered':
|
|
437
|
-
printInfo('Agent memory', `MCP already registered (idempotent skip)`);
|
|
438
|
-
break;
|
|
439
|
-
case 'skipped-no-env':
|
|
440
|
-
// Silent on the common path — no memory service or --skip-memory at bootstrap.
|
|
441
|
-
break;
|
|
442
|
-
case 'failed':
|
|
443
|
-
printWarning(`Agent memory MCP registration failed (rc=${result.rc}): ${result.detail}. ` +
|
|
444
|
-
`World is still usable; the in-world @agentmemory/mcp shim falls back to local InMemoryKV.`);
|
|
445
|
-
break;
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
catch (err) {
|
|
449
|
-
// Defensive: registration is best-effort. Never block world create.
|
|
450
|
-
printWarning(`Agent memory MCP registration threw: ${err instanceof Error ? err.message : String(err)}. ` +
|
|
451
|
-
`World is still usable.`);
|
|
452
|
-
}
|
|
453
|
-
// --keep-after-merge: persist into the registry immediately so
|
|
454
|
-
// the host-cp polling loop sees it even if host-cp starts later.
|
|
455
|
-
if (opts.keepAfterMerge) {
|
|
456
|
-
const { WorldRegistry } = await import('@olam/core/src/world/registry.js');
|
|
457
|
-
const reg2 = new WorldRegistry();
|
|
458
|
-
try {
|
|
459
|
-
reg2.update(world.id, { autoDestroyOnMerge: false });
|
|
460
|
-
}
|
|
461
|
-
finally {
|
|
462
|
-
reg2.close();
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
printHeader(world.name);
|
|
466
|
-
printInfo('ID', world.id);
|
|
467
|
-
printInfo('Status', world.status);
|
|
468
|
-
printInfo('Repos', world.repos.join(', ') || '(all configured)');
|
|
469
|
-
printInfo('Branch', world.branch);
|
|
470
|
-
printInfo('Port Offset', String(world.portOffset));
|
|
471
|
-
printInfo('Provider', world.computeProvider);
|
|
472
|
-
printInfo('Workspace', world.workspacePath);
|
|
473
|
-
if (world.dashboardUrl) {
|
|
474
|
-
printInfo('Dashboard', world.dashboardUrl);
|
|
475
|
-
}
|
|
476
|
-
if (world.appPortUrls && world.appPortUrls.length > 0) {
|
|
477
|
-
world.appPortUrls.forEach((ap, i) => {
|
|
478
|
-
printInfo(i === 0 ? 'Apps' : '', `${ap.repoName} ${ap.url}`);
|
|
479
|
-
});
|
|
480
|
-
}
|
|
481
|
-
if (resolvedTask) {
|
|
482
|
-
printInfo('Task', resolvedTask);
|
|
483
|
-
}
|
|
484
|
-
if (!opts.json) {
|
|
485
|
-
console.log(`\n${pc.cyan('Dashboard:')} ${HOST_CP_URL}/plan/${encodeURIComponent(world.id)}`);
|
|
486
|
-
console.log(`${pc.cyan('Enter world:')} ${pc.dim(`olam enter ${world.name}`)}`);
|
|
487
|
-
}
|
|
488
|
-
if (world.credentialsInjected?.claude) {
|
|
489
|
-
console.log(`\n${pc.green('Credentials injected. World is ready for dispatch.')}`);
|
|
490
|
-
}
|
|
491
|
-
else if (world.dashboardUrl) {
|
|
492
|
-
console.log(`\n${pc.yellow('Authenticate at')} ${world.dashboardUrl}`);
|
|
493
|
-
}
|
|
494
|
-
// host-cp reliability fix: use HTTP probe instead of docker-only detection.
|
|
495
|
-
// Supports both bare-node and container deployments.
|
|
496
|
-
if (opts.hostCp !== false) {
|
|
497
|
-
const probeResult = await probeHostCp().catch(() => null);
|
|
498
|
-
if (!probeResult) {
|
|
499
|
-
// Fail-loud: the world IS created but auto-registration failed.
|
|
500
|
-
const diag = await gatherProbeFailureDiagnostics().catch(() => ({
|
|
501
|
-
bootstrapStatus: 'probe error',
|
|
502
|
-
containerStatus: 'probe error',
|
|
503
|
-
}));
|
|
504
|
-
process.stderr.write([
|
|
505
|
-
'',
|
|
506
|
-
pc.red('Host CP probe failed.'),
|
|
507
|
-
` tried: http://127.0.0.1:19000/api/bootstrap → ${diag.bootstrapStatus}`,
|
|
508
|
-
` tried: docker container "olam-host-cp" → ${diag.containerStatus}`,
|
|
509
|
-
'',
|
|
510
|
-
pc.yellow('World was created but the SPA inbox will not show it until you:'),
|
|
511
|
-
` ${pc.cyan('olam host-cp start')} (start the host CP)`,
|
|
512
|
-
` ${pc.cyan(`olam host-cp register --world ${world.id}`)} (register manually)`,
|
|
513
|
-
` OR pass ${pc.dim('--no-host-cp')} on next create to suppress this check.`,
|
|
514
|
-
'',
|
|
515
|
-
].join('\n'));
|
|
516
|
-
process.exitCode = 1;
|
|
517
|
-
return;
|
|
518
|
-
}
|
|
519
|
-
// Auto-register the new world so it appears in the host CP UI
|
|
520
|
-
// immediately. Per-world CP base port = 19080 + offset.
|
|
521
|
-
const cpPort = 19080 + world.portOffset;
|
|
522
|
-
const hostCpUrl = probeResult.url;
|
|
523
|
-
const reg = await (async () => {
|
|
524
|
-
const token = await readHostCpTokenForCreate();
|
|
525
|
-
if (!token)
|
|
526
|
-
return { ok: false, status: 0, error: 'no token' };
|
|
527
|
-
const url = `${hostCpUrl}/api/admin/registry`;
|
|
528
|
-
try {
|
|
529
|
-
const res = await fetch(url, {
|
|
530
|
-
method: 'POST',
|
|
531
|
-
headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' },
|
|
532
|
-
body: JSON.stringify({ id: world.id, port: cpPort }),
|
|
533
|
-
});
|
|
534
|
-
if (!res.ok) {
|
|
535
|
-
const text = await res.text().catch(() => '');
|
|
536
|
-
return { ok: false, status: res.status, error: text || `HTTP ${res.status}` };
|
|
537
|
-
}
|
|
538
|
-
return { ok: true, status: res.status };
|
|
539
|
-
}
|
|
540
|
-
catch (err) {
|
|
541
|
-
return { ok: false, status: 0, error: err instanceof Error ? err.message : String(err) };
|
|
542
|
-
}
|
|
543
|
-
})();
|
|
544
|
-
if (!reg.ok) {
|
|
545
|
-
process.stderr.write([
|
|
546
|
-
'',
|
|
547
|
-
pc.red('Host CP registry POST failed.'),
|
|
548
|
-
` url: ${hostCpUrl}/api/admin/registry`,
|
|
549
|
-
` status: ${reg.status}`,
|
|
550
|
-
` error: ${reg.error}`,
|
|
551
|
-
'',
|
|
552
|
-
pc.yellow('World was created but not registered. Run manually:'),
|
|
553
|
-
` ${pc.cyan(`olam host-cp register --world ${world.id}`)}`,
|
|
554
|
-
'',
|
|
555
|
-
].join('\n'));
|
|
556
|
-
process.exitCode = 1;
|
|
557
|
-
return;
|
|
558
|
-
}
|
|
559
|
-
printInfo('Host CP', `registered → :${cpPort} (mode: ${probeResult.mode})`);
|
|
560
|
-
// Propagate the friendly name from the CLI's --name flag.
|
|
561
|
-
try {
|
|
562
|
-
const token = await readHostCpTokenForCreate();
|
|
563
|
-
if (token && world.name && world.name !== world.id) {
|
|
564
|
-
await fetch(`${hostCpUrl}/api/worlds/${encodeURIComponent(world.id)}`, {
|
|
565
|
-
method: 'PATCH',
|
|
566
|
-
headers: {
|
|
567
|
-
Authorization: `Bearer ${token}`,
|
|
568
|
-
'Content-Type': 'application/json',
|
|
569
|
-
},
|
|
570
|
-
body: JSON.stringify({ name: world.name }),
|
|
571
|
-
});
|
|
572
|
-
}
|
|
573
|
-
// --keep-after-merge: record auto_destroy_on_merge=false.
|
|
574
|
-
if (opts.keepAfterMerge && token) {
|
|
575
|
-
await fetch(`${hostCpUrl}/api/admin/world-pr`, {
|
|
576
|
-
method: 'POST',
|
|
577
|
-
headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` },
|
|
578
|
-
body: JSON.stringify({ worldId: world.id, prUrl: null, autoDestroyOnMerge: false }),
|
|
579
|
-
signal: AbortSignal.timeout(3000),
|
|
580
|
-
});
|
|
581
|
-
printInfo('Keep-after-merge', 'auto-destroy disabled for this world');
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
catch {
|
|
585
|
-
// Silent — the world is registered; the name is just UI sugar.
|
|
586
|
-
}
|
|
587
|
-
// Phase C9: spawn the auto-codex-review lane.
|
|
588
|
-
if (opts.autoCodexReview && reg.ok) {
|
|
589
|
-
const reviewTask = 'You are the codex-review sub-lane. Watch the main session ' +
|
|
590
|
-
'(claude-main) as it works on the world\'s primary task. ' +
|
|
591
|
-
'Periodically read its recent thought_nodes (filter by ' +
|
|
592
|
-
'session_id=claude-main) and surface concrete concerns: ' +
|
|
593
|
-
'security risks, plumbing bugs, premature abstractions. ' +
|
|
594
|
-
'Adversarial-reviewer voice; constructive but blunt.';
|
|
595
|
-
try {
|
|
596
|
-
const result = await callHostCpProxy('POST', world.id, '/lanes/create', { name: 'codex-review', task: reviewTask });
|
|
597
|
-
if (result.ok) {
|
|
598
|
-
printInfo('Auto-review', 'spawned claude-lane-codex-review');
|
|
599
|
-
}
|
|
600
|
-
else {
|
|
601
|
-
printWarning(`Auto-review spawn failed (HTTP ${result.status}): ${result.error}. Retry with \`olam lanes create ${world.id} --name codex-review --task '...'\`.`);
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
catch (err) {
|
|
605
|
-
printWarning(`Auto-review spawn errored: ${err instanceof Error ? err.message : String(err)}`);
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
const worldUrl = `${hostCpUrl}/world/${encodeURIComponent(world.id)}`;
|
|
609
|
-
console.log(`\n${pc.cyan('Host CP UI:')} ${worldUrl}`);
|
|
610
|
-
// Phase D6: auto-open in browser unless --no-open.
|
|
611
|
-
if (opts.open !== false && reg.ok) {
|
|
612
|
-
const openResult = openHostCpUrl(worldUrl);
|
|
613
|
-
if (openResult.opened) {
|
|
614
|
-
printInfo('Browser', 'opened');
|
|
615
|
-
}
|
|
616
|
-
else if (openResult.reason) {
|
|
617
|
-
printInfo('Browser', `not opened (${openResult.reason})`);
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
catch (err) {
|
|
623
|
-
// TaskDispatchError fires AFTER the world is fully created
|
|
624
|
-
// but BEFORE we return from createWorld. The world exists,
|
|
625
|
-
// is running, and is usable — only the auto-dispatch failed.
|
|
626
|
-
// Surface a remedy the operator can paste verbatim so they
|
|
627
|
-
// recover in one command instead of re-creating the world.
|
|
628
|
-
// Closes friction #18 (silent --task no-op).
|
|
629
|
-
if (err instanceof TaskDispatchError) {
|
|
630
|
-
spinner.fail('Auto-dispatch failed (world exists but task was not sent)');
|
|
631
|
-
printError(`Task auto-dispatch failed (${err.kind}): ${err.message}`);
|
|
632
|
-
// World ID is on err's enclosing scope (resolvedName) but
|
|
633
|
-
// not on TaskDispatchError itself (the throw point doesn't
|
|
634
|
-
// know it). Surface the name-derived remedy with the
|
|
635
|
-
// operator-friendly note that they can also use the world
|
|
636
|
-
// ID once `olam list` shows it.
|
|
637
|
-
console.log(` ${pc.yellow('Remedy:')} ${pc.cyan(`olam dispatch ${resolvedName} '<your task>'`)}`);
|
|
638
|
-
console.log(` ${pc.dim(`(or use 'olam list' to find the world ID if the name is ambiguous)`)}`);
|
|
639
|
-
if (err.detail) {
|
|
640
|
-
console.log(` ${pc.dim(`detail: ${err.detail}`)}`);
|
|
641
|
-
}
|
|
642
|
-
process.exitCode = 1;
|
|
643
|
-
return;
|
|
644
|
-
}
|
|
645
|
-
spinner.fail('Failed to create world');
|
|
646
|
-
if (err instanceof AuthPreflightError) {
|
|
647
|
-
printError(err.message);
|
|
648
|
-
if (err.remedy)
|
|
649
|
-
console.log(` ${pc.dim(err.remedy)}`);
|
|
650
|
-
}
|
|
651
|
-
else if (err instanceof ContainerOrphanError) {
|
|
652
|
-
// Issue #962 fail-loud branch: a container is alive for this
|
|
653
|
-
// name but the DB has no row for it. Surface the remediation
|
|
654
|
-
// verbatim — the operator pastes one command and recovers.
|
|
655
|
-
printError(err.message);
|
|
656
|
-
}
|
|
657
|
-
else {
|
|
658
|
-
printError(err instanceof Error ? err.message : String(err));
|
|
659
|
-
}
|
|
660
|
-
process.exitCode = 1;
|
|
661
|
-
}
|
|
662
|
-
});
|
|
663
|
-
}
|
|
664
|
-
/**
|
|
665
|
-
* Walk up from `start` until we find a directory containing `packages/`.
|
|
666
|
-
* Used by the B1 freshness check to locate paths relative to the repo
|
|
667
|
-
* root regardless of which subdirectory the operator invoked the CLI
|
|
668
|
-
* from. Falls back to `start` if no marker is found before /.
|
|
669
|
-
*/
|
|
670
|
-
function resolveRepoRoot(start) {
|
|
671
|
-
let cur = start;
|
|
672
|
-
while (true) {
|
|
673
|
-
// Repo root signature: top-level package.json + packages/ dir.
|
|
674
|
-
if (existsSync(resolve(cur, 'packages')) && existsSync(resolve(cur, 'package.json'))) {
|
|
675
|
-
return cur;
|
|
676
|
-
}
|
|
677
|
-
const parent = dirname(cur);
|
|
678
|
-
if (parent === cur)
|
|
679
|
-
return start; // walked to filesystem root
|
|
680
|
-
cur = parent;
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
/**
|
|
684
|
-
* Slugify an NL prompt into a default world name. Lowercase, kebab-
|
|
685
|
-
* case, max 40 chars. Mirrors the MCP tool's `defaultNameFromPrompt`
|
|
686
|
-
* helper at packages/mcp-server/src/tools/create-from-prompt.ts so
|
|
687
|
-
* --from-prompt produces the same slug shape regardless of entry
|
|
688
|
-
* point.
|
|
689
|
-
*/
|
|
690
|
-
function defaultNameFromPrompt(prompt) {
|
|
691
|
-
const slug = prompt
|
|
692
|
-
.toLowerCase()
|
|
693
|
-
.replace(/[^a-z0-9\s-]/g, '')
|
|
694
|
-
.trim()
|
|
695
|
-
.replace(/\s+/g, '-')
|
|
696
|
-
.slice(0, 40);
|
|
697
|
-
return slug || 'unnamed';
|
|
698
|
-
}
|
|
699
|
-
/**
|
|
700
|
-
* Read host-cp's startup token. Defensive — returns null on every
|
|
701
|
-
* failure (file missing, permissions, etc.) so --from-prompt can
|
|
702
|
-
* still fall through to a "host-cp not running" picker error rather
|
|
703
|
-
* than throwing.
|
|
704
|
-
*/
|
|
705
|
-
async function readHostCpToken() {
|
|
706
|
-
try {
|
|
707
|
-
const { default: fs } = await import('node:fs');
|
|
708
|
-
const { default: os } = await import('node:os');
|
|
709
|
-
const { default: path } = await import('node:path');
|
|
710
|
-
const tp = path.join(os.homedir(), '.olam', 'host-cp.token');
|
|
711
|
-
if (!fs.existsSync(tp))
|
|
712
|
-
return null;
|
|
713
|
-
const raw = fs.readFileSync(tp, 'utf-8').trim();
|
|
714
|
-
return raw.length > 0 ? raw : null;
|
|
715
|
-
}
|
|
716
|
-
catch {
|
|
717
|
-
return null;
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
/**
|
|
721
|
-
* Fetch the operator's workspace catalog from host-cp's
|
|
722
|
-
* GET /api/workspaces. Empty array on any failure (host-cp not
|
|
723
|
-
* running, network, parse) — the caller's inference will then run
|
|
724
|
-
* with empty catalog and degrade to a low-confidence picker rather
|
|
725
|
-
* than crash.
|
|
726
|
-
*/
|
|
727
|
-
async function fetchHostCpWorkspaces() {
|
|
728
|
-
try {
|
|
729
|
-
const token = await readHostCpToken();
|
|
730
|
-
if (!token)
|
|
731
|
-
return [];
|
|
732
|
-
const res = await fetch(`${HOST_CP_URL}/api/workspaces`, {
|
|
733
|
-
headers: { Authorization: `Bearer ${token}` },
|
|
734
|
-
});
|
|
735
|
-
if (!res.ok)
|
|
736
|
-
return [];
|
|
737
|
-
const data = (await res.json());
|
|
738
|
-
const arr = Array.isArray(data) ? data : (data.workspaces ?? []);
|
|
739
|
-
return arr
|
|
740
|
-
.filter((w) => typeof w.name === 'string' && Array.isArray(w.projects))
|
|
741
|
-
.map((w) => ({ name: w.name, projects: w.projects ?? [] }));
|
|
742
|
-
}
|
|
743
|
-
catch {
|
|
744
|
-
return [];
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
/**
|
|
748
|
-
* Fetch host-cp's POST /api/workspaces/match exact-match candidates
|
|
749
|
-
* for a given inferred repo set. Empty array on any failure.
|
|
750
|
-
*/
|
|
751
|
-
async function fetchHostCpExactMatches(projects) {
|
|
752
|
-
try {
|
|
753
|
-
const token = await readHostCpToken();
|
|
754
|
-
if (!token)
|
|
755
|
-
return [];
|
|
756
|
-
const res = await fetch(`${HOST_CP_URL}/api/workspaces/match`, {
|
|
757
|
-
method: 'POST',
|
|
758
|
-
headers: {
|
|
759
|
-
Authorization: `Bearer ${token}`,
|
|
760
|
-
'Content-Type': 'application/json',
|
|
761
|
-
},
|
|
762
|
-
body: JSON.stringify({ projects }),
|
|
763
|
-
});
|
|
764
|
-
if (!res.ok)
|
|
765
|
-
return [];
|
|
766
|
-
const data = (await res.json());
|
|
767
|
-
return (data.matches ?? [])
|
|
768
|
-
.filter((w) => typeof w.name === 'string' && Array.isArray(w.projects))
|
|
769
|
-
.map((w) => ({ name: w.name, projects: w.projects ?? [] }));
|
|
770
|
-
}
|
|
771
|
-
catch {
|
|
772
|
-
return [];
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
//# sourceMappingURL=create.js.map
|