@andorra-labs/code 0.1.8 → 0.1.9
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/THIRD_PARTY_NOTICES.md +2 -1
- package/dist/src/account-presentation.d.ts +11 -0
- package/dist/src/account-presentation.js +29 -2
- package/dist/src/agent-execution.js +37 -4
- package/dist/src/agent-mcp.d.ts +12 -0
- package/dist/src/agent-mcp.js +81 -2
- package/dist/src/app-server/protocol.d.ts +12 -0
- package/dist/src/app-server/reasoning.d.ts +0 -8
- package/dist/src/app-server/reasoning.js +15 -28
- package/dist/src/app-server.d.ts +7 -0
- package/dist/src/app-server.js +59 -11
- package/dist/src/auth/AuthManager.d.ts +15 -0
- package/dist/src/auth/AuthManager.js +66 -7
- package/dist/src/browser-runner.js +1 -2
- package/dist/src/browser-server.js +10 -2
- package/dist/src/browser-session.js +6 -2
- package/dist/src/browser-stealth.d.ts +29 -0
- package/dist/src/browser-stealth.js +166 -0
- package/dist/src/browser-ui/app.js +108 -13
- package/dist/src/browser-ui/icons/chevron-right.svg +8 -0
- package/dist/src/browser-ui/index.html +8 -8
- package/dist/src/browser-ui/style.css +199 -171
- package/dist/src/browser-ui/tokens.css +198 -0
- package/dist/src/browser-view.d.ts +57 -9
- package/dist/src/browser-view.js +187 -36
- package/dist/src/cli.js +21 -4
- package/dist/src/coding-tools.js +9 -5
- package/dist/src/command-screens.js +4 -4
- package/dist/src/commands.d.ts +1 -1
- package/dist/src/commands.js +2 -1
- package/dist/src/completion-gates.d.ts +35 -0
- package/dist/src/completion-gates.js +25 -0
- package/dist/src/completion.d.ts +6 -0
- package/dist/src/completion.js +36 -3
- package/dist/src/config.d.ts +1 -1
- package/dist/src/config.js +2 -2
- package/dist/src/context-budget.d.ts +11 -0
- package/dist/src/context-budget.js +13 -0
- package/dist/src/decision/DecisionEngine.d.ts +5 -1
- package/dist/src/decision/DecisionManager.d.ts +1 -0
- package/dist/src/decision/DecisionManager.js +14 -3
- package/dist/src/decision/FactContinuations.d.ts +6 -0
- package/dist/src/decision/FactContinuations.js +9 -1
- package/dist/src/decision/FactServiceGate.js +1 -1
- package/dist/src/decision/hostedSkills.d.ts +37 -0
- package/dist/src/decision/hostedSkills.js +64 -0
- package/dist/src/decision/providers/AndorraDecisionProvider.d.ts +10 -2
- package/dist/src/decision/providers/AndorraDecisionProvider.js +121 -10
- package/dist/src/default-graph.d.ts +11 -0
- package/dist/src/default-graph.js +20 -0
- package/dist/src/duration.d.ts +13 -2
- package/dist/src/duration.js +27 -3
- package/dist/src/graph-manager-chat.d.ts +302 -0
- package/dist/src/graph-manager-chat.js +940 -0
- package/dist/src/graph-runner.js +6 -0
- package/dist/src/graph-server.d.ts +9 -0
- package/dist/src/graph-server.js +167 -16
- package/dist/src/graph-studio-features.js +2 -2
- package/dist/src/graph-sync.js +5 -2
- package/dist/src/graph-ui/app.js +252 -71
- package/dist/src/graph-ui/controls.css +55 -32
- package/dist/src/graph-ui/controls.js +85 -9
- package/dist/src/graph-ui/edge-router.js +114 -13
- package/dist/src/graph-ui/embed.js +23 -8
- package/dist/src/graph-ui/index.html +3 -3
- package/dist/src/graph-ui/library.css +4 -10
- package/dist/src/graph-ui/manager-markdown.js +155 -0
- package/dist/src/graph-ui/manager-state.js +191 -0
- package/dist/src/graph-ui/manager.css +161 -0
- package/dist/src/graph-ui/manager.js +700 -0
- package/dist/src/graph-ui/studio-canvas.js +2 -0
- package/dist/src/graph-ui/studio.css +24 -23
- package/dist/src/graph-ui/studio.js +29 -8
- package/dist/src/graph-ui/style.css +125 -92
- package/dist/src/graph-ui/tokens.css +217 -151
- package/dist/src/graphs.d.ts +69 -1
- package/dist/src/graphs.js +160 -7
- package/dist/src/hardened-runtime.js +8 -2
- package/dist/src/membership-errors.d.ts +14 -0
- package/dist/src/membership-errors.js +24 -1
- package/dist/src/membership.d.ts +20 -0
- package/dist/src/membership.js +45 -16
- package/dist/src/palette.d.ts +25 -8
- package/dist/src/palette.js +26 -8
- package/dist/src/provider-engine.d.ts +4 -4
- package/dist/src/provider-engine.js +39 -22
- package/dist/src/providers.d.ts +24 -0
- package/dist/src/providers.js +47 -2
- package/dist/src/qa/guidance.d.ts +26 -0
- package/dist/src/qa/guidance.js +59 -0
- package/dist/src/qa/index.d.ts +1 -6
- package/dist/src/qa/index.js +1 -14
- package/dist/src/qa/runtime/ProcessManager.d.ts +20 -2
- package/dist/src/qa/runtime/ProcessManager.js +69 -13
- package/dist/src/react-runtime.d.ts +11 -0
- package/dist/src/react-runtime.js +190 -51
- package/dist/src/remote/engine-pool.js +4 -1
- package/dist/src/run-progress.d.ts +6 -0
- package/dist/src/run-progress.js +7 -0
- package/dist/src/runtime.d.ts +8 -0
- package/dist/src/session-skills.d.ts +75 -0
- package/dist/src/session-skills.js +151 -0
- package/dist/src/side-panel.d.ts +1 -1
- package/dist/src/side-panel.js +6 -12
- package/dist/src/skill-commands.js +1 -1
- package/dist/src/skills/bundled/control-browser/SKILL.md +9 -1
- package/dist/src/skills/bundled/graph-manager/SKILL.md +8 -0
- package/dist/src/skills/bundled/provenance.json +3 -3
- package/dist/src/skills/bundled/web-gui-tester/SKILL.md +1 -1
- package/dist/src/stall-recovery.d.ts +22 -0
- package/dist/src/stall-recovery.js +71 -0
- package/dist/src/subagent-run.js +1 -2
- package/dist/src/terminal-ui.d.ts +2 -2
- package/dist/src/terminal-ui.js +18 -13
- package/dist/src/transcript.js +9 -1
- package/dist/src/types.d.ts +18 -4
- package/dist/src/usage-analytics.d.ts +7 -0
- package/dist/src/usage-analytics.js +55 -15
- package/docs/concepts/README.md +1 -1
- package/docs/concepts/limits.md +9 -0
- package/docs/guides/desktop-app.md +1 -1
- package/docs/guides/graph-builder.md +16 -1
- package/docs/reference/slash-commands.md +2 -1
- package/docs/superpowers/plans/2026-11-13-graph-manager-chat.md +203 -0
- package/docs/superpowers/plans/2026-11-14-jev-fair-use-pricing.md +79 -0
- package/docs/superpowers/specs/2026-11-13-graph-manager-chat-design.md +182 -0
- package/docs/superpowers/specs/2026-11-14-jev-fair-use-pricing-design.md +156 -0
- package/package.json +1 -1
- package/tests/chat-side-panel-test-plan.md +1 -1
|
@@ -447,6 +447,8 @@
|
|
|
447
447
|
}
|
|
448
448
|
const previous = studio.canvas;
|
|
449
449
|
studio.canvas = () => { previous?.(); makeGroups(); installPortDragging(); minimap(); };
|
|
450
|
+
// A dragged card carries its layout group's frame with it; the minimap follows on release.
|
|
451
|
+
studio.dragged = () => { makeGroups(); };
|
|
450
452
|
installToolbar();
|
|
451
453
|
marquee();
|
|
452
454
|
installKeyboard();
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
/* Test and Runs: the two secondary actions that stay in the toolbar. */
|
|
8
|
-
.studio-secondary[aria-pressed="true"] { background: var(--accent-soft); }
|
|
8
|
+
.studio-secondary[aria-pressed="true"] { background: var(--selected, var(--accent-soft)); }
|
|
9
9
|
|
|
10
10
|
.studio-dialog {
|
|
11
11
|
width: min(620px, calc(100vw - 40px)); max-height: min(84dvh, 860px);
|
|
12
|
-
border: 1px solid var(--border); border-radius: var(--
|
|
12
|
+
border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 0;
|
|
13
13
|
background: var(--bg-input); color: var(--text); box-shadow: var(--shadow-menu);
|
|
14
14
|
}
|
|
15
15
|
.studio-dialog.wide { width: min(840px, calc(100vw - 40px)); }
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
|
|
25
25
|
.studio-code {
|
|
26
26
|
margin: 8px 0 0; width: 100%; padding: 12px; border: 1px solid var(--border);
|
|
27
|
-
background: var(--bg-card); border-radius:
|
|
27
|
+
background: var(--bg-card); border-radius: var(--radius-md); color: var(--text);
|
|
28
28
|
font-size: var(--type-xs); line-height: 1.5; font-family: var(--font-mono); white-space: pre-wrap; overflow: auto; overflow-wrap: anywhere; max-height: 380px;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.studio-template { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
|
|
32
32
|
.studio-template > button { min-width: 132px; text-align: left; }
|
|
33
33
|
.studio-template p { margin: 0; color: var(--text-2); line-height: 1.45; }
|
|
34
|
-
.studio-history-row { padding: 12px; border: 1px solid var(--border); border-radius:
|
|
34
|
+
.studio-history-row { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); }
|
|
35
35
|
.studio-history-row > strong { display: block; margin-bottom: 4px; }
|
|
36
36
|
.studio-history-row .help { margin: 4px 0 10px; }
|
|
37
37
|
.studio-history-row > button { margin-right: 8px; }
|
|
@@ -51,25 +51,25 @@
|
|
|
51
51
|
.studio-run-log { flex: 1; overflow: auto; display: flex; flex-direction: column; align-items: stretch; padding: 5px 14px 12px; }
|
|
52
52
|
.studio-run-event {
|
|
53
53
|
border: 0; border-bottom: 1px solid var(--border); border-radius: 0; text-align: left; padding: 6px 8px;
|
|
54
|
-
font-family: var(--font-mono); font-size: var(--type-xs); line-height: 1.4; white-space: normal; background: transparent; color: var(--text-2);
|
|
54
|
+
font-family: var(--font-mono); font-size: var(--type-xs); font-weight: var(--weight-regular); line-height: 1.4; white-space: normal; background: transparent; color: var(--text-2);
|
|
55
55
|
}
|
|
56
|
-
.studio-run-event:hover { background: var(--bg-card); }
|
|
56
|
+
.studio-run-event:hover:not(:disabled) { background: var(--hover, var(--bg-card)); }
|
|
57
57
|
|
|
58
58
|
#canvas .studio-group-layer { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 0; }
|
|
59
59
|
#canvas .studio-group {
|
|
60
60
|
position: absolute; background: var(--accent-soft); border: 1px dashed var(--border-strong);
|
|
61
|
-
border-radius:
|
|
61
|
+
border-radius: var(--radius-lg); pointer-events: none;
|
|
62
62
|
}
|
|
63
63
|
#canvas .studio-group-title {
|
|
64
64
|
position: absolute; top: 5px; left: 8px; border: 0; background: var(--bg-input);
|
|
65
|
-
color: var(--text-2); padding: 2px var(--space-2); min-height: 0; border-radius: var(--
|
|
65
|
+
color: var(--text-2); padding: 2px var(--space-2); min-height: 0; border-radius: var(--radius-xs); font-size: var(--type-label); pointer-events: auto;
|
|
66
66
|
}
|
|
67
67
|
#canvas .studio-group-remove {
|
|
68
68
|
position: absolute; top: 5px; right: 8px; border: 0; background: var(--bg-input);
|
|
69
|
-
color: var(--text-2); padding: 1px var(--space-2); min-height: 0; border-radius: var(--
|
|
69
|
+
color: var(--text-2); padding: 1px var(--space-2); min-height: 0; border-radius: var(--radius-xs); pointer-events: auto;
|
|
70
70
|
}
|
|
71
71
|
#canvas .studio-wire-preview { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 7; }
|
|
72
|
-
#canvas .studio-marquee { position: absolute; border: 1px solid var(--accent); background: var(--accent-soft); pointer-events: none; z-index: 7; }
|
|
72
|
+
#canvas .studio-marquee { position: absolute; border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius-xs); pointer-events: none; z-index: 7; }
|
|
73
73
|
|
|
74
74
|
#studio-minimap {
|
|
75
75
|
position: absolute; bottom: var(--space-4); right: var(--space-4); width: 160px; height: 100px;
|
|
@@ -77,21 +77,20 @@
|
|
|
77
77
|
box-shadow: var(--shadow-menu); z-index: 4; cursor: crosshair; overflow: hidden;
|
|
78
78
|
}
|
|
79
79
|
/* The map is a sketch of the canvas: nodes are quiet blocks in the card's own outline colour, so
|
|
80
|
-
the viewport's frame is the brightest thing on it. */
|
|
80
|
+
the viewport's frame is the brightest thing on it. Like the cards, an end carries no hue. */
|
|
81
81
|
#studio-minimap .studio-minimap-node { fill: var(--border-strong); stroke: none; rx: 2px; }
|
|
82
|
-
#studio-minimap .studio-minimap-end { fill: var(--
|
|
82
|
+
#studio-minimap .studio-minimap-end { fill: var(--text-3); stroke: none; rx: 2px; opacity: .6; }
|
|
83
83
|
/* The viewport is a faint wash. A webview without `color-mix()` keeps the fallback, which leaves
|
|
84
84
|
the rectangle unfilled rather than drawing it as a solid block. */
|
|
85
85
|
#studio-minimap .studio-minimap-viewport { fill: transparent; fill: color-mix(in srgb, var(--accent) 10%, transparent); stroke: var(--border-strong); stroke-width: 1; rx: 3px; vector-effect: non-scaling-stroke; pointer-events: none; }
|
|
86
86
|
|
|
87
|
-
/* Node run states
|
|
88
|
-
the two colours the chrome allows, done and error. */
|
|
89
|
-
.node.studio-node-preview { box-shadow: 0 0 0 2px var(--warn); }
|
|
90
|
-
.node.studio-node-running { box-shadow: 0 0 0 2px var(--accent);
|
|
91
|
-
.node.studio-node-complete { box-shadow: 0 0 0 2px var(--ok); }
|
|
92
|
-
.node.studio-node-failed { box-shadow: 0 0 0 2px var(--err); }
|
|
93
|
-
.node.studio-node-cancelled { box-shadow: 0 0 0 2px var(--text-3); }
|
|
94
|
-
@keyframes studio-pulse { 50% { box-shadow: 0 0 0 4px var(--accent-soft); } }
|
|
87
|
+
/* Node run states: a steady 2px ring, with no glow and nothing that loops. The live state is the
|
|
88
|
+
ink accent; the settled states are the two colours the chrome allows, done and error. */
|
|
89
|
+
.node.studio-node-preview { box-shadow: var(--lift-2), 0 0 0 2px var(--warn); }
|
|
90
|
+
.node.studio-node-running { box-shadow: var(--lift-2), 0 0 0 2px var(--accent); }
|
|
91
|
+
.node.studio-node-complete { box-shadow: var(--lift-2), 0 0 0 2px var(--ok); }
|
|
92
|
+
.node.studio-node-failed { box-shadow: var(--lift-2), 0 0 0 2px var(--err); }
|
|
93
|
+
.node.studio-node-cancelled { box-shadow: var(--lift-2), 0 0 0 2px var(--text-3); }
|
|
95
94
|
|
|
96
95
|
#inspector .studio-code { max-height: 280px; }
|
|
97
96
|
#inspector-body > .section button { white-space: normal; }
|
|
@@ -106,7 +105,9 @@
|
|
|
106
105
|
.studio-run-panel { flex-basis: 180px; height: 180px; }
|
|
107
106
|
.studio-dialog-body { padding: var(--space-3); }
|
|
108
107
|
}
|
|
109
|
-
@media (prefers-reduced-motion: reduce) { .node.
|
|
108
|
+
@media (prefers-reduced-motion: reduce) { .node.node-error-pulse { animation: none; } }
|
|
110
109
|
|
|
111
|
-
/* The route a run has already taken is drawn in the accent, like the traced connection
|
|
112
|
-
|
|
110
|
+
/* The route a run has already taken is drawn in the accent, like the traced connection; the route
|
|
111
|
+
into a node that failed is the one connection drawn in red. */
|
|
112
|
+
#edges path.studio-route-visited { stroke: var(--accent); stroke-width: 2; opacity: 1; }
|
|
113
|
+
#edges path.studio-route-visited.studio-route-failed { stroke: var(--err); }
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
(() => {
|
|
3
3
|
'use strict';
|
|
4
4
|
const $studio = id => document.getElementById(id);
|
|
5
|
+
// A dialog or menu leaves the way it came (controls.js); a page without that layer (a harness)
|
|
6
|
+
// closes it at once.
|
|
7
|
+
const shut = dialog => (typeof globalThis.AndorraControls?.closeDialog === 'function' ? globalThis.AndorraControls.closeDialog(dialog) : dialog.close());
|
|
8
|
+
const leave = (layer, done) => (typeof globalThis.AndorraControls?.leave === 'function' ? globalThis.AndorraControls.leave(layer, done) : (done(), () => {}));
|
|
5
9
|
const element = (tag, content, className) => {
|
|
6
10
|
const node = document.createElement(tag);
|
|
7
11
|
if (content !== undefined) node.textContent = String(content);
|
|
@@ -22,7 +26,7 @@
|
|
|
22
26
|
function modal(title, build, wide = false) {
|
|
23
27
|
const dialog = element('dialog', undefined, 'studio-dialog' + (wide ? ' wide' : ''));
|
|
24
28
|
const head = element('header', undefined, 'studio-dialog-head');
|
|
25
|
-
head.append(element('strong', title), action('Close', () => dialog
|
|
29
|
+
head.append(element('strong', title), action('Close', () => shut(dialog)));
|
|
26
30
|
const body = element('div', undefined, 'studio-dialog-body');
|
|
27
31
|
dialog.append(head, body);
|
|
28
32
|
document.body.append(dialog);
|
|
@@ -159,7 +163,10 @@
|
|
|
159
163
|
// The install runs after applyDraft's marker-stripping copy, so the requirements are
|
|
160
164
|
// mirrored onto the live draft here — that mirror is what an autosave persists and a
|
|
161
165
|
// later draft recovery restores.
|
|
162
|
-
() => { state.pendingProviderNodes = new Set(pending); if (typeof syncImportRequirementsMarker === 'function') syncImportRequirementsMarker(); }))
|
|
166
|
+
() => { state.pendingProviderNodes = new Set(pending); if (typeof syncImportRequirementsMarker === 'function') syncImportRequirementsMarker(); })) {
|
|
167
|
+
if (typeof graphOpened === 'function') graphOpened('import');
|
|
168
|
+
return true;
|
|
169
|
+
}
|
|
163
170
|
return false;
|
|
164
171
|
}
|
|
165
172
|
async function importGraphFile(file) {
|
|
@@ -299,7 +306,7 @@
|
|
|
299
306
|
const next = { ...snapshot, id: graphId === 'default' ? newId() : graphId,
|
|
300
307
|
revision: graphId === 'default' ? 0 : baseRevision };
|
|
301
308
|
if (await applyDraft(next, 'Restored revision ' + row.revision + ' into a draft. Save to publish it.')) {
|
|
302
|
-
dialog
|
|
309
|
+
shut(dialog);
|
|
303
310
|
}
|
|
304
311
|
}, 'primary'));
|
|
305
312
|
item.append(detail);
|
|
@@ -573,13 +580,22 @@
|
|
|
573
580
|
const more = $studio('more'), menu = $studio('more-menu'), wrap = $studio('more-wrap');
|
|
574
581
|
if (!more || !menu) return;
|
|
575
582
|
const items = () => [...menu.querySelectorAll('[role="menuitem"]')].filter(item => !item.disabled && !item.hidden);
|
|
583
|
+
// The menu leaves the way it came and is hidden once its exit has played; reopening it during
|
|
584
|
+
// the exit keeps it where it is.
|
|
585
|
+
let leaving = null;
|
|
586
|
+
const isOpen = () => !menu.hidden && !leaving;
|
|
576
587
|
const close = (focus = false) => {
|
|
577
|
-
if (
|
|
578
|
-
|
|
588
|
+
if (!isOpen()) return;
|
|
589
|
+
more.setAttribute('aria-expanded', 'false');
|
|
590
|
+
const keep = leave(menu, () => { leaving = null; menu.hidden = true; });
|
|
591
|
+
if (!menu.hidden) leaving = keep;
|
|
579
592
|
if (focus) more.focus();
|
|
580
593
|
};
|
|
581
|
-
const open = () => {
|
|
582
|
-
|
|
594
|
+
const open = () => {
|
|
595
|
+
leaving?.(); leaving = null;
|
|
596
|
+
menu.hidden = false; more.setAttribute('aria-expanded', 'true'); items()[0]?.focus();
|
|
597
|
+
};
|
|
598
|
+
more.onclick = event => { event.stopPropagation(); if (isOpen()) close(); else open(); };
|
|
583
599
|
more.addEventListener('keydown', event => {
|
|
584
600
|
if (event.key === 'ArrowDown' || event.key === 'Enter' || event.key === ' ') { event.preventDefault(); open(); }
|
|
585
601
|
});
|
|
@@ -705,7 +721,12 @@
|
|
|
705
721
|
const activeRoutes = new Set((runMatchesCanvas() ? liveEvents : []).filter(event => event.type === 'graph.edge.activated')
|
|
706
722
|
.map(event => JSON.stringify([event.source, event.outcome || 'completed', event.target])));
|
|
707
723
|
for (const route of $studio('edges')?.querySelectorAll('path[data-route]') || []) {
|
|
708
|
-
|
|
724
|
+
const visited = activeRoutes.has(route.getAttribute('data-route'));
|
|
725
|
+
route.classList.toggle('studio-route-visited', visited);
|
|
726
|
+
// The one red line on the canvas: the route a run took into the node where it failed.
|
|
727
|
+
let target = '';
|
|
728
|
+
try { target = JSON.parse(route.getAttribute('data-route'))?.[2] ?? ''; } catch { /* Not a route. */ }
|
|
729
|
+
route.classList.toggle('studio-route-failed', visited && executed.get(target) === 'studio-node-failed');
|
|
709
730
|
}
|
|
710
731
|
for (const node of $studio('nodes')?.children || []) {
|
|
711
732
|
const id = node.getAttribute('data-node-id');
|