@cotal-ai/connector-claude-code 0.66.1 → 0.67.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/dist/agui-map.d.ts +3 -9
- package/dist/agui-map.d.ts.map +1 -1
- package/dist/carried.d.ts +22 -0
- package/dist/carried.d.ts.map +1 -0
- package/dist/extension.d.ts.map +1 -1
- package/dist/hook.cjs +67 -57
- package/dist/hooks.d.ts.map +1 -1
- package/dist/index.js +129 -18
- package/dist/mcp.cjs +188 -138
- package/package.json +3 -3
package/dist/agui-map.d.ts
CHANGED
|
@@ -63,21 +63,15 @@
|
|
|
63
63
|
* turn can be a turn without re-emitting the peer's content. See {@link ORIGIN_RULE} and
|
|
64
64
|
* {@link ABSENT_ORIGIN_RULE}, which are where this now lives.
|
|
65
65
|
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* before the ruling, directly above code that had already implemented it. A successor read it,
|
|
69
|
-
* believed it over the code, and escalated a closed question as a live blocker; the measurement that
|
|
70
|
-
* corrected it took one run of the real mapper (**67 runs / 5217 events** on the 5938-record
|
|
71
|
-
* session, `diagnose()` → `null`). **A stale header is not a documentation defect, it is a false
|
|
72
|
-
* claim about the function beneath it.** If the rule changes again, this paragraph changes with it.
|
|
66
|
+
* On the 5938-record session the real mapper opens **67 runs** and emits **5217 events**, and
|
|
67
|
+
* `diagnose()` returns `null`.
|
|
73
68
|
*
|
|
74
69
|
* **DO NOT "FIX" THIS BY TREATING ABSENT `origin` AS HUMAN.** In a Claude session `user` is also the
|
|
75
70
|
* role of a TOOL RESULT: that predicate selects **825** of the interactive session's 892 user
|
|
76
71
|
* entries, and the single non-tool-result among them is a **context-compaction summary**
|
|
77
72
|
* (`isCompactSummary`), so the true human count is 0 and the predicate over-matches by 825. It would
|
|
78
73
|
* not emit nothing — it would emit a flood, each entry opening a run, which looks like the connector
|
|
79
|
-
* working.
|
|
80
|
-
* turn is "a `user` entry with no `origin`"; both halves were wrong.
|
|
74
|
+
* working.
|
|
81
75
|
*
|
|
82
76
|
* **The rule is implemented exactly as RULED, and still not guessed at.** `promptSource` was
|
|
83
77
|
* proposed as the selector and REJECTED: it is bounded by the partition it was inferred from, and
|
package/dist/agui-map.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agui-map.d.ts","sourceRoot":"","sources":["../src/agui-map.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"agui-map.d.ts","sourceRoot":"","sources":["../src/agui-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6FG;AACH,OAAO,EACL,KAAK,SAAS,EACd,KAAK,YAAY,EAalB,MAAM,0BAA0B,CAAC;AAElC;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3B;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6FAA6F;IAC7F,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE;QACR,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,EAAE,CAAC;KAClC,CAAC;CACH;AAmHD,+EAA+E;A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|
+
import type { ResumeTranscriptLocator } from "@cotal-ai/core";
|
|
2
|
+
export declare const claudeResumeTranscript: ResumeTranscriptLocator;
|
|
3
|
+
/**
|
|
4
|
+
* Refuse a carried launch this host cannot run, before anything is written: a Claude that ignores
|
|
5
|
+
* `CLAUDE_CODE_PROJECT_DIR_NAME`, a seat environment with no credential a fresh home can use, or a
|
|
6
|
+
* working directory the manager's own Claude home does not trust.
|
|
7
|
+
*/
|
|
8
|
+
export declare function refuseCarriedLaunch(binary: string, seatEnv: Record<string, string>, cwd: string): void;
|
|
9
|
+
/** Where a carried seat writes its fork record: the manager's {@link LaunchSpec.resumeRecordPath}. */
|
|
10
|
+
export declare function carriedForkRecord(home: string): string;
|
|
11
|
+
/** Fill the seat's home: the carried transcript where `--resume` finds it, and the first-run state a
|
|
12
|
+
* fresh home would otherwise prompt for, trusting only the launch directory already checked. */
|
|
13
|
+
export declare function placeCarried(home: string, transcript: string, resume: string | undefined, cwd: string): Record<string, string>;
|
|
14
|
+
/**
|
|
15
|
+
* Write a carried seat's fork record once Claude has forked: the digest of the transcript its
|
|
16
|
+
* `--resume` read, which the manager holds to the carried claim before it records the seat's
|
|
17
|
+
* provenance. Claude starts the fork as `source: "fork"`, a new session whose `transcript_path` sits
|
|
18
|
+
* in the project `--resume` searches first, and the source is hashed there. Any other start writes
|
|
19
|
+
* nothing, which the manager refuses; a later fork of the same seat keeps the first record.
|
|
20
|
+
*/
|
|
21
|
+
export declare function recordCarriedFork(env: NodeJS.ProcessEnv, ev: Record<string, unknown>): void;
|
|
22
|
+
//# sourceMappingURL=carried.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"carried.d.ts","sourceRoot":"","sources":["../src/carried.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAsD9D,eAAO,MAAM,sBAAsB,EAAE,uBAqBpC,CAAC;AAUF;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAoBtG;AAED,sGAAsG;AACtG,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;iGACiG;AACjG,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAQ9H;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,EAAE,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAY3F"}
|
package/dist/extension.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgD,KAAK,SAAS,EAAoC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgD,KAAK,SAAS,EAAoC,MAAM,gBAAgB,CAAC;AAOhI;;;;;;;;;4FAS4F;AAC5F,eAAO,MAAM,oBAAoB,8/DA4EvB,CAAC;AAgDX;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,SAuM7B,CAAC"}
|