@rockysoft/opencode-hybrid-workflow 0.4.0 → 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 CHANGED
@@ -16,6 +16,8 @@ opencode plugin add @rockysoft/opencode-hybrid-workflow@latest
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.
@@ -157,6 +159,15 @@ opencode plugin update @rockysoft/opencode-hybrid-workflow@latest
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
 
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: 'personal.hybrid-checkpoints',
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,11 @@
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
+
3
9
  ## 0.4.0
4
10
 
5
11
  - Search frozen source and batch-read file ranges through every reviewer connection.
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:'personal.hybrid-checkpoints', async setup(ctx) {
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.4.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",
@@ -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: 'personal.hybrid-usage',
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);