@intentic/claude-plugin 1.326.0 → 1.328.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/.claude-plugin/plugin.json +1 -1
- package/dist/fileq.mjs +71332 -71203
- package/dist/notes-evidence.mjs +61 -13
- package/dist/retrieve-output.mjs +9 -4
- package/dist/session-start.mjs +264 -97
- package/dist/stats.mjs +61 -16
- package/generated/skills/field-notes/SKILL.md +1 -1
- package/generated/skills/iq/SKILL.md +9 -3
- package/package.json +4 -4
package/dist/notes-evidence.mjs
CHANGED
|
@@ -8,6 +8,53 @@ import { join as join3 } from "node:path";
|
|
|
8
8
|
import { readdirSync, readFileSync } from "node:fs";
|
|
9
9
|
import { basename, dirname, join } from "node:path";
|
|
10
10
|
|
|
11
|
+
// ../../_search/iq/src/recall/transcript/lines.ts
|
|
12
|
+
var asRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? value : void 0;
|
|
13
|
+
var asString = (value) => typeof value === "string" ? value : void 0;
|
|
14
|
+
var typeOf = (line) => asString(line["type"]);
|
|
15
|
+
var INTERRUPTION = "[Request interrupted by user";
|
|
16
|
+
var kindOf = (line, text) => {
|
|
17
|
+
if (line["isMeta"] === true) {
|
|
18
|
+
return "meta";
|
|
19
|
+
}
|
|
20
|
+
if (line["isCompactSummary"] === true) {
|
|
21
|
+
return "compaction";
|
|
22
|
+
}
|
|
23
|
+
if (text.startsWith("<local-command-")) {
|
|
24
|
+
return "local-command";
|
|
25
|
+
}
|
|
26
|
+
if (text.startsWith("<command-")) {
|
|
27
|
+
return "command";
|
|
28
|
+
}
|
|
29
|
+
return text.startsWith(INTERRUPTION) ? "interruption" : "typed";
|
|
30
|
+
};
|
|
31
|
+
var promptOf = (line) => {
|
|
32
|
+
if (typeOf(line) !== "user") {
|
|
33
|
+
return void 0;
|
|
34
|
+
}
|
|
35
|
+
const content = asRecord(line["message"])?.["content"];
|
|
36
|
+
let text;
|
|
37
|
+
if (typeof content === "string") {
|
|
38
|
+
text = content;
|
|
39
|
+
} else if (Array.isArray(content)) {
|
|
40
|
+
const texts = [];
|
|
41
|
+
for (const block of content) {
|
|
42
|
+
const record = asRecord(block);
|
|
43
|
+
if (record?.["type"] === "tool_result") {
|
|
44
|
+
return { kind: "tool-result", text: "" };
|
|
45
|
+
}
|
|
46
|
+
const blockText = record?.["type"] === "text" ? asString(record["text"]) : void 0;
|
|
47
|
+
if (blockText !== void 0) {
|
|
48
|
+
texts.push(blockText);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
text = texts.join("\n");
|
|
52
|
+
} else {
|
|
53
|
+
return void 0;
|
|
54
|
+
}
|
|
55
|
+
return { kind: kindOf(line, text), text };
|
|
56
|
+
};
|
|
57
|
+
|
|
11
58
|
// ../agent-context/src/tool-calls.ts
|
|
12
59
|
import { isAbsolute, relative } from "node:path";
|
|
13
60
|
var DISPLAY_NAMES = {
|
|
@@ -21,7 +68,10 @@ var DISPLAY_NAMES = {
|
|
|
21
68
|
webfetch: "WebFetch",
|
|
22
69
|
websearch: "WebSearch",
|
|
23
70
|
task: "Task",
|
|
24
|
-
patch: "Edit"
|
|
71
|
+
patch: "Edit",
|
|
72
|
+
// The page tools a chat draws from (the sandbox's agent/pages), named for a reader rather than by their server.
|
|
73
|
+
mcp__ui__show_page: "Show page",
|
|
74
|
+
mcp__ui__ask_page: "Ask on a page"
|
|
25
75
|
};
|
|
26
76
|
var BROWSER_TOOL = /^mcp__.+__browser_(.+)$/;
|
|
27
77
|
var BROWSER_VERB_NAMES = { take_screenshot: "screenshot" };
|
|
@@ -149,16 +199,9 @@ var isMissing = (error) => {
|
|
|
149
199
|
const code = typeof error === "object" && error !== null ? error.code : void 0;
|
|
150
200
|
return code === "ENOENT" || code === "ENOTDIR";
|
|
151
201
|
};
|
|
152
|
-
var
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
const content = line.message?.content;
|
|
157
|
-
if (Array.isArray(content) && content.some((block) => block["type"] === "tool_result")) {
|
|
158
|
-
return void 0;
|
|
159
|
-
}
|
|
160
|
-
const text = textOf(content);
|
|
161
|
-
return text.startsWith("<local-command-") ? void 0 : text;
|
|
202
|
+
var promptOf2 = (line) => {
|
|
203
|
+
const prompt = promptOf(line);
|
|
204
|
+
return prompt?.kind === "typed" || prompt?.kind === "command" ? prompt.text : void 0;
|
|
162
205
|
};
|
|
163
206
|
var callsOf = (line, options, subagent) => {
|
|
164
207
|
const content = line.message?.content;
|
|
@@ -194,7 +237,12 @@ var failuresOf = (line) => {
|
|
|
194
237
|
return [];
|
|
195
238
|
}
|
|
196
239
|
return content.flatMap(
|
|
197
|
-
(block) => block["type"] === "tool_result" && block["is_error"] === true && typeof block["tool_use_id"] === "string" ? [
|
|
240
|
+
(block) => block["type"] === "tool_result" && block["is_error"] === true && typeof block["tool_use_id"] === "string" ? [
|
|
241
|
+
{
|
|
242
|
+
id: block["tool_use_id"],
|
|
243
|
+
text: (typeof block["content"] === "string" ? block["content"] : textOf(block["content"])).slice(0, FAILURE_TEXT_CHARS)
|
|
244
|
+
}
|
|
245
|
+
] : []
|
|
198
246
|
);
|
|
199
247
|
};
|
|
200
248
|
var readClaudeTranscript = (text, options) => {
|
|
@@ -208,7 +256,7 @@ var readClaudeTranscript = (text, options) => {
|
|
|
208
256
|
}
|
|
209
257
|
sessionId ??= line.sessionId;
|
|
210
258
|
cwd ??= line.cwd;
|
|
211
|
-
const prompt =
|
|
259
|
+
const prompt = promptOf2(line);
|
|
212
260
|
if (prompt !== void 0) {
|
|
213
261
|
turns.push({ index: turns.length, at: stampOf(line) ?? turns.at(-1)?.at ?? 0, prompt, calls: [], failures: [] });
|
|
214
262
|
continue;
|
package/dist/retrieve-output.mjs
CHANGED
|
@@ -7,16 +7,16 @@ var BUDGET_TOKENS = 2e3;
|
|
|
7
7
|
var MAX_CHARS = BUDGET_TOKENS * 4;
|
|
8
8
|
var [logPath, pattern] = process.argv.slice(2);
|
|
9
9
|
if (logPath === void 0) {
|
|
10
|
-
process.
|
|
11
|
-
process.exit(
|
|
10
|
+
process.stdout.write("usage: retrieve-output <log-file> [pattern]\n");
|
|
11
|
+
process.exit(2);
|
|
12
12
|
}
|
|
13
13
|
var text;
|
|
14
14
|
try {
|
|
15
15
|
text = readFileSync(logPath, "utf8");
|
|
16
16
|
} catch (error) {
|
|
17
|
-
process.
|
|
17
|
+
process.stdout.write(`retrieve-output: cannot read ${logPath}: ${error instanceof Error ? error.message : String(error)}
|
|
18
18
|
`);
|
|
19
|
-
process.exit(
|
|
19
|
+
process.exit(2);
|
|
20
20
|
}
|
|
21
21
|
var lines = text.split("\n");
|
|
22
22
|
if (pattern !== void 0 && pattern !== "") {
|
|
@@ -28,6 +28,11 @@ if (pattern !== void 0 && pattern !== "") {
|
|
|
28
28
|
}
|
|
29
29
|
const needle = pattern.toLowerCase();
|
|
30
30
|
lines = lines.filter((line) => regex !== void 0 ? regex.test(line) : line.toLowerCase().includes(needle));
|
|
31
|
+
if (lines.length === 0) {
|
|
32
|
+
process.stdout.write(`retrieve-output: no line in ${logPath} matches ${JSON.stringify(pattern)}
|
|
33
|
+
`);
|
|
34
|
+
process.exit(1);
|
|
35
|
+
}
|
|
31
36
|
}
|
|
32
37
|
var out = lines.join("\n");
|
|
33
38
|
if (out.length > MAX_CHARS) {
|