@cabane/companion 0.6.159 → 0.6.161

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.
@@ -86,14 +86,13 @@ function render() {
86
86
  renderDispatches();
87
87
  }
88
88
 
89
- // The harnesses this device exposes to Cabane. `harnesses` is null until
90
- // the first probe lands (show "checking…"); once probed, a list of three, and if
91
- // NONE are exposed the loud empty state — the headline requirement. Each row shows
92
- // a state badge, version when known, a one-line guide, and the friendly enable
93
- // affordance for the two config-driven harnesses (Codex flag / opencode URL).
89
+ // The agents this device exposes to Cabane. `harnesses` is null until the
90
+ // first detection lands (show "checking…"); once detected, a list of three, and
91
+ // if NONE are exposed the loud empty state — the headline requirement. Each row
92
+ // shows a state badge, version when known, and a one-line guide. Agents are
93
+ // detected, never enabled from here: signing in is what connects one.
94
94
  const HARNESS_BADGE = {
95
95
  exposed: 'Exposed',
96
- detected_not_exposed: 'Not exposed',
97
96
  needs_attention: 'Needs attention',
98
97
  not_detected: 'Not detected',
99
98
  };
@@ -136,39 +135,6 @@ function renderHarnesses() {
136
135
 
137
136
  if (h.detail) li.append(el('p', 'harness-detail', h.detail));
138
137
 
139
- // Friendly enable — never install, never login (BYO). Claude Code and Codex are
140
- // one-click flag flips; opencode takes a URL we validate is reachable before
141
- // writing.
142
- if (h.enable === 'claude-code') {
143
- const btn = el('button', 'primary small', 'Connect Claude Code');
144
- btn.addEventListener('click', () => void enableHarness({ runtime: 'claude-code' }, btn));
145
- const wrap = el('div', 'harness-enable');
146
- wrap.append(btn);
147
- li.append(wrap);
148
- } else if (h.enable === 'codex') {
149
- const btn = el('button', 'primary small', 'Use Codex');
150
- btn.addEventListener('click', () => void enableHarness({ runtime: 'codex' }, btn));
151
- const wrap = el('div', 'harness-enable');
152
- wrap.append(btn);
153
- li.append(wrap);
154
- } else if (h.enable === 'opencode') {
155
- const form = el('div', 'harness-enable');
156
- const input = el('input');
157
- input.type = 'text';
158
- input.placeholder = 'opencode serve URL (e.g. http://127.0.0.1:4096)';
159
- if (h.state === 'detected_not_exposed') input.value = h.detail;
160
- const btn = el('button', 'primary small', 'Add opencode');
161
- const submit = () => {
162
- const url = input.value.trim();
163
- if (url) void enableHarness({ runtime: 'opencode', serverUrl: url }, btn);
164
- };
165
- btn.addEventListener('click', submit);
166
- input.addEventListener('keydown', (e) => {
167
- if (e.key === 'Enter') submit();
168
- });
169
- form.append(input, btn);
170
- li.append(form);
171
- }
172
138
  list.append(li);
173
139
  }
174
140
  }
@@ -395,20 +361,6 @@ async function recheckHarnesses() {
395
361
  // Enable/expose a config-driven harness. On success the refreshed status
396
362
  // re-renders (the row flips to exposed). A failure — most often an unreachable
397
363
  // opencode URL — surfaces as a toast in place; the config is left untouched.
398
- async function enableHarness(body, btn) {
399
- if (btn) btn.disabled = true;
400
- try {
401
- const { status } = await postJSON('/api/harnesses/enable', body);
402
- if (status) {
403
- state.status = status;
404
- render();
405
- }
406
- toast(body.runtime === 'codex' ? 'Codex enabled.' : 'opencode added.');
407
- } catch (err) {
408
- if (btn) btn.disabled = false;
409
- toast(err.message || "couldn't enable that harness", true);
410
- }
411
- }
412
364
 
413
365
  // ---- logs ----
414
366
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cabane/companion",
3
- "version": "0.6.159",
3
+ "version": "0.6.161",
4
4
  "type": "module",
5
5
  "description": "The Cabane Companion (headless): connect an agent on your machine to your Cabane workspace as a responder — drive work against your own codebase, files, and MCP servers without putting any of it in Cabane.",
6
6
  "license": "UNLICENSED",
@@ -32,9 +32,9 @@
32
32
  "dependencies": {
33
33
  "@anthropic-ai/claude-agent-sdk": "0.3.289",
34
34
  "@anthropic-ai/sandbox-runtime": "0.0.77",
35
+ "@clack/prompts": "1.8.1",
35
36
  "@openai/codex-sdk": "0.160.0",
36
37
  "@hono/node-server": "1.19.14",
37
- "@inquirer/prompts": "7.10.1",
38
38
  "commander": "12.1.0",
39
39
  "eventsource-parser": "3.0.8",
40
40
  "hono": "4.12.18",