loadouts 0.3.0 → 0.4.0
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/bundled/embedded/pi/loadouts-runtime.ts +6543 -1504
- package/bundled/extensions/loadouts-runtime/index.ts +6543 -1504
- package/bundled/loadouts/opencode-runtime.yaml +2 -4
- package/bundled/opencode/plugins/loadouts/index.js +39198 -0
- package/bundled/opencode/plugins/loadouts/package.json +9 -0
- package/bundled/{embedded/opencode/loadouts-runtime.tsx → opencode/plugins/loadouts/tui.js} +4008 -1556
- package/dist/builtins/agent-transforms.d.ts.map +1 -1
- package/dist/builtins/agent-transforms.js +31 -10
- package/dist/builtins/agent-transforms.js.map +1 -1
- package/dist/builtins/index.d.ts.map +1 -1
- package/dist/builtins/index.js +14 -5
- package/dist/builtins/index.js.map +1 -1
- package/dist/builtins/kinds/opencode-cli-config.d.ts +3 -0
- package/dist/builtins/kinds/opencode-cli-config.d.ts.map +1 -0
- package/dist/builtins/kinds/opencode-cli-config.js +10 -0
- package/dist/builtins/kinds/opencode-cli-config.js.map +1 -0
- package/dist/builtins/kinds/opencode-plugin-dir.d.ts +3 -0
- package/dist/builtins/kinds/opencode-plugin-dir.d.ts.map +1 -0
- package/dist/builtins/kinds/opencode-plugin-dir.js +11 -0
- package/dist/builtins/kinds/opencode-plugin-dir.js.map +1 -0
- package/dist/builtins/tools/opencode.d.ts.map +1 -1
- package/dist/builtins/tools/opencode.js +10 -7
- package/dist/builtins/tools/opencode.js.map +1 -1
- package/dist/cli/commands/activate.d.ts.map +1 -1
- package/dist/cli/commands/activate.js +0 -7
- package/dist/cli/commands/activate.js.map +1 -1
- package/dist/cli/commands/session.d.ts +3 -0
- package/dist/cli/commands/session.d.ts.map +1 -0
- package/dist/cli/commands/session.js +68 -0
- package/dist/cli/commands/session.js.map +1 -0
- package/dist/cli/commands/status.js +1 -1
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/sync.d.ts.map +1 -1
- package/dist/cli/commands/sync.js +5 -5
- package/dist/cli/commands/sync.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/core/discovery.js +1 -1
- package/dist/core/discovery.js.map +1 -1
- package/dist/core/import-discovery.d.ts.map +1 -1
- package/dist/core/import-discovery.js +2 -0
- package/dist/core/import-discovery.js.map +1 -1
- package/dist/core/registry.d.ts +5 -0
- package/dist/core/registry.d.ts.map +1 -1
- package/dist/core/registry.js.map +1 -1
- package/dist/core/render.d.ts.map +1 -1
- package/dist/core/render.js +29 -1
- package/dist/core/render.js.map +1 -1
- package/dist/core/resolve.d.ts.map +1 -1
- package/dist/core/resolve.js +1 -0
- package/dist/core/resolve.js.map +1 -1
- package/dist/core/runtime.d.ts +4 -0
- package/dist/core/runtime.d.ts.map +1 -1
- package/dist/core/runtime.js +10 -3
- package/dist/core/runtime.js.map +1 -1
- package/dist/core/schema.d.ts +59 -0
- package/dist/core/schema.d.ts.map +1 -1
- package/dist/core/schema.js +5 -0
- package/dist/core/schema.js.map +1 -1
- package/dist/core/types.d.ts +13 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/integrations/opencode/advertisement.d.ts +7 -0
- package/dist/integrations/opencode/advertisement.d.ts.map +1 -0
- package/dist/integrations/opencode/advertisement.js +17 -0
- package/dist/integrations/opencode/advertisement.js.map +1 -0
- package/dist/integrations/opencode/client.d.ts +12 -0
- package/dist/integrations/opencode/client.d.ts.map +1 -0
- package/dist/integrations/opencode/client.js +48 -0
- package/dist/integrations/opencode/client.js.map +1 -0
- package/dist/integrations/opencode/command.d.ts +11 -0
- package/dist/integrations/opencode/command.d.ts.map +1 -0
- package/dist/integrations/opencode/command.js +19 -0
- package/dist/integrations/opencode/command.js.map +1 -0
- package/dist/integrations/opencode/delta.d.ts +15 -0
- package/dist/integrations/opencode/delta.d.ts.map +1 -0
- package/dist/integrations/opencode/delta.js +75 -0
- package/dist/integrations/opencode/delta.js.map +1 -0
- package/dist/integrations/opencode/session.d.ts +207 -0
- package/dist/integrations/opencode/session.d.ts.map +1 -0
- package/dist/integrations/opencode/session.js +201 -0
- package/dist/integrations/opencode/session.js.map +1 -0
- package/dist/lib/gitignore.d.ts +7 -3
- package/dist/lib/gitignore.d.ts.map +1 -1
- package/dist/lib/gitignore.js +15 -7
- package/dist/lib/gitignore.js.map +1 -1
- package/dist/tui/core/actions.d.ts +3 -4
- package/dist/tui/core/actions.d.ts.map +1 -1
- package/dist/tui/core/actions.js +21 -15
- package/dist/tui/core/actions.js.map +1 -1
- package/dist/tui/core/controller.d.ts +28 -0
- package/dist/tui/core/controller.d.ts.map +1 -0
- package/dist/tui/core/controller.js +78 -0
- package/dist/tui/core/controller.js.map +1 -0
- package/dist/tui/core/data.d.ts +4 -2
- package/dist/tui/core/data.d.ts.map +1 -1
- package/dist/tui/core/data.js +14 -3
- package/dist/tui/core/data.js.map +1 -1
- package/dist/tui/core/host.d.ts +5 -11
- package/dist/tui/core/host.d.ts.map +1 -1
- package/dist/tui/core/intent.d.ts +18 -3
- package/dist/tui/core/intent.d.ts.map +1 -1
- package/dist/tui/core/keymap.d.ts +2 -1
- package/dist/tui/core/keymap.d.ts.map +1 -1
- package/dist/tui/core/keymap.js +38 -6
- package/dist/tui/core/keymap.js.map +1 -1
- package/dist/tui/core/model.d.ts +18 -6
- package/dist/tui/core/model.d.ts.map +1 -1
- package/dist/tui/core/model.js +4 -3
- package/dist/tui/core/model.js.map +1 -1
- package/dist/tui/core/selection.d.ts +12 -0
- package/dist/tui/core/selection.d.ts.map +1 -0
- package/dist/tui/core/selection.js +42 -0
- package/dist/tui/core/selection.js.map +1 -0
- package/dist/tui/core/update.d.ts.map +1 -1
- package/dist/tui/core/update.js +140 -126
- package/dist/tui/core/update.js.map +1 -1
- package/dist/tui/core/view.d.ts.map +1 -1
- package/dist/tui/core/view.js +43 -31
- package/dist/tui/core/view.js.map +1 -1
- package/dist/tui/core/viewport.d.ts +5 -0
- package/dist/tui/core/viewport.d.ts.map +1 -0
- package/dist/tui/core/viewport.js +33 -0
- package/dist/tui/core/viewport.js.map +1 -0
- package/dist/tui/core/viewspec.d.ts +5 -0
- package/dist/tui/core/viewspec.d.ts.map +1 -1
- package/dist/tui/hosts/pi/embed-entry.d.ts.map +1 -1
- package/dist/tui/hosts/pi/embed-entry.js +74 -197
- package/dist/tui/hosts/pi/embed-entry.js.map +1 -1
- package/dist/tui/hosts/pi/inject.d.ts +46 -29
- package/dist/tui/hosts/pi/inject.d.ts.map +1 -1
- package/dist/tui/hosts/pi/inject.js +25 -47
- package/dist/tui/hosts/pi/inject.js.map +1 -1
- package/dist/tui/hosts/standalone.d.ts.map +1 -1
- package/dist/tui/hosts/standalone.js +75 -111
- package/dist/tui/hosts/standalone.js.map +1 -1
- package/dist/tui/skins/pi-tui/input.js +4 -0
- package/dist/tui/skins/pi-tui/input.js.map +1 -1
- package/dist/tui/skins/pi-tui/render.d.ts +6 -3
- package/dist/tui/skins/pi-tui/render.d.ts.map +1 -1
- package/dist/tui/skins/pi-tui/render.js +32 -24
- package/dist/tui/skins/pi-tui/render.js.map +1 -1
- package/docs/archive/opencode-v2-runtime-beta-18707.md +813 -0
- package/docs/authoring.md +47 -44
- package/docs/commands.md +21 -1
- package/docs/compatibility.md +2 -2
- package/docs/concepts.md +2 -2
- package/docs/opencode-v2-probes.md +253 -0
- package/docs/opencode-v2-runtime.md +129 -0
- package/docs/registry.md +1366 -0
- package/docs/runtime.md +112 -82
- package/docs/troubleshooting.md +17 -15
- package/docs/tui-architecture.md +10 -8
- package/package.json +12 -7
- package/bundled/opencode/commands/loadouts.md +0 -3
- package/bundled/opencode/plugins/loadouts-runtime-tui.tsx +0 -14461
- package/bundled/opencode/plugins/loadouts-runtime.ts +0 -533
- package/bundled/opencode/tui.jsonc +0 -5
- package/dist/builtins/kinds/opencode-tui-config.d.ts +0 -3
- package/dist/builtins/kinds/opencode-tui-config.d.ts.map +0 -1
- package/dist/builtins/kinds/opencode-tui-config.js +0 -8
- package/dist/builtins/kinds/opencode-tui-config.js.map +0 -1
- package/dist/integrations/opencode-runtime/bridge.d.ts +0 -17
- package/dist/integrations/opencode-runtime/bridge.d.ts.map +0 -1
- package/dist/integrations/opencode-runtime/bridge.js +0 -60
- package/dist/integrations/opencode-runtime/bridge.js.map +0 -1
- package/dist/integrations/opencode-runtime/command.d.ts +0 -4
- package/dist/integrations/opencode-runtime/command.d.ts.map +0 -1
- package/dist/integrations/opencode-runtime/command.js +0 -200
- package/dist/integrations/opencode-runtime/command.js.map +0 -1
- package/dist/integrations/opencode-runtime/index.d.ts +0 -6
- package/dist/integrations/opencode-runtime/index.d.ts.map +0 -1
- package/dist/integrations/opencode-runtime/index.js +0 -5
- package/dist/integrations/opencode-runtime/index.js.map +0 -1
- package/dist/integrations/opencode-runtime/plugin.d.ts +0 -59
- package/dist/integrations/opencode-runtime/plugin.d.ts.map +0 -1
- package/dist/integrations/opencode-runtime/plugin.js +0 -238
- package/dist/integrations/opencode-runtime/plugin.js.map +0 -1
- package/dist/integrations/opencode-runtime/state.d.ts +0 -8
- package/dist/integrations/opencode-runtime/state.d.ts.map +0 -1
- package/dist/integrations/opencode-runtime/state.js +0 -27
- package/dist/integrations/opencode-runtime/state.js.map +0 -1
- package/dist/integrations/opencode-runtime/types.d.ts +0 -38
- package/dist/integrations/opencode-runtime/types.d.ts.map +0 -1
- package/dist/integrations/opencode-runtime/types.js +0 -2
- package/dist/integrations/opencode-runtime/types.js.map +0 -1
- package/dist/tui/hosts/_probe/embed-entry.d.ts +0 -5
- package/dist/tui/hosts/_probe/embed-entry.d.ts.map +0 -1
- package/dist/tui/hosts/_probe/embed-entry.js +0 -8
- package/dist/tui/hosts/_probe/embed-entry.js.map +0 -1
package/docs/runtime.md
CHANGED
|
@@ -1,107 +1,137 @@
|
|
|
1
1
|
# Runtime Activation (OpenCode First)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
1. Resolve loadouts exactly like normal activation (`include`, source imports, bundled/global fallback, tool filtering).
|
|
17
|
-
2. Compile supported artifacts into a `RuntimeBundle`.
|
|
18
|
-
3. Return bundle JSON (`--json`) or a model-ready block (`--system-block`).
|
|
19
|
-
|
|
20
|
-
Key properties:
|
|
3
|
+
Equip loadouts globally, for a project, or for **one OpenCode session**.
|
|
4
|
+
Session switching uses OpenCode V2's durable instruction entries and permission
|
|
5
|
+
rules, so another session at the same directory is unaffected.
|
|
6
|
+
|
|
7
|
+
## CLI
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
loadouts session list
|
|
11
|
+
loadouts session status --session ses_...
|
|
12
|
+
loadouts session equip backend review --session ses_... -p
|
|
13
|
+
loadouts session equip caveman --session ses_... -g
|
|
14
|
+
loadouts session unequip --session ses_...
|
|
15
|
+
```
|
|
21
16
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
`-g` and `-p` choose the **loadout source scope**; the destination is always the
|
|
18
|
+
named session. Omit `--session` to use the most recently updated root session at
|
|
19
|
+
the current directory. `--json` is available on every subcommand.
|
|
20
|
+
The CLI discovers an already-running authenticated service; start OpenCode first.
|
|
26
21
|
|
|
27
|
-
|
|
22
|
+
Session equips inject only instruction/rule content not already rendered by
|
|
23
|
+
intact Global/Project OpenCode outputs. Skill gates restrict native catalog skill
|
|
24
|
+
access to the selected loadout set while retaining pre-existing restrictions.
|
|
25
|
+
Unsupported session artifacts (commands, MCP, references, plugins) are reported
|
|
26
|
+
as diagnostics; equip those at Global/Project scope.
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
## OpenCode dashboard
|
|
30
29
|
|
|
31
|
-
|
|
32
|
-
# JSON bridge for plugin/session adapters
|
|
33
|
-
loadouts runtime base backend --tool opencode --json
|
|
30
|
+
Install the bundled integration at either filesystem scope:
|
|
34
31
|
|
|
35
|
-
|
|
36
|
-
loadouts
|
|
32
|
+
```sh
|
|
33
|
+
loadouts activate opencode-runtime -g
|
|
34
|
+
# or: loadouts activate opencode-runtime -l
|
|
37
35
|
```
|
|
38
36
|
|
|
39
|
-
|
|
37
|
+
This renders the package directory `plugins/loadouts/`, containing the server and
|
|
38
|
+
TUI entries. Build from source with `npm run build` before activating a checkout.
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
- Cache by `fingerprint`.
|
|
43
|
-
- Inject `instructions` and `rules` into model/system context.
|
|
44
|
-
- Register `skills[*].path` for discovery only.
|
|
45
|
-
|
|
46
|
-
### Slash Command UX (`/loadouts`)
|
|
47
|
-
|
|
48
|
-
The OpenCode runtime path is designed around a deterministic plugin-backed slash command:
|
|
40
|
+
Inside OpenCode:
|
|
49
41
|
|
|
50
42
|
```text
|
|
51
|
-
/loadouts
|
|
52
|
-
/loadouts
|
|
53
|
-
/loadouts
|
|
43
|
+
/loadouts dashboard (also ctrl+l)
|
|
44
|
+
/loadouts quick multi-select session equip
|
|
45
|
+
/loadouts equip caveman -g replace this session's set
|
|
46
|
+
/loadouts equip backend -p
|
|
47
|
+
/loadouts unequip
|
|
48
|
+
/loadouts status
|
|
54
49
|
/loadouts list
|
|
55
|
-
/loadouts info base
|
|
56
|
-
/loadouts clear
|
|
57
50
|
```
|
|
58
51
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
52
|
+
The dashboard shows **G / P / S** equipment and **All / Global / Project**
|
|
53
|
+
scope tabs. It opens on **All**. Tabs filter the catalog; in filesystem mode,
|
|
54
|
+
each row automatically equips into its own scope. The action target appears in
|
|
55
|
+
the detail pane. `m` switches **filesystem ↔ session** when a session is selected;
|
|
56
|
+
embedded dashboards open in session mode.
|
|
57
|
+
|
|
58
|
+
| Keys | Action |
|
|
59
|
+
|---|---|
|
|
60
|
+
| `j` / `k`, `↓` / `↑` | Move within a section |
|
|
61
|
+
| `h` / `l`, `←` / `→`, `Tab` / `Shift+Tab` | Previous / next section |
|
|
62
|
+
| `1` / `2` / `3` | Jump to Active / Available / Issues |
|
|
63
|
+
| `[` / `]` | Previous / next scope tab |
|
|
64
|
+
| `gg` / `G`, `Home` / `End` | First / last row |
|
|
65
|
+
| `Space`, `a` / `d` | Toggle, activate / deactivate the selected row |
|
|
66
|
+
| `m` | Switch filesystem / session mode |
|
|
67
|
+
| `s` / `x` / `D` | Sync / clear / diff the current target |
|
|
68
|
+
| `/`, `t` | Search, cycle tool filter |
|
|
69
|
+
| `Enter`, `e` | Expand artifacts, edit definition |
|
|
70
|
+
| `PgUp` / `PgDn` | Scroll artifact details (or the open overlay) |
|
|
71
|
+
| `u`, `r` | Undo last mutation, refresh |
|
|
72
|
+
| `?` | Help (`j` / `k` scroll) |
|
|
73
|
+
| `Esc` | Close overlay → clear filters → collapse detail → All tab → exit |
|
|
74
|
+
| `q` | Exit (or close the current overlay) |
|
|
75
|
+
|
|
76
|
+
Filesystem bulk operations use the selected tab. In **All**, a scope chooser
|
|
77
|
+
asks Global or Project (`h/l` or `j/k`, then `Enter`; `Esc` cancels). Search and
|
|
78
|
+
tool filters do not narrow bulk operations. In session mode, bulk actions target
|
|
79
|
+
the session's equipped set; a tab for the other source scope has no session
|
|
80
|
+
equipment to change. Equipping a session loadout from a different scope replaces
|
|
81
|
+
its previous source-scope set, and undo restores that set and scope.
|
|
82
|
+
|
|
83
|
+
Long sections keep the selected row visible, with row ranges in their headings.
|
|
84
|
+
The footer shows contextual shortcuts and updates from persisted session state
|
|
85
|
+
and native events.
|
|
86
|
+
|
|
87
|
+
The server plugin also filters skill advertisements (session permission denies
|
|
88
|
+
alone do not hide them on 2.0.3), provides off-disk skills through a catalog
|
|
89
|
+
transform, and supports headless equips.
|
|
90
|
+
|
|
91
|
+
Optional loadout selections:
|
|
92
|
+
|
|
93
|
+
```yaml
|
|
94
|
+
name: review
|
|
95
|
+
include:
|
|
96
|
+
- instructions/AGENTS.review.md
|
|
97
|
+
opencode:
|
|
98
|
+
agent: reviewer
|
|
99
|
+
model:
|
|
100
|
+
providerID: anthropic
|
|
101
|
+
id: claude-sonnet-4-5
|
|
102
|
+
```
|
|
67
103
|
|
|
68
|
-
|
|
104
|
+
For automatic project session equips, add to `.loadouts/loadouts.yaml`:
|
|
69
105
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- The plugin bridge shells out to `loadouts runtime ...`. Ensure the `loadouts` binary available on OpenCode's `PATH` includes runtime support.
|
|
75
|
-
- The bundled TUI config is whole-file managed like other Loadouts config artifacts. Existing unmanaged `.opencode/tui.jsonc` files are protected by normal shadowing; add `./plugins/loadouts-runtime-tui.tsx` to your existing TUI config if needed.
|
|
106
|
+
```yaml
|
|
107
|
+
opencode:
|
|
108
|
+
defaultSession: [backend]
|
|
109
|
+
```
|
|
76
110
|
|
|
77
|
-
##
|
|
111
|
+
## Standalone and Pi
|
|
78
112
|
|
|
79
|
-
|
|
113
|
+
`loadouts tui` uses pi-tui and works without OpenCode. If a running service is
|
|
114
|
+
available, press `S` to select a conversation at the current directory, then use
|
|
115
|
+
session mode. Global/Project activation works independently of the service.
|
|
116
|
+
The standalone dashboard requires Node 22.19+.
|
|
80
117
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
| Codex | `experimental-runtime` | Yes | Yes | No |
|
|
86
|
-
| Claude Code | `filesystem-activation` | No | No | No |
|
|
87
|
-
| Cursor | `filesystem-activation` | No (not native) | No | No |
|
|
118
|
+
Pi's bundled `loadouts-runtime` extension uses the same dashboard and layers.
|
|
119
|
+
Session equipment is persisted in Pi custom entries, keyed by the actual session
|
|
120
|
+
ID, and injected through `before_agent_start`. Resuming/switching a Pi session
|
|
121
|
+
reconstructs its own equipment. Pi skills remain path-discovery references.
|
|
88
122
|
|
|
89
|
-
|
|
123
|
+
## Inspect compiled bundles
|
|
90
124
|
|
|
91
|
-
|
|
125
|
+
The existing compiler command remains useful independently of activation:
|
|
92
126
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
- Runtime v1 does not implement native skill hot-swap.
|
|
127
|
+
```sh
|
|
128
|
+
loadouts runtime base --tool opencode --json
|
|
129
|
+
loadouts runtime base --tool pi --system-block
|
|
130
|
+
```
|
|
98
131
|
|
|
99
|
-
|
|
132
|
+
OpenCode supports native per-session instruction entries and skill gating, plus
|
|
133
|
+
location-wide skill hot reload. Pi supports session system-prompt injection.
|
|
134
|
+
Other tools retain their existing compiler/filesystem capability flags.
|
|
100
135
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
- Bundled OpenCode TUI config: `bundled/opencode/tui.jsonc`
|
|
104
|
-
- Bundled scaffold loadout: `bundled/loadouts/opencode-runtime.yaml`
|
|
105
|
-
- Historical/reference plugin scaffold: `docs/examples/opencode-runtime-plugin.ts`
|
|
106
|
-
- Core compiler implementation: `src/core/runtime.ts`
|
|
107
|
-
- CLI command surface: `src/cli/commands/runtime.ts`
|
|
136
|
+
See [OpenCode V2 implementation details](opencode-v2-runtime.md) for ownership,
|
|
137
|
+
rollback, concurrency limits, cache behavior, probes and verification scripts.
|
package/docs/troubleshooting.md
CHANGED
|
@@ -51,24 +51,26 @@ loadouts sync # Re-render if needed
|
|
|
51
51
|
|
|
52
52
|
**Cursor:** Rules need `.mdc` extension — loadouts handles this automatically. Restart Cursor if rules don't appear immediately.
|
|
53
53
|
|
|
54
|
-
**OpenCode:** Rules render to `.opencode/rules/`, commands to `.opencode/commands/`, local plugins to `.opencode/plugins/`, and NPM plugins are configured with the `
|
|
54
|
+
**OpenCode V2:** Rules render to `.opencode/rules/`, commands to `.opencode/commands/`, local plugins to `.opencode/plugins/`, and NPM plugins are configured with the `plugins` array in `opencode.json(c)`. Global instructions render to `~/.config/opencode/AGENTS.md`. OpenCode hot-reloads these sources.
|
|
55
55
|
|
|
56
56
|
### `/loadouts` not working in OpenCode runtime
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
58
|
+
1. Verify `plugins/loadouts/{package.json,index.js,tui.js}` exists under the
|
|
59
|
+
project's `.opencode/` or global `~/.config/opencode/` directory.
|
|
60
|
+
2. Check `loadouts info -l` or `loadouts info -g` for `opencode-runtime` and
|
|
61
|
+
`loadouts status` for shadowed/missing output. A source checkout needs
|
|
62
|
+
`npm run build` before activation.
|
|
63
|
+
3. Open OpenCode's Plugins dialog and inspect the server/TUI entries. Local
|
|
64
|
+
plugin directories do not install server dependencies; use the built,
|
|
65
|
+
self-contained artifact rather than copying `src/tui/hosts/opencode/`.
|
|
66
|
+
4. Test the independent HTTP path with
|
|
67
|
+
`loadouts session status --session ses_...`.
|
|
68
|
+
5. `/loadouts` and `ctrl+l` are client-side commands. The server entry is needed
|
|
69
|
+
for clean per-session skill advertisements; native permission denies alone
|
|
70
|
+
still leave skills listed on OpenCode 2.0.3.
|
|
71
|
+
|
|
72
|
+
If permissions were edited after equip, unequip preserves those edits and reports
|
|
73
|
+
it. See [runtime ownership and recovery](opencode-v2-runtime.md#persistence-and-ownership).
|
|
72
74
|
|
|
73
75
|
**Claude Code:** Verify rules exist in `.claude/rules/`. May require restarting the session.
|
|
74
76
|
|
package/docs/tui-architecture.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Loadouts TUI Architecture
|
|
2
2
|
|
|
3
|
-
Status: **
|
|
3
|
+
Status: **Historical design / RFC**. The three-layer core/skin/host architecture is
|
|
4
|
+
implemented. V1 runtime wiring and command names below are superseded by
|
|
5
|
+
[the OpenCode V2 runtime](opencode-v2-runtime.md) and [usage](runtime.md).
|
|
4
6
|
Author: design pass, June 2026
|
|
5
7
|
|
|
6
8
|
A plan for turning the loadouts TUI from a passive popup into a beautiful, ergonomic,
|
|
@@ -133,14 +135,14 @@ src/tui/
|
|
|
133
135
|
extension.ts # default ExtensionAPI factory: command + inject + mount
|
|
134
136
|
inject.ts # before_agent_start system-prompt block
|
|
135
137
|
opencode/
|
|
136
|
-
|
|
137
|
-
|
|
138
|
+
index.ts # server entry: Plugin.define({ id, setup })
|
|
139
|
+
tui.tsx # TUI entry: router page, slash, slots
|
|
138
140
|
```
|
|
139
141
|
|
|
140
|
-
The
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
The V1-shaped `src/integrations/opencode-runtime/` was replaced by
|
|
143
|
+
`src/integrations/opencode/` (session activator, instruction delta, service client,
|
|
144
|
+
advertisement filter). The Pi equivalent lives in `hosts/pi/` and the shared
|
|
145
|
+
`core/controller.ts` lifecycle.
|
|
144
146
|
|
|
145
147
|
---
|
|
146
148
|
|
|
@@ -300,7 +302,7 @@ skills/prompts/themes at runtime — a cleaner injection path than OpenCode's sy
|
|
|
300
302
|
|
|
301
303
|
### 6.2 OpenCode host (existing plugin, upgraded)
|
|
302
304
|
|
|
303
|
-
Reuse `src/
|
|
305
|
+
Reuse the shared controller/lifecycle in `src/tui/core/controller.ts` (command parsing, session state, system-block
|
|
304
306
|
injection). Add a TUI route:
|
|
305
307
|
|
|
306
308
|
| Need | OpenCode API |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "loadouts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Composable configuration bundles for AI coding agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"dev": "tsc --watch",
|
|
18
18
|
"test": "vitest run",
|
|
19
19
|
"test:watch": "vitest",
|
|
20
|
-
"lint": "tsc --noEmit",
|
|
20
|
+
"lint": "tsc --noEmit -p tsconfig.lint.json && tsc --noEmit -p tsconfig.tui.json",
|
|
21
21
|
"loadouts": "node dist/index.js"
|
|
22
22
|
},
|
|
23
23
|
"keywords": [
|
|
@@ -37,20 +37,25 @@
|
|
|
37
37
|
"url": "https://github.com/evatths/loadouts.git"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
+
"@babel/core": "7.28.0",
|
|
41
|
+
"@babel/preset-typescript": "7.27.1",
|
|
40
42
|
"@earendil-works/pi-coding-agent": "^0.79.7",
|
|
41
|
-
"@opencode
|
|
42
|
-
"@opentui/core": "
|
|
43
|
-
"@opentui/keymap": "
|
|
44
|
-
"@opentui/solid": "
|
|
43
|
+
"@opencode/plugin": "2.0.3",
|
|
44
|
+
"@opentui/core": "0.5.11",
|
|
45
|
+
"@opentui/keymap": "0.5.11",
|
|
46
|
+
"@opentui/solid": "0.5.11",
|
|
47
|
+
"@opencode/theme": "2.0.3",
|
|
45
48
|
"@types/node": "^20.12.0",
|
|
46
49
|
"@types/update-notifier": "^6.0.8",
|
|
50
|
+
"babel-preset-solid": "1.9.12",
|
|
47
51
|
"esbuild": "^0.23.1",
|
|
48
|
-
"solid-js": "
|
|
52
|
+
"solid-js": "1.9.15",
|
|
49
53
|
"typescript": "^5.4.0",
|
|
50
54
|
"vitest": "^1.5.0"
|
|
51
55
|
},
|
|
52
56
|
"dependencies": {
|
|
53
57
|
"@earendil-works/pi-tui": "^0.79.7",
|
|
58
|
+
"@opencode/client": "2.0.3",
|
|
54
59
|
"chalk": "^5.3.0",
|
|
55
60
|
"commander": "^12.0.0",
|
|
56
61
|
"update-notifier": "^7.3.1",
|