@pleri/olam-cli 0.1.186 → 0.1.188
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ask/knowledge-pack-builder.d.ts.map +1 -1
- package/dist/ask/knowledge-pack-builder.js +5 -0
- package/dist/ask/knowledge-pack-builder.js.map +1 -1
- package/dist/ask/knowledge-pack.generated.d.ts.map +1 -1
- package/dist/ask/knowledge-pack.generated.js +406 -22
- package/dist/ask/knowledge-pack.generated.js.map +1 -1
- package/dist/commands/auth-status.js +2 -2
- package/dist/commands/auth-status.js.map +1 -1
- package/dist/commands/auth.js +1 -1
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +4 -0
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/install.js +2 -2
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/services.d.ts.map +1 -1
- package/dist/commands/services.js +12 -0
- package/dist/commands/services.js.map +1 -1
- package/dist/commands/setup.js +1 -1
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +4 -0
- package/dist/commands/status.js.map +1 -1
- package/dist/image-digests.json +8 -8
- package/dist/index.js +788 -368
- package/dist/lib/health-probes.d.ts +14 -0
- package/dist/lib/health-probes.d.ts.map +1 -1
- package/dist/lib/health-probes.js +41 -3
- package/dist/lib/health-probes.js.map +1 -1
- package/dist/mcp-server.js +95 -27
- package/hermes-bundle/version.json +1 -1
- 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/chunks-electric/10-serviceaccount.yaml +8 -0
- package/host-cp/k8s/manifests/chunks-electric/20-rbac.yaml +27 -0
- package/host-cp/k8s/manifests/chunks-electric/30-configmap.yaml +23 -0
- package/host-cp/k8s/manifests/chunks-electric/45-pvc.yaml +19 -0
- package/host-cp/k8s/manifests/chunks-electric/50-deployment.yaml +84 -0
- package/host-cp/k8s/manifests/chunks-electric/60-service.yaml +17 -0
- package/host-cp/k8s/manifests/chunks-postgres/10-serviceaccount.yaml +8 -0
- package/host-cp/k8s/manifests/chunks-postgres/20-rbac.yaml +29 -0
- package/host-cp/k8s/manifests/chunks-postgres/30-configmap.yaml +185 -0
- package/host-cp/k8s/manifests/chunks-postgres/45-pvc.yaml +24 -0
- package/host-cp/k8s/manifests/chunks-postgres/50-deployment.yaml +101 -0
- package/host-cp/k8s/manifests/chunks-postgres/60-service.yaml +24 -0
- 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/k8s/manifests/plan-chat-service/10-serviceaccount.yaml +8 -0
- package/host-cp/k8s/manifests/plan-chat-service/20-rbac.yaml +29 -0
- package/host-cp/k8s/manifests/plan-chat-service/30-configmap.yaml +36 -0
- package/host-cp/k8s/manifests/plan-chat-service/45-pvc.yaml +24 -0
- package/host-cp/k8s/manifests/plan-chat-service/50-deployment.yaml +135 -0
- package/host-cp/k8s/manifests/plan-chat-service/60-service.yaml +17 -0
- package/host-cp/src/plan-chat-service.mjs +216 -0
- package/host-cp/src/pr-cache.mjs +11 -2
- package/host-cp/src/server.mjs +36 -20
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knowledge-pack-builder.d.ts","sourceRoot":"","sources":["../../src/ask/knowledge-pack-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,yEAAyE;AACzE,MAAM,WAAW,UAAU;IACzB,gFAAgF;IAChF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,mEAAmE;IACnE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,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zE"}
|
|
@@ -38,6 +38,11 @@ export const DEFAULT_PACK_SOURCES = [
|
|
|
38
38
|
label: 'Setup — fresh machine',
|
|
39
39
|
optional: true,
|
|
40
40
|
},
|
|
41
|
+
{
|
|
42
|
+
path: 'docs/onboarding/k3s-mode-setup.md',
|
|
43
|
+
label: 'Setup — k3d/k3s mode (default substrate, port 19001)',
|
|
44
|
+
optional: true,
|
|
45
|
+
},
|
|
41
46
|
{
|
|
42
47
|
path: 'docs/architecture/01-problem.md',
|
|
43
48
|
label: 'Architecture — the problem olam solves',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knowledge-pack-builder.js","sourceRoot":"","sources":["../../src/ask/knowledge-pack-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAeH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAA0B;IACzD,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,6CAA6C,EAAE;IAC3E;QACE,IAAI,EAAE,oBAAoB;QAC1B,KAAK,EAAE,kDAAkD;QACzD,QAAQ,EAAE,IAAI;KACf;IACD;QACE,IAAI,EAAE,wCAAwC;QAC9C,KAAK,EAAE,uBAAuB;QAC9B,QAAQ,EAAE,IAAI;KACf;IACD;QACE,IAAI,EAAE,iCAAiC;QACvC,KAAK,EAAE,wCAAwC;QAC/C,QAAQ,EAAE,IAAI;KACf;IACD;QACE,IAAI,EAAE,gCAAgC;QACtC,KAAK,EAAE,gCAAgC;QACvC,QAAQ,EAAE,IAAI;KACf;IACD;QACE,IAAI,EAAE,mCAAmC;QACzC,KAAK,EAAE,gCAAgC;QACvC,QAAQ,EAAE,IAAI;KACf;CACF,CAAC;AA2BF,6EAA6E;AAC7E,MAAM,WAAW,GAAG;;;;;uDAKmC,CAAC;AAExD;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAA8B;IAC/D,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,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AC;YACD,MAAM,IAAI,KAAK,CACb,gDAAgD,GAAG,CAAC,IAAI,cAAc,GAAG,GAAG,CAC7E,CAAC;QACJ,CAAC;QACD,MAAM,IAAI,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;QACxC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,KAAK,iBAAiB,GAAG,CAAC,IAAI,SAAS,IAAI,EAAE,CAAC,CAAC;IACtE,CAAC;IAED,IAAI,KAAK,CAAC,gBAAgB,IAAI,KAAK,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvE,KAAK,CAAC,IAAI,CAAC,+BAA+B,KAAK,CAAC,gBAAgB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC;AAC1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knowledge-pack.generated.d.ts","sourceRoot":"","sources":["../../src/ask/knowledge-pack.generated.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,eAAO,MAAM,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"knowledge-pack.generated.d.ts","sourceRoot":"","sources":["../../src/ask/knowledge-pack.generated.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,eAAO,MAAM,cAAc,EAAE,MAkxE5B,CAAC"}
|
|
@@ -173,20 +173,16 @@ codes are explicit: \`3\` = pull failed, \`4\` = protocol mismatch.
|
|
|
173
173
|
|
|
174
174
|
## Quick start
|
|
175
175
|
|
|
176
|
+
**Two paths: Kubernetes (default, full-featured) or Docker Compose (lighter, for CI).**
|
|
177
|
+
|
|
178
|
+
### Kubernetes (recommended)
|
|
179
|
+
|
|
176
180
|
\`\`\`bash
|
|
177
181
|
curl -fsSL https://olam.bar.dev/install | sh
|
|
178
182
|
olam setup
|
|
179
183
|
\`\`\`
|
|
180
184
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
The setup wizard is **idempotent** — re-running skips steps that are already complete.
|
|
184
|
-
|
|
185
|
-
After setup, every world is one call:
|
|
186
|
-
|
|
187
|
-
\`\`\`bash
|
|
188
|
-
olam create --name my-world --task "audit the auth module for SSRF"
|
|
189
|
-
\`\`\`
|
|
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.
|
|
190
186
|
|
|
191
187
|
Full setup guide (prereqs, observability, troubleshooting):
|
|
192
188
|
[\`docs/onboarding/k3s-mode-setup.md\`](./docs/onboarding/k3s-mode-setup.md).
|
|
@@ -204,6 +200,16 @@ This runs three host containers (auth, mcp-auth, kg-service) via docker compose
|
|
|
204
200
|
|
|
205
201
|
Full setup guide for compose mode: [\`docs/onboarding/fresh-machine-setup.md\`](./docs/onboarding/fresh-machine-setup.md).
|
|
206
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
|
+
|
|
207
213
|
---
|
|
208
214
|
|
|
209
215
|
## Setup
|
|
@@ -783,6 +789,7 @@ Source: \`docs/ONBOARDING.md\`
|
|
|
783
789
|
|
|
784
790
|
- **Docker daemon** running (Docker Desktop, or colima on macOS)
|
|
785
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
|
|
786
793
|
- **Claude Code** (\`claude --version\`) — authenticated via \`claude auth login\`
|
|
787
794
|
- **Git** with SSH key configured for your repos
|
|
788
795
|
|
|
@@ -793,7 +800,7 @@ Source: \`docs/ONBOARDING.md\`
|
|
|
793
800
|
No source checkout required — the CLI publishes to npm:
|
|
794
801
|
|
|
795
802
|
\`\`\`bash
|
|
796
|
-
curl -fsSL https://olam.bar.dev/install | sh # installs @pleri/olam-cli on PATH
|
|
803
|
+
curl -fsSL https://olam.bar.dev/install | sh # installs @pleri/olam-cli on PATH (PLERI is the GitHub org & npm scope)
|
|
797
804
|
olam setup # k3d cluster + full peripheral stack
|
|
798
805
|
\`\`\`
|
|
799
806
|
|
|
@@ -804,7 +811,15 @@ mcp-auth-service, kg-service, and memory-service. Pass
|
|
|
804
811
|
no cluster). Full guide:
|
|
805
812
|
[\`docs/onboarding/k3s-mode-setup.md\`](onboarding/k3s-mode-setup.md).
|
|
806
813
|
|
|
807
|
-
## 2.
|
|
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)
|
|
808
823
|
|
|
809
824
|
\`\`\`bash
|
|
810
825
|
olam mcp install # default --scope=user
|
|
@@ -817,7 +832,7 @@ worlds directly. Core tools: \`olam_create\`, \`olam_dispatch\`,
|
|
|
817
832
|
\`olam_enter\`, \`olam_crystallize\`, \`olam_pr_*\`. Restart Claude Code and
|
|
818
833
|
verify with \`claude mcp list\` (look for \`olam\`).
|
|
819
834
|
|
|
820
|
-
##
|
|
835
|
+
## 4. Configure your repos (2 minutes)
|
|
821
836
|
|
|
822
837
|
Point Olam at the repos a world should clone. Use the interactive
|
|
823
838
|
wizard:
|
|
@@ -832,7 +847,7 @@ world-runner tier (\`docker\` | \`cloudflare\` | \`cloudflare-isolate\`). See
|
|
|
832
847
|
[\`docs/architecture/config-spec.md\`](architecture/config-spec.md) for
|
|
833
848
|
the full schema.
|
|
834
849
|
|
|
835
|
-
##
|
|
850
|
+
## 5. Create your first world (2 minutes)
|
|
836
851
|
|
|
837
852
|
In Claude Code, say:
|
|
838
853
|
|
|
@@ -844,9 +859,9 @@ Claude will:
|
|
|
844
859
|
1. Create a Docker container (or CF Sandbox) with your repo cloned
|
|
845
860
|
2. Set up git worktrees for isolation
|
|
846
861
|
3. Boot the in-world Claude session and auto-dispatch the task
|
|
847
|
-
4. Return the Host CP dashboard URL (\`http://127.0.0.1:
|
|
862
|
+
4. Return the Host CP dashboard URL (\`http://127.0.0.1:19001\`)
|
|
848
863
|
|
|
849
|
-
##
|
|
864
|
+
## 6. Dispatch a task (1 minute)
|
|
850
865
|
|
|
851
866
|
\`\`\`
|
|
852
867
|
Dispatch to the world: investigate and fix the session timeout issue
|
|
@@ -854,7 +869,7 @@ Dispatch to the world: investigate and fix the session timeout issue
|
|
|
854
869
|
|
|
855
870
|
Claude Code runs autonomously inside the world. Every tool call, every decision, every exploration is captured as a thought node.
|
|
856
871
|
|
|
857
|
-
##
|
|
872
|
+
## 7. Watch it work (ongoing)
|
|
858
873
|
|
|
859
874
|
**Dashboard:** Open the Host CP URL from step 4. You'll see:
|
|
860
875
|
- the **seed of thought** pinned at the top (the immutable task)
|
|
@@ -869,7 +884,7 @@ Claude Code runs autonomously inside the world. Every tool call, every decision,
|
|
|
869
884
|
What is the world thinking right now?
|
|
870
885
|
\`\`\`
|
|
871
886
|
|
|
872
|
-
##
|
|
887
|
+
## 8. Clean up
|
|
873
888
|
|
|
874
889
|
\`\`\`
|
|
875
890
|
Crystallize and destroy the world
|
|
@@ -891,7 +906,7 @@ after \`olam setup\`):
|
|
|
891
906
|
\`\`\`bash
|
|
892
907
|
olam create --name login-fix --repos my-project --task "Fix session timeout"
|
|
893
908
|
olam dispatch login-fix "investigate and fix the session timeout"
|
|
894
|
-
olam observe login-fix #
|
|
909
|
+
olam observe login-fix # Alternative: \`olam enter login-fix\` for a shell inside the world (until \`olam observe\` ships)
|
|
895
910
|
olam status login-fix
|
|
896
911
|
olam crystallize login-fix # requires PLERI; otherwise no-op (exit 2)
|
|
897
912
|
olam destroy login-fix # accepts the world ID or name
|
|
@@ -929,11 +944,38 @@ refresh token never leaves the service.
|
|
|
929
944
|
|
|
930
945
|
| Problem | Fix |
|
|
931
946
|
|---------|-----|
|
|
947
|
+
| Something not working | Run \`olam doctor\` — it diagnoses the setup and shows remedies for each issue |
|
|
932
948
|
| "Docker not running" | Start Docker Desktop |
|
|
933
949
|
| "No Claude credentials" | Run \`claude auth login\` on the host |
|
|
950
|
+
| "GHCR pull secret failed" or "401 unauthorized" on first \`olam setup\` | Run \`gh auth login\` and verify with \`gh auth status\` |
|
|
934
951
|
| Dashboard shows empty | Wait for the first dispatch to generate thoughts |
|
|
935
952
|
| "Port already in use" | Another world is running. Use \`olam list\` to check |
|
|
936
953
|
| Session seems stuck | Use \`olam enter <world>\` to open the terminal and check |
|
|
954
|
+
| **Blank white page at \`localhost:19001\`** | SPA dist not built. Run \`cd packages/host-cp && npm run build:spa\` from the repo root (or just \`npm start\` — the \`prestart\` hook does it automatically). |
|
|
955
|
+
| 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. |
|
|
956
|
+
|
|
957
|
+
## Bare-node / source-checkout mode
|
|
958
|
+
|
|
959
|
+
If you are running host-cp directly from source (not via \`olam setup\`
|
|
960
|
+
or a pulled Docker image), you need to build the SPA before first boot:
|
|
961
|
+
|
|
962
|
+
\`\`\`bash
|
|
963
|
+
# From the repo root:
|
|
964
|
+
cd packages/host-cp
|
|
965
|
+
npm run build:spa # builds plan-chat-spa and stages it into packages/host-cp/dist/
|
|
966
|
+
npm start # prestart hook runs check:spa first; rebuilds if dist is stale
|
|
967
|
+
\`\`\`
|
|
968
|
+
|
|
969
|
+
\`npm start\` runs \`check:spa\` first. If \`dist/\` is already populated and
|
|
970
|
+
self-consistent (every asset in \`index.html\` is present on disk) it skips
|
|
971
|
+
the build and starts immediately. If not, it calls \`build:spa\` to rebuild.
|
|
972
|
+
|
|
973
|
+
The \`build:spa\` script triggers a full \`npm run build:ci\` + \`vite build\`
|
|
974
|
+
chain on a cold checkout (takes ~60s the first time; subsequent runs skip
|
|
975
|
+
the vite build if \`packages/plan-chat-spa/dist/client/\` is already populated).
|
|
976
|
+
|
|
977
|
+
**This is not required when using \`olam setup\`** — the Docker image has the
|
|
978
|
+
SPA baked in and host-cp never touches the local \`dist/\` directory.
|
|
937
979
|
|
|
938
980
|
## Architecture
|
|
939
981
|
|
|
@@ -1088,16 +1130,18 @@ olam skills source list
|
|
|
1088
1130
|
|
|
1089
1131
|
---
|
|
1090
1132
|
|
|
1091
|
-
## 5. Start the memory
|
|
1133
|
+
## 5. Start the memory service (Docker container)
|
|
1092
1134
|
|
|
1093
|
-
The memory-
|
|
1135
|
+
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.
|
|
1094
1136
|
|
|
1095
1137
|
\`\`\`bash
|
|
1096
1138
|
olam memory secret # → shows the bearer at ~/.olam/memory-secret (auto-generated on first run)
|
|
1097
|
-
olam memory start # → starts the
|
|
1098
|
-
olam memory status # →
|
|
1139
|
+
olam memory start # → starts the olam-memory-service container; polls livez until ready
|
|
1140
|
+
olam memory status # → container state + livez + secret-set check
|
|
1099
1141
|
\`\`\`
|
|
1100
1142
|
|
|
1143
|
+
**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.
|
|
1144
|
+
|
|
1101
1145
|
Sanity check the live probe:
|
|
1102
1146
|
|
|
1103
1147
|
\`\`\`bash
|
|
@@ -1225,6 +1269,7 @@ If the recall hook doesn't fire, run \`olam memory status\` to confirm the bridg
|
|
|
1225
1269
|
## What's NOT in this doc
|
|
1226
1270
|
|
|
1227
1271
|
- Setting up Cloudflare-substrate worlds (separate doc: \`docs/architecture/cf-worlds-spec.md\`).
|
|
1272
|
+
- **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.
|
|
1228
1273
|
- PLERI thought-graph integration (separate setup; skip-pleri is fine for most operators).
|
|
1229
1274
|
- Per-project skill overrides (advanced; see Phase B B2 + \`docs/architecture/skill-source-contract.md\`).
|
|
1230
1275
|
- Cutting an olam release (developer flow, not operator flow; see \`~/.claude/skills/olam-cut-release/SKILL.md\`).
|
|
@@ -1251,6 +1296,345 @@ npm uninstall -g @pleri/olam-cli
|
|
|
1251
1296
|
|
|
1252
1297
|
---
|
|
1253
1298
|
|
|
1299
|
+
## Setup — k3d/k3s mode (default substrate, port 19001)
|
|
1300
|
+
|
|
1301
|
+
Source: \`docs/onboarding/k3s-mode-setup.md\`
|
|
1302
|
+
|
|
1303
|
+
# Olam in k3d mode — definitive setup guide
|
|
1304
|
+
|
|
1305
|
+
> **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.
|
|
1306
|
+
>
|
|
1307
|
+
> **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.
|
|
1308
|
+
>
|
|
1309
|
+
> **Time**: ~5 minutes warm, ~10 minutes cold (image pulls).
|
|
1310
|
+
>
|
|
1311
|
+
> **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.
|
|
1312
|
+
|
|
1313
|
+
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).
|
|
1314
|
+
|
|
1315
|
+
---
|
|
1316
|
+
|
|
1317
|
+
## 0. Prerequisites
|
|
1318
|
+
|
|
1319
|
+
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.
|
|
1320
|
+
|
|
1321
|
+
| Tool | Why | Install |
|
|
1322
|
+
|---|---|---|
|
|
1323
|
+
| **Node.js ≥ 20** | The olam CLI runs on Node | \`nvm install 20\` |
|
|
1324
|
+
| **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 |
|
|
1325
|
+
| **colima** (macOS, optional) | Lightweight Docker runtime for macOS | \`brew install colima && colima start --cpu 4 --memory 8 --vm-type=vz --mount-type=virtiofs\` |
|
|
1326
|
+
| **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\` |
|
|
1327
|
+
| **kubectl** | Cluster operations | \`brew install kubectl\` |
|
|
1328
|
+
| **helm** | Installs Loki + Promtail + Grafana + Prometheus + Kyverno | \`brew install helm\` |
|
|
1329
|
+
| **gh** | ghcr-pull secret + \`gh auth token\` | \`brew install gh && gh auth login\` |
|
|
1330
|
+
| **docker** + \`docker compose\` plugin | Hosts the docker-socket-proxy sibling container | Docker Desktop, or colima ships it |
|
|
1331
|
+
| **jq, curl, openssl** | Shell helpers | macOS defaults |
|
|
1332
|
+
| **Claude Code subscription** | The \`claude\` CLI inside each world consumes your local subscription | \`npm install -g @anthropic-ai/claude-code\` |
|
|
1333
|
+
|
|
1334
|
+
---
|
|
1335
|
+
|
|
1336
|
+
## 1. Install the olam CLI
|
|
1337
|
+
|
|
1338
|
+
\`\`\`bash
|
|
1339
|
+
# One-line installer (recommended)
|
|
1340
|
+
curl -fsSL https://olam.bar.dev/install | sh
|
|
1341
|
+
|
|
1342
|
+
# Or via npm directly
|
|
1343
|
+
npm install -g @pleri/olam-cli
|
|
1344
|
+
\`\`\`
|
|
1345
|
+
|
|
1346
|
+
Verify:
|
|
1347
|
+
|
|
1348
|
+
\`\`\`bash
|
|
1349
|
+
olam --version
|
|
1350
|
+
\`\`\`
|
|
1351
|
+
|
|
1352
|
+
The CLI ships every manifest, secret template, and observability install script it needs inside the npm tarball — no \`git clone\` required.
|
|
1353
|
+
|
|
1354
|
+
---
|
|
1355
|
+
|
|
1356
|
+
## 2. Authenticate \`gh\`
|
|
1357
|
+
|
|
1358
|
+
\`\`\`bash
|
|
1359
|
+
gh auth login
|
|
1360
|
+
\`\`\`
|
|
1361
|
+
|
|
1362
|
+
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.
|
|
1363
|
+
|
|
1364
|
+
---
|
|
1365
|
+
|
|
1366
|
+
## 3. Bootstrap
|
|
1367
|
+
|
|
1368
|
+
Single command, end-to-end:
|
|
1369
|
+
|
|
1370
|
+
\`\`\`bash
|
|
1371
|
+
olam setup
|
|
1372
|
+
\`\`\`
|
|
1373
|
+
|
|
1374
|
+
Pass \`-y\` to skip all prompts (non-interactive, auto-affirm every step):
|
|
1375
|
+
|
|
1376
|
+
\`\`\`bash
|
|
1377
|
+
olam setup -y
|
|
1378
|
+
\`\`\`
|
|
1379
|
+
|
|
1380
|
+
The command is **idempotent** — re-running against an existing cluster only does work for incomplete steps. It runs five ordered phases:
|
|
1381
|
+
|
|
1382
|
+
| # | Phase | What it does |
|
|
1383
|
+
|---|---|---|
|
|
1384
|
+
| 0 | **Preflight** | Detects missing tools and prints actionable install commands. Verifies \`gh\` is authenticated and the docker daemon is reachable. |
|
|
1385
|
+
| 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). |
|
|
1386
|
+
| 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). |
|
|
1387
|
+
| 3 | **Cluster** | \`k3d cluster create olam-dev\` with the gh-config bind. Skipped if cluster exists. (Override the name with \`--cluster-name\`.) |
|
|
1388
|
+
| 4 | **Observability** | Chains the bundled install scripts: Loki + Promtail, Grafana with port-forward + admin secret, kube-prometheus-stack with recording rules, Kyverno admission policy. |
|
|
1389
|
+
| 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. |
|
|
1390
|
+
|
|
1391
|
+
Flag reference:
|
|
1392
|
+
|
|
1393
|
+
\`\`\`bash
|
|
1394
|
+
olam setup --help
|
|
1395
|
+
\`\`\`
|
|
1396
|
+
|
|
1397
|
+
Common overrides:
|
|
1398
|
+
|
|
1399
|
+
- \`-y, --yes\` — auto-affirm every prompt (non-interactive).
|
|
1400
|
+
- \`--substrate <docker|kubernetes>\` — force a substrate instead of auto-detecting.
|
|
1401
|
+
- \`--cluster-name <name>\` — k3d cluster name to create/use (default: \`olam-dev\`).
|
|
1402
|
+
- \`--reuse-cluster <name>\` — reuse an existing reachable kube context instead of provisioning.
|
|
1403
|
+
- \`--skip-cluster-create\` — cluster already exists; skip cluster provisioning.
|
|
1404
|
+
- \`--skip-doctor\` — skip final health check (useful in CI).
|
|
1405
|
+
|
|
1406
|
+
---
|
|
1407
|
+
|
|
1408
|
+
## 4. Verify the cluster is healthy
|
|
1409
|
+
|
|
1410
|
+
\`\`\`bash
|
|
1411
|
+
kubectl get pods -n olam
|
|
1412
|
+
\`\`\`
|
|
1413
|
+
|
|
1414
|
+
Expected — all five \`1/1 Running\`:
|
|
1415
|
+
|
|
1416
|
+
\`\`\`
|
|
1417
|
+
NAME READY STATUS RESTARTS AGE
|
|
1418
|
+
olam-auth-service-... 1/1 Running 0 ~5m
|
|
1419
|
+
olam-host-cp-... 1/1 Running 0 ~5m
|
|
1420
|
+
olam-kg-service-... 1/1 Running 0 ~5m
|
|
1421
|
+
olam-mcp-auth-service-... 1/1 Running 0 ~5m
|
|
1422
|
+
olam-memory-service-... 1/1 Running 0 ~5m
|
|
1423
|
+
\`\`\`
|
|
1424
|
+
|
|
1425
|
+
If something's off:
|
|
1426
|
+
|
|
1427
|
+
\`\`\`bash
|
|
1428
|
+
olam doctor # checks substrate, cluster, pods, secrets
|
|
1429
|
+
olam services status # k8s-aware status table
|
|
1430
|
+
\`\`\`
|
|
1431
|
+
|
|
1432
|
+
---
|
|
1433
|
+
|
|
1434
|
+
## 5. Open Grafana
|
|
1435
|
+
|
|
1436
|
+
\`\`\`bash
|
|
1437
|
+
kubectl port-forward -n monitoring svc/olam-grafana 3000:80
|
|
1438
|
+
open http://localhost:3000
|
|
1439
|
+
\`\`\`
|
|
1440
|
+
|
|
1441
|
+
User \`admin\`, password from:
|
|
1442
|
+
|
|
1443
|
+
\`\`\`bash
|
|
1444
|
+
kubectl get secret olam-grafana-admin -n monitoring \\
|
|
1445
|
+
-o jsonpath='{.data.admin-password}' | base64 -d
|
|
1446
|
+
\`\`\`
|
|
1447
|
+
|
|
1448
|
+
Pre-installed dashboards (under "Olam"):
|
|
1449
|
+
|
|
1450
|
+
- **olam-home** — at-a-glance status across all peripherals.
|
|
1451
|
+
- **host-cp** — request rate, p50/p95/p99 latency, world counts.
|
|
1452
|
+
- **kg-service** — classifier hit rate, classify latency, hook traffic.
|
|
1453
|
+
- **request-rate** — per-route HTTP request rate (uses recording rule \`olam:http_requests:rate5m_by_service_route\`).
|
|
1454
|
+
|
|
1455
|
+
---
|
|
1456
|
+
|
|
1457
|
+
## 6. Day-to-day operations
|
|
1458
|
+
|
|
1459
|
+
\`\`\`bash
|
|
1460
|
+
olam doctor # health check across substrate
|
|
1461
|
+
olam services status # peripherals status table (k8s-aware)
|
|
1462
|
+
olam services restart <name> # kubectl rollout restart for one peripheral
|
|
1463
|
+
olam services down # scale all peripherals to 0 replicas
|
|
1464
|
+
olam services up # scale them back to 1
|
|
1465
|
+
\`\`\`
|
|
1466
|
+
|
|
1467
|
+
To pick up a new release after \`npm install -g @pleri/olam-cli@latest\`:
|
|
1468
|
+
|
|
1469
|
+
\`\`\`bash
|
|
1470
|
+
olam upgrade
|
|
1471
|
+
\`\`\`
|
|
1472
|
+
|
|
1473
|
+
The upgrade flow re-applies all manifests (Kubernetes rolls the deployments to the new image digests); persistent volumes survive.
|
|
1474
|
+
|
|
1475
|
+
---
|
|
1476
|
+
|
|
1477
|
+
## 7. Tear down
|
|
1478
|
+
|
|
1479
|
+
\`\`\`bash
|
|
1480
|
+
olam implode --dry-run # preview what will be removed
|
|
1481
|
+
olam implode # confirmed: cluster + secrets + state
|
|
1482
|
+
\`\`\`
|
|
1483
|
+
|
|
1484
|
+
\`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.
|
|
1485
|
+
|
|
1486
|
+
---
|
|
1487
|
+
|
|
1488
|
+
## Choosing compose mode instead
|
|
1489
|
+
|
|
1490
|
+
To use the lighter 3-container compose path instead:
|
|
1491
|
+
|
|
1492
|
+
\`\`\`bash
|
|
1493
|
+
curl -fsSL https://olam.bar.dev/install | sh
|
|
1494
|
+
olam setup --substrate=docker
|
|
1495
|
+
\`\`\`
|
|
1496
|
+
|
|
1497
|
+
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.
|
|
1498
|
+
|
|
1499
|
+
Full compose guide: [\`fresh-machine-setup.md\`](./fresh-machine-setup.md).
|
|
1500
|
+
|
|
1501
|
+
---
|
|
1502
|
+
|
|
1503
|
+
## Architecture quick-ref
|
|
1504
|
+
|
|
1505
|
+
\`\`\`
|
|
1506
|
+
┌─────────────────────────┐
|
|
1507
|
+
│ operator's machine │
|
|
1508
|
+
│ │
|
|
1509
|
+
│ ~/.olam/*-secret ─────┼──▶ Kubernetes Secrets
|
|
1510
|
+
│ ~/.config/gh ─────┼──▶ k3d --volume bind
|
|
1511
|
+
│ │
|
|
1512
|
+
│ ┌─────────────────┐ │
|
|
1513
|
+
│ │ docker daemon │ │
|
|
1514
|
+
│ │ │ │
|
|
1515
|
+
│ │ ┌──────────┐ │ │
|
|
1516
|
+
│ │ │ k3d node │ │ │ ┌─────────────────────────┐
|
|
1517
|
+
│ │ │ cluster │◀──┼────┼─────│ ghcr.io/pleri/olam-* │
|
|
1518
|
+
│ │ │ olam-dev │ │ │ │ (pulled with gh token) │
|
|
1519
|
+
│ │ └────┬─────┘ │ │ └─────────────────────────┘
|
|
1520
|
+
│ │ │ TCP │ │
|
|
1521
|
+
│ │ ▼ :2375 │ │
|
|
1522
|
+
│ │ ┌──────────────┴┐ │
|
|
1523
|
+
│ │ │ docker-socket │ │
|
|
1524
|
+
│ │ │ proxy │ │
|
|
1525
|
+
│ │ │ (sibling │ │
|
|
1526
|
+
│ │ │ container) │ │
|
|
1527
|
+
│ │ └───────────────┘ │
|
|
1528
|
+
│ └─────────────────────┘
|
|
1529
|
+
└─────────────────────────┘
|
|
1530
|
+
│
|
|
1531
|
+
▼ k3d nodes via host.k3d.internal:2375
|
|
1532
|
+
┌──────────────────────────────────────┐
|
|
1533
|
+
│ cluster: olam-dev │
|
|
1534
|
+
│ │
|
|
1535
|
+
│ namespace: olam │
|
|
1536
|
+
│ olam-host-cp (1/1 Running) │
|
|
1537
|
+
│ olam-auth-service (1/1 Running) │
|
|
1538
|
+
│ olam-mcp-auth-svc (1/1 Running) │
|
|
1539
|
+
│ olam-kg-service (1/1 Running) │
|
|
1540
|
+
│ olam-memory-service (1/1 Running) │
|
|
1541
|
+
│ │
|
|
1542
|
+
│ namespace: monitoring │
|
|
1543
|
+
│ olam-grafana │
|
|
1544
|
+
│ prometheus-operated │
|
|
1545
|
+
│ loki + promtail │
|
|
1546
|
+
│ kyverno (admission) │
|
|
1547
|
+
└──────────────────────────────────────┘
|
|
1548
|
+
\`\`\`
|
|
1549
|
+
|
|
1550
|
+
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).
|
|
1551
|
+
|
|
1552
|
+
---
|
|
1553
|
+
|
|
1554
|
+
## Common issues
|
|
1555
|
+
|
|
1556
|
+
| Symptom | Fix |
|
|
1557
|
+
|---|---|
|
|
1558
|
+
| \`colima not running\` | \`colima start --cpu 4 --memory 8 --vm-type=vz --mount-type=virtiofs\` |
|
|
1559
|
+
| \`permission denied\` on docker socket | \`colima ssh -- sudo chmod 666 /var/run/docker.sock\` |
|
|
1560
|
+
| Missing tool errors at preflight | Install manually per the prereq table, then re-run \`olam setup\` |
|
|
1561
|
+
| \`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. |
|
|
1562
|
+
| \`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\` |
|
|
1563
|
+
| \`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\` |
|
|
1564
|
+
| \`imagePullBackOff\` from \`ghcr.io/pleri/olam-*\` | The bootstrap creates \`ghcr-pull\` from \`gh auth token\`; re-run \`olam setup\` after \`gh auth login\` |
|
|
1565
|
+
| Grafana dashboards missing | \`kubectl rollout restart deploy/olam-grafana -n monitoring\` |
|
|
1566
|
+
| 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 |
|
|
1567
|
+
| \`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. |
|
|
1568
|
+
|
|
1569
|
+
### Tuning helm timeouts on resource-constrained machines
|
|
1570
|
+
|
|
1571
|
+
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:
|
|
1572
|
+
|
|
1573
|
+
\`\`\`bash
|
|
1574
|
+
OLAM_HELM_TIMEOUT=900s olam setup # bootstrap with longer timeout
|
|
1575
|
+
OLAM_HELM_TIMEOUT=1200s olam setup # very loaded machines
|
|
1576
|
+
\`\`\`
|
|
1577
|
+
|
|
1578
|
+
CI Linux runners run unmodified at \`600s\` (dedicated resources). The knob exists for macOS-Colima hosts that share a VM with other docker workloads.
|
|
1579
|
+
|
|
1580
|
+
### Tuning Prometheus scrape/discovery waits
|
|
1581
|
+
|
|
1582
|
+
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:
|
|
1583
|
+
|
|
1584
|
+
\`\`\`bash
|
|
1585
|
+
OLAM_PROM_DISCOVERY_TIMEOUT=300 OLAM_PROM_SCRAPE_WAIT=120 npm run test:ingress-integration
|
|
1586
|
+
\`\`\`
|
|
1587
|
+
|
|
1588
|
+
### Troubleshooting port-forwards
|
|
1589
|
+
|
|
1590
|
+
**Problem:** connections to a port-forward (e.g. \`localhost:19001\` for host-cp, \`localhost:3000\` for Grafana) suddenly fail with "connection refused".
|
|
1591
|
+
|
|
1592
|
+
**Why:** kubectl port-forwards die when:
|
|
1593
|
+
- The terminal that started them exits
|
|
1594
|
+
- k3d restarts or the cluster reboots
|
|
1595
|
+
- The underlying pod crashes or is redeployed
|
|
1596
|
+
- The local kube context changes
|
|
1597
|
+
|
|
1598
|
+
**Diagnose:**
|
|
1599
|
+
\`\`\`bash
|
|
1600
|
+
ps aux | grep "kubectl port-forward"
|
|
1601
|
+
\`\`\`
|
|
1602
|
+
|
|
1603
|
+
If nothing shows up, the port-forward is dead and needs to be re-established.
|
|
1604
|
+
|
|
1605
|
+
**Fix:**
|
|
1606
|
+
|
|
1607
|
+
Option 1 — re-establish all port-forwards at once:
|
|
1608
|
+
\`\`\`bash
|
|
1609
|
+
olam services up
|
|
1610
|
+
\`\`\`
|
|
1611
|
+
|
|
1612
|
+
Option 2 — manually restart the port-forward (canonical command from the setup doc):
|
|
1613
|
+
\`\`\`bash
|
|
1614
|
+
kubectl port-forward -n olam svc/host-cp 19001:19001
|
|
1615
|
+
\`\`\`
|
|
1616
|
+
|
|
1617
|
+
Use \`olam services status\` to see which services are running and which port each binds to locally.
|
|
1618
|
+
|
|
1619
|
+
When everything else fails, tear down and re-create:
|
|
1620
|
+
|
|
1621
|
+
\`\`\`bash
|
|
1622
|
+
olam implode
|
|
1623
|
+
olam setup
|
|
1624
|
+
\`\`\`
|
|
1625
|
+
|
|
1626
|
+
\`olam implode\` removes everything; \`olam setup\` re-creates from scratch.
|
|
1627
|
+
|
|
1628
|
+
---
|
|
1629
|
+
|
|
1630
|
+
## What to read next
|
|
1631
|
+
|
|
1632
|
+
- \`olam --help\`, \`olam setup --help\` — the canonical CLI surface.
|
|
1633
|
+
- [\`docs/architecture/peripheral-services-on-k3s.md\`](../architecture/peripheral-services-on-k3s.md) — design doc for the k3s peripheral architecture.
|
|
1634
|
+
- [\`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.
|
|
1635
|
+
|
|
1636
|
+
---
|
|
1637
|
+
|
|
1254
1638
|
## Architecture — the problem olam solves
|
|
1255
1639
|
|
|
1256
1640
|
Source: \`docs/architecture/01-problem.md\`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knowledge-pack.generated.js","sourceRoot":"","sources":["../../src/ask/knowledge-pack.generated.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,oBAAoB;AAEpB,MAAM,CAAC,MAAM,cAAc,GAAW
|
|
1
|
+
{"version":3,"file":"knowledge-pack.generated.js","sourceRoot":"","sources":["../../src/ask/knowledge-pack.generated.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,oBAAoB;AAEpB,MAAM,CAAC,MAAM,cAAc,GAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkxErC,CAAC"}
|
|
@@ -227,12 +227,12 @@ export async function runAuthStatus(getStatus) {
|
|
|
227
227
|
status = await fetchStatus();
|
|
228
228
|
}
|
|
229
229
|
catch {
|
|
230
|
-
printError('Failed to contact auth service. Run `olam
|
|
230
|
+
printError('Failed to contact auth service. Run `olam services up` first.');
|
|
231
231
|
process.exitCode = 1;
|
|
232
232
|
return;
|
|
233
233
|
}
|
|
234
234
|
if (!status.reachable) {
|
|
235
|
-
printError('Auth container is not reachable. Run `olam
|
|
235
|
+
printError('Auth container is not reachable. Run `olam services up` first.');
|
|
236
236
|
process.exitCode = 1;
|
|
237
237
|
return;
|
|
238
238
|
}
|