claude-code-infinite 1.0.32 → 1.0.34
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 +34 -11
- package/dist/cli-args.d.ts +7 -0
- package/dist/cli-args.d.ts.map +1 -1
- package/dist/cli-args.js +19 -0
- package/dist/cli-args.js.map +1 -1
- package/dist/cli-main.js +28 -10
- package/dist/cli-main.js.map +1 -1
- package/dist/count-tokens.d.ts +7 -3
- package/dist/count-tokens.d.ts.map +1 -1
- package/dist/count-tokens.js +6 -2
- package/dist/count-tokens.js.map +1 -1
- package/dist/hooks.d.ts +21 -1
- package/dist/hooks.d.ts.map +1 -1
- package/dist/hooks.js +36 -6
- package/dist/hooks.js.map +1 -1
- package/dist/host-session.d.ts +12 -0
- package/dist/host-session.d.ts.map +1 -0
- package/dist/host-session.js +12 -0
- package/dist/host-session.js.map +1 -0
- package/dist/image-refs.d.ts +24 -2
- package/dist/image-refs.d.ts.map +1 -1
- package/dist/image-refs.js +67 -20
- package/dist/image-refs.js.map +1 -1
- package/dist/index-wait-413.d.ts +26 -0
- package/dist/index-wait-413.d.ts.map +1 -0
- package/dist/index-wait-413.js +113 -0
- package/dist/index-wait-413.js.map +1 -0
- package/dist/memtree-finder.d.ts +70 -6
- package/dist/memtree-finder.d.ts.map +1 -1
- package/dist/memtree-finder.js +150 -20
- package/dist/memtree-finder.js.map +1 -1
- package/dist/memtree-handover.d.ts +13 -0
- package/dist/memtree-handover.d.ts.map +1 -0
- package/dist/memtree-handover.js +231 -0
- package/dist/memtree-handover.js.map +1 -0
- package/dist/memtree-mcp-config.d.ts +2 -2
- package/dist/memtree-mcp-config.d.ts.map +1 -1
- package/dist/memtree-mcp-config.js +8 -5
- package/dist/memtree-mcp-config.js.map +1 -1
- package/dist/memtree-mcp.d.ts +182 -2
- package/dist/memtree-mcp.d.ts.map +1 -1
- package/dist/memtree-mcp.js +357 -38
- package/dist/memtree-mcp.js.map +1 -1
- package/dist/memtree-newest.d.ts +21 -3
- package/dist/memtree-newest.d.ts.map +1 -1
- package/dist/memtree-newest.js +43 -11
- package/dist/memtree-newest.js.map +1 -1
- package/dist/memtree-times.d.ts +33 -0
- package/dist/memtree-times.d.ts.map +1 -1
- package/dist/memtree-times.js +77 -0
- package/dist/memtree-times.js.map +1 -1
- package/dist/memtree-tools.d.ts +19 -5
- package/dist/memtree-tools.d.ts.map +1 -1
- package/dist/memtree-tools.js +97 -23
- package/dist/memtree-tools.js.map +1 -1
- package/dist/memtree.d.ts +109 -3
- package/dist/memtree.d.ts.map +1 -1
- package/dist/memtree.js +382 -21
- package/dist/memtree.js.map +1 -1
- package/dist/network-failure.d.ts +28 -0
- package/dist/network-failure.d.ts.map +1 -0
- package/dist/network-failure.js +67 -0
- package/dist/network-failure.js.map +1 -0
- package/dist/open-url.d.ts +49 -0
- package/dist/open-url.d.ts.map +1 -0
- package/dist/open-url.js +100 -0
- package/dist/open-url.js.map +1 -0
- package/dist/prefix-store.d.ts +4 -0
- package/dist/prefix-store.d.ts.map +1 -1
- package/dist/prefix-store.js +8 -4
- package/dist/prefix-store.js.map +1 -1
- package/dist/project-trees.d.ts +15 -7
- package/dist/project-trees.d.ts.map +1 -1
- package/dist/project-trees.js +20 -9
- package/dist/project-trees.js.map +1 -1
- package/dist/proxy.d.ts +125 -1
- package/dist/proxy.d.ts.map +1 -1
- package/dist/proxy.js +838 -74
- package/dist/proxy.js.map +1 -1
- package/dist/reqlog.d.ts +34 -0
- package/dist/reqlog.d.ts.map +1 -1
- package/dist/reqlog.js.map +1 -1
- package/dist/resume-guidance.d.ts +9 -3
- package/dist/resume-guidance.d.ts.map +1 -1
- package/dist/resume-guidance.js +9 -3
- package/dist/resume-guidance.js.map +1 -1
- package/dist/route-fallback.d.ts +77 -11
- package/dist/route-fallback.d.ts.map +1 -1
- package/dist/route-fallback.js +157 -33
- package/dist/route-fallback.js.map +1 -1
- package/dist/route-identity.d.ts +6 -2
- package/dist/route-identity.d.ts.map +1 -1
- package/dist/route-identity.js +209 -16
- package/dist/route-identity.js.map +1 -1
- package/dist/subagent-hint.d.ts +28 -0
- package/dist/subagent-hint.d.ts.map +1 -1
- package/dist/subagent-hint.js +37 -0
- package/dist/subagent-hint.js.map +1 -1
- package/package.json +1 -1
package/dist/subagent-hint.d.ts
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* when the server named the parent's newest tree: a parent without one has
|
|
16
16
|
* little to re-derive.
|
|
17
17
|
*/
|
|
18
|
+
import type { KeyCheck } from "./key-status.js";
|
|
18
19
|
/**
|
|
19
20
|
* Whether subagents get the hint: on while the session has the memtree
|
|
20
21
|
* `search` tool, off once ccc could not register the server after all.
|
|
@@ -24,8 +25,35 @@ export declare class SubagentMemoryHint {
|
|
|
24
25
|
disable(): void;
|
|
25
26
|
get enabled(): boolean;
|
|
26
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* The subagent hints for this run, or undefined: the session needs the `search` tool
|
|
30
|
+
* they name, and MemTree must not be known off at startup (an invalid key, or [c] at
|
|
31
|
+
* the payment gate). The proxy's own working check can't know that before MemTree
|
|
32
|
+
* answers a request, and the after-a-subagent line is given before then too.
|
|
33
|
+
*/
|
|
34
|
+
export declare function subagentHintFor(s: {
|
|
35
|
+
tools: readonly string[];
|
|
36
|
+
keyCheck: KeyCheck;
|
|
37
|
+
memtreeOff: boolean;
|
|
38
|
+
}): SubagentMemoryHint | undefined;
|
|
27
39
|
/** The hint for a subagent of `sessionId`, or undefined when either id looks wrong. */
|
|
28
40
|
export declare function subagentMemoryHintText(sessionId: string, treeRef: string): string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Said to the parent after each Agent/Task call: a subagent's result (returned now, or
|
|
43
|
+
* as a notification when it was launched in the background, which `-p` runs mostly
|
|
44
|
+
* are) is only its final message; its evidence is in its own MemTree tree, which
|
|
45
|
+
* nothing else points at. xsession benchmark 2026-11-06: parents asked for a detail
|
|
46
|
+
* the subagent read but didn't report searched only their own tree, resumed the
|
|
47
|
+
* subagent or re-ran the work; with this line they searched memory first. Worded to be
|
|
48
|
+
* true at launch and at completion. Constant: no cache churn beyond its own tokens.
|
|
49
|
+
*/
|
|
50
|
+
export declare const SUBAGENT_RESULT_HINT: string;
|
|
51
|
+
/** Agent tools whose PostToolUse gets SUBAGENT_RESULT_HINT. */
|
|
52
|
+
export declare const AGENT_TOOL_NAMES: readonly ["Agent", "Task"];
|
|
53
|
+
/** Whether a PostToolUse input is an Agent/Task call (foreground, or a background launch). */
|
|
54
|
+
export declare function isSubagentCall(input: unknown): boolean;
|
|
55
|
+
/** The PostToolUse hook's answer carrying `context` to the model. */
|
|
56
|
+
export declare function postToolUseOutput(context: string): Record<string, unknown>;
|
|
29
57
|
/** The SubagentStart hook's answer carrying `context` to the subagent. */
|
|
30
58
|
export declare function subagentStartOutput(context: string): Record<string, unknown>;
|
|
31
59
|
//# sourceMappingURL=subagent-hint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subagent-hint.d.ts","sourceRoot":"","sources":["../src/subagent-hint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"subagent-hint.d.ts","sourceRoot":"","sources":["../src/subagent-hint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAMhD;;;GAGG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAAS;IAEzB,OAAO,IAAI,IAAI;IAIf,IAAI,OAAO,IAAI,OAAO,CAErB;CACF;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE;IACjC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,QAAQ,EAAE,QAAQ,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACrB,GAAG,kBAAkB,GAAG,SAAS,CAGjC;AAED,uFAAuF;AACvF,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,GACd,MAAM,GAAG,SAAS,CAQpB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,QAIqC,CAAC;AAEvE,+DAA+D;AAC/D,eAAO,MAAM,gBAAgB,4BAA6B,CAAC;AAE3D,8FAA8F;AAC9F,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAItD;AAED,qEAAqE;AACrE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAE1E;AAED,0EAA0E;AAC1E,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAE5E"}
|
package/dist/subagent-hint.js
CHANGED
|
@@ -31,6 +31,17 @@ export class SubagentMemoryHint {
|
|
|
31
31
|
return !this.disabled;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* The subagent hints for this run, or undefined: the session needs the `search` tool
|
|
36
|
+
* they name, and MemTree must not be known off at startup (an invalid key, or [c] at
|
|
37
|
+
* the payment gate). The proxy's own working check can't know that before MemTree
|
|
38
|
+
* answers a request, and the after-a-subagent line is given before then too.
|
|
39
|
+
*/
|
|
40
|
+
export function subagentHintFor(s) {
|
|
41
|
+
if (!s.tools.includes("search") || s.keyCheck === "invalid" || s.memtreeOff)
|
|
42
|
+
return undefined;
|
|
43
|
+
return new SubagentMemoryHint();
|
|
44
|
+
}
|
|
34
45
|
/** The hint for a subagent of `sessionId`, or undefined when either id looks wrong. */
|
|
35
46
|
export function subagentMemoryHintText(sessionId, treeRef) {
|
|
36
47
|
if (!SESSION_ID.test(sessionId) || !TREE_REF.test(treeRef))
|
|
@@ -40,6 +51,32 @@ export function subagentMemoryHintText(sessionId, treeRef) {
|
|
|
40
51
|
"findings or commands from the parent's work, search its memory: mcp__memtree__search " +
|
|
41
52
|
`with tree ${treeRef} (or without tree to search all sessions).`);
|
|
42
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Said to the parent after each Agent/Task call: a subagent's result (returned now, or
|
|
56
|
+
* as a notification when it was launched in the background, which `-p` runs mostly
|
|
57
|
+
* are) is only its final message; its evidence is in its own MemTree tree, which
|
|
58
|
+
* nothing else points at. xsession benchmark 2026-11-06: parents asked for a detail
|
|
59
|
+
* the subagent read but didn't report searched only their own tree, resumed the
|
|
60
|
+
* subagent or re-ran the work; with this line they searched memory first. Worded to be
|
|
61
|
+
* true at launch and at completion. Constant: no cache churn beyond its own tokens.
|
|
62
|
+
*/
|
|
63
|
+
export const SUBAGENT_RESULT_HINT = "ccc: A subagent's result is only its final message. Its own work (files it read, " +
|
|
64
|
+
"commands and their output) is in MemTree, in its own tree, indexed when it ends. For a " +
|
|
65
|
+
"detail it didn't report, mcp__memtree__search without tree (an id, name or term from " +
|
|
66
|
+
"its task), then read_lines on the hit, before re-running its work.";
|
|
67
|
+
/** Agent tools whose PostToolUse gets SUBAGENT_RESULT_HINT. */
|
|
68
|
+
export const AGENT_TOOL_NAMES = ["Agent", "Task"];
|
|
69
|
+
/** Whether a PostToolUse input is an Agent/Task call (foreground, or a background launch). */
|
|
70
|
+
export function isSubagentCall(input) {
|
|
71
|
+
const raw = input;
|
|
72
|
+
if (!raw || raw.hook_event_name !== "PostToolUse")
|
|
73
|
+
return false;
|
|
74
|
+
return AGENT_TOOL_NAMES.includes(raw.tool_name);
|
|
75
|
+
}
|
|
76
|
+
/** The PostToolUse hook's answer carrying `context` to the model. */
|
|
77
|
+
export function postToolUseOutput(context) {
|
|
78
|
+
return { hookSpecificOutput: { hookEventName: "PostToolUse", additionalContext: context } };
|
|
79
|
+
}
|
|
43
80
|
/** The SubagentStart hook's answer carrying `context` to the subagent. */
|
|
44
81
|
export function subagentStartOutput(context) {
|
|
45
82
|
return { hookSpecificOutput: { hookEventName: "SubagentStart", additionalContext: context } };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subagent-hint.js","sourceRoot":"","sources":["../src/subagent-hint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"subagent-hint.js","sourceRoot":"","sources":["../src/subagent-hint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,gDAAgD;AAChD,MAAM,QAAQ,GAAG,iCAAiC,CAAC;AAEnD;;;GAGG;AACH,MAAM,OAAO,kBAAkB;IACrB,QAAQ,GAAG,KAAK,CAAC;IAEzB,OAAO;QACL,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;IAED,IAAI,OAAO;QACT,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC;IACxB,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,CAI/B;IACC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAK,SAAS,IAAI,CAAC,CAAC,UAAU;QAAE,OAAO,SAAS,CAAC;IAC9F,OAAO,IAAI,kBAAkB,EAAE,CAAC;AAClC,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,sBAAsB,CACpC,SAAiB,EACjB,OAAe;IAEf,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC;QAAE,OAAO,SAAS,CAAC;IAC7E,OAAO,CACL,sCAAsC,SAAS,iCAAiC;QAChF,GAAG,OAAO,wEAAwE;QAClF,uFAAuF;QACvF,aAAa,OAAO,4CAA4C,CACjE,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAC/B,mFAAmF;IACnF,yFAAyF;IACzF,uFAAuF;IACvF,oEAAoE,CAAC;AAEvE,+DAA+D;AAC/D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,CAAU,CAAC;AAE3D,8FAA8F;AAC9F,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,MAAM,GAAG,GAAG,KAAuC,CAAC;IACpD,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,eAAe,KAAK,aAAa;QAAE,OAAO,KAAK,CAAC;IAChE,OAAQ,gBAAuC,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAC1E,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,OAAO,EAAE,kBAAkB,EAAE,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,OAAO,EAAE,EAAE,CAAC;AAC9F,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,mBAAmB,CAAC,OAAe;IACjD,OAAO,EAAE,kBAAkB,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,iBAAiB,EAAE,OAAO,EAAE,EAAE,CAAC;AAChG,CAAC"}
|