@pleri/olam-cli 0.1.186 → 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.
- package/README.md +1 -1
- package/dist/ask/knowledge-pack-builder.d.ts.map +1 -1
- package/dist/ask/knowledge-pack-builder.js +5 -0
- package/dist/ask/knowledge-pack-builder.js.map +1 -1
- package/dist/ask/knowledge-pack.generated.d.ts.map +1 -1
- package/dist/ask/knowledge-pack.generated.js +442 -33
- package/dist/ask/knowledge-pack.generated.js.map +1 -1
- package/dist/commands/auth-status.js +2 -2
- package/dist/commands/auth-status.js.map +1 -1
- package/dist/commands/auth.js +1 -1
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/bootstrap.d.ts +4 -0
- package/dist/commands/bootstrap.d.ts.map +1 -1
- package/dist/commands/bootstrap.js +6 -9
- package/dist/commands/bootstrap.js.map +1 -1
- package/dist/commands/clean.js +1 -1
- package/dist/commands/clean.js.map +1 -1
- package/dist/commands/completion.d.ts.map +1 -1
- package/dist/commands/completion.js +1 -4
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +10 -0
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/crystallize.js +12 -14
- package/dist/commands/crystallize.js.map +1 -1
- package/dist/commands/destroy.d.ts +13 -1
- package/dist/commands/destroy.d.ts.map +1 -1
- package/dist/commands/destroy.js +52 -6
- package/dist/commands/destroy.js.map +1 -1
- package/dist/commands/dispatch.d.ts +9 -0
- package/dist/commands/dispatch.d.ts.map +1 -1
- package/dist/commands/dispatch.js +21 -2
- package/dist/commands/dispatch.js.map +1 -1
- package/dist/commands/doctor.d.ts +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +29 -22
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/enter.d.ts +3 -3
- package/dist/commands/enter.d.ts.map +1 -1
- package/dist/commands/enter.js +57 -44
- package/dist/commands/enter.js.map +1 -1
- package/dist/commands/flywheel/index.d.ts.map +1 -1
- package/dist/commands/flywheel/index.js +1 -1
- package/dist/commands/flywheel/index.js.map +1 -1
- package/dist/commands/host-cp.d.ts.map +1 -1
- package/dist/commands/host-cp.js +2 -1
- package/dist/commands/host-cp.js.map +1 -1
- package/dist/commands/implode.d.ts.map +1 -1
- package/dist/commands/implode.js +1 -1
- package/dist/commands/implode.js.map +1 -1
- package/dist/commands/init.d.ts +20 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +102 -9
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install.js +2 -2
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/kg-build.d.ts.map +1 -1
- package/dist/commands/kg-build.js +3 -0
- package/dist/commands/kg-build.js.map +1 -1
- package/dist/commands/kg-classify.d.ts +20 -0
- package/dist/commands/kg-classify.d.ts.map +1 -1
- package/dist/commands/kg-classify.js +59 -42
- package/dist/commands/kg-classify.js.map +1 -1
- package/dist/commands/kg-mirror.d.ts +40 -0
- package/dist/commands/kg-mirror.d.ts.map +1 -0
- package/dist/commands/kg-mirror.js +228 -0
- package/dist/commands/kg-mirror.js.map +1 -0
- package/dist/commands/mcp/index.js +1 -1
- package/dist/commands/mcp/index.js.map +1 -1
- package/dist/commands/memory/index.d.ts.map +1 -1
- package/dist/commands/memory/index.js +1 -1
- package/dist/commands/memory/index.js.map +1 -1
- package/dist/commands/resume.d.ts.map +1 -1
- package/dist/commands/resume.js +1 -1
- package/dist/commands/resume.js.map +1 -1
- package/dist/commands/services-tls.d.ts +120 -0
- package/dist/commands/services-tls.d.ts.map +1 -0
- package/dist/commands/services-tls.js +434 -0
- package/dist/commands/services-tls.js.map +1 -0
- package/dist/commands/services.d.ts.map +1 -1
- package/dist/commands/services.js +40 -1
- package/dist/commands/services.js.map +1 -1
- package/dist/commands/setup-linux-gate.d.ts.map +1 -1
- package/dist/commands/setup-linux-gate.js +1 -3
- package/dist/commands/setup-linux-gate.js.map +1 -1
- package/dist/commands/setup-metrics.d.ts.map +1 -1
- package/dist/commands/setup-metrics.js +1 -2
- package/dist/commands/setup-metrics.js.map +1 -1
- package/dist/commands/setup-phase-5a-skill-source.d.ts +17 -1
- package/dist/commands/setup-phase-5a-skill-source.d.ts.map +1 -1
- package/dist/commands/setup-phase-5a-skill-source.js +69 -6
- package/dist/commands/setup-phase-5a-skill-source.js.map +1 -1
- package/dist/commands/setup.d.ts +26 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +189 -47
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/skills-onboard.d.ts.map +1 -1
- package/dist/commands/skills-onboard.js +4 -1
- package/dist/commands/skills-onboard.js.map +1 -1
- package/dist/commands/skills-source.d.ts.map +1 -1
- package/dist/commands/skills-source.js +20 -4
- package/dist/commands/skills-source.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +5 -1
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +1 -3
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/commands/yolo.d.ts.map +1 -1
- package/dist/commands/yolo.js +1 -1
- package/dist/commands/yolo.js.map +1 -1
- package/dist/context.d.ts +4 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +3 -2
- package/dist/context.js.map +1 -1
- package/dist/image-digests.json +8 -8
- package/dist/index.js +4409 -2375
- package/dist/index.js.map +1 -1
- package/dist/lib/auth-refresh-kubernetes.d.ts.map +1 -1
- package/dist/lib/auth-refresh-kubernetes.js +14 -5
- package/dist/lib/auth-refresh-kubernetes.js.map +1 -1
- package/dist/lib/bootstrap-kubernetes.d.ts +41 -0
- package/dist/lib/bootstrap-kubernetes.d.ts.map +1 -1
- package/dist/lib/bootstrap-kubernetes.js +289 -36
- package/dist/lib/bootstrap-kubernetes.js.map +1 -1
- package/dist/lib/cf-access-token.d.ts.map +1 -1
- package/dist/lib/cf-access-token.js +2 -3
- package/dist/lib/cf-access-token.js.map +1 -1
- package/dist/lib/health-probes.d.ts +14 -0
- package/dist/lib/health-probes.d.ts.map +1 -1
- package/dist/lib/health-probes.js +41 -3
- package/dist/lib/health-probes.js.map +1 -1
- package/dist/lib/help-groups.d.ts +36 -0
- package/dist/lib/help-groups.d.ts.map +1 -0
- package/dist/lib/help-groups.js +124 -0
- package/dist/lib/help-groups.js.map +1 -0
- package/dist/lib/k8s-bootstrap.d.ts +6 -0
- package/dist/lib/k8s-bootstrap.d.ts.map +1 -1
- package/dist/lib/k8s-bootstrap.js +15 -2
- package/dist/lib/k8s-bootstrap.js.map +1 -1
- package/dist/lib/k8s-secret-render.d.ts.map +1 -1
- package/dist/lib/k8s-secret-render.js +17 -10
- package/dist/lib/k8s-secret-render.js.map +1 -1
- package/dist/lib/memory-secret.d.ts +15 -2
- package/dist/lib/memory-secret.d.ts.map +1 -1
- package/dist/lib/memory-secret.js +25 -8
- package/dist/lib/memory-secret.js.map +1 -1
- package/dist/lib/upgrade-check.d.ts +60 -0
- package/dist/lib/upgrade-check.d.ts.map +1 -0
- package/dist/lib/upgrade-check.js +169 -0
- package/dist/lib/upgrade-check.js.map +1 -0
- package/dist/lib/upgrade-kubernetes.d.ts +17 -0
- 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 +2687 -2818
- package/hermes-bundle/version.json +1 -1
- package/host-cp/k8s/manifests/30-configmap.yaml +8 -1
- package/host-cp/k8s/manifests/50-deployment.yaml +1 -1
- package/host-cp/k8s/manifests/60-service.yaml +12 -4
- package/host-cp/k8s/manifests/70-ingressroute.yaml +58 -0
- package/host-cp/k8s/manifests/auth-service/50-deployment.yaml +1 -1
- package/host-cp/k8s/manifests/chunks-electric/10-serviceaccount.yaml +8 -0
- package/host-cp/k8s/manifests/chunks-electric/20-rbac.yaml +27 -0
- package/host-cp/k8s/manifests/chunks-electric/30-configmap.yaml +23 -0
- package/host-cp/k8s/manifests/chunks-electric/45-pvc.yaml +19 -0
- package/host-cp/k8s/manifests/chunks-electric/50-deployment.yaml +84 -0
- package/host-cp/k8s/manifests/chunks-electric/60-service.yaml +17 -0
- package/host-cp/k8s/manifests/chunks-postgres/10-serviceaccount.yaml +8 -0
- package/host-cp/k8s/manifests/chunks-postgres/20-rbac.yaml +29 -0
- package/host-cp/k8s/manifests/chunks-postgres/30-configmap.yaml +185 -0
- package/host-cp/k8s/manifests/chunks-postgres/45-pvc.yaml +24 -0
- package/host-cp/k8s/manifests/chunks-postgres/50-deployment.yaml +101 -0
- package/host-cp/k8s/manifests/chunks-postgres/60-service.yaml +24 -0
- package/host-cp/k8s/manifests/kg-service/50-deployment.yaml +1 -1
- package/host-cp/k8s/manifests/mcp-auth-service/50-deployment.yaml +1 -1
- package/host-cp/k8s/manifests/memory-service/50-deployment.yaml +1 -1
- package/host-cp/k8s/manifests/plan-chat-service/10-serviceaccount.yaml +8 -0
- package/host-cp/k8s/manifests/plan-chat-service/20-rbac.yaml +29 -0
- package/host-cp/k8s/manifests/plan-chat-service/30-configmap.yaml +36 -0
- package/host-cp/k8s/manifests/plan-chat-service/45-pvc.yaml +24 -0
- package/host-cp/k8s/manifests/plan-chat-service/50-deployment.yaml +135 -0
- package/host-cp/k8s/manifests/plan-chat-service/60-service.yaml +17 -0
- package/host-cp/src/plan-chat-secret.mjs +16 -1
- package/host-cp/src/plan-chat-service.mjs +709 -11
- package/host-cp/src/planning-sessions.mjs +252 -0
- package/host-cp/src/pr-cache.mjs +11 -2
- package/host-cp/src/server.mjs +128 -22
- package/package.json +2 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Headless Service for olam-chunks-postgres StatefulSet.
|
|
2
|
+
#
|
|
3
|
+
# clusterIP: None gives the StatefulSet's pod stable DNS:
|
|
4
|
+
# olam-chunks-postgres-0.olam-chunks-postgres.olam.svc.cluster.local
|
|
5
|
+
# Callers (plan-chat-service, chunks-electric) connect via the shorter
|
|
6
|
+
# olam-chunks-postgres.olam.svc.cluster.local form which Kubernetes resolves
|
|
7
|
+
# round-robin to the single backing pod.
|
|
8
|
+
apiVersion: v1
|
|
9
|
+
kind: Service
|
|
10
|
+
metadata:
|
|
11
|
+
name: olam-chunks-postgres
|
|
12
|
+
namespace: olam
|
|
13
|
+
labels:
|
|
14
|
+
app: olam-chunks-postgres
|
|
15
|
+
olam.io/component: substrate
|
|
16
|
+
spec:
|
|
17
|
+
clusterIP: None
|
|
18
|
+
selector:
|
|
19
|
+
app: olam-chunks-postgres
|
|
20
|
+
ports:
|
|
21
|
+
- name: postgres
|
|
22
|
+
port: 5432
|
|
23
|
+
targetPort: 5432
|
|
24
|
+
protocol: TCP
|
|
@@ -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:
|
|
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:
|
|
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:
|
|
73
|
+
image: ghcr.io/pleri/olam-memory-service@sha256:2037a12d390be09714bb80e2d707fb94d210f28b5227428d3047fe9155635acd
|
|
74
74
|
imagePullPolicy: IfNotPresent
|
|
75
75
|
securityContext:
|
|
76
76
|
runAsNonRoot: true
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# plan-chat-service does not need to read or write any Kubernetes API objects.
|
|
2
|
+
# A no-op Role + RoleBinding documents the minimal-privilege stance and
|
|
3
|
+
# keeps the file present so audit:cli-bundle-k8s does not skip this peripheral.
|
|
4
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
5
|
+
kind: Role
|
|
6
|
+
metadata:
|
|
7
|
+
name: olam-plan-chat-service
|
|
8
|
+
namespace: olam
|
|
9
|
+
labels:
|
|
10
|
+
app: olam-plan-chat-service
|
|
11
|
+
olam.io/component: peripheral
|
|
12
|
+
rules: []
|
|
13
|
+
---
|
|
14
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
15
|
+
kind: RoleBinding
|
|
16
|
+
metadata:
|
|
17
|
+
name: olam-plan-chat-service
|
|
18
|
+
namespace: olam
|
|
19
|
+
labels:
|
|
20
|
+
app: olam-plan-chat-service
|
|
21
|
+
olam.io/component: peripheral
|
|
22
|
+
roleRef:
|
|
23
|
+
apiGroup: rbac.authorization.k8s.io
|
|
24
|
+
kind: Role
|
|
25
|
+
name: olam-plan-chat-service
|
|
26
|
+
subjects:
|
|
27
|
+
- kind: ServiceAccount
|
|
28
|
+
name: olam-plan-chat-service
|
|
29
|
+
namespace: olam
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# ConfigMap for olam-plan-chat-service.
|
|
2
|
+
#
|
|
3
|
+
# plan-chat-service.mjs (packages/host-cp/src/plan-chat-service.mjs) reads
|
|
4
|
+
# these env vars at startup. See the file header for the canonical names.
|
|
5
|
+
#
|
|
6
|
+
# DATABASE_URL: points at the in-cluster chunks-postgres StatefulSet's Service.
|
|
7
|
+
# The password is sourced from the chunks-postgres-secret
|
|
8
|
+
# (mounted via envFrom in 50-deployment.yaml) — the literal
|
|
9
|
+
# here uses the env-var substitution syntax
|
|
10
|
+
# `$(VAR)` which kubelet expands when DATABASE_URL is itself
|
|
11
|
+
# read via envFrom or env: subordinate.
|
|
12
|
+
#
|
|
13
|
+
# BUT: kubelet only expands env-refs declared on the container,
|
|
14
|
+
# not values inside a ConfigMap key. So we keep DATABASE_URL
|
|
15
|
+
# OUT of this ConfigMap and assemble it in the Deployment's
|
|
16
|
+
# env: section instead (which CAN reference the Secret-backed
|
|
17
|
+
# POSTGRES_PASSWORD via $(POSTGRES_PASSWORD)). See 50-deployment.yaml.
|
|
18
|
+
#
|
|
19
|
+
# ELECTRIC_URL: chunks-electric ClusterIP. No auth (ELECTRIC_INSECURE=true on
|
|
20
|
+
# that service in local-dev mode).
|
|
21
|
+
#
|
|
22
|
+
# SECRET_PATH: filesystem path where the olam-plan-chat-secret Secret is
|
|
23
|
+
# mounted (see volumeMounts in 50-deployment.yaml). The mount
|
|
24
|
+
# key is "secret" → file `/etc/olam-plan-chat/secret`.
|
|
25
|
+
apiVersion: v1
|
|
26
|
+
kind: ConfigMap
|
|
27
|
+
metadata:
|
|
28
|
+
name: olam-plan-chat-service-env
|
|
29
|
+
namespace: olam
|
|
30
|
+
labels:
|
|
31
|
+
app: olam-plan-chat-service
|
|
32
|
+
olam.io/component: peripheral
|
|
33
|
+
data:
|
|
34
|
+
OLAM_PLAN_CHAT_PORT: "3200"
|
|
35
|
+
OLAM_PLAN_CHAT_ELECTRIC_URL: "http://olam-chunks-electric.olam.svc.cluster.local:3000"
|
|
36
|
+
OLAM_PLAN_CHAT_SECRET_PATH: "/etc/olam-plan-chat/secret"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# PersistentVolumeClaim for olam-plan-chat-service /data volume.
|
|
2
|
+
#
|
|
3
|
+
# plan-chat-service is mostly stateless (DB lives in chunks-postgres, secret
|
|
4
|
+
# lives in olam-plan-chat-secret), but ships a /data PVC for parity with
|
|
5
|
+
# the other peripherals. Used for any transient state the service decides
|
|
6
|
+
# to spool (e.g. planning-session resumption buffers).
|
|
7
|
+
#
|
|
8
|
+
# local-path StorageClass ships with k3d by default. On non-k3d clusters,
|
|
9
|
+
# substitute storageClassName with your cluster's provisioner.
|
|
10
|
+
apiVersion: v1
|
|
11
|
+
kind: PersistentVolumeClaim
|
|
12
|
+
metadata:
|
|
13
|
+
name: olam-plan-chat-service-data
|
|
14
|
+
namespace: olam
|
|
15
|
+
labels:
|
|
16
|
+
app: olam-plan-chat-service
|
|
17
|
+
olam.io/component: peripheral
|
|
18
|
+
spec:
|
|
19
|
+
accessModes:
|
|
20
|
+
- ReadWriteOnce
|
|
21
|
+
storageClassName: local-path
|
|
22
|
+
resources:
|
|
23
|
+
requests:
|
|
24
|
+
storage: 1Gi
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# Deployment for olam-plan-chat-service.
|
|
2
|
+
#
|
|
3
|
+
# Image strategy: REUSES the olam-host-cp image. Per the package layout,
|
|
4
|
+
# plan-chat-service.mjs is a sibling under packages/host-cp/src/, and the
|
|
5
|
+
# host-cp image's WORKDIR=/app already contains it at /app/src/plan-chat-service.mjs.
|
|
6
|
+
# The single shared image avoids version-drift between the two binaries that
|
|
7
|
+
# share plan-chat-secret.mjs (bearer-auth logic), planning-sessions.mjs,
|
|
8
|
+
# crystallize-planning.mjs, and resolver.mjs.
|
|
9
|
+
#
|
|
10
|
+
# The command override replaces the host-cp default
|
|
11
|
+
# ENTRYPOINT (`node src/server.mjs`) with the plan-chat-service entrypoint.
|
|
12
|
+
#
|
|
13
|
+
# Image: pinned to the SAME digest as host-cp's 50-deployment.yaml. Refresh
|
|
14
|
+
# both in lockstep via scripts/refresh-manifest-digests.mjs on every release.
|
|
15
|
+
apiVersion: apps/v1
|
|
16
|
+
kind: Deployment
|
|
17
|
+
metadata:
|
|
18
|
+
name: olam-plan-chat-service
|
|
19
|
+
namespace: olam
|
|
20
|
+
labels:
|
|
21
|
+
app: olam-plan-chat-service
|
|
22
|
+
olam.io/component: peripheral
|
|
23
|
+
spec:
|
|
24
|
+
replicas: 1
|
|
25
|
+
strategy:
|
|
26
|
+
type: RollingUpdate
|
|
27
|
+
rollingUpdate:
|
|
28
|
+
maxSurge: 1
|
|
29
|
+
maxUnavailable: 0
|
|
30
|
+
selector:
|
|
31
|
+
matchLabels:
|
|
32
|
+
app: olam-plan-chat-service
|
|
33
|
+
template:
|
|
34
|
+
metadata:
|
|
35
|
+
labels:
|
|
36
|
+
app: olam-plan-chat-service
|
|
37
|
+
spec:
|
|
38
|
+
enableServiceLinks: false
|
|
39
|
+
imagePullSecrets:
|
|
40
|
+
- name: ghcr-pull
|
|
41
|
+
serviceAccountName: olam-plan-chat-service
|
|
42
|
+
securityContext:
|
|
43
|
+
runAsNonRoot: true
|
|
44
|
+
runAsUser: 1000
|
|
45
|
+
runAsGroup: 1000
|
|
46
|
+
fsGroup: 1000
|
|
47
|
+
initContainers:
|
|
48
|
+
# chown-data: identical to memory-service pattern. Postgres-RWO PVC
|
|
49
|
+
# mounts as root-owned on local-path; this brings it to 1000:1000.
|
|
50
|
+
- name: chown-data
|
|
51
|
+
image: busybox@sha256:73aaf090f3d85aa34ee199857f03fa3a95c8ede2ffd4cc2cdb5b94e566b11662
|
|
52
|
+
imagePullPolicy: IfNotPresent
|
|
53
|
+
securityContext:
|
|
54
|
+
runAsUser: 0
|
|
55
|
+
runAsNonRoot: false
|
|
56
|
+
allowPrivilegeEscalation: false
|
|
57
|
+
command: ["chown", "-R", "1000:1000", "/data"]
|
|
58
|
+
volumeMounts:
|
|
59
|
+
- name: plan-chat-data
|
|
60
|
+
mountPath: /data
|
|
61
|
+
containers:
|
|
62
|
+
- name: olam-plan-chat-service
|
|
63
|
+
# Reuses the host-cp image (same source tree, same node_modules).
|
|
64
|
+
# Digest pinned in lockstep with packages/host-cp/k8s/manifests/50-deployment.yaml.
|
|
65
|
+
image: ghcr.io/pleri/olam-host-cp@sha256:20d84b6d490c633bc5a158b0f7f849152aba3cf1d2d45657360f627d8d41ec3f
|
|
66
|
+
imagePullPolicy: IfNotPresent
|
|
67
|
+
# Override the host-cp ENTRYPOINT. plan-chat-service.mjs exports
|
|
68
|
+
# startService(); we boot it via -e import-and-call.
|
|
69
|
+
command: ["node"]
|
|
70
|
+
args:
|
|
71
|
+
- "-e"
|
|
72
|
+
- "import('/app/src/plan-chat-service.mjs').then(m => m.startService()).catch(e => { console.error('[plan-chat-service]', e); process.exit(1); });"
|
|
73
|
+
workingDir: /app
|
|
74
|
+
securityContext:
|
|
75
|
+
runAsNonRoot: true
|
|
76
|
+
runAsUser: 1000
|
|
77
|
+
allowPrivilegeEscalation: false
|
|
78
|
+
capabilities:
|
|
79
|
+
drop: ["ALL"]
|
|
80
|
+
ports:
|
|
81
|
+
- name: http
|
|
82
|
+
containerPort: 3200
|
|
83
|
+
protocol: TCP
|
|
84
|
+
envFrom:
|
|
85
|
+
- configMapRef:
|
|
86
|
+
name: olam-plan-chat-service-env
|
|
87
|
+
env:
|
|
88
|
+
# DATABASE_URL composition. Same pattern as chunks-electric.
|
|
89
|
+
- name: POSTGRES_PASSWORD
|
|
90
|
+
valueFrom:
|
|
91
|
+
secretKeyRef:
|
|
92
|
+
name: olam-chunks-postgres-secret
|
|
93
|
+
key: POSTGRES_PASSWORD
|
|
94
|
+
- name: OLAM_PLAN_CHAT_DATABASE_URL
|
|
95
|
+
value: "postgres://postgres:$(POSTGRES_PASSWORD)@olam-chunks-postgres.olam.svc.cluster.local:5432/chunks"
|
|
96
|
+
volumeMounts:
|
|
97
|
+
- name: plan-chat-data
|
|
98
|
+
mountPath: /data
|
|
99
|
+
- name: plan-chat-secret
|
|
100
|
+
mountPath: /etc/olam-plan-chat
|
|
101
|
+
readOnly: true
|
|
102
|
+
readinessProbe:
|
|
103
|
+
httpGet:
|
|
104
|
+
path: /livez
|
|
105
|
+
port: 3200
|
|
106
|
+
initialDelaySeconds: 10
|
|
107
|
+
periodSeconds: 5
|
|
108
|
+
timeoutSeconds: 3
|
|
109
|
+
failureThreshold: 12
|
|
110
|
+
livenessProbe:
|
|
111
|
+
httpGet:
|
|
112
|
+
path: /livez
|
|
113
|
+
port: 3200
|
|
114
|
+
initialDelaySeconds: 60
|
|
115
|
+
periodSeconds: 20
|
|
116
|
+
timeoutSeconds: 5
|
|
117
|
+
failureThreshold: 3
|
|
118
|
+
resources:
|
|
119
|
+
requests:
|
|
120
|
+
cpu: "50m"
|
|
121
|
+
memory: "256Mi"
|
|
122
|
+
limits:
|
|
123
|
+
cpu: "500m"
|
|
124
|
+
memory: "1Gi"
|
|
125
|
+
volumes:
|
|
126
|
+
- name: plan-chat-data
|
|
127
|
+
persistentVolumeClaim:
|
|
128
|
+
claimName: olam-plan-chat-service-data
|
|
129
|
+
- name: plan-chat-secret
|
|
130
|
+
secret:
|
|
131
|
+
secretName: olam-plan-chat-secret
|
|
132
|
+
defaultMode: 0400
|
|
133
|
+
items:
|
|
134
|
+
- key: PLAN_CHAT_SECRET
|
|
135
|
+
path: secret
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
apiVersion: v1
|
|
2
|
+
kind: Service
|
|
3
|
+
metadata:
|
|
4
|
+
name: olam-plan-chat-service
|
|
5
|
+
namespace: olam
|
|
6
|
+
labels:
|
|
7
|
+
app: olam-plan-chat-service
|
|
8
|
+
olam.io/component: peripheral
|
|
9
|
+
spec:
|
|
10
|
+
type: ClusterIP
|
|
11
|
+
selector:
|
|
12
|
+
app: olam-plan-chat-service
|
|
13
|
+
ports:
|
|
14
|
+
- name: http
|
|
15
|
+
port: 3200
|
|
16
|
+
targetPort: 3200
|
|
17
|
+
protocol: TCP
|
|
@@ -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 ??
|
|
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;
|