@deepagents/experimental 4.2.1 → 5.0.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/README.md +18 -5
- package/dist/coding-agent-reminders/context.d.ts +15 -0
- package/dist/coding-agent-reminders/context.d.ts.map +1 -0
- package/dist/coding-agent-reminders/evaluate.d.ts +3 -0
- package/dist/coding-agent-reminders/evaluate.d.ts.map +1 -0
- package/dist/coding-agent-reminders/index.d.ts +5 -0
- package/dist/coding-agent-reminders/index.d.ts.map +1 -0
- package/dist/coding-agent-reminders/index.js +310 -0
- package/dist/coding-agent-reminders/index.js.map +7 -0
- package/dist/coding-agent-reminders/io.d.ts +4 -0
- package/dist/coding-agent-reminders/io.d.ts.map +1 -0
- package/dist/coding-agent-reminders/predicates/classifier.d.ts +10 -0
- package/dist/coding-agent-reminders/predicates/classifier.d.ts.map +1 -0
- package/dist/coding-agent-reminders/predicates/combinators.d.ts +6 -0
- package/dist/coding-agent-reminders/predicates/combinators.d.ts.map +1 -0
- package/dist/coding-agent-reminders/predicates/content.d.ts +7 -0
- package/dist/coding-agent-reminders/predicates/content.d.ts.map +1 -0
- package/dist/coding-agent-reminders/predicates/count.d.ts +4 -0
- package/dist/coding-agent-reminders/predicates/count.d.ts.map +1 -0
- package/dist/coding-agent-reminders/predicates/environment.d.ts +3 -0
- package/dist/coding-agent-reminders/predicates/environment.d.ts.map +1 -0
- package/dist/coding-agent-reminders/predicates/event.d.ts +3 -0
- package/dist/coding-agent-reminders/predicates/event.d.ts.map +1 -0
- package/dist/coding-agent-reminders/predicates/index.d.ts +8 -0
- package/dist/coding-agent-reminders/predicates/index.d.ts.map +1 -0
- package/dist/coding-agent-reminders/predicates/tool.d.ts +11 -0
- package/dist/coding-agent-reminders/predicates/tool.d.ts.map +1 -0
- package/dist/coding-agent-reminders/types.d.ts +86 -0
- package/dist/coding-agent-reminders/types.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2036 -158
- package/dist/index.js.map +4 -4
- package/dist/zukhruf/agent-control-plane.d.ts +68 -0
- package/dist/zukhruf/agent-control-plane.d.ts.map +1 -0
- package/dist/zukhruf/agent-declaration-registry.d.ts +9 -0
- package/dist/zukhruf/agent-declaration-registry.d.ts.map +1 -0
- package/dist/zukhruf/agent-directory.d.ts +21 -0
- package/dist/zukhruf/agent-directory.d.ts.map +1 -0
- package/dist/zukhruf/agent-path.d.ts +15 -0
- package/dist/zukhruf/agent-path.d.ts.map +1 -0
- package/dist/zukhruf/agent-runtime.d.ts +53 -0
- package/dist/zukhruf/agent-runtime.d.ts.map +1 -0
- package/dist/zukhruf/agent-status-projector.d.ts +32 -0
- package/dist/zukhruf/agent-status-projector.d.ts.map +1 -0
- package/dist/zukhruf/agent-thread.d.ts +31 -0
- package/dist/zukhruf/agent-thread.d.ts.map +1 -0
- package/dist/zukhruf/agent-tool-context.d.ts +6 -0
- package/dist/zukhruf/agent-tool-context.d.ts.map +1 -0
- package/dist/zukhruf/agent-turn-executor.d.ts +19 -0
- package/dist/zukhruf/agent-turn-executor.d.ts.map +1 -0
- package/dist/zukhruf/agent-turn-id.d.ts +11 -0
- package/dist/zukhruf/agent-turn-id.d.ts.map +1 -0
- package/dist/zukhruf/agent.d.ts +13 -8
- package/dist/zukhruf/agent.d.ts.map +1 -1
- package/dist/zukhruf/approval-controller.d.ts +34 -0
- package/dist/zukhruf/approval-controller.d.ts.map +1 -0
- package/dist/zukhruf/approval-mutex.d.ts +5 -0
- package/dist/zukhruf/approval-mutex.d.ts.map +1 -0
- package/dist/zukhruf/index.d.ts +15 -11
- package/dist/zukhruf/index.d.ts.map +1 -1
- package/dist/zukhruf/index.js +1716 -152
- package/dist/zukhruf/index.js.map +4 -4
- package/dist/zukhruf/list-agents.d.ts +234 -0
- package/dist/zukhruf/list-agents.d.ts.map +1 -0
- package/dist/zukhruf/mailbox/coordinator.d.ts +22 -0
- package/dist/zukhruf/mailbox/coordinator.d.ts.map +1 -0
- package/dist/zukhruf/mailbox/sqlite.store.d.ts +16 -0
- package/dist/zukhruf/mailbox/sqlite.store.d.ts.map +1 -0
- package/dist/zukhruf/mailbox/store.d.ts +20 -0
- package/dist/zukhruf/mailbox/store.d.ts.map +1 -0
- package/dist/zukhruf/mailbox/types.d.ts +35 -0
- package/dist/zukhruf/mailbox/types.d.ts.map +1 -0
- package/dist/zukhruf/message-tools.d.ts +456 -0
- package/dist/zukhruf/message-tools.d.ts.map +1 -0
- package/dist/zukhruf/queue/pg-boss.turn-queue.d.ts +2 -1
- package/dist/zukhruf/queue/pg-boss.turn-queue.d.ts.map +1 -1
- package/dist/zukhruf/queue/turn-queue.d.ts +14 -0
- package/dist/zukhruf/queue/turn-queue.d.ts.map +1 -1
- package/dist/zukhruf/spawn-agent.d.ts +301 -0
- package/dist/zukhruf/spawn-agent.d.ts.map +1 -0
- package/dist/zukhruf/sqlite-approval-mutex.d.ts +17 -0
- package/dist/zukhruf/sqlite-approval-mutex.d.ts.map +1 -0
- package/package.json +14 -7
- package/dist/zukhruf/runtime.d.ts +0 -67
- package/dist/zukhruf/runtime.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
A home for unstable, in-progress building blocks that are not yet part of the
|
|
4
4
|
stable `@deepagents/*` surface. APIs here may change without notice.
|
|
5
5
|
|
|
6
|
+
## `@deepagents/experimental/coding-agent-reminders`
|
|
7
|
+
|
|
8
|
+
`coding-agent-reminders` is an experimental event-aware reminder and guard
|
|
9
|
+
framework for coding agents. It provides Claude Code hook types, predicates,
|
|
10
|
+
context normalization, command I/O, and rule evaluation without prescribing a
|
|
11
|
+
reminder catalog. See
|
|
12
|
+
[`src/coding-agent-reminders/README.md`](./src/coding-agent-reminders/README.md)
|
|
13
|
+
for the public API and lifecycle mapping.
|
|
14
|
+
|
|
6
15
|
## `@deepagents/experimental/zukhruf`
|
|
7
16
|
|
|
8
17
|
`zukhruf` is an internal DSL for **declaring** an agent, plus a **runtime** that
|
|
@@ -12,16 +21,18 @@ fragments, the stream subsystem).
|
|
|
12
21
|
|
|
13
22
|
```ts
|
|
14
23
|
import {
|
|
24
|
+
AgentRuntime,
|
|
15
25
|
PgBossTurnQueue,
|
|
16
|
-
createRuntime,
|
|
17
26
|
defineAgent,
|
|
18
27
|
} from '@deepagents/experimental/zukhruf';
|
|
19
28
|
```
|
|
20
29
|
|
|
21
|
-
The declaration layer (`defineAgent` /
|
|
22
|
-
`defineSandbox`)
|
|
23
|
-
|
|
24
|
-
|
|
30
|
+
The customer surface contains the pure declaration layer (`defineAgent` /
|
|
31
|
+
`defineInstructions` / `defineTool` / `defineSandbox`), `AgentRuntime`, the domain values, and the
|
|
32
|
+
store/queue ports and adapters. Declarations have a types-only dependency on `@deepagents/context`.
|
|
33
|
+
`AgentRuntime` exposes enqueue, host mailbox delivery, observation, approval, denial, and worker
|
|
34
|
+
lifecycle. Its control plane, executor, status projector, mailbox coordinator, and injected
|
|
35
|
+
collaboration-tool implementations are internal wiring. See
|
|
25
36
|
[`src/zukhruf/DESIGN.md`](./src/zukhruf/DESIGN.md) for the decided semantics,
|
|
26
37
|
[`TODO.md`](./src/zukhruf/TODO.md) for the convergence plan, and
|
|
27
38
|
[`BUGS.md`](./src/zukhruf/BUGS.md) for known residue.
|
|
@@ -29,5 +40,7 @@ touches engines, sandboxes, and durability. See
|
|
|
29
40
|
Runnable end-to-end showcases live in
|
|
30
41
|
[`demo/zukhruf-durable-turns`](../../demo/zukhruf-durable-turns) (the durable
|
|
31
42
|
executor: enqueue, detach, resume, strict per-chat FIFO) and
|
|
43
|
+
[`demo/zukhruf-mailbox`](../../demo/zukhruf-mailbox) (API-key-free host delivery,
|
|
44
|
+
durable FIFO mail, and payload-free wakes) and
|
|
32
45
|
[`demo/zukhruf-research-bot`](../../demo/zukhruf-research-bot) (an agentic
|
|
33
46
|
research bot: plan → web-search subagent → streamed report).
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ClaudeHookInput, ToolCallState, ToolNameSpec } from './types.ts';
|
|
2
|
+
export type NormalizedToolCall = {
|
|
3
|
+
name: string;
|
|
4
|
+
state: ToolCallState;
|
|
5
|
+
input?: unknown;
|
|
6
|
+
output?: unknown;
|
|
7
|
+
errorText?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function contentText(ctx: ClaudeHookInput): string;
|
|
10
|
+
export declare function bashCommand(ctx: ClaudeHookInput): string;
|
|
11
|
+
export declare function outputText(ctx: ClaudeHookInput): string;
|
|
12
|
+
export declare function textOf(value: unknown): string;
|
|
13
|
+
export declare function toolCallsOf(ctx: ClaudeHookInput): NormalizedToolCall[];
|
|
14
|
+
export declare function matchesName(spec: ToolNameSpec, name: string): boolean;
|
|
15
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/coding-agent-reminders/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/E,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,aAAa,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,WAAW,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAIxD;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAIxD;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CASvD;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAQ7C;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,eAAe,GAAG,kBAAkB,EAAE,CAsBtE;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAErE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluate.d.ts","sourceRoot":"","sources":["../../src/coding-agent-reminders/evaluate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAGhB,kBAAkB,EAEnB,MAAM,YAAY,CAAC;AAEpB,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,eAAe,EACtB,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAiCvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/coding-agent-reminders/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
// packages/experimental/src/coding-agent-reminders/evaluate.ts
|
|
2
|
+
async function evaluateReminderHook(input, config) {
|
|
3
|
+
const guardMatch = input.hook_event_name === "PreToolUse" ? await firstMatchingGuard(input, config.guards) : void 0;
|
|
4
|
+
if (guardMatch) {
|
|
5
|
+
return {
|
|
6
|
+
hookSpecificOutput: {
|
|
7
|
+
hookEventName: input.hook_event_name,
|
|
8
|
+
permissionDecision: "deny",
|
|
9
|
+
permissionDecisionReason: guardMatch.errorReason ?? resolveGuardReason(guardMatch.rule, input)
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
if (input.stop_hook_active === true && (input.hook_event_name === "Stop" || input.hook_event_name === "SubagentStop")) {
|
|
14
|
+
return void 0;
|
|
15
|
+
}
|
|
16
|
+
const reminders = await matchingReminders(input, config.reminders);
|
|
17
|
+
if (reminders.length === 0) return void 0;
|
|
18
|
+
return {
|
|
19
|
+
hookSpecificOutput: {
|
|
20
|
+
hookEventName: input.hook_event_name,
|
|
21
|
+
additionalContext: reminders.join("\n\n")
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
async function firstMatchingGuard(input, guards) {
|
|
26
|
+
for (const rule of guards) {
|
|
27
|
+
try {
|
|
28
|
+
if (await rule.when(input)) return { rule };
|
|
29
|
+
} catch (error) {
|
|
30
|
+
console.error(`Guard "${rule.id}" predicate failed`, error);
|
|
31
|
+
return {
|
|
32
|
+
rule,
|
|
33
|
+
errorReason: `Guard "${rule.id}" failed to evaluate; denying by default.`
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return void 0;
|
|
38
|
+
}
|
|
39
|
+
async function matchingReminders(input, reminders) {
|
|
40
|
+
const matched = [];
|
|
41
|
+
for (const rule of reminders) {
|
|
42
|
+
if (!rule.events.includes(input.hook_event_name)) continue;
|
|
43
|
+
try {
|
|
44
|
+
if (!await rule.when(input)) continue;
|
|
45
|
+
matched.push(
|
|
46
|
+
`[${rule.target}:${rule.id}]
|
|
47
|
+
${resolveText(rule.message, input)}`
|
|
48
|
+
);
|
|
49
|
+
} catch (error) {
|
|
50
|
+
console.error(`Reminder "${rule.id}" evaluation failed`, error);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return matched;
|
|
54
|
+
}
|
|
55
|
+
function resolveText(value, input) {
|
|
56
|
+
return typeof value === "function" ? value(input) : value;
|
|
57
|
+
}
|
|
58
|
+
function resolveGuardReason(rule, input) {
|
|
59
|
+
try {
|
|
60
|
+
return resolveText(rule.deny, input);
|
|
61
|
+
} catch (error) {
|
|
62
|
+
console.error(`Guard "${rule.id}" denial message failed`, error);
|
|
63
|
+
return `Guard "${rule.id}" matched but its denial message failed; denying by default.`;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// packages/experimental/src/coding-agent-reminders/io.ts
|
|
68
|
+
async function readStdin() {
|
|
69
|
+
const chunks = [];
|
|
70
|
+
for await (const chunk of process.stdin) {
|
|
71
|
+
chunks.push(Buffer.from(chunk));
|
|
72
|
+
}
|
|
73
|
+
return Buffer.concat(chunks).toString("utf8");
|
|
74
|
+
}
|
|
75
|
+
function writeOutput(output) {
|
|
76
|
+
process.stdout.write(`${JSON.stringify(output)}
|
|
77
|
+
`);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// packages/experimental/src/coding-agent-reminders/predicates/classifier.ts
|
|
81
|
+
import { Corpus } from "tiny-tfidf";
|
|
82
|
+
var BM25Classifier = class {
|
|
83
|
+
#corpus;
|
|
84
|
+
#itemsByName;
|
|
85
|
+
constructor(items) {
|
|
86
|
+
const names = items.map((item) => item.name);
|
|
87
|
+
const texts = items.map((item) => `${item.name} ${item.description}`);
|
|
88
|
+
this.#corpus = new Corpus(names, texts);
|
|
89
|
+
this.#itemsByName = new Map(items.map((item) => [item.name, item]));
|
|
90
|
+
}
|
|
91
|
+
match(query, options) {
|
|
92
|
+
const topN = options?.topN ?? 5;
|
|
93
|
+
const threshold = options?.threshold ?? 0;
|
|
94
|
+
return this.#corpus.getResultsForQuery(query).filter(([, score]) => score > threshold).slice(0, topN).map(([name, score]) => {
|
|
95
|
+
const item = this.#itemsByName.get(name);
|
|
96
|
+
if (!item) return null;
|
|
97
|
+
return { item, score };
|
|
98
|
+
}).filter((match) => match !== null);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// packages/experimental/src/coding-agent-reminders/predicates/combinators.ts
|
|
103
|
+
var always = () => true;
|
|
104
|
+
var and = (...predicates) => async (ctx) => {
|
|
105
|
+
for (const predicate of predicates) {
|
|
106
|
+
if (!await predicate(ctx)) return false;
|
|
107
|
+
}
|
|
108
|
+
return true;
|
|
109
|
+
};
|
|
110
|
+
var or = (...predicates) => async (ctx) => {
|
|
111
|
+
for (const predicate of predicates) {
|
|
112
|
+
if (await predicate(ctx)) return true;
|
|
113
|
+
}
|
|
114
|
+
return false;
|
|
115
|
+
};
|
|
116
|
+
var not = (predicate) => async (ctx) => !await predicate(ctx);
|
|
117
|
+
|
|
118
|
+
// packages/experimental/src/coding-agent-reminders/context.ts
|
|
119
|
+
function contentText(ctx) {
|
|
120
|
+
return [ctx.prompt, ctx.command_name, ctx.command_args].filter((value) => typeof value === "string").join(" ");
|
|
121
|
+
}
|
|
122
|
+
function bashCommand(ctx) {
|
|
123
|
+
if (ctx.tool_name !== "Bash") return "";
|
|
124
|
+
const command = ctx.tool_input?.command;
|
|
125
|
+
return typeof command === "string" ? command : "";
|
|
126
|
+
}
|
|
127
|
+
function outputText(ctx) {
|
|
128
|
+
if (ctx.hook_event_name === "PostToolBatch" && ctx.tool_calls) {
|
|
129
|
+
return ctx.tool_calls.map((call) => textOf(call.tool_response)).filter(Boolean).join("\n");
|
|
130
|
+
}
|
|
131
|
+
const output = ctx.tool_output ?? ctx.tool_response;
|
|
132
|
+
return textOf(output);
|
|
133
|
+
}
|
|
134
|
+
function textOf(value) {
|
|
135
|
+
if (typeof value === "string") return value;
|
|
136
|
+
if (value === void 0) return "";
|
|
137
|
+
try {
|
|
138
|
+
return JSON.stringify(value);
|
|
139
|
+
} catch {
|
|
140
|
+
return String(value);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
function toolCallsOf(ctx) {
|
|
144
|
+
if (ctx.hook_event_name === "PostToolBatch" && ctx.tool_calls) {
|
|
145
|
+
return ctx.tool_calls.map((call) => ({
|
|
146
|
+
name: call.tool_name,
|
|
147
|
+
state: "output-available",
|
|
148
|
+
input: call.tool_input,
|
|
149
|
+
output: call.tool_response
|
|
150
|
+
}));
|
|
151
|
+
}
|
|
152
|
+
const calls = [];
|
|
153
|
+
const toolName = ctx.tool_name;
|
|
154
|
+
if (typeof toolName === "string") {
|
|
155
|
+
calls.push({
|
|
156
|
+
name: toolName,
|
|
157
|
+
state: stateOf(ctx.hook_event_name),
|
|
158
|
+
input: ctx.tool_input,
|
|
159
|
+
output: ctx.tool_output ?? ctx.tool_response,
|
|
160
|
+
errorText: errorTextOf(ctx)
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
return calls;
|
|
164
|
+
}
|
|
165
|
+
function matchesName(spec, name) {
|
|
166
|
+
return typeof spec === "function" ? spec(name) : spec === name;
|
|
167
|
+
}
|
|
168
|
+
function stateOf(eventName) {
|
|
169
|
+
if (eventName === "PostToolUseFailure") return "output-error";
|
|
170
|
+
if (eventName === "PostToolUse") return "output-available";
|
|
171
|
+
return "input-available";
|
|
172
|
+
}
|
|
173
|
+
function errorTextOf(ctx) {
|
|
174
|
+
const error = ctx.tool_error ?? ctx.error ?? ctx.reason ?? ctx.tool_output ?? ctx.tool_response;
|
|
175
|
+
return textOf(error);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// packages/experimental/src/coding-agent-reminders/predicates/content.ts
|
|
179
|
+
function contentMatches(topics, options) {
|
|
180
|
+
const classifier = new BM25Classifier(
|
|
181
|
+
topics.map((topic, index) => ({
|
|
182
|
+
name: `t${index}`,
|
|
183
|
+
description: topic
|
|
184
|
+
}))
|
|
185
|
+
);
|
|
186
|
+
return (ctx) => classifier.match(contentText(ctx), {
|
|
187
|
+
threshold: options?.threshold
|
|
188
|
+
}).length > 0;
|
|
189
|
+
}
|
|
190
|
+
function classifies(classifier, options) {
|
|
191
|
+
return (ctx) => classifier.match(contentText(ctx), options).length > 0;
|
|
192
|
+
}
|
|
193
|
+
function contentIncludes(keywords) {
|
|
194
|
+
const lower = keywords.map((keyword) => keyword.toLowerCase());
|
|
195
|
+
return (ctx) => {
|
|
196
|
+
const text = contentText(ctx).toLowerCase();
|
|
197
|
+
return lower.some((keyword) => text.includes(keyword));
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
var contentPattern = (pattern) => (ctx) => {
|
|
201
|
+
pattern.lastIndex = 0;
|
|
202
|
+
return pattern.test(contentText(ctx));
|
|
203
|
+
};
|
|
204
|
+
var promptMatches = contentPattern;
|
|
205
|
+
|
|
206
|
+
// packages/experimental/src/coding-agent-reminders/predicates/count.ts
|
|
207
|
+
function assertCountSpec(spec) {
|
|
208
|
+
const hasEq = spec.eq !== void 0;
|
|
209
|
+
const hasRange = spec.gte !== void 0 || spec.lte !== void 0;
|
|
210
|
+
if (!hasEq && !hasRange) {
|
|
211
|
+
throw new Error("CountSpec must include at least one of gte/lte/eq");
|
|
212
|
+
}
|
|
213
|
+
if (hasEq && hasRange) {
|
|
214
|
+
throw new Error("CountSpec.eq cannot be combined with gte/lte");
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
function checkCount(count, spec) {
|
|
218
|
+
if (spec.eq !== void 0) return count === spec.eq;
|
|
219
|
+
if (spec.gte !== void 0 && count < spec.gte) return false;
|
|
220
|
+
if (spec.lte !== void 0 && count > spec.lte) return false;
|
|
221
|
+
return true;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// packages/experimental/src/coding-agent-reminders/predicates/environment.ts
|
|
225
|
+
var envFlag = (name) => () => process.env[name] === "1" || process.env[name] === "true";
|
|
226
|
+
|
|
227
|
+
// packages/experimental/src/coding-agent-reminders/predicates/event.ts
|
|
228
|
+
var eventIs = (...events) => (ctx) => events.includes(ctx.hook_event_name);
|
|
229
|
+
|
|
230
|
+
// packages/experimental/src/coding-agent-reminders/predicates/tool.ts
|
|
231
|
+
var toolIs = (name) => (ctx) => ctx.tool_name === name;
|
|
232
|
+
var bashCommandMatches = (pattern) => (ctx) => {
|
|
233
|
+
pattern.lastIndex = 0;
|
|
234
|
+
return pattern.test(bashCommand(ctx));
|
|
235
|
+
};
|
|
236
|
+
function toolCall(options) {
|
|
237
|
+
return (ctx) => {
|
|
238
|
+
return toolCallsOf(ctx).some((call) => {
|
|
239
|
+
if (options.state && call.state !== options.state) return false;
|
|
240
|
+
if (options.name !== void 0 && !matchesName(options.name, call.name)) {
|
|
241
|
+
return false;
|
|
242
|
+
}
|
|
243
|
+
if (options.input && !options.input(call.input)) return false;
|
|
244
|
+
if (options.output) {
|
|
245
|
+
if (call.state !== "output-available") return false;
|
|
246
|
+
if (!options.output(call.output)) return false;
|
|
247
|
+
}
|
|
248
|
+
if (options.errorText) {
|
|
249
|
+
if (call.state !== "output-error") return false;
|
|
250
|
+
if (!options.errorText(call.errorText ?? "")) return false;
|
|
251
|
+
}
|
|
252
|
+
return true;
|
|
253
|
+
});
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
function toolCalled(name) {
|
|
257
|
+
return toolCall({ name });
|
|
258
|
+
}
|
|
259
|
+
function toolFailed(name) {
|
|
260
|
+
return toolCall({ name, state: "output-error" });
|
|
261
|
+
}
|
|
262
|
+
function anyToolCalled() {
|
|
263
|
+
return (ctx) => toolCallsOf(ctx).length > 0;
|
|
264
|
+
}
|
|
265
|
+
function toolCallCount(name, spec) {
|
|
266
|
+
assertCountSpec(spec);
|
|
267
|
+
return (ctx) => checkCount(
|
|
268
|
+
toolCallsOf(ctx).filter((call) => matchesName(name, call.name)).length,
|
|
269
|
+
spec
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
var outputMatches = (pattern) => (ctx) => {
|
|
273
|
+
pattern.lastIndex = 0;
|
|
274
|
+
return pattern.test(outputText(ctx));
|
|
275
|
+
};
|
|
276
|
+
var toolOutputMatches = (pattern) => toolCall({
|
|
277
|
+
output: (output) => {
|
|
278
|
+
pattern.lastIndex = 0;
|
|
279
|
+
return pattern.test(textOf(output));
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
export {
|
|
283
|
+
BM25Classifier,
|
|
284
|
+
always,
|
|
285
|
+
and,
|
|
286
|
+
anyToolCalled,
|
|
287
|
+
assertCountSpec,
|
|
288
|
+
bashCommandMatches,
|
|
289
|
+
checkCount,
|
|
290
|
+
classifies,
|
|
291
|
+
contentIncludes,
|
|
292
|
+
contentMatches,
|
|
293
|
+
contentPattern,
|
|
294
|
+
envFlag,
|
|
295
|
+
evaluateReminderHook,
|
|
296
|
+
eventIs,
|
|
297
|
+
not,
|
|
298
|
+
or,
|
|
299
|
+
outputMatches,
|
|
300
|
+
promptMatches,
|
|
301
|
+
readStdin,
|
|
302
|
+
toolCall,
|
|
303
|
+
toolCallCount,
|
|
304
|
+
toolCalled,
|
|
305
|
+
toolFailed,
|
|
306
|
+
toolIs,
|
|
307
|
+
toolOutputMatches,
|
|
308
|
+
writeOutput
|
|
309
|
+
};
|
|
310
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/coding-agent-reminders/evaluate.ts", "../../src/coding-agent-reminders/io.ts", "../../src/coding-agent-reminders/predicates/classifier.ts", "../../src/coding-agent-reminders/predicates/combinators.ts", "../../src/coding-agent-reminders/context.ts", "../../src/coding-agent-reminders/predicates/content.ts", "../../src/coding-agent-reminders/predicates/count.ts", "../../src/coding-agent-reminders/predicates/environment.ts", "../../src/coding-agent-reminders/predicates/event.ts", "../../src/coding-agent-reminders/predicates/tool.ts"],
|
|
4
|
+
"sourcesContent": ["import type {\n ClaudeHookInput,\n ClaudeHookOutput,\n GuardRule,\n HookEventName,\n ReminderHookConfig,\n ReminderRule,\n} from './types.ts';\n\nexport async function evaluateReminderHook(\n input: ClaudeHookInput,\n config: ReminderHookConfig,\n): Promise<ClaudeHookOutput | undefined> {\n const guardMatch =\n input.hook_event_name === 'PreToolUse'\n ? await firstMatchingGuard(input, config.guards)\n : undefined;\n if (guardMatch) {\n return {\n hookSpecificOutput: {\n hookEventName: input.hook_event_name,\n permissionDecision: 'deny',\n permissionDecisionReason:\n guardMatch.errorReason ?? resolveGuardReason(guardMatch.rule, input),\n },\n };\n }\n\n if (\n input.stop_hook_active === true &&\n (input.hook_event_name === 'Stop' ||\n input.hook_event_name === 'SubagentStop')\n ) {\n return undefined;\n }\n\n const reminders = await matchingReminders(input, config.reminders);\n if (reminders.length === 0) return undefined;\n\n return {\n hookSpecificOutput: {\n hookEventName: input.hook_event_name,\n additionalContext: reminders.join('\\n\\n'),\n },\n };\n}\n\nasync function firstMatchingGuard(\n input: ClaudeHookInput,\n guards: GuardRule[],\n): Promise<{ rule: GuardRule; errorReason?: string } | undefined> {\n for (const rule of guards) {\n try {\n if (await rule.when(input)) return { rule };\n } catch (error) {\n console.error(`Guard \"${rule.id}\" predicate failed`, error);\n return {\n rule,\n errorReason: `Guard \"${rule.id}\" failed to evaluate; denying by default.`,\n };\n }\n }\n return undefined;\n}\n\nasync function matchingReminders(\n input: ClaudeHookInput,\n reminders: ReminderRule[],\n): Promise<string[]> {\n const matched: string[] = [];\n for (const rule of reminders) {\n if (!rule.events.includes(input.hook_event_name as HookEventName)) continue;\n try {\n if (!(await rule.when(input))) continue;\n matched.push(\n `[${rule.target}:${rule.id}]\\n${resolveText(rule.message, input)}`,\n );\n } catch (error) {\n console.error(`Reminder \"${rule.id}\" evaluation failed`, error);\n }\n }\n return matched;\n}\n\nfunction resolveText(\n value: string | ((ctx: ClaudeHookInput) => string),\n input: ClaudeHookInput,\n): string {\n return typeof value === 'function' ? value(input) : value;\n}\n\nfunction resolveGuardReason(rule: GuardRule, input: ClaudeHookInput): string {\n try {\n return resolveText(rule.deny, input);\n } catch (error) {\n console.error(`Guard \"${rule.id}\" denial message failed`, error);\n return `Guard \"${rule.id}\" matched but its denial message failed; denying by default.`;\n }\n}\n", "import type { ClaudeHookOutput } from './types.ts';\n\nexport async function readStdin(): Promise<string> {\n const chunks: Buffer[] = [];\n for await (const chunk of process.stdin) {\n chunks.push(Buffer.from(chunk));\n }\n return Buffer.concat(chunks).toString('utf8');\n}\n\nexport function writeOutput(output: ClaudeHookOutput): void {\n process.stdout.write(`${JSON.stringify(output)}\\n`);\n}\n", "import { Corpus } from 'tiny-tfidf';\n\nimport type {\n ClassifierMatch,\n ClassifierOptions,\n IClassifier,\n} from '../types.ts';\n\nexport class BM25Classifier<\n T extends { name: string; description: string },\n> implements IClassifier<T> {\n #corpus: Corpus;\n #itemsByName: Map<string, T>;\n\n constructor(items: T[]) {\n const names = items.map((item) => item.name);\n const texts = items.map((item) => `${item.name} ${item.description}`);\n this.#corpus = new Corpus(names, texts);\n this.#itemsByName = new Map(items.map((item) => [item.name, item]));\n }\n\n match(query: string, options?: ClassifierOptions): ClassifierMatch<T>[] {\n const topN = options?.topN ?? 5;\n const threshold = options?.threshold ?? 0;\n\n return this.#corpus\n .getResultsForQuery(query)\n .filter(([, score]: [string, number]) => score > threshold)\n .slice(0, topN)\n .map(([name, score]: [string, number]) => {\n const item = this.#itemsByName.get(name);\n if (!item) return null;\n return { item, score };\n })\n .filter((match): match is ClassifierMatch<T> => match !== null);\n }\n}\n", "import type { AsyncHookPredicate, HookPredicate } from '../types.ts';\n\nexport const always: HookPredicate = () => true;\n\nexport const and =\n (...predicates: HookPredicate[]): AsyncHookPredicate =>\n async (ctx) => {\n for (const predicate of predicates) {\n if (!(await predicate(ctx))) return false;\n }\n return true;\n };\n\nexport const or =\n (...predicates: HookPredicate[]): AsyncHookPredicate =>\n async (ctx) => {\n for (const predicate of predicates) {\n if (await predicate(ctx)) return true;\n }\n return false;\n };\n\nexport const not =\n (predicate: HookPredicate): AsyncHookPredicate =>\n async (ctx) =>\n !(await predicate(ctx));\n", "import type { ClaudeHookInput, ToolCallState, ToolNameSpec } from './types.ts';\n\nexport type NormalizedToolCall = {\n name: string;\n state: ToolCallState;\n input?: unknown;\n output?: unknown;\n errorText?: string;\n};\n\nexport function contentText(ctx: ClaudeHookInput): string {\n return [ctx.prompt, ctx.command_name, ctx.command_args]\n .filter((value): value is string => typeof value === 'string')\n .join(' ');\n}\n\nexport function bashCommand(ctx: ClaudeHookInput): string {\n if (ctx.tool_name !== 'Bash') return '';\n const command = ctx.tool_input?.command;\n return typeof command === 'string' ? command : '';\n}\n\nexport function outputText(ctx: ClaudeHookInput): string {\n if (ctx.hook_event_name === 'PostToolBatch' && ctx.tool_calls) {\n return ctx.tool_calls\n .map((call) => textOf(call.tool_response))\n .filter(Boolean)\n .join('\\n');\n }\n const output = ctx.tool_output ?? ctx.tool_response;\n return textOf(output);\n}\n\nexport function textOf(value: unknown): string {\n if (typeof value === 'string') return value;\n if (value === undefined) return '';\n try {\n return JSON.stringify(value);\n } catch {\n return String(value);\n }\n}\n\nexport function toolCallsOf(ctx: ClaudeHookInput): NormalizedToolCall[] {\n if (ctx.hook_event_name === 'PostToolBatch' && ctx.tool_calls) {\n return ctx.tool_calls.map((call) => ({\n name: call.tool_name,\n state: 'output-available',\n input: call.tool_input,\n output: call.tool_response,\n }));\n }\n\n const calls: NormalizedToolCall[] = [];\n const toolName = ctx.tool_name;\n if (typeof toolName === 'string') {\n calls.push({\n name: toolName,\n state: stateOf(ctx.hook_event_name),\n input: ctx.tool_input,\n output: ctx.tool_output ?? ctx.tool_response,\n errorText: errorTextOf(ctx),\n });\n }\n return calls;\n}\n\nexport function matchesName(spec: ToolNameSpec, name: string): boolean {\n return typeof spec === 'function' ? spec(name) : spec === name;\n}\n\nfunction stateOf(eventName: string): ToolCallState {\n if (eventName === 'PostToolUseFailure') return 'output-error';\n if (eventName === 'PostToolUse') return 'output-available';\n return 'input-available';\n}\n\nfunction errorTextOf(ctx: ClaudeHookInput): string {\n const error =\n ctx.tool_error ??\n ctx.error ??\n ctx.reason ??\n ctx.tool_output ??\n ctx.tool_response;\n return textOf(error);\n}\n", "import { contentText } from '../context.ts';\nimport type {\n ClassifierOptions,\n ContentMatchesOptions,\n HookPredicate,\n IClassifier,\n} from '../types.ts';\nimport { BM25Classifier } from './classifier.ts';\n\nexport function contentMatches(\n topics: string[],\n options?: ContentMatchesOptions,\n): HookPredicate {\n const classifier = new BM25Classifier(\n topics.map((topic, index) => ({\n name: `t${index}`,\n description: topic,\n })),\n );\n return (ctx) =>\n classifier.match(contentText(ctx), {\n threshold: options?.threshold,\n }).length > 0;\n}\n\nexport function classifies<T>(\n classifier: IClassifier<T>,\n options?: ClassifierOptions,\n): HookPredicate {\n return (ctx) => classifier.match(contentText(ctx), options).length > 0;\n}\n\nexport function contentIncludes(keywords: string[]): HookPredicate {\n const lower = keywords.map((keyword) => keyword.toLowerCase());\n return (ctx) => {\n const text = contentText(ctx).toLowerCase();\n return lower.some((keyword) => text.includes(keyword));\n };\n}\n\nexport const contentPattern =\n (pattern: RegExp): HookPredicate =>\n (ctx) => {\n pattern.lastIndex = 0;\n return pattern.test(contentText(ctx));\n };\n\nexport const promptMatches = contentPattern;\n", "import type { CountSpec } from '../types.ts';\n\nexport function assertCountSpec(spec: CountSpec): void {\n const hasEq = spec.eq !== undefined;\n const hasRange = spec.gte !== undefined || spec.lte !== undefined;\n if (!hasEq && !hasRange) {\n throw new Error('CountSpec must include at least one of gte/lte/eq');\n }\n if (hasEq && hasRange) {\n throw new Error('CountSpec.eq cannot be combined with gte/lte');\n }\n}\n\nexport function checkCount(count: number, spec: CountSpec): boolean {\n if (spec.eq !== undefined) return count === spec.eq;\n if (spec.gte !== undefined && count < spec.gte) return false;\n if (spec.lte !== undefined && count > spec.lte) return false;\n return true;\n}\n", "import type { HookPredicate } from '../types.ts';\n\nexport const envFlag =\n (name: string): HookPredicate =>\n () =>\n process.env[name] === '1' || process.env[name] === 'true';\n", "import type { HookEventName, HookPredicate } from '../types.ts';\n\nexport const eventIs =\n (...events: HookEventName[]): HookPredicate =>\n (ctx) =>\n events.includes(ctx.hook_event_name as HookEventName);\n", "import {\n bashCommand,\n matchesName,\n outputText,\n textOf,\n toolCallsOf,\n} from '../context.ts';\nimport type {\n CountSpec,\n HookPredicate,\n ToolCallOptions,\n ToolNameSpec,\n} from '../types.ts';\nimport { assertCountSpec, checkCount } from './count.ts';\n\nexport const toolIs =\n (name: string): HookPredicate =>\n (ctx) =>\n ctx.tool_name === name;\n\nexport const bashCommandMatches =\n (pattern: RegExp): HookPredicate =>\n (ctx) => {\n pattern.lastIndex = 0;\n return pattern.test(bashCommand(ctx));\n };\n\nexport function toolCall(options: ToolCallOptions): HookPredicate {\n return (ctx) => {\n return toolCallsOf(ctx).some((call) => {\n if (options.state && call.state !== options.state) return false;\n if (options.name !== undefined && !matchesName(options.name, call.name)) {\n return false;\n }\n if (options.input && !options.input(call.input)) return false;\n if (options.output) {\n if (call.state !== 'output-available') return false;\n if (!options.output(call.output)) return false;\n }\n if (options.errorText) {\n if (call.state !== 'output-error') return false;\n if (!options.errorText(call.errorText ?? '')) return false;\n }\n return true;\n });\n };\n}\n\nexport function toolCalled(name: ToolNameSpec): HookPredicate {\n return toolCall({ name });\n}\n\nexport function toolFailed(name: ToolNameSpec): HookPredicate {\n return toolCall({ name, state: 'output-error' });\n}\n\nexport function anyToolCalled(): HookPredicate {\n return (ctx) => toolCallsOf(ctx).length > 0;\n}\n\nexport function toolCallCount(\n name: ToolNameSpec,\n spec: CountSpec,\n): HookPredicate {\n assertCountSpec(spec);\n return (ctx) =>\n checkCount(\n toolCallsOf(ctx).filter((call) => matchesName(name, call.name)).length,\n spec,\n );\n}\n\nexport const outputMatches =\n (pattern: RegExp): HookPredicate =>\n (ctx) => {\n pattern.lastIndex = 0;\n return pattern.test(outputText(ctx));\n };\n\nexport const toolOutputMatches = (pattern: RegExp): HookPredicate =>\n toolCall({\n output: (output) => {\n pattern.lastIndex = 0;\n return pattern.test(textOf(output));\n },\n });\n"],
|
|
5
|
+
"mappings": ";AASA,eAAsB,qBACpB,OACA,QACuC;AACvC,QAAM,aACJ,MAAM,oBAAoB,eACtB,MAAM,mBAAmB,OAAO,OAAO,MAAM,IAC7C;AACN,MAAI,YAAY;AACd,WAAO;AAAA,MACL,oBAAoB;AAAA,QAClB,eAAe,MAAM;AAAA,QACrB,oBAAoB;AAAA,QACpB,0BACE,WAAW,eAAe,mBAAmB,WAAW,MAAM,KAAK;AAAA,MACvE;AAAA,IACF;AAAA,EACF;AAEA,MACE,MAAM,qBAAqB,SAC1B,MAAM,oBAAoB,UACzB,MAAM,oBAAoB,iBAC5B;AACA,WAAO;AAAA,EACT;AAEA,QAAM,YAAY,MAAM,kBAAkB,OAAO,OAAO,SAAS;AACjE,MAAI,UAAU,WAAW,E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
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ClassifierMatch, ClassifierOptions, IClassifier } from '../types.ts';
|
|
2
|
+
export declare class BM25Classifier<T extends {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
}> implements IClassifier<T> {
|
|
6
|
+
#private;
|
|
7
|
+
constructor(items: T[]);
|
|
8
|
+
match(query: string, options?: ClassifierOptions): ClassifierMatch<T>[];
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=classifier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classifier.d.ts","sourceRoot":"","sources":["../../../src/coding-agent-reminders/predicates/classifier.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EACjB,WAAW,EACZ,MAAM,aAAa,CAAC;AAErB,qBAAa,cAAc,CACzB,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAC/C,YAAW,WAAW,CAAC,CAAC,CAAC;;gBAIb,KAAK,EAAE,CAAC,EAAE;IAOtB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,eAAe,CAAC,CAAC,CAAC,EAAE;CAexE"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AsyncHookPredicate, HookPredicate } from '../types.ts';
|
|
2
|
+
export declare const always: HookPredicate;
|
|
3
|
+
export declare const and: (...predicates: HookPredicate[]) => AsyncHookPredicate;
|
|
4
|
+
export declare const or: (...predicates: HookPredicate[]) => AsyncHookPredicate;
|
|
5
|
+
export declare const not: (predicate: HookPredicate) => AsyncHookPredicate;
|
|
6
|
+
//# sourceMappingURL=combinators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combinators.d.ts","sourceRoot":"","sources":["../../../src/coding-agent-reminders/predicates/combinators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAErE,eAAO,MAAM,MAAM,EAAE,aAA0B,CAAC;AAEhD,eAAO,MAAM,GAAG,GACb,GAAG,YAAY,aAAa,EAAE,KAAG,kBAMjC,CAAC;AAEJ,eAAO,MAAM,EAAE,GACZ,GAAG,YAAY,aAAa,EAAE,KAAG,kBAMjC,CAAC;AAEJ,eAAO,MAAM,GAAG,GACb,WAAW,aAAa,KAAG,kBAEH,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ClassifierOptions, ContentMatchesOptions, HookPredicate, IClassifier } from '../types.ts';
|
|
2
|
+
export declare function contentMatches(topics: string[], options?: ContentMatchesOptions): HookPredicate;
|
|
3
|
+
export declare function classifies<T>(classifier: IClassifier<T>, options?: ClassifierOptions): HookPredicate;
|
|
4
|
+
export declare function contentIncludes(keywords: string[]): HookPredicate;
|
|
5
|
+
export declare const contentPattern: (pattern: RegExp) => HookPredicate;
|
|
6
|
+
export declare const promptMatches: (pattern: RegExp) => HookPredicate;
|
|
7
|
+
//# sourceMappingURL=content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/coding-agent-reminders/predicates/content.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,EACb,WAAW,EACZ,MAAM,aAAa,CAAC;AAGrB,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EAAE,EAChB,OAAO,CAAC,EAAE,qBAAqB,GAC9B,aAAa,CAWf;AAED,wBAAgB,UAAU,CAAC,CAAC,EAC1B,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC,EAC1B,OAAO,CAAC,EAAE,iBAAiB,GAC1B,aAAa,CAEf;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,aAAa,CAMjE;AAED,eAAO,MAAM,cAAc,GACxB,SAAS,MAAM,KAAG,aAIlB,CAAC;AAEJ,eAAO,MAAM,aAAa,YANd,MAAM,KAAG,aAMsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"count.d.ts","sourceRoot":"","sources":["../../../src/coding-agent-reminders/predicates/count.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CASrD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAKlE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../../src/coding-agent-reminders/predicates/environment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,eAAO,MAAM,OAAO,GACjB,MAAM,MAAM,KAAG,aAE2C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../../src/coding-agent-reminders/predicates/event.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEhE,eAAO,MAAM,OAAO,GACjB,GAAG,QAAQ,aAAa,EAAE,KAAG,aAEyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/coding-agent-reminders/predicates/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CountSpec, HookPredicate, ToolCallOptions, ToolNameSpec } from '../types.ts';
|
|
2
|
+
export declare const toolIs: (name: string) => HookPredicate;
|
|
3
|
+
export declare const bashCommandMatches: (pattern: RegExp) => HookPredicate;
|
|
4
|
+
export declare function toolCall(options: ToolCallOptions): HookPredicate;
|
|
5
|
+
export declare function toolCalled(name: ToolNameSpec): HookPredicate;
|
|
6
|
+
export declare function toolFailed(name: ToolNameSpec): HookPredicate;
|
|
7
|
+
export declare function anyToolCalled(): HookPredicate;
|
|
8
|
+
export declare function toolCallCount(name: ToolNameSpec, spec: CountSpec): HookPredicate;
|
|
9
|
+
export declare const outputMatches: (pattern: RegExp) => HookPredicate;
|
|
10
|
+
export declare const toolOutputMatches: (pattern: RegExp) => HookPredicate;
|
|
11
|
+
//# sourceMappingURL=tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../../src/coding-agent-reminders/predicates/tool.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,eAAe,EACf,YAAY,EACb,MAAM,aAAa,CAAC;AAGrB,eAAO,MAAM,MAAM,GAChB,MAAM,MAAM,KAAG,aAEQ,CAAC;AAE3B,eAAO,MAAM,kBAAkB,GAC5B,SAAS,MAAM,KAAG,aAIlB,CAAC;AAEJ,wBAAgB,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,aAAa,CAmBhE;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,YAAY,GAAG,aAAa,CAE5D;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,YAAY,GAAG,aAAa,CAE5D;AAED,wBAAgB,aAAa,IAAI,aAAa,CAE7C;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,YAAY,EAClB,IAAI,EAAE,SAAS,GACd,aAAa,CAOf;AAED,eAAO,MAAM,aAAa,GACvB,SAAS,MAAM,KAAG,aAIlB,CAAC;AAEJ,eAAO,MAAM,iBAAiB,GAAI,SAAS,MAAM,KAAG,aAMhD,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export type HookEventName = 'SessionStart' | 'Setup' | 'SubagentStart' | 'UserPromptSubmit' | 'UserPromptExpansion' | 'PreToolUse' | 'PostToolUse' | 'PostToolUseFailure' | 'PostToolBatch' | 'Stop' | 'SubagentStop';
|
|
2
|
+
export type ClaudeBatchToolCall = {
|
|
3
|
+
tool_name: string;
|
|
4
|
+
tool_input?: Record<string, unknown>;
|
|
5
|
+
tool_use_id?: string;
|
|
6
|
+
tool_response?: unknown;
|
|
7
|
+
};
|
|
8
|
+
export type ClaudeHookInput = {
|
|
9
|
+
hook_event_name: HookEventName | string;
|
|
10
|
+
session_id?: string;
|
|
11
|
+
prompt_id?: string;
|
|
12
|
+
transcript_path?: string;
|
|
13
|
+
cwd?: string;
|
|
14
|
+
permission_mode?: string;
|
|
15
|
+
prompt?: string;
|
|
16
|
+
command_name?: string;
|
|
17
|
+
command_args?: string;
|
|
18
|
+
tool_name?: string;
|
|
19
|
+
tool_input?: Record<string, unknown>;
|
|
20
|
+
tool_output?: unknown;
|
|
21
|
+
tool_response?: unknown;
|
|
22
|
+
tool_calls?: ClaudeBatchToolCall[];
|
|
23
|
+
source?: string;
|
|
24
|
+
trigger?: string;
|
|
25
|
+
agent_type?: string;
|
|
26
|
+
stop_hook_active?: boolean;
|
|
27
|
+
[key: string]: unknown;
|
|
28
|
+
};
|
|
29
|
+
export type HookPredicate = (ctx: ClaudeHookInput) => boolean | Promise<boolean>;
|
|
30
|
+
export type AsyncHookPredicate = (ctx: ClaudeHookInput) => Promise<boolean>;
|
|
31
|
+
export type ReminderTarget = 'session' | 'prompt' | 'tool-result' | 'tool-batch' | 'stop-feedback';
|
|
32
|
+
export type ReminderRule = {
|
|
33
|
+
id: string;
|
|
34
|
+
target: ReminderTarget;
|
|
35
|
+
events: HookEventName[];
|
|
36
|
+
when: HookPredicate;
|
|
37
|
+
message: string | ((ctx: ClaudeHookInput) => string);
|
|
38
|
+
};
|
|
39
|
+
export type GuardRule = {
|
|
40
|
+
id: string;
|
|
41
|
+
when: HookPredicate;
|
|
42
|
+
deny: string | ((ctx: ClaudeHookInput) => string);
|
|
43
|
+
};
|
|
44
|
+
export type ClaudeHookOutput = {
|
|
45
|
+
decision?: 'block';
|
|
46
|
+
reason?: string;
|
|
47
|
+
hookSpecificOutput?: {
|
|
48
|
+
hookEventName: string;
|
|
49
|
+
additionalContext?: string;
|
|
50
|
+
permissionDecision?: 'allow' | 'deny' | 'ask' | 'defer';
|
|
51
|
+
permissionDecisionReason?: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
export type ReminderHookConfig = {
|
|
55
|
+
reminders: ReminderRule[];
|
|
56
|
+
guards: GuardRule[];
|
|
57
|
+
};
|
|
58
|
+
export type CountSpec = {
|
|
59
|
+
gte?: number;
|
|
60
|
+
lte?: number;
|
|
61
|
+
eq?: number;
|
|
62
|
+
};
|
|
63
|
+
export type ToolNameSpec = string | ((name: string) => boolean);
|
|
64
|
+
export type ToolCallState = 'input-available' | 'output-available' | 'output-error';
|
|
65
|
+
export type ToolCallOptions = {
|
|
66
|
+
name?: ToolNameSpec;
|
|
67
|
+
state?: ToolCallState;
|
|
68
|
+
input?: (input: unknown) => boolean;
|
|
69
|
+
output?: (output: unknown) => boolean;
|
|
70
|
+
errorText?: (text: string) => boolean;
|
|
71
|
+
};
|
|
72
|
+
export interface ClassifierMatch<T> {
|
|
73
|
+
item: T;
|
|
74
|
+
score: number;
|
|
75
|
+
}
|
|
76
|
+
export interface ClassifierOptions {
|
|
77
|
+
topN?: number;
|
|
78
|
+
threshold?: number;
|
|
79
|
+
}
|
|
80
|
+
export interface IClassifier<T> {
|
|
81
|
+
match(query: string, options?: ClassifierOptions): ClassifierMatch<T>[];
|
|
82
|
+
}
|
|
83
|
+
export interface ContentMatchesOptions {
|
|
84
|
+
threshold?: number;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=types.d.ts.map
|