@namzu/sdk 63.1.0 → 64.1.0
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/CHANGELOG.md +96 -0
- package/dist/agents/QueryAgent.d.ts.map +1 -1
- package/dist/agents/QueryAgent.js +2 -1
- package/dist/agents/QueryAgent.js.map +1 -1
- package/dist/agents/file-definitions.d.ts +10 -0
- package/dist/agents/file-definitions.d.ts.map +1 -1
- package/dist/agents/file-definitions.js +10 -2
- package/dist/agents/file-definitions.js.map +1 -1
- package/dist/compaction/hooks.d.ts +57 -0
- package/dist/compaction/hooks.d.ts.map +1 -0
- package/dist/compaction/hooks.js +44 -0
- package/dist/compaction/hooks.js.map +1 -0
- package/dist/compaction/manual.d.ts +9 -0
- package/dist/compaction/manual.d.ts.map +1 -1
- package/dist/compaction/manual.js +74 -5
- package/dist/compaction/manual.js.map +1 -1
- package/dist/compaction/model-summary.d.ts +6 -0
- package/dist/compaction/model-summary.d.ts.map +1 -1
- package/dist/compaction/model-summary.js +13 -3
- package/dist/compaction/model-summary.js.map +1 -1
- package/dist/compaction/verifier.d.ts +8 -2
- package/dist/compaction/verifier.d.ts.map +1 -1
- package/dist/compaction/verifier.js +23 -7
- package/dist/compaction/verifier.js.map +1 -1
- package/dist/plugin/file-change-hooks.d.ts +53 -0
- package/dist/plugin/file-change-hooks.d.ts.map +1 -0
- package/dist/plugin/file-change-hooks.js +111 -0
- package/dist/plugin/file-change-hooks.js.map +1 -0
- package/dist/plugin/file-change-watch.d.ts +111 -0
- package/dist/plugin/file-change-watch.d.ts.map +1 -0
- package/dist/plugin/file-change-watch.js +324 -0
- package/dist/plugin/file-change-watch.js.map +1 -0
- package/dist/plugin/hook-context.d.ts +16 -0
- package/dist/plugin/hook-context.d.ts.map +1 -1
- package/dist/plugin/hook-context.js +40 -0
- package/dist/plugin/hook-context.js.map +1 -1
- package/dist/plugin/index.d.ts +14 -4
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/index.js +10 -3
- package/dist/plugin/index.js.map +1 -1
- package/dist/plugin/lifecycle.d.ts +60 -1
- package/dist/plugin/lifecycle.d.ts.map +1 -1
- package/dist/plugin/lifecycle.js +118 -7
- package/dist/plugin/lifecycle.js.map +1 -1
- package/dist/plugin/loader.d.ts.map +1 -1
- package/dist/plugin/loader.js +24 -1
- package/dist/plugin/loader.js.map +1 -1
- package/dist/plugin/session-hook-env.d.ts +140 -0
- package/dist/plugin/session-hook-env.d.ts.map +1 -0
- package/dist/plugin/session-hook-env.js +458 -0
- package/dist/plugin/session-hook-env.js.map +1 -0
- package/dist/plugin/shell-hook-command.d.ts +25 -0
- package/dist/plugin/shell-hook-command.d.ts.map +1 -0
- package/dist/plugin/shell-hook-command.js +218 -0
- package/dist/plugin/shell-hook-command.js.map +1 -0
- package/dist/plugin/shell-hook-env.d.ts +107 -0
- package/dist/plugin/shell-hook-env.d.ts.map +1 -0
- package/dist/plugin/shell-hook-env.js +272 -0
- package/dist/plugin/shell-hook-env.js.map +1 -0
- package/dist/plugin/shell-hook-tool-names.d.ts +20 -0
- package/dist/plugin/shell-hook-tool-names.d.ts.map +1 -0
- package/dist/plugin/shell-hook-tool-names.js +43 -0
- package/dist/plugin/shell-hook-tool-names.js.map +1 -0
- package/dist/plugin/shell-hook.d.ts +167 -22
- package/dist/plugin/shell-hook.d.ts.map +1 -1
- package/dist/plugin/shell-hook.js +651 -106
- package/dist/plugin/shell-hook.js.map +1 -1
- package/dist/plugin/worktree-hook-answer.d.ts +26 -0
- package/dist/plugin/worktree-hook-answer.d.ts.map +1 -0
- package/dist/plugin/worktree-hook-answer.js +132 -0
- package/dist/plugin/worktree-hook-answer.js.map +1 -0
- package/dist/public-runtime.d.ts +5 -3
- package/dist/public-runtime.d.ts.map +1 -1
- package/dist/public-runtime.js +4 -3
- package/dist/public-runtime.js.map +1 -1
- package/dist/public-types.d.ts +9 -2
- package/dist/public-types.d.ts.map +1 -1
- package/dist/runtime/query/compact-session.d.ts +7 -1
- package/dist/runtime/query/compact-session.d.ts.map +1 -1
- package/dist/runtime/query/compact-session.js +8 -3
- package/dist/runtime/query/compact-session.js.map +1 -1
- package/dist/runtime/query/executor/tool-call-admission.d.ts +1 -1
- package/dist/runtime/query/executor/tool-call-admission.d.ts.map +1 -1
- package/dist/runtime/query/executor/tool-call-admission.js +4 -3
- package/dist/runtime/query/executor/tool-call-admission.js.map +1 -1
- package/dist/runtime/query/executor.d.ts +5 -0
- package/dist/runtime/query/executor.d.ts.map +1 -1
- package/dist/runtime/query/executor.js +8 -3
- package/dist/runtime/query/executor.js.map +1 -1
- package/dist/runtime/query/finalize-turn.d.ts.map +1 -1
- package/dist/runtime/query/finalize-turn.js +9 -2
- package/dist/runtime/query/finalize-turn.js.map +1 -1
- package/dist/runtime/query/index.d.ts +9 -0
- package/dist/runtime/query/index.d.ts.map +1 -1
- package/dist/runtime/query/index.js +3 -0
- package/dist/runtime/query/index.js.map +1 -1
- package/dist/runtime/query/iteration/index.d.ts.map +1 -1
- package/dist/runtime/query/iteration/index.js +2 -1
- package/dist/runtime/query/iteration/index.js.map +1 -1
- package/dist/runtime/query/iteration/phases/compaction.d.ts.map +1 -1
- package/dist/runtime/query/iteration/phases/compaction.js +24 -12
- package/dist/runtime/query/iteration/phases/compaction.js.map +1 -1
- package/dist/runtime/query/iteration/phases/tool-review.d.ts.map +1 -1
- package/dist/runtime/query/iteration/phases/tool-review.js +2 -0
- package/dist/runtime/query/iteration/phases/tool-review.js.map +1 -1
- package/dist/runtime/query/plugin-hooks.d.ts +13 -0
- package/dist/runtime/query/plugin-hooks.d.ts.map +1 -1
- package/dist/runtime/query/plugin-hooks.js +29 -2
- package/dist/runtime/query/plugin-hooks.js.map +1 -1
- package/dist/runtime/query/tooling.d.ts +5 -0
- package/dist/runtime/query/tooling.d.ts.map +1 -1
- package/dist/runtime/query/tooling.js +3 -0
- package/dist/runtime/query/tooling.js.map +1 -1
- package/dist/session/workspace/hooked-driver.d.ts +72 -0
- package/dist/session/workspace/hooked-driver.d.ts.map +1 -0
- package/dist/session/workspace/hooked-driver.js +204 -0
- package/dist/session/workspace/hooked-driver.js.map +1 -0
- package/dist/session/workspace/index.d.ts +2 -0
- package/dist/session/workspace/index.d.ts.map +1 -1
- package/dist/session/workspace/index.js +1 -0
- package/dist/session/workspace/index.js.map +1 -1
- package/dist/skills/index.d.ts +1 -1
- package/dist/skills/index.d.ts.map +1 -1
- package/dist/skills/index.js +1 -1
- package/dist/skills/index.js.map +1 -1
- package/dist/skills/loader.d.ts +22 -0
- package/dist/skills/loader.d.ts.map +1 -1
- package/dist/skills/loader.js +41 -0
- package/dist/skills/loader.js.map +1 -1
- package/dist/tools/builtins/bash-cwd.d.ts +6 -1
- package/dist/tools/builtins/bash-cwd.d.ts.map +1 -1
- package/dist/tools/builtins/bash-cwd.js +27 -2
- package/dist/tools/builtins/bash-cwd.js.map +1 -1
- package/dist/tools/builtins/bash.js +1 -1
- package/dist/tools/builtins/bash.js.map +1 -1
- package/dist/tools/builtins/skill.d.ts.map +1 -1
- package/dist/tools/builtins/skill.js +93 -16
- package/dist/tools/builtins/skill.js.map +1 -1
- package/dist/types/agent/query.d.ts +8 -0
- package/dist/types/agent/query.d.ts.map +1 -1
- package/dist/types/plugin/index.d.ts +130 -13
- package/dist/types/plugin/index.d.ts.map +1 -1
- package/dist/types/plugin/index.js +5 -0
- package/dist/types/plugin/index.js.map +1 -1
- package/dist/types/skills/index.d.ts +8 -0
- package/dist/types/skills/index.d.ts.map +1 -1
- package/dist/types/skills/index.js.map +1 -1
- package/dist/types/tool/index.d.ts +68 -0
- package/dist/types/tool/index.d.ts.map +1 -1
- package/dist/types/tool/index.js.map +1 -1
- package/dist/types/workspace/ref.d.ts +6 -0
- package/dist/types/workspace/ref.d.ts.map +1 -1
- package/dist/utils/frontmatter.d.ts +16 -0
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js +31 -1
- package/dist/utils/frontmatter.js.map +1 -1
- package/package.json +1 -1
- package/src/agents/QueryAgent.ts +2 -1
- package/src/agents/file-definitions.ts +17 -2
- package/src/compaction/hooks.ts +104 -0
- package/src/compaction/manual.ts +117 -4
- package/src/compaction/model-summary.ts +19 -3
- package/src/compaction/verifier.ts +33 -3
- package/src/plugin/file-change-hooks.ts +131 -0
- package/src/plugin/file-change-watch.ts +367 -0
- package/src/plugin/hook-context.ts +46 -0
- package/src/plugin/index.ts +53 -1
- package/src/plugin/lifecycle.ts +162 -8
- package/src/plugin/loader.ts +22 -1
- package/src/plugin/session-hook-env.ts +475 -0
- package/src/plugin/shell-hook-command.ts +215 -0
- package/src/plugin/shell-hook-env.ts +335 -0
- package/src/plugin/shell-hook-tool-names.ts +46 -0
- package/src/plugin/shell-hook.ts +818 -100
- package/src/plugin/worktree-hook-answer.ts +142 -0
- package/src/public-runtime.ts +44 -0
- package/src/public-types.ts +22 -1
- package/src/runtime/query/compact-session.ts +16 -4
- package/src/runtime/query/executor/tool-call-admission.ts +10 -2
- package/src/runtime/query/executor.ts +13 -2
- package/src/runtime/query/finalize-turn.ts +9 -2
- package/src/runtime/query/index.ts +12 -0
- package/src/runtime/query/iteration/index.ts +2 -1
- package/src/runtime/query/iteration/phases/compaction.ts +31 -12
- package/src/runtime/query/iteration/phases/tool-review.ts +2 -0
- package/src/runtime/query/plugin-hooks.ts +32 -2
- package/src/runtime/query/tooling.ts +8 -0
- package/src/session/workspace/hooked-driver.ts +272 -0
- package/src/session/workspace/index.ts +7 -0
- package/src/skills/index.ts +3 -0
- package/src/skills/loader.ts +47 -0
- package/src/tools/builtins/bash-cwd.ts +25 -1
- package/src/tools/builtins/bash.ts +1 -1
- package/src/tools/builtins/skill.ts +115 -26
- package/src/types/agent/query.ts +9 -0
- package/src/types/plugin/index.ts +150 -23
- package/src/types/skills/index.ts +9 -0
- package/src/types/tool/index.ts +74 -0
- package/src/types/workspace/ref.ts +6 -0
- package/src/utils/frontmatter.ts +52 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The names a shell hook may be sent for a tool.
|
|
3
|
+
*
|
|
4
|
+
* A hook sees the tool's own name (`bash`, `web_fetch`) unless its entry asks
|
|
5
|
+
* for the written one (`toolNames: 'written'`), the capitalised name a person
|
|
6
|
+
* writes in a matcher for that tool (`Bash`, `WebFetch`). An entry read from
|
|
7
|
+
* the common hook contract asks for it by default.
|
|
8
|
+
*
|
|
9
|
+
* ONE table, from the name a tool is registered under to its written name.
|
|
10
|
+
* A tool with no common name is not in it and keeps its own; a tool-server
|
|
11
|
+
* tool (`mcp__<server>__<tool>`) is never in it. The table is documented in
|
|
12
|
+
* `docs/sdk/hooks.md`, and a test holds the two equal.
|
|
13
|
+
*/
|
|
14
|
+
/** Which spelling of a tool's name an entry receives. */
|
|
15
|
+
export type ShellHookToolNames = 'namzu' | 'written';
|
|
16
|
+
/** Our tool name to the name written for it. Every key is lower case. */
|
|
17
|
+
export declare const SHELL_HOOK_WRITTEN_TOOL_NAMES: Readonly<Record<string, string>>;
|
|
18
|
+
/** The name a hook is sent for `toolName` under the entry's `toolNames`. */
|
|
19
|
+
export declare function shellHookToolName(toolName: string, mode: ShellHookToolNames | undefined): string;
|
|
20
|
+
//# sourceMappingURL=shell-hook-tool-names.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-hook-tool-names.d.ts","sourceRoot":"","sources":["../../src/plugin/shell-hook-tool-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,yDAAyD;AACzD,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,SAAS,CAAA;AAEpD,yEAAyE;AACzE,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAmBzE,CAAA;AAEF,4EAA4E;AAC5E,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,GAAG,SAAS,GAAG,MAAM,CAKhG"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The names a shell hook may be sent for a tool.
|
|
3
|
+
*
|
|
4
|
+
* A hook sees the tool's own name (`bash`, `web_fetch`) unless its entry asks
|
|
5
|
+
* for the written one (`toolNames: 'written'`), the capitalised name a person
|
|
6
|
+
* writes in a matcher for that tool (`Bash`, `WebFetch`). An entry read from
|
|
7
|
+
* the common hook contract asks for it by default.
|
|
8
|
+
*
|
|
9
|
+
* ONE table, from the name a tool is registered under to its written name.
|
|
10
|
+
* A tool with no common name is not in it and keeps its own; a tool-server
|
|
11
|
+
* tool (`mcp__<server>__<tool>`) is never in it. The table is documented in
|
|
12
|
+
* `docs/sdk/hooks.md`, and a test holds the two equal.
|
|
13
|
+
*/
|
|
14
|
+
/** Our tool name to the name written for it. Every key is lower case. */
|
|
15
|
+
export const SHELL_HOOK_WRITTEN_TOOL_NAMES = Object.freeze({
|
|
16
|
+
Agent: 'Agent',
|
|
17
|
+
ask_user_question: 'AskUserQuestion',
|
|
18
|
+
bash: 'Bash',
|
|
19
|
+
edit: 'Edit',
|
|
20
|
+
glob: 'Glob',
|
|
21
|
+
grep: 'Grep',
|
|
22
|
+
ls: 'LS',
|
|
23
|
+
lsp: 'LSP',
|
|
24
|
+
monitor: 'Monitor',
|
|
25
|
+
read: 'Read',
|
|
26
|
+
search_tools: 'ToolSearch',
|
|
27
|
+
skill: 'Skill',
|
|
28
|
+
task_create: 'TaskCreate',
|
|
29
|
+
task_list: 'TaskList',
|
|
30
|
+
task_update: 'TaskUpdate',
|
|
31
|
+
web_fetch: 'WebFetch',
|
|
32
|
+
web_search: 'WebSearch',
|
|
33
|
+
write: 'Write',
|
|
34
|
+
});
|
|
35
|
+
/** The name a hook is sent for `toolName` under the entry's `toolNames`. */
|
|
36
|
+
export function shellHookToolName(toolName, mode) {
|
|
37
|
+
if (mode !== 'written')
|
|
38
|
+
return toolName;
|
|
39
|
+
return Object.hasOwn(SHELL_HOOK_WRITTEN_TOOL_NAMES, toolName)
|
|
40
|
+
? SHELL_HOOK_WRITTEN_TOOL_NAMES[toolName]
|
|
41
|
+
: toolName;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=shell-hook-tool-names.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-hook-tool-names.js","sourceRoot":"","sources":["../../src/plugin/shell-hook-tool-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,yEAAyE;AACzE,MAAM,CAAC,MAAM,6BAA6B,GAAqC,MAAM,CAAC,MAAM,CAAC;IAC5F,KAAK,EAAE,OAAO;IACd,iBAAiB,EAAE,iBAAiB;IACpC,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,EAAE,EAAE,IAAI;IACR,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;IACZ,YAAY,EAAE,YAAY;IAC1B,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,YAAY;IACzB,SAAS,EAAE,UAAU;IACrB,WAAW,EAAE,YAAY;IACzB,SAAS,EAAE,UAAU;IACrB,UAAU,EAAE,WAAW;IACvB,KAAK,EAAE,OAAO;CACd,CAAC,CAAA;AAEF,4EAA4E;AAC5E,MAAM,UAAU,iBAAiB,CAAC,QAAgB,EAAE,IAAoC;IACvF,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,QAAQ,CAAA;IACvC,OAAO,MAAM,CAAC,MAAM,CAAC,6BAA6B,EAAE,QAAQ,CAAC;QAC5D,CAAC,CAAE,6BAA6B,CAAC,QAAQ,CAAY;QACrD,CAAC,CAAC,QAAQ,CAAA;AACZ,CAAC"}
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
* same facts as `NAMZU_HOOK_EVENT`, `NAMZU_SESSION_ID`, `NAMZU_TURN_ID`,
|
|
25
25
|
* `NAMZU_TOOL_NAME` and, when the input names a file, `NAMZU_TOOL_PATH`;
|
|
26
26
|
* `NAMZU_PROJECT_DIR` is the folder the session was started for.
|
|
27
|
-
* `session_start` also sends `source` (`startup` or `
|
|
28
|
-
* `reason` (`exit` or `
|
|
27
|
+
* `session_start` also sends `source` (`startup`, `resume` or `clear`) and
|
|
28
|
+
* `session_end` `reason` (`exit`, `replaced` or `clear`).
|
|
29
29
|
*
|
|
30
30
|
* `session_start` and `session_end` run outside any turn, so they carry no
|
|
31
31
|
* `turn_id` on stdin and no `NAMZU_TURN_ID` in the environment — not even
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
* stdout. The exit codes:
|
|
37
37
|
*
|
|
38
38
|
* - `0` — carry on. On `user_prompt_submit`, `subagent_start` and
|
|
39
|
-
* `session_start`, plain (non-JSON) stdout becomes context for the model
|
|
39
|
+
* `session_start`, plain (non-JSON) stdout becomes context for the model;
|
|
40
|
+
* on `pre_compact` it is instructions for the summariser.
|
|
40
41
|
* - `2` — **block**, read per event: before a tool (`pre_tool_use`) the call is
|
|
41
42
|
* skipped and the model is told why, with the hook's stderr as the reason;
|
|
42
43
|
* on `user_prompt_submit` the turn ends; on `turn_end` and `subagent_stop`
|
|
@@ -104,15 +105,18 @@
|
|
|
104
105
|
* and does not block: one that could not answer in time has not answered no.
|
|
105
106
|
*/
|
|
106
107
|
import type { PluginId } from '../types/ids/index.js';
|
|
107
|
-
import type { PluginCompactionInfo, PluginHookDefinition, PluginHookEvent, PluginHookResult, PluginNotificationInfo, PluginToolBatchCall } from '../types/plugin/index.js';
|
|
108
|
+
import type { PluginCompactionInfo, PluginFileChange, PluginHookDefinition, PluginHookEvent, PluginHookResult, PluginNotificationInfo, PluginToolBatchCall } from '../types/plugin/index.js';
|
|
108
109
|
import type { Logger } from '../utils/logger.js';
|
|
109
110
|
import type { PluginLifecycleManager } from './lifecycle.js';
|
|
111
|
+
import type { SessionHookEnv } from './session-hook-env.js';
|
|
112
|
+
import { type PluginFolders } from './shell-hook-env.js';
|
|
113
|
+
import { type ShellHookToolNames } from './shell-hook-tool-names.js';
|
|
110
114
|
/**
|
|
111
115
|
* The events a shell hook may attach to: the ones an operator can act on
|
|
112
116
|
* from a script. The model-call and iteration events stay in-process —
|
|
113
117
|
* they carry the messages, and a shell is not where those go.
|
|
114
118
|
*/
|
|
115
|
-
export type ShellHookEvent = Extract<PluginHookEvent, 'user_prompt_submit' | 'session_start' | 'session_end' | 'pre_tool_use' | 'post_tool_use' | 'post_tool_use_failure' | 'permission_request' | 'notification' | 'pre_compact' | 'post_compact' | 'subagent_start' | 'subagent_stop' | 'post_tool_batch' | 'permission_denied' | 'turn_failure' | 'turn_start' | 'turn_end'>;
|
|
119
|
+
export type ShellHookEvent = Extract<PluginHookEvent, 'user_prompt_submit' | 'session_start' | 'session_end' | 'pre_tool_use' | 'post_tool_use' | 'post_tool_use_failure' | 'permission_request' | 'notification' | 'pre_compact' | 'post_compact' | 'subagent_start' | 'subagent_stop' | 'post_tool_batch' | 'permission_denied' | 'turn_failure' | 'turn_start' | 'turn_end' | 'file_changed' | 'cwd_changed' | 'worktree_create' | 'worktree_remove'>;
|
|
116
120
|
export declare const SHELL_HOOK_EVENTS: readonly ShellHookEvent[];
|
|
117
121
|
/** What a failed hook does to the action it guards. */
|
|
118
122
|
export type ShellHookOnFailure = 'continue' | 'block';
|
|
@@ -158,6 +162,15 @@ interface ShellHookEntryBase {
|
|
|
158
162
|
* here are the same entry.
|
|
159
163
|
*/
|
|
160
164
|
readonly source?: string;
|
|
165
|
+
/**
|
|
166
|
+
* Which spelling of a tool's name the hook is sent as `tool_name` (and
|
|
167
|
+
* `NAMZU_TOOL_NAME`): `namzu`, the name the tool is registered under
|
|
168
|
+
* (`bash`; the default), or `written`, the capitalised name a person writes
|
|
169
|
+
* in a matcher (`Bash`). A tool with no written name, and every tool-server
|
|
170
|
+
* tool, keeps its own. `matcher` and `if` read either spelling whatever this
|
|
171
|
+
* says. An entry read from the common hook contract is `written`.
|
|
172
|
+
*/
|
|
173
|
+
readonly toolNames?: ShellHookToolNames;
|
|
161
174
|
}
|
|
162
175
|
/** One shell command at one event. */
|
|
163
176
|
export interface ShellHookEntry extends ShellHookEntryBase {
|
|
@@ -173,6 +186,15 @@ export interface ShellHookEntry extends ShellHookEntryBase {
|
|
|
173
186
|
* parser. An empty list runs `command` with no arguments.
|
|
174
187
|
*/
|
|
175
188
|
readonly args?: readonly string[];
|
|
189
|
+
/**
|
|
190
|
+
* Variables the command is started with, in addition to the ones Namzu sets
|
|
191
|
+
* for every hook. A value may use `$NAME` or `${NAME}` of a variable the
|
|
192
|
+
* hook already has (`${NAMZU_PROJECT_DIR}`); text it cannot fill stays as
|
|
193
|
+
* written. A name Namzu sets itself (`NAMZU_HOOK_EVENT` and the rest) cannot
|
|
194
|
+
* be replaced. For a script that reads a variable inside its own file, which
|
|
195
|
+
* no rule reading the command text can see.
|
|
196
|
+
*/
|
|
197
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
176
198
|
/**
|
|
177
199
|
* Start the command and carry on without waiting. Its exit code and output
|
|
178
200
|
* decide nothing (a failure is logged), and `onFailure` is not read.
|
|
@@ -217,21 +239,26 @@ export declare const MAX_SHELL_HOOK_TIMEOUT_MS: number;
|
|
|
217
239
|
* Empty or `*` matches everything. A list of names separated by `|` or `,`
|
|
218
240
|
* matches exactly, each part optionally ending in `*` as a prefix (the
|
|
219
241
|
* spelling this adapter has always taken). Anything else is a regular
|
|
220
|
-
* expression, tested unanchored against the name
|
|
221
|
-
* matches
|
|
222
|
-
*
|
|
242
|
+
* expression, tested unanchored against the name. This function called with no
|
|
243
|
+
* name matches only `*`; a hook on an event that has no name (`turn_end`)
|
|
244
|
+
* ignores its matcher and fires (see `createShellHook`).
|
|
245
|
+
*
|
|
246
|
+
* A text that reads both ways (it is a list, and it holds a `.*`
|
|
247
|
+
* that a regular expression reads differently: `Bash.*`,
|
|
248
|
+
* `mcp__.*__search`) fires when either reading matches. A pattern that does
|
|
249
|
+
* not compile cannot be read, and a guard that silently matches nothing is
|
|
250
|
+
* the failure to avoid, so it matches every name; `/hooks` and
|
|
251
|
+
* `namzu doctor` say that it cannot be read (`shellHookMatcherProblem`).
|
|
223
252
|
*
|
|
224
253
|
* Names in a list compare without regard to case. With `tool: true` (the
|
|
225
254
|
* event's name is a tool: the tool events and `permission_request`) they also
|
|
226
|
-
* take the names skills write, the way an entry's `if` does
|
|
227
|
-
*
|
|
228
|
-
*
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
* A list part ending in `.*` is also tried as a regular expression.
|
|
255
|
+
* take the names skills write, the way an entry's `if` does, and a tool name
|
|
256
|
+
* compares without its `_` and `-`: `Bash` matches the tool `bash`,
|
|
257
|
+
* `MultiEdit` matches `edit`, `ViewImage` matches `view_image`, `Task` and
|
|
258
|
+
* `Agent` match the sub-agent tool `Agent`, and a prefix such as `Web*`
|
|
259
|
+
* matches `web_fetch`. Where the name is not a tool (a notification's type,
|
|
260
|
+
* an agent's name, a session's `source` or `reason`) no tool alias applies,
|
|
261
|
+
* since those words are not tool names; case is still ignored there.
|
|
235
262
|
*
|
|
236
263
|
* A regular expression is tested, case-sensitively as written, against the
|
|
237
264
|
* real name and, with `tool: true`, against each name skills write for that
|
|
@@ -241,12 +268,45 @@ export declare const MAX_SHELL_HOOK_TIMEOUT_MS: number;
|
|
|
241
268
|
export declare function shellHookMatches(matcher: string | undefined, toolName: string | undefined, options?: {
|
|
242
269
|
readonly tool?: boolean;
|
|
243
270
|
}): boolean;
|
|
271
|
+
/**
|
|
272
|
+
* Why a `matcher` cannot be read, or `undefined` when it can. A matcher that
|
|
273
|
+
* is not a list of names and does not compile as a regular expression fires
|
|
274
|
+
* for every name (see {@link shellHookMatches}).
|
|
275
|
+
*/
|
|
276
|
+
export declare function shellHookMatcherProblem(matcher: string | undefined): string | undefined;
|
|
277
|
+
/**
|
|
278
|
+
* The files a `file_changed` matcher names: each part of a `|` list that is a
|
|
279
|
+
* path with no `*` in it (`.envrc`, `config/app.json`, `/etc/hosts`). A part
|
|
280
|
+
* with a `*`, a pattern, or no matcher names no file; the hook then runs only
|
|
281
|
+
* for the files hooks hand back with `watchPaths`. A relative path is under
|
|
282
|
+
* the working folder, which the host knows.
|
|
283
|
+
*/
|
|
284
|
+
export declare function fileChangedMatcherPaths(matcher: string | undefined): string[];
|
|
285
|
+
/**
|
|
286
|
+
* Whether a `file_changed` hook with this matcher runs for `filePath`. The
|
|
287
|
+
* matcher is read as every matcher is, but against the file's base name: a
|
|
288
|
+
* part written as a path (`config/app.json`) stands for its base name
|
|
289
|
+
* (`app.json`). An unreadable pattern runs the hook.
|
|
290
|
+
*/
|
|
291
|
+
export declare function fileChangedMatches(matcher: string | undefined, filePath: string | undefined): boolean;
|
|
292
|
+
/**
|
|
293
|
+
* What a `file_changed` entry's matcher does not do, or `undefined`: a matcher
|
|
294
|
+
* that names no file watches nothing by itself.
|
|
295
|
+
*/
|
|
296
|
+
export declare function fileChangedMatcherNote(matcher: string | undefined): string | undefined;
|
|
297
|
+
/**
|
|
298
|
+
* Why an `if` cannot be read, or `undefined` when it can. A filter that
|
|
299
|
+
* cannot be read runs the hook.
|
|
300
|
+
*/
|
|
301
|
+
export declare function shellHookIfProblem(filter: string | undefined): string | undefined;
|
|
244
302
|
/**
|
|
245
303
|
* A hook's `if` against one tool call: `Tool` or `Tool(pattern)`. The tool
|
|
246
|
-
* part
|
|
247
|
-
* `Read`)
|
|
248
|
-
*
|
|
249
|
-
*
|
|
304
|
+
* part takes every spelling a `matcher` takes as a list: names skills write
|
|
305
|
+
* (`Bash`, `Read`, `Agent`), separated by `|` or `,`, a prefix ending in `*`,
|
|
306
|
+
* case ignored; a regular expression is not read here (use `matcher`). A
|
|
307
|
+
* pattern is matched against a shell tool's command line (one command at a
|
|
308
|
+
* time) or, for a file tool, a path the host reads; for a tool with neither
|
|
309
|
+
* the filter cannot be read, which runs the hook.
|
|
250
310
|
*/
|
|
251
311
|
export declare function shellHookIfMatches(filter: string | undefined, toolName: string | undefined, toolInput: unknown, pathFilter?: ShellHookPathFilter): boolean;
|
|
252
312
|
/**
|
|
@@ -267,6 +327,8 @@ export interface ShellHookOutcome {
|
|
|
267
327
|
readonly stdoutTruncated?: boolean;
|
|
268
328
|
/** Set when the process could not be started at all. */
|
|
269
329
|
readonly spawnError?: string;
|
|
330
|
+
/** The variables the command refers to that were set nowhere; read when the command was not found. */
|
|
331
|
+
readonly unsetVariables?: readonly string[];
|
|
270
332
|
}
|
|
271
333
|
export interface ShellHookInput {
|
|
272
334
|
readonly event: ShellHookEvent;
|
|
@@ -281,6 +343,12 @@ export interface ShellHookInput {
|
|
|
281
343
|
readonly endReason?: string;
|
|
282
344
|
/** The folder the session was started for. Sent as `NAMZU_PROJECT_DIR`; absent, `cwd`. */
|
|
283
345
|
readonly projectDir?: string;
|
|
346
|
+
/**
|
|
347
|
+
* Set for a hook entry a plugin ships: the plugin's own folder and the folder
|
|
348
|
+
* kept for its data. Sent as `NAMZU_PLUGIN_ROOT` and `NAMZU_PLUGIN_DATA`, and
|
|
349
|
+
* put in the command and arguments where they name them.
|
|
350
|
+
*/
|
|
351
|
+
readonly plugin?: PluginFolders;
|
|
284
352
|
/** The delegating session, on `subagent_start` and `subagent_stop`. */
|
|
285
353
|
readonly parentSessionId?: string;
|
|
286
354
|
/** The parent turn whose tool call spawned the child, on `subagent_start` and `subagent_stop`. */
|
|
@@ -288,8 +356,32 @@ export interface ShellHookInput {
|
|
|
288
356
|
/** The agent the child runs, on `subagent_start` and `subagent_stop`. */
|
|
289
357
|
readonly agentType?: string;
|
|
290
358
|
readonly prompt?: string;
|
|
359
|
+
/** On `file_changed`: the file, absolute. Sent as `file_path`. */
|
|
360
|
+
readonly filePath?: string;
|
|
361
|
+
/** On `file_changed`: what happened to it. Sent as `change`. */
|
|
362
|
+
readonly change?: PluginFileChange;
|
|
363
|
+
/** On `cwd_changed`: the folder left and the folder entered. Sent as `old_cwd` and `new_cwd`. */
|
|
364
|
+
readonly oldCwd?: string;
|
|
365
|
+
readonly newCwd?: string;
|
|
366
|
+
/** On `worktree_create`: the suggested name. Sent as `name`. */
|
|
367
|
+
readonly worktreeName?: string;
|
|
368
|
+
/** On `worktree_create`: where a relative path is placed. Sent as `worktree_root`. */
|
|
369
|
+
readonly worktreeRoot?: string;
|
|
370
|
+
/** On `worktree_create`: the commit or branch asked for, when one was. Sent as `base_ref`. */
|
|
371
|
+
readonly worktreeBaseRef?: string;
|
|
372
|
+
/** On `worktree_remove`: the worktree. Sent as `worktree_path`. */
|
|
373
|
+
readonly worktreePath?: string;
|
|
374
|
+
/**
|
|
375
|
+
* The file this hook may append `export NAME=value` lines to. Sent as
|
|
376
|
+
* `NAMZU_ENV_FILE`; on every other event the variable is not set at all.
|
|
377
|
+
*/
|
|
378
|
+
readonly envFile?: string;
|
|
291
379
|
readonly compaction?: PluginCompactionInfo;
|
|
292
380
|
readonly toolName?: string;
|
|
381
|
+
/** The spelling `toolName` (and each `toolCalls` name) is sent in; absent is `namzu`. */
|
|
382
|
+
readonly toolNames?: ShellHookToolNames;
|
|
383
|
+
/** The call's id, on the single-call tool events. Sent as `tool_use_id`. */
|
|
384
|
+
readonly toolCallId?: string;
|
|
293
385
|
readonly toolInput?: unknown;
|
|
294
386
|
readonly toolResult?: {
|
|
295
387
|
readonly success: boolean;
|
|
@@ -306,21 +398,38 @@ export interface ShellHookInput {
|
|
|
306
398
|
readonly notification?: PluginNotificationInfo;
|
|
307
399
|
/** On `turn_end` and `subagent_stop`: an earlier answer already kept this turn going. */
|
|
308
400
|
readonly stopHookActive?: boolean;
|
|
401
|
+
/** On `turn_end` and `subagent_stop`: the model's last message of the turn. Sent as `last_assistant_message`. */
|
|
402
|
+
readonly lastAssistantMessage?: string;
|
|
309
403
|
/** The session's transcript file, when the host has one. Sent as `transcript_path`. */
|
|
310
404
|
readonly transcriptPath?: string;
|
|
311
405
|
/** How tool calls are being decided right now. Sent as `permission_mode`. */
|
|
312
406
|
readonly permissionMode?: string;
|
|
407
|
+
/**
|
|
408
|
+
* Variables added to a command's environment, under the ones the kernel sets
|
|
409
|
+
* for every hook (`NAMZU_HOOK_EVENT` and the rest, which these never
|
|
410
|
+
* replace). Not part of the JSON the hook reads.
|
|
411
|
+
*/
|
|
412
|
+
readonly extraEnv?: Readonly<Record<string, string>>;
|
|
413
|
+
/** The skill's folder, when the hook came from a skill; see {@link ShellHookOptions.skillRoot}. */
|
|
414
|
+
readonly skillRoot?: string;
|
|
313
415
|
}
|
|
314
416
|
/** The JSON a hook receives on stdin (or as an HTTP body). */
|
|
315
417
|
export declare function shellHookPayload(input: ShellHookInput): string;
|
|
316
418
|
/** Run one hook command to completion, bounded by its deadline and capture. */
|
|
317
419
|
export declare function runShellHook(entry: ShellHookEntry, input: ShellHookInput, signal?: AbortSignal): Promise<ShellHookOutcome>;
|
|
420
|
+
/** The PascalCase spelling of each event name, which a hook's JSON may use. */
|
|
421
|
+
export declare const SHELL_HOOK_PASCAL_EVENT_NAMES: Readonly<Partial<Record<ShellHookEvent, string>>>;
|
|
422
|
+
/** The tool tied to an answer: what a rewrite or a replacement is read against. */
|
|
423
|
+
export interface ShellHookCall {
|
|
424
|
+
readonly toolName?: string;
|
|
425
|
+
readonly toolInput?: unknown;
|
|
426
|
+
}
|
|
318
427
|
/**
|
|
319
428
|
* The verdict, from the outcome and the event. Pure apart from the logger,
|
|
320
429
|
* so the mapping — the part that decides what the model is told — is
|
|
321
430
|
* testable without a process.
|
|
322
431
|
*/
|
|
323
|
-
export declare function shellHookVerdict(event: ShellHookEvent, entry: ShellHookHandler, outcome: ShellHookOutcome, log?: Logger): PluginHookResult;
|
|
432
|
+
export declare function shellHookVerdict(event: ShellHookEvent, entry: ShellHookHandler, outcome: ShellHookOutcome, log?: Logger, call?: ShellHookCall): PluginHookResult;
|
|
324
433
|
/** A short name for a hook in logs: its command, its url, or the start of its prompt. */
|
|
325
434
|
export declare function describeShellHook(entry: ShellHookHandler): string;
|
|
326
435
|
/**
|
|
@@ -355,6 +464,35 @@ export interface ShellHookOptions {
|
|
|
355
464
|
* `NAMZU_PROJECT_DIR`. Absent, `cwd`.
|
|
356
465
|
*/
|
|
357
466
|
readonly projectDir?: string;
|
|
467
|
+
/**
|
|
468
|
+
* Variables added to the environment of every command this adapter runs,
|
|
469
|
+
* beside the ones the kernel sets for each hook, which they never replace.
|
|
470
|
+
* For a host that attaches a group of hooks with something in common (a
|
|
471
|
+
* skill's folder).
|
|
472
|
+
*/
|
|
473
|
+
readonly extraEnv?: Readonly<Record<string, string>>;
|
|
474
|
+
/**
|
|
475
|
+
* Called when a hook of this adapter was selected to run (its matcher and
|
|
476
|
+
* `if` allowed it), before it runs. For a host that decides what happens to
|
|
477
|
+
* a hook once it has run (removing it after a first successful run).
|
|
478
|
+
*/
|
|
479
|
+
readonly onRun?: (info: {
|
|
480
|
+
readonly event: ShellHookEvent;
|
|
481
|
+
}) => void;
|
|
482
|
+
/**
|
|
483
|
+
* Set when the entries belong to a plugin: its own folder and the folder kept
|
|
484
|
+
* for its data, given to every command as `NAMZU_PLUGIN_ROOT` and
|
|
485
|
+
* `NAMZU_PLUGIN_DATA` and put in the command and arguments where they name
|
|
486
|
+
* them. The data folder is created when a command first runs.
|
|
487
|
+
*/
|
|
488
|
+
readonly plugin?: PluginFolders;
|
|
489
|
+
/**
|
|
490
|
+
* Set when the entries belong to a skill: the skill's own folder. A variable
|
|
491
|
+
* the command refers to without it being set, whose name ends in
|
|
492
|
+
* `_PLUGIN_ROOT` or `_SKILL_ROOT`, is given this folder under the name the
|
|
493
|
+
* command used (a skill moved as written names its folder that way).
|
|
494
|
+
*/
|
|
495
|
+
readonly skillRoot?: string;
|
|
358
496
|
/** How a path pattern in an entry's `if` is read. Absent, such a filter runs the hook. */
|
|
359
497
|
readonly pathFilter?: ShellHookPathFilter;
|
|
360
498
|
/**
|
|
@@ -365,6 +503,13 @@ export interface ShellHookOptions {
|
|
|
365
503
|
readonly defaultTimeoutMs?: {
|
|
366
504
|
readonly [event in ShellHookEvent]?: number;
|
|
367
505
|
};
|
|
506
|
+
/**
|
|
507
|
+
* Where the variables a hook sets for later commands are kept. With it, a
|
|
508
|
+
* command hook on `session_start`, `cwd_changed` or `file_changed` is
|
|
509
|
+
* started with `NAMZU_ENV_FILE`, and the file is read when the hook ends.
|
|
510
|
+
* Without it no hook gets the variable and nothing is carried.
|
|
511
|
+
*/
|
|
512
|
+
readonly hookEnv?: SessionHookEnv;
|
|
368
513
|
/**
|
|
369
514
|
* Called when a hook of this adapter ran out its deadline and was ended.
|
|
370
515
|
* `hook` is the command, URL or prompt text the entry names.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell-hook.d.ts","sourceRoot":"","sources":["../../src/plugin/shell-hook.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"shell-hook.d.ts","sourceRoot":"","sources":["../../src/plugin/shell-hook.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyGG;AAaH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,KAAK,EACX,oBAAoB,EACpB,gBAAgB,EAEhB,oBAAoB,EACpB,eAAe,EAEf,gBAAgB,EAChB,sBAAsB,EACtB,mBAAmB,EACnB,MAAM,0BAA0B,CAAA;AAIjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAEhD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAE3D,OAAO,EACN,KAAK,aAAa,EAKlB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAAE,KAAK,kBAAkB,EAAqB,MAAM,4BAA4B,CAAA;AAGvF;;;;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