humemory 0.2.3 → 0.2.5
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/AGENTS.md +1 -1
- package/CHANGELOG.md +32 -0
- package/README.md +75 -6
- package/dist/agent/claude-hook.js +8 -3
- package/dist/agent/codex-import.d.ts +40 -0
- package/dist/agent/codex-import.js +97 -0
- package/dist/agent/codex-rollout-parser.d.ts +30 -0
- package/dist/agent/codex-rollout-parser.js +111 -0
- package/dist/agent/maintenance-queue.js +2 -2
- package/dist/agent/session-context.js +6 -0
- package/dist/agent/session-parser.d.ts +17 -0
- package/dist/agent/session-parser.js +28 -0
- package/dist/api/cors.d.ts +21 -0
- package/dist/api/cors.js +39 -0
- package/dist/api/dream-routes.js +2 -1
- package/dist/api/errors.d.ts +22 -0
- package/dist/api/errors.js +34 -0
- package/dist/api/intentions-routes.js +27 -6
- package/dist/api/limits.d.ts +58 -0
- package/dist/api/limits.js +80 -0
- package/dist/api/memory-routes.js +82 -29
- package/dist/api/scripts-routes.js +20 -6
- package/dist/api/security-headers.d.ts +19 -0
- package/dist/api/security-headers.js +47 -0
- package/dist/api/server.d.ts +4 -1
- package/dist/api/server.js +20 -10
- package/dist/cli/index.js +36 -0
- package/dist/core/cues.d.ts +16 -0
- package/dist/core/cues.js +56 -3
- package/dist/core/llm-cli-client.d.ts +43 -0
- package/dist/core/llm-cli-client.js +108 -0
- package/dist/store/sqlite.d.ts +9 -1
- package/dist/store/sqlite.js +9 -2
- package/package.json +2 -1
- package/public/app/index-95ffty7j.js +12 -0
- package/public/app/index.html +1 -1
- package/scripts/maintenance-worker.ts +9 -1
- package/public/app/index-nqr7bd0a.js +0 -12
package/public/app/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
6
|
<title>humemory — Boucles ouvertes</title>
|
|
7
|
-
<link rel="stylesheet" crossorigin href="./index-kv9v6ty0.css"><script type="module" crossorigin src="./index-
|
|
7
|
+
<link rel="stylesheet" crossorigin href="./index-kv9v6ty0.css"><script type="module" crossorigin src="./index-95ffty7j.js"></script></head>
|
|
8
8
|
<body>
|
|
9
9
|
<div id="root"></div>
|
|
10
10
|
|
|
@@ -5,6 +5,7 @@ import Anthropic from '@anthropic-ai/sdk';
|
|
|
5
5
|
import { dirname, join } from 'path';
|
|
6
6
|
import { fileURLToPath } from 'url';
|
|
7
7
|
import type { LLMClient } from '../src/core/llm-generator.js';
|
|
8
|
+
import { createCodexClient } from '../src/core/llm-cli-client.js';
|
|
8
9
|
import { processMaintenanceQueue } from '../src/agent/maintenance-queue.js';
|
|
9
10
|
|
|
10
11
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
@@ -12,16 +13,23 @@ const queueDir = process.env.HUMEMORY_QUEUE ?? join(__dirname, '../data/maintena
|
|
|
12
13
|
const dbPath = process.env.HUMEMORY_DB ?? join(__dirname, '../data/humemory.db');
|
|
13
14
|
const provider = process.env.HUMEMORY_MAINTENANCE_LLM ?? 'none';
|
|
14
15
|
|
|
16
|
+
const llmTimeoutMs = Number(process.env.HUMEMORY_MAINTENANCE_TIMEOUT_MS ?? 8_000);
|
|
17
|
+
|
|
18
|
+
// 'none' (the default) keeps consolidation deterministic and network-free.
|
|
15
19
|
let client: LLMClient | undefined;
|
|
16
20
|
if (provider === 'anthropic' && process.env.ANTHROPIC_API_KEY) {
|
|
17
21
|
client = new Anthropic() as unknown as LLMClient;
|
|
22
|
+
} else if (provider === 'codex') {
|
|
23
|
+
// No API key needed: the logged-in `codex` CLI answers instead. Slower than an
|
|
24
|
+
// SDK call (agent start-up), so it gets its own, larger budget.
|
|
25
|
+
client = createCodexClient({ timeoutMs: llmTimeoutMs });
|
|
18
26
|
}
|
|
19
27
|
|
|
20
28
|
const result = await processMaintenanceQueue({
|
|
21
29
|
queueDir,
|
|
22
30
|
dbPath,
|
|
23
31
|
client,
|
|
24
|
-
llmTimeoutMs
|
|
32
|
+
llmTimeoutMs,
|
|
25
33
|
maxJobs: Number(process.env.HUMEMORY_MAINTENANCE_BATCH ?? 20),
|
|
26
34
|
});
|
|
27
35
|
|