@khalilgharbaoui/opencode-claude-code-plugin 0.58.0 → 0.60.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/index.d.ts CHANGED
@@ -128,13 +128,26 @@ interface V2CommandDefinition {
128
128
  readonly description?: string;
129
129
  readonly execute: (input: V2CommandInvocation) => Promise<void>;
130
130
  }
131
- /** `session.deleted` is the one event this plugin acts on. */
131
+ /**
132
+ * A bus event. Acted on: `session.deleted`, `session.execution.started` /
133
+ * `succeeded` / `failed` / `interrupted` (with `reason`, measured on 2.0.31,
134
+ * h #g253), and the never-emitted-there `session.status` / `session.idle`.
135
+ */
132
136
  interface V2Event {
133
137
  readonly type?: string;
134
138
  readonly data?: {
135
139
  readonly sessionID?: string;
136
140
  } & Record<string, unknown>;
137
141
  }
142
+ /**
143
+ * `ctx.rpc.register`'s result (`@opencode/plugin` 2.0.31 `RpcRegistration`):
144
+ * a registration whose events travel on the bus as `rpc.<id>.<event>`.
145
+ */
146
+ interface V2RpcRegistration extends V2Registration {
147
+ readonly events: {
148
+ emit(name: string, data: Record<string, unknown>): Promise<void>;
149
+ };
150
+ }
138
151
  interface V2Context {
139
152
  readonly app: {
140
153
  readonly version: string;
@@ -167,6 +180,14 @@ interface V2Context {
167
180
  signal?: AbortSignal;
168
181
  }): AsyncIterable<V2Event>;
169
182
  };
183
+ /**
184
+ * Absent before 2.0.31's measured shape: the definition is plain JSON
185
+ * Schema, which `Rpc.PortableDefinition` accepts, and the handlers object is
186
+ * empty because the definition declares no methods.
187
+ */
188
+ readonly rpc?: {
189
+ register(definition: unknown, handlers: Record<string, never>): Promise<V2RpcRegistration>;
190
+ };
170
191
  readonly skill?: {
171
192
  transform(callback: (editor: {
172
193
  get(id: string): unknown;
@@ -1490,6 +1511,13 @@ declare class ClaudeCodeLanguageModel implements LanguageModelV3 {
1490
1511
  * claim taken: a choice must never land on the wrong child (h #g227).
1491
1512
  */
1492
1513
  private resolveDispatchChoice;
1514
+ /**
1515
+ * The model the parent named for THIS session in its own `task` call, or
1516
+ * undefined (h #g254). The same two lookups as `resolveDispatchChoice`, and
1517
+ * the same reason for the order: a held record first, and the parent fetched
1518
+ * only for a child whose agent and first message match a recorded request.
1519
+ */
1520
+ private resolveExplicitTaskModel;
1493
1521
  /**
1494
1522
  * Whether the ExitPlanMode approval bridge is live for this turn: the
1495
1523
  * operator opted in AND opencode's registry actually has the `question`
@@ -1549,8 +1577,6 @@ declare class ClaudeCodeLanguageModel implements LanguageModelV3 {
1549
1577
  * 3. `"default"`.
1550
1578
  */
1551
1579
  private sessionAffinity;
1552
- private controlRequestBehaviorForTool;
1553
- private writeControlResponse;
1554
1580
  /**
1555
1581
  * Handle Claude stream-json control requests (`can_use_tool`, etc.) and
1556
1582
  * respond via stdin with a matching `control_response`.
@@ -1567,7 +1593,6 @@ declare class ClaudeCodeLanguageModel implements LanguageModelV3 {
1567
1593
  */
1568
1594
  private resolveCompactionModel;
1569
1595
  private thinkingCliOptions;
1570
- private latestUserText;
1571
1596
  private synthesizeTitle;
1572
1597
  /**
1573
1598
  * Aggregates the one turn implementation into a `doGenerate` result.