@pleri/olam-cli 0.1.147 → 0.1.148

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 (72) hide show
  1. package/dist/commands/auth.d.ts.map +1 -1
  2. package/dist/commands/auth.js +26 -1
  3. package/dist/commands/auth.js.map +1 -1
  4. package/dist/commands/doctor.d.ts +31 -3
  5. package/dist/commands/doctor.d.ts.map +1 -1
  6. package/dist/commands/doctor.js +274 -6
  7. package/dist/commands/doctor.js.map +1 -1
  8. package/dist/commands/services.d.ts +41 -3
  9. package/dist/commands/services.d.ts.map +1 -1
  10. package/dist/commands/services.js +221 -13
  11. package/dist/commands/services.js.map +1 -1
  12. package/dist/commands/substrate-audit-log.d.ts +2 -0
  13. package/dist/commands/substrate-audit-log.d.ts.map +1 -1
  14. package/dist/commands/substrate-audit-log.js +13 -0
  15. package/dist/commands/substrate-audit-log.js.map +1 -1
  16. package/dist/image-digests.json +7 -7
  17. package/dist/index.js +3381 -2560
  18. package/dist/lib/auth-refresh-kubernetes.d.ts +62 -0
  19. package/dist/lib/auth-refresh-kubernetes.d.ts.map +1 -0
  20. package/dist/lib/auth-refresh-kubernetes.js +127 -0
  21. package/dist/lib/auth-refresh-kubernetes.js.map +1 -0
  22. package/dist/lib/kubectl-wrap.d.ts +6 -0
  23. package/dist/lib/kubectl-wrap.d.ts.map +1 -1
  24. package/dist/lib/kubectl-wrap.js +6 -1
  25. package/dist/lib/kubectl-wrap.js.map +1 -1
  26. package/dist/lib/manifest-refresh.d.ts +8 -1
  27. package/dist/lib/manifest-refresh.d.ts.map +1 -1
  28. package/dist/lib/manifest-refresh.js +17 -7
  29. package/dist/lib/manifest-refresh.js.map +1 -1
  30. package/dist/lib/peripheral-registry.d.ts +36 -0
  31. package/dist/lib/peripheral-registry.d.ts.map +1 -0
  32. package/dist/lib/peripheral-registry.js +55 -0
  33. package/dist/lib/peripheral-registry.js.map +1 -0
  34. package/dist/lib/port-forward.d.ts +67 -0
  35. package/dist/lib/port-forward.d.ts.map +1 -1
  36. package/dist/lib/port-forward.js +153 -0
  37. package/dist/lib/port-forward.js.map +1 -1
  38. package/dist/lib/upgrade-kubernetes.d.ts +35 -11
  39. package/dist/lib/upgrade-kubernetes.d.ts.map +1 -1
  40. package/dist/lib/upgrade-kubernetes.js +265 -21
  41. package/dist/lib/upgrade-kubernetes.js.map +1 -1
  42. package/host-cp/k8s/manifests/auth-service/10-serviceaccount.yaml +8 -0
  43. package/host-cp/k8s/manifests/auth-service/20-rbac.yaml +34 -0
  44. package/host-cp/k8s/manifests/auth-service/30-configmap.yaml +24 -0
  45. package/host-cp/k8s/manifests/auth-service/45-pvc.yaml +25 -0
  46. package/host-cp/k8s/manifests/auth-service/50-deployment.yaml +114 -0
  47. package/host-cp/k8s/manifests/auth-service/60-service.yaml +21 -0
  48. package/host-cp/k8s/manifests/kg-service/10-serviceaccount.yaml +8 -0
  49. package/host-cp/k8s/manifests/kg-service/20-rbac.yaml +34 -0
  50. package/host-cp/k8s/manifests/kg-service/30-configmap.yaml +18 -0
  51. package/host-cp/k8s/manifests/kg-service/45-pvc.yaml +25 -0
  52. package/host-cp/k8s/manifests/kg-service/50-deployment.yaml +108 -0
  53. package/host-cp/k8s/manifests/kg-service/60-service.yaml +21 -0
  54. package/host-cp/k8s/manifests/mcp-auth-service/10-serviceaccount.yaml +8 -0
  55. package/host-cp/k8s/manifests/mcp-auth-service/20-rbac.yaml +34 -0
  56. package/host-cp/k8s/manifests/mcp-auth-service/30-configmap.yaml +18 -0
  57. package/host-cp/k8s/manifests/mcp-auth-service/45-pvc.yaml +25 -0
  58. package/host-cp/k8s/manifests/mcp-auth-service/50-deployment.yaml +114 -0
  59. package/host-cp/k8s/manifests/mcp-auth-service/60-service.yaml +21 -0
  60. package/host-cp/k8s/manifests/memory-service/10-serviceaccount.yaml +8 -0
  61. package/host-cp/k8s/manifests/memory-service/20-rbac.yaml +34 -0
  62. package/host-cp/k8s/manifests/memory-service/30-configmap.yaml +20 -0
  63. package/host-cp/k8s/manifests/memory-service/45-pvc.yaml +25 -0
  64. package/host-cp/k8s/manifests/memory-service/50-deployment.yaml +116 -0
  65. package/host-cp/k8s/manifests/memory-service/60-service.yaml +21 -0
  66. package/host-cp/k8s/templates/auth-service-secret-template.yaml +28 -0
  67. package/host-cp/k8s/templates/kg-service-secret-template.yaml +28 -0
  68. package/host-cp/k8s/templates/mcp-auth-service-secret-template.yaml +28 -0
  69. package/host-cp/k8s/templates/memory-service-secret-template.yaml +29 -0
  70. package/host-cp/src/plan-chat-service.mjs +22 -3
  71. package/host-cp/src/server.mjs +4 -4
  72. package/package.json +1 -1
@@ -0,0 +1,28 @@
1
+ # Secret TEMPLATE for olam-auth-service.
2
+ #
3
+ # This file is a TEMPLATE — it MUST NOT be applied directly without substituting
4
+ # the placeholder values. The placeholders are intentionally invalid; a raw
5
+ # `kubectl apply` will result in auth failures rather than silently shipping
6
+ # fake credentials.
7
+ #
8
+ # Preferred substitution (keeps secrets out of git):
9
+ # kubectl create secret generic olam-auth-service-secret -n olam \
10
+ # --from-literal=OLAM_AUTH_DB_SECRET=$(cat ~/.olam/auth-db-secret) \
11
+ # --dry-run=client -o yaml | kubectl apply -f -
12
+ #
13
+ # This template lives in packages/host-cp/k8s/templates/ (NOT manifests/)
14
+ # so that `kubectl apply -f manifests/auth-service/` does NOT apply it —
15
+ # operators must explicitly handle Secret provisioning before applying manifests.
16
+ apiVersion: v1
17
+ kind: Secret
18
+ metadata:
19
+ name: olam-auth-service-secret
20
+ namespace: olam
21
+ labels:
22
+ app: olam-auth-service
23
+ olam.io/component: peripheral
24
+ type: Opaque
25
+ stringData:
26
+ # Shared database encryption secret for the credential vault.
27
+ # Source: cat ~/.olam/auth-db-secret
28
+ OLAM_AUTH_DB_SECRET: "REPLACE_ME_FROM_HOME_DOTOLAM_AUTH_DB_SECRET"
@@ -0,0 +1,28 @@
1
+ # Secret TEMPLATE for olam-kg-service.
2
+ #
3
+ # This file is a TEMPLATE — it MUST NOT be applied directly without substituting
4
+ # the placeholder values. The placeholders are intentionally invalid; a raw
5
+ # `kubectl apply` will result in auth failures rather than silently shipping
6
+ # fake credentials.
7
+ #
8
+ # Preferred substitution (keeps secrets out of git):
9
+ # kubectl create secret generic olam-kg-service-secret -n olam \
10
+ # --from-literal=OLAM_KG_BEARER_TOKEN=$(cat ~/.olam/kg-bearer-token) \
11
+ # --dry-run=client -o yaml | kubectl apply -f -
12
+ #
13
+ # This template lives in packages/host-cp/k8s/templates/ (NOT manifests/)
14
+ # so that `kubectl apply -f manifests/kg-service/` does NOT apply it —
15
+ # operators must explicitly handle Secret provisioning before applying manifests.
16
+ apiVersion: v1
17
+ kind: Secret
18
+ metadata:
19
+ name: olam-kg-service-secret
20
+ namespace: olam
21
+ labels:
22
+ app: olam-kg-service
23
+ olam.io/component: peripheral
24
+ type: Opaque
25
+ stringData:
26
+ # Bearer token for in-cluster KG query authentication.
27
+ # Source: cat ~/.olam/kg-bearer-token
28
+ OLAM_KG_BEARER_TOKEN: "REPLACE_ME_FROM_HOME_DOTOLAM_KG_BEARER_TOKEN"
@@ -0,0 +1,28 @@
1
+ # Secret TEMPLATE for olam-mcp-auth-service.
2
+ #
3
+ # This file is a TEMPLATE — it MUST NOT be applied directly without substituting
4
+ # the placeholder values. The placeholders are intentionally invalid; a raw
5
+ # `kubectl apply` will result in auth failures rather than silently shipping
6
+ # fake credentials.
7
+ #
8
+ # Preferred substitution (keeps secrets out of git):
9
+ # kubectl create secret generic olam-mcp-auth-service-secret -n olam \
10
+ # --from-literal=OLAM_MCP_AUTH_JWT_SECRET=$(cat ~/.olam/mcp-auth-jwt-secret) \
11
+ # --dry-run=client -o yaml | kubectl apply -f -
12
+ #
13
+ # This template lives in packages/host-cp/k8s/templates/ (NOT manifests/)
14
+ # so that `kubectl apply -f manifests/mcp-auth-service/` does NOT apply it —
15
+ # operators must explicitly handle Secret provisioning before applying manifests.
16
+ apiVersion: v1
17
+ kind: Secret
18
+ metadata:
19
+ name: olam-mcp-auth-service-secret
20
+ namespace: olam
21
+ labels:
22
+ app: olam-mcp-auth-service
23
+ olam.io/component: peripheral
24
+ type: Opaque
25
+ stringData:
26
+ # JWT signing secret for MCP client authentication.
27
+ # Source: cat ~/.olam/mcp-auth-jwt-secret
28
+ OLAM_MCP_AUTH_JWT_SECRET: "REPLACE_ME_FROM_HOME_DOTOLAM_MCP_AUTH_JWT_SECRET"
@@ -0,0 +1,29 @@
1
+ # Secret TEMPLATE for olam-memory-service.
2
+ #
3
+ # This file is a TEMPLATE — it MUST NOT be applied directly without substituting
4
+ # the placeholder values. The placeholders are intentionally invalid; a raw
5
+ # `kubectl apply` will result in auth failures rather than silently shipping
6
+ # fake credentials.
7
+ #
8
+ # Preferred substitution (keeps secrets out of git):
9
+ # kubectl create secret generic olam-memory-service-secret -n olam \
10
+ # --from-literal=OLAM_MEMORY_BEARER_SECRET=$(cat ~/.olam/memory-bearer-secret) \
11
+ # --dry-run=client -o yaml | kubectl apply -f -
12
+ #
13
+ # This template lives in packages/host-cp/k8s/templates/ (NOT manifests/)
14
+ # so that `kubectl apply -f manifests/memory-service/` does NOT apply it —
15
+ # operators must explicitly handle Secret provisioning before applying manifests.
16
+ apiVersion: v1
17
+ kind: Secret
18
+ metadata:
19
+ name: olam-memory-service-secret
20
+ namespace: olam
21
+ labels:
22
+ app: olam-memory-service
23
+ olam.io/component: peripheral
24
+ type: Opaque
25
+ stringData:
26
+ # Bearer secret for the memory-service HTTP API (matches OLAM_MEMORY_BEARER_SECRET
27
+ # used by host-cp and agents that call the memory endpoints).
28
+ # Source: cat ~/.olam/memory-bearer-secret
29
+ OLAM_MEMORY_BEARER_SECRET: "REPLACE_ME_FROM_HOME_DOTOLAM_MEMORY_BEARER_SECRET"
@@ -22,7 +22,9 @@
22
22
  // Configuration is environment-driven so a single binary works in laptop
23
23
  // (the K3 container-spike), in a devbox container, and on a host-cp Mac:
24
24
  //
25
- // OLAM_PLAN_CHAT_PORT (default 3112)
25
+ // OLAM_PLAN_CHAT_PORT (default 3200; moved off 3112 — see
26
+ // olam-chunks-subscriber-long-poll Phase A.
27
+ // agentmemory iii/node claim 3111-3113.)
26
28
  // OLAM_PLAN_CHAT_DATABASE_URL (default postgres://postgres:spike@localhost:54321/chunks)
27
29
  // OLAM_PLAN_CHAT_ELECTRIC_URL (default http://localhost:30001)
28
30
  // OLAM_PLAN_CHAT_SECRET_PATH (default ~/.olam/plan-chat-secret)
@@ -33,7 +35,7 @@ import { URL } from 'node:url';
33
35
  import pg from 'pg';
34
36
  import { ensureSecret, timingSafeEqual, SECRET_PATH } from './plan-chat-secret.mjs';
35
37
 
36
- const DEFAULT_PORT = 3112;
38
+ const DEFAULT_PORT = 3200;
37
39
  const DEFAULT_DB_URL = 'postgres://postgres:spike@localhost:54321/chunks';
38
40
  const DEFAULT_ELECTRIC_URL = 'http://localhost:30001';
39
41
 
@@ -374,7 +376,24 @@ export async function startService(opts = {}) {
374
376
  });
375
377
 
376
378
  await new Promise((resolve, reject) => {
377
- server.once('error', reject);
379
+ server.once('error', (err) => {
380
+ if (err && err.code === 'EADDRINUSE') {
381
+ // A3 — port-collision diagnostic. Prevents silent half-start when the
382
+ // target port is held by another process. agentmemory's `iii` has
383
+ // historically claimed 3111-3113 (motivated the 3112 → 3200 move in
384
+ // olam-chunks-subscriber-long-poll Phase A); flag it so the next
385
+ // collision is debuggable in one log line, not three rounds of grep.
386
+ // eslint-disable-next-line no-console
387
+ console.error(`[plan-chat-service] EADDRINUSE on :${port} — port already in use.`);
388
+ // eslint-disable-next-line no-console
389
+ console.error(`[plan-chat-service] Check: lsof -i:${port}`);
390
+ // eslint-disable-next-line no-console
391
+ console.error(`[plan-chat-service] Note: agentmemory's iii claims 3111-3113 (motivated 3112 → 3200 move).`);
392
+ // eslint-disable-next-line no-console
393
+ console.error(`[plan-chat-service] Override: OLAM_PLAN_CHAT_PORT=<free-port>`);
394
+ }
395
+ reject(err);
396
+ });
378
397
  server.listen(port, () => resolve(undefined));
379
398
  });
380
399
 
@@ -1921,7 +1921,7 @@ const server = http.createServer(async (req, res) => {
1921
1921
  // the host-cp service name. Default: host.docker.internal for the
1922
1922
  // operator-local demo flow.
1923
1923
  const hostCpUrlForContainer =
1924
- process.env.OLAM_AGENT_RUNTIME_HOST_CP_URL ?? 'http://host.docker.internal:3112';
1924
+ process.env.OLAM_AGENT_RUNTIME_HOST_CP_URL ?? 'http://host.docker.internal:3200';
1925
1925
  try {
1926
1926
  const result = await triggerAgentRuntime({
1927
1927
  worldId: body.worldId,
@@ -1940,7 +1940,7 @@ const server = http.createServer(async (req, res) => {
1940
1940
  }
1941
1941
 
1942
1942
  // /api/plan-chat/* — passthrough proxy to plan-chat-service.
1943
- // The sidecar runs on PLAN_CHAT_SERVICE_URL (default http://127.0.0.1:3112).
1943
+ // The sidecar runs on PLAN_CHAT_SERVICE_URL (default http://127.0.0.1:3200).
1944
1944
  // Strips the /api/plan-chat prefix; forwards method, headers, body, and
1945
1945
  // query verbatim. Streams the response (Electric SQL long-poll friendly).
1946
1946
  // Auth: client supplies Bearer; we don't add or strip it.
@@ -1950,8 +1950,8 @@ const server = http.createServer(async (req, res) => {
1950
1950
  // Default depends on where host-cp runs. In-container = host.docker.internal;
1951
1951
  // bare-node = 127.0.0.1. DOCKER_HOST=tcp://* implies container mode.
1952
1952
  ((process.env.DOCKER_HOST ?? '').startsWith('tcp://')
1953
- ? 'http://host.docker.internal:3112'
1954
- : 'http://127.0.0.1:3112');
1953
+ ? 'http://host.docker.internal:3200'
1954
+ : 'http://127.0.0.1:3200');
1955
1955
  const subPath = url.pathname === '/api/plan-chat'
1956
1956
  ? '/'
1957
1957
  : url.pathname.slice('/api/plan-chat'.length);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pleri/olam-cli",
3
- "version": "0.1.147",
3
+ "version": "0.1.148",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "olam": "./bin/olam.cjs"