@cotal-ai/connector-opencode 0.182.0 → 0.183.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.
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAuEA,OAAO,KAAK,EAAE,MAAM,EAAyB,MAAM,qBAAqB,CAAC;AAezE,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,QAAQ,EACR,oBAAoB,EACpB,iBAAiB,EACjB,YAAY,EACZ,aAAa,GACd,MAAM,mBAAmB,CAAC;AAW3B,eAAO,MAAM,KAAK,EAAE,MAo1CnB,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAuEA,OAAO,KAAK,EAAE,MAAM,EAAyB,MAAM,qBAAqB,CAAC;AAezE,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,QAAQ,EACR,oBAAoB,EACpB,iBAAiB,EACjB,YAAY,EACZ,aAAa,GACd,MAAM,mBAAmB,CAAC;AAW3B,eAAO,MAAM,KAAK,EAAE,MAq1CnB,CAAC"}
package/dist/stream1.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * each part streams under a key of its own id and its own saved record closes the stream.
6
6
  *
7
7
  * **A line is anchored at the start of the streaming part's message**, the `<message>:<message>`
8
- * position the source also gives a failed message's stand-in record. The session store holds the
8
+ * cursor of its assistant header. The session store holds the
9
9
  * part from its first delta, so the store's end would place every line after the part, where its
10
10
  * saved record has already closed the stream. The merged source places a line before the first
11
11
  * record after its anchor, or where its read starts when it has read past it, so the text arrives
package/dist/stream2.d.ts CHANGED
@@ -6,11 +6,8 @@
6
6
  * 2.0.24). So an element streams under a key of its message, kind and ordinal, and the mapper finds
7
7
  * the same key from the element's position when its saved record arrives.
8
8
  *
9
- * **A line is anchored at the session's last record before the step's message.** The step's message
10
- * is in the list, unsettled, from its first element, so a position inside it would hold every line
11
- * until the step ends. That record is read when the step starts; until it answers, a line takes the
12
- * furthest position a read of the session has reached, which is never past it. Either way the
13
- * records before the step come before the line and the step's saved elements after it.
9
+ * A line is anchored at the step's assistant header, before any of its elements and after the
10
+ * prompt that opened the run. Even a delta sent immediately can take that position by message id.
14
11
  */
15
12
  import { type DeltaJournalOptions, type StreamDelta } from "@cotal-ai/connector-core";
16
13
  /** The key the element of `kind` at `ordinal` among a message's elements of that kind streams under.
@@ -27,12 +24,6 @@ export interface StreamEvent2 {
27
24
  delta?: unknown;
28
25
  };
29
26
  }
30
- /** What the stream reads of the session's source: the furthest position a read has reached, read
31
- * synchronously, and the session's last record before a message. */
32
- interface StreamSource2 {
33
- readonly reached: string;
34
- before(messageId: string): Promise<string>;
35
- }
36
27
  export declare class OpenCode2DeltaStream {
37
28
  private readonly reasoning;
38
29
  private journal;
@@ -45,15 +36,11 @@ export declare class OpenCode2DeltaStream {
45
36
  private readonly turn;
46
37
  /** The session's end while the turn's end is journaled. */
47
38
  private endedAt;
48
- /** The running step's message, and the session's last record before it once that is read. */
49
- private step;
50
- private session;
51
- private onError;
39
+ private anchor;
52
40
  /** @param reasoning Whether reasoning is published, and so streamed. */
53
41
  constructor(reasoning: boolean);
54
- /** Journal the elements of the session `source` reads from now on, once. A written line should
55
- * wake the emitter. */
56
- open(sessionID: string, source: StreamSource2, opts: Omit<DeltaJournalOptions, "anchor">): void;
42
+ /** Journal the elements of this session from now on. A written line wakes the emitter. */
43
+ open(sessionID: string, opts: Omit<DeltaJournalOptions, "anchor">): void;
57
44
  /** Follow one event of the session's event stream. */
58
45
  event(ev: StreamEvent2): void;
59
46
  /**
@@ -64,7 +51,5 @@ export declare class OpenCode2DeltaStream {
64
51
  */
65
52
  turnEnded(end: string): void;
66
53
  close(): void;
67
- private stepStarted;
68
54
  }
69
- export {};
70
55
  //# sourceMappingURL=stream2.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stream2.d.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IACpC,OAAO,CAAC,MAAM,CAAM;IAEpB,wEAAwE;gBAC3C,SAAS,EAAE,OAAO;IAE/C,0FAA0F;IAC1F,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,GAAG,IAAI;IAOxE,sDAAsD;IACtD,KAAK,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI;IA4B7B;;;;;OAKG;IACH,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAa5B,KAAK,IAAI,IAAI;CAId"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cotal-ai/connector-opencode",
3
3
  "description": "Cotal connector for OpenCode: a native in-process plugin that joins a session to the mesh.",
4
- "version": "0.182.0",
4
+ "version": "0.183.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -21,9 +21,9 @@
21
21
  "@cotal-ai/core": ">=0.1.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@cotal-ai/auth": "0.182.0",
25
- "@cotal-ai/connector-core": "0.182.0",
26
- "@cotal-ai/core": "0.182.0",
24
+ "@cotal-ai/auth": "0.183.0",
25
+ "@cotal-ai/connector-core": "0.183.0",
26
+ "@cotal-ai/core": "0.183.0",
27
27
  "@cotal-ai/smoke-kit": "0.0.0",
28
28
  "@nats-io/transport-node": "3.4.0",
29
29
  "@opencode-ai/plugin": "^1.16.2",