@pleri/olam-cli 0.1.188 → 0.1.195

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.
Files changed (156) hide show
  1. package/README.md +1 -1
  2. package/dist/ask/knowledge-pack.generated.d.ts.map +1 -1
  3. package/dist/ask/knowledge-pack.generated.js +37 -12
  4. package/dist/ask/knowledge-pack.generated.js.map +1 -1
  5. package/dist/commands/bootstrap.d.ts +4 -0
  6. package/dist/commands/bootstrap.d.ts.map +1 -1
  7. package/dist/commands/bootstrap.js +6 -9
  8. package/dist/commands/bootstrap.js.map +1 -1
  9. package/dist/commands/clean.js +1 -1
  10. package/dist/commands/clean.js.map +1 -1
  11. package/dist/commands/completion.d.ts.map +1 -1
  12. package/dist/commands/completion.js +1 -4
  13. package/dist/commands/completion.js.map +1 -1
  14. package/dist/commands/create.d.ts.map +1 -1
  15. package/dist/commands/create.js +6 -0
  16. package/dist/commands/create.js.map +1 -1
  17. package/dist/commands/crystallize.js +12 -14
  18. package/dist/commands/crystallize.js.map +1 -1
  19. package/dist/commands/destroy.d.ts +13 -1
  20. package/dist/commands/destroy.d.ts.map +1 -1
  21. package/dist/commands/destroy.js +52 -6
  22. package/dist/commands/destroy.js.map +1 -1
  23. package/dist/commands/dispatch.d.ts +9 -0
  24. package/dist/commands/dispatch.d.ts.map +1 -1
  25. package/dist/commands/dispatch.js +21 -2
  26. package/dist/commands/dispatch.js.map +1 -1
  27. package/dist/commands/doctor.d.ts +1 -1
  28. package/dist/commands/doctor.d.ts.map +1 -1
  29. package/dist/commands/doctor.js +29 -22
  30. package/dist/commands/doctor.js.map +1 -1
  31. package/dist/commands/enter.d.ts +3 -3
  32. package/dist/commands/enter.d.ts.map +1 -1
  33. package/dist/commands/enter.js +57 -44
  34. package/dist/commands/enter.js.map +1 -1
  35. package/dist/commands/flywheel/index.d.ts.map +1 -1
  36. package/dist/commands/flywheel/index.js +1 -1
  37. package/dist/commands/flywheel/index.js.map +1 -1
  38. package/dist/commands/host-cp.d.ts.map +1 -1
  39. package/dist/commands/host-cp.js +2 -1
  40. package/dist/commands/host-cp.js.map +1 -1
  41. package/dist/commands/implode.d.ts.map +1 -1
  42. package/dist/commands/implode.js +1 -1
  43. package/dist/commands/implode.js.map +1 -1
  44. package/dist/commands/init.d.ts +20 -0
  45. package/dist/commands/init.d.ts.map +1 -1
  46. package/dist/commands/init.js +102 -9
  47. package/dist/commands/init.js.map +1 -1
  48. package/dist/commands/kg-build.d.ts.map +1 -1
  49. package/dist/commands/kg-build.js +3 -0
  50. package/dist/commands/kg-build.js.map +1 -1
  51. package/dist/commands/kg-classify.d.ts +20 -0
  52. package/dist/commands/kg-classify.d.ts.map +1 -1
  53. package/dist/commands/kg-classify.js +59 -42
  54. package/dist/commands/kg-classify.js.map +1 -1
  55. package/dist/commands/kg-mirror.d.ts +40 -0
  56. package/dist/commands/kg-mirror.d.ts.map +1 -0
  57. package/dist/commands/kg-mirror.js +228 -0
  58. package/dist/commands/kg-mirror.js.map +1 -0
  59. package/dist/commands/mcp/index.js +1 -1
  60. package/dist/commands/mcp/index.js.map +1 -1
  61. package/dist/commands/memory/index.d.ts.map +1 -1
  62. package/dist/commands/memory/index.js +1 -1
  63. package/dist/commands/memory/index.js.map +1 -1
  64. package/dist/commands/resume.d.ts.map +1 -1
  65. package/dist/commands/resume.js +1 -1
  66. package/dist/commands/resume.js.map +1 -1
  67. package/dist/commands/services-tls.d.ts +120 -0
  68. package/dist/commands/services-tls.d.ts.map +1 -0
  69. package/dist/commands/services-tls.js +434 -0
  70. package/dist/commands/services-tls.js.map +1 -0
  71. package/dist/commands/services.d.ts.map +1 -1
  72. package/dist/commands/services.js +28 -1
  73. package/dist/commands/services.js.map +1 -1
  74. package/dist/commands/setup-linux-gate.d.ts.map +1 -1
  75. package/dist/commands/setup-linux-gate.js +1 -3
  76. package/dist/commands/setup-linux-gate.js.map +1 -1
  77. package/dist/commands/setup-metrics.d.ts.map +1 -1
  78. package/dist/commands/setup-metrics.js +1 -2
  79. package/dist/commands/setup-metrics.js.map +1 -1
  80. package/dist/commands/setup-phase-5a-skill-source.d.ts +17 -1
  81. package/dist/commands/setup-phase-5a-skill-source.d.ts.map +1 -1
  82. package/dist/commands/setup-phase-5a-skill-source.js +69 -6
  83. package/dist/commands/setup-phase-5a-skill-source.js.map +1 -1
  84. package/dist/commands/setup.d.ts +26 -1
  85. package/dist/commands/setup.d.ts.map +1 -1
  86. package/dist/commands/setup.js +189 -47
  87. package/dist/commands/setup.js.map +1 -1
  88. package/dist/commands/skills-onboard.d.ts.map +1 -1
  89. package/dist/commands/skills-onboard.js +4 -1
  90. package/dist/commands/skills-onboard.js.map +1 -1
  91. package/dist/commands/skills-source.d.ts.map +1 -1
  92. package/dist/commands/skills-source.js +20 -4
  93. package/dist/commands/skills-source.js.map +1 -1
  94. package/dist/commands/status.js +1 -1
  95. package/dist/commands/status.js.map +1 -1
  96. package/dist/commands/upgrade.d.ts.map +1 -1
  97. package/dist/commands/upgrade.js +1 -3
  98. package/dist/commands/upgrade.js.map +1 -1
  99. package/dist/commands/yolo.d.ts.map +1 -1
  100. package/dist/commands/yolo.js +1 -1
  101. package/dist/commands/yolo.js.map +1 -1
  102. package/dist/context.d.ts +4 -0
  103. package/dist/context.d.ts.map +1 -1
  104. package/dist/context.js +3 -2
  105. package/dist/context.js.map +1 -1
  106. package/dist/image-digests.json +8 -8
  107. package/dist/index.js +3846 -2232
  108. package/dist/index.js.map +1 -1
  109. package/dist/lib/auth-refresh-kubernetes.d.ts.map +1 -1
  110. package/dist/lib/auth-refresh-kubernetes.js +14 -5
  111. package/dist/lib/auth-refresh-kubernetes.js.map +1 -1
  112. package/dist/lib/bootstrap-kubernetes.d.ts +41 -0
  113. package/dist/lib/bootstrap-kubernetes.d.ts.map +1 -1
  114. package/dist/lib/bootstrap-kubernetes.js +289 -36
  115. package/dist/lib/bootstrap-kubernetes.js.map +1 -1
  116. package/dist/lib/cf-access-token.d.ts.map +1 -1
  117. package/dist/lib/cf-access-token.js +2 -3
  118. package/dist/lib/cf-access-token.js.map +1 -1
  119. package/dist/lib/help-groups.d.ts +36 -0
  120. package/dist/lib/help-groups.d.ts.map +1 -0
  121. package/dist/lib/help-groups.js +124 -0
  122. package/dist/lib/help-groups.js.map +1 -0
  123. package/dist/lib/k8s-bootstrap.d.ts +6 -0
  124. package/dist/lib/k8s-bootstrap.d.ts.map +1 -1
  125. package/dist/lib/k8s-bootstrap.js +15 -2
  126. package/dist/lib/k8s-bootstrap.js.map +1 -1
  127. package/dist/lib/k8s-secret-render.d.ts.map +1 -1
  128. package/dist/lib/k8s-secret-render.js +17 -10
  129. package/dist/lib/k8s-secret-render.js.map +1 -1
  130. package/dist/lib/memory-secret.d.ts +15 -2
  131. package/dist/lib/memory-secret.d.ts.map +1 -1
  132. package/dist/lib/memory-secret.js +25 -8
  133. package/dist/lib/memory-secret.js.map +1 -1
  134. package/dist/lib/upgrade-check.d.ts +60 -0
  135. package/dist/lib/upgrade-check.d.ts.map +1 -0
  136. package/dist/lib/upgrade-check.js +169 -0
  137. package/dist/lib/upgrade-check.js.map +1 -0
  138. package/dist/lib/upgrade-kubernetes.d.ts +17 -0
  139. package/dist/lib/upgrade-kubernetes.d.ts.map +1 -1
  140. package/dist/lib/upgrade-kubernetes.js +125 -1
  141. package/dist/lib/upgrade-kubernetes.js.map +1 -1
  142. package/dist/mcp-server.js +2651 -2850
  143. package/hermes-bundle/version.json +1 -1
  144. package/host-cp/k8s/manifests/30-configmap.yaml +8 -1
  145. package/host-cp/k8s/manifests/50-deployment.yaml +1 -1
  146. package/host-cp/k8s/manifests/60-service.yaml +12 -4
  147. package/host-cp/k8s/manifests/70-ingressroute.yaml +58 -0
  148. package/host-cp/k8s/manifests/auth-service/50-deployment.yaml +1 -1
  149. package/host-cp/k8s/manifests/kg-service/50-deployment.yaml +1 -1
  150. package/host-cp/k8s/manifests/mcp-auth-service/50-deployment.yaml +1 -1
  151. package/host-cp/k8s/manifests/memory-service/50-deployment.yaml +1 -1
  152. package/host-cp/src/plan-chat-secret.mjs +16 -1
  153. package/host-cp/src/plan-chat-service.mjs +493 -11
  154. package/host-cp/src/planning-sessions.mjs +252 -0
  155. package/host-cp/src/server.mjs +92 -2
  156. package/package.json +2 -1
@@ -1,4 +1,4 @@
1
1
  {
2
- "bundledAt": "2026-05-28T00:56:36.187Z",
2
+ "bundledAt": "2026-05-28T12:44:06.696Z",
3
3
  "kgFirstSha": "29a9ccce1b115d049e375c4a90eb5cf7c123e610e2d0590270a4db2cdbc64a28"
4
4
  }
@@ -13,7 +13,14 @@ data:
13
13
  # Auth service URL. Default targets host.docker.internal for Colima/Docker
14
14
  # Desktop k3d setups. Override when auth-service runs elsewhere (e.g. via
15
15
  # an ExternalName Service pointing at the host gateway).
16
- OLAM_AUTH_SERVICE_URL: "http://host.docker.internal:8000"
16
+ #
17
+ # Port :9999 matches the published port in AuthContainerController.start()
18
+ # (packages/core/src/auth/container.ts) — the value was historically :8000,
19
+ # which never matched any running auth-service version and surfaced as
20
+ # {"error":"auth_service_unavailable","message":"fetch failed"}
21
+ # on /api/auth/* calls. Verified during the K3d-HTTPS PR live bring-up;
22
+ # see docs/runbooks/k3d-https-setup.md.
23
+ OLAM_AUTH_SERVICE_URL: "http://host.docker.internal:9999"
17
24
  # Docker socket proxy — ClusterIP Service DNS inside the namespace.
18
25
  DOCKER_HOST: "tcp://docker-socket-proxy:2375"
19
26
  # Host-cp server port — must match the Service targetPort in 60-service.yaml.
@@ -118,7 +118,7 @@ spec:
118
118
  # k3d), started by `olam upgrade` Step 0.7 — not inside this Pod.
119
119
  containers:
120
120
  - name: olam-host-cp
121
- image: ghcr.io/pleri/olam-host-cp@sha256:023eb5c01c56fd738770f6314126186af53bd5fd45b80d11f9298f89e0c2b4c5
121
+ image: ghcr.io/pleri/olam-host-cp@sha256:42fb12f23d51c229288e0c0fa93df8028784136ce75245e582e4fffbc5867798
122
122
  imagePullPolicy: IfNotPresent
123
123
  securityContext:
124
124
  runAsNonRoot: true
@@ -1,8 +1,16 @@
1
1
  # ClusterIP Service for olam-host-cp.
2
- # Operator surfaces the SPA externally via:
3
- # kubectl port-forward -n olam svc/olam-host-cp 19000:19000
4
- # This keeps the "127.0.0.1-only" single-user-per-host invariant
5
- # (NodePort would bind on all interfaces; port-forward keeps it local).
2
+ #
3
+ # Two ways to reach the SPA externally:
4
+ # 1. (preferred) Traefik IngressRoute at https://olam.local:<traefik-https-port>
5
+ # Terminates TLS at the cluster edge, unlocks HTTP/2 multiplexing for
6
+ # Electric SQL long-polls. See 70-ingressroute.yaml + 65-tls-secret-template.yaml.tmpl.
7
+ # The pod itself stays HTTP-only — Traefik handles TLS at the edge.
8
+ # 2. (fallback) kubectl port-forward -n olam svc/olam-host-cp 19000:19000
9
+ # Plain HTTP/1.1; hits browser's 6-conn-per-origin cap under Electric load.
10
+ #
11
+ # ClusterIP (not NodePort) preserves the "127.0.0.1-only" single-user-per-host
12
+ # invariant — exposure is via Traefik's LoadBalancer or port-forward, not by
13
+ # binding pod ports on every node interface.
6
14
  apiVersion: v1
7
15
  kind: Service
8
16
  metadata:
@@ -0,0 +1,58 @@
1
+ # Traefik IngressRoute terminating TLS at the cluster edge for olam-host-cp.
2
+ #
3
+ # Topology:
4
+ # Browser --HTTPS/h2--> Traefik :443 (LoadBalancer / k3d NodePort)
5
+ # |
6
+ # | (TLS terminated; cleartext inside cluster)
7
+ # v
8
+ # olam-host-cp:19000 (ClusterIP, HTTP/1.1 internal)
9
+ # |
10
+ # v
11
+ # plan-chat-service:3200 (and other peripherals)
12
+ #
13
+ # Why terminate TLS at Traefik (NOT at host-cp): host-cp is a Node/Hono
14
+ # server tuned for cleartext HTTP. Pushing TLS into the pod would force a
15
+ # second cert-distribution mechanism (Secret → volumeMount → server.mjs
16
+ # reload) and double the operational surface. Traefik already owns cert
17
+ # lifecycle in production (cert-manager + Let's Encrypt), so dev-mode
18
+ # mkcert at the same boundary keeps prod parity tight.
19
+ #
20
+ # Why HTTP/2 matters: TanStack DB / Electric SQL opens N long-poll
21
+ # connections per browser tab (one per shape subscription). Without h2
22
+ # multiplexing they queue against the browser's 6-connection-per-origin
23
+ # cap, leading to the "25-second pending requests" symptom Electric users
24
+ # hit on HTTP/1.1. Traefik 2.x advertises h2 over TLS via ALPN by default;
25
+ # no extra config needed.
26
+ #
27
+ # Why Host(olam.local) instead of a wildcard: the cert is minted for that
28
+ # exact SAN. Traefik routes based on SNI, so the host-rule must match the
29
+ # cert subject or the TLS handshake completes but the route 404s.
30
+ #
31
+ # Operator MUST add `127.0.0.1 olam.local` to /etc/hosts before this works.
32
+ # `olam services tls-install` prints the line + sudo command — it does NOT
33
+ # auto-edit (touching /etc/hosts behind the operator's back is a foot-gun).
34
+ apiVersion: traefik.io/v1alpha1
35
+ kind: IngressRoute
36
+ metadata:
37
+ # Distinct name avoids collision with packages/peripheral-services'
38
+ # `olam-host-cp` IngressRoute (the legacy `web`-entrypoint + path-based
39
+ # router that 50+ SPA fetch sites still depend on). The `-https` variant
40
+ # adds a SECOND ingress that matches Host(olam.local) on `websecure` and
41
+ # terminates TLS via the operator-minted Secret. Both coexist; the legacy
42
+ # one keeps `http://<lb>/api/...` working, this one unlocks HTTP/2.
43
+ name: olam-host-cp-https
44
+ namespace: olam
45
+ labels:
46
+ app: olam-host-cp
47
+ olam.io/component: host-stack
48
+ spec:
49
+ entryPoints:
50
+ - websecure
51
+ routes:
52
+ - match: Host(`olam.local`)
53
+ kind: Rule
54
+ services:
55
+ - name: olam-host-cp
56
+ port: 19000
57
+ tls:
58
+ secretName: olam-host-cp-tls
@@ -70,7 +70,7 @@ spec:
70
70
  mountPath: /data
71
71
  containers:
72
72
  - name: olam-auth-service
73
- image: ghcr.io/pleri/olam-auth@sha256:625321c18fcb7f97bfec747bb1d2679273350232eb352d69f6a2571dba350b1a
73
+ image: ghcr.io/pleri/olam-auth@sha256:e982aa9812c9c57768987d8fc0a22178c84811bf59a1470eb7a5aa58a73f11a5
74
74
  imagePullPolicy: IfNotPresent
75
75
  securityContext:
76
76
  runAsNonRoot: true
@@ -61,7 +61,7 @@ spec:
61
61
  mountPath: /data
62
62
  containers:
63
63
  - name: olam-kg-service
64
- image: ghcr.io/pleri/olam-kg-service@sha256:c9a0226339907711443657e2ca1eb40d2e2df120562dbb5d7d0ddf628614fb74
64
+ image: ghcr.io/pleri/olam-kg-service@sha256:bd7c1c65b3537fd59a8a5f252a99a7fc5c2e195e973356bfe764b957fdebe58c
65
65
  imagePullPolicy: IfNotPresent
66
66
  securityContext:
67
67
  runAsNonRoot: true
@@ -68,7 +68,7 @@ spec:
68
68
  mountPath: /data
69
69
  containers:
70
70
  - name: olam-mcp-auth-service
71
- image: ghcr.io/pleri/olam-mcp-auth@sha256:eba57d0c5c89763bc266faba80e98912875f541c9ad8e96ee5f28790f9fb96d8
71
+ image: ghcr.io/pleri/olam-mcp-auth@sha256:1191734c32480a7ab22dbeede616c0f697ec02e3d0d43093cbbf56d6fe3b115c
72
72
  imagePullPolicy: IfNotPresent
73
73
  securityContext:
74
74
  runAsNonRoot: true
@@ -70,7 +70,7 @@ spec:
70
70
  # bootstrap-placeholder comment + run `npm run refresh:manifest-digests`
71
71
  # once ghcr.io/pleri/olam-memory-service has a real published digest.
72
72
  # bootstrap-placeholder: pre-publish; refresh after first release
73
- image: ghcr.io/pleri/olam-memory-service@sha256:33390ba1b2b4785ebf9af9732c42c40ae572ec1176e01f1fed8225d0d449ca57
73
+ image: ghcr.io/pleri/olam-memory-service@sha256:2037a12d390be09714bb80e2d707fb94d210f28b5227428d3047fe9155635acd
74
74
  imagePullPolicy: IfNotPresent
75
75
  securityContext:
76
76
  runAsNonRoot: true
@@ -21,8 +21,23 @@ import os from 'node:os';
21
21
  import path from 'node:path';
22
22
  import crypto from 'node:crypto';
23
23
 
24
+ /**
25
+ * Resolve the plan-chat-secret path: prefer ~/.olam/secrets/plan-chat-secret
26
+ * (new canonical location) over ~/.olam/plan-chat-secret (legacy). Inlined
27
+ * here because host-cp is a pure .mjs package with no @olam/core dep.
28
+ */
29
+ function resolvePlanChatSecretPath() {
30
+ const olamHome = path.join(os.homedir(), '.olam');
31
+ const newPath = path.join(olamHome, 'secrets', 'plan-chat-secret');
32
+ if (fs.existsSync(newPath)) return newPath;
33
+ const legacyPath = path.join(olamHome, 'plan-chat-secret');
34
+ if (fs.existsSync(legacyPath)) return legacyPath;
35
+ // Neither exists — return canonical so writes land in the right place.
36
+ return newPath;
37
+ }
38
+
24
39
  export const SECRET_PATH =
25
- process.env.OLAM_PLAN_CHAT_SECRET_PATH ?? path.join(os.homedir(), '.olam', 'plan-chat-secret');
40
+ process.env.OLAM_PLAN_CHAT_SECRET_PATH ?? resolvePlanChatSecretPath();
26
41
  export const SECRET_DIR = path.dirname(SECRET_PATH);
27
42
  const SECRET_BYTES = 32; // 64 hex chars
28
43
  const SECRET_MODE = 0o600;