@pleri/olam-cli 0.1.207 → 0.1.208
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/dist/image-digests.json +8 -8
- package/dist/index.js +1819 -1307
- package/dist/index.js.map +1 -1
- package/dist/mcp-server.js +297 -214
- package/hermes-bundle/version.json +1 -1
- package/host-cp/k8s/manifests/50-deployment.yaml +1 -1
- package/host-cp/k8s/manifests/auth-service/50-deployment.yaml +1 -1
- 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/memory-hooks/agentmemory-classify-queue.mjs +4 -0
- package/memory-hooks/agentmemory-recall-trigger.mjs +4 -0
- package/memory-hooks/agentmemory-session-recall.js +27 -0
- package/package.json +1 -1
|
@@ -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:
|
|
121
|
+
image: ghcr.io/pleri/olam-host-cp@sha256:ddeb5b82c7a1d72d78070b299ea2266683e71ff832c5b399fe25ba28f2285d6f
|
|
122
122
|
imagePullPolicy: IfNotPresent
|
|
123
123
|
securityContext:
|
|
124
124
|
runAsNonRoot: true
|
|
@@ -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:
|
|
73
|
+
image: ghcr.io/pleri/olam-auth@sha256:238ef8b58198684f84ea7c2bf91b23a3ac216660a40f8ef6b4db11c83e555b3a
|
|
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:
|
|
64
|
+
image: ghcr.io/pleri/olam-kg-service@sha256:8fa1ef59a27f9295b7f7375ccda8e1efa110c9a309603301c073076e919e35c3
|
|
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:56964905f2da39c19f462b5e5f5f84e74a930c9a70a4518463606ce91276272b
|
|
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:581f763fcdc2e7e056c805883efa5e510ce460c6c2096445a909f35fcb38f04b
|
|
74
74
|
imagePullPolicy: IfNotPresent
|
|
75
75
|
securityContext:
|
|
76
76
|
runAsNonRoot: true
|
|
@@ -60,6 +60,7 @@ import { homedir } from 'node:os';
|
|
|
60
60
|
import { join } from 'node:path';
|
|
61
61
|
import { randomBytes } from 'node:crypto';
|
|
62
62
|
import { fileURLToPath } from 'node:url';
|
|
63
|
+
import { isAgentMemoryEnabled } from './agent-memory-gate.mjs';
|
|
63
64
|
|
|
64
65
|
/** Max bytes of captured text persisted per candidate. Keeps queue files small. */
|
|
65
66
|
export const MAX_CAPTURED_CHARS = 4000;
|
|
@@ -315,6 +316,9 @@ function readContentField(obj) {
|
|
|
315
316
|
}
|
|
316
317
|
|
|
317
318
|
async function main() {
|
|
319
|
+
// Gate: memory is off by default — exit silently when not enabled.
|
|
320
|
+
if (!isAgentMemoryEnabled()) return;
|
|
321
|
+
|
|
318
322
|
let event = {};
|
|
319
323
|
try {
|
|
320
324
|
event = JSON.parse(readFileSync(0, 'utf-8'));
|
|
@@ -33,6 +33,7 @@ import { existsSync, readFileSync, realpathSync } from 'node:fs';
|
|
|
33
33
|
import { homedir } from 'node:os';
|
|
34
34
|
import { join } from 'node:path';
|
|
35
35
|
import { fileURLToPath } from 'node:url';
|
|
36
|
+
import { isAgentMemoryEnabled } from './agent-memory-gate.mjs';
|
|
36
37
|
|
|
37
38
|
// Built-in tool-event filter: only fire on tool calls where recall has
|
|
38
39
|
// signal. Bash + Edit + MultiEdit + Read on substantive paths qualify;
|
|
@@ -190,6 +191,9 @@ export function formatAdditionalContext(response, prompt) {
|
|
|
190
191
|
}
|
|
191
192
|
|
|
192
193
|
async function main() {
|
|
194
|
+
// Gate: memory is off by default — exit silently when not enabled.
|
|
195
|
+
if (!isAgentMemoryEnabled()) return;
|
|
196
|
+
|
|
193
197
|
let event = {};
|
|
194
198
|
try {
|
|
195
199
|
event = JSON.parse(readFileSync(0, 'utf-8'));
|
|
@@ -40,6 +40,30 @@ const fs = require('fs');
|
|
|
40
40
|
const os = require('os');
|
|
41
41
|
const path = require('path');
|
|
42
42
|
|
|
43
|
+
// ---------------------------------------------------------------------------
|
|
44
|
+
// Opt-in gate — inline re-implementation of agent-memory-gate.mjs contract
|
|
45
|
+
// (CJS cannot import ESM at the top level; inline ensures same fail-closed
|
|
46
|
+
// semantics without a dynamic import or a build step).
|
|
47
|
+
// ---------------------------------------------------------------------------
|
|
48
|
+
const _GATE_TRUTHY_ENV = new Set(['1', 'true', 'on']);
|
|
49
|
+
const _GATE_TRUTHY_FILE = new Set(['true', '1']);
|
|
50
|
+
function _isAgentMemoryEnabled() {
|
|
51
|
+
const envVal = process.env['OLAM_AGENT_MEMORY'];
|
|
52
|
+
if (envVal !== undefined && envVal.length > 0) {
|
|
53
|
+
return _GATE_TRUTHY_ENV.has(envVal.trim().toLowerCase());
|
|
54
|
+
}
|
|
55
|
+
try {
|
|
56
|
+
const fromEnv = process.env['OLAM_HOME'];
|
|
57
|
+
const olamHome = (fromEnv && fromEnv.length > 0) ? fromEnv : path.join(os.homedir(), '.olam');
|
|
58
|
+
const flagPath = path.join(olamHome, 'agent-memory-enabled');
|
|
59
|
+
const raw = fs.readFileSync(flagPath, 'utf8').trim().toLowerCase();
|
|
60
|
+
return _GATE_TRUTHY_FILE.has(raw);
|
|
61
|
+
} catch {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// ---------------------------------------------------------------------------
|
|
66
|
+
|
|
43
67
|
// Resolve the bridge URL: operator env wins, then the `olam memory connect`
|
|
44
68
|
// artifact (~/.olam/memory-connection.json), then the LIVE memory-service
|
|
45
69
|
// Worker. The prior default (olam-agent-memory.ernestcodes.workers.dev) is a
|
|
@@ -276,6 +300,9 @@ async function recall(query, limit = 5) {
|
|
|
276
300
|
}
|
|
277
301
|
|
|
278
302
|
async function main() {
|
|
303
|
+
// Gate: memory is off by default — exit silently when not enabled.
|
|
304
|
+
if (!_isAgentMemoryEnabled()) return;
|
|
305
|
+
|
|
279
306
|
const raw = require('fs').readFileSync(0, 'utf8');
|
|
280
307
|
let event = {};
|
|
281
308
|
try { event = JSON.parse(raw); } catch (_) {}
|