@khalilgharbaoui/opencode-claude-code-plugin 0.60.1 → 0.61.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 +27 -12
- package/dist/index.js +217 -68
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/claude-code-plugin/SKILL.md +18 -5
package/dist/index.d.ts
CHANGED
|
@@ -473,6 +473,8 @@ interface ClaudeCodeConfig {
|
|
|
473
473
|
bridgeSkipNativeSkills?: boolean;
|
|
474
474
|
/** Append a one-line cost / duration / cache footer to each finished turn. */
|
|
475
475
|
turnStats?: boolean;
|
|
476
|
+
/** Turn Claude Code's todo tools on for every model (`CLAUDE_CODE_ENABLE_TODO_TOOLS=1`). */
|
|
477
|
+
enableTodoTools?: boolean;
|
|
476
478
|
/** Branch a forked opencode session off the parent's Claude conversation. */
|
|
477
479
|
forkSessions?: boolean;
|
|
478
480
|
/** Resume a conversation's Claude session after opencode restarts. Default true. */
|
|
@@ -992,6 +994,19 @@ interface ClaudeCodeProviderSettings {
|
|
|
992
994
|
* `permission_denials` always reach `providerMetadata`.
|
|
993
995
|
*/
|
|
994
996
|
turnStats?: boolean;
|
|
997
|
+
/**
|
|
998
|
+
* Start every `claude` with `CLAUDE_CODE_ENABLE_TODO_TOOLS=1`, so the CLI
|
|
999
|
+
* offers its todo tools (`TaskCreate` and family) whatever the model.
|
|
1000
|
+
* Claude Code offers them on its own only to Claude 3.x, Opus 4.0 to 4.7,
|
|
1001
|
+
* Sonnet 4.0 to 4.6 and Haiku 4.5; on Opus 4.8, the 5.x models and Fable
|
|
1002
|
+
* no todo list reaches opencode without this (h #g259).
|
|
1003
|
+
*
|
|
1004
|
+
* Off by default, because the CLI turned the tools off for those models on
|
|
1005
|
+
* purpose. Fills a gap only: a `CLAUDE_CODE_ENABLE_TODO_TOOLS` already in
|
|
1006
|
+
* opencode's environment, `0` included, is passed through and decides.
|
|
1007
|
+
* Never on a compaction spawn, which runs no tools.
|
|
1008
|
+
*/
|
|
1009
|
+
enableTodoTools?: boolean;
|
|
995
1010
|
/**
|
|
996
1011
|
* When a new opencode session turns out to be a fork of one this provider
|
|
997
1012
|
* already served, branch the parent's Claude conversation with
|
|
@@ -1634,22 +1649,22 @@ declare class ClaudeCodeLanguageModel implements LanguageModelV3 {
|
|
|
1634
1649
|
* switch, and outside `runModelChain` on purpose: an account switch starts
|
|
1635
1650
|
* that account's own model chain from the top.
|
|
1636
1651
|
*
|
|
1637
|
-
* Anything but `"auto"` is `runModelChain`
|
|
1638
|
-
* `"
|
|
1639
|
-
*
|
|
1640
|
-
*
|
|
1641
|
-
*
|
|
1642
|
-
*
|
|
1643
|
-
* attempt did not switch.
|
|
1652
|
+
* Anything but `"auto"` is `runModelChain` behind `stopOnCancel`. With
|
|
1653
|
+
* `"auto"`, the attempt that failed decides the switch itself
|
|
1654
|
+
* (`completeResult` sets `run.switchTo` and closes its stream without a
|
|
1655
|
+
* `finish`), and the next attempt's prologue makes the switch the form's pick
|
|
1656
|
+
* would have made. This only splices the attempts into one caller turn: one
|
|
1657
|
+
* `stream-start`, and the `finish` of whichever attempt did not switch.
|
|
1644
1658
|
*
|
|
1645
1659
|
* The bound is `run.tried`, as it is `tried` for the model chain: every
|
|
1646
1660
|
* account spawned or switched to goes in, and none in it is picked again.
|
|
1647
1661
|
*
|
|
1648
|
-
* Cancelling the returned stream is a stop,
|
|
1649
|
-
* the
|
|
1650
|
-
*
|
|
1651
|
-
*
|
|
1652
|
-
* starts no further account
|
|
1662
|
+
* Cancelling the returned stream is a stop, in every mode: a caller that has
|
|
1663
|
+
* gone away must reach the turn it started, or the CLI runs it to the end
|
|
1664
|
+
* and bills it. Each attempt gets a signal that the caller's own
|
|
1665
|
+
* `abortSignal` and a `cancel()` both abort, so a cancel takes the turn's
|
|
1666
|
+
* ordinary abort path, and with `"auto"` the loop starts no further account
|
|
1667
|
+
* once either has happened. Until (h #g257) only `"auto"` did this.
|
|
1653
1668
|
*/
|
|
1654
1669
|
private runAccountFailover;
|
|
1655
1670
|
/**
|