@brainervirus/workit-opencode 6.0.0 → 6.0.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.
Files changed (2) hide show
  1. package/README.md +17 -75
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,90 +1,32 @@
1
1
  # @brainervirus/workit-opencode
2
2
 
3
3
  [![CI](https://github.com/BrainerVirus/workit/actions/workflows/ci.yml/badge.svg)](https://github.com/BrainerVirus/workit/actions/workflows/ci.yml)
4
- [![npm version](https://img.shields.io/npm/v/@brainervirus/workit-opencode.svg)](https://www.npmjs.com/package/@brainervirus/workit-opencode)
5
- [![license: MIT](https://img.shields.io/badge/license-MIT-green.svg)](../../LICENSE)
4
+ [![npm](https://img.shields.io/npm/v/@brainervirus/workit-opencode.svg)](https://www.npmjs.com/package/@brainervirus/workit-opencode)
5
+ [![license: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/BrainerVirus/workit/blob/main/LICENSE)
6
6
 
7
- OpenCode plugin for Workit — optional coordination, policy, delegation, handoff, and read-only context. Native OpenCode tools execute Git, hosting, YouTrack and documentation effects.
7
+ [Workit](https://github.com/BrainerVirus/workit) for OpenCode 2.0.18+: the seven task families,
8
+ read-only `workit_context` and `workit_init_apply` as native tools, the
9
+ eleven method skills with `/wk-*` commands, direct-child delegation, and
10
+ context injection on session start and after compaction. Requires Node.js 24+.
8
11
 
9
- ## Install
10
-
11
- ```jsonc
12
- // opencode.json / opencode.jsonc
12
+ ```json
13
13
  {
14
14
  "$schema": "https://opencode.ai/config.json",
15
15
  "plugins": ["@brainervirus/workit-opencode"]
16
16
  }
17
17
  ```
18
18
 
19
- OpenCode 2.x reads `"plugins"` and still normalizes the older `"plugin"` key.
20
-
21
- Local dev variant (absolute path to this repo):
22
-
23
- ```jsonc
24
- {
25
- "$schema": "https://opencode.ai/config.json",
26
- "plugins": ["file:///path/to/workit/packages/workit-opencode"]
27
- }
28
- ```
29
-
30
- Requirements: OpenCode 2.0.18+, Node ≥ 24. The published plugin is a
31
- self-contained Node bundle whose default export is the V2 plugin definition
32
- (`{ id: "workit", setup }`). Workit 3.0 removed the OpenCode 1.x `server()`
33
- adapter; OpenCode 1.x hosts must stay on Workit 2.x by pinning
34
- `"plugin": ["@brainervirus/workit-opencode@2"]` (the V1 key) until they upgrade
35
- OpenCode.
36
-
37
- ## What it provides
38
-
39
- - **Seven native operation tools** — `workit_task`, `workit_policy`, `workit_evidence`, `workit_finding`, `workit_decision`, `workit_worker`, and `workit_state`.
40
- - **Read-only context and init tools** — `workit_context` accepts `{ "kind": "git" }` and the existing PR/YouTrack/changelog/release/affected context fields; `workit_init_apply` keeps confirmed configuration initialization.
41
- - **Eleven policy-selected method skills** — shape, implement, review, debug, ship, continue, bdd, test-audit,
42
- deslop, fanout, and verify-app.
43
- - **Native lifecycle hooks** — direct-child task workers and compact task bootstrap/restoration. Workit registers no question hooks.
19
+ Local checkout: run `bun packages/workit-opencode/scripts/build.ts`, then pin
20
+ `"file:///path/to/workit/packages/workit-opencode"`. OpenCode 1.x must stay on
21
+ `"plugin": ["@brainervirus/workit-opencode@2"]`.
44
22
 
45
- ## Host-native behavior
46
-
47
- - **Delegation** — native `task` workers are direct-child-only; nested or uncertain lineage is denied (`delegation_lineage_denied`).
48
- - **Continuity** — compact task context carries the newest decisions and bounded redacted choice summaries, injected once on session start and once after compaction; unobservable shell surfaces are labeled `agent_guided`.
49
-
50
- Workit does not register `workit_external_action` on OpenCode.
51
- Use native tools for mutations under the host permissions and target conventions;
52
- no Workit task or decision is needed merely to run an ordinary command. Decisions
53
- are durable records that satisfy decision requirements; they never authorize an
54
- effect. Delivery limits come from OpenCode permissions plus the workspace
55
- autonomy grants (`workit grant show`).
56
- Old action/decision history is preserved. Inspect and reconcile any uncertain
57
- effect before retrying; removal does not settle or migrate it.
58
-
59
- ## Upgrade from Workit 1.x
60
-
61
- Workit 2.0 removes the managed external-action tool on both OpenCode versions.
62
- Use native host tools for mutations and `workit_context` for read-only context.
63
- Existing task and action history remains untouched; reconcile uncertain effects
64
- before retrying them.
65
-
66
- ## Bundle / runtime model
67
-
68
- The build bundles the `@opencode/plugin` SDK surface used by the adapter into `dist/plugin.js`, so the published plugin has **no** runtime dependency on the SDK (it stays a development/build-only pin). The plugin loads through its real package entry `dist/plugin.js`; only the eleven method skills ship under `assets/`.
69
-
70
- The plugin registers nine tools (the seven families, `workit_context` and
71
- `workit_init_apply`) with `codemode: false`, the eleven
72
- skills and up to eleven `wk-*` commands. Existing user skills and commands
73
- are preserved; an alias is added only when its Workit skill is registered. It
74
- also provides direct-child subagent
75
- lineage with durable dispatch claims, and bootstrap/task/worker context plus
76
- compaction injection. Its shell
77
- permission hook adds branch-name policy denials for direct, unquoted literal
78
- branch-creation forms only. It leaves compliant branches, PR and worktree
79
- commands, and unsupported shell syntax to OpenCode's native permission rules.
80
-
81
- ## Package scripts
23
+ Effects (git, forge, files) run through OpenCode's native tools and the
24
+ `workit` CLI under OpenCode permissions plus the workspace
25
+ [grants](https://github.com/BrainerVirus/workit/blob/main/docs/guides/grants.md). The shell hook only denies direct,
26
+ unquoted branch-creation commands that break the naming policy. Details:
27
+ [hosts guide](https://github.com/BrainerVirus/workit/blob/main/docs/guides/hosts.md#opencode).
82
28
 
83
29
  ```bash
84
- bun run build # bundle dist/plugin.js + assets
85
- bun run typecheck # tsc --noEmit
30
+ bun run build # bundle dist/plugin.js (self-contained, no runtime SDK dependency)
31
+ bun run typecheck
86
32
  ```
87
-
88
- ## Docs
89
-
90
- Full usage: https://github.com/BrainerVirus/workit#readme
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-opencode",
3
- "version": "6.0.0",
3
+ "version": "6.0.1",
4
4
  "private": false,
5
5
  "description": "Workit OpenCode plugin — native tools, adaptive policy, and sixteen method skills",
6
6
  "keywords": [
@@ -39,7 +39,7 @@
39
39
  "typecheck": "tsc --noEmit"
40
40
  },
41
41
  "dependencies": {
42
- "@brainervirus/workit-core": "^6.0.0"
42
+ "@brainervirus/workit-core": "^6.0.1"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@opencode/plugin": "2.0.18"