@pleri/olam-cli 0.1.146 → 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 (85) 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/skills-migrate-hooks-back.d.ts +19 -0
  13. package/dist/commands/skills-migrate-hooks-back.d.ts.map +1 -0
  14. package/dist/commands/skills-migrate-hooks-back.js +83 -0
  15. package/dist/commands/skills-migrate-hooks-back.js.map +1 -0
  16. package/dist/commands/skills-migrate-hooks.d.ts +40 -0
  17. package/dist/commands/skills-migrate-hooks.d.ts.map +1 -0
  18. package/dist/commands/skills-migrate-hooks.js +178 -0
  19. package/dist/commands/skills-migrate-hooks.js.map +1 -0
  20. package/dist/commands/skills.d.ts.map +1 -1
  21. package/dist/commands/skills.js +49 -1
  22. package/dist/commands/skills.js.map +1 -1
  23. package/dist/commands/substrate-audit-log.d.ts +2 -0
  24. package/dist/commands/substrate-audit-log.d.ts.map +1 -1
  25. package/dist/commands/substrate-audit-log.js +13 -0
  26. package/dist/commands/substrate-audit-log.js.map +1 -1
  27. package/dist/image-digests.json +7 -7
  28. package/dist/index.js +4390 -2615
  29. package/dist/index.js.map +1 -1
  30. package/dist/lib/auth-refresh-kubernetes.d.ts +62 -0
  31. package/dist/lib/auth-refresh-kubernetes.d.ts.map +1 -0
  32. package/dist/lib/auth-refresh-kubernetes.js +127 -0
  33. package/dist/lib/auth-refresh-kubernetes.js.map +1 -0
  34. package/dist/lib/kubectl-wrap.d.ts +6 -0
  35. package/dist/lib/kubectl-wrap.d.ts.map +1 -1
  36. package/dist/lib/kubectl-wrap.js +6 -1
  37. package/dist/lib/kubectl-wrap.js.map +1 -1
  38. package/dist/lib/manifest-refresh.d.ts +8 -1
  39. package/dist/lib/manifest-refresh.d.ts.map +1 -1
  40. package/dist/lib/manifest-refresh.js +17 -7
  41. package/dist/lib/manifest-refresh.js.map +1 -1
  42. package/dist/lib/peripheral-registry.d.ts +36 -0
  43. package/dist/lib/peripheral-registry.d.ts.map +1 -0
  44. package/dist/lib/peripheral-registry.js +55 -0
  45. package/dist/lib/peripheral-registry.js.map +1 -0
  46. package/dist/lib/port-forward.d.ts +67 -0
  47. package/dist/lib/port-forward.d.ts.map +1 -1
  48. package/dist/lib/port-forward.js +153 -0
  49. package/dist/lib/port-forward.js.map +1 -1
  50. package/dist/lib/upgrade-kubernetes.d.ts +35 -11
  51. package/dist/lib/upgrade-kubernetes.d.ts.map +1 -1
  52. package/dist/lib/upgrade-kubernetes.js +265 -21
  53. package/dist/lib/upgrade-kubernetes.js.map +1 -1
  54. package/dist/mcp-server.js +1196 -412
  55. package/host-cp/k8s/manifests/auth-service/10-serviceaccount.yaml +8 -0
  56. package/host-cp/k8s/manifests/auth-service/20-rbac.yaml +34 -0
  57. package/host-cp/k8s/manifests/auth-service/30-configmap.yaml +24 -0
  58. package/host-cp/k8s/manifests/auth-service/45-pvc.yaml +25 -0
  59. package/host-cp/k8s/manifests/auth-service/50-deployment.yaml +114 -0
  60. package/host-cp/k8s/manifests/auth-service/60-service.yaml +21 -0
  61. package/host-cp/k8s/manifests/kg-service/10-serviceaccount.yaml +8 -0
  62. package/host-cp/k8s/manifests/kg-service/20-rbac.yaml +34 -0
  63. package/host-cp/k8s/manifests/kg-service/30-configmap.yaml +18 -0
  64. package/host-cp/k8s/manifests/kg-service/45-pvc.yaml +25 -0
  65. package/host-cp/k8s/manifests/kg-service/50-deployment.yaml +108 -0
  66. package/host-cp/k8s/manifests/kg-service/60-service.yaml +21 -0
  67. package/host-cp/k8s/manifests/mcp-auth-service/10-serviceaccount.yaml +8 -0
  68. package/host-cp/k8s/manifests/mcp-auth-service/20-rbac.yaml +34 -0
  69. package/host-cp/k8s/manifests/mcp-auth-service/30-configmap.yaml +18 -0
  70. package/host-cp/k8s/manifests/mcp-auth-service/45-pvc.yaml +25 -0
  71. package/host-cp/k8s/manifests/mcp-auth-service/50-deployment.yaml +114 -0
  72. package/host-cp/k8s/manifests/mcp-auth-service/60-service.yaml +21 -0
  73. package/host-cp/k8s/manifests/memory-service/10-serviceaccount.yaml +8 -0
  74. package/host-cp/k8s/manifests/memory-service/20-rbac.yaml +34 -0
  75. package/host-cp/k8s/manifests/memory-service/30-configmap.yaml +20 -0
  76. package/host-cp/k8s/manifests/memory-service/45-pvc.yaml +25 -0
  77. package/host-cp/k8s/manifests/memory-service/50-deployment.yaml +116 -0
  78. package/host-cp/k8s/manifests/memory-service/60-service.yaml +21 -0
  79. package/host-cp/k8s/templates/auth-service-secret-template.yaml +28 -0
  80. package/host-cp/k8s/templates/kg-service-secret-template.yaml +28 -0
  81. package/host-cp/k8s/templates/mcp-auth-service-secret-template.yaml +28 -0
  82. package/host-cp/k8s/templates/memory-service-secret-template.yaml +29 -0
  83. package/host-cp/src/plan-chat-service.mjs +22 -3
  84. package/host-cp/src/server.mjs +4 -4
  85. package/package.json +1 -1
@@ -0,0 +1,8 @@
1
+ apiVersion: v1
2
+ kind: ServiceAccount
3
+ metadata:
4
+ name: olam-memory-service
5
+ namespace: olam
6
+ labels:
7
+ app: olam-memory-service
8
+ olam.io/component: peripheral
@@ -0,0 +1,34 @@
1
+ # Phase 1a Decision 19: Role scoped to resourceNames: ["olam-memory-service"] on
2
+ # apps/v1 deployments. Without this scope, the in-cluster ServiceAccount
3
+ # could patch ANY Deployment in the namespace. This is the load-bearing
4
+ # security guardrail — preserve verbatim.
5
+ apiVersion: rbac.authorization.k8s.io/v1
6
+ kind: Role
7
+ metadata:
8
+ name: olam-memory-service
9
+ namespace: olam
10
+ labels:
11
+ app: olam-memory-service
12
+ olam.io/component: peripheral
13
+ rules:
14
+ - apiGroups: ["apps"]
15
+ resources: ["deployments"]
16
+ resourceNames: ["olam-memory-service"]
17
+ verbs: ["get", "patch", "watch"]
18
+ ---
19
+ apiVersion: rbac.authorization.k8s.io/v1
20
+ kind: RoleBinding
21
+ metadata:
22
+ name: olam-memory-service
23
+ namespace: olam
24
+ labels:
25
+ app: olam-memory-service
26
+ olam.io/component: peripheral
27
+ subjects:
28
+ - kind: ServiceAccount
29
+ name: olam-memory-service
30
+ namespace: olam
31
+ roleRef:
32
+ kind: Role
33
+ name: olam-memory-service
34
+ apiGroup: rbac.authorization.k8s.io
@@ -0,0 +1,20 @@
1
+ # ConfigMap for olam-memory-service environment. Sensitive values live in
2
+ # the Secret (see templates/memory-service-secret-template.yaml).
3
+ # Operators apply the Secret separately before applying the manifests.
4
+ apiVersion: v1
5
+ kind: ConfigMap
6
+ metadata:
7
+ name: olam-memory-service-env
8
+ namespace: olam
9
+ labels:
10
+ app: olam-memory-service
11
+ olam.io/component: peripheral
12
+ data:
13
+ # Port memory-service listens on. Must match 60-service.yaml targetPort.
14
+ OLAM_MEMORY_PORT: "3111"
15
+ # Data directory — backed by the PVC mounted at /data.
16
+ OLAM_MEMORY_DATA_PATH: "/data/memory"
17
+ # URL of auth-service (cluster-internal DNS). Override in non-k3d environments.
18
+ OLAM_AUTH_SERVICE_URL: "http://olam-auth-service.olam.svc.cluster.local:9999"
19
+ # Health path exposed at /agentmemory/livez (D15 — do not change).
20
+ OLAM_MEMORY_HEALTH_PATH: "/agentmemory/livez"
@@ -0,0 +1,25 @@
1
+ # PersistentVolumeClaim for olam-memory-service /data volume.
2
+ #
3
+ # Why PVC instead of hostPath: see packages/host-cp/k8s/manifests/host-cp/45-pvc.yaml
4
+ # for the full rationale (fsGroup, k3d node filesystem, etc.).
5
+ #
6
+ # local-path StorageClass ships with k3d by default (rancher/local-path-provisioner).
7
+ # On non-k3d clusters, substitute storageClassName with your cluster's provisioner.
8
+ # D24: storageClassName operator-editable — edit the field below for non-k3d substrates.
9
+ apiVersion: v1
10
+ kind: PersistentVolumeClaim
11
+ metadata:
12
+ name: olam-memory-data
13
+ namespace: olam
14
+ labels:
15
+ app: olam-memory-service
16
+ olam.io/component: peripheral
17
+ spec:
18
+ accessModes:
19
+ - ReadWriteOnce
20
+ # D24: operator-editable. k3d default is local-path. Change for non-k3d substrates.
21
+ storageClassName: local-path
22
+ resources:
23
+ requests:
24
+ # D25: memory-service PVC size 5Gi.
25
+ storage: 5Gi
@@ -0,0 +1,116 @@
1
+ # Deployment for olam-memory-service.
2
+ #
3
+ # Image: pinned to sha256 digest (not :latest or named tag) per T4 threat model.
4
+ # Digest resolves to ghcr.io/pleri/olam-memory-service:0.1.0 (multi-arch index).
5
+ # To update: resolve the new tag's digest via:
6
+ # TOKEN=$(curl -s "https://ghcr.io/token?scope=repository:pleri/olam-memory-service:pull&service=ghcr.io" | jq -r .token)
7
+ # curl -sI -H "Authorization: Bearer $TOKEN" \
8
+ # -H "Accept: application/vnd.oci.image.index.v1+json,application/vnd.docker.distribution.manifest.list.v2+json" \
9
+ # https://ghcr.io/v2/pleri/olam-memory-service/manifests/<tag> | grep docker-content-digest
10
+ #
11
+ # securityContext: conservative defaults per T6/T7 threat model (runAsNonRoot,
12
+ # readOnlyRootFilesystem). /tmp backed by emptyDir for transient write needs.
13
+ #
14
+ # D15 (LOAD-BEARING): readinessProbe and livenessProbe path MUST be
15
+ # /agentmemory/livez (not /health). Source: DEFAULT_HEALTH_PATH in
16
+ # packages/core/src/services-status/memory-probe.ts:18.
17
+ apiVersion: apps/v1
18
+ kind: Deployment
19
+ metadata:
20
+ name: olam-memory-service
21
+ namespace: olam
22
+ labels:
23
+ app: olam-memory-service
24
+ olam.io/component: peripheral
25
+ spec:
26
+ replicas: 1
27
+ strategy:
28
+ type: RollingUpdate
29
+ rollingUpdate:
30
+ maxSurge: 1
31
+ maxUnavailable: 0
32
+ selector:
33
+ matchLabels:
34
+ app: olam-memory-service
35
+ template:
36
+ metadata:
37
+ labels:
38
+ app: olam-memory-service
39
+ spec:
40
+ serviceAccountName: olam-memory-service
41
+ securityContext:
42
+ runAsNonRoot: true
43
+ runAsUser: 1000
44
+ runAsGroup: 1000
45
+ fsGroup: 1000
46
+ initContainers:
47
+ - name: chown-data
48
+ # busybox:1.36 — sha256-pinned per T4 threat model.
49
+ image: busybox@sha256:73aaf090f3d85aa34ee199857f03fa3a95c8ede2ffd4cc2cdb5b94e566b11662
50
+ imagePullPolicy: IfNotPresent
51
+ securityContext:
52
+ runAsUser: 0
53
+ runAsNonRoot: false
54
+ allowPrivilegeEscalation: false
55
+ command: ["chown", "-R", "1000:1000", "/data"]
56
+ volumeMounts:
57
+ - name: memory-data
58
+ mountPath: /data
59
+ containers:
60
+ - name: olam-memory-service
61
+ image: ghcr.io/pleri/olam-memory-service@sha256:d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5
62
+ imagePullPolicy: IfNotPresent
63
+ securityContext:
64
+ runAsNonRoot: true
65
+ runAsUser: 1000
66
+ readOnlyRootFilesystem: true
67
+ allowPrivilegeEscalation: false
68
+ capabilities:
69
+ drop: ["ALL"]
70
+ ports:
71
+ - name: http
72
+ containerPort: 3111
73
+ protocol: TCP
74
+ envFrom:
75
+ - configMapRef:
76
+ name: olam-memory-service-env
77
+ - secretRef:
78
+ name: olam-memory-service-secret
79
+ volumeMounts:
80
+ - name: memory-data
81
+ mountPath: /data
82
+ - name: tmp
83
+ mountPath: /tmp
84
+ readinessProbe:
85
+ httpGet:
86
+ # D15 (LOAD-BEARING): memory-service health path is /agentmemory/livez.
87
+ # Source: DEFAULT_HEALTH_PATH in packages/core/src/services-status/memory-probe.ts:18.
88
+ # Do NOT change to /health — that endpoint does not exist on this service.
89
+ path: /agentmemory/livez
90
+ port: 3111
91
+ initialDelaySeconds: 5
92
+ periodSeconds: 5
93
+ timeoutSeconds: 3
94
+ failureThreshold: 6
95
+ livenessProbe:
96
+ httpGet:
97
+ # D15 (LOAD-BEARING): same path as readinessProbe.
98
+ path: /agentmemory/livez
99
+ port: 3111
100
+ initialDelaySeconds: 30
101
+ periodSeconds: 20
102
+ timeoutSeconds: 5
103
+ failureThreshold: 3
104
+ resources:
105
+ requests:
106
+ cpu: "50m"
107
+ memory: "256Mi"
108
+ limits:
109
+ cpu: "500m"
110
+ memory: "1Gi"
111
+ volumes:
112
+ - name: memory-data
113
+ persistentVolumeClaim:
114
+ claimName: olam-memory-data
115
+ - name: tmp
116
+ emptyDir: {}
@@ -0,0 +1,21 @@
1
+ # ClusterIP Service for olam-memory-service.
2
+ # Port 3111 — consumed by host-cp and agents via cluster-internal DNS.
3
+ # Operator surfaces externally via:
4
+ # kubectl port-forward -n olam svc/olam-memory-service 3111:3111
5
+ apiVersion: v1
6
+ kind: Service
7
+ metadata:
8
+ name: olam-memory-service
9
+ namespace: olam
10
+ labels:
11
+ app: olam-memory-service
12
+ olam.io/component: peripheral
13
+ spec:
14
+ type: ClusterIP
15
+ selector:
16
+ app: olam-memory-service
17
+ ports:
18
+ - name: http
19
+ port: 3111
20
+ targetPort: 3111
21
+ protocol: TCP
@@ -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.146",
3
+ "version": "0.1.148",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "olam": "./bin/olam.cjs"