@cabane/companion 0.6.145 → 0.6.147
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 +81 -51
- package/dist/cli.js +631 -1008
- package/dist/pairing-config.js +56 -95
- package/dist/runtime.js +625 -1000
- package/dist/static/app.js +9 -11
- package/package.json +1 -1
package/dist/static/app.js
CHANGED
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
const $ = (id) => document.getElementById(id);
|
|
6
6
|
|
|
7
|
-
// the dashboard is read-only
|
|
8
|
-
//
|
|
9
|
-
// app now. This frontend shows status, per-workspace state, the dispatch feed,
|
|
7
|
+
// the dashboard is read-only: the connect/disconnect lifecycle lives in the
|
|
8
|
+
// cabane app. This frontend shows status, per-workspace state, the dispatch feed,
|
|
10
9
|
// and logs, plus local-only Stop / Restart / Reload-config.
|
|
11
10
|
const state = {
|
|
12
11
|
status: null, // latest /api/status snapshot
|
|
@@ -87,7 +86,7 @@ function render() {
|
|
|
87
86
|
renderDispatches();
|
|
88
87
|
}
|
|
89
88
|
|
|
90
|
-
//
|
|
89
|
+
// The harnesses this device exposes to Cabane. `harnesses` is null until
|
|
91
90
|
// the first probe lands (show "checking…"); once probed, a list of three, and if
|
|
92
91
|
// NONE are exposed the loud empty state — the headline requirement. Each row shows
|
|
93
92
|
// a state badge, version when known, a one-line guide, and the friendly enable
|
|
@@ -139,8 +138,7 @@ function renderHarnesses() {
|
|
|
139
138
|
|
|
140
139
|
// Friendly enable — never install, never login (BYO). Claude Code and Codex are
|
|
141
140
|
// one-click flag flips; opencode takes a URL we validate is reachable before
|
|
142
|
-
// writing.
|
|
143
|
-
// the moment it was installed, with nothing to click.
|
|
141
|
+
// writing.
|
|
144
142
|
if (h.enable === 'claude-code') {
|
|
145
143
|
const btn = el('button', 'primary small', 'Connect Claude Code');
|
|
146
144
|
btn.addEventListener('click', () => void enableHarness({ runtime: 'claude-code' }, btn));
|
|
@@ -253,7 +251,7 @@ function renderConnected() {
|
|
|
253
251
|
// agents to run; this view just observes them.
|
|
254
252
|
li.append(dot, name, meta, spacer);
|
|
255
253
|
|
|
256
|
-
//
|
|
254
|
+
// The agents this device runs in this workspace, pulled from Cabane.
|
|
257
255
|
const agents = ws.agents || [];
|
|
258
256
|
if (agents.length) {
|
|
259
257
|
const sub = el('ul', 'ws-agents');
|
|
@@ -381,7 +379,7 @@ async function control(action) {
|
|
|
381
379
|
}
|
|
382
380
|
}
|
|
383
381
|
|
|
384
|
-
//
|
|
382
|
+
// Re-probe the harnesses now. The response carries the refreshed status;
|
|
385
383
|
// the SSE status:changed also lands, so either updates the surface.
|
|
386
384
|
async function recheckHarnesses() {
|
|
387
385
|
try {
|
|
@@ -395,7 +393,7 @@ async function recheckHarnesses() {
|
|
|
395
393
|
}
|
|
396
394
|
}
|
|
397
395
|
|
|
398
|
-
//
|
|
396
|
+
// Enable/expose a config-driven harness. On success the refreshed status
|
|
399
397
|
// re-renders (the row flips to exposed). A failure — most often an unreachable
|
|
400
398
|
// opencode URL — surfaces as a toast in place; the config is left untouched.
|
|
401
399
|
async function enableHarness(body, btn) {
|
|
@@ -540,7 +538,7 @@ async function boot() {
|
|
|
540
538
|
const s = state.status;
|
|
541
539
|
if (s) {
|
|
542
540
|
$('set-loglevel').value = 'debug';
|
|
543
|
-
//
|
|
541
|
+
// Auto-open defaults OFF, so the toggle seeds unchecked to match.
|
|
544
542
|
$('set-autoopen').checked = false;
|
|
545
543
|
}
|
|
546
544
|
}
|
|
@@ -580,7 +578,7 @@ setInterval(() => {
|
|
|
580
578
|
}
|
|
581
579
|
}, 1000);
|
|
582
580
|
|
|
583
|
-
//
|
|
581
|
+
// Re-probe harnesses when the window regains focus (a user tabs away to
|
|
584
582
|
// install/log into a harness, then back), throttled so rapid focus flaps don't
|
|
585
583
|
// spam the probes. The heartbeat cadence covers the background case.
|
|
586
584
|
let lastRecheck = 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cabane/companion",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.147",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The Cabane Companion (headless): connect a coding 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",
|