opencode-work-context 0.1.7 → 0.1.9

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
@@ -94,12 +94,14 @@ Generated files:
94
94
  - `.work-context/config.yaml` for filesystem configuration;
95
95
  - `.opencode/commands/wc.md` for the `/wc` command contract;
96
96
  - `.opencode/plugins/work-context.js` as a thin loader from the installed package;
97
+ - `.opencode/tui-plugins/work-context-stages.js` as the reactive stages-panel loader;
97
98
  - `.work-context/local/` in `.gitignore` for personal session events.
98
99
  - `<workspace>/KNOWLEDGE.md` is the canonical durable knowledge ledger and is
99
100
  created on the first explicit knowledge operation.
100
101
 
101
- The optional read-only stages panel is a separate TUI plugin. Add a project-local
102
- loader outside OpenCode's server-plugin autoscan at `.opencode/tui-plugins/work-context-stages.js`:
102
+ The optional read-only stages panel is a separate TUI plugin. `init` installs a
103
+ project-local loader outside OpenCode's server-plugin autoscan at
104
+ `.opencode/tui-plugins/work-context-stages.js` and enables it in `.opencode/tui.json`:
103
105
 
104
106
  ```js
105
107
  export { default } from "opencode-work-context/tui";
@@ -19,12 +19,32 @@ const dependencyManifestFile = path.join(dependencyRoot, "package.json");
19
19
  let dependencyManifest = {};
20
20
  try { dependencyManifest = JSON.parse(fs.readFileSync(dependencyManifestFile, "utf8")); } catch {}
21
21
  const pluginLoader = `export { default } from "${packageManifest.name}/plugin";\n`;
22
+ const tuiLoader = `import { createSignal } from "solid-js";
23
+ import { jsx } from "@opentui/solid/jsx-runtime";
24
+ import plugin from "${packageManifest.name}/tui";
25
+
26
+ export default {
27
+ ...plugin,
28
+ async tui(api, options) {
29
+ return plugin.tui(api, {
30
+ ...options,
31
+ runtime: { createSignal, jsx },
32
+ });
33
+ },
34
+ };
35
+ `;
36
+ const tuiConfig = JSON.stringify({
37
+ $schema: "https://opencode.ai/tui.json",
38
+ plugin: ["./tui-plugins/work-context-stages.js"],
39
+ }, null, 2) + "\n";
22
40
  const command = fs.readFileSync(path.join(packageRoot, "commands", "wc.md"), "utf8");
23
41
  const generated = new Map([
24
42
  [path.join(".work-context", "config.yaml"), defaultConfig()],
25
43
  [path.join(".opencode", "commands", "wc.md"), command],
26
44
  [path.join(".opencode", "plugins", "work-context.js"), `// Thin project integration; tools remain in the installed npm package.
27
45
  ${pluginLoader}`],
46
+ [path.join(".opencode", "tui-plugins", "work-context-stages.js"), tuiLoader],
47
+ [path.join(".opencode", "tui.json"), tuiConfig],
28
48
  ]);
29
49
 
30
50
  const fail = (message) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "opencode-work-context",
3
3
  "type": "module",
4
- "version": "0.1.7",
4
+ "version": "0.1.9",
5
5
  "description": "Filesystem work-context core and OpenCode adapter",
6
6
  "license": "MIT",
7
7
  "author": {