@rockysoft/opencode-hybrid-workflow 0.3.3-beta.4 → 0.4.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 +14 -3
- package/core/plugin.mjs +1 -1
- package/docs/CHANGELOG.md +15 -0
- package/docs/configuration.md +1 -1
- package/index.js +1 -1
- package/package.json +2 -2
- package/sidebar/legacy-totals.mjs +18 -0
- package/tui.js +3 -4
package/README.md
CHANGED
|
@@ -9,13 +9,15 @@ One plugin. One or two reviewers. Configure everything inside OpenCode.
|
|
|
9
9
|
## 1. Install
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
|
-
opencode plugin add @rockysoft/opencode-hybrid-workflow@
|
|
12
|
+
opencode plugin add @rockysoft/opencode-hybrid-workflow@latest
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|

|
|
16
16
|
|
|
17
17
|
Open `opencode` in your project. The setup wizard opens automatically.
|
|
18
18
|
|
|
19
|
+
To configure it later, type **`/hybrid`** or choose **Hybrid Workflow: settings** in the command palette. OpenCode lists **Hybrid-Workflow** under both **TUI** (sidebar/settings) and **Server** (planning/reviews). These are two parts of one plugin; `/plugins` manages loading, while `/hybrid` opens configuration.
|
|
20
|
+
|
|
19
21
|
## 2. Choose your reviewers
|
|
20
22
|
|
|
21
23
|
Select **one** reviewer or **two** for independent planning and review.
|
|
@@ -152,11 +154,20 @@ Choose **Run diagnostics**. Select any row for details. This does not call a mod
|
|
|
152
154
|
The sidebar shows reviewer input, output, cache tokens and costs at known API rates. These are not subscription charges. **Clear totals** resets the display, not review history.
|
|
153
155
|
|
|
154
156
|
```sh
|
|
155
|
-
opencode plugin update @rockysoft/opencode-hybrid-workflow@
|
|
157
|
+
opencode plugin update @rockysoft/opencode-hybrid-workflow@latest
|
|
156
158
|
```
|
|
157
159
|
|
|
158
160
|
Reopen OpenCode after updating.
|
|
159
161
|
|
|
162
|
+
If you originally installed `@beta`, switch channels once:
|
|
163
|
+
|
|
164
|
+
```sh
|
|
165
|
+
opencode plugin remove @rockysoft/opencode-hybrid-workflow@beta
|
|
166
|
+
opencode plugin add @rockysoft/opencode-hybrid-workflow@latest
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
This changes the package entry and preserves Hybrid settings and task history.
|
|
170
|
+
|
|
160
171
|
<details>
|
|
161
172
|
<summary><strong>Moving from a local/archive installation</strong></summary>
|
|
162
173
|
|
|
@@ -164,4 +175,4 @@ Remove the old plugin entries from `opencode.json` and `cli.json` before adding
|
|
|
164
175
|
|
|
165
176
|
</details>
|
|
166
177
|
|
|
167
|
-
[Advanced configuration](https://cdn.jsdelivr.net/npm/@rockysoft/opencode-hybrid-workflow@0.
|
|
178
|
+
[Advanced configuration](https://cdn.jsdelivr.net/npm/@rockysoft/opencode-hybrid-workflow@0.4.0/docs/configuration.md) · [MIT license](https://cdn.jsdelivr.net/npm/@rockysoft/opencode-hybrid-workflow@0.4.0/LICENSE) · [Third-party notices](https://cdn.jsdelivr.net/npm/@rockysoft/opencode-hybrid-workflow@0.4.0/THIRD_PARTY_NOTICES.md)
|
package/core/plugin.mjs
CHANGED
|
@@ -14,7 +14,7 @@ const here = path.dirname(fileURLToPath(import.meta.url));
|
|
|
14
14
|
import { FRONTEND_COMMON, FRONTEND_BUILD } from './frontend-policy.mjs';
|
|
15
15
|
export const readTools = /^(read|glob|grep|list|ls|skill|webfetch|websearch|todowrite|todoread|question|subagent|hybrid_checkpoint|hybrid_activity|context7_.+|serena_(find_symbol|find_referencing_symbols|get_symbols_overview|search_for_pattern|read_file|list_dir|find_file|read_memory|list_memories|initial_instructions|check_onboarding_performed)|playwright_browser_(snapshot|take_screenshot|console_messages|network_requests))$/;
|
|
16
16
|
export function createPlugin(config, storage = config.runtimeDirectory ?? path.join(here, 'runtime')) { return {
|
|
17
|
-
id: '
|
|
17
|
+
id: 'Hybrid-Workflow',
|
|
18
18
|
async setup(ctx) {
|
|
19
19
|
if (!config.enabled) return; // Inert until explicit later activation.
|
|
20
20
|
const compatible = config.compatibleOpenCode ?? [config.targetOpenCode];
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Release notes
|
|
2
2
|
|
|
3
|
+
## 0.4.1
|
|
4
|
+
|
|
5
|
+
- Use Hybrid-Workflow for both entries in OpenCode�s plugin list.
|
|
6
|
+
- Preserve existing usage display resets when upgrading from the previous internal names.
|
|
7
|
+
- Clarify how to open settings and switch from the beta channel.
|
|
8
|
+
|
|
9
|
+
## 0.4.0
|
|
10
|
+
|
|
11
|
+
- Search frozen source and batch-read file ranges through every reviewer connection.
|
|
12
|
+
- Receive exact change hunks and shared source evidence with full-source access preserved.
|
|
13
|
+
- Inspect workflow timings and usage in diagnostics.
|
|
14
|
+
- Recover interrupted checkpoint work without discarding completed reports.
|
|
15
|
+
|
|
16
|
+
This release brings the tested 0.3.3 beta improvements to the default installation channel. Existing settings and task history are preserved.
|
|
17
|
+
|
|
3
18
|
## 0.3.3-beta.4
|
|
4
19
|
|
|
5
20
|
- Reviewers can search frozen source and read several file ranges in one call, through OpenCode providers or the Codex/Claude CLI adapters.
|
package/docs/configuration.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Use Hybrid Workflow settings inside OpenCode for routine setup. These details are for advanced configuration and migration.
|
|
4
4
|
|
|
5
|
-
For terminal commands below, use `npx --package @rockysoft/opencode-hybrid-workflow@
|
|
5
|
+
For terminal commands below, use `npx --package @rockysoft/opencode-hybrid-workflow@latest opencode-hybrid` in place of `opencode-hybrid` unless you installed the standalone CLI globally.
|
|
6
6
|
|
|
7
7
|
## Configuration
|
|
8
8
|
|
package/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import {installNativeReviewer} from './lib/opencode-reviewer.mjs';
|
|
|
3
3
|
import {createPlugin} from './core/plugin.mjs';
|
|
4
4
|
import {readSettings,runtimeFor} from './lib/config.mjs';
|
|
5
5
|
import {registerSettings} from './lib/settings-service.mjs';
|
|
6
|
-
export default {id:'
|
|
6
|
+
export default {id:'Hybrid-Workflow', async setup(ctx) {
|
|
7
7
|
await registerSettings(ctx,ctx.options);
|
|
8
8
|
const config=readSettings(ctx.options);
|
|
9
9
|
if(!config.enabled)return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rockysoft/opencode-hybrid-workflow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Portable configurable-reviewer planning, design, implementation checkpoints and usage sidebar for OpenCode 2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"publishConfig": {
|
|
16
16
|
"access": "public",
|
|
17
|
-
"tag": "
|
|
17
|
+
"tag": "latest"
|
|
18
18
|
},
|
|
19
19
|
"exports": {
|
|
20
20
|
".": "./index.js",
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {readFileSync,lstatSync} from 'node:fs';
|
|
2
|
+
import {homedir} from 'node:os';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
|
|
5
|
+
// OpenCode scopes TUI storage by plugin ID. Seed the renamed store from the
|
|
6
|
+
// previous ID; an existing new store takes precedence in context.storage.store.
|
|
7
|
+
// Never move/delete the old file: earlier package versions can still read it.
|
|
8
|
+
export function legacyTotals(channel,env=process.env,home=homedir()) {
|
|
9
|
+
if(typeof channel!=='string'||!/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/.test(channel))return {resets:{}};
|
|
10
|
+
const file=path.join(env.XDG_STATE_HOME||path.join(home,'.local','state'),'opencode',channel,'tui','plugin.personal.hybrid-usage.totals.json');
|
|
11
|
+
try {
|
|
12
|
+
const stat=lstatSync(file);
|
|
13
|
+
if(!stat.isFile()||stat.isSymbolicLink()||stat.nlink!==1)return {resets:{}};
|
|
14
|
+
const value=JSON.parse(readFileSync(file,'utf8'));
|
|
15
|
+
if(value?.resets&&typeof value.resets==='object'&&!Array.isArray(value.resets))return {resets:value.resets};
|
|
16
|
+
}catch{}
|
|
17
|
+
return {resets:{}};
|
|
18
|
+
}
|
package/tui.js
CHANGED
|
@@ -13,8 +13,9 @@ import { readSettings } from './lib/config.mjs';
|
|
|
13
13
|
import { createReader, cards, number, money } from './sidebar/reader.mjs';
|
|
14
14
|
import { captureTotals } from './core/dashboard-state.js';
|
|
15
15
|
import { createSettingsUI } from './sidebar/settings.mjs';
|
|
16
|
+
import { legacyTotals } from './sidebar/legacy-totals.mjs';
|
|
16
17
|
export default Plugin.define({
|
|
17
|
-
id: '
|
|
18
|
+
id: 'Hybrid-Workflow',
|
|
18
19
|
setup(context) {
|
|
19
20
|
const preferences = createSettingsUI(context);
|
|
20
21
|
context.keymap.layer(() => ({
|
|
@@ -57,9 +58,7 @@ export default Plugin.define({
|
|
|
57
58
|
};
|
|
58
59
|
const read = createReader(settings);
|
|
59
60
|
const [saved, update] = context.storage.store('totals', {
|
|
60
|
-
initial:
|
|
61
|
-
resets: {}
|
|
62
|
-
}
|
|
61
|
+
initial: legacyTotals(context.app.channel)
|
|
63
62
|
});
|
|
64
63
|
function Usage(props) {
|
|
65
64
|
const [snapshot, setSnapshot] = createSignal(null);
|