@cotal-ai/connector-opencode 0.172.1 → 0.173.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":"extension.d.ts","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,SAAS,EAA8F,MAAM,gBAAgB,CAAC;AA8KtJ;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAoM/B,CAAC"}
1
+ {"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,SAAS,EAA8F,MAAM,gBAAgB,CAAC;AA+KtJ;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAyL/B,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * A failed OpenCode turn, relayed as the presence condition (SPEC §6).
3
+ *
4
+ * Without it a failed turn left the seat at plain `idle`, which every observer reads as "finished
5
+ * and fine": a seat whose provider rejected every turn with a 401 looked healthy. The condition
6
+ * carries OpenCode's own error: its native kind verbatim as `source`, its message as `message`.
7
+ *
8
+ * Only native kinds that name one category map to a specific code; every other failure is `failed`,
9
+ * so nothing here classifies an error OpenCode did not. Both lines name their errors natively:
10
+ * - 1.x: the `session.error` payload is a tagged union keyed by `name` (`ProviderAuthError`,
11
+ * `APIError`, `MessageOutputLengthError`, `UnknownError`, ...), its text in `data.message`.
12
+ * - 2.x: `session.execution.failed` carries `error: { type, message }`, with `type` from OpenCode's
13
+ * `provider.*` family (measured on 2.2.5: a provider 401 is `provider.auth`, "Missing API key").
14
+ */
15
+ import type { PresenceCondition } from "@cotal-ai/core";
16
+ /** OpenCode 1.x `session.error` payload → condition. Shape-tolerant: a payload with no name is
17
+ * still a failed turn, one that cannot say its kind. */
18
+ export declare function opencode1FailureCondition(error: unknown): PresenceCondition;
19
+ /** OpenCode 2.x `session.execution.failed` data → condition. */
20
+ export declare function opencode2FailureCondition(data: Record<string, unknown> | undefined): PresenceCondition;
21
+ //# sourceMappingURL=failure-condition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"failure-condition.d.ts","sourceRoot":"","sources":["../src/failure-condition.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAyB,MAAM,gBAAgB,CAAC;AAiC/E;yDACyD;AACzD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,iBAAiB,CAG3E;AAED,gEAAgE;AAChE,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,iBAAiB,CAGtG"}