@pleri/olam-cli 0.1.148 → 0.1.151
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/agent-stream/agent-sdk-to-chunks.js +276 -0
- package/dist/agent-stream/agent-stream-launch.js +348 -0
- package/dist/agent-stream/chunks-subscriber-transport.js +262 -0
- package/dist/agent-stream/codex-runner.js +188 -0
- package/dist/agent-stream/driver-runner.js +347 -0
- package/dist/agent-stream/operator-subscription.js +179 -0
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +39 -0
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/doctor.d.ts +23 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +77 -3
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.d.ts +46 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +90 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/kg-build.d.ts +23 -0
- package/dist/commands/kg-build.d.ts.map +1 -1
- package/dist/commands/kg-build.js +104 -2
- package/dist/commands/kg-build.js.map +1 -1
- package/dist/commands/restart.d.ts +18 -0
- package/dist/commands/restart.d.ts.map +1 -0
- package/dist/commands/restart.js +113 -0
- package/dist/commands/restart.js.map +1 -0
- package/dist/commands/setup-linux-gate.d.ts +26 -0
- package/dist/commands/setup-linux-gate.d.ts.map +1 -0
- package/dist/commands/setup-linux-gate.js +42 -0
- package/dist/commands/setup-linux-gate.js.map +1 -0
- package/dist/commands/setup-metrics.d.ts +26 -0
- package/dist/commands/setup-metrics.d.ts.map +1 -0
- package/dist/commands/setup-metrics.js +57 -0
- package/dist/commands/setup-metrics.js.map +1 -0
- package/dist/commands/setup-phase-5a-skill-source.d.ts +68 -0
- package/dist/commands/setup-phase-5a-skill-source.d.ts.map +1 -0
- package/dist/commands/setup-phase-5a-skill-source.js +196 -0
- package/dist/commands/setup-phase-5a-skill-source.js.map +1 -0
- package/dist/commands/setup-phase-5b-project-sweep.d.ts +38 -0
- package/dist/commands/setup-phase-5b-project-sweep.d.ts.map +1 -0
- package/dist/commands/setup-phase-5b-project-sweep.js +175 -0
- package/dist/commands/setup-phase-5b-project-sweep.js.map +1 -0
- package/dist/commands/setup.d.ts +19 -0
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +22 -0
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/skills-10x.d.ts +23 -0
- package/dist/commands/skills-10x.d.ts.map +1 -0
- package/dist/commands/skills-10x.js +308 -0
- package/dist/commands/skills-10x.js.map +1 -0
- package/dist/image-digests.json +7 -7
- package/dist/index.js +17878 -15826
- package/dist/index.js.map +1 -1
- package/dist/lib/build-if-stale.d.ts +33 -0
- package/dist/lib/build-if-stale.d.ts.map +1 -0
- package/dist/lib/build-if-stale.js +156 -0
- package/dist/lib/build-if-stale.js.map +1 -0
- package/dist/lib/bundle-freshness.d.ts +57 -0
- package/dist/lib/bundle-freshness.d.ts.map +1 -0
- package/dist/lib/bundle-freshness.js +223 -0
- package/dist/lib/bundle-freshness.js.map +1 -0
- package/dist/lib/bundle-source.d.ts +52 -0
- package/dist/lib/bundle-source.d.ts.map +1 -0
- package/dist/lib/bundle-source.js +83 -0
- package/dist/lib/bundle-source.js.map +1 -0
- package/dist/lib/manifest-refresh.d.ts +34 -0
- package/dist/lib/manifest-refresh.d.ts.map +1 -1
- package/dist/lib/manifest-refresh.js +66 -0
- package/dist/lib/manifest-refresh.js.map +1 -1
- package/dist/lib/upgrade-kubernetes.d.ts +17 -1
- package/dist/lib/upgrade-kubernetes.d.ts.map +1 -1
- package/dist/lib/upgrade-kubernetes.js +125 -1
- package/dist/lib/upgrade-kubernetes.js.map +1 -1
- package/dist/mcp-server.js +84 -58
- package/host-cp/compose.yaml +6 -0
- package/host-cp/k8s/manifests/30-configmap.yaml +6 -0
- package/host-cp/k8s/manifests/50-deployment.yaml +46 -9
- package/host-cp/k8s/manifests/auth-service/50-deployment.yaml +7 -4
- package/host-cp/k8s/manifests/kg-service/50-deployment.yaml +1 -1
- package/host-cp/k8s/manifests/mcp-auth-service/50-deployment.yaml +7 -4
- package/host-cp/k8s/manifests/memory-service/50-deployment.yaml +6 -1
- package/host-cp/src/agent-runtime-trigger.mjs +7 -5
- package/host-cp/src/plan-chat-secret.mjs +13 -2
- package/host-cp/src/plan-chat-service.mjs +94 -12
- package/host-cp/src/server.mjs +19 -7
- package/host-cp/src/upgrade-spawner.mjs +10 -5
- package/package.json +4 -2
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
# Deployment for olam-mcp-auth-service.
|
|
2
2
|
#
|
|
3
3
|
# Image: pinned to sha256 digest (not :latest or named tag) per T4 threat model.
|
|
4
|
-
# Digest resolves to ghcr.io/pleri/olam-mcp-auth
|
|
4
|
+
# Digest resolves to ghcr.io/pleri/olam-mcp-auth:latest (multi-arch index).
|
|
5
|
+
# NOTE (B1): image name is olam-mcp-auth (NOT olam-mcp-auth-service) — matches the
|
|
6
|
+
# actual GHCR package name published by release.yml publish-mcp-auth job.
|
|
5
7
|
# To update: resolve the new tag's digest via:
|
|
6
|
-
# TOKEN=$(curl -s "https://ghcr.io/token?scope=repository:pleri/olam-mcp-auth
|
|
8
|
+
# TOKEN=$(curl -s "https://ghcr.io/token?scope=repository:pleri/olam-mcp-auth:pull&service=ghcr.io" | jq -r .token)
|
|
7
9
|
# curl -sI -H "Authorization: Bearer $TOKEN" \
|
|
8
10
|
# -H "Accept: application/vnd.oci.image.index.v1+json,application/vnd.docker.distribution.manifest.list.v2+json" \
|
|
9
|
-
# https://ghcr.io/v2/pleri/olam-mcp-auth
|
|
11
|
+
# https://ghcr.io/v2/pleri/olam-mcp-auth/manifests/<tag> | grep docker-content-digest
|
|
12
|
+
# Or use: node scripts/refresh-manifest-digests.mjs
|
|
10
13
|
#
|
|
11
14
|
# securityContext: conservative defaults per T6/T7 threat model (runAsNonRoot,
|
|
12
15
|
# readOnlyRootFilesystem). /tmp backed by emptyDir for transient write needs.
|
|
@@ -58,7 +61,7 @@ spec:
|
|
|
58
61
|
mountPath: /data
|
|
59
62
|
containers:
|
|
60
63
|
- name: olam-mcp-auth-service
|
|
61
|
-
image: ghcr.io/pleri/olam-mcp-auth
|
|
64
|
+
image: ghcr.io/pleri/olam-mcp-auth@sha256:5629edb29eb20a90b2eafb60cc36c96d212b7dea5b5248f0640f1567d2d350af
|
|
62
65
|
imagePullPolicy: IfNotPresent
|
|
63
66
|
securityContext:
|
|
64
67
|
runAsNonRoot: true
|
|
@@ -58,7 +58,12 @@ spec:
|
|
|
58
58
|
mountPath: /data
|
|
59
59
|
containers:
|
|
60
60
|
- name: olam-memory-service
|
|
61
|
-
image
|
|
61
|
+
# image first appears on GHCR after Phase B's publish-memory-service
|
|
62
|
+
# job fires on the first release post-merge. Remove the
|
|
63
|
+
# bootstrap-placeholder comment + run `npm run refresh:manifest-digests`
|
|
64
|
+
# once ghcr.io/pleri/olam-memory-service has a real published digest.
|
|
65
|
+
# bootstrap-placeholder: pre-publish; refresh after first release
|
|
66
|
+
image: ghcr.io/pleri/olam-memory-service@sha256:319956ebea27dc4bc15c343cd4f905cacbe5f8913acd14aeccda8271cbf2b23d
|
|
62
67
|
imagePullPolicy: IfNotPresent
|
|
63
68
|
securityContext:
|
|
64
69
|
runAsNonRoot: true
|
|
@@ -31,11 +31,13 @@ import { spawnSync, spawn } from 'node:child_process';
|
|
|
31
31
|
|
|
32
32
|
const SPAWN_TIMEOUT_MS = 10_000;
|
|
33
33
|
|
|
34
|
-
// Default container-side path for the supervisor binary.
|
|
35
|
-
//
|
|
36
|
-
//
|
|
37
|
-
//
|
|
38
|
-
//
|
|
34
|
+
// Default container-side path for the supervisor binary.
|
|
35
|
+
// In source-mode (OLAM_DEV=1): the operator's built host dist is bind-mounted
|
|
36
|
+
// read-only at /opt/olam/agent-stream/dist (Phase B1, olam-world-bundle-freshness).
|
|
37
|
+
// The mount overlays the image-baked dist, so this path always resolves to the
|
|
38
|
+
// freshest available binary — no docker cp required.
|
|
39
|
+
// In install-mode / cloud: the image-baked dist (devbox.runtime.glibc.Dockerfile
|
|
40
|
+
// lines 263-287 bake step) is the fallback; the path is the same.
|
|
39
41
|
const DEFAULT_SUPERVISOR_PATH = '/opt/olam/agent-stream/dist/agent-stream-launch.js';
|
|
40
42
|
|
|
41
43
|
/**
|
|
@@ -5,14 +5,25 @@
|
|
|
5
5
|
// hex string. Helpers generate, read, and rotate atomically. Rotation
|
|
6
6
|
// writes to a tmpfile and renames; mid-rotation reads see either the old
|
|
7
7
|
// or new value, never a partial write.
|
|
8
|
+
//
|
|
9
|
+
// Inside the Docker container, os.homedir() → /root, but compose.yaml mounts
|
|
10
|
+
// ${HOME}/.olam → /data. Without an env override, the bearer would be written
|
|
11
|
+
// to /root/.olam/plan-chat-secret (container ephemeral layer) and lost on
|
|
12
|
+
// every `docker compose up --force-recreate` (i.e. every `olam upgrade`).
|
|
13
|
+
// OLAM_PLAN_CHAT_SECRET_PATH is set to /data/plan-chat-secret in compose.yaml
|
|
14
|
+
// and k8s/manifests/30-configmap.yaml so all reads/writes land in the
|
|
15
|
+
// bind-mounted host directory. On bare-host installs (no container) the env
|
|
16
|
+
// var is unset and the path falls back to ~/.olam/plan-chat-secret — no
|
|
17
|
+
// behaviour change. Mirrors precedent commit 5b21d1f2 (PR #440) for plan.db.
|
|
8
18
|
|
|
9
19
|
import fs from 'node:fs';
|
|
10
20
|
import os from 'node:os';
|
|
11
21
|
import path from 'node:path';
|
|
12
22
|
import crypto from 'node:crypto';
|
|
13
23
|
|
|
14
|
-
export const
|
|
15
|
-
|
|
24
|
+
export const SECRET_PATH =
|
|
25
|
+
process.env.OLAM_PLAN_CHAT_SECRET_PATH ?? path.join(os.homedir(), '.olam', 'plan-chat-secret');
|
|
26
|
+
export const SECRET_DIR = path.dirname(SECRET_PATH);
|
|
16
27
|
const SECRET_BYTES = 32; // 64 hex chars
|
|
17
28
|
const SECRET_MODE = 0o600;
|
|
18
29
|
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
// OLAM_PLAN_CHAT_SECRET_PATH (default ~/.olam/plan-chat-secret)
|
|
31
31
|
|
|
32
32
|
import http from 'node:http';
|
|
33
|
+
import { performance } from 'node:perf_hooks';
|
|
33
34
|
import { Readable } from 'node:stream';
|
|
34
35
|
import { URL } from 'node:url';
|
|
35
36
|
import pg from 'pg';
|
|
@@ -178,13 +179,36 @@ function validateChunkInput(body) {
|
|
|
178
179
|
/**
|
|
179
180
|
* Build the HTTP request handler. Pure factory — easy to test against a
|
|
180
181
|
* stubbed pool. Production callers pass a real pg.Pool.
|
|
182
|
+
*
|
|
183
|
+
* Phase A A2 (olam-spa-electric-subscription-staleness): when `shapeDebug`
|
|
184
|
+
* is true OR `OLAM_PLAN_CHAT_SHAPE_DEBUG=1` is set in the environment,
|
|
185
|
+
* `handleGetShape` emits two structured log lines per long-poll cycle —
|
|
186
|
+
* one BEFORE the upstream fetch (with the rewritten `where` predicate +
|
|
187
|
+
* forwarded params) and one AFTER (with upstream status + electric-*
|
|
188
|
+
* response headers). Log lines go to `shapeDebugLog` (default
|
|
189
|
+
* `console.error`); tests inject a spy. Flag defaults OFF — production
|
|
190
|
+
* shapes incur a single boolean check per cycle and zero log I/O.
|
|
181
191
|
*/
|
|
182
|
-
export function createHandler({
|
|
192
|
+
export function createHandler({
|
|
193
|
+
pool,
|
|
194
|
+
bearer,
|
|
195
|
+
electricUrl,
|
|
196
|
+
shapeDebug,
|
|
197
|
+
shapeDebugLog,
|
|
198
|
+
}) {
|
|
183
199
|
if (!pool) throw new Error('createHandler: { pool } required');
|
|
184
200
|
if (typeof bearer !== 'string' || bearer.length === 0) {
|
|
185
201
|
throw new Error('createHandler: { bearer } required');
|
|
186
202
|
}
|
|
187
203
|
const electricBase = electricUrl ?? DEFAULT_ELECTRIC_URL;
|
|
204
|
+
const shapeDebugEnabled =
|
|
205
|
+
typeof shapeDebug === 'boolean'
|
|
206
|
+
? shapeDebug
|
|
207
|
+
: process.env.OLAM_PLAN_CHAT_SHAPE_DEBUG === '1';
|
|
208
|
+
const shapeLog =
|
|
209
|
+
typeof shapeDebugLog === 'function'
|
|
210
|
+
? shapeDebugLog
|
|
211
|
+
: (msg, details) => console.error(msg, details);
|
|
188
212
|
|
|
189
213
|
function checkAuth(req) {
|
|
190
214
|
const header = req.headers.authorization;
|
|
@@ -282,29 +306,76 @@ export function createHandler({ pool, bearer, electricUrl }) {
|
|
|
282
306
|
`session_id='${sessionId}' AND world_id='${worldId}'`,
|
|
283
307
|
);
|
|
284
308
|
|
|
309
|
+
// Phase A A2 — log BEFORE upstream fetch. Includes the rewritten
|
|
310
|
+
// `where` predicate so an operator can correlate client-supplied
|
|
311
|
+
// offset/handle with the server-derived scope. Cheap when off: one
|
|
312
|
+
// boolean check.
|
|
313
|
+
if (shapeDebugEnabled) {
|
|
314
|
+
shapeLog('[plan-chat-service:shape] → upstream', {
|
|
315
|
+
upstream: upstream.pathname + upstream.search,
|
|
316
|
+
offset: url.searchParams.get('offset'),
|
|
317
|
+
handle: url.searchParams.get('handle'),
|
|
318
|
+
live: url.searchParams.get('live'),
|
|
319
|
+
where: upstream.searchParams.get('where'),
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
|
|
285
323
|
let upstreamRes;
|
|
324
|
+
const upstreamStartedAt = shapeDebugEnabled ? performance.now() : 0;
|
|
286
325
|
try {
|
|
287
326
|
upstreamRes = await fetch(upstream, {
|
|
288
327
|
method: 'GET',
|
|
289
328
|
headers: { accept: 'application/json' },
|
|
290
329
|
});
|
|
291
330
|
} catch (err) {
|
|
331
|
+
if (shapeDebugEnabled) {
|
|
332
|
+
shapeLog('[plan-chat-service:shape] ✖ upstream-error', {
|
|
333
|
+
upstream: upstream.pathname + upstream.search,
|
|
334
|
+
err: String(err?.message ?? err),
|
|
335
|
+
});
|
|
336
|
+
}
|
|
292
337
|
return send(res, 502, {
|
|
293
338
|
error: 'shape-upstream-unreachable',
|
|
294
339
|
message: String(err?.message ?? err),
|
|
295
340
|
});
|
|
296
341
|
}
|
|
297
342
|
|
|
298
|
-
//
|
|
299
|
-
// res.writeHead fires
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
343
|
+
// Phase A A2 — log AFTER upstream returns headers but BEFORE
|
|
344
|
+
// `res.writeHead` fires (Seam: must not touch the body stream;
|
|
345
|
+
// logging post-pipe risks hanging the response on a sync exception
|
|
346
|
+
// in the logger). Captures the electric-* response headers to
|
|
347
|
+
// disambiguate offset-cursor staleness from handle eviction.
|
|
348
|
+
if (shapeDebugEnabled) {
|
|
349
|
+
const elapsedMs = Math.round(performance.now() - upstreamStartedAt);
|
|
350
|
+
shapeLog(
|
|
351
|
+
`[plan-chat-service:shape] ← upstream ${upstreamRes.status} ${elapsedMs}ms`,
|
|
352
|
+
{
|
|
353
|
+
resHandle: upstreamRes.headers.get('electric-handle'),
|
|
354
|
+
resOffset: upstreamRes.headers.get('electric-offset'),
|
|
355
|
+
resUpToDate: upstreamRes.headers.get('electric-up-to-date'),
|
|
356
|
+
resSchema: upstreamRes.headers.get('electric-schema'),
|
|
357
|
+
},
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// Forward every upstream `electric-*` header BEFORE the stream starts.
|
|
362
|
+
// Once `res.writeHead` fires, headers are locked.
|
|
363
|
+
//
|
|
364
|
+
// Phase B B4 (olam-spa-electric-subscription-staleness) — prefix-match
|
|
365
|
+
// the entire `electric-*` namespace upstream owns instead of a static
|
|
366
|
+
// four-header whitelist. ElectricSQL 1.6.3 added `electric-cursor` to
|
|
367
|
+
// the live-mode response contract; the old whitelist dropped it; the
|
|
368
|
+
// SPA's TanStack Electric collection raised `MissingHeadersError` and
|
|
369
|
+
// stopped processing the long-poll stream. Mirror-all-electric closes
|
|
370
|
+
// the class — any future header upstream adds inside this namespace
|
|
371
|
+
// flows through with zero proxy changes. See plan
|
|
372
|
+
// `~/.claude/plans/olam-spa-electric-subscription-staleness.md` § Phase B
|
|
373
|
+
// and Phase A A3 evidence at
|
|
374
|
+
// `docs/screenshots/olam-spa-electric-subscription-staleness/a3-evidence-2026-05-18/`.
|
|
375
|
+
for (const [header, value] of upstreamRes.headers) {
|
|
376
|
+
if (header.toLowerCase().startsWith('electric-')) {
|
|
377
|
+
res.setHeader(header, value);
|
|
378
|
+
}
|
|
308
379
|
}
|
|
309
380
|
const upstreamContentType = upstreamRes.headers.get('content-type');
|
|
310
381
|
if (upstreamContentType) res.setHeader('content-type', upstreamContentType);
|
|
@@ -362,11 +433,22 @@ export async function startService(opts = {}) {
|
|
|
362
433
|
opts.databaseUrl ?? process.env.OLAM_PLAN_CHAT_DATABASE_URL ?? DEFAULT_DB_URL;
|
|
363
434
|
const electricUrl =
|
|
364
435
|
opts.electricUrl ?? process.env.OLAM_PLAN_CHAT_ELECTRIC_URL ?? DEFAULT_ELECTRIC_URL;
|
|
436
|
+
// Layered defense: SECRET_PATH (imported above) is itself env-aware at
|
|
437
|
+
// module load. Reading OLAM_PLAN_CHAT_SECRET_PATH here too lets explicit
|
|
438
|
+
// opts.secretPath callers and env-changes-since-import still win. Do not
|
|
439
|
+
// collapse either layer — direct callers in server.mjs (readPlanChatSecret
|
|
440
|
+
// with no arg) rely on the module-const path being env-aware.
|
|
365
441
|
const secretPath = opts.secretPath ?? process.env.OLAM_PLAN_CHAT_SECRET_PATH ?? SECRET_PATH;
|
|
366
442
|
const bearer = opts.bearer ?? ensureSecret(secretPath);
|
|
367
443
|
|
|
368
444
|
const pool = opts.pool ?? new pg.Pool({ connectionString: databaseUrl, max: 8 });
|
|
369
|
-
const handler = createHandler({
|
|
445
|
+
const handler = createHandler({
|
|
446
|
+
pool,
|
|
447
|
+
bearer,
|
|
448
|
+
electricUrl,
|
|
449
|
+
shapeDebug: opts.shapeDebug,
|
|
450
|
+
shapeDebugLog: opts.shapeDebugLog,
|
|
451
|
+
});
|
|
370
452
|
const server = http.createServer((req, res) => {
|
|
371
453
|
handler(req, res).catch((err) => {
|
|
372
454
|
try {
|
package/host-cp/src/server.mjs
CHANGED
|
@@ -95,14 +95,26 @@ const WORLD_HOST = HOST_CP_MODE === 'container' ? 'host.docker.internal' : '127.
|
|
|
95
95
|
const HOST_CP_ENGINE = resolveHostCpEngine();
|
|
96
96
|
|
|
97
97
|
const PORT = parseInt(process.env.OLAM_HOST_CP_PORT ?? '19000', 10);
|
|
98
|
-
//
|
|
99
|
-
//
|
|
100
|
-
//
|
|
101
|
-
//
|
|
102
|
-
//
|
|
103
|
-
//
|
|
98
|
+
// D1 (Phase 2 Phase D) — substrate-conditional docker socket transport.
|
|
99
|
+
//
|
|
100
|
+
// Compose substrate (HOST_CP_ENGINE === 'docker', container mode):
|
|
101
|
+
// tcp://docker-socket-proxy:2375 — the compose sidecar enforces the
|
|
102
|
+
// read-only API allow-list. Zero behavior change from pre-D1.
|
|
103
|
+
//
|
|
104
|
+
// Kubernetes substrate (HOST_CP_ENGINE === 'kubernetes'):
|
|
105
|
+
// unix:///var/run/docker.sock — direct hostPath bind-mount per Decision #3
|
|
106
|
+
// (architecture a2). The init container (socket-perm) chmods the socket
|
|
107
|
+
// to 666 before the main container starts (Decision #15).
|
|
108
|
+
//
|
|
109
|
+
// Bare-node mode (HOST_CP_MODE !== 'container'):
|
|
110
|
+
// 'docker-cli' — sentinel that triggers docker-exec path in
|
|
111
|
+
// fetchContainerSecret (bare-node safeguard, unchanged).
|
|
104
112
|
const DOCKER_HOST = process.env.DOCKER_HOST
|
|
105
|
-
?? (HOST_CP_MODE
|
|
113
|
+
?? (HOST_CP_MODE !== 'container'
|
|
114
|
+
? 'docker-cli'
|
|
115
|
+
: HOST_CP_ENGINE === 'kubernetes'
|
|
116
|
+
? 'unix:///var/run/docker.sock'
|
|
117
|
+
: 'tcp://docker-socket-proxy:2375');
|
|
106
118
|
const TTL_SEC = parseInt(process.env.OLAM_SECRET_CACHE_TTL_SEC ?? '300', 10);
|
|
107
119
|
const HOST_FOR_WORLD = process.env.OLAM_HOST_FOR_WORLD ?? WORLD_HOST;
|
|
108
120
|
const TOKEN_PATH = process.env.OLAM_HOST_CP_TOKEN_PATH ?? '/data/host-cp.token';
|
|
@@ -145,13 +145,18 @@ export async function spawnUpgraderContainer({
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
// Bare-node (operator's host docker CLI on PATH) is documented but
|
|
148
|
-
// out of scope for the trigger feature —
|
|
149
|
-
// (compose stack
|
|
148
|
+
// out of scope for the trigger feature — container + unix-socket paths
|
|
149
|
+
// are supported (compose stack and k8s hostPath socket mount).
|
|
150
150
|
if (dockerHost === 'docker-cli') {
|
|
151
|
-
// The
|
|
152
|
-
// the deployment
|
|
151
|
+
// The literals below (`unix:///var/run/docker.sock` and `tcp://docker-socket-proxy:2375`)
|
|
152
|
+
// are diagnostic text naming the deployment shapes that ARE supported,
|
|
153
|
+
// not hostnames being used as transport — error-message-only.
|
|
153
154
|
throw new Error(
|
|
154
|
-
'upgrade-trigger requires
|
|
155
|
+
'upgrade-trigger requires a docker socket (unix:///var/run/docker.sock via k8s hostPath mount, ' + // bare-node-allow: diagnostic-text
|
|
156
|
+
'or tcp://docker-socket-proxy:2375 via compose); bare-node not yet supported. ' + // bare-node-allow: diagnostic-text
|
|
157
|
+
'For k8s: ensure the cluster was created with ' +
|
|
158
|
+
'--volume /var/run/docker.sock:/var/run/docker.sock@server:* ' +
|
|
159
|
+
'and olam doctor reports probeDockerSocketBindMount [PASS].',
|
|
155
160
|
);
|
|
156
161
|
}
|
|
157
162
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pleri/olam-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.151",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"olam": "./bin/olam.cjs"
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
"test:ci": "vitest run --reporter=basic --passWithNoTests",
|
|
33
33
|
"test:docker": "vitest run --config vitest.config.docker.ts",
|
|
34
34
|
"audit:publish-deps": "node scripts/audit-publish-deps.mjs",
|
|
35
|
-
"audit:cli-bundle-k8s": "node scripts/audit-cli-bundle-k8s.mjs"
|
|
35
|
+
"audit:cli-bundle-k8s": "node scripts/audit-cli-bundle-k8s.mjs",
|
|
36
|
+
"audit:cli-package-contents": "node scripts/audit-cli-package-contents.mjs"
|
|
36
37
|
},
|
|
37
38
|
"dependencies": {
|
|
38
39
|
"better-sqlite3": "^12.0.0",
|
|
@@ -43,6 +44,7 @@
|
|
|
43
44
|
"picocolors": "^1.1.0",
|
|
44
45
|
"ssh2": "^1.16.0",
|
|
45
46
|
"yaml": "^2.7.0",
|
|
47
|
+
"@inquirer/prompts": "^7.0.0",
|
|
46
48
|
"zod-to-json-schema": "^3.24.0",
|
|
47
49
|
"playwright-core": "~1.59.0",
|
|
48
50
|
"@napi-rs/keyring": "^1.1.6",
|