@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
|
@@ -1,830 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `olam services` — umbrella verb for managing Olam service containers.
|
|
3
|
-
*
|
|
4
|
-
* Subcommands:
|
|
5
|
-
* olam services up — start all service containers (idempotent)
|
|
6
|
-
* olam services down — stop all service containers
|
|
7
|
-
* olam services status — show state of all service containers
|
|
8
|
-
* olam services restart <name> — restart a named service
|
|
9
|
-
*
|
|
10
|
-
* Substrate-aware (D1 — Phase 2 Phase D):
|
|
11
|
-
* compose → docker-based lifecycle (AuthContainerController / McpAuth / KgService)
|
|
12
|
-
* kubernetes → kubectl scale / rollout restart / get deployment
|
|
13
|
-
*
|
|
14
|
-
* `olam auth up/down/status` delegates here with a deprecation warning.
|
|
15
|
-
*/
|
|
16
|
-
import { execFileSync, spawnSync } from 'node:child_process';
|
|
17
|
-
import pc from 'picocolors';
|
|
18
|
-
import { AuthContainerController } from '@olam/core/src/auth/index.js';
|
|
19
|
-
import { printError, printHeader, printInfo, printSuccess, printWarning } from '../output.js';
|
|
20
|
-
import { KG_SERVICE_HEALTH_TIMEOUT_MS, KG_SERVICE_PORT, KgServiceContainerController, } from './kg-service-container.js';
|
|
21
|
-
import { MEMORY_SERVICE_HEALTH_TIMEOUT_MS, MEMORY_SERVICE_PORT, MemoryServiceContainerController, } from './memory-service-container.js';
|
|
22
|
-
import { readConfig } from '../lib/config.js';
|
|
23
|
-
import { kubectlWrap } from '../lib/kubectl-wrap.js';
|
|
24
|
-
import { PERIPHERALS } from '../lib/peripheral-registry.js';
|
|
25
|
-
import { resolveKubectlContext } from '../lib/kubectl-context.js';
|
|
26
|
-
import { applyIngressManifests, ensureTlsInstalled, registerServicesTls, resolveTraefikHttpsPort, tlsSecretExists, } from './services-tls.js';
|
|
27
|
-
// ── McpAuthContainerController ────────────────────────────────────
|
|
28
|
-
//
|
|
29
|
-
// Mirrors AuthContainerController (packages/core/src/auth/container.ts).
|
|
30
|
-
// mcp-auth-service is not a @olam/core package, so the controller lives
|
|
31
|
-
// here in the CLI layer.
|
|
32
|
-
const MCP_AUTH_PORT = 9998;
|
|
33
|
-
const MCP_AUTH_VOLUME = 'olam-mcp-auth-data';
|
|
34
|
-
const MCP_AUTH_CONTAINER = 'olam-mcp-auth';
|
|
35
|
-
const MCP_AUTH_LOCAL_TAG = 'olam-mcp-auth:local';
|
|
36
|
-
const MCP_AUTH_PUBLISHED_TAG = 'ghcr.io/pleri/olam-mcp-auth:latest';
|
|
37
|
-
const MCP_AUTH_HEALTH_URL = `http://127.0.0.1:${MCP_AUTH_PORT}/health`;
|
|
38
|
-
// Image used by host-cp's port-bridge-manager.mjs to spawn socat sidecar
|
|
39
|
-
// containers for `olam_port_expose`. Preflight-pulled during `olam services up`
|
|
40
|
-
// so the first port-expose call doesn't fail opaquely on hosts (e.g. Hazel)
|
|
41
|
-
// where the image isn't cached. See issue #964.
|
|
42
|
-
const SOCAT_IMAGE = 'alpine/socat:latest';
|
|
43
|
-
// Cold-bootstrap CI runners (no Docker layer cache, slower disk I/O)
|
|
44
|
-
// need more headroom than 15s. The previous default tripped on every
|
|
45
|
-
// D1/D2/D3 CI run with a silent "stderr: " (empty) — bumped to 60s
|
|
46
|
-
// after run 25591650126 showed /health taking ~16s on a fresh
|
|
47
|
-
// bootstrap. Operator-facing local boots are still ~3-5s; the larger
|
|
48
|
-
// cap only matters when something is genuinely wrong, in which case
|
|
49
|
-
// the timeout-then-dump-logs branch (added below) surfaces the cause.
|
|
50
|
-
const MCP_AUTH_HEALTH_TIMEOUT_MS = 60_000;
|
|
51
|
-
export class McpAuthContainerController {
|
|
52
|
-
imageTag = MCP_AUTH_LOCAL_TAG;
|
|
53
|
-
status() {
|
|
54
|
-
const r = spawnSync('docker', ['inspect', '--format', '{{.State.Status}}|{{.Id}}', MCP_AUTH_CONTAINER], { encoding: 'utf-8' });
|
|
55
|
-
if (r.status === 0) {
|
|
56
|
-
const [stateRaw, id] = r.stdout.trim().split('|');
|
|
57
|
-
return {
|
|
58
|
-
state: stateRaw === 'running' ? 'running' : 'stopped',
|
|
59
|
-
port: MCP_AUTH_PORT,
|
|
60
|
-
containerId: id,
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
return { state: 'missing', port: MCP_AUTH_PORT };
|
|
64
|
-
}
|
|
65
|
-
imageExists(tag = this.imageTag) {
|
|
66
|
-
return spawnSync('docker', ['image', 'inspect', tag], { encoding: 'utf-8' }).status === 0;
|
|
67
|
-
}
|
|
68
|
-
start() {
|
|
69
|
-
const current = this.status();
|
|
70
|
-
if (current.state === 'running')
|
|
71
|
-
return;
|
|
72
|
-
if (current.state === 'stopped') {
|
|
73
|
-
execFileSync('docker', ['start', MCP_AUTH_CONTAINER], { stdio: 'pipe' });
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
if (!this.imageExists()) {
|
|
77
|
-
if (this.imageTag !== MCP_AUTH_PUBLISHED_TAG && this.imageExists(MCP_AUTH_PUBLISHED_TAG)) {
|
|
78
|
-
this.imageTag = MCP_AUTH_PUBLISHED_TAG;
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
throw new Error(`mcp-auth image '${this.imageTag}' not found locally. ` +
|
|
82
|
-
'Run `olam bootstrap` to pull the published image.');
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
execFileSync('docker', [
|
|
86
|
-
'run',
|
|
87
|
-
'--detach',
|
|
88
|
-
'--name', MCP_AUTH_CONTAINER,
|
|
89
|
-
'--restart', 'unless-stopped',
|
|
90
|
-
'--publish', `${MCP_AUTH_PORT}:${MCP_AUTH_PORT}`,
|
|
91
|
-
'--volume', `${MCP_AUTH_VOLUME}:/mcp-auth-data`,
|
|
92
|
-
this.imageTag,
|
|
93
|
-
], { stdio: 'pipe' });
|
|
94
|
-
}
|
|
95
|
-
stop() {
|
|
96
|
-
const current = this.status();
|
|
97
|
-
if (current.state !== 'running')
|
|
98
|
-
return;
|
|
99
|
-
execFileSync('docker', ['stop', MCP_AUTH_CONTAINER], { stdio: 'pipe' });
|
|
100
|
-
}
|
|
101
|
-
remove() {
|
|
102
|
-
spawnSync('docker', ['rm', '-f', MCP_AUTH_CONTAINER], { stdio: 'pipe' });
|
|
103
|
-
}
|
|
104
|
-
async waitForReady(timeoutMs = MCP_AUTH_HEALTH_TIMEOUT_MS) {
|
|
105
|
-
const deadline = Date.now() + timeoutMs;
|
|
106
|
-
while (Date.now() < deadline) {
|
|
107
|
-
try {
|
|
108
|
-
const res = await fetch(MCP_AUTH_HEALTH_URL, { signal: AbortSignal.timeout(1_500) });
|
|
109
|
-
if (res.ok)
|
|
110
|
-
return true;
|
|
111
|
-
}
|
|
112
|
-
catch {
|
|
113
|
-
// not ready yet
|
|
114
|
-
}
|
|
115
|
-
await sleep(500);
|
|
116
|
-
}
|
|
117
|
-
return false;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
function sleep(ms) {
|
|
121
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
122
|
-
}
|
|
123
|
-
// ── Kubernetes context resolution (D1 — SEC-NEW-003) ─────────────
|
|
124
|
-
const K8S_NAMESPACE = 'olam';
|
|
125
|
-
/** Emits actionable error and returns null when context is missing (SEC-NEW-003).
|
|
126
|
-
* Uses the shared resolver in `kubectl-context.ts` so the policy lives in one place. */
|
|
127
|
-
function assertK8sContext(configPath) {
|
|
128
|
-
const resolved = resolveKubectlContext(configPath);
|
|
129
|
-
if (resolved.error !== undefined || resolved.context === undefined) {
|
|
130
|
-
printError((resolved.error ?? 'kubectl context missing') +
|
|
131
|
-
'\n See docs/architecture/peripheral-services-on-k3s.md for setup instructions.');
|
|
132
|
-
return null;
|
|
133
|
-
}
|
|
134
|
-
if (resolved.deprecationWarning !== undefined) {
|
|
135
|
-
printWarning(resolved.deprecationWarning);
|
|
136
|
-
}
|
|
137
|
-
return { context: resolved.context };
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* `olam services up` on kubernetes substrate.
|
|
141
|
-
* Scales each peripheral deployment to replicas=1.
|
|
142
|
-
* Applies the manifest if the Deployment is missing (not found).
|
|
143
|
-
*/
|
|
144
|
-
export async function servicesUpKubernetes(deps = {}) {
|
|
145
|
-
const ctx = assertK8sContext(deps.configPath);
|
|
146
|
-
if (!ctx)
|
|
147
|
-
return { exitCode: 1 };
|
|
148
|
-
const wrap = deps.kubectlWrapImpl ?? kubectlWrap;
|
|
149
|
-
const { context } = ctx;
|
|
150
|
-
printHeader('Services up (kubernetes)');
|
|
151
|
-
let exitCode = 0;
|
|
152
|
-
for (const peripheral of PERIPHERALS) {
|
|
153
|
-
const deploymentName = normalizeK8sDeploymentName(peripheral.name);
|
|
154
|
-
const result = await wrap([
|
|
155
|
-
'--context', context,
|
|
156
|
-
'scale', `deployment/${deploymentName}`,
|
|
157
|
-
'--replicas=1',
|
|
158
|
-
'-n', K8S_NAMESPACE,
|
|
159
|
-
], { timeout: 30_000 });
|
|
160
|
-
if (!result.ok) {
|
|
161
|
-
printWarning(`${deploymentName}: scale failed — ${result.stderr.split('\n')[0] ?? ''} (try olam upgrade to apply manifests)`);
|
|
162
|
-
exitCode = 1;
|
|
163
|
-
}
|
|
164
|
-
else {
|
|
165
|
-
printSuccess(`${deploymentName}: scaled to 1 replica`);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
// Apply the Traefik IngressRoute + bootstrap TLS on first run. Idempotent:
|
|
169
|
-
// `kubectl apply` is a no-op when the IngressRoute is unchanged, and the
|
|
170
|
-
// tls-install seam skips when the secret already exists with a fresh cert.
|
|
171
|
-
// Non-fatal — if Traefik isn't installed, the SPA still works via port-forward.
|
|
172
|
-
const ingressResult = applyIngressManifests(context);
|
|
173
|
-
if (!ingressResult.ok) {
|
|
174
|
-
printWarning(`IngressRoute apply failed (SPA still reachable via port-forward): ${ingressResult.reason ?? 'unknown'}`);
|
|
175
|
-
}
|
|
176
|
-
else {
|
|
177
|
-
printSuccess('IngressRoute applied (https://olam.local)');
|
|
178
|
-
}
|
|
179
|
-
if (!tlsSecretExists(undefined, context)) {
|
|
180
|
-
const tlsResult = await ensureTlsInstalled();
|
|
181
|
-
if (tlsResult.action === 'failed') {
|
|
182
|
-
printWarning(`TLS cert install skipped (SPA still reachable via port-forward): ${tlsResult.reason ?? 'unknown'}`);
|
|
183
|
-
}
|
|
184
|
-
else if (tlsResult.action === 'installed') {
|
|
185
|
-
printSuccess('TLS cert installed (mkcert)');
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
// Surface the HTTPS URL when discoverable.
|
|
189
|
-
const httpsPort = resolveTraefikHttpsPort(undefined, context);
|
|
190
|
-
if (httpsPort !== null) {
|
|
191
|
-
printInfo('SPA (HTTPS, h2)', `https://olam.local:${httpsPort}`);
|
|
192
|
-
}
|
|
193
|
-
return { exitCode };
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* `olam services down` on kubernetes substrate.
|
|
197
|
-
* Scales each peripheral deployment to replicas=0.
|
|
198
|
-
*/
|
|
199
|
-
export async function servicesDownKubernetes(deps = {}) {
|
|
200
|
-
const ctx = assertK8sContext(deps.configPath);
|
|
201
|
-
if (!ctx)
|
|
202
|
-
return { exitCode: 1 };
|
|
203
|
-
const wrap = deps.kubectlWrapImpl ?? kubectlWrap;
|
|
204
|
-
const { context } = ctx;
|
|
205
|
-
let exitCode = 0;
|
|
206
|
-
for (const peripheral of PERIPHERALS) {
|
|
207
|
-
const deploymentName = normalizeK8sDeploymentName(peripheral.name);
|
|
208
|
-
const result = await wrap([
|
|
209
|
-
'--context', context,
|
|
210
|
-
'scale', `deployment/${deploymentName}`,
|
|
211
|
-
'--replicas=0',
|
|
212
|
-
'-n', K8S_NAMESPACE,
|
|
213
|
-
], { timeout: 30_000 });
|
|
214
|
-
if (!result.ok) {
|
|
215
|
-
printError(`${deploymentName}: scale down failed — ${result.stderr.split('\n')[0] ?? ''}`);
|
|
216
|
-
exitCode = 1;
|
|
217
|
-
}
|
|
218
|
-
else {
|
|
219
|
-
printSuccess(`${deploymentName}: scaled to 0 replicas`);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
return { exitCode };
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* `olam services status` on kubernetes substrate.
|
|
226
|
-
* Fetches `kubectl get deployment -n olam -o wide` and formats it to match
|
|
227
|
-
* the compose table shape: NAME | STATUS | IMAGE | AGE | RESTARTS.
|
|
228
|
-
*/
|
|
229
|
-
/**
|
|
230
|
-
* Collect k8s deployment statuses and emit as `ServiceStatusEntry[]` array.
|
|
231
|
-
* Used by `servicesStatusJsonKubernetes()` for `--json` mode.
|
|
232
|
-
* Probes kubectl for deployment readiness and maps to the compose schema.
|
|
233
|
-
*/
|
|
234
|
-
export async function collectServicesStatusKubernetes(deps = {}) {
|
|
235
|
-
const ctx = assertK8sContext(deps.configPath);
|
|
236
|
-
if (!ctx)
|
|
237
|
-
return [];
|
|
238
|
-
const wrap = deps.kubectlWrapImpl ?? kubectlWrap;
|
|
239
|
-
const { context } = ctx;
|
|
240
|
-
const result = await wrap([
|
|
241
|
-
'--context', context,
|
|
242
|
-
'get', 'deployment',
|
|
243
|
-
'-n', K8S_NAMESPACE,
|
|
244
|
-
'-o', 'wide',
|
|
245
|
-
], { timeout: 30_000 });
|
|
246
|
-
if (!result.ok) {
|
|
247
|
-
// On kubectl failure, return all services in 'missing' state.
|
|
248
|
-
return PERIPHERALS.map((p) => ({
|
|
249
|
-
name: p.composeContainerName,
|
|
250
|
-
state: 'missing',
|
|
251
|
-
port: p.port,
|
|
252
|
-
containerId: null,
|
|
253
|
-
}));
|
|
254
|
-
}
|
|
255
|
-
// Parse kubectl output: NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR
|
|
256
|
-
// Map deployment readiness to state: running (READY == AVAILABLE) or degraded.
|
|
257
|
-
const lines = result.stdout.trim().split('\n');
|
|
258
|
-
const entries = [];
|
|
259
|
-
for (const line of lines.slice(1)) {
|
|
260
|
-
const cols = line.trim().split(/\s+/);
|
|
261
|
-
const name = cols[0] ?? '';
|
|
262
|
-
const ready = cols[1] ?? '0/0';
|
|
263
|
-
const available = cols[3] ?? '0';
|
|
264
|
-
// Map deployment name back to compose container name.
|
|
265
|
-
// kubectl returns `olam-<service-name>` format.
|
|
266
|
-
const composeName = name.startsWith('olam-') ? name : `olam-${name}`;
|
|
267
|
-
const peripheral = PERIPHERALS.find((p) => p.composeContainerName === composeName);
|
|
268
|
-
if (!peripheral)
|
|
269
|
-
continue;
|
|
270
|
-
// Determine state: running if available > 0, missing otherwise.
|
|
271
|
-
// k8s does not expose container IDs in the deployment list, so containerId is null.
|
|
272
|
-
const availableCount = parseInt(available, 10);
|
|
273
|
-
const state = availableCount > 0 ? 'running' : 'missing';
|
|
274
|
-
entries.push({
|
|
275
|
-
name: composeName,
|
|
276
|
-
state,
|
|
277
|
-
port: peripheral.port,
|
|
278
|
-
containerId: null, // k8s deployments do not expose pod container IDs in this view
|
|
279
|
-
});
|
|
280
|
-
}
|
|
281
|
-
// Include any peripherals not found in the deployment list as 'missing'.
|
|
282
|
-
const foundNames = new Set(entries.map((e) => e.name));
|
|
283
|
-
for (const p of PERIPHERALS) {
|
|
284
|
-
if (!foundNames.has(p.composeContainerName)) {
|
|
285
|
-
entries.push({
|
|
286
|
-
name: p.composeContainerName,
|
|
287
|
-
state: 'missing',
|
|
288
|
-
port: p.port,
|
|
289
|
-
containerId: null,
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
return entries;
|
|
294
|
-
}
|
|
295
|
-
export async function servicesStatusKubernetes(deps = {}) {
|
|
296
|
-
const ctx = assertK8sContext(deps.configPath);
|
|
297
|
-
if (!ctx)
|
|
298
|
-
return;
|
|
299
|
-
const wrap = deps.kubectlWrapImpl ?? kubectlWrap;
|
|
300
|
-
const { context } = ctx;
|
|
301
|
-
printHeader('Services status (kubernetes)');
|
|
302
|
-
const result = await wrap([
|
|
303
|
-
'--context', context,
|
|
304
|
-
'get', 'deployment',
|
|
305
|
-
'-n', K8S_NAMESPACE,
|
|
306
|
-
'-o', 'wide',
|
|
307
|
-
], { timeout: 30_000 });
|
|
308
|
-
if (!result.ok) {
|
|
309
|
-
printError(`kubectl get deployment failed: ${result.stderr.split('\n')[0] ?? ''}`);
|
|
310
|
-
return;
|
|
311
|
-
}
|
|
312
|
-
// Parse kubectl output and reformat to match compose table shape.
|
|
313
|
-
// kubectl -o wide columns: NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR
|
|
314
|
-
// We emit: NAME | STATUS | IMAGE | AGE | RESTARTS
|
|
315
|
-
const lines = result.stdout.trim().split('\n');
|
|
316
|
-
const header = ` ${'NAME'.padEnd(24)} ${'STATUS'.padEnd(10)} ${'IMAGE'.padEnd(44)} ${'AGE'.padEnd(8)} RESTARTS`;
|
|
317
|
-
const divider = ' ' + '─'.repeat(104);
|
|
318
|
-
printInfo('', header);
|
|
319
|
-
printInfo('', divider);
|
|
320
|
-
for (const line of lines.slice(1)) {
|
|
321
|
-
const cols = line.trim().split(/\s+/);
|
|
322
|
-
const name = cols[0] ?? '';
|
|
323
|
-
const ready = cols[1] ?? '0/0'; // e.g. "1/1"
|
|
324
|
-
const available = cols[3] ?? '0';
|
|
325
|
-
const age = cols[4] ?? '?';
|
|
326
|
-
const image = cols[6] ?? '(unknown)';
|
|
327
|
-
// Short image tag: strip registry prefix for readability.
|
|
328
|
-
const shortImage = image.split('/').pop() ?? image;
|
|
329
|
-
const status = available === ready.split('/')[1] ? 'running' : 'degraded';
|
|
330
|
-
const statusStr = status === 'running' ? pc.green(status) : pc.yellow(status);
|
|
331
|
-
printInfo('', ` ${name.padEnd(24)} ${statusStr.padEnd(10 + (status === 'running' ? pc.green('').length : pc.yellow('').length))} ${shortImage.padEnd(44)} ${age.padEnd(8)} —`);
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
* Normalize a user-supplied service name to the k8s Deployment name form.
|
|
336
|
-
*
|
|
337
|
-
* All olam peripheral Deployments are named `olam-<short-name>` in the k8s
|
|
338
|
-
* manifests (e.g. `olam-kg-service`, `olam-auth-service`). When the operator
|
|
339
|
-
* types `olam services restart kg-service` the CLI must prepend `olam-` before
|
|
340
|
-
* calling `kubectl rollout restart deployment/olam-kg-service`.
|
|
341
|
-
*
|
|
342
|
-
* Idempotent: if the user already types the full name (`olam-kg-service`), the
|
|
343
|
-
* prefix is NOT doubled → `olam-kg-service` (NOT `olam-olam-kg-service`).
|
|
344
|
-
*
|
|
345
|
-
* Exported for unit testing (C1 — R3-D).
|
|
346
|
-
*/
|
|
347
|
-
export function normalizeK8sDeploymentName(name) {
|
|
348
|
-
if (name.startsWith('olam-'))
|
|
349
|
-
return name;
|
|
350
|
-
return `olam-${name}`;
|
|
351
|
-
}
|
|
352
|
-
/**
|
|
353
|
-
* `olam services restart <name>` on kubernetes substrate.
|
|
354
|
-
* Uses `kubectl rollout restart deployment/olam-<name>`.
|
|
355
|
-
* Prepends `olam-` to the user-supplied name (idempotent — no double-prefix).
|
|
356
|
-
*/
|
|
357
|
-
export async function servicesRestartKubernetes(name, deps = {}) {
|
|
358
|
-
const ctx = assertK8sContext(deps.configPath);
|
|
359
|
-
if (!ctx)
|
|
360
|
-
return { exitCode: 1 };
|
|
361
|
-
const wrap = deps.kubectlWrapImpl ?? kubectlWrap;
|
|
362
|
-
const { context } = ctx;
|
|
363
|
-
const deploymentName = normalizeK8sDeploymentName(name);
|
|
364
|
-
const result = await wrap([
|
|
365
|
-
'--context', context,
|
|
366
|
-
'rollout', 'restart',
|
|
367
|
-
`deployment/${deploymentName}`,
|
|
368
|
-
'-n', K8S_NAMESPACE,
|
|
369
|
-
], { timeout: 30_000 });
|
|
370
|
-
if (!result.ok) {
|
|
371
|
-
printError(`rollout restart ${deploymentName} failed: ${result.stderr.split('\n')[0] ?? ''}`);
|
|
372
|
-
return { exitCode: 1 };
|
|
373
|
-
}
|
|
374
|
-
printSuccess(`${deploymentName}: rollout restart triggered`);
|
|
375
|
-
return { exitCode: 0 };
|
|
376
|
-
}
|
|
377
|
-
export function pullSocatImage(deps = {}) {
|
|
378
|
-
const spawnImpl = deps.spawnImpl ??
|
|
379
|
-
((cmd, args, opts) => {
|
|
380
|
-
const r = spawnSync(cmd, [...args], { encoding: 'utf-8', ...opts });
|
|
381
|
-
return {
|
|
382
|
-
status: r.status,
|
|
383
|
-
stdout: r.stdout ?? '',
|
|
384
|
-
stderr: r.stderr ?? '',
|
|
385
|
-
};
|
|
386
|
-
});
|
|
387
|
-
// 1. Probe docker daemon. `docker info` is the canonical "is the daemon
|
|
388
|
-
// reachable" check; bare `docker version` succeeds even when the daemon
|
|
389
|
-
// is down.
|
|
390
|
-
const info = spawnImpl('docker', ['info'], { encoding: 'utf-8', timeout: 5_000 });
|
|
391
|
-
if (info.status !== 0) {
|
|
392
|
-
return { dockerAvailable: false, alreadyPresent: false, pulled: false };
|
|
393
|
-
}
|
|
394
|
-
// 2. Image already cached? Fast no-op.
|
|
395
|
-
const inspect = spawnImpl('docker', ['image', 'inspect', SOCAT_IMAGE], {
|
|
396
|
-
encoding: 'utf-8',
|
|
397
|
-
timeout: 5_000,
|
|
398
|
-
});
|
|
399
|
-
if (inspect.status === 0) {
|
|
400
|
-
return { dockerAvailable: true, alreadyPresent: true, pulled: false };
|
|
401
|
-
}
|
|
402
|
-
// 3. Pull. 60s budget is generous — alpine/socat is ~5MB, real pull is
|
|
403
|
-
// typically <2s on a working network.
|
|
404
|
-
const pull = spawnImpl('docker', ['pull', SOCAT_IMAGE], {
|
|
405
|
-
encoding: 'utf-8',
|
|
406
|
-
timeout: 60_000,
|
|
407
|
-
});
|
|
408
|
-
if (pull.status === 0) {
|
|
409
|
-
return { dockerAvailable: true, alreadyPresent: false, pulled: true };
|
|
410
|
-
}
|
|
411
|
-
return {
|
|
412
|
-
dockerAvailable: true,
|
|
413
|
-
alreadyPresent: false,
|
|
414
|
-
pulled: false,
|
|
415
|
-
error: pull.stderr.trim() || pull.stdout.trim() || 'docker pull failed',
|
|
416
|
-
};
|
|
417
|
-
}
|
|
418
|
-
function dumpContainerLogs(container, tail = 40) {
|
|
419
|
-
try {
|
|
420
|
-
const result = spawnSync('docker', ['logs', '--tail', String(tail), container], {
|
|
421
|
-
encoding: 'utf-8',
|
|
422
|
-
stdio: ['ignore', 'pipe', 'pipe'],
|
|
423
|
-
});
|
|
424
|
-
const out = (result.stdout ?? '') + (result.stderr ?? '');
|
|
425
|
-
if (out.trim().length > 0) {
|
|
426
|
-
process.stderr.write(`\n --- last ${tail} lines from \`docker logs ${container}\` ---\n`);
|
|
427
|
-
for (const line of out.split('\n').slice(-tail)) {
|
|
428
|
-
process.stderr.write(` ${line}\n`);
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
catch { /* best effort */ }
|
|
433
|
-
}
|
|
434
|
-
/**
|
|
435
|
-
* Resolve whether the local olam-auth container should be started.
|
|
436
|
-
*
|
|
437
|
-
* Priority (D1):
|
|
438
|
-
* 1. `withLocalAuth` explicit option
|
|
439
|
-
* 2. `OLAM_CREDENTIAL_BACKEND=local` env var → auto-opt-in (back-compat)
|
|
440
|
-
* 3. Default false (cloud-only-vault default)
|
|
441
|
-
*/
|
|
442
|
-
export function resolveWithLocalAuth(withLocalAuth) {
|
|
443
|
-
if (withLocalAuth !== undefined)
|
|
444
|
-
return withLocalAuth;
|
|
445
|
-
if (process.env['OLAM_CREDENTIAL_BACKEND'] === 'local')
|
|
446
|
-
return true;
|
|
447
|
-
return false;
|
|
448
|
-
}
|
|
449
|
-
export async function servicesUp(deps = {}) {
|
|
450
|
-
const withLocalAuth = resolveWithLocalAuth(deps.withLocalAuth);
|
|
451
|
-
const auth = new AuthContainerController();
|
|
452
|
-
const mcpAuth = new McpAuthContainerController();
|
|
453
|
-
const kgService = new KgServiceContainerController();
|
|
454
|
-
const memoryService = new MemoryServiceContainerController();
|
|
455
|
-
// Preflight: ensure alpine/socat:latest is cached so the first
|
|
456
|
-
// olam_port_expose call doesn't fail opaquely (issue #964). Non-fatal —
|
|
457
|
-
// a missing socat image only impacts port-expose; other services still work.
|
|
458
|
-
const socatResult = pullSocatImage();
|
|
459
|
-
if (!socatResult.dockerAvailable) {
|
|
460
|
-
printWarning('docker daemon not reachable — skipped alpine/socat:latest preflight; ' +
|
|
461
|
-
'olam_port_expose will fail until docker is available');
|
|
462
|
-
}
|
|
463
|
-
else if (socatResult.error !== undefined) {
|
|
464
|
-
printWarning(`alpine/socat:latest preflight pull failed: ${socatResult.error}\n` +
|
|
465
|
-
' olam_port_expose will attempt a fallback pull on first call');
|
|
466
|
-
}
|
|
467
|
-
else if (socatResult.pulled) {
|
|
468
|
-
printSuccess('alpine/socat:latest pulled');
|
|
469
|
-
}
|
|
470
|
-
else {
|
|
471
|
-
printInfo('alpine/socat:latest', 'already cached');
|
|
472
|
-
}
|
|
473
|
-
// D1 — stale-detection: if olam-auth is running but the flag is absent,
|
|
474
|
-
// emit a one-line warning suggesting migration.
|
|
475
|
-
if (!withLocalAuth) {
|
|
476
|
-
const inspectFn = deps.inspectContainerStateFn
|
|
477
|
-
?? ((name) => {
|
|
478
|
-
const r = spawnSync('docker', ['inspect', '--format', '{{.State.Status}}', name], { encoding: 'utf-8' });
|
|
479
|
-
if (r.status !== 0)
|
|
480
|
-
return 'missing';
|
|
481
|
-
const s = r.stdout.trim();
|
|
482
|
-
return s === 'running' ? 'running' : 'stopped';
|
|
483
|
-
});
|
|
484
|
-
const authState = inspectFn('olam-auth');
|
|
485
|
-
if (authState === 'running') {
|
|
486
|
-
process.stderr.write('olam-auth detected as running; cloud-only-vault is now the default — ' +
|
|
487
|
-
'see docs/architecture/cloud-only-vault-migration.md\n' +
|
|
488
|
-
' To suppress: run with --with-local-auth\n');
|
|
489
|
-
}
|
|
490
|
-
// Skip starting olam-auth when not opted in.
|
|
491
|
-
}
|
|
492
|
-
else {
|
|
493
|
-
// Start olam-auth (legacy --with-local-auth mode)
|
|
494
|
-
const authStatus = auth.status();
|
|
495
|
-
if (authStatus.state === 'running') {
|
|
496
|
-
printSuccess(`olam-auth already running on :${authStatus.port}`);
|
|
497
|
-
}
|
|
498
|
-
else {
|
|
499
|
-
try {
|
|
500
|
-
auth.start();
|
|
501
|
-
}
|
|
502
|
-
catch (err) {
|
|
503
|
-
printError(`olam-auth failed to start: ${err instanceof Error ? err.message : String(err)}`);
|
|
504
|
-
return { exitCode: 1 };
|
|
505
|
-
}
|
|
506
|
-
const ready = await auth.waitForReady(MCP_AUTH_HEALTH_TIMEOUT_MS);
|
|
507
|
-
if (!ready) {
|
|
508
|
-
printError(`olam-auth started but /health did not respond within ${MCP_AUTH_HEALTH_TIMEOUT_MS / 1000}s.`);
|
|
509
|
-
dumpContainerLogs('olam-auth');
|
|
510
|
-
printError('\nTry:');
|
|
511
|
-
printError(' - olam doctor # check service prereqs');
|
|
512
|
-
printError(' - docker logs olam-auth # full logs');
|
|
513
|
-
printError(' - docker restart olam-auth # restart');
|
|
514
|
-
return { exitCode: 1 };
|
|
515
|
-
}
|
|
516
|
-
printSuccess('olam-auth started');
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
// Start olam-mcp-auth
|
|
520
|
-
const mcpStatus = mcpAuth.status();
|
|
521
|
-
if (mcpStatus.state === 'running') {
|
|
522
|
-
printSuccess(`olam-mcp-auth already running on :${mcpStatus.port}`);
|
|
523
|
-
}
|
|
524
|
-
else {
|
|
525
|
-
try {
|
|
526
|
-
mcpAuth.start();
|
|
527
|
-
}
|
|
528
|
-
catch (err) {
|
|
529
|
-
printError(`olam-mcp-auth failed to start: ${err instanceof Error ? err.message : String(err)}`);
|
|
530
|
-
return { exitCode: 1 };
|
|
531
|
-
}
|
|
532
|
-
const ready = await mcpAuth.waitForReady();
|
|
533
|
-
if (!ready) {
|
|
534
|
-
printError(`olam-mcp-auth started but /health did not respond within ${MCP_AUTH_HEALTH_TIMEOUT_MS / 1000}s.`);
|
|
535
|
-
dumpContainerLogs('olam-mcp-auth');
|
|
536
|
-
printError('\nTry:');
|
|
537
|
-
printError(' - olam doctor # check service prereqs');
|
|
538
|
-
printError(' - docker logs olam-mcp-auth # full logs');
|
|
539
|
-
printError(' - docker restart olam-mcp-auth # restart');
|
|
540
|
-
return { exitCode: 1 };
|
|
541
|
-
}
|
|
542
|
-
printSuccess('olam-mcp-auth started');
|
|
543
|
-
}
|
|
544
|
-
// Start olam-kg-service
|
|
545
|
-
const kgStatus = kgService.status();
|
|
546
|
-
if (kgStatus.state === 'running') {
|
|
547
|
-
printSuccess(`olam-kg-service already running on :${kgStatus.port}`);
|
|
548
|
-
}
|
|
549
|
-
else if (kgService.imageMissingEverywhere()) {
|
|
550
|
-
// Operator opted out via `olam bootstrap --skip-kg-service`, OR the
|
|
551
|
-
// release predates kg-service. Either way: silent skip with an info
|
|
552
|
-
// hint rather than a warning. Repeating a warning on every services-up
|
|
553
|
-
// for an intentional opt-out is noise.
|
|
554
|
-
printInfo('olam-kg-service', 'skipped (no image; run `olam bootstrap` to pull)');
|
|
555
|
-
printHeader('Services up');
|
|
556
|
-
if (withLocalAuth)
|
|
557
|
-
printInfo('olam-auth', ':9999');
|
|
558
|
-
printInfo('olam-mcp-auth', ':9998');
|
|
559
|
-
return { exitCode: 0 };
|
|
560
|
-
}
|
|
561
|
-
else {
|
|
562
|
-
try {
|
|
563
|
-
kgService.start();
|
|
564
|
-
}
|
|
565
|
-
catch (err) {
|
|
566
|
-
// kg-service is non-fatal — image exists but start failed (port
|
|
567
|
-
// conflict, mount permission, etc.). Surface the docker stderr so
|
|
568
|
-
// operator can diagnose.
|
|
569
|
-
const errMsg = err instanceof Error ? err.message : String(err);
|
|
570
|
-
const stderr = err instanceof Error && 'stderr' in err
|
|
571
|
-
? String(err.stderr ?? '').trim()
|
|
572
|
-
: '';
|
|
573
|
-
printWarning(`olam-kg-service not started: ${errMsg}${stderr ? `\n stderr: ${stderr}` : ''}`);
|
|
574
|
-
printHeader('Services up');
|
|
575
|
-
if (withLocalAuth)
|
|
576
|
-
printInfo('olam-auth', ':9999');
|
|
577
|
-
printInfo('olam-mcp-auth', ':9998');
|
|
578
|
-
return { exitCode: 0 };
|
|
579
|
-
}
|
|
580
|
-
const ready = await kgService.waitForReady();
|
|
581
|
-
if (!ready) {
|
|
582
|
-
printError(`olam-kg-service started but /health did not respond within ${KG_SERVICE_HEALTH_TIMEOUT_MS / 1000}s.`);
|
|
583
|
-
dumpContainerLogs('olam-kg-service');
|
|
584
|
-
return { exitCode: 1 };
|
|
585
|
-
}
|
|
586
|
-
// Pre-warm — eliminates first-call cold cliff per Phase A latency bench.
|
|
587
|
-
await kgService.prewarm();
|
|
588
|
-
printSuccess('olam-kg-service started + pre-warmed');
|
|
589
|
-
}
|
|
590
|
-
// Start olam-memory-service (memory-service-as-docker-peripheral Phase A4).
|
|
591
|
-
// Same opted-out vs broken pattern as kg-service.
|
|
592
|
-
const memoryStatus = memoryService.status();
|
|
593
|
-
if (memoryStatus.state === 'running') {
|
|
594
|
-
printSuccess(`olam-memory-service already running on :${memoryStatus.port}`);
|
|
595
|
-
}
|
|
596
|
-
else if (memoryService.imageMissingEverywhere()) {
|
|
597
|
-
printInfo('olam-memory-service', 'skipped (no image; run `olam bootstrap` to pull)');
|
|
598
|
-
}
|
|
599
|
-
else {
|
|
600
|
-
try {
|
|
601
|
-
memoryService.start();
|
|
602
|
-
}
|
|
603
|
-
catch (err) {
|
|
604
|
-
const errMsg = err instanceof Error ? err.message : String(err);
|
|
605
|
-
const stderr = err instanceof Error && 'stderr' in err
|
|
606
|
-
? String(err.stderr ?? '').trim()
|
|
607
|
-
: '';
|
|
608
|
-
printWarning(`olam-memory-service not started: ${errMsg}${stderr ? `\n stderr: ${stderr}` : ''}`);
|
|
609
|
-
// Non-fatal — memory-service is optional during Phase A coexistence with
|
|
610
|
-
// the legacy host-process model. Operators on the host-process path
|
|
611
|
-
// continue working.
|
|
612
|
-
printHeader('Services up');
|
|
613
|
-
if (withLocalAuth)
|
|
614
|
-
printInfo('olam-auth', ':9999');
|
|
615
|
-
printInfo('olam-mcp-auth', ':9998');
|
|
616
|
-
printInfo('olam-kg-service', `:${KG_SERVICE_PORT}`);
|
|
617
|
-
return { exitCode: 0 };
|
|
618
|
-
}
|
|
619
|
-
const ready = await memoryService.waitForReady();
|
|
620
|
-
if (!ready) {
|
|
621
|
-
printError(`olam-memory-service started but /agentmemory/livez did not respond within ${MEMORY_SERVICE_HEALTH_TIMEOUT_MS / 1000}s.`);
|
|
622
|
-
dumpContainerLogs('olam-memory-service');
|
|
623
|
-
printError('\nTry:');
|
|
624
|
-
printError(' - olam doctor # check service prereqs');
|
|
625
|
-
printError(' - docker logs olam-memory-service # full logs');
|
|
626
|
-
printError(' - docker restart olam-memory-service # restart');
|
|
627
|
-
return { exitCode: 1 };
|
|
628
|
-
}
|
|
629
|
-
printSuccess('olam-memory-service started');
|
|
630
|
-
}
|
|
631
|
-
printHeader('Services up');
|
|
632
|
-
if (withLocalAuth) {
|
|
633
|
-
printInfo('olam-auth', ':9999');
|
|
634
|
-
}
|
|
635
|
-
printInfo('olam-mcp-auth', ':9998');
|
|
636
|
-
printInfo('olam-kg-service', `:${KG_SERVICE_PORT}`);
|
|
637
|
-
printInfo('olam-memory-service', `:${MEMORY_SERVICE_PORT}`);
|
|
638
|
-
return { exitCode: 0 };
|
|
639
|
-
}
|
|
640
|
-
/** Stop all (or a named subset of) service containers.
|
|
641
|
-
*
|
|
642
|
-
* @param include - Optional list of container names to stop. When empty,
|
|
643
|
-
* all containers are stopped. When non-empty, only the named containers
|
|
644
|
-
* are stopped (e.g. `['olam-auth']`). Unknown names produce a warning
|
|
645
|
-
* and are skipped; they do NOT set exitCode = 1.
|
|
646
|
-
*/
|
|
647
|
-
export function servicesDown(opts = {}) {
|
|
648
|
-
const { include } = opts;
|
|
649
|
-
const services = [
|
|
650
|
-
{ name: 'olam-auth', stop: () => new AuthContainerController().stop() },
|
|
651
|
-
{ name: 'olam-mcp-auth', stop: () => new McpAuthContainerController().stop() },
|
|
652
|
-
{ name: 'olam-kg-service', stop: () => new KgServiceContainerController().stop() },
|
|
653
|
-
{ name: 'olam-memory-service', stop: () => new MemoryServiceContainerController().stop() },
|
|
654
|
-
];
|
|
655
|
-
const known = new Set(services.map((s) => s.name));
|
|
656
|
-
// Validate --include values up-front; warn and skip unknowns.
|
|
657
|
-
if (include && include.length > 0) {
|
|
658
|
-
for (const name of include) {
|
|
659
|
-
if (!known.has(name)) {
|
|
660
|
-
printError(`--include: unknown service '${name}'; known: ${[...known].join(', ')}`);
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
let exitCode = 0;
|
|
665
|
-
for (const svc of services) {
|
|
666
|
-
// Skip if --include is given and this service is not in the list.
|
|
667
|
-
if (include && include.length > 0 && !include.includes(svc.name))
|
|
668
|
-
continue;
|
|
669
|
-
try {
|
|
670
|
-
svc.stop();
|
|
671
|
-
printSuccess(`${svc.name} stopped.`);
|
|
672
|
-
}
|
|
673
|
-
catch (err) {
|
|
674
|
-
printError(`${svc.name}: ${err instanceof Error ? err.message : String(err)}`);
|
|
675
|
-
exitCode = 1;
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
return { exitCode };
|
|
679
|
-
}
|
|
680
|
-
/**
|
|
681
|
-
* Pure collector: probe each service controller and return a stable, ordered
|
|
682
|
-
* array. Order is fixed (auth, mcp-auth, kg-service, memory-service) so JSON
|
|
683
|
-
* consumers can index positionally AND the human table order is preserved.
|
|
684
|
-
*
|
|
685
|
-
* Controllers are injectable for unit testing (mirrors the kg-doctor deps
|
|
686
|
-
* pattern) — no live docker daemon needed in tests.
|
|
687
|
-
*/
|
|
688
|
-
export function collectServicesStatus(deps = {}) {
|
|
689
|
-
const auth = deps.auth ?? new AuthContainerController();
|
|
690
|
-
const mcpAuth = deps.mcpAuth ?? new McpAuthContainerController();
|
|
691
|
-
const kgService = deps.kgService ?? new KgServiceContainerController();
|
|
692
|
-
const memoryService = deps.memoryService ?? new MemoryServiceContainerController();
|
|
693
|
-
const project = (name, c) => {
|
|
694
|
-
const s = c.status();
|
|
695
|
-
return {
|
|
696
|
-
name,
|
|
697
|
-
state: s.state,
|
|
698
|
-
port: s.port,
|
|
699
|
-
containerId: s.containerId ? s.containerId.slice(0, 12) : null,
|
|
700
|
-
};
|
|
701
|
-
};
|
|
702
|
-
return [
|
|
703
|
-
project('olam-auth', auth),
|
|
704
|
-
project('olam-mcp-auth', mcpAuth),
|
|
705
|
-
project('olam-kg-service', kgService),
|
|
706
|
-
project('olam-memory-service', memoryService),
|
|
707
|
-
];
|
|
708
|
-
}
|
|
709
|
-
/** Colorize a container state for the human table. */
|
|
710
|
-
function colorizeState(state) {
|
|
711
|
-
return state === 'running'
|
|
712
|
-
? pc.green('running')
|
|
713
|
-
: state === 'stopped'
|
|
714
|
-
? pc.yellow('stopped')
|
|
715
|
-
: pc.red('missing');
|
|
716
|
-
}
|
|
717
|
-
/** Show container state for all services. */
|
|
718
|
-
export function servicesStatus(deps = {}) {
|
|
719
|
-
const entries = collectServicesStatus(deps);
|
|
720
|
-
printHeader('Services status');
|
|
721
|
-
for (const entry of entries) {
|
|
722
|
-
printInfo(entry.name, `${colorizeState(entry.state)} :${entry.port}`);
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
/**
|
|
726
|
-
* `--json` projection of `services status` (compose path). Emits a stable
|
|
727
|
-
* array to stdout. Exit-code contract is unchanged from the human path
|
|
728
|
-
* (always 0 — `services status` has never gated its exit code on container
|
|
729
|
-
* health).
|
|
730
|
-
*/
|
|
731
|
-
export function servicesStatusJson(deps = {}) {
|
|
732
|
-
const entries = collectServicesStatus(deps);
|
|
733
|
-
process.stdout.write(JSON.stringify(entries, null, 2) + '\n');
|
|
734
|
-
}
|
|
735
|
-
/**
|
|
736
|
-
* `--json` projection of `services status` (kubernetes path). Emits a stable
|
|
737
|
-
* array to stdout, matching the compose JSON shape. Exit-code contract is
|
|
738
|
-
* unchanged (always 0).
|
|
739
|
-
*/
|
|
740
|
-
export async function servicesStatusJsonKubernetes(deps = {}) {
|
|
741
|
-
const entries = await collectServicesStatusKubernetes(deps);
|
|
742
|
-
process.stdout.write(JSON.stringify(entries, null, 2) + '\n');
|
|
743
|
-
}
|
|
744
|
-
// ── Commander registration ────────────────────────────────────────
|
|
745
|
-
export function registerServices(program) {
|
|
746
|
-
const services = program
|
|
747
|
-
.command('services')
|
|
748
|
-
.description('Manage Olam service containers (up/down/status/logs)');
|
|
749
|
-
services
|
|
750
|
-
.command('up')
|
|
751
|
-
.description('Start all service containers (idempotent)')
|
|
752
|
-
.option('--with-local-auth', 'Also start the local olam-auth container (deprecated — cloud vault is now the default). ' +
|
|
753
|
-
'Auto-enabled when OLAM_CREDENTIAL_BACKEND=local is set.')
|
|
754
|
-
.action(async (opts) => {
|
|
755
|
-
const cfg = readConfig();
|
|
756
|
-
if (cfg.host.substrate === 'kubernetes') {
|
|
757
|
-
const result = await servicesUpKubernetes();
|
|
758
|
-
if (result.exitCode !== 0)
|
|
759
|
-
process.exitCode = result.exitCode;
|
|
760
|
-
}
|
|
761
|
-
else {
|
|
762
|
-
const result = await servicesUp({ withLocalAuth: opts.withLocalAuth });
|
|
763
|
-
if (result.exitCode !== 0)
|
|
764
|
-
process.exitCode = result.exitCode;
|
|
765
|
-
}
|
|
766
|
-
});
|
|
767
|
-
services
|
|
768
|
-
.command('down')
|
|
769
|
-
.description('Stop all service containers')
|
|
770
|
-
.option('--include <name>', 'Stop only the named service container (repeatable). Known names: ' +
|
|
771
|
-
'olam-auth, olam-mcp-auth, olam-kg-service, olam-memory-service. ' +
|
|
772
|
-
'When omitted, all containers are stopped.', (val, acc) => [...acc, val], [])
|
|
773
|
-
.action(async (opts) => {
|
|
774
|
-
const cfg = readConfig();
|
|
775
|
-
if (cfg.host.substrate === 'kubernetes') {
|
|
776
|
-
// Kubernetes substrate: --include filtering not yet supported; stop all.
|
|
777
|
-
if (opts.include.length > 0) {
|
|
778
|
-
process.stderr.write('[services down] --include is not supported on kubernetes substrate; stopping all services\n');
|
|
779
|
-
}
|
|
780
|
-
const result = await servicesDownKubernetes();
|
|
781
|
-
if (result.exitCode !== 0)
|
|
782
|
-
process.exitCode = result.exitCode;
|
|
783
|
-
}
|
|
784
|
-
else {
|
|
785
|
-
const result = servicesDown({ include: opts.include });
|
|
786
|
-
if (result.exitCode !== 0)
|
|
787
|
-
process.exitCode = result.exitCode;
|
|
788
|
-
}
|
|
789
|
-
});
|
|
790
|
-
services
|
|
791
|
-
.command('status')
|
|
792
|
-
.description('Show state of all service containers')
|
|
793
|
-
.option('--json', 'Emit a machine-readable JSON array of service states')
|
|
794
|
-
.action(async (opts) => {
|
|
795
|
-
const cfg = readConfig();
|
|
796
|
-
if (cfg.host.substrate === 'kubernetes') {
|
|
797
|
-
if (opts.json === true) {
|
|
798
|
-
await servicesStatusJsonKubernetes();
|
|
799
|
-
}
|
|
800
|
-
else {
|
|
801
|
-
await servicesStatusKubernetes();
|
|
802
|
-
}
|
|
803
|
-
}
|
|
804
|
-
else if (opts.json === true) {
|
|
805
|
-
servicesStatusJson();
|
|
806
|
-
}
|
|
807
|
-
else {
|
|
808
|
-
servicesStatus();
|
|
809
|
-
}
|
|
810
|
-
});
|
|
811
|
-
registerServicesTls(services);
|
|
812
|
-
services
|
|
813
|
-
.command('restart <name>')
|
|
814
|
-
.description('Restart a named service (kubernetes: kubectl rollout restart; compose: docker compose restart)')
|
|
815
|
-
.action(async (name) => {
|
|
816
|
-
const cfg = readConfig();
|
|
817
|
-
if (cfg.host.substrate === 'kubernetes') {
|
|
818
|
-
const result = await servicesRestartKubernetes(name);
|
|
819
|
-
if (result.exitCode !== 0)
|
|
820
|
-
process.exitCode = result.exitCode;
|
|
821
|
-
}
|
|
822
|
-
else {
|
|
823
|
-
// Compose restart — delegate to docker compose restart <name>.
|
|
824
|
-
const r = spawnSync('docker', ['compose', 'restart', name], { stdio: 'inherit' });
|
|
825
|
-
if (r.status !== 0)
|
|
826
|
-
process.exitCode = r.status ?? 1;
|
|
827
|
-
}
|
|
828
|
-
});
|
|
829
|
-
}
|
|
830
|
-
//# sourceMappingURL=services.js.map
|