chat-recall 0.7.29 → 0.7.31
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 +0 -2
- package/dist/board-hooks.d.ts +7 -0
- package/dist/board-hooks.d.ts.map +1 -1
- package/dist/board-hooks.js +9 -3
- package/dist/board-hooks.js.map +1 -1
- package/dist/cli.js +3231 -2928
- package/dist/cli.js.map +1 -1
- package/dist/install-hooks.d.ts +3 -3
- package/dist/install-hooks.d.ts.map +1 -1
- package/dist/install-hooks.js +40 -14
- package/dist/install-hooks.js.map +1 -1
- package/dist/mcp-relay.js +1 -1
- package/dist/mcp.js +430 -149
- package/dist/message-hook.js +1 -1
- package/dist/watch.js +5 -6
- package/package.json +1 -1
- package/hooks/chat_recall_save_hook.sh +0 -260
package/README.md
CHANGED
|
@@ -234,8 +234,6 @@ After `--uninstall` the MCP server does not put them back.
|
|
|
234
234
|
|---|---|---|
|
|
235
235
|
| `SessionStart` | New session (`startup` / `clear`) | Injects the project-scoped wake-up bundle |
|
|
236
236
|
| `UserPromptSubmit` | When you type a prompt | Searches past sessions; if a similar one exists, injects "you've worked on this before" into the agent's context |
|
|
237
|
-
| `Stop` | After every assistant turn | Auto-saves topics, decisions, and tools to `~/.chat-recall/memory/` |
|
|
238
|
-
| `PreCompact` | Before Claude Code compacts context | Emergency save so nothing is lost to compaction |
|
|
239
237
|
| `SessionEnd` | When the session closes | Escalates the session's learnings in the background, so nothing is delayed |
|
|
240
238
|
| `SessionStart`, `UserPromptSubmit`, `Stop`, `SessionEnd` | Each turn | Messages between sessions: tells the session its id, delivers what waits for it, reports its state |
|
|
241
239
|
| `SessionStart`, `UserPromptSubmit`, `Stop` (background) | Until a message arrives | Waits for a message from another session and wakes this one, also when it is idle |
|
package/dist/board-hooks.d.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `timeout` of every command hook this module registers, in seconds.
|
|
3
|
+
* Claude Code applies 60 seconds to a command hook that has none. The value is
|
|
4
|
+
* written into settings.json so the bound is visible in the file.
|
|
5
|
+
*/
|
|
6
|
+
export declare const HOOK_TIMEOUT_SECONDS = 60;
|
|
1
7
|
type HookEntry = {
|
|
2
8
|
matcher: string;
|
|
3
9
|
hooks: Array<{
|
|
4
10
|
type: string;
|
|
5
11
|
command: string;
|
|
12
|
+
timeout?: number;
|
|
6
13
|
}>;
|
|
7
14
|
};
|
|
8
15
|
/** The two events the board loop needs, and the flag each one passes. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"board-hooks.d.ts","sourceRoot":"","sources":["../src/board-hooks.ts"],"names":[],"mappings":"AA0BA,KAAK,SAAS,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"board-hooks.d.ts","sourceRoot":"","sources":["../src/board-hooks.ts"],"names":[],"mappings":"AA0BA;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,KAAK,SAAS,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC;AAQxG,yEAAyE;AACzE,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAA;CAAE,CAGjF,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,CAEp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O,EAAE,MAAM,GAAG,MAAM,CAGvD;AAED,gEAAgE;AAChE,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAG/D"}
|
package/dist/board-hooks.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* The commands for the two board hooks and the message hook, on every
|
|
3
3
|
* platform. install-hooks.ts writes them into each profile's settings.json.
|
|
4
4
|
*
|
|
5
|
-
* The other
|
|
5
|
+
* The other four hooks are POSIX shell scripts, and `install-hooks` refuses to
|
|
6
6
|
* register any of them on Windows: Claude Code runs a hook command through
|
|
7
7
|
* cmd.exe, which cannot execute a `.sh`. Registering them there put an error on
|
|
8
8
|
* every interaction.
|
|
@@ -23,6 +23,12 @@
|
|
|
23
23
|
*/
|
|
24
24
|
import { existsSync } from 'node:fs';
|
|
25
25
|
import { join } from 'node:path';
|
|
26
|
+
/**
|
|
27
|
+
* The `timeout` of every command hook this module registers, in seconds.
|
|
28
|
+
* Claude Code applies 60 seconds to a command hook that has none. The value is
|
|
29
|
+
* written into settings.json so the bound is visible in the file.
|
|
30
|
+
*/
|
|
31
|
+
export const HOOK_TIMEOUT_SECONDS = 60;
|
|
26
32
|
/** The command string of a hook entry, or null for a malformed one. */
|
|
27
33
|
function entryCommand(entry) {
|
|
28
34
|
const cmd = entry?.hooks?.[0]?.command;
|
|
@@ -64,7 +70,7 @@ export function isBoardHookEntry(entry) {
|
|
|
64
70
|
export function boardHookEntries(execPath, cliEntry) {
|
|
65
71
|
return BOARD_HOOKS.map(({ event, mode }) => [
|
|
66
72
|
event,
|
|
67
|
-
{ matcher: '', hooks: [{ type: 'command', command: boardHookCommand(execPath, cliEntry, mode) }] },
|
|
73
|
+
{ matcher: '', hooks: [{ type: 'command', command: boardHookCommand(execPath, cliEntry, mode), timeout: HOOK_TIMEOUT_SECONDS }] },
|
|
68
74
|
]);
|
|
69
75
|
}
|
|
70
76
|
/**
|
|
@@ -121,7 +127,7 @@ export function messageHookEntries(execPath, hookEntry) {
|
|
|
121
127
|
const turn = messageHookCommand(execPath, hookEntry);
|
|
122
128
|
const waiter = messageHookCommand(execPath, hookEntry, true);
|
|
123
129
|
return [
|
|
124
|
-
...MESSAGE_HOOK_EVENTS.map((event) => [event, { matcher: '', hooks: [{ type: 'command', command: turn }] }]),
|
|
130
|
+
...MESSAGE_HOOK_EVENTS.map((event) => [event, { matcher: '', hooks: [{ type: 'command', command: turn, timeout: HOOK_TIMEOUT_SECONDS }] }]),
|
|
125
131
|
...MESSAGE_WAITER_EVENTS.map((event) => [event, {
|
|
126
132
|
matcher: '',
|
|
127
133
|
hooks: [{ type: 'command', command: waiter, asyncRewake: true, timeout: MESSAGE_WAITER_TIMEOUT_SECONDS }],
|
package/dist/board-hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"board-hooks.js","sourceRoot":"","sources":["../src/board-hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"board-hooks.js","sourceRoot":"","sources":["../src/board-hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAIvC,uEAAuE;AACvE,SAAS,YAAY,CAAC,KAAc;IAClC,MAAM,GAAG,GAAI,KAAkD,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC;IACrF,OAAO,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;AAC9C,CAAC;AAED,yEAAyE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