trans-genderian-orchestra 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 +14 -3
- package/dist/server.js +725 -74
- package/package.json +1 -1
- package/schema/tgo.config.schema.json +11 -0
- package/src/board.ts +51 -4
- package/src/build.ts +5 -1
- package/src/concision.ts +10 -2
- package/src/config.ts +37 -2
- package/src/delegation.ts +2 -2
- package/src/install.ts +2 -2
- package/src/plugin.ts +69 -8
- package/src/presets.ts +9 -3
- package/src/progress.ts +5 -1
- package/src/seat-sync.ts +109 -0
- package/src/self-update.ts +359 -0
- package/src/session-reuse.ts +6 -14
- package/src/setup.ts +66 -31
- package/src/style-reinforcement.ts +10 -2
- package/src/version.ts +2 -1
- package/src/watchdog.ts +16 -3
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Mirrored byte-for-byte in `plugin/README.md` (the npm readme) — edit one, copy to the other.
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/trans-genderian-orchestra)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
[](https://opencode.ai)
|
|
8
8
|
|
|
@@ -36,7 +36,7 @@ One npm package exposes both via dual-package exports since v0.1.5 (`exports "./
|
|
|
36
36
|
If you prefer to wire it by hand, this also works in `opencode.jsonc`:
|
|
37
37
|
|
|
38
38
|
```json
|
|
39
|
-
{ "plugin": ["trans-genderian-orchestra@0.2.
|
|
39
|
+
{ "plugin": ["trans-genderian-orchestra@0.2.1"] }
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
Restart opencode after it installs. That’s the global layer done.
|
|
@@ -69,7 +69,7 @@ That builds the seat prompts from templates, writes the global config fragment,
|
|
|
69
69
|
|
|
70
70
|
**You’ll know it worked** when that sidebar on the right lights up. Within about a second or two of the setup finishing — no manual `/bd-refresh` — you should see your beads appear. The TUI polls every 1.5 seconds (`POLL_MS 1500` in `plugin/src/sidebar/tui.tsx:20`) but it doesn’t do it the wasteful way: it keeps a cheap signature of the `.beads` directory (`plugin/src/sidebar/bd.ts` walks `.beads` for the newest mtime plus entry count) and only re-reads when something actually changed. The fallback view even pulls `bd list --all` (`plugin/src/sidebar/scope.ts:93`) so in-progress work still shows up before an epic scope fully forms. If you pinned an epic with `/bd-focus`, you can clear it with `/bd-unfocus` and the panel goes back to following whatever bead was last touched.
|
|
71
71
|
|
|
72
|
-
**A small heads-up that’s new in 0.2.
|
|
72
|
+
**A small heads-up that’s new in 0.2.1.** On startup TGO quietly compares your installed version (`plugin/package.json`) with what npm says is latest (`https://registry.npmjs.org/trans-genderian-orchestra/latest`). The logic lives in `plugin/src/version.ts` — `compareVersions` handles `v` prefixes and pre-releases, `fetchLatestVersion` gives npm three seconds before it gives up, and `checkVersionDrift` puts it together. If you’re behind, you’ll see a gentle warning in the structured log (`client.app.log` with `service: "tgo"`): *“TGO update available: installed X < npm Y — self-update will refresh cache on restart; if slot stuck: rm -rf ~/.cache/opencode/packages/trans-genderian-orchestra* and restart (opencode plugin --force is a no-op against exact-pinned slots tgo-6m6)”*. It’s on by default (`config.checkVersion` in `plugin/src/config.ts:80` defaults to `true`), but it never throws and never blocks startup — it’s fire-and-forget, and you can turn it off with `"checkVersion": false` if you prefer.
|
|
73
73
|
|
|
74
74
|
Lean check, if you like receipts: `grep -c slots.register plugin/dist/server.js` should be `0` and `grep -c experimental.chat plugin/dist/tui.js` should be `0` — server has no TUI slots, TUI has no chat hooks. The build and CI enforce it (`plugin/src/build.ts`).
|
|
75
75
|
|
|
@@ -134,6 +134,7 @@ Put options in the second element of the plugin tuple: `["trans-genderian-orches
|
|
|
134
134
|
| `checkVersion` | Whether to do that gentle npm drift check on startup. | `true` |
|
|
135
135
|
| `sessionReuse` | `{ enabled, maxContextTokens }` — continues prior delegation sessions via task_id when the stored session is under the token budget. | `true`, 100000 |
|
|
136
136
|
| `termination` | `{ enabled }` — stops a delegated session after it declares STATUS: complete with its exit gate satisfied and then makes a residual tool call. | `true` |
|
|
137
|
+
| `selfUpdate` | `{ enabled }` — refreshes TGO's own plugin cache slot when a newer version is on npm; activates on next restart. | `true` |
|
|
137
138
|
| `watchdog` | `{ enabled, wallClockMs, idleMs, checkMs, stuckLoopTools, stuckLoopMs }` — aborts a delegated session that’s hung or gone silent and asks Bernstein to re-dispatch. stuck-loop = <3 distinct tool signatures across the last 20 tools within 5m (read-only seats no longer false-trip). | `true`, 30m, 15m, 10s, stuckLoopTools 20, stuckLoopMs 5m |
|
|
138
139
|
|
|
139
140
|
The JSON schema is at `plugin/schema/tgo.config.schema.json`.
|
|
@@ -181,6 +182,16 @@ Autonomy is a mode, not the default. “Keep going” is opt-in and bounded —
|
|
|
181
182
|
|
|
182
183
|
For the human-readable long form: `docs/ARCHITECTURE.md` (shape and hooks), `docs/ROSTER.md` (the five seats), `docs/CONCISION.md` (the house style), `docs/SETUP.md` (install and per-repo setup), `docs/CONTRIBUTING.md` (dev workflow), and `CHANGELOG.md` (release history). The canonical contracts stay under `docs/spec/`.
|
|
183
184
|
|
|
185
|
+
## Troubleshooting
|
|
186
|
+
|
|
187
|
+
### Updating TGO
|
|
188
|
+
|
|
189
|
+
**Automatic (default):** when npm has a newer version than the running one, TGO refreshes its own plugin cache slot in the background (`~/.cache/opencode/packages/trans-genderian-orchestra*` / `…@latest`) and logs `self-updated trans-genderian-orchestra to <version> — restart opencode to activate`. Never downgrades. Disable with `["trans-genderian-orchestra", { "selfUpdate": { "enabled": false } }]`.
|
|
190
|
+
|
|
191
|
+
**Fallback (stuck slot):** `rm -rf ~/.cache/opencode/packages/trans-genderian-orchestra*` then restart opencode.
|
|
192
|
+
|
|
193
|
+
**Warning:** `opencode plugin trans-genderian-orchestra --force -g` is a **NO-OP** against exact-pinned cache slots — root cause tgo-6m6: the host's same-spec `opencode.jsonc` patch is deduped as a no-op and the `Npm.add` existence fast-path never consults the registry, so the cached tarball is reused even when stale.
|
|
194
|
+
|
|
184
195
|
## Developing on TGO
|
|
185
196
|
|
|
186
197
|
```bash
|