@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,2362 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AUTO-GENERATED by scripts/gen-knowledge-pack.mjs — DO NOT EDIT BY HAND.
|
|
3
|
-
*
|
|
4
|
-
* The bundled olam knowledge pack used as the `olam ask` SDK system prompt.
|
|
5
|
-
* Regenerate with: npm run gen:knowledge-pack --workspace=@pleri/olam-cli
|
|
6
|
-
*/
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
export const KNOWLEDGE_PACK = `# Olam knowledge pack
|
|
9
|
-
|
|
10
|
-
The sections below are curated excerpts from the olam repository's own
|
|
11
|
-
documentation, bundled into the CLI at build time. Treat them as the
|
|
12
|
-
authoritative source for olam usage, setup, and CLI behaviour. When a section
|
|
13
|
-
conflicts with your prior knowledge, the section wins.
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## Olam — README (overview, substrates, scope)
|
|
18
|
-
|
|
19
|
-
Source: \`README.md\`
|
|
20
|
-
|
|
21
|
-
# Olam
|
|
22
|
-
|
|
23
|
-
**The thought is the artifact. Code is a side effect.**
|
|
24
|
-
|
|
25
|
-
Olam provisions disposable development worlds from a single "seed of
|
|
26
|
-
thought" and drives them toward a reviewed pull request. Every world
|
|
27
|
-
is isolated, vault-authenticated, and auditable end-to-end — from the
|
|
28
|
-
initial prompt to the PR's opened URL.
|
|
29
|
-
|
|
30
|
-
The name comes from the Hebrew word for "world."
|
|
31
|
-
|
|
32
|
-
## Two substrates, one paradigm
|
|
33
|
-
|
|
34
|
-
Olam runs on either of two substrates — each optimized for a different
|
|
35
|
-
operator role. Same dashboard SPA and CLI; the API surface overlaps on
|
|
36
|
-
the core world-lifecycle paths but diverges significantly on operator tooling.
|
|
37
|
-
|
|
38
|
-
| | **Cloudflare** (\`packages/cloudflare-worker/\`) | **Local docker** (\`packages/host-cp/\`) |
|
|
39
|
-
|---|---|---|
|
|
40
|
-
| Worlds | CF Sandbox (per-world Durable Object + Container) | Docker container on the host |
|
|
41
|
-
| Auth | Worker OAuth token exchange, tokens in KV \`OLAM_CREDS\` | Long-lived local auth container at \`:9999\`, tokens in a docker volume |
|
|
42
|
-
| Storage | KV + R2 | Host filesystem under \`~/.olam/\` |
|
|
43
|
-
| Optimized for | **Published-ship**: worlds run autonomously; zero-install contributors; shared team deployments | **Operator-facing**: tight iteration, dogfood, credential vault management, Docker-level introspection |
|
|
44
|
-
| Operator tooling | World lifecycle + OAuth only | Full surface: process inspection, port bridging, tunnel management, planner, credential CRUD, \`gh\`-backed PR listing |
|
|
45
|
-
|
|
46
|
-
**CF is the published-ship substrate.** Once a Worker is deployed, worlds
|
|
47
|
-
run autonomously inside CF Containers. The operator's interactive workflow
|
|
48
|
-
stays on host-cp; CF does not expose host-level APIs (Docker socket, local
|
|
49
|
-
filesystem, \`gh\` CLI) because it has none.
|
|
50
|
-
|
|
51
|
-
**host-cp is the operator-facing substrate.** It exposes the full feature
|
|
52
|
-
surface including Docker orchestration, per-world process inspection, port
|
|
53
|
-
bridging, tunnel management, planning subsystem, and credential vault CRUD.
|
|
54
|
-
Parity with CF is a per-feature design decision, not a contract obligation
|
|
55
|
-
(see [ADR-011](docs/decisions/011-two-substrate-parity.md)).
|
|
56
|
-
|
|
57
|
-
Tokens, workspace configs, and skill bundles live **outside any world**
|
|
58
|
-
on both substrates. Destroying a world never destroys any of them.
|
|
59
|
-
|
|
60
|
-
## Three world-runner tiers
|
|
61
|
-
|
|
62
|
-
Orthogonal to the deploy substrate above, Olam ships three world-runner
|
|
63
|
-
tiers — each tuned for a different runtime-cost shape. Pick by
|
|
64
|
-
cold-start tolerance and task shape:
|
|
65
|
-
|
|
66
|
-
| Tier | Cold start | Use for |
|
|
67
|
-
|---|---|---|
|
|
68
|
-
| \`docker\` | 5–15 s | Heavyweight Claude Agent SDK loops, multi-step coding tasks, anything that needs a full devbox. **Default for \`/goal\`-style world work.** |
|
|
69
|
-
| \`cloudflare-sandbox\` | 2–4 s | Per-task containerised isolation on Cloudflare's edge — same agent capabilities as docker without a host Docker daemon. Use when host Docker is unavailable or for multi-op fan-out. |
|
|
70
|
-
| \`cloudflare-isolate\` | single-digit ms | One-shot RPC tasks: doc lookups, deterministic transforms, keystroke-scale work that doesn't deserve the boot tax. No agent loop, no persistent state, no container. v1 implements \`lookup\` only ([ADR 022](docs/decisions/022-v8-isolate-runtime-tier.md)). |
|
|
71
|
-
|
|
72
|
-
Rule of thumb: if the task is "receive input → call one API or run one
|
|
73
|
-
function → return result" and finishes in <1 s of real work, it belongs
|
|
74
|
-
on the isolate tier. If it needs an agent loop, tool use, or persistent
|
|
75
|
-
file state, it belongs on \`docker\` or \`cloudflare-sandbox\`. The
|
|
76
|
-
per-workspace default is \`compute.default\` in \`.olam/config.yaml\`.
|
|
77
|
-
|
|
78
|
-
## Scope
|
|
79
|
-
|
|
80
|
-
Olam is one monorepo, six surfaces:
|
|
81
|
-
|
|
82
|
-
| Surface | Role |
|
|
83
|
-
|---------|------|
|
|
84
|
-
| **CF Worker** (\`packages/cloudflare-worker/\`) | Edge router, OAuth token exchange, per-world Durable Object, vault (KV + R2), completion-event sink |
|
|
85
|
-
| **Local auth service** (\`packages/auth-service/\`) | Long-lived Linux container running the same OAuth PKCE dance as the Worker; serves tokens to every local world over a shared-secret-authenticated API |
|
|
86
|
-
| **Docker provider** (\`packages/adapters/src/docker/\` + \`packages/control-plane/standalone/\`) | Local runtime: per-world devbox container, in-container control plane on \`:8080\`, credential refresh daemon, PR-gate hook, volume-mounted workspaces |
|
|
87
|
-
| **Sandbox container** (\`packages/cloudflare-worker/container_src/\`) | CF per-world Node 20 + zsh runtime; control plane on \`:8080\`; pre-baked Claude Code, Codex, \`gh\`, Linear/Slack MCPs, tmux, ttyd |
|
|
88
|
-
| **Operator SPA** (\`packages/plan-chat-spa/\`) | React 19 + Vite; the canonical operator SPA, served by **host-cp** locally and on GKE (Phase E5 atomic serving cutover, 2026-05). Reads authoritative state via \`/api/*\` + Electric chunk shapes; planning + non-planning surfaces (workspaces/repos/runbooks/inbox/world editor+events). The legacy \`packages/control-plane/app\` dashboard SPA is retired as host-cp's served bundle (still bundled by the CF Worker pending its own migration) |
|
|
89
|
-
| **MCP + plugin** (\`packages/mcp-server/\`, \`plugin/\`) | Claude Code plugin exposing \`olam_create\`, \`olam_dispatch\`, \`olam_auth_*\`, \`olam_pr_*\`, and friends so the agent can manage worlds without a separate CLI |
|
|
90
|
-
|
|
91
|
-
**What lives inside a world:** a git checkout of one or more repos, a
|
|
92
|
-
running Claude Code tmux session, scoped credentials injected from the
|
|
93
|
-
vault, and whatever artifacts / diffs the agent produces.
|
|
94
|
-
|
|
95
|
-
**What lives outside a world:** the user's identity + credentials
|
|
96
|
-
(KV), the workspace config (KV), the user's skill bundle (R2), and the
|
|
97
|
-
completion ladder's state record (DO). Destroying a world never
|
|
98
|
-
destroys any of these.
|
|
99
|
-
|
|
100
|
-
See [\`docs/architecture/\`](./docs/architecture/README.md) for the
|
|
101
|
-
full nine-part walkthrough.
|
|
102
|
-
|
|
103
|
-
**Operator-facing guide** to the fat-box runtime that ships warm-create:
|
|
104
|
-
[\`docs/guides/fatbox-runtime/\`](./docs/guides/fatbox-runtime/README.md)
|
|
105
|
-
— plain-English walkthrough with mermaid diagrams covering what
|
|
106
|
-
changed across PRs #394 / #398 / #402 / #404, getting started, and
|
|
107
|
-
troubleshooting. **Start here if you've never used \`olam create\`
|
|
108
|
-
before, or if your warm-create is taking the cold path and you don't
|
|
109
|
-
know why.**
|
|
110
|
-
|
|
111
|
-
**For new orgs onboarding to olam**, the **3-contract pattern** is the
|
|
112
|
-
authoring surface. Read these in order before publishing your first
|
|
113
|
-
devbox image:
|
|
114
|
-
|
|
115
|
-
1. [\`devbox-contract.md\`](./docs/architecture/devbox-contract.md) — what
|
|
116
|
-
the devbox image must provide so olam + host-cp can drive it.
|
|
117
|
-
2. [\`manifest-spec.md\`](./docs/architecture/manifest-spec.md) — per-repo
|
|
118
|
-
\`.adb.yaml\` / \`.olam.yaml\` schema, including the
|
|
119
|
-
\`bootstrap[].produces\` annotation that drives Phase 1 warm-create
|
|
120
|
-
sentinel-handoff.
|
|
121
|
-
3. [\`config-spec.md\`](./docs/architecture/config-spec.md) — workspace-
|
|
122
|
-
level \`.olam/config.yaml\` schema, including the
|
|
123
|
-
\`devbox.registry\` provider/prefix block (ghcr / gar / dockerhub)
|
|
124
|
-
and \`image_selectors\` first-match-wins rules.
|
|
125
|
-
|
|
126
|
-
Adjacent runtime doc:
|
|
127
|
-
[\`snapshot-restore.md\`](./docs/architecture/snapshot-restore.md) —
|
|
128
|
-
the warm-create snapshot cache flow, fingerprint design, 5 UX strings,
|
|
129
|
-
and operator FAQ. Read this when you need to understand why
|
|
130
|
-
\`olam create\` sometimes runs the cold path despite a previous
|
|
131
|
-
warm-create on the same workspace.
|
|
132
|
-
|
|
133
|
-
Atlas-shape reference templates: [\`docs/templates/\`](./docs/templates/)
|
|
134
|
-
(\`devbox.atlas.Dockerfile\`, \`manifest.atlas.adb.yaml\`,
|
|
135
|
-
\`config.atlas.olam.yaml\`).
|
|
136
|
-
|
|
137
|
-
---
|
|
138
|
-
|
|
139
|
-
## How it works
|
|
140
|
-
|
|
141
|
-
\`\`\`mermaid
|
|
142
|
-
flowchart LR
|
|
143
|
-
User[User machine]
|
|
144
|
-
User --> Bootstrap["olam bootstrap"]
|
|
145
|
-
Bootstrap --> Smoke[docker info smoke]
|
|
146
|
-
Smoke --> Pulls[("Parallel pull by digest<br/>retry · throttle · coalesce")]
|
|
147
|
-
Pulls --> HostCp["ghcr.io/pleri/olam-host-cp"]
|
|
148
|
-
Pulls --> Auth["ghcr.io/pleri/olam-auth"]
|
|
149
|
-
Pulls --> Devbox["ghcr.io/pleri/olam-devbox"]
|
|
150
|
-
HostCp --> Handshake["protocol-version handshake<br/>(refuse on no-overlap)"]
|
|
151
|
-
Auth --> Handshake
|
|
152
|
-
Devbox --> Handshake
|
|
153
|
-
Handshake --> HostCpStart[olam host-cp start]
|
|
154
|
-
HostCpStart --> AuthUp[olam auth up]
|
|
155
|
-
AuthUp --> AuthLogin["olam auth login<br/>(PKCE; --skip-auth-login to bypass)"]
|
|
156
|
-
AuthLogin --> Create["olam create --task ..."]
|
|
157
|
-
Create --> World[("Devbox world<br/>+ in-world claude-main")]
|
|
158
|
-
World --> Ladder["Completion ladder<br/>draft → recommendations →<br/>adversarial_review → audit_passed →<br/>pr_eligible → pr_opened"]
|
|
159
|
-
\`\`\`
|
|
160
|
-
|
|
161
|
-
\`olam setup\` is the canonical fresh-host wizard (default substrate:
|
|
162
|
-
kubernetes/k3d; see [Quick start](#quick-start)). The diagram above
|
|
163
|
-
shows \`olam bootstrap\` — the **docker-compose** on-ramp it delegates to
|
|
164
|
-
on the docker path (and the direct entry point for CI / scripted
|
|
165
|
-
contexts). \`bootstrap\` fans out three GHCR pulls in parallel
|
|
166
|
-
(digest-pinned, single in-flight per ref, single bounded retry on
|
|
167
|
-
transient failure), verifies every pulled image's
|
|
168
|
-
\`olam.protocol.versions\` label overlaps the CLI's, then drives
|
|
169
|
-
\`host-cp start\` + \`auth up\` + \`auth login\` to a working stack. Exit
|
|
170
|
-
codes are explicit: \`3\` = pull failed, \`4\` = protocol mismatch.
|
|
171
|
-
|
|
172
|
-
---
|
|
173
|
-
|
|
174
|
-
## Quick start
|
|
175
|
-
|
|
176
|
-
**Two paths: Kubernetes (default, full-featured) or Docker Compose (lighter, for CI).**
|
|
177
|
-
|
|
178
|
-
### Kubernetes (recommended)
|
|
179
|
-
|
|
180
|
-
\`\`\`bash
|
|
181
|
-
curl -fsSL https://olam.bar.dev/install | sh
|
|
182
|
-
olam setup
|
|
183
|
-
\`\`\`
|
|
184
|
-
|
|
185
|
-
The installer puts \`@pleri/olam-cli\` on your PATH (requires Node.js ≥ 20 and npm). \`olam setup\` installs k3d (if absent), creates a local Kubernetes cluster named \`olam-dev\`, and brings up the full peripheral stack (host-cp, auth-service, mcp-auth-service, kg-service, memory-service). Works on macOS and Linux. No source checkout required. The setup wizard is **idempotent** — re-running skips steps that are already complete.
|
|
186
|
-
|
|
187
|
-
Full setup guide (prereqs, observability, troubleshooting):
|
|
188
|
-
[\`docs/onboarding/k3s-mode-setup.md\`](./docs/onboarding/k3s-mode-setup.md).
|
|
189
|
-
|
|
190
|
-
### Docker Compose (lighter alternative)
|
|
191
|
-
|
|
192
|
-
For hosts that can't run a Kubernetes cluster locally, or for CI:
|
|
193
|
-
|
|
194
|
-
\`\`\`bash
|
|
195
|
-
curl -fsSL https://olam.bar.dev/install | sh
|
|
196
|
-
olam setup --substrate=docker
|
|
197
|
-
\`\`\`
|
|
198
|
-
|
|
199
|
-
This runs three host containers (auth, mcp-auth, kg-service) via docker compose instead of a full cluster. Existing docker-compose installs are protected: \`~/.olam/config.json\` with \`host.substrate: 'compose'\` continues on docker with a migration hint.
|
|
200
|
-
|
|
201
|
-
Full setup guide for compose mode: [\`docs/onboarding/fresh-machine-setup.md\`](./docs/onboarding/fresh-machine-setup.md).
|
|
202
|
-
|
|
203
|
-
### Create your first world
|
|
204
|
-
|
|
205
|
-
After setup completes, every world is one call:
|
|
206
|
-
|
|
207
|
-
\`\`\`bash
|
|
208
|
-
olam create --name my-world --task "audit the auth module for SSRF"
|
|
209
|
-
\`\`\`
|
|
210
|
-
|
|
211
|
-
Open the dashboard URL in your browser — you'll see the world provisioning, credentials flowing in from the vault, and your task dispatching to an in-world Claude session.
|
|
212
|
-
|
|
213
|
-
---
|
|
214
|
-
|
|
215
|
-
## Setup
|
|
216
|
-
|
|
217
|
-
### Install the CLI
|
|
218
|
-
|
|
219
|
-
\`\`\`sh
|
|
220
|
-
curl -fsSL https://olam.bar.dev/install | sh
|
|
221
|
-
\`\`\`
|
|
222
|
-
|
|
223
|
-
The installer is POSIX-clean (works under \`dash\`, \`sh\`, or \`bash\`) and
|
|
224
|
-
publishes from npmjs.org. It checks for **Node.js ≥ 20** (hard
|
|
225
|
-
requirement) and \`npm\`, then runs \`npm install -g @pleri/olam-cli\`.
|
|
226
|
-
Use \`OLAM_CHANNEL=canary\` to track the prerelease tag.
|
|
227
|
-
|
|
228
|
-
### Bring up the stack
|
|
229
|
-
|
|
230
|
-
\`\`\`bash
|
|
231
|
-
olam setup # k3d cluster + full peripheral stack (default)
|
|
232
|
-
olam setup -y # non-interactive: auto-affirm every prompt
|
|
233
|
-
olam setup --substrate=docker # docker compose mode (3 containers, no cluster)
|
|
234
|
-
olam setup --cluster-name foo # use a different k3d cluster name (default: olam-dev)
|
|
235
|
-
\`\`\`
|
|
236
|
-
|
|
237
|
-
\`olam setup\` is the canonical fresh-host wizard. It's substrate-aware: the default is **kubernetes** (k3d), which installs k3d (via brew on macOS, else the upstream install script), creates the \`olam-dev\` cluster, applies all manifests, and verifies every deployment is \`1/1 Running\`. Pass \`-y\` to skip all prompts, or \`--substrate=docker\` to run the lighter compose path instead.
|
|
238
|
-
|
|
239
|
-
Artifacts land under \`~/.olam/\` on the host:
|
|
240
|
-
|
|
241
|
-
- \`~/.olam/auth-secret\` — shared secret (\`0600\`) generated on first
|
|
242
|
-
\`auth up\`; authenticates every world's requests to the auth-service.
|
|
243
|
-
- \`~/.olam/worlds/<world-id>/\` — per-world worktree + thought DB.
|
|
244
|
-
- \`~/.olam/worlds.db\` — world registry.
|
|
245
|
-
- \`~/.olam/upgrade.log\` — JSONL audit log of every \`olam upgrade\` invocation.
|
|
246
|
-
|
|
247
|
-
### Legacy: \`olam bootstrap\`
|
|
248
|
-
|
|
249
|
-
\`olam bootstrap\` targets the **docker compose** substrate directly (it pulls three
|
|
250
|
-
digest-pinned GHCR images and starts them via compose). It remains the on-ramp for
|
|
251
|
-
the docker path in CI and scripted contexts:
|
|
252
|
-
|
|
253
|
-
\`\`\`bash
|
|
254
|
-
olam bootstrap # pull host-cp + auth + devbox by digest, start services, run auth login
|
|
255
|
-
olam bootstrap --with-smoke # also create a smoke-test world to verify end-to-end
|
|
256
|
-
olam bootstrap --skip-auth-login # CI / scripted use; equivalent to OLAM_BOOTSTRAP_SKIP_AUTH_LOGIN=1
|
|
257
|
-
olam bootstrap --registry ghcr.io/pleri # override the registry prefix
|
|
258
|
-
\`\`\`
|
|
259
|
-
|
|
260
|
-
After bootstrap completes, every subsequent world is one call:
|
|
261
|
-
|
|
262
|
-
\`\`\`bash
|
|
263
|
-
olam create --name my-world --task "audit the auth module for SSRF"
|
|
264
|
-
\`\`\`
|
|
265
|
-
|
|
266
|
-
### Cloudflare deploy
|
|
267
|
-
|
|
268
|
-
Required for a shared team deployment. Needs a Cloudflare Workers Paid
|
|
269
|
-
plan (DO + Containers), \`wrangler\`, and a CF Access application gating
|
|
270
|
-
your Worker URL.
|
|
271
|
-
|
|
272
|
-
\`\`\`bash
|
|
273
|
-
cp .env.example .env.local
|
|
274
|
-
# Edit .env.local
|
|
275
|
-
\`\`\`
|
|
276
|
-
|
|
277
|
-
The canonical keys (see [\`docs/CF_WORLDS_SPEC.md\`](./docs/CF_WORLDS_SPEC.md) §3):
|
|
278
|
-
|
|
279
|
-
\`\`\`sh
|
|
280
|
-
# Deploy plane
|
|
281
|
-
CLOUDFLARE_API_TOKEN=<wrangler OAuth or API token with workers:write>
|
|
282
|
-
|
|
283
|
-
# CF Access admin (only needed when running scripts/setup-access.mjs)
|
|
284
|
-
CF_API_TOKEN=<token with Access: Apps and Policies:Edit + Service Tokens:Edit>
|
|
285
|
-
|
|
286
|
-
# MCP / CLI machine auth (CF Access service token + Pylon outbound auth).
|
|
287
|
-
# Worker auth migrated to Pylon scoped tokens in PR #31; see
|
|
288
|
-
# docs/migrations/mcp-pylon.md for the operator setup.
|
|
289
|
-
OLAM_WORKER_URL=https://<your-worker>.workers.dev
|
|
290
|
-
OLAM_CF_ACCESS_CLIENT_ID=<uuid>.access
|
|
291
|
-
OLAM_CF_ACCESS_CLIENT_SECRET=<long secret>
|
|
292
|
-
OLAM_PYLON_ORG_URL=https://pylon.<your-org>.dev
|
|
293
|
-
OLAM_PYLON_ORG_ID=<your-org-slug>
|
|
294
|
-
# PYLON_SESSION_TOKEN auto-resolved from macOS Keychain / Linux Secret
|
|
295
|
-
# Service after \`pylon login\`; only needed in CI / headless contexts.
|
|
296
|
-
|
|
297
|
-
# Container runtime policy (optional; default=bypass)
|
|
298
|
-
OLAM_CLAUDE_PERMISSION_MODE=bypass # or "accept-edits" / "strict"
|
|
299
|
-
\`\`\`
|
|
300
|
-
|
|
301
|
-
\`\`\`bash
|
|
302
|
-
cd packages/cloudflare-worker
|
|
303
|
-
pnpm wrangler deploy
|
|
304
|
-
\`\`\`
|
|
305
|
-
|
|
306
|
-
Wrangler builds the container image, pushes to CF's registry, and
|
|
307
|
-
binds the \`Sandbox\` Durable Object + \`OLAM_CREDS\` / \`OLAM_WORKSPACES\`
|
|
308
|
-
KV + \`OLAM_USER_PROFILES\` R2. Authenticate once with
|
|
309
|
-
\`cloudflared access login https://<your-worker>.workers.dev\` — every
|
|
310
|
-
subsequent world auto-injects from the vault.
|
|
311
|
-
|
|
312
|
-
---
|
|
313
|
-
|
|
314
|
-
### Claude Code plugin (both paths)
|
|
315
|
-
|
|
316
|
-
\`\`\`bash
|
|
317
|
-
claude plugin install ./plugin
|
|
318
|
-
\`\`\`
|
|
319
|
-
|
|
320
|
-
You now have \`/olam:create\`, \`/olam:dispatch\`, \`/olam:destroy\`,
|
|
321
|
-
\`/olam:list\`, \`/olam:enter\`, \`/olam:status\`, \`/olam:auth_*\`, and
|
|
322
|
-
\`/olam:pr_*\` available in Claude Code.
|
|
323
|
-
|
|
324
|
-
---
|
|
325
|
-
|
|
326
|
-
### MCP server (Claude Code integration)
|
|
327
|
-
|
|
328
|
-
The CLI bundles an MCP server that exposes \`olam_create\`,
|
|
329
|
-
\`olam_dispatch\`, \`olam_destroy\`, \`olam_list\`, \`olam_status\`,
|
|
330
|
-
\`olam_enter\`, \`olam_pr\`, \`olam_observe\`, \`olam_lane_*\`, and
|
|
331
|
-
\`olam_capture_view\` as direct tool calls for any MCP-aware agent
|
|
332
|
-
runtime. Three ways to wire it in:
|
|
333
|
-
|
|
334
|
-
**One command (recommended):**
|
|
335
|
-
|
|
336
|
-
\`\`\`bash
|
|
337
|
-
olam mcp install # default --scope=user
|
|
338
|
-
olam mcp install --scope=project # writes to project .mcp.json
|
|
339
|
-
olam mcp uninstall # idempotent; symmetric
|
|
340
|
-
\`\`\`
|
|
341
|
-
|
|
342
|
-
Auto-detects whether \`olam\` is on PATH. If so, writes
|
|
343
|
-
\`command: "olam"\` (no \`npx\` cold-start). Otherwise falls back to
|
|
344
|
-
\`command: "npx", args: ["-y", "@pleri/olam-cli", "mcp", "serve"]\`.
|
|
345
|
-
|
|
346
|
-
**Paste the JSON snippet** into \`~/.claude.json\` (user scope) or a
|
|
347
|
-
project's \`.mcp.json\`:
|
|
348
|
-
|
|
349
|
-
\`\`\`json
|
|
350
|
-
{
|
|
351
|
-
"mcpServers": {
|
|
352
|
-
"olam": {
|
|
353
|
-
"command": "npx",
|
|
354
|
-
"args": ["-y", "@pleri/olam-cli", "mcp", "serve"]
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
\`\`\`
|
|
359
|
-
|
|
360
|
-
**Marketplace alias** — \`olam --mcp\` is a thin alias for
|
|
361
|
-
\`olam mcp serve\`. Use when an MCP-marketplace snippet expects the
|
|
362
|
-
bare-flag convention (\`npx -y <pkg> --mcp\`).
|
|
363
|
-
|
|
364
|
-
Restart Claude Code; verify with \`claude mcp list\` (look for \`olam\`).
|
|
365
|
-
Full details + version-skew + cold-start trade-offs:
|
|
366
|
-
[\`docs/architecture/mcp-as-npx-served.md\`](docs/architecture/mcp-as-npx-served.md).
|
|
367
|
-
|
|
368
|
-
---
|
|
369
|
-
|
|
370
|
-
## Usage
|
|
371
|
-
|
|
372
|
-
### Autonomous Build: seed → world → PR gate
|
|
373
|
-
|
|
374
|
-
In Claude Code:
|
|
375
|
-
|
|
376
|
-
\`\`\`
|
|
377
|
-
/olam:create "audit the auth module for SSRF vulnerabilities"
|
|
378
|
-
\`\`\`
|
|
379
|
-
|
|
380
|
-
That's it. The plugin calls the Worker, the Worker provisions a
|
|
381
|
-
sandbox, creds flow in from the vault, claude-main boots and
|
|
382
|
-
auto-dispatches the task. The dashboard URL prints in the tool output
|
|
383
|
-
(\`https://<your-worker>.workers.dev/sandbox/<uuid>/\`).
|
|
384
|
-
|
|
385
|
-
Open that URL and you'll see:
|
|
386
|
-
|
|
387
|
-
- The **seed of thought** pinned at the top (immutable subject).
|
|
388
|
-
- A **phase progress strip** — \`created → syncing → cloning →
|
|
389
|
-
configuring → warming → ready → task_running\`. Warming renders a
|
|
390
|
-
narration of the probe: *tmux session starting → claude is booting
|
|
391
|
-
· waiting for prompt → shell spawn check → ready*.
|
|
392
|
-
- The **completion ladder** — 6 steps from \`draft\` to \`pr_opened\`,
|
|
393
|
-
each lit when its named actor files the event (Claude Stop hook,
|
|
394
|
-
Codex reviewer, audit session, gh PR-open).
|
|
395
|
-
- A **terminal button** (top-right) that opens a full-screen ttyd
|
|
396
|
-
attached to \`claude-main\`.
|
|
397
|
-
- A **session-health bar** that shows a red banner with the warmup
|
|
398
|
-
trace if anything breaks during spawn.
|
|
399
|
-
|
|
400
|
-
Everything is a projection of the authoritative state on the DO. If
|
|
401
|
-
the container gets evicted mid-run, the dashboard's auto-resume hook
|
|
402
|
-
silently re-injects creds and re-spawns claude — no Auth modal, no
|
|
403
|
-
lost context.
|
|
404
|
-
|
|
405
|
-
### Lifecycle commands
|
|
406
|
-
|
|
407
|
-
| Command | Effect |
|
|
408
|
-
|---------|--------|
|
|
409
|
-
| \`/olam:create <task>\` | Provision a world, dispatch the task, return dashboard URL |
|
|
410
|
-
| \`/olam:list\` | Recent worlds + phases |
|
|
411
|
-
| \`/olam:enter <world>\` | Pop the dashboard URL for an existing world |
|
|
412
|
-
| \`/olam:status <world>\` | Phase + completion state + session health |
|
|
413
|
-
| \`/olam:dispatch <world> <task>\` | Send another prompt into the existing tmux session |
|
|
414
|
-
| \`/olam:destroy <world>\` | Hard destroy (DO evict + container down) |
|
|
415
|
-
|
|
416
|
-
### Self-upgrade — pull-by-digest from GHCR
|
|
417
|
-
|
|
418
|
-
\`olam upgrade\` defaults to **pull-by-digest from GHCR**. The CLI's
|
|
419
|
-
pinned image-digest set is round-tripped through \`/api/version/status\`
|
|
420
|
-
so success means "host-cp reports the new SHA". The legacy
|
|
421
|
-
build-from-source path lives behind \`--from-source\` and only works in
|
|
422
|
-
a monorepo checkout with \`OLAM_DEV=1\`.
|
|
423
|
-
|
|
424
|
-
\`\`\`bash
|
|
425
|
-
olam upgrade -y # default: pull pinned digests, retag, recreate host-cp + auth + devbox
|
|
426
|
-
olam upgrade --rollback # restore the prior canonical tag set from :olam-rollback
|
|
427
|
-
olam upgrade --force # allow swap even if HEAD has drifted from captured-at-pull SHA
|
|
428
|
-
olam upgrade --no-cache # DOCKER_BUILD_NO_CACHE=1 across all three builds (--from-source path)
|
|
429
|
-
olam upgrade --history -n 5 # print the last 5 rows of ~/.olam/upgrade.log
|
|
430
|
-
olam upgrade --history -n 20 --json # same, JSONL — pipeable to jq
|
|
431
|
-
olam upgrade --branch main -y # switch branches first (refuses on dirty tree)
|
|
432
|
-
olam upgrade --from-source -y # legacy: rebuild all three images from monorepo source (needs OLAM_DEV=1)
|
|
433
|
-
\`\`\`
|
|
434
|
-
|
|
435
|
-
The success criterion is an **atomic 6-tag swap**: the prior canonical
|
|
436
|
-
tags (\`olam-host-cp:latest\`, \`olam-auth:latest\`, \`olam-devbox:latest\`)
|
|
437
|
-
are preserved as \`:olam-rollback\`, then the new pulled images become
|
|
438
|
-
canonical. \`auth upgrade\` follows the same pattern. Every invocation
|
|
439
|
-
appends a JSONL row to \`~/.olam/upgrade.log\` (verdict, captured SHA,
|
|
440
|
-
elapsed, exit code) so a post-mortem is always one \`--history --json\`
|
|
441
|
-
away.
|
|
442
|
-
|
|
443
|
-
\`olam auth upgrade\` mirrors the same default: pull-by-digest unless
|
|
444
|
-
\`--from-source\` is specified.
|
|
445
|
-
|
|
446
|
-
**Release cadence (post \`actions-cost-reduce\` Phase A, 2026-05-13):**
|
|
447
|
-
Releases are now hand-cranked. Merges to \`main\` no longer auto-publish
|
|
448
|
-
new images. To ship a release:
|
|
449
|
-
|
|
450
|
-
\`\`\`bash
|
|
451
|
-
gh release create v0.1.NNN --target main --generate-notes --title "v0.1.NNN"
|
|
452
|
-
\`\`\`
|
|
453
|
-
|
|
454
|
-
See [\`docs/architecture/release-flow.md\`](./docs/architecture/release-flow.md)
|
|
455
|
-
for the full flow — what fires under the hood, the \`[skip ci]\` semantics,
|
|
456
|
-
the manual \`workflow_dispatch\` escape hatch, and how to revert.
|
|
457
|
-
|
|
458
|
-
See
|
|
459
|
-
[\`packages/cli/skills/olam-upgrade/SKILL.md\`](packages/cli/skills/olam-upgrade/SKILL.md)
|
|
460
|
-
for the full flag matrix, swap-boundary semantics, and recovery
|
|
461
|
-
playbook.
|
|
462
|
-
|
|
463
|
-
### Programmatic \`/session/start\`
|
|
464
|
-
|
|
465
|
-
For callers that aren't Claude Code (CI, audits, scripted batches):
|
|
466
|
-
|
|
467
|
-
\`\`\`bash
|
|
468
|
-
curl -X POST "$OLAM_WORKER_URL/session/start" \\
|
|
469
|
-
-H "Content-Type: application/json" \\
|
|
470
|
-
-H "CF-Access-Client-Id: $OLAM_CF_ACCESS_CLIENT_ID" \\
|
|
471
|
-
-H "CF-Access-Client-Secret: $OLAM_CF_ACCESS_CLIENT_SECRET" \\
|
|
472
|
-
-d '{
|
|
473
|
-
"workspace": "ein-sof",
|
|
474
|
-
"task": "audit the auth module for SSRF vulnerabilities",
|
|
475
|
-
"engineerHash": "anonymous",
|
|
476
|
-
"repoUrl": "workspace://ein-sof",
|
|
477
|
-
"branch": "main",
|
|
478
|
-
"userEmail": "you@example.com"
|
|
479
|
-
}'
|
|
480
|
-
\`\`\`
|
|
481
|
-
|
|
482
|
-
The \`userEmail\` override keys the vault lookup when you're calling on
|
|
483
|
-
behalf of a known user via a service token.
|
|
484
|
-
|
|
485
|
-
### Dashboard SPA dev run
|
|
486
|
-
|
|
487
|
-
The canonical SPA is \`@olam/plan-chat-spa\` — host-cp's sole served
|
|
488
|
-
bundle (the legacy \`packages/control-plane/app/\` is sunset). Run it
|
|
489
|
-
locally with Vite:
|
|
490
|
-
|
|
491
|
-
\`\`\`bash
|
|
492
|
-
npm run dev --workspace=@olam/plan-chat-spa # Vite dev server
|
|
493
|
-
npm run build --workspace=@olam/plan-chat-spa # tsc -b + vite build
|
|
494
|
-
\`\`\`
|
|
495
|
-
|
|
496
|
-
For the CF-edge dev loop (SPA assets bundled into the Worker via
|
|
497
|
-
\`wrangler.jsonc\`'s \`assets\` field; served directly through CF Access
|
|
498
|
-
SSO), run the worker:
|
|
499
|
-
|
|
500
|
-
\`\`\`bash
|
|
501
|
-
npm run dev --workspace=@olam/cloudflare-worker # wrangler dev
|
|
502
|
-
\`\`\`
|
|
503
|
-
|
|
504
|
-
### PLERI is optional
|
|
505
|
-
|
|
506
|
-
\`PLERI_BASE_URL\` (and the corresponding \`pleri:\` block in
|
|
507
|
-
\`.olam/config.yaml\`) is an **optional team-intelligence integration**;
|
|
508
|
-
required only for \`olam crystallize\` and team-mode features that share
|
|
509
|
-
thought graphs to a Pleri Plane. Fresh installs without PLERI work end
|
|
510
|
-
to end — \`olam create\`, \`olam dispatch\`, \`olam list\`, \`olam destroy\`
|
|
511
|
-
all behave normally. \`olam crystallize\` on a non-PLERI machine emits a
|
|
512
|
-
one-line stderr warn and exits with named code 2 (distinguishable from
|
|
513
|
-
exit-0 success and exit-1 errors for piped scripts), and is hidden
|
|
514
|
-
from \`olam --help\` until PLERI is configured. See
|
|
515
|
-
[\`packages/cli/src/exit-codes.ts\`](packages/cli/src/exit-codes.ts) for
|
|
516
|
-
the full exit-code registry.
|
|
517
|
-
|
|
518
|
-
### Tests
|
|
519
|
-
|
|
520
|
-
This repo uses **npm workspaces** (\`npm run <script> --workspace=<pkg>\`):
|
|
521
|
-
|
|
522
|
-
\`\`\`bash
|
|
523
|
-
# Container + intelligence pipeline
|
|
524
|
-
npm run test --workspace=@olam/cloudflare-worker
|
|
525
|
-
npm run test --workspace=@olam/intelligence
|
|
526
|
-
|
|
527
|
-
# Core + adapters
|
|
528
|
-
npm run test --workspace=@olam/core
|
|
529
|
-
|
|
530
|
-
# CLI (default sweep excludes the docker-integration suite — see CLAUDE.md)
|
|
531
|
-
npm test --workspace=@pleri/olam-cli
|
|
532
|
-
npm run test:cli:integration # the excluded docker-integration suite
|
|
533
|
-
\`\`\`
|
|
534
|
-
|
|
535
|
-
---
|
|
536
|
-
|
|
537
|
-
## Paradigms
|
|
538
|
-
|
|
539
|
-
Three ideas do most of the work. Every other design choice is
|
|
540
|
-
downstream of these.
|
|
541
|
-
|
|
542
|
-
### Auth container
|
|
543
|
-
|
|
544
|
-
An Olam world should boot **already authenticated to Claude**, with no
|
|
545
|
-
browser popup, no keychain prompt, no \`docker cp\` race. The CF path
|
|
546
|
-
solves this with the Worker doing OAuth at the edge and KV storing
|
|
547
|
-
refresh tokens. The local path mirrors that shape: a long-lived Linux
|
|
548
|
-
**auth container** at \`:9999\` runs the same OAuth PKCE dance, stores
|
|
549
|
-
tokens in a named docker volume, and serves fresh access tokens over
|
|
550
|
-
an HTTP API secured by a host-generated shared secret (\`~/.olam/auth-secret\`,
|
|
551
|
-
\`0600\`).
|
|
552
|
-
|
|
553
|
-
Lifecycle:
|
|
554
|
-
|
|
555
|
-
\`\`\`
|
|
556
|
-
olam auth up # start the container (idempotent)
|
|
557
|
-
olam auth login # one-time PKCE; opens browser, paste code back
|
|
558
|
-
olam auth status # show container state + valid accounts
|
|
559
|
-
\`\`\`
|
|
560
|
-
|
|
561
|
-
When a world is created, the docker provider injects the shared secret
|
|
562
|
-
as \`OLAM_AUTH_SECRET\` into the devbox container. On boot, the in-world
|
|
563
|
-
\`entrypoint.sh\` runs \`fetch-creds.mjs\` which fetches a fresh access
|
|
564
|
-
token from \`http://host.docker.internal:9999/credentials\` and writes
|
|
565
|
-
\`~/.claude/.credentials.json\` atomically. A background loop refreshes
|
|
566
|
-
every six hours. The refresh token never leaves the auth container.
|
|
567
|
-
|
|
568
|
-
**Provenance, not ambient.** The token a world uses is provably the
|
|
569
|
-
token the auth container issued — same first-14 bytes, same
|
|
570
|
-
\`expiresAt\`, written after \`fetch-creds\` runs. \`gh\` tokens are a
|
|
571
|
-
separate concern (baked into the devbox image).
|
|
572
|
-
|
|
573
|
-
Full CF ↔ local parity lives in
|
|
574
|
-
[\`docs/architecture/\`](./docs/architecture/README.md) and
|
|
575
|
-
[\`packages/auth-service/\`](./packages/auth-service/).
|
|
576
|
-
|
|
577
|
-
### KG-service container
|
|
578
|
-
|
|
579
|
-
For symbol-shaped queries ("who calls \`Cart#submit\`?", "where is
|
|
580
|
-
\`hydrateOrder\` defined?") agents should reach for a knowledge graph,
|
|
581
|
-
not \`grep\`. Olam ships a long-running **\`olam-kg-service\` container**
|
|
582
|
-
at \`127.0.0.1:9997\` that holds a Python HTTP server with bge-small
|
|
583
|
-
embeddings + a 4-layer classifier in memory. Operators install
|
|
584
|
-
nothing beyond Docker.
|
|
585
|
-
|
|
586
|
-
\`\`\`
|
|
587
|
-
olam services up # starts kg-service alongside auth + mcp-auth
|
|
588
|
-
olam kg classify "trace cart to order"
|
|
589
|
-
olam kg install-hook # writes a PreToolUse Bash hook into .claude/settings.json
|
|
590
|
-
olam kg doctor # 4-probe health check
|
|
591
|
-
\`\`\`
|
|
592
|
-
|
|
593
|
-
The hook fires on grep/find-shape Bash commands and emits
|
|
594
|
-
\`additionalContext\` when the classifier suggests the KG is a better
|
|
595
|
-
route than grep. It's fail-open: \`curl --max-time 1\` means a slow or
|
|
596
|
-
unreachable kg-service never blocks the agent.
|
|
597
|
-
|
|
598
|
-
**World parity.** Every world's \`entrypoint.sh\` installs the same hook
|
|
599
|
-
pointing at \`host.docker.internal:9997\` so devbox containers reach the
|
|
600
|
-
host's kg-service through Docker's host-gateway mapping. Single model
|
|
601
|
-
copy serves host + every world.
|
|
602
|
-
|
|
603
|
-
**Why a container, not a host CLI?** Latency. Measured options:
|
|
604
|
-
\`docker run --rm\` per call ≈ 43 s (dead), \`docker exec\` fresh Python
|
|
605
|
-
≈ 970 ms (too slow), persistent Python HTTP server in container ≈
|
|
606
|
-
37 ms p50 (viable). The full reasoning is in
|
|
607
|
-
[ADR 017](./docs/decisions/017-kg-service-container.md).
|
|
608
|
-
|
|
609
|
-
Architecture: [\`docs/architecture/kg-service.md\`](./docs/architecture/kg-service.md)
|
|
610
|
-
(operator guide, HTTP contract, troubleshooting) +
|
|
611
|
-
[\`docs/architecture/kg-classifier.md\`](./docs/architecture/kg-classifier.md)
|
|
612
|
-
(4-layer internals + accuracy bench).
|
|
613
|
-
|
|
614
|
-
### Autonomous Build
|
|
615
|
-
|
|
616
|
-
\`\`\`
|
|
617
|
-
olam create --name my-world --task "describe the work"
|
|
618
|
-
\`\`\`
|
|
619
|
-
|
|
620
|
-
That's the whole user-facing contract. The system builds autonomously
|
|
621
|
-
from the seed to the PR-gate checkpoint — past that point the
|
|
622
|
-
[PR gate](#pr-gate) holds for human or Codex approval before anything
|
|
623
|
-
lands on GitHub. "Autonomous" describes the control boundary honestly:
|
|
624
|
-
independent from seed through branch-push, gated at PR creation.
|
|
625
|
-
|
|
626
|
-
Everything between the single command and the gate is handled
|
|
627
|
-
internally:
|
|
628
|
-
|
|
629
|
-
1. **Preflight** — verifies the auth container is up and has ≥1 valid
|
|
630
|
-
account; fails fast with a one-line remedy if not.
|
|
631
|
-
2. **World provisioning** — worktree, env, service containers, devbox.
|
|
632
|
-
3. **Credential injection** — via \`fetch-creds.mjs\` on container boot
|
|
633
|
-
(not host-side \`docker cp\`, which raced Claude's first read).
|
|
634
|
-
4. **Auto-dispatch** — task lands in the in-world Claude session.
|
|
635
|
-
5. **Background refresh** — token rotates every 6 h for the life of
|
|
636
|
-
the world.
|
|
637
|
-
|
|
638
|
-
One call from the user. Preflight + retries + refresh + atomic writes
|
|
639
|
-
live inside — per Codex's adversarial note, the client intent is
|
|
640
|
-
singular; the orchestration stays.
|
|
641
|
-
|
|
642
|
-
### PR gate
|
|
643
|
-
|
|
644
|
-
"Autonomous" only holds up to the gate. Every Claude-driven
|
|
645
|
-
\`gh pr create\` inside a world is intercepted:
|
|
646
|
-
|
|
647
|
-
\`\`\`
|
|
648
|
-
olam pr list # every pending gate across every world
|
|
649
|
-
olam pr show <id> # full diff + commit log + command
|
|
650
|
-
olam pr approve <id> --reason "lgtm" # let gh pr create proceed
|
|
651
|
-
olam pr reject <id> --reason "leaks" # hook exits 2, Claude sees a tool error
|
|
652
|
-
\`\`\`
|
|
653
|
-
|
|
654
|
-
Under the hood: a PreToolUse hook (\`/opt/olam/scripts/pr-gate-hook.mjs\`)
|
|
655
|
-
installed via project-level \`.claude/settings.json\` intercepts
|
|
656
|
-
\`gh pr create\` calls, POSTs to \`http://127.0.0.1:8080/api/pr-gate\` in
|
|
657
|
-
the world, and polls \`/verdict\` until a decision lands. The control
|
|
658
|
-
plane persists each gate to \`/workspace/.olam/pr-gates/{id}.json\`.
|
|
659
|
-
Codex adversarial review is the planned second decision source — when
|
|
660
|
-
it agrees, the gate auto-approves; when it pushes back, a human
|
|
661
|
-
deconflicts via \`olam pr approve/reject\` or the dashboard.
|
|
662
|
-
|
|
663
|
-
MCP parity (\`olam_pr_{list,show,approve,reject}\`) means the same
|
|
664
|
-
decisions can come from an agent instead of a human.
|
|
665
|
-
|
|
666
|
-
---
|
|
667
|
-
|
|
668
|
-
## Philosophy
|
|
669
|
-
|
|
670
|
-
1. **The thought is the artifact.** Code is a side effect. If you can
|
|
671
|
-
see the reasoning — every tool call, every review verdict, every
|
|
672
|
-
audit result — you can debug decisions, not just bugs.
|
|
673
|
-
|
|
674
|
-
2. **Worlds are disposable.** Create them freely. Destroy them without
|
|
675
|
-
remorse. The vault survives. The completion ladder's evidence
|
|
676
|
-
survives. Ephemeral container state does not.
|
|
677
|
-
|
|
678
|
-
3. **Isolation is the default.** One sandbox per world. No shared
|
|
679
|
-
filesystem, no shared tmux, no shared port. Parallel agents work
|
|
680
|
-
without stepping on each other. Blast radius is always one world.
|
|
681
|
-
|
|
682
|
-
4. **The agent manages infrastructure.** You don't learn Worker
|
|
683
|
-
routes, DO names, or tmux send-keys. You say "create a world for
|
|
684
|
-
X"; Claude does the rest.
|
|
685
|
-
|
|
686
|
-
5. **"Done" is an explicit ladder, not an inference.** Olam encodes
|
|
687
|
-
completion as a monotone state machine: \`draft → recommendations →
|
|
688
|
-
adversarial_review → audit_passed → pr_eligible → pr_opened\`. Each
|
|
689
|
-
gate has a named author and captured evidence. The dashboard reads
|
|
690
|
-
state — it never guesses. A PR opens only when every prior gate
|
|
691
|
-
has filed its event.
|
|
692
|
-
|
|
693
|
-
6. **Policy is deploy-owned, not code-baked.** \`OLAM_CLAUDE_PERMISSION_MODE\`
|
|
694
|
-
decides bypass vs accept-edits vs strict at the environment level;
|
|
695
|
-
isolation reduces blast radius but doesn't justify a hard-coded
|
|
696
|
-
default. Auditable, toggleable, rotatable — all without a code
|
|
697
|
-
change.
|
|
698
|
-
|
|
699
|
-
7. **Everything composes.** Olam is a Claude Code plugin + a CF
|
|
700
|
-
Worker, not a standalone product. It augments your existing
|
|
701
|
-
workflow rather than replacing it.
|
|
702
|
-
|
|
703
|
-
---
|
|
704
|
-
|
|
705
|
-
## Status
|
|
706
|
-
|
|
707
|
-
- **\`olam setup\` is the canonical on-ramp.** Substrate-aware wizard;
|
|
708
|
-
default kubernetes/k3d, \`--substrate=docker\` for the lighter compose
|
|
709
|
-
path. It delegates to \`olam bootstrap\` on the docker path, which
|
|
710
|
-
pulls all three GHCR images by digest in parallel, verifies
|
|
711
|
-
protocol-version overlap, and drives services + auth-login to a
|
|
712
|
-
working stack. Exit codes \`3\` (pull failed) and \`4\` (protocol
|
|
713
|
-
mismatch) are explicit.
|
|
714
|
-
- **Self-upgrade pipeline**: pull-by-digest is the default;
|
|
715
|
-
\`--from-source\` is gated behind \`OLAM_DEV=1\` + monorepo. Atomic
|
|
716
|
-
6-tag swap with \`--rollback\`, \`--force\`, \`--no-cache\`, and
|
|
717
|
-
\`--history [-n N] [--json]\` flags. JSONL audit at
|
|
718
|
-
\`~/.olam/upgrade.log\`.
|
|
719
|
-
- **GHCR release pipeline**: \`release.yml\` publishes via native
|
|
720
|
-
arm64 + amd64 matrix runners using \`build-push-action@v6\` and
|
|
721
|
-
per-arch registry cache (\`<image>-cache:{amd64,arm64}\`). Wall-clock
|
|
722
|
-
collapsed from 8–12 m to 3–5 m.
|
|
723
|
-
- **CI watchdog (Phase C)**: wake-and-dispatch with PR-identity
|
|
724
|
-
validation, retry budget gated on real dispatches (\`wakes\`), and
|
|
725
|
-
API-side log-tail fetch from
|
|
726
|
-
\`api.github.com/.../actions/runs/{run_id}/logs\`. Six audit findings
|
|
727
|
-
closed in PR #292. Canonical sequence diagram lives in
|
|
728
|
-
[\`docs/design/ci-watchdog.md\`](./docs/design/ci-watchdog.md).
|
|
729
|
-
- **CF platform**: Sandbox + DO-owned state + completion ladder
|
|
730
|
-
shipped. Auto-resume covers container evictions.
|
|
731
|
-
- **Local auth-service parity**: shipped. Same OAuth flow as CF,
|
|
732
|
-
tokens in docker volume, shared-secret-gated, atomic in-world
|
|
733
|
-
writes, 6 h refresh.
|
|
734
|
-
- **PR gate**: in-world hook + control-plane endpoints + \`olam pr\`
|
|
735
|
-
CLI + MCP tools all live; Codex verdict as a parallel decision
|
|
736
|
-
source is the next follow-up.
|
|
737
|
-
- **ReUI design system**: ReUI is the canonical primitive source
|
|
738
|
-
(ADR-013). The active SPA \`packages/plan-chat-spa/\` registers the
|
|
739
|
-
\`@reui\` registry in its \`components.json\` and wraps primitives via
|
|
740
|
-
thin shims in \`src/components/ui/\`. Token/design-system drift is
|
|
741
|
-
guarded at the repo root by \`npm run audit:tokens\`. (The earlier
|
|
742
|
-
Phase-0b-i ReUI seeding in \`packages/control-plane/app/\` is sunset
|
|
743
|
-
along with that package.)
|
|
744
|
-
|
|
745
|
-
---
|
|
746
|
-
|
|
747
|
-
## Read more
|
|
748
|
-
|
|
749
|
-
- [\`docs/architecture/\`](./docs/architecture/README.md) — the 9-part
|
|
750
|
-
deep dive on substrates, world lifecycle, vault, completion ladder,
|
|
751
|
-
PR gate, and parity invariants.
|
|
752
|
-
- [\`docs/design/ci-watchdog.md\`](./docs/design/ci-watchdog.md) — the
|
|
753
|
-
canonical CI watchdog design with locked invariants, threat model,
|
|
754
|
-
and the wake-and-dispatch sequence diagram.
|
|
755
|
-
- [\`assets/landing-page/wiki/\`](./assets/landing-page/wiki/) —
|
|
756
|
-
public-facing usage docs (\`index.md\`, \`setup.md\`, \`usage.md\`)
|
|
757
|
-
rendered client-side by \`wiki.html\`. The README defers detailed
|
|
758
|
-
setup walkthroughs there.
|
|
759
|
-
- [\`docs/CF_WORLDS_SPEC.md\`](./docs/CF_WORLDS_SPEC.md) — canonical
|
|
760
|
-
contract between CF Worker and local docker substrates.
|
|
761
|
-
- [\`CLAUDE.md\`](./CLAUDE.md) — engineering rules in force across the
|
|
762
|
-
repo: outbound Anthropic calls via \`withCredential\`, credential
|
|
763
|
-
vault smoke gate, and the PR-description bar (Mermaid eval block +
|
|
764
|
-
\`validate-pr-body.mjs\` CI check).
|
|
765
|
-
|
|
766
|
-
---
|
|
767
|
-
|
|
768
|
-
## License
|
|
769
|
-
|
|
770
|
-
[CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/) — free
|
|
771
|
-
to use and adapt, not for commercial use. Commercial licenses
|
|
772
|
-
available — contact ernest.codes@gmail.com. Or, if you want to use it
|
|
773
|
-
commercially, just get Claude to understand the philosophies and
|
|
774
|
-
recreate the project from scratch.
|
|
775
|
-
|
|
776
|
-
---
|
|
777
|
-
|
|
778
|
-
## Onboarding (first-run, install, getting started)
|
|
779
|
-
|
|
780
|
-
Source: \`docs/ONBOARDING.md\`
|
|
781
|
-
|
|
782
|
-
# Olam Onboarding Guide
|
|
783
|
-
|
|
784
|
-
**Goal:** Go from zero to "I can see the team's worlds" in under 15 minutes.
|
|
785
|
-
|
|
786
|
-
---
|
|
787
|
-
|
|
788
|
-
## Prerequisites
|
|
789
|
-
|
|
790
|
-
- **Docker daemon** running (Docker Desktop, or colima on macOS)
|
|
791
|
-
- **Node.js ≥ 20** (\`node --version\`)
|
|
792
|
-
- **GitHub CLI authenticated** (\`gh auth login\`) — \`olam setup\` uses \`gh auth token\` to create a GHCR pull secret; skipping this fails on first image pull
|
|
793
|
-
- **Claude Code** (\`claude --version\`) — authenticated via \`claude auth login\`
|
|
794
|
-
- **Git** with SSH key configured for your repos
|
|
795
|
-
|
|
796
|
-
---
|
|
797
|
-
|
|
798
|
-
## 1. Install the CLI and bring up the stack (3 minutes)
|
|
799
|
-
|
|
800
|
-
No source checkout required — the CLI publishes to npm:
|
|
801
|
-
|
|
802
|
-
\`\`\`bash
|
|
803
|
-
curl -fsSL https://olam.bar.dev/install | sh # installs @pleri/olam-cli on PATH (PLERI is the GitHub org & npm scope)
|
|
804
|
-
olam setup # k3d cluster + full peripheral stack
|
|
805
|
-
\`\`\`
|
|
806
|
-
|
|
807
|
-
\`olam setup\` is idempotent and substrate-aware: the default brings up a
|
|
808
|
-
local k3d cluster (\`olam-dev\`) running host-cp, auth-service,
|
|
809
|
-
mcp-auth-service, kg-service, and memory-service. Pass
|
|
810
|
-
\`--substrate=docker\` for the lighter docker-compose path (3 containers,
|
|
811
|
-
no cluster). Full guide:
|
|
812
|
-
[\`docs/onboarding/k3s-mode-setup.md\`](onboarding/k3s-mode-setup.md).
|
|
813
|
-
|
|
814
|
-
## 2. Verify your setup (1 minute)
|
|
815
|
-
|
|
816
|
-
\`\`\`bash
|
|
817
|
-
olam doctor # runs 8–23 checks: auth, services, vault, network
|
|
818
|
-
\`\`\`
|
|
819
|
-
|
|
820
|
-
This diagnoses common issues (Docker daemon, images, credentials, etc.). Any FAIL row shows an actionable remedy — fix and re-run until all rows PASS.
|
|
821
|
-
|
|
822
|
-
## 3. Register the MCP server (1 minute)
|
|
823
|
-
|
|
824
|
-
\`\`\`bash
|
|
825
|
-
olam mcp install # default --scope=user
|
|
826
|
-
olam mcp install --scope=project # writes to the project's .mcp.json
|
|
827
|
-
\`\`\`
|
|
828
|
-
|
|
829
|
-
This wires Olam's MCP server into Claude Code so the agent can manage
|
|
830
|
-
worlds directly. Core tools: \`olam_create\`, \`olam_dispatch\`,
|
|
831
|
-
\`olam_observe\`, \`olam_destroy\`, \`olam_list\`, \`olam_status\`,
|
|
832
|
-
\`olam_enter\`, \`olam_crystallize\`, \`olam_pr_*\`. Restart Claude Code and
|
|
833
|
-
verify with \`claude mcp list\` (look for \`olam\`).
|
|
834
|
-
|
|
835
|
-
## 4. Configure your repos (2 minutes)
|
|
836
|
-
|
|
837
|
-
Point Olam at the repos a world should clone. Use the interactive
|
|
838
|
-
wizard:
|
|
839
|
-
|
|
840
|
-
\`\`\`bash
|
|
841
|
-
olam init # interactive: writes .olam/config.yaml
|
|
842
|
-
\`\`\`
|
|
843
|
-
|
|
844
|
-
A workspace config declares the repos, services, compute tier, and cost
|
|
845
|
-
caps for worlds spawned from it. The \`compute.default\` field selects the
|
|
846
|
-
world-runner tier (\`docker\` | \`cloudflare\` | \`cloudflare-isolate\`). See
|
|
847
|
-
[\`docs/architecture/config-spec.md\`](architecture/config-spec.md) for
|
|
848
|
-
the full schema.
|
|
849
|
-
|
|
850
|
-
## 4b. Multi-project workspaces (optional)
|
|
851
|
-
|
|
852
|
-
Olam supports managing multiple repos across different projects. Each
|
|
853
|
-
workspace is a named bundle of repos that can be reused across worlds.
|
|
854
|
-
|
|
855
|
-
\`\`\`bash
|
|
856
|
-
olam workspace list # see configured workspaces
|
|
857
|
-
olam workspace add my-workspace --repo <url>#<branch> # create from repos
|
|
858
|
-
olam workspace add my-workspace --from-config # seed from current .olam/config.yaml
|
|
859
|
-
olam workspace show my-workspace # pretty-print workspace YAML
|
|
860
|
-
olam workspace remove my-workspace # delete a workspace
|
|
861
|
-
\`\`\`
|
|
862
|
-
|
|
863
|
-
When creating a world, specify the workspace:
|
|
864
|
-
|
|
865
|
-
\`\`\`bash
|
|
866
|
-
olam create --name <world> --workspace my-workspace --task "..."
|
|
867
|
-
\`\`\`
|
|
868
|
-
|
|
869
|
-
See [\`docs/architecture/config-spec.md\`](architecture/config-spec.md) for
|
|
870
|
-
the full workspace schema.
|
|
871
|
-
|
|
872
|
-
## 5. Create your first world (2 minutes)
|
|
873
|
-
|
|
874
|
-
In Claude Code, say:
|
|
875
|
-
|
|
876
|
-
\`\`\`
|
|
877
|
-
Create a world for fixing the login bug in my-project
|
|
878
|
-
\`\`\`
|
|
879
|
-
|
|
880
|
-
Claude will:
|
|
881
|
-
1. Create a Docker container (or CF Sandbox) with your repo cloned
|
|
882
|
-
2. Set up git worktrees for isolation
|
|
883
|
-
3. Boot the in-world Claude session and auto-dispatch the task
|
|
884
|
-
4. Return the Host CP dashboard URL (\`http://127.0.0.1:19001\`)
|
|
885
|
-
|
|
886
|
-
## 6. Dispatch a task (1 minute)
|
|
887
|
-
|
|
888
|
-
\`\`\`
|
|
889
|
-
Dispatch to the world: investigate and fix the session timeout issue
|
|
890
|
-
\`\`\`
|
|
891
|
-
|
|
892
|
-
Claude Code runs autonomously inside the world. Every tool call, every decision, every exploration is captured as a thought node.
|
|
893
|
-
|
|
894
|
-
## 7. Watch it work (ongoing)
|
|
895
|
-
|
|
896
|
-
**Dashboard:** Open the Host CP URL from step 4. You'll see:
|
|
897
|
-
- the **seed of thought** pinned at the top (the immutable task)
|
|
898
|
-
- a **phase progress strip** (\`created → syncing → cloning → configuring → warming → ready → task_running\`)
|
|
899
|
-
- the **completion ladder** — \`draft → recommendations → adversarial_review → audit_passed → pr_eligible → pr_opened\`, each step lit when its named actor files the event
|
|
900
|
-
- a live **trace / events** stream of the agent's reasoning
|
|
901
|
-
|
|
902
|
-
**Terminal:** Open the full-screen ttyd terminal to watch Claude's live session.
|
|
903
|
-
|
|
904
|
-
**Observe:** In Claude Code, say:
|
|
905
|
-
\`\`\`
|
|
906
|
-
What is the world thinking right now?
|
|
907
|
-
\`\`\`
|
|
908
|
-
|
|
909
|
-
## 8. Clean up
|
|
910
|
-
|
|
911
|
-
\`\`\`
|
|
912
|
-
Crystallize and destroy the world
|
|
913
|
-
\`\`\`
|
|
914
|
-
|
|
915
|
-
This:
|
|
916
|
-
1. Runs the intelligence pipeline (generates SessionDigest, ADRs)
|
|
917
|
-
2. Persists the thought graph
|
|
918
|
-
3. Destroys the container and worktrees
|
|
919
|
-
4. The code lives in git branches; the thinking lives in the artifacts
|
|
920
|
-
|
|
921
|
-
---
|
|
922
|
-
|
|
923
|
-
## CLI Alternative
|
|
924
|
-
|
|
925
|
-
If you prefer the terminal over Claude Code (the CLI is on your PATH
|
|
926
|
-
after \`olam setup\`):
|
|
927
|
-
|
|
928
|
-
\`\`\`bash
|
|
929
|
-
olam create --name login-fix --repos my-project --task "Fix session timeout"
|
|
930
|
-
olam dispatch login-fix "investigate and fix the session timeout"
|
|
931
|
-
olam observe login-fix # Alternative: \`olam enter login-fix\` for a shell inside the world (until \`olam observe\` ships)
|
|
932
|
-
olam status login-fix
|
|
933
|
-
olam crystallize login-fix # requires PLERI; otherwise no-op (exit 2)
|
|
934
|
-
olam destroy login-fix # accepts the world ID or name
|
|
935
|
-
\`\`\`
|
|
936
|
-
|
|
937
|
-
## Auth (managing Claude accounts)
|
|
938
|
-
|
|
939
|
-
The auth-service comes up as part of \`olam setup\`. To add or inspect
|
|
940
|
-
accounts:
|
|
941
|
-
|
|
942
|
-
\`\`\`bash
|
|
943
|
-
olam auth login # one-time PKCE; opens browser, paste code back
|
|
944
|
-
olam auth status # container state + valid accounts
|
|
945
|
-
olam auth list # list credentials (add --json for machine-readable)
|
|
946
|
-
\`\`\`
|
|
947
|
-
|
|
948
|
-
The auth-service runs inside the stack (\`:9999\` on the docker-compose
|
|
949
|
-
substrate, or as the \`olam-auth-service\` pod on k3d) and serves fresh
|
|
950
|
-
tokens to every world over a shared-secret-authenticated API. The
|
|
951
|
-
refresh token never leaves the service.
|
|
952
|
-
|
|
953
|
-
---
|
|
954
|
-
|
|
955
|
-
## Key Concepts
|
|
956
|
-
|
|
957
|
-
| Concept | What it means |
|
|
958
|
-
|---------|--------------|
|
|
959
|
-
| **World** | Isolated Docker environment for one task. Has its own git branch, services, and Claude session. |
|
|
960
|
-
| **Thought graph** | DAG of every decision, exploration, and action during a session. The primary artifact. |
|
|
961
|
-
| **Dispatch** | Sending a prompt to a world's Claude session. Context is preserved between dispatches. |
|
|
962
|
-
| **Crystallize** | Persisting the thought graph. Happens automatically on session end, or manually. |
|
|
963
|
-
| **Lane** | A parallel work track within a world. Multiple lanes can work on different aspects simultaneously. |
|
|
964
|
-
|
|
965
|
-
## Troubleshooting
|
|
966
|
-
|
|
967
|
-
| Problem | Fix |
|
|
968
|
-
|---------|-----|
|
|
969
|
-
| Something not working | Run \`olam doctor\` — it diagnoses the setup and shows remedies for each issue |
|
|
970
|
-
| "Docker not running" | Start Docker Desktop |
|
|
971
|
-
| "No Claude credentials" | Run \`claude auth login\` on the host |
|
|
972
|
-
| "GHCR pull secret failed" or "401 unauthorized" on first \`olam setup\` | Run \`gh auth login\` and verify with \`gh auth status\` |
|
|
973
|
-
| Dashboard shows empty | Wait for the first dispatch to generate thoughts |
|
|
974
|
-
| "Port already in use" | Another world is running. Use \`olam list\` to check |
|
|
975
|
-
| Session seems stuck | Use \`olam enter <world>\` to open the terminal and check |
|
|
976
|
-
| Blank page at localhost:19001 (npm install) | Run \`olam services up\` to restart host-cp; check \`olam doctor\` for SPA dist staging. |
|
|
977
|
-
| Blank page at localhost:19001 (source checkout) | Run \`cd packages/host-cp && npm run build:spa\` to rebuild the SPA dist locally. |
|
|
978
|
-
| Cloud toggle missing in SPA | Both \`OLAM_CLOUD_URL\` and \`OLAM_SHOWCASE_PASSWORD\` must be set. If only one is set the server logs a \`[cloud]\` warning at startup. |
|
|
979
|
-
|
|
980
|
-
## Bare-node / source-checkout mode
|
|
981
|
-
|
|
982
|
-
If you are running host-cp directly from source (not via \`olam setup\`
|
|
983
|
-
or a pulled Docker image), you need to build the SPA before first boot:
|
|
984
|
-
|
|
985
|
-
\`\`\`bash
|
|
986
|
-
# From the repo root:
|
|
987
|
-
cd packages/host-cp
|
|
988
|
-
npm run build:spa # builds plan-chat-spa and stages it into packages/host-cp/dist/
|
|
989
|
-
npm start # prestart hook runs check:spa first; rebuilds if dist is stale
|
|
990
|
-
\`\`\`
|
|
991
|
-
|
|
992
|
-
\`npm start\` runs \`check:spa\` first. If \`dist/\` is already populated and
|
|
993
|
-
self-consistent (every asset in \`index.html\` is present on disk) it skips
|
|
994
|
-
the build and starts immediately. If not, it calls \`build:spa\` to rebuild.
|
|
995
|
-
|
|
996
|
-
The \`build:spa\` script triggers a full \`npm run build:ci\` + \`vite build\`
|
|
997
|
-
chain on a cold checkout (takes ~60s the first time; subsequent runs skip
|
|
998
|
-
the vite build if \`packages/plan-chat-spa/dist/client/\` is already populated).
|
|
999
|
-
|
|
1000
|
-
**This is not required when using \`olam setup\`** — the Docker image has the
|
|
1001
|
-
SPA baked in and host-cp never touches the local \`dist/\` directory.
|
|
1002
|
-
|
|
1003
|
-
## Architecture
|
|
1004
|
-
|
|
1005
|
-
\`\`\`
|
|
1006
|
-
You (Claude Code) → MCP Server → World Manager → Docker / CF Sandbox
|
|
1007
|
-
├── Claude Code (tmux)
|
|
1008
|
-
├── in-world control plane (:8080)
|
|
1009
|
-
├── Host CP dashboard (plan-chat-spa, :19000)
|
|
1010
|
-
└── world.db (thoughts + artifacts)
|
|
1011
|
-
\`\`\`
|
|
1012
|
-
|
|
1013
|
-
For detailed architecture, see [docs/ARCHITECTURE.md](ARCHITECTURE.md).
|
|
1014
|
-
|
|
1015
|
-
---
|
|
1016
|
-
|
|
1017
|
-
## Setup — fresh machine
|
|
1018
|
-
|
|
1019
|
-
Source: \`docs/onboarding/fresh-machine-setup.md\`
|
|
1020
|
-
|
|
1021
|
-
# Fresh machine setup — docker compose mode
|
|
1022
|
-
|
|
1023
|
-
> **Audience**: a new operator setting up olam on a fresh Mac or Linux box using
|
|
1024
|
-
> the **docker compose substrate** (3 host containers, no Kubernetes cluster).
|
|
1025
|
-
>
|
|
1026
|
-
> **Looking for the full k3d setup?** That is the default — see
|
|
1027
|
-
> [\`k3s-mode-setup.md\`](./k3s-mode-setup.md).
|
|
1028
|
-
>
|
|
1029
|
-
> At the end of this guide you have:
|
|
1030
|
-
>
|
|
1031
|
-
> - olam CLI installed globally + verified
|
|
1032
|
-
> - The 3 olam runtime containers (auth, kg-service, mcp-auth) pulled and running
|
|
1033
|
-
> - Claude Code auth configured against your operator credential
|
|
1034
|
-
> - Skills + agents from atlas-toolbox deployed under \`~/.claude/\` as symlinks
|
|
1035
|
-
> - olam-meta hook blocks (memory-recall + memory-classify) sentinel-bounded inside \`~/.claude/settings.json\`
|
|
1036
|
-
> - Memory-bridge running on \`127.0.0.1:3111\`, livez probing green
|
|
1037
|
-
> - kg-service classifier hook installed (optional but recommended)
|
|
1038
|
-
|
|
1039
|
-
The recipe is **idempotent** — re-running a step is safe.
|
|
1040
|
-
|
|
1041
|
-
---
|
|
1042
|
-
|
|
1043
|
-
## 0. Prereqs
|
|
1044
|
-
|
|
1045
|
-
| Requirement | Why | How to install |
|
|
1046
|
-
|---|---|---|
|
|
1047
|
-
| **macOS 14+ / Linux** | Olam targets these — Windows native is not supported | n/a |
|
|
1048
|
-
| **Node.js ≥ 20** | Runtime for the CLI + skill-source MCP servers | \`brew install node\` (mac) or \`nvm install 20\` |
|
|
1049
|
-
| **Docker** (daemon running) | Hosts the 3 olam runtime containers | Docker Desktop (macOS) or \`sudo apt install docker.io\` (Linux); colima works too |
|
|
1050
|
-
| **git** (with SSH key configured for your repos) | Cloning atlas-toolbox + per-world workspace mirrors | \`brew install git\` + \`ssh-keygen\` |
|
|
1051
|
-
| **Claude Code subscription** (operator account) | What the local \`claude\` CLI consumes for HTTPS-SDK + agent-SDK calls | \`npm install -g @anthropic-ai/claude-code\` |
|
|
1052
|
-
| **Tailscale** (optional) | Only if you'll be SSH-ing to other operators' machines | https://tailscale.com/download |
|
|
1053
|
-
|
|
1054
|
-
Sanity-check before continuing:
|
|
1055
|
-
|
|
1056
|
-
\`\`\`bash
|
|
1057
|
-
node --version # → v20.x or higher
|
|
1058
|
-
docker info # → Docker daemon details (no error)
|
|
1059
|
-
git --version # → 2.x
|
|
1060
|
-
claude --version # → ≥ 2026-04 build
|
|
1061
|
-
\`\`\`
|
|
1062
|
-
|
|
1063
|
-
If any of those fail, fix that first.
|
|
1064
|
-
|
|
1065
|
-
---
|
|
1066
|
-
|
|
1067
|
-
## 1. Install the olam CLI
|
|
1068
|
-
|
|
1069
|
-
\`\`\`bash
|
|
1070
|
-
curl -fsSL https://olam.bar.dev/install | sh
|
|
1071
|
-
olam --version # → 0.1.166 (or newer)
|
|
1072
|
-
\`\`\`
|
|
1073
|
-
|
|
1074
|
-
Or directly via npm:
|
|
1075
|
-
|
|
1076
|
-
\`\`\`bash
|
|
1077
|
-
npm install -g @pleri/olam-cli@latest
|
|
1078
|
-
\`\`\`
|
|
1079
|
-
|
|
1080
|
-
This brings down \`olam\`, \`olam-mcp\`, and a thin bundle of node modules. No Docker pulls happen yet.
|
|
1081
|
-
|
|
1082
|
-
---
|
|
1083
|
-
|
|
1084
|
-
## 2. Bootstrap the olam stack (docker compose mode)
|
|
1085
|
-
|
|
1086
|
-
\`\`\`bash
|
|
1087
|
-
olam setup --substrate=docker
|
|
1088
|
-
\`\`\`
|
|
1089
|
-
|
|
1090
|
-
This is the heaviest step (~3-8 minutes on first run). It:
|
|
1091
|
-
|
|
1092
|
-
1. Pulls 3 container images from \`ghcr.io/pleri/\`:
|
|
1093
|
-
- \`olam-auth\` — the Claude-auth proxy your CLI shells against (\`withCredential\` gateway).
|
|
1094
|
-
- \`olam-mcp-auth\` — host-side MCP wrapper for Claude auth.
|
|
1095
|
-
- \`olam-kg-service\` — knowledge-graph + classifier sidecar (port \`127.0.0.1:9997\`).
|
|
1096
|
-
2. Initialises \`~/.olam/config.json\` (schemaVersion 1, \`host.substrate: 'compose'\`).
|
|
1097
|
-
3. Starts the 3 containers via \`docker compose\`.
|
|
1098
|
-
4. Prompts you to authenticate Claude Code (\`olam auth login\` runs under the hood).
|
|
1099
|
-
|
|
1100
|
-
When it finishes:
|
|
1101
|
-
|
|
1102
|
-
\`\`\`bash
|
|
1103
|
-
olam services status # → 3 containers RUNNING
|
|
1104
|
-
olam auth status # → at least 1 active credential
|
|
1105
|
-
\`\`\`
|
|
1106
|
-
|
|
1107
|
-
If \`olam auth status\` shows no credentials, run \`olam auth login\` and follow the prompts.
|
|
1108
|
-
|
|
1109
|
-
---
|
|
1110
|
-
|
|
1111
|
-
## 3. Initialise olam in your working directory
|
|
1112
|
-
|
|
1113
|
-
Pick the directory where you keep your day-to-day code (e.g. \`~/Projects/my-org/my-repo\`), then:
|
|
1114
|
-
|
|
1115
|
-
\`\`\`bash
|
|
1116
|
-
cd ~/Projects/my-org/my-repo
|
|
1117
|
-
olam init
|
|
1118
|
-
\`\`\`
|
|
1119
|
-
|
|
1120
|
-
This writes a per-project \`.olam/config.yaml\` so olam knows the workspace boundary.
|
|
1121
|
-
|
|
1122
|
-
Optional: skip the Pleri (analytics) prompt with \`olam init --skip-pleri\`.
|
|
1123
|
-
|
|
1124
|
-
---
|
|
1125
|
-
|
|
1126
|
-
## 4. Register atlas-toolbox as your skill source
|
|
1127
|
-
|
|
1128
|
-
Atlas-toolbox is the canonical ECC shared-skills repo. You need its \`.git\` URL and read access — coordinate with the operator who set it up if you don't already have SSH access to \`git@github.com:atlas-builders/atlas-toolbox.git\`.
|
|
1129
|
-
|
|
1130
|
-
\`\`\`bash
|
|
1131
|
-
olam skills source add \\
|
|
1132
|
-
--name atlas-toolbox \\
|
|
1133
|
-
--git-url git@github.com:atlas-builders/atlas-toolbox.git \\
|
|
1134
|
-
--branch master \\
|
|
1135
|
-
--trust \\
|
|
1136
|
-
--no-sync-now \\
|
|
1137
|
-
--no-install-hook
|
|
1138
|
-
\`\`\`
|
|
1139
|
-
|
|
1140
|
-
What each flag does:
|
|
1141
|
-
|
|
1142
|
-
- \`--trust\` — acknowledges that registering this source grants olam permission to symlink content into \`~/.claude/\`. Required because skill sources are a T6 capability class (they ship executable hook scripts).
|
|
1143
|
-
- \`--no-sync-now\` — defer the first sync until after memory-bridge is up (step 5), so the very first sync injects both halves (skill content + olam-meta blocks) in one transaction.
|
|
1144
|
-
- \`--no-install-hook\` — skip the legacy SessionStart hook (\`olam skills sync\` runs explicitly in step 6 instead).
|
|
1145
|
-
|
|
1146
|
-
Verify:
|
|
1147
|
-
|
|
1148
|
-
\`\`\`bash
|
|
1149
|
-
olam skills source list
|
|
1150
|
-
# → 1 skill source(s)
|
|
1151
|
-
# [1] <id> atlas-toolbox master (unpulled) <iso-date> git@github.com:...
|
|
1152
|
-
\`\`\`
|
|
1153
|
-
|
|
1154
|
-
---
|
|
1155
|
-
|
|
1156
|
-
## 5. Start the memory service (Docker container)
|
|
1157
|
-
|
|
1158
|
-
The memory-service is a Docker container (managed by \`olam services\`) that serves \`127.0.0.1:3111/agentmemory/livez\`. When it's running, \`olam skills sync\` will inject the olam-meta-memory-recall + olam-meta-memory-classify hook blocks into \`~/.claude/settings.json\`. When it's NOT running, the strip half of the auto-migration still fires but no olam-meta blocks land — meaning operator gets no recall/classify behavior.
|
|
1159
|
-
|
|
1160
|
-
\`\`\`bash
|
|
1161
|
-
olam memory secret # → shows the bearer at ~/.olam/memory-secret (auto-generated on first run)
|
|
1162
|
-
olam memory start # → starts the olam-memory-service container; polls livez until ready
|
|
1163
|
-
olam memory status # → container state + livez + secret-set check
|
|
1164
|
-
\`\`\`
|
|
1165
|
-
|
|
1166
|
-
**Note:** \`~/.olam/memory-secret\` is used with the Docker Compose substrate (this guide). For Kubernetes, the file is \`~/.olam/memory-bearer-secret\`. They are the same logical service in different deployment substrates.
|
|
1167
|
-
|
|
1168
|
-
Sanity check the live probe:
|
|
1169
|
-
|
|
1170
|
-
\`\`\`bash
|
|
1171
|
-
curl -sS http://127.0.0.1:3111/agentmemory/livez
|
|
1172
|
-
# → {"service":"agentmemory","status":"ok"}
|
|
1173
|
-
\`\`\`
|
|
1174
|
-
|
|
1175
|
-
Optional: register memory as an MCP server so Claude Code can call it directly:
|
|
1176
|
-
|
|
1177
|
-
\`\`\`bash
|
|
1178
|
-
olam memory install --scope user
|
|
1179
|
-
\`\`\`
|
|
1180
|
-
|
|
1181
|
-
---
|
|
1182
|
-
|
|
1183
|
-
## 6. Run the first sync
|
|
1184
|
-
|
|
1185
|
-
\`\`\`bash
|
|
1186
|
-
olam skills sync
|
|
1187
|
-
\`\`\`
|
|
1188
|
-
|
|
1189
|
-
You should see output like:
|
|
1190
|
-
|
|
1191
|
-
\`\`\`
|
|
1192
|
-
sync summary
|
|
1193
|
-
sources: 1
|
|
1194
|
-
artifacts: ~120
|
|
1195
|
-
hook files: 3-5
|
|
1196
|
-
permission files:1-2
|
|
1197
|
-
symlinks made: ~250
|
|
1198
|
-
hooks added: 3
|
|
1199
|
-
permissions: ~60
|
|
1200
|
-
settings backup: /Users/<you>/.olam/state/settings-backups/settings-<ISO>.json
|
|
1201
|
-
meta-hooks: mode=auto · memory=up
|
|
1202
|
-
+ injected: memory-recall, memory-classify
|
|
1203
|
-
|
|
1204
|
-
atlas-toolbox 120 artifacts · engineering, product, growth, design (all categories)
|
|
1205
|
-
ok synced 1 source(s), 120 artifact(s)
|
|
1206
|
-
\`\`\`
|
|
1207
|
-
|
|
1208
|
-
The load-bearing lines:
|
|
1209
|
-
|
|
1210
|
-
- \`meta-hooks: mode=auto · memory=up\` — memory-bridge probe succeeded.
|
|
1211
|
-
- \`+ injected: memory-recall, memory-classify\` — both olam-meta blocks are now in \`~/.claude/settings.json\`.
|
|
1212
|
-
|
|
1213
|
-
If you ran this on a machine that had been using the old atlas-toolbox \`sync.sh\` (and therefore had bare atlas-shipped agentmemory hook entries in \`~/.claude/settings.json\`), you'll also see:
|
|
1214
|
-
|
|
1215
|
-
\`\`\`
|
|
1216
|
-
~ auto-migrated: stripped 2 atlas-toolbox-shipped agentmemory hook entry(ies); replaced by olam-injected blocks
|
|
1217
|
-
\`\`\`
|
|
1218
|
-
|
|
1219
|
-
That's the Phase C C3 auto-migration. The pre-strip state is snapshotted at \`~/.olam/state/migration-snapshots/meta-hooks-<ISO>-<pid>-<rand>.json\`. Reverse via \`olam skills migrate-hooks-back\` if you ever need to.
|
|
1220
|
-
|
|
1221
|
-
---
|
|
1222
|
-
|
|
1223
|
-
## 7. Install the kg-service grep classifier hook (recommended)
|
|
1224
|
-
|
|
1225
|
-
Routes \`grep\` / \`rg\` / \`find\` invocations through the kg-service classifier so search hits the knowledge graph when the question is graph-shaped.
|
|
1226
|
-
|
|
1227
|
-
\`\`\`bash
|
|
1228
|
-
olam kg install-hook --scope user # writes the sentinel-bound hook to ~/.claude/settings.json
|
|
1229
|
-
olam kg doctor # validates the hook + the kg-service container
|
|
1230
|
-
\`\`\`
|
|
1231
|
-
|
|
1232
|
-
Open a new Claude Code session to pick up the hook (existing sessions snapshot settings.json at start).
|
|
1233
|
-
|
|
1234
|
-
---
|
|
1235
|
-
|
|
1236
|
-
## 8. Verify the end state
|
|
1237
|
-
|
|
1238
|
-
\`\`\`bash
|
|
1239
|
-
# (a) Skill sources registered
|
|
1240
|
-
olam skills source list
|
|
1241
|
-
|
|
1242
|
-
# (b) Skill artifacts deployed (symlinks into ~/.olam/state/skill-sources/<id>/...)
|
|
1243
|
-
ls -la ~/.claude/skills/ | head -10
|
|
1244
|
-
ls -la ~/.claude/agents/ | head -10
|
|
1245
|
-
|
|
1246
|
-
# (c) olam-meta sentinel-bound hook blocks in settings.json
|
|
1247
|
-
jq -r '.hooks.PreToolUse[]?.hooks[]?.command, .hooks.PostToolUse[]?.hooks[]?.command' \\
|
|
1248
|
-
~/.claude/settings.json | grep -E "olam-meta-memory|kg-service-v2"
|
|
1249
|
-
# expected output (3 lines):
|
|
1250
|
-
# OLAM_META_SENTINEL=olam-meta-memory-recall-v1; ... agentmemory-recall-trigger.mjs
|
|
1251
|
-
# OLAM_META_SENTINEL=olam-meta-memory-classify-v1; ... agentmemory-classify-queue.mjs
|
|
1252
|
-
# KG_SENTINEL=kg-service-v2-classifier-hook; ... 127.0.0.1:9997/classify
|
|
1253
|
-
|
|
1254
|
-
# (d) Memory-bridge live
|
|
1255
|
-
curl -sS http://127.0.0.1:3111/agentmemory/livez
|
|
1256
|
-
# → {"service":"agentmemory","status":"ok"}
|
|
1257
|
-
|
|
1258
|
-
# (e) Trust-audit log entries (one per skill-source-add + per meta-hook-stripped)
|
|
1259
|
-
tail -3 ~/.olam/state/skill-sources-audit.log | jq -c '{timestamp, action, sourceId}'
|
|
1260
|
-
\`\`\`
|
|
1261
|
-
|
|
1262
|
-
All five should return non-empty / OK output.
|
|
1263
|
-
|
|
1264
|
-
---
|
|
1265
|
-
|
|
1266
|
-
## 9. (Optional) Open a Claude Code session and test recall
|
|
1267
|
-
|
|
1268
|
-
\`\`\`bash
|
|
1269
|
-
cd ~/Projects/my-org/my-repo
|
|
1270
|
-
claude # opens a Claude Code session
|
|
1271
|
-
# Inside the session, run any bash/edit operation — the PreToolUse hook will
|
|
1272
|
-
# query the memory-bridge and inject \`additionalContext\` with recalled memories.
|
|
1273
|
-
# Look for \`[recall]\` lines in the Claude Code output.
|
|
1274
|
-
\`\`\`
|
|
1275
|
-
|
|
1276
|
-
If the recall hook doesn't fire, run \`olam memory status\` to confirm the bridge is up + reachable.
|
|
1277
|
-
|
|
1278
|
-
---
|
|
1279
|
-
|
|
1280
|
-
## Troubleshooting
|
|
1281
|
-
|
|
1282
|
-
| Symptom | Likely cause | Fix |
|
|
1283
|
-
|---|---|---|
|
|
1284
|
-
| \`olam skills sync\` errors with \`GlobalConfigReadError\` | \`~/.olam/config.json\` schemaVersion mismatch | \`olam config validate\` then \`olam bootstrap\` again |
|
|
1285
|
-
| \`meta-hooks: mode=auto · memory=down\` in sync output | memory-bridge not running OR probe times out | \`olam memory start\` (idempotent) + curl the livez URL |
|
|
1286
|
-
| Skill artifacts show as broken symlinks | atlas-toolbox clone moved or deleted | \`olam skills source pull <id>\` to re-clone |
|
|
1287
|
-
| \`~/.claude/settings.json\` keeps reverting | Multiple Claude Code sessions writing simultaneously | A4 lock should serialize; if it doesn't, check \`~/.olam/state/.settings-json.lock\` for a stale holder |
|
|
1288
|
-
| \`olam --version\` shows old version after \`npm install -g\` | nvm shim conflict OR cached PATH | \`which -a olam\` to locate; \`npm uninstall -g @pleri/olam-cli && npm install -g @pleri/olam-cli@latest\` |
|
|
1289
|
-
|
|
1290
|
-
---
|
|
1291
|
-
|
|
1292
|
-
## What's NOT in this doc
|
|
1293
|
-
|
|
1294
|
-
- Setting up Cloudflare-substrate worlds (separate doc: \`docs/architecture/cf-worlds-spec.md\`).
|
|
1295
|
-
- **Cloud-mode (optional)**: if you want dispatches to run on Cloudflare Sandboxes instead of local Docker, follow [plan-cloud-mode-setup.md](../runbooks/plan-cloud-mode-setup.md) to set \`OLAM_CLOUD_URL\` + \`OLAM_SHOWCASE_PASSWORD\` on host-cp.
|
|
1296
|
-
- PLERI thought-graph integration (separate setup; skip-pleri is fine for most operators).
|
|
1297
|
-
- Per-project skill overrides (advanced; see Phase B B2 + \`docs/architecture/skill-source-contract.md\`).
|
|
1298
|
-
- Cutting an olam release (developer flow, not operator flow; see \`~/.claude/skills/olam-cut-release/SKILL.md\`).
|
|
1299
|
-
|
|
1300
|
-
---
|
|
1301
|
-
|
|
1302
|
-
## Reverting
|
|
1303
|
-
|
|
1304
|
-
\`\`\`bash
|
|
1305
|
-
# Strip olam-injected meta-hook blocks but keep skill symlinks
|
|
1306
|
-
olam skills migrate-hooks-back
|
|
1307
|
-
|
|
1308
|
-
# Remove the atlas-toolbox skill source entirely (deletes its clone + symlinks)
|
|
1309
|
-
olam skills source remove <id>
|
|
1310
|
-
|
|
1311
|
-
# Stop + remove all olam-managed Docker containers
|
|
1312
|
-
olam services down
|
|
1313
|
-
|
|
1314
|
-
# Uninstall the CLI
|
|
1315
|
-
npm uninstall -g @pleri/olam-cli
|
|
1316
|
-
\`\`\`
|
|
1317
|
-
|
|
1318
|
-
\`~/.olam/state/migration-snapshots/\` keeps the pre-injection settings.json snapshots indefinitely; nothing prunes them automatically.
|
|
1319
|
-
|
|
1320
|
-
---
|
|
1321
|
-
|
|
1322
|
-
## Setup — k3d/k3s mode (default substrate, port 19001)
|
|
1323
|
-
|
|
1324
|
-
Source: \`docs/onboarding/k3s-mode-setup.md\`
|
|
1325
|
-
|
|
1326
|
-
# Olam in k3d mode — definitive setup guide
|
|
1327
|
-
|
|
1328
|
-
> **Audience**: an operator setting up olam on their workstation. k3d mode runs olam's full peripheral stack (host-cp, auth-service, mcp-auth-service, kg-service, memory-service) as a real Kubernetes deployment on a local k3d cluster, with Prometheus + Grafana + Loki + Kyverno for observability.
|
|
1329
|
-
>
|
|
1330
|
-
> **End state**: a local k3d cluster \`olam-dev\`, five peripheral pods at \`1/1 Running\` in the \`olam\` namespace, a \`monitoring\` namespace with kube-prometheus-stack + Grafana, the \`olam\` CLI talking to host-cp inside the cluster.
|
|
1331
|
-
>
|
|
1332
|
-
> **Time**: ~5 minutes warm, ~10 minutes cold (image pulls).
|
|
1333
|
-
>
|
|
1334
|
-
> **k3d on all platforms**: olam uses k3d (k3s wrapped in Docker) on both macOS and Linux. No sudo needed — k3d only requires a Docker daemon. Same substrate, same mental model, same teardown on every machine.
|
|
1335
|
-
|
|
1336
|
-
k3d is the **default mode** for olam. For the lighter docker-compose mode (3 containers, no cluster), see [fresh-machine-setup.md](fresh-machine-setup.md).
|
|
1337
|
-
|
|
1338
|
-
---
|
|
1339
|
-
|
|
1340
|
-
## 0. Prerequisites
|
|
1341
|
-
|
|
1342
|
-
You need these tools installed. \`olam setup\` will prompt to install missing brew-formulae for you on macOS (answer y); on Linux it uses the upstream k3d install script (no sudo needed). Pass \`-y\` to skip all prompts.
|
|
1343
|
-
|
|
1344
|
-
| Tool | Why | Install |
|
|
1345
|
-
|---|---|---|
|
|
1346
|
-
| **Node.js ≥ 20** | The olam CLI runs on Node | \`nvm install 20\` |
|
|
1347
|
-
| **Docker daemon** | k3d runs k3s nodes as Docker containers (required on all platforms) | Docker Desktop (macOS/Windows) or \`sudo apt install docker.io\` (Linux); colima works too |
|
|
1348
|
-
| **colima** (macOS, optional) | Lightweight Docker runtime for macOS | \`brew install colima && colima start --cpu 4 --memory 8 --vm-type=vz --mount-type=virtiofs\` |
|
|
1349
|
-
| **k3d** | Wraps k3s in Docker for local clusters — works on macOS and Linux, no sudo | \`brew install k3d\` (macOS/Linux with brew) or \`curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh \\| bash\` |
|
|
1350
|
-
| **kubectl** | Cluster operations | \`brew install kubectl\` |
|
|
1351
|
-
| **helm** | Installs Loki + Promtail + Grafana + Prometheus + Kyverno | \`brew install helm\` |
|
|
1352
|
-
| **gh** | ghcr-pull secret + \`gh auth token\` | \`brew install gh && gh auth login\` |
|
|
1353
|
-
| **docker** + \`docker compose\` plugin | Hosts the docker-socket-proxy sibling container | Docker Desktop, or colima ships it |
|
|
1354
|
-
| **jq, curl, openssl** | Shell helpers | macOS defaults |
|
|
1355
|
-
| **Claude Code subscription** | The \`claude\` CLI inside each world consumes your local subscription | \`npm install -g @anthropic-ai/claude-code\` |
|
|
1356
|
-
|
|
1357
|
-
---
|
|
1358
|
-
|
|
1359
|
-
## 1. Install the olam CLI
|
|
1360
|
-
|
|
1361
|
-
\`\`\`bash
|
|
1362
|
-
# One-line installer (recommended)
|
|
1363
|
-
curl -fsSL https://olam.bar.dev/install | sh
|
|
1364
|
-
|
|
1365
|
-
# Or via npm directly
|
|
1366
|
-
npm install -g @pleri/olam-cli
|
|
1367
|
-
\`\`\`
|
|
1368
|
-
|
|
1369
|
-
Verify:
|
|
1370
|
-
|
|
1371
|
-
\`\`\`bash
|
|
1372
|
-
olam --version
|
|
1373
|
-
\`\`\`
|
|
1374
|
-
|
|
1375
|
-
The CLI ships every manifest, secret template, and observability install script it needs inside the npm tarball — no \`git clone\` required.
|
|
1376
|
-
|
|
1377
|
-
---
|
|
1378
|
-
|
|
1379
|
-
## 2. Authenticate \`gh\`
|
|
1380
|
-
|
|
1381
|
-
\`\`\`bash
|
|
1382
|
-
gh auth login
|
|
1383
|
-
\`\`\`
|
|
1384
|
-
|
|
1385
|
-
The bootstrap creates a \`ghcr-pull\` Kubernetes Secret from \`gh auth token\` so pulls of \`ghcr.io/pleri/olam-*\` images don't hit anonymous rate limits.
|
|
1386
|
-
|
|
1387
|
-
---
|
|
1388
|
-
|
|
1389
|
-
## 3. Bootstrap
|
|
1390
|
-
|
|
1391
|
-
Single command, end-to-end:
|
|
1392
|
-
|
|
1393
|
-
\`\`\`bash
|
|
1394
|
-
olam setup
|
|
1395
|
-
\`\`\`
|
|
1396
|
-
|
|
1397
|
-
Pass \`-y\` to skip all prompts (non-interactive, auto-affirm every step):
|
|
1398
|
-
|
|
1399
|
-
\`\`\`bash
|
|
1400
|
-
olam setup -y
|
|
1401
|
-
\`\`\`
|
|
1402
|
-
|
|
1403
|
-
The command is **idempotent** — re-running against an existing cluster only does work for incomplete steps. It runs five ordered phases:
|
|
1404
|
-
|
|
1405
|
-
| # | Phase | What it does |
|
|
1406
|
-
|---|---|---|
|
|
1407
|
-
| 0 | **Preflight** | Detects missing tools and prints actionable install commands. Verifies \`gh\` is authenticated and the docker daemon is reachable. |
|
|
1408
|
-
| 1 | **Secrets** | Generates \`~/.olam/{auth-secret,kg-bearer-token,auth-db-secret,mcp-auth-jwt-secret,memory-bearer-secret}\` if absent (32-byte hex, mode 0600). |
|
|
1409
|
-
| 2 | **Colima** (macOS only) | Ensures colima is running; if not, starts it with sensible defaults. Applies \`chmod 666 /var/run/docker.sock\` inside the colima VM (virtiofs mitigation). |
|
|
1410
|
-
| 3 | **Cluster** | \`k3d cluster create olam-dev\` with the gh-config bind. Skipped if cluster exists. (Override the name with \`--cluster-name\`.) |
|
|
1411
|
-
| 4 | **Observability** | Chains the bundled install scripts: Loki + Promtail, Grafana with port-forward + admin secret, kube-prometheus-stack with recording rules, Kyverno admission policy. |
|
|
1412
|
-
| 5 | **Apply manifests + rollout** | Delegates to the existing \`olam upgrade\` flow: namespace, RBAC, secrets, ghcr-pull, host-side docker-socket-proxy, manifest apply, rollout status (per-deployment, 90s timeout), port-forward, \`/health\` verify, audit log. |
|
|
1413
|
-
|
|
1414
|
-
Flag reference:
|
|
1415
|
-
|
|
1416
|
-
\`\`\`bash
|
|
1417
|
-
olam setup --help
|
|
1418
|
-
\`\`\`
|
|
1419
|
-
|
|
1420
|
-
Common overrides:
|
|
1421
|
-
|
|
1422
|
-
- \`-y, --yes\` — auto-affirm every prompt (non-interactive).
|
|
1423
|
-
- \`--substrate <docker|kubernetes>\` — force a substrate instead of auto-detecting.
|
|
1424
|
-
- \`--cluster-name <name>\` — k3d cluster name to create/use (default: \`olam-dev\`).
|
|
1425
|
-
- \`--reuse-cluster <name>\` — reuse an existing reachable kube context instead of provisioning.
|
|
1426
|
-
- \`--skip-cluster-create\` — cluster already exists; skip cluster provisioning.
|
|
1427
|
-
- \`--skip-doctor\` — skip final health check (useful in CI).
|
|
1428
|
-
|
|
1429
|
-
---
|
|
1430
|
-
|
|
1431
|
-
## 4. Verify the cluster is healthy
|
|
1432
|
-
|
|
1433
|
-
\`\`\`bash
|
|
1434
|
-
kubectl get pods -n olam
|
|
1435
|
-
\`\`\`
|
|
1436
|
-
|
|
1437
|
-
Expected — all five \`1/1 Running\`:
|
|
1438
|
-
|
|
1439
|
-
\`\`\`
|
|
1440
|
-
NAME READY STATUS RESTARTS AGE
|
|
1441
|
-
olam-auth-service-... 1/1 Running 0 ~5m
|
|
1442
|
-
olam-host-cp-... 1/1 Running 0 ~5m
|
|
1443
|
-
olam-kg-service-... 1/1 Running 0 ~5m
|
|
1444
|
-
olam-mcp-auth-service-... 1/1 Running 0 ~5m
|
|
1445
|
-
olam-memory-service-... 1/1 Running 0 ~5m
|
|
1446
|
-
\`\`\`
|
|
1447
|
-
|
|
1448
|
-
If something's off:
|
|
1449
|
-
|
|
1450
|
-
\`\`\`bash
|
|
1451
|
-
olam doctor # checks substrate, cluster, pods, secrets
|
|
1452
|
-
olam services status # k8s-aware status table
|
|
1453
|
-
\`\`\`
|
|
1454
|
-
|
|
1455
|
-
---
|
|
1456
|
-
|
|
1457
|
-
## 5. Open Grafana
|
|
1458
|
-
|
|
1459
|
-
\`\`\`bash
|
|
1460
|
-
kubectl port-forward -n monitoring svc/olam-grafana 3000:80
|
|
1461
|
-
open http://localhost:3000
|
|
1462
|
-
\`\`\`
|
|
1463
|
-
|
|
1464
|
-
User \`admin\`, password from:
|
|
1465
|
-
|
|
1466
|
-
\`\`\`bash
|
|
1467
|
-
kubectl get secret olam-grafana-admin -n monitoring \\
|
|
1468
|
-
-o jsonpath='{.data.admin-password}' | base64 -d
|
|
1469
|
-
\`\`\`
|
|
1470
|
-
|
|
1471
|
-
Pre-installed dashboards (under "Olam"):
|
|
1472
|
-
|
|
1473
|
-
- **olam-home** — at-a-glance status across all peripherals.
|
|
1474
|
-
- **host-cp** — request rate, p50/p95/p99 latency, world counts.
|
|
1475
|
-
- **kg-service** — classifier hit rate, classify latency, hook traffic.
|
|
1476
|
-
- **request-rate** — per-route HTTP request rate (uses recording rule \`olam:http_requests:rate5m_by_service_route\`).
|
|
1477
|
-
|
|
1478
|
-
---
|
|
1479
|
-
|
|
1480
|
-
## 6. Day-to-day operations
|
|
1481
|
-
|
|
1482
|
-
\`\`\`bash
|
|
1483
|
-
olam doctor # health check across substrate
|
|
1484
|
-
olam services status # peripherals status table (k8s-aware)
|
|
1485
|
-
olam services restart <name> # kubectl rollout restart for one peripheral
|
|
1486
|
-
olam services down # scale all peripherals to 0 replicas
|
|
1487
|
-
olam services up # scale them back to 1
|
|
1488
|
-
\`\`\`
|
|
1489
|
-
|
|
1490
|
-
To pick up a new release after \`npm install -g @pleri/olam-cli@latest\`:
|
|
1491
|
-
|
|
1492
|
-
\`\`\`bash
|
|
1493
|
-
olam upgrade
|
|
1494
|
-
\`\`\`
|
|
1495
|
-
|
|
1496
|
-
The upgrade flow re-applies all manifests (Kubernetes rolls the deployments to the new image digests); persistent volumes survive.
|
|
1497
|
-
|
|
1498
|
-
---
|
|
1499
|
-
|
|
1500
|
-
## 7. Tear down
|
|
1501
|
-
|
|
1502
|
-
\`\`\`bash
|
|
1503
|
-
olam implode --dry-run # preview what will be removed
|
|
1504
|
-
olam implode # confirmed: cluster + secrets + state
|
|
1505
|
-
\`\`\`
|
|
1506
|
-
|
|
1507
|
-
\`olam implode\` removes the k3d cluster, the host-side docker-socket-proxy sibling, every container, every secret in \`~/.olam/\`, and the global config. Use it when you want to start completely fresh; otherwise prefer \`olam services down\` or scale to 0.
|
|
1508
|
-
|
|
1509
|
-
---
|
|
1510
|
-
|
|
1511
|
-
## Choosing compose mode instead
|
|
1512
|
-
|
|
1513
|
-
To use the lighter 3-container compose path instead:
|
|
1514
|
-
|
|
1515
|
-
\`\`\`bash
|
|
1516
|
-
curl -fsSL https://olam.bar.dev/install | sh
|
|
1517
|
-
olam setup --substrate=docker
|
|
1518
|
-
\`\`\`
|
|
1519
|
-
|
|
1520
|
-
The CLI is substrate-aware: \`olam setup\`, \`olam services up|down|status|restart\`, \`olam upgrade\`, and \`olam doctor\` all route to the correct backend based on \`~/.olam/config.json\`'s \`host.substrate\` value.
|
|
1521
|
-
|
|
1522
|
-
Full compose guide: [\`fresh-machine-setup.md\`](./fresh-machine-setup.md).
|
|
1523
|
-
|
|
1524
|
-
---
|
|
1525
|
-
|
|
1526
|
-
## Architecture quick-ref
|
|
1527
|
-
|
|
1528
|
-
\`\`\`
|
|
1529
|
-
┌─────────────────────────┐
|
|
1530
|
-
│ operator's machine │
|
|
1531
|
-
│ │
|
|
1532
|
-
│ ~/.olam/*-secret ─────┼──▶ Kubernetes Secrets
|
|
1533
|
-
│ ~/.config/gh ─────┼──▶ k3d --volume bind
|
|
1534
|
-
│ │
|
|
1535
|
-
│ ┌─────────────────┐ │
|
|
1536
|
-
│ │ docker daemon │ │
|
|
1537
|
-
│ │ │ │
|
|
1538
|
-
│ │ ┌──────────┐ │ │
|
|
1539
|
-
│ │ │ k3d node │ │ │ ┌─────────────────────────┐
|
|
1540
|
-
│ │ │ cluster │◀──┼────┼─────│ ghcr.io/pleri/olam-* │
|
|
1541
|
-
│ │ │ olam-dev │ │ │ │ (pulled with gh token) │
|
|
1542
|
-
│ │ └────┬─────┘ │ │ └─────────────────────────┘
|
|
1543
|
-
│ │ │ TCP │ │
|
|
1544
|
-
│ │ ▼ :2375 │ │
|
|
1545
|
-
│ │ ┌──────────────┴┐ │
|
|
1546
|
-
│ │ │ docker-socket │ │
|
|
1547
|
-
│ │ │ proxy │ │
|
|
1548
|
-
│ │ │ (sibling │ │
|
|
1549
|
-
│ │ │ container) │ │
|
|
1550
|
-
│ │ └───────────────┘ │
|
|
1551
|
-
│ └─────────────────────┘
|
|
1552
|
-
└─────────────────────────┘
|
|
1553
|
-
│
|
|
1554
|
-
▼ k3d nodes via host.k3d.internal:2375
|
|
1555
|
-
┌──────────────────────────────────────┐
|
|
1556
|
-
│ cluster: olam-dev │
|
|
1557
|
-
│ │
|
|
1558
|
-
│ namespace: olam │
|
|
1559
|
-
│ olam-host-cp (1/1 Running) │
|
|
1560
|
-
│ olam-auth-service (1/1 Running) │
|
|
1561
|
-
│ olam-mcp-auth-svc (1/1 Running) │
|
|
1562
|
-
│ olam-kg-service (1/1 Running) │
|
|
1563
|
-
│ olam-memory-service (1/1 Running) │
|
|
1564
|
-
│ │
|
|
1565
|
-
│ namespace: monitoring │
|
|
1566
|
-
│ olam-grafana │
|
|
1567
|
-
│ prometheus-operated │
|
|
1568
|
-
│ loki + promtail │
|
|
1569
|
-
│ kyverno (admission) │
|
|
1570
|
-
└──────────────────────────────────────┘
|
|
1571
|
-
\`\`\`
|
|
1572
|
-
|
|
1573
|
-
Why the sibling docker-socket-proxy? On macOS, colima exposes \`/var/run/docker.sock\` via virtiofs, which blocks unix-socket bind-mounts into k3d pods. The proxy runs as a normal Docker container on the operator's daemon and exposes the same socket over TCP \`:2375\`. Pods reach it through an ExternalName Service. See [\`docs/test-reports/olam-k3d-on-mac-substrate-decision-eli5.md\`](../test-reports/olam-k3d-on-mac-substrate-decision-eli5.md).
|
|
1574
|
-
|
|
1575
|
-
---
|
|
1576
|
-
|
|
1577
|
-
## Common issues
|
|
1578
|
-
|
|
1579
|
-
| Symptom | Fix |
|
|
1580
|
-
|---|---|
|
|
1581
|
-
| \`colima not running\` | \`colima start --cpu 4 --memory 8 --vm-type=vz --mount-type=virtiofs\` |
|
|
1582
|
-
| \`permission denied\` on docker socket | \`colima ssh -- sudo chmod 666 /var/run/docker.sock\` |
|
|
1583
|
-
| Missing tool errors at preflight | Install manually per the prereq table, then re-run \`olam setup\` |
|
|
1584
|
-
| \`helm install\` timeout during observability bootstrap | Set \`OLAM_HELM_TIMEOUT=600s\` (or higher on loaded machines). See [Tuning](#tuning-helm-timeouts-on-resource-constrained-machines) for details. |
|
|
1585
|
-
| \`host-cp\` \`CrashLoopBackOff\` with \`inClusterContext is not in the allowlist\` | Image pre-dates v0.1.161 — \`npm install -g @pleri/olam-cli@latest && olam upgrade\` |
|
|
1586
|
-
| \`memory-service\` \`CrashLoopBackOff\` with \`port 3111 is already in use\` | Image pre-dates v0.1.163 — \`npm install -g @pleri/olam-cli@latest && olam upgrade\` |
|
|
1587
|
-
| \`imagePullBackOff\` from \`ghcr.io/pleri/olam-*\` | The bootstrap creates \`ghcr-pull\` from \`gh auth token\`; re-run \`olam setup\` after \`gh auth login\` |
|
|
1588
|
-
| Grafana dashboards missing | \`kubectl rollout restart deploy/olam-grafana -n monitoring\` |
|
|
1589
|
-
| host-cp can't reach docker | \`docker ps \\| grep docker-socket-proxy\` — restart with \`olam setup --skip-cluster-create\` to re-run only the proxy + manifest-apply steps |
|
|
1590
|
-
| \`helm install\` fails with \`Error: context deadline exceeded\` during observability bootstrap (grafana / loki / kube-prometheus-stack / kyverno) | The Colima VM is sharing CPU/memory with too many other containers. Bump the helm timeout via \`OLAM_HELM_TIMEOUT=900s olam setup\` (default is \`600s\`). On very loaded machines, \`1200s\` is reasonable. Applies to every \`helm install\` step in the observability chain. |
|
|
1591
|
-
|
|
1592
|
-
### Tuning helm timeouts on resource-constrained machines
|
|
1593
|
-
|
|
1594
|
-
Every observability \`helm install\` (grafana, loki, promtail, kube-prometheus-stack, kyverno) reads \`OLAM_HELM_TIMEOUT\` (default \`600s\`). When the Colima VM is sharing resources with a heavy local workload, charts can take longer than the default to converge — bump the env var instead of editing scripts:
|
|
1595
|
-
|
|
1596
|
-
\`\`\`bash
|
|
1597
|
-
OLAM_HELM_TIMEOUT=900s olam setup # bootstrap with longer timeout
|
|
1598
|
-
OLAM_HELM_TIMEOUT=1200s olam setup # very loaded machines
|
|
1599
|
-
\`\`\`
|
|
1600
|
-
|
|
1601
|
-
CI Linux runners run unmodified at \`600s\` (dedicated resources). The knob exists for macOS-Colima hosts that share a VM with other docker workloads.
|
|
1602
|
-
|
|
1603
|
-
### Tuning Prometheus scrape/discovery waits
|
|
1604
|
-
|
|
1605
|
-
The Phase C E2E scripts in \`scripts/e2e/\` poll Prometheus for synthetic-target discovery (\`TARGET_DISCOVERY_TIMEOUT\`, default 240s — \`cardinality-drop.sh\`, \`kyverno-cardinality-mutate.sh\`, \`dashboards-have-data.sh\`) and then sleep for recording-rule evaluation (\`SCRAPE_WAIT\`, default 70s — \`dashboards-have-data.sh\`). Both default values cover ≥2 rule-evaluation cycles at the 30s rule interval against a 15s scrape interval. Override on very slow runners:
|
|
1606
|
-
|
|
1607
|
-
\`\`\`bash
|
|
1608
|
-
OLAM_PROM_DISCOVERY_TIMEOUT=300 OLAM_PROM_SCRAPE_WAIT=120 npm run test:ingress-integration
|
|
1609
|
-
\`\`\`
|
|
1610
|
-
|
|
1611
|
-
### Troubleshooting port-forwards
|
|
1612
|
-
|
|
1613
|
-
**Problem:** connections to a port-forward (e.g. \`localhost:19001\` for host-cp, \`localhost:3000\` for Grafana) suddenly fail with "connection refused".
|
|
1614
|
-
|
|
1615
|
-
**Why:** kubectl port-forwards die when:
|
|
1616
|
-
- The terminal that started them exits
|
|
1617
|
-
- k3d restarts or the cluster reboots
|
|
1618
|
-
- The underlying pod crashes or is redeployed
|
|
1619
|
-
- The local kube context changes
|
|
1620
|
-
|
|
1621
|
-
**Diagnose:**
|
|
1622
|
-
\`\`\`bash
|
|
1623
|
-
ps aux | grep "kubectl port-forward"
|
|
1624
|
-
\`\`\`
|
|
1625
|
-
|
|
1626
|
-
If nothing shows up, the port-forward is dead and needs to be re-established.
|
|
1627
|
-
|
|
1628
|
-
**Fix:**
|
|
1629
|
-
|
|
1630
|
-
Option 1 — re-establish all port-forwards at once:
|
|
1631
|
-
\`\`\`bash
|
|
1632
|
-
olam services up
|
|
1633
|
-
\`\`\`
|
|
1634
|
-
|
|
1635
|
-
Option 2 — manually restart the port-forward (canonical command from the setup doc):
|
|
1636
|
-
\`\`\`bash
|
|
1637
|
-
kubectl port-forward -n olam svc/host-cp 19001:19001
|
|
1638
|
-
\`\`\`
|
|
1639
|
-
|
|
1640
|
-
Use \`olam services status\` to see which services are running and which port each binds to locally.
|
|
1641
|
-
|
|
1642
|
-
When everything else fails, tear down and re-create:
|
|
1643
|
-
|
|
1644
|
-
\`\`\`bash
|
|
1645
|
-
olam implode
|
|
1646
|
-
olam setup
|
|
1647
|
-
\`\`\`
|
|
1648
|
-
|
|
1649
|
-
\`olam implode\` removes everything; \`olam setup\` re-creates from scratch.
|
|
1650
|
-
|
|
1651
|
-
---
|
|
1652
|
-
|
|
1653
|
-
## What to read next
|
|
1654
|
-
|
|
1655
|
-
- \`olam --help\`, \`olam setup --help\` — the canonical CLI surface.
|
|
1656
|
-
- [\`docs/architecture/peripheral-services-on-k3s.md\`](../architecture/peripheral-services-on-k3s.md) — design doc for the k3s peripheral architecture.
|
|
1657
|
-
- [\`docs/test-reports/olam-k3d-on-mac-substrate-decision-eli5.md\`](../test-reports/olam-k3d-on-mac-substrate-decision-eli5.md) — why the docker-socket-proxy sits where it sits.
|
|
1658
|
-
|
|
1659
|
-
---
|
|
1660
|
-
|
|
1661
|
-
## Architecture — the problem olam solves
|
|
1662
|
-
|
|
1663
|
-
Source: \`docs/architecture/01-problem.md\`
|
|
1664
|
-
|
|
1665
|
-
# 1 · The problem
|
|
1666
|
-
|
|
1667
|
-
## What "run an agent" usually means
|
|
1668
|
-
|
|
1669
|
-
Today, running a coding agent means one of these:
|
|
1670
|
-
|
|
1671
|
-
1. **Local CLI** — you install the agent on your laptop. It reads your
|
|
1672
|
-
files, writes your files, runs commands with your shell. Fast but:
|
|
1673
|
-
- Secrets, SSH keys, browser cookies — all in blast radius.
|
|
1674
|
-
- Agent state mixes with your state: shell history, node_modules,
|
|
1675
|
-
uncommitted WIP.
|
|
1676
|
-
- One agent at a time. No parallelism without manual isolation.
|
|
1677
|
-
- No audit trail beyond terminal scrollback.
|
|
1678
|
-
|
|
1679
|
-
2. **Ephemeral cloud runner** (Actions, remote sandbox SaaS) — better
|
|
1680
|
-
isolation but:
|
|
1681
|
-
- Boot latency measured in minutes.
|
|
1682
|
-
- Auth per-run (paste a token each time).
|
|
1683
|
-
- No persistent identity: every run is a stranger.
|
|
1684
|
-
- The agent exits when the job exits. No interactive session.
|
|
1685
|
-
|
|
1686
|
-
3. **Long-lived VM** — stable identity but:
|
|
1687
|
-
- Drift: the VM accumulates state nobody audits.
|
|
1688
|
-
- Hard to reset cleanly; hard to parallelise.
|
|
1689
|
-
- Still one host. Blast radius = the VM.
|
|
1690
|
-
|
|
1691
|
-
## What we actually want
|
|
1692
|
-
|
|
1693
|
-
\`\`\`mermaid
|
|
1694
|
-
flowchart LR
|
|
1695
|
-
U[User] -->|one sentence| O{Olam}
|
|
1696
|
-
O -->|provisions| W[Isolated world]
|
|
1697
|
-
W -->|runs| A[Agent]
|
|
1698
|
-
A -->|work + trail| R[Reviewed PR]
|
|
1699
|
-
R -->|back to| U
|
|
1700
|
-
|
|
1701
|
-
style W fill:#1e1e24,stroke:#4f6aff,color:#e4e4e7
|
|
1702
|
-
style R fill:#0c0c0f,stroke:#2eaa6f,color:#e4e4e7
|
|
1703
|
-
\`\`\`
|
|
1704
|
-
|
|
1705
|
-
Properties the user doesn't want to negotiate:
|
|
1706
|
-
|
|
1707
|
-
- **Throw-away**: the world should be destroyable without remorse. No
|
|
1708
|
-
state worth keeping should live there after the run.
|
|
1709
|
-
- **Pre-loaded**: repos cloned, credentials injected, MCP servers
|
|
1710
|
-
pre-baked. Zero setup per-task.
|
|
1711
|
-
- **Resumable**: if the platform evicts the sandbox, I come back to it
|
|
1712
|
-
still knowing my context, not a login screen.
|
|
1713
|
-
- **Honest**: the system tells me what the agent did — every tool call,
|
|
1714
|
-
every edit, every review verdict — without me re-running anything.
|
|
1715
|
-
- **Gated**: "done" means *actually* done. Not "the agent stopped
|
|
1716
|
-
typing."
|
|
1717
|
-
|
|
1718
|
-
## Why existing tools don't combine into this
|
|
1719
|
-
|
|
1720
|
-
Each tool gets one or two of those properties. None ships the full
|
|
1721
|
-
stack:
|
|
1722
|
-
|
|
1723
|
-
| Property | Local CLI | Actions | SaaS sandbox | Long VM | **Olam** |
|
|
1724
|
-
|--------------------|:---------:|:-------:|:------------:|:-------:|:--------:|
|
|
1725
|
-
| Isolation | ✗ | ✓ | ✓ | ✗ | ✓ |
|
|
1726
|
-
| Sub-second boot | ✓ | ✗ | ✗ | ✓ | ✓ |
|
|
1727
|
-
| Persistent identity| ✓ | ✗ | ✗ | ✓ | ✓ |
|
|
1728
|
-
| Resumable | ✓ | ✗ | ✗ | ✓ | ✓ |
|
|
1729
|
-
| Audit trail | ✗ | ~ | ~ | ✗ | ✓ |
|
|
1730
|
-
| Completion gates | ✗ | ✗ | ✗ | ✗ | ✓ |
|
|
1731
|
-
|
|
1732
|
-
The last row — explicit completion gates — is the one no one ships.
|
|
1733
|
-
That's where the real product lives.
|
|
1734
|
-
|
|
1735
|
-
## Where olam sits
|
|
1736
|
-
|
|
1737
|
-
Olam ships in two flavors. Both expose the same world abstraction; the
|
|
1738
|
-
difference is where the workshop runs.
|
|
1739
|
-
|
|
1740
|
-
\`\`\`mermaid
|
|
1741
|
-
flowchart TB
|
|
1742
|
-
subgraph yourmachine ["Your machine"]
|
|
1743
|
-
CLI["olam CLI / MCP"]
|
|
1744
|
-
BR["Browser"]
|
|
1745
|
-
end
|
|
1746
|
-
|
|
1747
|
-
subgraph local ["Local flavor — host-cp"]
|
|
1748
|
-
HC["host-cp orchestrator (:9090)"]
|
|
1749
|
-
AS["auth-service (:9999)"]
|
|
1750
|
-
DB["devbox containers (per world)"]
|
|
1751
|
-
end
|
|
1752
|
-
|
|
1753
|
-
subgraph cloud ["Cloud flavor — Cloudflare edge"]
|
|
1754
|
-
W["Worker / Durable Object"]
|
|
1755
|
-
S["Sandbox Container"]
|
|
1756
|
-
end
|
|
1757
|
-
|
|
1758
|
-
subgraph dist ["Distribution"]
|
|
1759
|
-
NPM["npm — @ernerds/olam"]
|
|
1760
|
-
GHCR["GHCR — 3 multi-arch images"]
|
|
1761
|
-
end
|
|
1762
|
-
|
|
1763
|
-
subgraph providers ["Providers"]
|
|
1764
|
-
CA["Anthropic / Claude Code"]
|
|
1765
|
-
GH["GitHub"]
|
|
1766
|
-
LN["Linear"]
|
|
1767
|
-
end
|
|
1768
|
-
|
|
1769
|
-
NPM -->|"npm install -g"| CLI
|
|
1770
|
-
CLI -->|"olam bootstrap, pull by digest"| GHCR
|
|
1771
|
-
GHCR -->|"host-cp, auth, devbox"| HC
|
|
1772
|
-
GHCR --> AS
|
|
1773
|
-
GHCR --> DB
|
|
1774
|
-
|
|
1775
|
-
CLI -->|"local"| HC
|
|
1776
|
-
BR -->|"local"| HC
|
|
1777
|
-
HC <-->|"docker exec / ttyd"| DB
|
|
1778
|
-
AS -->|"PKCE + token mint"| CA
|
|
1779
|
-
DB -->|"withCredential"| AS
|
|
1780
|
-
|
|
1781
|
-
CLI -.->|"cloud"| W
|
|
1782
|
-
BR -.->|"cloud"| W
|
|
1783
|
-
W <-->|"RPC"| S
|
|
1784
|
-
W -->|"OAuth"| CA
|
|
1785
|
-
|
|
1786
|
-
DB -->|"gh"| GH
|
|
1787
|
-
DB --> LN
|
|
1788
|
-
S -->|"gh"| GH
|
|
1789
|
-
S --> LN
|
|
1790
|
-
|
|
1791
|
-
style HC fill:#16161a,stroke:#4f6aff,color:#e4e4e7
|
|
1792
|
-
style AS fill:#16161a,stroke:#eab308,color:#e4e4e7
|
|
1793
|
-
style DB fill:#16161a,stroke:#c084fc,color:#e4e4e7
|
|
1794
|
-
style W fill:#16161a,stroke:#4f6aff,color:#e4e4e7
|
|
1795
|
-
style S fill:#16161a,stroke:#c084fc,color:#e4e4e7
|
|
1796
|
-
\`\`\`
|
|
1797
|
-
|
|
1798
|
-
**Local flavor** (default for self-hosted operators).
|
|
1799
|
-
\`npm install -g @ernerds/olam\` lands a CLI; \`olam bootstrap\` pulls three
|
|
1800
|
-
images by digest from GHCR — \`olam-host-cp\`, \`olam-auth\`, \`olam-devbox\` —
|
|
1801
|
-
runs the protocol-version handshake, starts host-cp + auth-service, and
|
|
1802
|
-
walks the operator through Anthropic PKCE. Worlds are docker containers
|
|
1803
|
-
on the operator's own machine.
|
|
1804
|
-
|
|
1805
|
-
**Cloud flavor**. The Cloudflare Worker plus a \`@cloudflare/sandbox\`
|
|
1806
|
-
Durable Object plays the role host-cp plays locally. The container is
|
|
1807
|
-
Cloudflare-managed.
|
|
1808
|
-
|
|
1809
|
-
In both flavors a *gateway* mediates everything that can't safely live
|
|
1810
|
-
inside a world: OAuth token exchange, the credential vault, world
|
|
1811
|
-
lifecycle, and the completion ladder. The container is the *workshop*;
|
|
1812
|
-
the gateway (host-cp or Worker) is the *supervisor*.
|
|
1813
|
-
|
|
1814
|
-
Next: [2 · The paradigm](./02-paradigm.md) — the three ideas that make
|
|
1815
|
-
this actually cohere.
|
|
1816
|
-
|
|
1817
|
-
---
|
|
1818
|
-
|
|
1819
|
-
## Architecture — system overview
|
|
1820
|
-
|
|
1821
|
-
Source: \`docs/architecture/03-system.md\`
|
|
1822
|
-
|
|
1823
|
-
# 3 · System architecture
|
|
1824
|
-
|
|
1825
|
-
Olam runs two substrates in parallel. Both expose the same world
|
|
1826
|
-
abstraction; both share the same control concepts (credential vault,
|
|
1827
|
-
world lifecycle, completion ladder, crystallization via Pleri Plane).
|
|
1828
|
-
The difference is whether the workshop runs on the operator's machine
|
|
1829
|
-
or on Cloudflare's edge.
|
|
1830
|
-
|
|
1831
|
-
\`\`\`mermaid
|
|
1832
|
-
flowchart TB
|
|
1833
|
-
subgraph client ["Client surface"]
|
|
1834
|
-
Dash["Dashboard SPA — React 19 + Vite"]
|
|
1835
|
-
CLI["olam CLI / MCP (npm: @ernerds/olam)"]
|
|
1836
|
-
end
|
|
1837
|
-
|
|
1838
|
-
subgraph local ["Local flavor — host-cp on operator machine"]
|
|
1839
|
-
HC["host-cp orchestrator (:9090)"]
|
|
1840
|
-
AS["auth-service (:9999, single-container vault)"]
|
|
1841
|
-
DBs["devbox container per world (Node 20 + zsh + Claude Code + Codex)"]
|
|
1842
|
-
end
|
|
1843
|
-
|
|
1844
|
-
subgraph cloud ["Cloud flavor — Cloudflare edge"]
|
|
1845
|
-
CFA["CF Access SSO (JWT or service token)"]
|
|
1846
|
-
W["Worker · olam (routing + OAuth + orchestrator)"]
|
|
1847
|
-
DO[("Durable Object · OlamSandbox (phase, seed, trace, completion)")]
|
|
1848
|
-
KV1[("KV · OLAM_CREDS (per-user tokens)")]
|
|
1849
|
-
KV2[("KV · OLAM_WORKSPACES")]
|
|
1850
|
-
R2[("R2 · OLAM_USER_PROFILES (skill bundles)")]
|
|
1851
|
-
S["Sandbox container (cloudflare/sandbox:0.8.10)"]
|
|
1852
|
-
end
|
|
1853
|
-
|
|
1854
|
-
subgraph providers ["Providers (shared)"]
|
|
1855
|
-
ANT["Anthropic OAuth + token endpoint"]
|
|
1856
|
-
GH["GitHub · gh CLI"]
|
|
1857
|
-
LN["Linear MCP"]
|
|
1858
|
-
PP["Pleri Plane · crystallize REST API"]
|
|
1859
|
-
end
|
|
1860
|
-
|
|
1861
|
-
Dash -->|"HTTPS — local"| HC
|
|
1862
|
-
CLI -->|"HTTPS — local"| HC
|
|
1863
|
-
HC <-->|"docker exec, ttyd, hooks"| DBs
|
|
1864
|
-
HC -->|"world lifecycle, completion ladder"| HC
|
|
1865
|
-
DBs -->|"withCredential — observes 429"| AS
|
|
1866
|
-
AS -->|"PKCE, refresh, mint per-world tokens"| ANT
|
|
1867
|
-
|
|
1868
|
-
Dash -.->|"HTTPS — cloud"| CFA
|
|
1869
|
-
CLI -.->|"service token — cloud"| CFA
|
|
1870
|
-
CFA --> W
|
|
1871
|
-
W <-->|"RPC"| DO
|
|
1872
|
-
W <--> KV1
|
|
1873
|
-
W <--> KV2
|
|
1874
|
-
W <--> R2
|
|
1875
|
-
W <-->|"containerFetch / wsConnect"| S
|
|
1876
|
-
W -->|"OAuth — edge can reach providers"| ANT
|
|
1877
|
-
|
|
1878
|
-
DBs -->|"gh"| GH
|
|
1879
|
-
DBs --> LN
|
|
1880
|
-
DBs -->|"crystallize POST"| PP
|
|
1881
|
-
S -->|"gh"| GH
|
|
1882
|
-
S --> LN
|
|
1883
|
-
S -->|"crystallize POST"| PP
|
|
1884
|
-
|
|
1885
|
-
style HC fill:#0c0c0f,stroke:#4f6aff,color:#e4e4e7
|
|
1886
|
-
style AS fill:#0c0c0f,stroke:#eab308,color:#e4e4e7
|
|
1887
|
-
style DBs fill:#1e1e24,stroke:#2eaa6f,color:#e4e4e7
|
|
1888
|
-
style W fill:#0c0c0f,stroke:#4f6aff,color:#e4e4e7
|
|
1889
|
-
style DO fill:#0c0c0f,stroke:#a855f7,color:#e4e4e7
|
|
1890
|
-
style S fill:#1e1e24,stroke:#2eaa6f,color:#e4e4e7
|
|
1891
|
-
style KV1 fill:#0c0c0f,stroke:#eab308,color:#e4e4e7
|
|
1892
|
-
style PP fill:#0c0c0f,stroke:#22d3ee,color:#e4e4e7
|
|
1893
|
-
\`\`\`
|
|
1894
|
-
|
|
1895
|
-
## Shared concepts
|
|
1896
|
-
|
|
1897
|
-
Both flavors implement the same quartet:
|
|
1898
|
-
|
|
1899
|
-
- **Credential vault with hot-swap**. 429s observed at the
|
|
1900
|
-
\`withCredential\` boundary report cooldown back to the vault, which
|
|
1901
|
-
rotates to the next-eligible credential on retry. Local: auth-service.
|
|
1902
|
-
Cloud: \`OLAM_CREDS\` KV plus the Worker's edge OAuth path. See
|
|
1903
|
-
[credential-hotswap.md](./credential-hotswap.md).
|
|
1904
|
-
- **World lifecycle state machine**. Phases —
|
|
1905
|
-
\`created → syncing → cloning → configuring → auth_required|warming →
|
|
1906
|
-
ready → task_running\` — with legal-transition guards.
|
|
1907
|
-
- **Completion ladder**. Explicit ladder events validated by the same
|
|
1908
|
-
\`completion.ts\` state machine; the ladder is what makes "done" mean
|
|
1909
|
-
*actually* done.
|
|
1910
|
-
- **Crystallization via Pleri Plane**. Thought graphs accumulated by MCP
|
|
1911
|
-
tools are flushed to the Pleri Plane REST API (\`POST /crystallize\`) via
|
|
1912
|
-
\`PleriClient\` (\`packages/core/src/pleri/\`). A single \`pleri.token\` in
|
|
1913
|
-
\`.olam/config.yaml\` replaces the former direct Neon database credentials.
|
|
1914
|
-
Thoughts buffer locally in a per-container SQLite store (\`world.db\`) if
|
|
1915
|
-
Pleri is unreachable or unconfigured; a world functions fully without
|
|
1916
|
-
Pleri, but crystallization is unavailable until connectivity is restored.
|
|
1917
|
-
See [ADR-004](../decisions/004-pleri-plane-replaces-neon.md).
|
|
1918
|
-
|
|
1919
|
-
## Local-flavor components
|
|
1920
|
-
|
|
1921
|
-
### CLI (\`@ernerds/olam\`)
|
|
1922
|
-
- Single npm package; \`npm install -g @ernerds/olam\` (Node 20+).
|
|
1923
|
-
- \`olam bootstrap\` is the sole on-ramp: docker daemon smoke → parallel
|
|
1924
|
-
pull of 3 images by digest from GHCR (retry-throttle-coalesce per
|
|
1925
|
-
Decision 16) → protocol-version handshake (\`olam.protocol.versions\`)
|
|
1926
|
-
→ host-cp start → auth-service start → interactive PKCE.
|
|
1927
|
-
- \`olam upgrade\` performs the atomic 6-tag swap: \`:olam-rollback\` saves
|
|
1928
|
-
current canonical (\`:latest\` for host-cp + devbox, \`:local\` for auth)
|
|
1929
|
-
then \`:olam-next\` advances canonical. Source build is opt-in via
|
|
1930
|
-
\`--from-source\`, only honoured in monorepo dev mode.
|
|
1931
|
-
- \`olam create\` / \`dispatch\` / \`enter\` / \`pr\` etc. talk to host-cp.
|
|
1932
|
-
|
|
1933
|
-
### host-cp (\`olam-host-cp\` image)
|
|
1934
|
-
- Single container running on the operator's docker daemon, port 9090.
|
|
1935
|
-
- Owns world lifecycle, ttyd routing, hooks ingestion, completion
|
|
1936
|
-
projection — the same surface the Worker exposes in cloud mode.
|
|
1937
|
-
- Each world is a separately-spawned \`olam-devbox\` container; host-cp
|
|
1938
|
-
manages the docker lifecycle and proxies the dashboard.
|
|
1939
|
-
|
|
1940
|
-
### auth-service (\`olam-auth\` image)
|
|
1941
|
-
- Single container, port 9999. Holds the Anthropic refresh token in a
|
|
1942
|
-
local vault file (\`OLAM_AUTH_DATA_PATH\`).
|
|
1943
|
-
- Mints per-world access tokens via \`withCredential\`; observes 429s and
|
|
1944
|
-
cools down the offending credential. CI smoke: \`npm run audit:credentials\`.
|
|
1945
|
-
- Default canonical tag is \`:local\` (not \`:latest\`) per
|
|
1946
|
-
\`AuthContainerController.DEFAULT_IMAGE\`.
|
|
1947
|
-
|
|
1948
|
-
### devbox (\`olam-devbox\` image)
|
|
1949
|
-
- Per-world container. Pre-baked: Claude Code CLI, Codex CLI, Slack +
|
|
1950
|
-
Linear MCP servers, \`gh\`, ttyd, tmux, zsh.
|
|
1951
|
-
- Talks to auth-service over the host docker network for credential
|
|
1952
|
-
retrieval — never embeds raw tokens.
|
|
1953
|
-
- Crystallizes thought graphs to Pleri Plane via \`PleriClient\`; buffers
|
|
1954
|
-
locally in \`world.db\` (SQLite) when Pleri is unreachable.
|
|
1955
|
-
|
|
1956
|
-
## Cloud-flavor components
|
|
1957
|
-
|
|
1958
|
-
### Worker (\`olam\`)
|
|
1959
|
-
- Authority for cross-world concerns: vault lookup, OAuth refresh, PKCE
|
|
1960
|
-
exchange (providers block container egress IPs).
|
|
1961
|
-
- Path-based proxy to per-session container via \`/sandbox/:id/*\`
|
|
1962
|
-
(\`containerFetch\` for HTTP, \`wsConnect\` for the ttyd terminal iframe).
|
|
1963
|
-
- \`runSessionOrchestrator\` walks the world lifecycle in \`ctx.waitUntil\`.
|
|
1964
|
-
- \`POST /session/:id/completion/event\` validates ladder transitions.
|
|
1965
|
-
|
|
1966
|
-
### Durable Object (\`OlamSandbox\`)
|
|
1967
|
-
- One DO per world, keyed by \`sessionId\`. Extends \`@cloudflare/sandbox\`'s
|
|
1968
|
-
\`Sandbox\` class so it owns both container RPC and per-world state.
|
|
1969
|
-
- State persisted under a single \`world\` key: phase + detail + setupLog
|
|
1970
|
-
+ \`sessionMeta\` (seedTask, vaultEmail) + bounded traceBuffer (2000) +
|
|
1971
|
-
completion record.
|
|
1972
|
-
|
|
1973
|
-
### Container (cloud)
|
|
1974
|
-
- Based on \`cloudflare/sandbox:0.8.10\`. Same pre-baked toolchain as
|
|
1975
|
-
local devbox; same \`/api/*\` surface on port 8080.
|
|
1976
|
-
- Same \`PleriClient\` crystallization path as local devbox; Pleri token
|
|
1977
|
-
injected at session setup via the Worker's vault lookup.
|
|
1978
|
-
|
|
1979
|
-
### Vault (KV + R2)
|
|
1980
|
-
- \`OLAM_CREDS\` — per-user Anthropic + OpenAI tokens, scopes, expiry.
|
|
1981
|
-
- \`OLAM_WORKSPACES\` — repo lists + defaults.
|
|
1982
|
-
- \`OLAM_USER_PROFILES\` — content-addressed R2 bundle of skills the
|
|
1983
|
-
container untars into \`~/.claude/skills/\`.
|
|
1984
|
-
|
|
1985
|
-
## Dashboard (shared)
|
|
1986
|
-
|
|
1987
|
-
- Same React 19 + Vite + Motion 12 SPA in both flavors.
|
|
1988
|
-
- Local: served by host-cp; cloud: served from inside the sandbox
|
|
1989
|
-
container with \`<base href="/sandbox/:id/">\` injected.
|
|
1990
|
-
- Every panel is a projection — \`CompletionLadder\`, \`PhaseProgress\`,
|
|
1991
|
-
\`TracePanel\`, \`SeedCard\`, \`SessionHealthBar\` — never an inference.
|
|
1992
|
-
|
|
1993
|
-
## Traffic matrix (who talks to whom)
|
|
1994
|
-
|
|
1995
|
-
| From → To | Local flavor | Cloud flavor |
|
|
1996
|
-
|----------------------------|-------------------------------|------------------------------------|
|
|
1997
|
-
| Browser → gateway | HTTPS to host-cp :9090 | HTTPS to Worker via CF Access |
|
|
1998
|
-
| CLI / MCP → gateway | HTTPS to host-cp :9090 | service token via CF Access |
|
|
1999
|
-
| Gateway → world container | docker exec, ttyd, HTTP hooks | \`containerFetch\` / \`wsConnect\` |
|
|
2000
|
-
| Hooks → gateway | HTTP POST to host-cp | HTTP POST to container :8080 |
|
|
2001
|
-
| Gateway → Anthropic | auth-service PKCE | Worker edge OAuth |
|
|
2002
|
-
| World → Anthropic | \`withCredential\` to auth-svc | injected token from KV via Worker |
|
|
2003
|
-
| World → GitHub | injected \`GITHUB_TOKEN\` | injected \`GITHUB_TOKEN\` |
|
|
2004
|
-
| World → Pleri Plane | \`PleriClient\` HTTP POST (crystallize) | \`PleriClient\` HTTP POST (crystallize) |
|
|
2005
|
-
|
|
2006
|
-
## Substrate event delivery
|
|
2007
|
-
|
|
2008
|
-
The two substrates handle incoming GitHub events through opposite mechanisms,
|
|
2009
|
-
dictated by their environments.
|
|
2010
|
-
|
|
2011
|
-
**CF Worker — push (webhook).** The Worker exposes \`POST /webhooks/github\`
|
|
2012
|
-
(\`packages/cloudflare-worker/src/index.ts:2648\`) as a public GitHub App
|
|
2013
|
-
webhook receiver. GitHub delivers events to the Worker's stable public URL;
|
|
2014
|
-
the endpoint is HMAC-gated. CF has no persistent background processes —
|
|
2015
|
-
push is the only viable model.
|
|
2016
|
-
|
|
2017
|
-
**host-cp — poll.** host-cp runs \`packages/host-cp/src/pr-merge-poller.mjs\`,
|
|
2018
|
-
a polling loop (default 300 s interval) that queries the GitHub API to detect
|
|
2019
|
-
PR merges. host-cp runs on the operator's machine — often behind NAT or a
|
|
2020
|
-
firewall — so GitHub cannot push to it. Polling is the only viable model.
|
|
2021
|
-
|
|
2022
|
-
The two shapes are **functionally equivalent** (both detect the same events)
|
|
2023
|
-
but **architecturally opposite**: CF is push-based; host-cp is pull-based.
|
|
2024
|
-
This asymmetry is substrate-dictated, not a design gap. See
|
|
2025
|
-
[ADR-012](../decisions/012-substrate-event-delivery-asymmetry.md).
|
|
2026
|
-
|
|
2027
|
-
Next: [4 · World lifecycle](./04-lifecycle.md) — the phase state machine.
|
|
2028
|
-
|
|
2029
|
-
---
|
|
2030
|
-
|
|
2031
|
-
## Architecture — world lifecycle
|
|
2032
|
-
|
|
2033
|
-
Source: \`docs/architecture/04-lifecycle.md\`
|
|
2034
|
-
|
|
2035
|
-
# 4 · World lifecycle
|
|
2036
|
-
|
|
2037
|
-
The **phase** state machine owns provisioning. It sits one layer below
|
|
2038
|
-
the completion ladder — "is the world operational?" vs "is the work
|
|
2039
|
-
done?".
|
|
2040
|
-
|
|
2041
|
-
## States + transitions
|
|
2042
|
-
|
|
2043
|
-
\`\`\`mermaid
|
|
2044
|
-
stateDiagram-v2
|
|
2045
|
-
[*] --> created
|
|
2046
|
-
created --> syncing : orchestrator starts
|
|
2047
|
-
syncing --> cloning : profile loaded
|
|
2048
|
-
cloning --> configuring : repos cloned
|
|
2049
|
-
configuring --> auth_required : no vault creds
|
|
2050
|
-
configuring --> warming : vault creds injected
|
|
2051
|
-
auth_required --> warming : /auth/complete
|
|
2052
|
-
warming --> ready : probe ACKs
|
|
2053
|
-
warming --> failed : probe timeout or spawn error
|
|
2054
|
-
ready --> task_running : auto-dispatch
|
|
2055
|
-
task_running --> ready : dispatch accepted
|
|
2056
|
-
task_running --> destroyed : user destroys
|
|
2057
|
-
ready --> destroyed
|
|
2058
|
-
failed --> destroyed
|
|
2059
|
-
failed --> warming : /resume
|
|
2060
|
-
destroyed --> [*]
|
|
2061
|
-
\`\`\`
|
|
2062
|
-
|
|
2063
|
-
All transitions are validated in \`src/phase.ts:isLegalTransition\`.
|
|
2064
|
-
Illegal transitions throw \`IllegalPhaseTransitionError\`. Self-
|
|
2065
|
-
transitions on the same phase are legal — used to refresh the
|
|
2066
|
-
\`detail\` string during long phases like \`warming\`.
|
|
2067
|
-
|
|
2068
|
-
## The provisioning pipeline (happy path)
|
|
2069
|
-
|
|
2070
|
-
\`\`\`mermaid
|
|
2071
|
-
sequenceDiagram
|
|
2072
|
-
autonumber
|
|
2073
|
-
participant User
|
|
2074
|
-
participant Worker
|
|
2075
|
-
participant DO as Durable Object
|
|
2076
|
-
participant Sandbox as "Sandbox container"
|
|
2077
|
-
participant Vault as OLAM_CREDS KV
|
|
2078
|
-
participant Claude
|
|
2079
|
-
|
|
2080
|
-
User->>Worker: POST /session/start { task, workspace, userEmail }
|
|
2081
|
-
Worker->>DO: transition created → syncing
|
|
2082
|
-
Worker-->>User: 202 { sessionId, dashboardUrl }
|
|
2083
|
-
Note over Worker: remainder runs in ctx.waitUntil
|
|
2084
|
-
|
|
2085
|
-
Worker->>DO: setSessionMeta { seedTask, vaultEmail }
|
|
2086
|
-
Worker->>Sandbox: mkdir /home/user/workspace (via sandbox.exec)
|
|
2087
|
-
Worker->>Sandbox: gitCheckout repo₁ … repoₙ (parallel)
|
|
2088
|
-
Worker->>DO: transition → cloning (with detail)
|
|
2089
|
-
Worker->>Sandbox: writeFile pending-task.txt
|
|
2090
|
-
Worker->>DO: transition → configuring
|
|
2091
|
-
|
|
2092
|
-
Worker->>Vault: get user:<hash>:claude
|
|
2093
|
-
Vault-->>Worker: stored tokens
|
|
2094
|
-
Worker->>Worker: refreshClaudeTokens (always)
|
|
2095
|
-
Worker->>Vault: put refreshed tokens
|
|
2096
|
-
Worker->>Sandbox: writeFile ~/.claude/.credentials.json
|
|
2097
|
-
Worker->>Sandbox: writeFile ~/.claude/settings.json (hooks + permMode)
|
|
2098
|
-
Worker->>Sandbox: chown -R olam:olam /home/user
|
|
2099
|
-
|
|
2100
|
-
Worker->>DO: transition → warming
|
|
2101
|
-
Worker->>Sandbox: POST /api/session/warmup
|
|
2102
|
-
Sandbox->>Sandbox: tmux new-session -d -s claude-main -x 220 -y 50
|
|
2103
|
-
Sandbox->>Claude: runuser - olam -c 'claude --dangerously-skip-permissions --remote-control'
|
|
2104
|
-
Sandbox->>Sandbox: autoAcceptPrompts (bypass / trust / theme wizards)
|
|
2105
|
-
|
|
2106
|
-
loop Every 3s, up to 90s
|
|
2107
|
-
Worker->>Sandbox: POST /api/session/probe-ready
|
|
2108
|
-
Sandbox->>Sandbox: send nonce via ! echo <nonce> > /tmp/olam-probe-*
|
|
2109
|
-
Sandbox-->>Worker: {ready: true, elapsedMs}
|
|
2110
|
-
end
|
|
2111
|
-
|
|
2112
|
-
Worker->>DO: transition → ready
|
|
2113
|
-
Worker->>Sandbox: GET /api/pending-task → task
|
|
2114
|
-
Worker->>Sandbox: POST /dispatch { prompt: task }
|
|
2115
|
-
Worker->>DO: transition → task_running
|
|
2116
|
-
Worker->>DO: clearPendingTask
|
|
2117
|
-
\`\`\`
|
|
2118
|
-
|
|
2119
|
-
## The probe
|
|
2120
|
-
|
|
2121
|
-
The \`/api/session/probe-ready\` endpoint is the system's **definition
|
|
2122
|
-
of "ready."** It's not a heartbeat — it actively exercises the
|
|
2123
|
-
capability the rest of the pipeline depends on:
|
|
2124
|
-
|
|
2125
|
-
\`\`\`mermaid
|
|
2126
|
-
flowchart LR
|
|
2127
|
-
S1["tmux has-session"] --> S2["isClaudeResponsive"]
|
|
2128
|
-
S2 --> S3["send-keys Escape + Ctrl+U"]
|
|
2129
|
-
S3 --> S4["send-keys ! echo nonce > /tmp/olam-probe-nonce"]
|
|
2130
|
-
S4 --> S5["send-keys Enter"]
|
|
2131
|
-
S5 --> S6["poll /tmp for nonce file"]
|
|
2132
|
-
S6 -->|match| OK["ready: true"]
|
|
2133
|
-
S6 -->|timeout| FAIL["ready: false (stage: nonce-ack)"]
|
|
2134
|
-
|
|
2135
|
-
style OK fill:#0c0c0f,stroke:#2eaa6f,color:#e4e4e7
|
|
2136
|
-
style FAIL fill:#0c0c0f,stroke:#ef4444,color:#e4e4e7
|
|
2137
|
-
\`\`\`
|
|
2138
|
-
|
|
2139
|
-
Why the nonce approach:
|
|
2140
|
-
- \`tmux has-session\` alone lies — the session can exist but claude be
|
|
2141
|
-
stuck on a wizard.
|
|
2142
|
-
- \`capture-pane | grep ❯\` lies — claude uses \`❯\` as both input cursor
|
|
2143
|
-
and menu cursor.
|
|
2144
|
-
- Actually typing into claude's bash mode and waiting for a file is
|
|
2145
|
-
the **same syscall path** (posix_spawn → /bin/sh) that user
|
|
2146
|
-
commands + hooks use. If the probe succeeds, we know the whole
|
|
2147
|
-
spawn surface works.
|
|
2148
|
-
|
|
2149
|
-
Each probe mints its own nonce + unique file path, so late
|
|
2150
|
-
acknowledgements can never falsely satisfy a future probe (no
|
|
2151
|
-
stale-ack race).
|
|
2152
|
-
|
|
2153
|
-
## Resume
|
|
2154
|
-
|
|
2155
|
-
CF Sandbox containers can be evicted under idle pressure. When they
|
|
2156
|
-
come back, \`/home/user/.claude/*\` is empty and the claude-main tmux
|
|
2157
|
-
session is gone — but the DO still thinks the world is
|
|
2158
|
-
\`task_running\`.
|
|
2159
|
-
|
|
2160
|
-
\`\`\`mermaid
|
|
2161
|
-
sequenceDiagram
|
|
2162
|
-
autonumber
|
|
2163
|
-
participant Dash as Dashboard
|
|
2164
|
-
participant Worker
|
|
2165
|
-
participant DO
|
|
2166
|
-
participant Sandbox as "Reincarnated container"
|
|
2167
|
-
participant Vault
|
|
2168
|
-
|
|
2169
|
-
Dash->>Sandbox: GET /api/session-health
|
|
2170
|
-
Sandbox-->>Dash: { tmuxAlive: false, claudeRunning: false }
|
|
2171
|
-
Dash->>Dash: useAutoResume detects divergence
|
|
2172
|
-
|
|
2173
|
-
Note over Dash: also triggers when warming stalls > 60s
|
|
2174
|
-
|
|
2175
|
-
Dash->>Worker: POST /session/:id/resume
|
|
2176
|
-
Worker->>DO: read sessionMeta.vaultEmail
|
|
2177
|
-
Worker->>Vault: get + refresh creds
|
|
2178
|
-
Worker->>Sandbox: writeFile .credentials.json
|
|
2179
|
-
Worker->>DO: transition → warming (detail: resume)
|
|
2180
|
-
Worker->>Sandbox: POST /api/session/warmup
|
|
2181
|
-
Worker->>Worker: driveToReadyAndAutoDispatch (fresh waitUntil budget)
|
|
2182
|
-
Worker->>DO: transition → ready → task_running
|
|
2183
|
-
\`\`\`
|
|
2184
|
-
|
|
2185
|
-
The hook doesn't require user action — navigating back to a stale
|
|
2186
|
-
dashboard is enough. No Auth modal, no re-auth.
|
|
2187
|
-
|
|
2188
|
-
## Local devbox lifecycle
|
|
2189
|
-
|
|
2190
|
-
The CF flow above is one of two flavors. The local flavor swaps DO
|
|
2191
|
-
+ Sandbox for \`WorldManager\` + a docker container, and the SPA's
|
|
2192
|
-
host-cp daemon for the dashboard. The state machine is identical;
|
|
2193
|
-
the actors differ.
|
|
2194
|
-
|
|
2195
|
-
Key boundary: \`host-cp\` does **not** spawn devboxes. The CLI invokes
|
|
2196
|
-
\`WorldManager.createWorld()\` (in \`@olam/core\`) directly on the
|
|
2197
|
-
operator's host, then notifies host-cp so its inbox surfaces the
|
|
2198
|
-
world. host-cp deliberately ships without \`@olam/core\`'s native
|
|
2199
|
-
git/docker/sqlite deps to keep its container slim
|
|
2200
|
-
(\`packages/host-cp/src/server.mjs:610-680\`).
|
|
2201
|
-
|
|
2202
|
-
\`\`\`mermaid
|
|
2203
|
-
sequenceDiagram
|
|
2204
|
-
autonumber
|
|
2205
|
-
participant User
|
|
2206
|
-
participant CLI as "olam create CLI"
|
|
2207
|
-
participant WM as "WorldManager (@olam/core)"
|
|
2208
|
-
participant Docker as "Docker daemon"
|
|
2209
|
-
participant Devbox as "devbox container"
|
|
2210
|
-
participant HostCp as "host-cp daemon"
|
|
2211
|
-
participant Inbox as "SPA inbox"
|
|
2212
|
-
|
|
2213
|
-
User->>CLI: olam create my-world --workspace atlas
|
|
2214
|
-
CLI->>WM: createWorld({ name, repos, workspace, task })
|
|
2215
|
-
WM->>WM: resolve repos · allocate port · pick branch
|
|
2216
|
-
WM->>Docker: docker run olam-devbox:latest (volumes + env)
|
|
2217
|
-
Docker->>Devbox: container starts · CP boots on host port
|
|
2218
|
-
Devbox->>Devbox: git clone repos · inject vault creds
|
|
2219
|
-
Devbox->>Devbox: tmux new-session · spawn \`claude --remote-control\`
|
|
2220
|
-
WM-->>CLI: WorldMetadata { id, dashboardUrl, port }
|
|
2221
|
-
|
|
2222
|
-
Note over CLI: post-create auto-register
|
|
2223
|
-
|
|
2224
|
-
CLI->>HostCp: GET /api/bootstrap (probe + token)
|
|
2225
|
-
HostCp-->>CLI: 200 { token }
|
|
2226
|
-
CLI->>HostCp: POST /api/admin/registry { id, port }
|
|
2227
|
-
HostCp->>HostCp: persist ~/.olam/host-cp-registry.json
|
|
2228
|
-
HostCp->>Inbox: SSE world-added event
|
|
2229
|
-
Inbox-->>User: world card appears · "ready for dispatch"
|
|
2230
|
-
\`\`\`
|
|
2231
|
-
|
|
2232
|
-
If host-cp isn't running the create still succeeds —
|
|
2233
|
-
\`packages/cli/src/commands/create.ts\` falls through to a
|
|
2234
|
-
"World was created but not registered" warning with the manual
|
|
2235
|
-
\`olam host-cp register --world <id>\` remedy. Auto-registration is
|
|
2236
|
-
best-effort; the SQLite world index (\`~/.olam/worlds.db\`) is the
|
|
2237
|
-
source of truth and host-cp reconciles from it on startup.
|
|
2238
|
-
|
|
2239
|
-
Mode auto-detection: host-cp picks \`container\` vs \`bare\` mode by
|
|
2240
|
-
probing \`/.dockerenv\` (\`server.mjs:64-89\`). Container mode reaches
|
|
2241
|
-
per-world CPs via \`host.docker.internal:<port>\`; bare mode uses
|
|
2242
|
-
\`127.0.0.1:<port>\`. The same daemon binary serves both.
|
|
2243
|
-
|
|
2244
|
-
Next: [5 · Completion ladder](./05-completion.md) — the *work*
|
|
2245
|
-
state machine on top of this *operational* state machine.
|
|
2246
|
-
|
|
2247
|
-
---
|
|
2248
|
-
|
|
2249
|
-
## CLI command reference
|
|
2250
|
-
|
|
2251
|
-
Top-level commands (run \`olam <command> --help\` for flags and subcommands):
|
|
2252
|
-
|
|
2253
|
-
- \`olam add\` — Register a local repo path
|
|
2254
|
-
- \`olam admin\` — Admin operations (require admin secret)
|
|
2255
|
-
- \`olam aggregate\` — Aggregate plan stats by operator (gate #3 measurement)
|
|
2256
|
-
- \`olam apply\` — Create a world from a runbook spec (port-validates then delegates to WorldManager.createWorld)
|
|
2257
|
-
- \`olam apply-overlays\` — Merge ~/.claude/skills.overrides/ and ~/.claude/agents.overrides/ over upstream (section-as-unit merge per markdown-merger)
|
|
2258
|
-
- \`olam ask\` — Ask olam about its own usage, setup, and CLI (local Claude subscription)
|
|
2259
|
-
- \`olam audit-log\` — Inspect the manifest-refresh audit log (~/.olam/state/manifest-refresh-audit.jsonl).
|
|
2260
|
-
- \`olam auth\` — Manage the local Claude auth container
|
|
2261
|
-
- \`olam bake\` — Bake a source DB into the singleton as a named seed template
|
|
2262
|
-
- \`olam begin\` — Start the Olam host control plane (alias: olam host-cp start)
|
|
2263
|
-
- \`olam bind-service-token\` — Bind a Cloudflare service token to your CF Access user sub on the remote auth-worker
|
|
2264
|
-
- \`olam bootstrap\` — One-shot wiring of a fresh Hermes install to olam (MCP + KG hook + skill mirror)
|
|
2265
|
-
- \`olam build\` — Build pristine KG for a workspace (default: current dir). Routes through olam-kg-service /build endpoint. Use --pending to drain the pending queue.
|
|
2266
|
-
- \`olam check-ports\` — Check if runbook ports are available
|
|
2267
|
-
- \`olam classify\` — Route a query through the remote edge classifier (POST /v1/classify on the proxy Worker)
|
|
2268
|
-
- \`olam clean\` — Reap orphaned world filesystem state
|
|
2269
|
-
- \`olam completion\` — Emit a shell completion script for zsh or bash
|
|
2270
|
-
- \`olam config\` — Manage global olam configuration
|
|
2271
|
-
- \`olam create\` — Create a new development world
|
|
2272
|
-
- \`olam crystallize\` — Crystallize thoughts from a world to Pleri Plane
|
|
2273
|
-
- \`olam deregister\` — Remove a world from the host CP registry (does NOT destroy the world)
|
|
2274
|
-
- \`olam destroy\` — Destroy a world and clean up its resources
|
|
2275
|
-
- \`olam diagnose\` — Bundle diagnostics into a zip file for sharing with maintainers
|
|
2276
|
-
- \`olam diff\` — Show what
|
|
2277
|
-
- \`olam disable\` — Take a credential out of rotation (manual cooldown). LOCAL ONLY — no cloud equivalent yet (see OQ7 in docs/plans/cloud-only-vault/README.md).
|
|
2278
|
-
- \`olam dispatch\` — Send a prompt to a world for execution
|
|
2279
|
-
- \`olam doctor\` — Run 4 diagnostic probes against the remote auth-worker
|
|
2280
|
-
- \`olam down\` — [deprecated] Stop the auth container — use
|
|
2281
|
-
- \`olam enable\` — Re-enable a disabled credential. LOCAL ONLY — no cloud equivalent yet (see OQ7 in docs/plans/cloud-only-vault/README.md).
|
|
2282
|
-
- \`olam enter\` — Open terminal to a world
|
|
2283
|
-
- \`olam evict\` — Evict oldest snapshots until total size ≤ cap (default 5GB; override via OLAM_SNAPSHOT_MAX_BYTES)
|
|
2284
|
-
- \`olam get\` — Print the active substrate
|
|
2285
|
-
- \`olam graph\` — Query the cross-repo graph: locate a symbol, its relationships, or browse a repo (POST /v1/graph)
|
|
2286
|
-
- \`olam hermes\` — Hermes integration commands
|
|
2287
|
-
- \`olam host-cp\` — Manage the Olam host control plane container
|
|
2288
|
-
- \`olam implode\` — Destroy ALL local olam install and configs (dry-run by default)
|
|
2289
|
-
- \`olam init\` — Initialize olam in the current project or globally
|
|
2290
|
-
- \`olam inspect\` — Diagnose warm-create cache hits/misses for a workspace (read-only; mutates nothing)
|
|
2291
|
-
- \`olam install\` — Pick an archetype preset for this Olam install
|
|
2292
|
-
- \`olam install-hook\` — Install kg-service hook (idempotent). --for hermes targets ~/.hermes/; default targets .claude/settings.json
|
|
2293
|
-
- \`olam install-model-router\` — Deploy the model-router.py UserPromptSubmit hook script to ~/.claude/hooks/ (idempotent; auto-run by
|
|
2294
|
-
- \`olam issue-anthropic-token\` — Mint a new Anthropic proxy token via the remote auth-worker (g4)
|
|
2295
|
-
- \`olam keys\` — Manage LLM API keys stored at ~/.olam/keys.yaml
|
|
2296
|
-
- \`olam kg\` — Knowledge-graph operations (kg-service container)
|
|
2297
|
-
- \`olam lanes\` — Manage claude-lane-* tmux sessions inside a running world
|
|
2298
|
-
- \`olam list\` — List credentials. Defaults to the cloud auth-worker (Phase B). Pass --local to read the legacy ~/.olam/auth-data/accounts.json (emits deprecation warning).
|
|
2299
|
-
- \`olam list-anthropic-tokens\` — List Anthropic proxy tokens from the remote auth-worker (g4)
|
|
2300
|
-
- \`olam login\` — Log into the cloud auth-worker by default (Phase B); use --local to opt into the legacy local auth-service container PKCE flow.
|
|
2301
|
-
- \`olam logout\` — Remove an account from the auth container
|
|
2302
|
-
- \`olam logs\` — Stream application logs from a world (engine-agnostic)
|
|
2303
|
-
- \`olam migrate\` — Migrate local ~/.olam/auth-data/accounts.json to the cloud auth-worker.
|
|
2304
|
-
- \`olam migrate-hooks-back\` — Reverse olam-meta hook injection by restoring ~/.claude/settings.json from a B5 snapshot
|
|
2305
|
-
- \`olam migrate-to-remote\` — (deprecated) renamed to
|
|
2306
|
-
- \`olam mirror\` — cloud-kg-mirror operations (build via CF Worker, classify at edge)
|
|
2307
|
-
- \`olam observe\` — redirect to
|
|
2308
|
-
- \`olam onboard\` — Fresh-install umbrella: register + clone + install SessionStart hook + first sync, in one verb
|
|
2309
|
-
- \`olam path\` — Print the absolute path to ~/.olam/keys.yaml
|
|
2310
|
-
- \`olam plans\` — Manage Olam Cloud plans (list / show / rm / re-register)
|
|
2311
|
-
- \`olam policy-check\` — Check .olam/policies/ against the current diff
|
|
2312
|
-
- \`olam pr\` — Review and decide PR-gate requests from running worlds
|
|
2313
|
-
- \`olam prune\` — Delete shadow-backup files older than a duration (e.g. 30d) OR all of them with --all --force
|
|
2314
|
-
- \`olam ps\` — List running processes in a world container
|
|
2315
|
-
- \`olam pull\` — Fetch + reset the clone to upstream HEAD
|
|
2316
|
-
- \`olam refresh\` — Force-refresh an account token (substrate-aware: updates kubernetes Secret on k8s substrate). LOCAL ONLY — no cloud equivalent yet (see OQ7 in docs/plans/cloud-only-vault/README.md).
|
|
2317
|
-
- \`olam register\` — Register a world with the running host CP so it appears in the unified UI
|
|
2318
|
-
- \`olam rekey\` — Rotate the per-world postgres password for a hybrid-mode world
|
|
2319
|
-
- \`olam remove\` — Permanently remove a credential (purge tokens)
|
|
2320
|
-
- \`olam reorder\` — Move a registered source to a new ordinal (1-indexed; mutates precedence)
|
|
2321
|
-
- \`olam repos\` — Manage the global repo registry
|
|
2322
|
-
- \`olam restart\` — Restart a world container (auto-builds agent-stream bundle when stale)
|
|
2323
|
-
- \`olam restore\` — Move a shadow-backup file back to its original path
|
|
2324
|
-
- \`olam resume\` — Re-enter a world by PR number, URL, or branch name
|
|
2325
|
-
- \`olam revoke-anthropic-token\` — Revoke an Anthropic proxy token on the remote auth-worker (g4)
|
|
2326
|
-
- \`olam rotate-service-token\` — Revoke a service token and guide through re-binding a replacement
|
|
2327
|
-
- \`olam runbooks\` — Manage runbooks in the global config
|
|
2328
|
-
- \`olam savings\` — Show cumulative KG-hit savings tallied by the kg-service container
|
|
2329
|
-
- \`olam seed\` — Manage postgres seed templates on the olam-postgres singleton
|
|
2330
|
-
- \`olam services\` — Manage Olam service containers (up/down/status/logs)
|
|
2331
|
-
- \`olam set-prefix\` — Set the deploy prefix for a registered skill source (skills+agents deploy as <prefix>:<canonical-name>)
|
|
2332
|
-
- \`olam set-prefix-scope\` — Set which artifact kinds are renamed by the prefix (comma-separated: skill, agent, or skill,agent)
|
|
2333
|
-
- \`olam set-prefix-target\` — Restrict prefix renaming to canonical names matching the given glob patterns (only * wildcard supported).
|
|
2334
|
-
- \`olam setup\` — Fresh-host onboarding wizard (k3d cluster + services, idempotent)
|
|
2335
|
-
- \`olam setup-linux-gate-status\` — Check whether the Linux platform expansion gate has been triggered
|
|
2336
|
-
- \`olam setup-metrics\` — Query trust-audit-log for setup dogfood statistics
|
|
2337
|
-
- \`olam shadow-backups\` — Manage
|
|
2338
|
-
- \`olam show\` — Show full gate detail (diff, command, commits)
|
|
2339
|
-
- \`olam skills\` — Manage skill sources and synchronization
|
|
2340
|
-
- \`olam snapshot\` — Manage world snapshots for fast boot
|
|
2341
|
-
- \`olam source\` — Manage registered skill sources
|
|
2342
|
-
- \`olam start\` — Start the host CP container (token regenerated each call)
|
|
2343
|
-
- \`olam status\` — [deprecated] Show container state — use
|
|
2344
|
-
- \`olam stop\` — Stop the host CP container + remove token + PID files
|
|
2345
|
-
- \`olam substrate\` — Manage deployment substrate (beta)
|
|
2346
|
-
- \`olam sync\` — Sync registered skill sources to ~/.claude/
|
|
2347
|
-
- \`olam tls-install\` — Provision a locally-trusted TLS cert (mkcert) for the Traefik IngressRoute
|
|
2348
|
-
- \`olam uninstall\` — Remove /100x: chain skill symlinks from ~/.claude/skills (preserves user-authored skills + non-chain skill sources)
|
|
2349
|
-
- \`olam uninstall-hook\` — Remove kg-service PreToolUse hook from .claude/settings.json (sentinel-matched; surgical)
|
|
2350
|
-
- \`olam unset-prefix\` — Remove the deploy prefix from a registered skill source (reverts to canonical deploy names)
|
|
2351
|
-
- \`olam unset-prefix-scope\` — Remove the prefix-scope override from a registered skill source (reverts to default: both skill and agent are renamed)
|
|
2352
|
-
- \`olam unset-prefix-target\` — Remove the prefix-target override from a registered skill source (reverts to default: all canonical names are renamed)
|
|
2353
|
-
- \`olam up\` — [deprecated] Start the auth container — use
|
|
2354
|
-
- \`olam update\` — Update a registered repo
|
|
2355
|
-
- \`olam upgrade\` — Upgrade the olam-auth container. Default: pull olam-auth@<digest> from ghcr.io and recreate.
|
|
2356
|
-
- \`olam version\` — Show olam-cli version + registered chain-skill source identities
|
|
2357
|
-
- \`olam watch\` — Run graphify --watch against a workspace, keeping its pristine KG fresh
|
|
2358
|
-
- \`olam workspace\` — Manage the named catalog of repo bundles that worlds instantiate from
|
|
2359
|
-
- \`olam world\` — World management subcommands
|
|
2360
|
-
- \`olam yolo\` — Parallel Claude Code session in a new tmux window + isolated worktree
|
|
2361
|
-
`;
|
|
2362
|
-
//# sourceMappingURL=knowledge-pack.generated.js.map
|