claude-memory-layer 2.2.6 → 2.2.8
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 +4 -3
- package/dist/cli/index.js +23 -4
- package/dist/cli/index.js.map +2 -2
- package/dist/hooks/codex-session-start.js +307 -14
- package/dist/hooks/codex-session-start.js.map +4 -4
- package/dist/hooks/codex-user-prompt-submit.js +17667 -0
- package/dist/hooks/codex-user-prompt-submit.js.map +7 -0
- package/dist/hooks/session-start.js +306 -13
- package/dist/hooks/session-start.js.map +4 -4
- package/dist/hooks/user-prompt-submit.js +162 -24
- package/dist/hooks/user-prompt-submit.js.map +4 -4
- package/dist/mcp/index.js +17 -2
- package/dist/mcp/index.js.map +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -59,7 +59,7 @@ npx claude-memory-layer status
|
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
- `install`은 **한 번만** 하면 됩니다(Claude Code hooks 등록).
|
|
62
|
-
- `codex hooks install`은 `~/.codex/hooks.json`에 SessionStart/SessionEnd 훅을 병합합니다. Codex를 재시작한 뒤 `/hooks`에서 새 훅 정의를 검토하고 신뢰해야 실행됩니다.
|
|
62
|
+
- `codex hooks install`은 `~/.codex/hooks.json`에 SessionStart/UserPromptSubmit/SessionEnd 훅을 병합합니다. Codex를 재시작한 뒤 `/hooks`에서 새 훅 정의를 검토하고 신뢰해야 실행됩니다.
|
|
63
63
|
- Embedding backend은 런타임 필수 기능이며, postinstall이 패키지 내부의 격리된 관리 디렉터리에 설치합니다. 이 경계에서 `sharp` 보안 버전을 강제하고, CUDA 11 환경에서는 `onnxruntime-node`를 CPU-only로 설치합니다.
|
|
64
64
|
- 이후 프로젝트별로 메모리 저장소가 자동 분리됩니다.
|
|
65
65
|
- `install` / `uninstall`은 `~/.claude/settings.json`을, `codex hooks install` / `uninstall`은 `~/.codex/hooks.json`을 수정합니다. 기존의 다른 훅은 보존합니다.
|
|
@@ -346,7 +346,7 @@ MCP client가 환경에 따라 PATH를 못 찾으면 `command -v claude-memory-l
|
|
|
346
346
|
| Vector Outbox V2 | Implemented | transactional enqueue, worker lock, stale recovery, `vector-status`, dashboard Vector Health |
|
|
347
347
|
| Progressive disclosure / retrieval traces | Implemented | `search --disclosure`, `expand`, `source`, score breakdown, privacy-safe lanes, aggregate-only strategy/context-pack telemetry |
|
|
348
348
|
| MCP server | Implemented | package bin `claude-memory-layer-mcp`, project-aware read tools + audited operation tools |
|
|
349
|
-
| Codex/Hermes session ingestion | Implemented | validate/replay는 read-only, explicit import 지원; Codex는 opt-in SessionEnd 자동 import 지원 |
|
|
349
|
+
| Codex/Hermes session ingestion | Implemented | validate/replay는 read-only, explicit import 지원; Codex는 opt-in SessionStart/UserPromptSubmit 조회와 SessionEnd 자동 import 지원 |
|
|
350
350
|
| Memory Operations layer | Implemented | facets/actions/frontier/checkpoints/retention/graph/lessons |
|
|
351
351
|
| Perspective Memory | Implemented P0/P1 | actors, actor cards, perspective observations, context-pack lanes, aggregate dashboard |
|
|
352
352
|
| Dashboard | Implemented | local-only default bind, optional password, vector/perspective/trace panels |
|
|
@@ -846,7 +846,8 @@ claude-memory-layer codex hooks status --project /path/to/project
|
|
|
846
846
|
claude-memory-layer codex hooks uninstall
|
|
847
847
|
```
|
|
848
848
|
|
|
849
|
-
- `SessionStart`: 해당 프로젝트의 core memory와 최근 작업
|
|
849
|
+
- `SessionStart`: 해당 프로젝트의 core memory와 최근 작업 메모리 인덱스를 Codex에 주입합니다. 일반 메모리는 제목·짧은 요약·`mem:` source ref·세션/턴 위치만 제공하며, 새 세션뿐 아니라 resume/clear/compact에도 적용됩니다.
|
|
850
|
+
- `UserPromptSubmit`: 질문마다 관련 메모리 인덱스를 검색합니다. Codex는 필요할 때만 `mem-source-ref`/`mem-details`로 원문을 확장하고, 실제로 사용한 경우에만 답변 끝에 `📎 Recalled memories: <title> ([mem:ID])`를 표시합니다.
|
|
850
851
|
- `SessionEnd`: 완료된 현재 transcript 하나만 별도 worker에 전달해 프로젝트 저장소로 적재합니다. Codex 종료, 대화 archive/delete, 또는 열려 있지 않은 대화의 30분 유휴 종료 시 실행됩니다.
|
|
851
852
|
- 자동 import는 콘텐츠 해시로 중복을 건너뛰며, embedding 계산은 hook 제한 시간 밖의 기존 vector worker가 처리합니다.
|
|
852
853
|
- `codex hooks status --project <path>`는 해당 프로젝트의 마지막 자동 import 성공/실패 시각과 집계 결과를 보여줍니다. transcript 본문은 상태 파일에 기록하지 않습니다.
|
package/dist/cli/index.js
CHANGED
|
@@ -25040,11 +25040,13 @@ function mergePluginHooksIntoSettings(settings, pluginPath) {
|
|
|
25040
25040
|
import * as path25 from "node:path";
|
|
25041
25041
|
var REQUIRED_CODEX_HOOK_FILES = [
|
|
25042
25042
|
"codex-session-start.js",
|
|
25043
|
+
"codex-user-prompt-submit.js",
|
|
25043
25044
|
"codex-session-end.js",
|
|
25044
25045
|
"codex-session-import-worker.js"
|
|
25045
25046
|
];
|
|
25046
25047
|
var CODEX_HOOK_FILES = {
|
|
25047
25048
|
SessionStart: "codex-session-start.js",
|
|
25049
|
+
UserPromptSubmit: "codex-user-prompt-submit.js",
|
|
25048
25050
|
SessionEnd: "codex-session-end.js"
|
|
25049
25051
|
};
|
|
25050
25052
|
function buildCodexHookCommand(pluginPath, fileName) {
|
|
@@ -25071,6 +25073,20 @@ function getCodexMemoryHooks(pluginPath) {
|
|
|
25071
25073
|
]
|
|
25072
25074
|
}
|
|
25073
25075
|
],
|
|
25076
|
+
UserPromptSubmit: [
|
|
25077
|
+
{
|
|
25078
|
+
hooks: [
|
|
25079
|
+
{
|
|
25080
|
+
type: "command",
|
|
25081
|
+
command: buildCodexHookCommand(pluginPath, CODEX_HOOK_FILES.UserPromptSubmit),
|
|
25082
|
+
commandWindows: buildCodexHookWindowsCommand(pluginPath, CODEX_HOOK_FILES.UserPromptSubmit),
|
|
25083
|
+
statusMessage: "Searching memory index",
|
|
25084
|
+
additionalContextLimit: 1800,
|
|
25085
|
+
timeout: 10
|
|
25086
|
+
}
|
|
25087
|
+
]
|
|
25088
|
+
}
|
|
25089
|
+
],
|
|
25074
25090
|
SessionEnd: [
|
|
25075
25091
|
{
|
|
25076
25092
|
hooks: [
|
|
@@ -27095,7 +27111,7 @@ async function runOperationCli(action, label) {
|
|
|
27095
27111
|
}
|
|
27096
27112
|
}
|
|
27097
27113
|
var program = new Command();
|
|
27098
|
-
program.name("claude-memory-layer").description("Claude Code Memory Plugin CLI").version("2.2.
|
|
27114
|
+
program.name("claude-memory-layer").description("Claude Code Memory Plugin CLI").version("2.2.8");
|
|
27099
27115
|
program.command("market-context").description("Fetch read-only DART/FRED/Finnhub context with structured MarketContextSnapshot bull/bear/risk/catalyst analysis").option("--company <name>", "Company name for DART fallback search and report subject").option("--dart-corp-code <code>", "Exact DART corp_code for issuer-specific filings").option("--symbol <ticker>", "Listed ticker for Finnhub company profile").option("--providers <list>", "Comma-separated providers: dart,fred,finnhub").option("--fred-series <list>", "Comma-separated FRED series IDs").option("--json", "Print structured JSON including analysis.marketSnapshot").option("--no-snapshot", "Disable MarketContextSnapshot and DART company snapshot analysis").action(async (options) => {
|
|
27100
27116
|
try {
|
|
27101
27117
|
await runMarketContextCommand(options);
|
|
@@ -28308,7 +28324,7 @@ program.command("list").description("List available Claude Code sessions").optio
|
|
|
28308
28324
|
});
|
|
28309
28325
|
var codexCmd = program.command("codex").description("Codex session import, validation, and lifecycle hook integration");
|
|
28310
28326
|
var codexHooksCmd = codexCmd.command("hooks").description("Manage Codex lifecycle hooks for automatic memory loading and ingestion");
|
|
28311
|
-
codexHooksCmd.command("install").description("Install Codex SessionStart and SessionEnd memory hooks").option("--path <path>", "Custom plugin path (defaults to auto-detect)").option("--config-path <path>", "Codex hooks config path (default: ~/.codex/hooks.json)").action(async (options) => {
|
|
28327
|
+
codexHooksCmd.command("install").description("Install Codex SessionStart, UserPromptSubmit, and SessionEnd memory hooks").option("--path <path>", "Custom plugin path (defaults to auto-detect)").option("--config-path <path>", "Codex hooks config path (default: ~/.codex/hooks.json)").action(async (options) => {
|
|
28312
28328
|
try {
|
|
28313
28329
|
const pluginPath = path33.resolve(options.path || getPluginPath());
|
|
28314
28330
|
const configPath = options.configPath || CODEX_HOOKS_PATH;
|
|
@@ -28319,7 +28335,8 @@ codexHooksCmd.command("install").description("Install Codex SessionStart and Ses
|
|
|
28319
28335
|
const config = loadCodexHooksConfig(configPath);
|
|
28320
28336
|
saveCodexHooksConfig(mergeCodexMemoryHooks(config, pluginPath), configPath);
|
|
28321
28337
|
console.log("\n\u2705 Codex automatic memory hooks installed!\n");
|
|
28322
|
-
console.log(" SessionStart: Load project memory
|
|
28338
|
+
console.log(" SessionStart: Load a compact project memory index");
|
|
28339
|
+
console.log(" UserPromptSubmit: Find question-specific memory refs and report sources actually used");
|
|
28323
28340
|
console.log(" SessionEnd: Import the completed Codex transcript");
|
|
28324
28341
|
console.log(` Config: ${configPath}`);
|
|
28325
28342
|
console.log(` Plugin path: ${pluginPath}`);
|
|
@@ -28335,10 +28352,12 @@ codexHooksCmd.command("status").description("Check Codex automatic memory hook s
|
|
|
28335
28352
|
const configPath = options.configPath || CODEX_HOOKS_PATH;
|
|
28336
28353
|
const config = loadCodexHooksConfig(configPath);
|
|
28337
28354
|
const sessionStart = hasCodexMemoryHook(config, "SessionStart", pluginPath);
|
|
28355
|
+
const userPromptSubmit = hasCodexMemoryHook(config, "UserPromptSubmit", pluginPath);
|
|
28338
28356
|
const sessionEnd = hasCodexMemoryHook(config, "SessionEnd", pluginPath);
|
|
28339
28357
|
const filesExist = REQUIRED_CODEX_HOOK_FILES.every((file) => fs23.existsSync(path33.join(pluginPath, "hooks", file)));
|
|
28340
28358
|
console.log("\n\u{1F9E0} Codex Automatic Memory Status\n");
|
|
28341
28359
|
console.log(` SessionStart: ${sessionStart ? "\u2705 Installed" : "\u274C Not installed"}`);
|
|
28360
|
+
console.log(` UserPromptSubmit: ${userPromptSubmit ? "\u2705 Installed" : "\u274C Not installed"}`);
|
|
28342
28361
|
console.log(` SessionEnd: ${sessionEnd ? "\u2705 Installed" : "\u274C Not installed"}`);
|
|
28343
28362
|
console.log(` Hook files: ${filesExist ? "\u2705 Found" : "\u274C Not found"}`);
|
|
28344
28363
|
console.log(` Config: ${configPath}`);
|
|
@@ -28349,7 +28368,7 @@ codexHooksCmd.command("status").description("Check Codex automatic memory hook s
|
|
|
28349
28368
|
} else {
|
|
28350
28369
|
console.log(" Last auto-import: \u2014 No recorded run for this project");
|
|
28351
28370
|
}
|
|
28352
|
-
if (sessionStart && sessionEnd && filesExist) {
|
|
28371
|
+
if (sessionStart && userPromptSubmit && sessionEnd && filesExist) {
|
|
28353
28372
|
console.log("\n\u2705 Automatic loading and ingestion are configured. Verify trust with /hooks in Codex.\n");
|
|
28354
28373
|
} else {
|
|
28355
28374
|
console.log('\n\u{1F4A1} Run "claude-memory-layer codex hooks install" to configure automatic memory.\n');
|