@cotal-ai/connector-opencode 0.132.1 → 0.132.3
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/plugin/index.js +15 -15
- package/dist/plugin.d.ts +38 -4
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin2.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/plugin.d.ts
CHANGED
|
@@ -27,15 +27,49 @@ export declare function verifyServerModel(serverUrl: string, serverAuth: string,
|
|
|
27
27
|
declare function settleWithin(work: Promise<unknown> | undefined, ms: number, what: string): Promise<boolean>;
|
|
28
28
|
export { settleWithin };
|
|
29
29
|
/**
|
|
30
|
-
* The buffered-inbox + pending-run-turn composition that goes out ahead of a native prompt
|
|
31
|
-
*
|
|
32
|
-
* mutator, so the two callers cannot drift on what "inject" means. Returns `undefined` when there is
|
|
33
|
-
* nothing to prepend.
|
|
30
|
+
* The buffered-inbox + pending-run-turn composition that goes out ahead of a native prompt, read by
|
|
31
|
+
* {@link SurfacedBatch.inject}. Returns `undefined` when there is nothing to prepend.
|
|
34
32
|
*/
|
|
35
33
|
export declare function computeInjection(agent: MeshAgent): {
|
|
36
34
|
prefix: string;
|
|
37
35
|
surfacedIds: string[];
|
|
38
36
|
turnIds: string[];
|
|
39
37
|
} | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* The inbox batch a turn carries, by receive key: THE SEAT'S ACK BOUNDARY, defined here once and
|
|
40
|
+
* driven by both adapters (the 1.x hooks below and `plugin2.ts`), so they cannot drift on what is
|
|
41
|
+
* acked when a turn ends and what is left to redeliver. A batch is surfaced into a turn and held in
|
|
42
|
+
* flight while it runs; the turn's end acks it when the turn finished or was stopped, and releases
|
|
43
|
+
* it when the turn failed. It is OPEN from the surface until that end, and a native prompt carries
|
|
44
|
+
* nothing while it is: its deliveries are still in the inbox, so a second batch would carry them
|
|
45
|
+
* again and settle them with a turn that never ran them.
|
|
46
|
+
*/
|
|
47
|
+
export declare class SurfacedBatch {
|
|
48
|
+
private readonly agent;
|
|
49
|
+
private carried;
|
|
50
|
+
private inTurn;
|
|
51
|
+
constructor(agent: MeshAgent);
|
|
52
|
+
/** A surfaced batch's turn has not ended yet. */
|
|
53
|
+
get open(): boolean;
|
|
54
|
+
/** The receive keys the batch carries. */
|
|
55
|
+
get keys(): readonly string[];
|
|
56
|
+
/** Make `keys` the batch, HELD IN FLIGHT for as long as its turn runs. A turn outlasting the
|
|
57
|
+
* consumer's ack wait is ordinary, and while the batch is held the agent restarts that wait, so
|
|
58
|
+
* the broker does not hand a role request this seat is still working on to another reader of its
|
|
59
|
+
* role. Refused at the hold ceiling, and then nothing may be surfaced. */
|
|
60
|
+
surface(keys: string[]): boolean;
|
|
61
|
+
/** Carry the buffered inbox and pending run turns into a native prompt, returning the prefix that
|
|
62
|
+
* goes ahead of its text, or `undefined` when there is nothing to carry or a batch is open. The
|
|
63
|
+
* inbox keys it carries become the open batch; run turns alone open none, having nothing to ack.
|
|
64
|
+
* The prompt running with the prefix in place IS the delivery, so the run turns commit here. */
|
|
65
|
+
inject(): string | undefined;
|
|
66
|
+
/** Ack exactly the surfaced deliveries by their receive keys (#624: an id-less item's wire id
|
|
67
|
+
* would be "", unaddressable). Overflow may already have removed some; MeshAgent marks every
|
|
68
|
+
* confirmed delivery handled while only acking entries still present. */
|
|
69
|
+
ack(): void;
|
|
70
|
+
/** Stop holding the batch: its deliveries are no longer renewed, so whatever is still unacked
|
|
71
|
+
* redelivers once its ack wait runs out. */
|
|
72
|
+
abandon(): void;
|
|
73
|
+
}
|
|
40
74
|
export declare const cotal: Plugin;
|
|
41
75
|
//# sourceMappingURL=plugin.d.ts.map
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAuCA,OAAO,EAIL,SAAS,EAsBV,MAAM,0BAA0B,CAAC;AAMlC,OAAO,KAAK,EA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,gBAAgB,EAAkB,MAAM,sBAAsB,CAAC;AAgB7E;;;;8EAI8E;AAC9E,eAAO,MAAM,oBAAoB,QAAS,CAAC;AAoC3C,4CAA4C;AAC5C,wBAAsB,UAAU,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"plugin2.d.ts","sourceRoot":"","sources":["../src/plugin2.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,gBAAgB,EAAkB,MAAM,sBAAsB,CAAC;AAgB7E;;;;8EAI8E;AAC9E,eAAO,MAAM,oBAAoB,QAAS,CAAC;AAoC3C,4CAA4C;AAC5C,wBAAsB,UAAU,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CA6V7F"}
|
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.132.
|
|
4
|
+
"version": "0.132.3",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"@cotal-ai/core": ">=0.1.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@cotal-ai/connector-core": "0.132.
|
|
25
|
-
"@cotal-ai/core": "0.132.
|
|
24
|
+
"@cotal-ai/connector-core": "0.132.3",
|
|
25
|
+
"@cotal-ai/core": "0.132.3",
|
|
26
26
|
"@cotal-ai/smoke-kit": "0.0.0",
|
|
27
27
|
"@nats-io/transport-node": "^3.4.0",
|
|
28
28
|
"@opencode-ai/plugin": "^1.16.2",
|