@op1/threads 0.2.0 → 0.2.2
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 +9 -3
- package/docs/workflows-verification.md +28 -0
- package/package.json +6 -3
- package/tsconfig.json +15 -0
- package/tui.js +2093 -0
- package/tui.ts +0 -240
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @op1/threads
|
|
2
2
|
|
|
3
|
-
Managed top-level worker sessions and dynamic workflows for OpenCode V2. Dynamic workflows target OpenCode 2.0.12. The server entrypoint is `index.ts`; the terminal
|
|
3
|
+
Managed top-level worker sessions and dynamic workflows for OpenCode V2. Dynamic workflows target OpenCode 2.0.12. The server entrypoint is `index.ts`; the terminal source is `tui.ts`, compiled to `tui.js` for npm publication.
|
|
4
4
|
|
|
5
5
|
## Dynamic workflows
|
|
6
6
|
|
|
@@ -19,19 +19,23 @@ See [capacity and limits](docs/workflow-capacity-findings.md) for total agent st
|
|
|
19
19
|
Install the versioned plugin globally:
|
|
20
20
|
|
|
21
21
|
```sh
|
|
22
|
-
opencode plugin add @op1/threads@0.2.
|
|
22
|
+
opencode plugin add @op1/threads@0.2.2
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
Or add it to `plugins` in `~/.config/opencode/opencode.jsonc`:
|
|
26
26
|
|
|
27
27
|
```jsonc
|
|
28
28
|
{
|
|
29
|
-
"plugins": ["@op1/threads@0.2.
|
|
29
|
+
"plugins": ["@op1/threads@0.2.2"]
|
|
30
30
|
}
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
Keep the other entries in your plugin list. Open a fresh TUI to load the terminal entrypoint. Session tabs must be enabled.
|
|
34
34
|
|
|
35
|
+
Versions 0.2.0 and 0.2.1 can fail to load the published TUI with a React import error. Version 0.2.1 added the package's JSX configuration, but that alone did not fix loading from `node_modules`.
|
|
36
|
+
|
|
37
|
+
Version 0.2.2 publishes precompiled Solid UI code. `npm pack` builds `tui.js` automatically; local checkouts keep using `tui.ts`.
|
|
38
|
+
|
|
35
39
|
The `skills/managed-sessions` directory contains the VERA delegation guide. Copy or link it into `~/.config/opencode/skills/managed-sessions` to make it available to agents.
|
|
36
40
|
|
|
37
41
|
The internal plugin ID remains `op-threads`, so switching between local and published installs preserves worker records. For local development, clone the `dynamic-workflows` branch, run `bun install`, and use the checkout's absolute path as the plugin entry.
|
|
@@ -195,6 +199,8 @@ Run `bun run verify:tabs` to verify project grouping across real git worktrees,
|
|
|
195
199
|
|
|
196
200
|
Run `bun run verify:activity` to exercise Activity enabled against an isolated instance of the installed OpenCode version. The suite clears its own `.audit/activity` artifacts, uses the deterministic model fixture, and reads actual renderer bounds through the test-only TUI probe. It checks layout, click and keyboard navigation, one-click pin and close controls, and native prompt responses. It also covers section and worker-stack collapse, aggregated worker status, title cleanup, worker restoration, fallback layouts, reloads, and restart persistence. `verify:tabs` and `verify:idle-tabs` explicitly disable Activity to inspect native ordering.
|
|
197
201
|
|
|
202
|
+
Before publishing, run `bun run verify:package-ui /absolute/path/to/package.tgz`. The check installs the tarball under `node_modules` outside this checkout, starts a clean TUI without the probe plugin, and verifies Activity, `/activities`, and `/workflows`. It also accepts a published package such as `@op1/threads@0.2.2`. An extracted directory is not equivalent to an installed package for JSX loading.
|
|
203
|
+
|
|
198
204
|
Run `bun run verify:roles` to verify named profiles against the native server and deterministic model endpoint. It checks actual system prompts, model variants, native delegation, read-only execution, reporting, and role-aware retries.
|
|
199
205
|
|
|
200
206
|
Run `bun run verify:workflows` to exercise dynamic scripts through real OpenCode tools and sessions. The isolated fixture checks structured pipelines, exact retries, role restrictions, ownership, checkpoints, saved scripts, retained worktrees, service restart, and the terminal navigator.
|
|
@@ -4,6 +4,34 @@ The hardening pass targets the seven defects reproduced against `5858de1`, plus
|
|
|
4
4
|
|
|
5
5
|
Current verification uses OpenCode `2.0.14`, Bun `1.4.0`, and published `@opencode/codemode` `2.0.12`. Earlier baseline and failing-before evidence used OpenCode `2.0.12`.
|
|
6
6
|
|
|
7
|
+
## Version 0.2.2 compiled TUI
|
|
8
|
+
|
|
9
|
+
The npm package now ships a Solid-compiled `tui.js`, built by `prepack`, rather than loading TSX at runtime. The host's Solid transform excludes `node_modules`; raw JSX there does not receive the reactive bindings that the picker and workflow panel need. External runtime packages remain imports so OpenCode can supply its own renderer and Solid instance.
|
|
10
|
+
|
|
11
|
+
The corrected verifier installs the tarball into `node_modules` outside the checkout and removes the test-only TUI probe. Its checks passed on OpenCode 2.0.14:
|
|
12
|
+
|
|
13
|
+
- Activity renders from the installed package.
|
|
14
|
+
- `/activities` registers keyboard shortcuts, pins and unpins the selected conversation, and closes with Escape.
|
|
15
|
+
- `/workflows` reports the empty state.
|
|
16
|
+
- A native `workflows_start` call completes a script; its result panel renders the phase and returned JSON and closes with Escape.
|
|
17
|
+
|
|
18
|
+
Typecheck passed. Runtime source logic is unchanged from the 109-test / 407-assertion pass. The release artifacts and failed 0.2.1 baseline are retained under `.audit/release-0.2.2/`.
|
|
19
|
+
|
|
20
|
+
Precompiled candidates must replace the conventional TUI entrypoint too. Changing only the package export while retaining root `tui.ts` did not test the bundle when the harness passed the installed directory as a local plugin. The final package includes `tui.js` and omits root `tui.ts`.
|
|
21
|
+
|
|
22
|
+
## Version 0.2.1 packaging correction
|
|
23
|
+
|
|
24
|
+
This attempted correction was insufficient. The published registry install still failed with the React import error, although the extracted-directory check below passed. Loading from `node_modules` must be tested directly; the verifier now installs a tarball there rather than accepting an extracted directory.
|
|
25
|
+
|
|
26
|
+
The published 0.2.0 package omitted `tsconfig.json`. In a clean TUI, its TSX modules were compiled with React defaults and failed with `Cannot find package 'react'`. The earlier native suites loaded a test-only TUI probe and did not catch this packaging failure. Their results did not establish that the published terminal entrypoint could load by itself.
|
|
27
|
+
|
|
28
|
+
Version 0.2.1 includes the existing JSX configuration in the npm package. The focused `verify:package-ui` regression removes the probe before starting the TUI and requires a published package or an extracted package outside the source checkout:
|
|
29
|
+
|
|
30
|
+
- Published 0.2.0 reproduced the React import failure and missing Activity rail.
|
|
31
|
+
- The extracted 0.2.1 tarball, with fresh production dependencies, passed Activity rendering, the `/activities` picker, and `/workflows` command registration.
|
|
32
|
+
- Typecheck and all 109 unit tests / 407 assertions passed.
|
|
33
|
+
- Independent static review returned **PASS WITH NOTES**, with no release-blocking findings. Artifact execution was verified by the release coordinator.
|
|
34
|
+
|
|
7
35
|
## Version 0.2.0 release verification
|
|
8
36
|
|
|
9
37
|
The release adds configurable `workflowConcurrency` and `workflowMaxAgents` defaults for new runs. Explicit run values take precedence, and resumed records retain their original limits. The persisted schema defaults remain 3 concurrent agents and 4 total steps.
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@op1/threads",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Visible worker sessions and durable dynamic workflows for OpenCode V2.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.ts",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./index.ts",
|
|
9
|
-
"./tui": "./tui.
|
|
9
|
+
"./tui": "./tui.js"
|
|
10
10
|
},
|
|
11
|
-
"files": ["index.ts", "tui.
|
|
11
|
+
"files": ["index.ts", "tui.js", "tsconfig.json", "src/", "skills/", "docs/workflows.md", "docs/workflows-verification.md", "docs/workflow-capacity-findings.md", "docs/dynamic-workflows-plan.md"],
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
14
|
"url": "git+https://github.com/opzero1/threads.git"
|
|
@@ -22,9 +22,12 @@
|
|
|
22
22
|
"registry": "https://registry.npmjs.org/"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
|
+
"build:tui": "bun scripts/build-tui.ts",
|
|
26
|
+
"prepack": "bun run build:tui",
|
|
25
27
|
"typecheck": "tsc --noEmit",
|
|
26
28
|
"test": "bun test",
|
|
27
29
|
"verify:live": "uv run --with pyte python scripts/verify-live.py",
|
|
30
|
+
"verify:package-ui": "uv run --with pyte python scripts/verify-package-ui.py",
|
|
28
31
|
"verify:roles": "python3 scripts/verify-roles.py",
|
|
29
32
|
"verify:idle-tabs": "uv run --with pyte python scripts/verify-idle-tabs.py",
|
|
30
33
|
"verify:tabs": "uv run --with pyte python scripts/verify-tab-groups.py",
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"lib": ["ESNext"],
|
|
5
|
+
"module": "Preserve",
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"jsx": "preserve",
|
|
8
|
+
"jsxImportSource": "@opentui/solid",
|
|
9
|
+
"types": ["bun"],
|
|
10
|
+
"strict": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"noEmit": true
|
|
13
|
+
},
|
|
14
|
+
"include": ["index.ts", "tui.ts", "src", "test", "scripts"]
|
|
15
|
+
}
|