@khalilgharbaoui/opencode-claude-code-plugin 0.38.0 → 0.40.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/README.md CHANGED
@@ -13,6 +13,7 @@
13
13
  [![GitHub forks](https://img.shields.io/github/forks/khalilgharbaoui/opencode-claude-code-plugin?style=flat-square&label=forks&labelColor=15181E&color=FFC46B)](https://github.com/khalilgharbaoui/opencode-claude-code-plugin/forks)
14
14
  [![Contributors](https://img.shields.io/github/contributors/khalilgharbaoui/opencode-claude-code-plugin?style=flat-square&label=contributors&labelColor=15181E&color=FFC46B)](https://github.com/khalilgharbaoui/opencode-claude-code-plugin/graphs/contributors)
15
15
  [![Tests](https://img.shields.io/endpoint?url=https%3A%2F%2Fopencode-claude-code-plugin.dev%2Fbadges%2Ftests.json&style=flat-square)](https://opencode-claude-code-plugin.dev/internals/testing/)
16
+ [![Models](https://img.shields.io/endpoint?url=https%3A%2F%2Fopencode-claude-code-plugin.dev%2Fbadges%2Fmodels.json&style=flat-square)](./docs/models.md)
16
17
  [![Publish](https://img.shields.io/github/actions/workflow/status/khalilgharbaoui/opencode-claude-code-plugin/publish.yml?style=flat-square&label=publish&labelColor=15181E)](https://github.com/khalilgharbaoui/opencode-claude-code-plugin/actions/workflows/publish.yml)
17
18
  [![License](https://img.shields.io/github/license/khalilgharbaoui/opencode-claude-code-plugin?style=flat-square&label=license&labelColor=15181E&color=FFC46B)](./LICENSE)
18
19
  [![Buy me a coffee](https://img.shields.io/badge/support-buy%20me%20a%20coffee-FFC46B?style=flat-square&labelColor=15181E&logo=buymeacoffee&logoColor=FFC46B)](https://www.buymeacoffee.com/khalilgharbaoui)
@@ -57,7 +58,7 @@ Nothing in the picker? [Troubleshooting](./docs/troubleshooting/symptoms.md) is
57
58
  | **Claude's own tools, MCP and skills** | `Read`, `Grep`, `Glob`, `WebSearch` run in Claude Code; your opencode MCP servers are bridged in; your opencode skills can be staged for Claude's `Skill` tool. [MCP](./docs/configuration/mcp.md) · [Skills](./docs/configuration/skills.md) |
58
59
  | **Several accounts** | `"accounts": ["personal", "work"]` becomes one provider per account. Out of usage mid-task? One line says which account, which window and when it resets in your own time zone, and names the others to pick a model from. [Accounts](./docs/configuration/accounts.md) |
59
60
  | **Subagents: your account, their model** | `forceModel`, `reasoningEffort` and `cacheTtl` in an agent file, inheriting the caller's account. `task_batch` runs several subagents at once. [Subagents](./docs/configuration/subagents.md) |
60
- | **18 models, reasoning variants, fast mode** | Haiku 4.5 through Opus 5.5, Fable and Mythos, each with a `(N×)` list-price suffix, `low` to `max` effort variants, and a fallback chain for a model this account cannot run today. [Models](./docs/models.md) |
61
+ | **The whole model range, reasoning variants, fast mode** | Haiku 4.5 through Opus 5.5, Fable and Mythos, each with a `(N×)` list-price suffix, `low` to `max` effort variants, and a fallback chain for a model this account cannot run today. The badge above counts them. [Models](./docs/models.md) |
61
62
  | **`/btw` and `/claude-code-doctor`** | Side questions on the live process, and a health report whose `bundle` form is redacted by allowlist so it is safe to paste into a public issue. [`/btw`](./docs/guides/btw.md) · [Doctor](./docs/guides/doctor.md) |
62
63
  | **Ships its own setup skill** | Ask Claude to configure it. The bundled `claude-code-plugin` skill knows every option, env var, model id and troubleshooting rule, is staged into Claude Code on every spawn, and tests keep it in step with the code. [Skills](./docs/configuration/skills.md) |
63
64
  | **Read-only preset, plan mode** | `"permissionPreset": "read-only"` holds at the CLI, the proxy and the permission layer at once. [Permissions](./docs/configuration/permissions.md) |
@@ -75,7 +76,7 @@ The [full comparison](./docs/comparison.md) has nine rows, names the projects in
75
76
 
76
77
  ## Built from measurements
77
78
 
78
- A dozen test files drive a fake `claude` through real turns: the stream parser, the proxy broker, both watchdogs, abort, respawn, account failover and the model fallback chain are exercised end to end. Every rule in [`AGENTS.md`](./AGENTS.md) names the probe, the version and the number that produced it, and the evidence lives in [`docs/agents-history.md`](./docs/agents-history.md). Two runtime dependencies. The [site](https://opencode-claude-code-plugin.dev/) reports the live numbers, rebuilt daily.
79
+ A dozen test files drive a fake `claude` through real turns: the stream parser, the proxy broker, both watchdogs, abort, respawn, account failover and the model fallback chain are exercised end to end. Every rule in [`AGENTS.md`](./AGENTS.md) names the probe, the version and the number that produced it, and the evidence lives in [`docs/agents-history.md`](./docs/agents-history.md). Two runtime dependencies. The [site](https://opencode-claude-code-plugin.dev/) reports the live numbers: it rebuilds itself after every release, on every push that moves a figure, and every six hours.
79
80
 
80
81
  ## Documentation
81
82
 
package/dist/index.d.ts CHANGED
@@ -422,6 +422,8 @@ interface ClaudeCodeConfig {
422
422
  turnStats?: boolean;
423
423
  /** Branch a forked opencode session off the parent's Claude conversation. */
424
424
  forkSessions?: boolean;
425
+ /** Resume a conversation's Claude session after opencode restarts. Default true. */
426
+ resumeAfterRestart?: boolean;
425
427
  logging?: LoggingConfig;
426
428
  }
427
429
  interface LoggingConfig {
@@ -794,6 +796,22 @@ interface ClaudeCodeProviderSettings {
794
796
  * `--fork-session` flag.
795
797
  */
796
798
  forkSessions?: boolean;
799
+ /**
800
+ * Resume a conversation's Claude session after opencode restarts, instead
801
+ * of replaying the whole thread as text into a fresh one. Default `true`.
802
+ *
803
+ * The plugin's map from a conversation to its Claude session lives in
804
+ * memory, so the first turn in a new opencode process used to resend the
805
+ * whole history (up to 981,109 characters in the maintainer's log). After
806
+ * every successful turn the session id is written to
807
+ * `$XDG_STATE_HOME/opencode-claude-code-plugin/claude-sessions.json` with a
808
+ * digest chain of the conversation it answered, and the next process
809
+ * resumes only when the same binary served it, its transcript is still on
810
+ * disk, and this turn's history is that exact conversation plus Claude's
811
+ * own reply. An edited, reverted or compacted conversation replays as
812
+ * before. `false` never reads or writes the file.
813
+ */
814
+ resumeAfterRestart?: boolean;
797
815
  /**
798
816
  * Routing for Claude's built-in `WebSearch` tool.
799
817
  *