@cotal-ai/connector-jcode 0.50.1 → 0.51.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.
@@ -0,0 +1,34 @@
1
+ import { type RecordMapper } from "@cotal-ai/connector-core";
2
+ export interface JcodeContentBlock {
3
+ type?: string;
4
+ text?: string;
5
+ id?: string;
6
+ name?: string;
7
+ input?: unknown;
8
+ tool_use_id?: string;
9
+ content?: unknown;
10
+ is_error?: boolean;
11
+ }
12
+ export interface JcodeMessage {
13
+ role?: string;
14
+ content?: JcodeContentBlock[];
15
+ timestamp?: string;
16
+ }
17
+ export interface JcodeJournalRecord {
18
+ append_messages?: JcodeMessage[];
19
+ }
20
+ export interface PositionedJcodeJournalRecord {
21
+ cursor: string;
22
+ record: JcodeJournalRecord;
23
+ }
24
+ export interface JcodeMapper {
25
+ map: RecordMapper<PositionedJcodeJournalRecord>;
26
+ forgetOpenRun: (runId: string) => void;
27
+ }
28
+ export declare function createJcodeMapper(opts: {
29
+ threadId: string;
30
+ mintRunId: () => string;
31
+ resumeRunId?: string;
32
+ now?: () => number;
33
+ }): JcodeMapper;
34
+ //# sourceMappingURL=agui-map.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agui-map.d.ts","sourceRoot":"","sources":["../src/agui-map.ts"],"names":[],"mappings":"AACA,OAAO,EAWL,KAAK,YAAY,EAClB,MAAM,0BAA0B,CAAC;AAElC,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,eAAe,CAAC,EAAE,YAAY,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,kBAAkB,CAAC;CAC5B;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,YAAY,CAAC,4BAA4B,CAAC,CAAC;IAChD,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAeD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB,GAAG,WAAW,CAqFd"}
@@ -0,0 +1,23 @@
1
+ import { type DurableSource, type EventWal, type SourceRead } from "@cotal-ai/connector-core";
2
+ import type { JcodeJournalRecord, PositionedJcodeJournalRecord } from "./agui-map.js";
3
+ export declare function jcodeJournalPath(jcodeHome: string, sessionId: string): string;
4
+ /**
5
+ * Persist where the public event stream begins before its first turn can start. A restart always
6
+ * trusts the WAL's acknowledged cursor and never captures a later end, so output appended after this
7
+ * boundary remains replayable even if the process dies before its first pump.
8
+ */
9
+ export declare function initializeJcodeEventBoundary(path: string, wal: EventWal): Promise<string>;
10
+ /**
11
+ * A Jcode session journal appears only when the first durable turn output is persisted. Wait for
12
+ * that first complete file read, then use ordinary append-only JSONL cursor semantics forever.
13
+ */
14
+ export declare class JcodeJournalSource implements DurableSource<JcodeJournalRecord> {
15
+ readonly path: string;
16
+ private readonly waitMs;
17
+ readonly kind = "jcode-session-journal";
18
+ private readonly file;
19
+ constructor(path: string, waitMs?: number);
20
+ read(cursor: string | undefined): Promise<SourceRead<JcodeJournalRecord>>;
21
+ }
22
+ export declare function positionedJcodeJournalSource(source: DurableSource<JcodeJournalRecord>): DurableSource<PositionedJcodeJournalRecord>;
23
+ //# sourceMappingURL=agui-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agui-source.d.ts","sourceRoot":"","sources":["../src/agui-source.ts"],"names":[],"mappings":"AAGA,OAAO,EAAmB,KAAK,aAAa,EAAE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC/G,OAAO,KAAK,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAUtF,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE7E;AAoBD;;;;GAIG;AACH,wBAAsB,4BAA4B,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAM/F;AAED;;;GAGG;AACH,qBAAa,kBAAmB,YAAW,aAAa,CAAC,kBAAkB,CAAC;IAKxE,QAAQ,CAAC,IAAI,EAAE,MAAM;IACrB,OAAO,CAAC,QAAQ,CAAC,MAAM;IALzB,QAAQ,CAAC,IAAI,2BAA2B;IACxC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAsC;gBAGhD,IAAI,EAAE,MAAM,EACJ,MAAM,SAAkB;IAKrC,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;CAuBhF;AAED,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,aAAa,CAAC,kBAAkB,CAAC,GACxC,aAAa,CAAC,4BAA4B,CAAC,CAc7C"}
@@ -1 +1 @@
1
- {"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAIA,OAAO,EAA2B,KAAK,SAAS,EAAoC,KAAK,YAAY,EAAkB,MAAM,gBAAgB,CAAC;AAyB9I;;mGAEmG;AACnG,wBAAgB,eAAe,IAAI,YAAY,CA+D9C;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,SAsF5B,CAAC"}
1
+ {"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAIA,OAAO,EAA2B,KAAK,SAAS,EAAoC,KAAK,YAAY,EAAkB,MAAM,gBAAgB,CAAC;AAyB9I;;mGAEmG;AACnG,wBAAgB,eAAe,IAAI,YAAY,CA+D9C;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,SAuG5B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAqE,MAAM,qBAAqB,CAAC;AA4FtH,eAAO,MAAM,+BAA+B,aAQ1C,CAAC;AACH,eAAO,MAAM,oCAAoC,aAAsB,CAAC;AAExE,6FAA6F;AAC7F,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAMpF;AAkPD,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAi/ClD"}
1
+ {"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAqE,MAAM,qBAAqB,CAAC;AAsGtH,eAAO,MAAM,+BAA+B,aAQ1C,CAAC;AACH,eAAO,MAAM,oCAAoC,aAAsB,CAAC;AAExE,6FAA6F;AAC7F,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAMpF;AAkPD,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAimDlD"}