@khalilgharbaoui/opencode-claude-code-plugin 0.65.0 → 0.65.1
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 +2 -2
- package/dist/index.js +18 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/claude-code-plugin/SKILL.md +14 -4
package/README.md
CHANGED
|
@@ -63,7 +63,7 @@ Nothing in the picker? [Troubleshooting](./docs/troubleshooting/symptoms.md) is
|
|
|
63
63
|
| **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) |
|
|
64
64
|
| **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) |
|
|
65
65
|
| **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) |
|
|
66
|
-
| **`/btw` and `/claude-code-doctor`** | Side questions
|
|
66
|
+
| **`/btw` and `/claude-code-doctor`** | Side questions answered by the running Claude session itself, through Claude Code's own side channel, 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) |
|
|
67
67
|
| **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) |
|
|
68
68
|
| **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) |
|
|
69
69
|
|
|
@@ -78,7 +78,7 @@ Nothing in the picker? [Troubleshooting](./docs/troubleshooting/symptoms.md) is
|
|
|
78
78
|
|
|
79
79
|
The [full comparison](./docs/comparison.md) has nine rows, names the projects in the third column, and quotes their own READMEs.
|
|
80
80
|
|
|
81
|
-
On opencode 2.2.3 or later with one Claude login, also look at opencode's own **Claude Agent** provider: it drives your own `claude` too, runs every tool in opencode, and leaves your `~/.claude` setup out. The comparison has [a section on it](./docs/comparison.md#opencodes-built-in-claude-agent-provider), including what this plugin still adds (opencode 1.x, several accounts, your Claude Code setup, fast mode,
|
|
81
|
+
On opencode 2.2.3 or later with one Claude login, also look at opencode's own **Claude Agent** provider: it drives your own `claude` too, runs every tool in opencode, and leaves your `~/.claude` setup out. The comparison has [a section on it](./docs/comparison.md#opencodes-built-in-claude-agent-provider), including what this plugin still adds (opencode 1.x, several accounts, your Claude Code setup, fast mode, a subagent picker for model, effort and account, the sidebar). opencode 2's own `/btw` and per-call subagent `model` work with either.
|
|
82
82
|
|
|
83
83
|
## Built from measurements
|
|
84
84
|
|
package/dist/index.js
CHANGED
|
@@ -6834,17 +6834,24 @@ function ownCommandIn(content, context) {
|
|
|
6834
6834
|
if (block?.type !== "text" || typeof block.text !== "string") return null;
|
|
6835
6835
|
const name = leadingCommandName(block.text);
|
|
6836
6836
|
if (!name) return null;
|
|
6837
|
-
if (
|
|
6838
|
-
if (name.includes(":")
|
|
6839
|
-
|
|
6837
|
+
if (definedOnDisk(name, context)) return name;
|
|
6838
|
+
if (name.includes(":") && reportedByWorkspace.get(path6.resolve(context.cwd))?.has(name)) {
|
|
6839
|
+
return name;
|
|
6840
|
+
}
|
|
6841
|
+
return null;
|
|
6840
6842
|
}
|
|
6841
6843
|
function definedOnDisk(name, context) {
|
|
6844
|
+
const segments = name.split(":");
|
|
6845
|
+
if (segments.some((segment) => !segment || segment === "." || segment === ".." || segment.includes("\\"))) {
|
|
6846
|
+
return false;
|
|
6847
|
+
}
|
|
6848
|
+
const last = segments[segments.length - 1];
|
|
6842
6849
|
for (const root of commandRoots(context)) {
|
|
6843
|
-
const files = [
|
|
6850
|
+
const files = segments.length === 1 ? [
|
|
6844
6851
|
path6.join(root, "commands", `${name}.md`),
|
|
6845
6852
|
path6.join(root, "commands", name, "SKILL.md"),
|
|
6846
6853
|
path6.join(root, "skills", name, "SKILL.md")
|
|
6847
|
-
];
|
|
6854
|
+
] : [path6.join(root, "commands", ...segments.slice(0, -1), `${last}.md`)];
|
|
6848
6855
|
if (files.some(userInvocableFile)) return true;
|
|
6849
6856
|
}
|
|
6850
6857
|
return false;
|
|
@@ -6855,8 +6862,9 @@ function commandRoots(context) {
|
|
|
6855
6862
|
const home = os2.homedir();
|
|
6856
6863
|
const homeDir = home ? path6.resolve(home) : null;
|
|
6857
6864
|
let current = path6.resolve(context.cwd);
|
|
6858
|
-
while (
|
|
6859
|
-
|
|
6865
|
+
while (current !== homeDir) {
|
|
6866
|
+
roots.push(path6.join(current, ".claude"));
|
|
6867
|
+
if (fs4.existsSync(path6.join(current, ".git"))) break;
|
|
6860
6868
|
const parent = path6.dirname(current);
|
|
6861
6869
|
if (parent === current) break;
|
|
6862
6870
|
current = parent;
|
|
@@ -21156,6 +21164,9 @@ var ClaudeCodeLanguageModel = class {
|
|
|
21156
21164
|
if (state.accountLimitHit && msg.is_error === true) {
|
|
21157
21165
|
state.resultFailure ??= "usage_limit";
|
|
21158
21166
|
}
|
|
21167
|
+
if (msg.is_error === true) {
|
|
21168
|
+
state.resultFailure ??= "error";
|
|
21169
|
+
}
|
|
21159
21170
|
if (runAutoContinue(state, msg)) return;
|
|
21160
21171
|
if (!compactionMode && affinity !== "default" && msg.is_error !== true && state.resultFailure === void 0) {
|
|
21161
21172
|
const start = takeTurnStart(sk);
|