@pleri/olam-cli 0.1.147 → 0.1.150

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 (137) hide show
  1. package/dist/agent-stream/agent-sdk-to-chunks.js +276 -0
  2. package/dist/agent-stream/agent-stream-launch.js +348 -0
  3. package/dist/agent-stream/chunks-subscriber-transport.js +262 -0
  4. package/dist/agent-stream/codex-runner.js +188 -0
  5. package/dist/agent-stream/driver-runner.js +347 -0
  6. package/dist/agent-stream/operator-subscription.js +179 -0
  7. package/dist/commands/auth.d.ts.map +1 -1
  8. package/dist/commands/auth.js +26 -1
  9. package/dist/commands/auth.js.map +1 -1
  10. package/dist/commands/create.d.ts.map +1 -1
  11. package/dist/commands/create.js +39 -0
  12. package/dist/commands/create.js.map +1 -1
  13. package/dist/commands/doctor.d.ts +54 -3
  14. package/dist/commands/doctor.d.ts.map +1 -1
  15. package/dist/commands/doctor.js +348 -6
  16. package/dist/commands/doctor.js.map +1 -1
  17. package/dist/commands/init.d.ts +46 -0
  18. package/dist/commands/init.d.ts.map +1 -1
  19. package/dist/commands/init.js +90 -0
  20. package/dist/commands/init.js.map +1 -1
  21. package/dist/commands/kg-build.d.ts +23 -0
  22. package/dist/commands/kg-build.d.ts.map +1 -1
  23. package/dist/commands/kg-build.js +104 -2
  24. package/dist/commands/kg-build.js.map +1 -1
  25. package/dist/commands/restart.d.ts +18 -0
  26. package/dist/commands/restart.d.ts.map +1 -0
  27. package/dist/commands/restart.js +113 -0
  28. package/dist/commands/restart.js.map +1 -0
  29. package/dist/commands/services.d.ts +41 -3
  30. package/dist/commands/services.d.ts.map +1 -1
  31. package/dist/commands/services.js +221 -13
  32. package/dist/commands/services.js.map +1 -1
  33. package/dist/commands/setup-linux-gate.d.ts +26 -0
  34. package/dist/commands/setup-linux-gate.d.ts.map +1 -0
  35. package/dist/commands/setup-linux-gate.js +42 -0
  36. package/dist/commands/setup-linux-gate.js.map +1 -0
  37. package/dist/commands/setup-metrics.d.ts +26 -0
  38. package/dist/commands/setup-metrics.d.ts.map +1 -0
  39. package/dist/commands/setup-metrics.js +57 -0
  40. package/dist/commands/setup-metrics.js.map +1 -0
  41. package/dist/commands/setup-phase-5a-skill-source.d.ts +68 -0
  42. package/dist/commands/setup-phase-5a-skill-source.d.ts.map +1 -0
  43. package/dist/commands/setup-phase-5a-skill-source.js +196 -0
  44. package/dist/commands/setup-phase-5a-skill-source.js.map +1 -0
  45. package/dist/commands/setup-phase-5b-project-sweep.d.ts +38 -0
  46. package/dist/commands/setup-phase-5b-project-sweep.d.ts.map +1 -0
  47. package/dist/commands/setup-phase-5b-project-sweep.js +176 -0
  48. package/dist/commands/setup-phase-5b-project-sweep.js.map +1 -0
  49. package/dist/commands/setup.d.ts +19 -0
  50. package/dist/commands/setup.d.ts.map +1 -1
  51. package/dist/commands/setup.js +22 -0
  52. package/dist/commands/setup.js.map +1 -1
  53. package/dist/commands/skills-10x.d.ts +23 -0
  54. package/dist/commands/skills-10x.d.ts.map +1 -0
  55. package/dist/commands/skills-10x.js +308 -0
  56. package/dist/commands/skills-10x.js.map +1 -0
  57. package/dist/commands/substrate-audit-log.d.ts +2 -0
  58. package/dist/commands/substrate-audit-log.d.ts.map +1 -1
  59. package/dist/commands/substrate-audit-log.js +13 -0
  60. package/dist/commands/substrate-audit-log.js.map +1 -1
  61. package/dist/image-digests.json +7 -7
  62. package/dist/index.js +18102 -15234
  63. package/dist/index.js.map +1 -1
  64. package/dist/lib/auth-refresh-kubernetes.d.ts +62 -0
  65. package/dist/lib/auth-refresh-kubernetes.d.ts.map +1 -0
  66. package/dist/lib/auth-refresh-kubernetes.js +127 -0
  67. package/dist/lib/auth-refresh-kubernetes.js.map +1 -0
  68. package/dist/lib/build-if-stale.d.ts +33 -0
  69. package/dist/lib/build-if-stale.d.ts.map +1 -0
  70. package/dist/lib/build-if-stale.js +156 -0
  71. package/dist/lib/build-if-stale.js.map +1 -0
  72. package/dist/lib/bundle-freshness.d.ts +57 -0
  73. package/dist/lib/bundle-freshness.d.ts.map +1 -0
  74. package/dist/lib/bundle-freshness.js +223 -0
  75. package/dist/lib/bundle-freshness.js.map +1 -0
  76. package/dist/lib/bundle-source.d.ts +52 -0
  77. package/dist/lib/bundle-source.d.ts.map +1 -0
  78. package/dist/lib/bundle-source.js +83 -0
  79. package/dist/lib/bundle-source.js.map +1 -0
  80. package/dist/lib/kubectl-wrap.d.ts +6 -0
  81. package/dist/lib/kubectl-wrap.d.ts.map +1 -1
  82. package/dist/lib/kubectl-wrap.js +6 -1
  83. package/dist/lib/kubectl-wrap.js.map +1 -1
  84. package/dist/lib/manifest-refresh.d.ts +42 -1
  85. package/dist/lib/manifest-refresh.d.ts.map +1 -1
  86. package/dist/lib/manifest-refresh.js +83 -7
  87. package/dist/lib/manifest-refresh.js.map +1 -1
  88. package/dist/lib/peripheral-registry.d.ts +36 -0
  89. package/dist/lib/peripheral-registry.d.ts.map +1 -0
  90. package/dist/lib/peripheral-registry.js +55 -0
  91. package/dist/lib/peripheral-registry.js.map +1 -0
  92. package/dist/lib/port-forward.d.ts +67 -0
  93. package/dist/lib/port-forward.d.ts.map +1 -1
  94. package/dist/lib/port-forward.js +153 -0
  95. package/dist/lib/port-forward.js.map +1 -1
  96. package/dist/lib/upgrade-kubernetes.d.ts +52 -12
  97. package/dist/lib/upgrade-kubernetes.d.ts.map +1 -1
  98. package/dist/lib/upgrade-kubernetes.js +390 -22
  99. package/dist/lib/upgrade-kubernetes.js.map +1 -1
  100. package/dist/mcp-server.js +84 -58
  101. package/host-cp/compose.yaml +6 -0
  102. package/host-cp/k8s/manifests/30-configmap.yaml +6 -0
  103. package/host-cp/k8s/manifests/50-deployment.yaml +46 -9
  104. package/host-cp/k8s/manifests/auth-service/10-serviceaccount.yaml +8 -0
  105. package/host-cp/k8s/manifests/auth-service/20-rbac.yaml +34 -0
  106. package/host-cp/k8s/manifests/auth-service/30-configmap.yaml +24 -0
  107. package/host-cp/k8s/manifests/auth-service/45-pvc.yaml +25 -0
  108. package/host-cp/k8s/manifests/auth-service/50-deployment.yaml +117 -0
  109. package/host-cp/k8s/manifests/auth-service/60-service.yaml +21 -0
  110. package/host-cp/k8s/manifests/kg-service/10-serviceaccount.yaml +8 -0
  111. package/host-cp/k8s/manifests/kg-service/20-rbac.yaml +34 -0
  112. package/host-cp/k8s/manifests/kg-service/30-configmap.yaml +18 -0
  113. package/host-cp/k8s/manifests/kg-service/45-pvc.yaml +25 -0
  114. package/host-cp/k8s/manifests/kg-service/50-deployment.yaml +108 -0
  115. package/host-cp/k8s/manifests/kg-service/60-service.yaml +21 -0
  116. package/host-cp/k8s/manifests/mcp-auth-service/10-serviceaccount.yaml +8 -0
  117. package/host-cp/k8s/manifests/mcp-auth-service/20-rbac.yaml +34 -0
  118. package/host-cp/k8s/manifests/mcp-auth-service/30-configmap.yaml +18 -0
  119. package/host-cp/k8s/manifests/mcp-auth-service/45-pvc.yaml +25 -0
  120. package/host-cp/k8s/manifests/mcp-auth-service/50-deployment.yaml +117 -0
  121. package/host-cp/k8s/manifests/mcp-auth-service/60-service.yaml +21 -0
  122. package/host-cp/k8s/manifests/memory-service/10-serviceaccount.yaml +8 -0
  123. package/host-cp/k8s/manifests/memory-service/20-rbac.yaml +34 -0
  124. package/host-cp/k8s/manifests/memory-service/30-configmap.yaml +20 -0
  125. package/host-cp/k8s/manifests/memory-service/45-pvc.yaml +25 -0
  126. package/host-cp/k8s/manifests/memory-service/50-deployment.yaml +121 -0
  127. package/host-cp/k8s/manifests/memory-service/60-service.yaml +21 -0
  128. package/host-cp/k8s/templates/auth-service-secret-template.yaml +28 -0
  129. package/host-cp/k8s/templates/kg-service-secret-template.yaml +28 -0
  130. package/host-cp/k8s/templates/mcp-auth-service-secret-template.yaml +28 -0
  131. package/host-cp/k8s/templates/memory-service-secret-template.yaml +29 -0
  132. package/host-cp/src/agent-runtime-trigger.mjs +7 -5
  133. package/host-cp/src/plan-chat-secret.mjs +13 -2
  134. package/host-cp/src/plan-chat-service.mjs +116 -15
  135. package/host-cp/src/server.mjs +23 -11
  136. package/host-cp/src/upgrade-spawner.mjs +10 -5
  137. package/package.json +4 -2
@@ -0,0 +1,117 @@
1
+ # Deployment for olam-mcp-auth-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-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.
7
+ # To update: resolve the new tag's digest via:
8
+ # TOKEN=$(curl -s "https://ghcr.io/token?scope=repository:pleri/olam-mcp-auth:pull&service=ghcr.io" | jq -r .token)
9
+ # curl -sI -H "Authorization: Bearer $TOKEN" \
10
+ # -H "Accept: application/vnd.oci.image.index.v1+json,application/vnd.docker.distribution.manifest.list.v2+json" \
11
+ # https://ghcr.io/v2/pleri/olam-mcp-auth/manifests/<tag> | grep docker-content-digest
12
+ # Or use: node scripts/refresh-manifest-digests.mjs
13
+ #
14
+ # securityContext: conservative defaults per T6/T7 threat model (runAsNonRoot,
15
+ # readOnlyRootFilesystem). /tmp backed by emptyDir for transient write needs.
16
+ #
17
+ # D17 (LOAD-BEARING): mcp-auth-service MUST NOT mount /var/run/docker.sock.
18
+ # Phase 2 architecture: k8s pods cannot reach docker.sock. No hostPath socket
19
+ # mount here — mcp-auth-service authenticates MCP clients via JWT, not Docker.
20
+ apiVersion: apps/v1
21
+ kind: Deployment
22
+ metadata:
23
+ name: olam-mcp-auth-service
24
+ namespace: olam
25
+ labels:
26
+ app: olam-mcp-auth-service
27
+ olam.io/component: peripheral
28
+ spec:
29
+ replicas: 1
30
+ strategy:
31
+ type: RollingUpdate
32
+ rollingUpdate:
33
+ maxSurge: 1
34
+ maxUnavailable: 0
35
+ selector:
36
+ matchLabels:
37
+ app: olam-mcp-auth-service
38
+ template:
39
+ metadata:
40
+ labels:
41
+ app: olam-mcp-auth-service
42
+ spec:
43
+ serviceAccountName: olam-mcp-auth-service
44
+ securityContext:
45
+ runAsNonRoot: true
46
+ runAsUser: 1000
47
+ runAsGroup: 1000
48
+ fsGroup: 1000
49
+ initContainers:
50
+ - name: chown-data
51
+ # busybox:1.36 — sha256-pinned per T4 threat model.
52
+ image: busybox@sha256:73aaf090f3d85aa34ee199857f03fa3a95c8ede2ffd4cc2cdb5b94e566b11662
53
+ imagePullPolicy: IfNotPresent
54
+ securityContext:
55
+ runAsUser: 0
56
+ runAsNonRoot: false
57
+ allowPrivilegeEscalation: false
58
+ command: ["chown", "-R", "1000:1000", "/data"]
59
+ volumeMounts:
60
+ - name: mcp-auth-data
61
+ mountPath: /data
62
+ containers:
63
+ - name: olam-mcp-auth-service
64
+ image: ghcr.io/pleri/olam-mcp-auth@sha256:7f5ffeea1a697e43fd1d4569d1e82c78086b80d3f331efa2ea166c0ef4f70826
65
+ imagePullPolicy: IfNotPresent
66
+ securityContext:
67
+ runAsNonRoot: true
68
+ runAsUser: 1000
69
+ readOnlyRootFilesystem: true
70
+ allowPrivilegeEscalation: false
71
+ capabilities:
72
+ drop: ["ALL"]
73
+ ports:
74
+ - name: http
75
+ containerPort: 9998
76
+ protocol: TCP
77
+ envFrom:
78
+ - configMapRef:
79
+ name: olam-mcp-auth-service-env
80
+ - secretRef:
81
+ name: olam-mcp-auth-service-secret
82
+ volumeMounts:
83
+ - name: mcp-auth-data
84
+ mountPath: /data
85
+ - name: tmp
86
+ mountPath: /tmp
87
+ readinessProbe:
88
+ httpGet:
89
+ path: /health
90
+ port: 9998
91
+ initialDelaySeconds: 5
92
+ periodSeconds: 5
93
+ timeoutSeconds: 3
94
+ failureThreshold: 6
95
+ livenessProbe:
96
+ httpGet:
97
+ path: /health
98
+ port: 9998
99
+ initialDelaySeconds: 30
100
+ periodSeconds: 20
101
+ timeoutSeconds: 5
102
+ failureThreshold: 3
103
+ resources:
104
+ requests:
105
+ cpu: "50m"
106
+ memory: "128Mi"
107
+ limits:
108
+ cpu: "500m"
109
+ memory: "512Mi"
110
+ volumes:
111
+ - name: mcp-auth-data
112
+ persistentVolumeClaim:
113
+ claimName: olam-mcp-auth-data
114
+ - name: tmp
115
+ emptyDir: {}
116
+ # D17 (LOAD-BEARING): NO docker.sock volume or hostPath mount here.
117
+ # mcp-auth-service does not need Docker access in Phase 2 k8s architecture.
@@ -0,0 +1,21 @@
1
+ # ClusterIP Service for olam-mcp-auth-service.
2
+ # Port 9998 — consumed by other peripherals and host-cp via cluster-internal DNS.
3
+ # Operator surfaces externally via:
4
+ # kubectl port-forward -n olam svc/olam-mcp-auth-service 9998:9998
5
+ apiVersion: v1
6
+ kind: Service
7
+ metadata:
8
+ name: olam-mcp-auth-service
9
+ namespace: olam
10
+ labels:
11
+ app: olam-mcp-auth-service
12
+ olam.io/component: peripheral
13
+ spec:
14
+ type: ClusterIP
15
+ selector:
16
+ app: olam-mcp-auth-service
17
+ ports:
18
+ - name: http
19
+ port: 9998
20
+ targetPort: 9998
21
+ protocol: TCP
@@ -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,121 @@
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 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:b4132f1d43335daaeebda2437e5eb78690ce6ef4accb8a830c92ec7acc6ee593
67
+ imagePullPolicy: IfNotPresent
68
+ securityContext:
69
+ runAsNonRoot: true
70
+ runAsUser: 1000
71
+ readOnlyRootFilesystem: true
72
+ allowPrivilegeEscalation: false
73
+ capabilities:
74
+ drop: ["ALL"]
75
+ ports:
76
+ - name: http
77
+ containerPort: 3111
78
+ protocol: TCP
79
+ envFrom:
80
+ - configMapRef:
81
+ name: olam-memory-service-env
82
+ - secretRef:
83
+ name: olam-memory-service-secret
84
+ volumeMounts:
85
+ - name: memory-data
86
+ mountPath: /data
87
+ - name: tmp
88
+ mountPath: /tmp
89
+ readinessProbe:
90
+ httpGet:
91
+ # D15 (LOAD-BEARING): memory-service health path is /agentmemory/livez.
92
+ # Source: DEFAULT_HEALTH_PATH in packages/core/src/services-status/memory-probe.ts:18.
93
+ # Do NOT change to /health — that endpoint does not exist on this service.
94
+ path: /agentmemory/livez
95
+ port: 3111
96
+ initialDelaySeconds: 5
97
+ periodSeconds: 5
98
+ timeoutSeconds: 3
99
+ failureThreshold: 6
100
+ livenessProbe:
101
+ httpGet:
102
+ # D15 (LOAD-BEARING): same path as readinessProbe.
103
+ path: /agentmemory/livez
104
+ port: 3111
105
+ initialDelaySeconds: 30
106
+ periodSeconds: 20
107
+ timeoutSeconds: 5
108
+ failureThreshold: 3
109
+ resources:
110
+ requests:
111
+ cpu: "50m"
112
+ memory: "256Mi"
113
+ limits:
114
+ cpu: "500m"
115
+ memory: "1Gi"
116
+ volumes:
117
+ - name: memory-data
118
+ persistentVolumeClaim:
119
+ claimName: olam-memory-data
120
+ - name: tmp
121
+ 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"
@@ -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. The devbox image
35
- // COPYs `packages/intelligence/dist/agent-stream/` to this location during
36
- // build (devbox Dockerfile update lands alongside this PR or in a follow-up).
37
- // Compiled supervisor lives at /opt/olam/agent-stream/dist/agent-stream-launch.js
38
- // per the devbox runtime Dockerfile build-in-image step (tsc writes dist/).
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 SECRET_DIR = path.join(os.homedir(), '.olam');
15
- export const SECRET_PATH = path.join(SECRET_DIR, 'plan-chat-secret');
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