@andorra-labs/code 0.1.10 → 0.1.11
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 +28 -208
- package/THIRD_PARTY_NOTICES.md +15 -0
- package/dist/src/agent-execution.js +36 -0
- package/dist/src/app-server/protocol.d.ts +1 -0
- package/dist/src/app-server.d.ts +34 -1
- package/dist/src/app-server.js +264 -54
- package/dist/src/automation-service.js +1 -1
- package/dist/src/browser-session.d.ts +8 -0
- package/dist/src/browser-session.js +27 -1
- package/dist/src/browser-ui/app.js +237 -15
- package/dist/src/browser-ui/index.html +5 -5
- package/dist/src/browser-ui/style.css +110 -65
- package/dist/src/browser-ui/tokens.css +27 -26
- package/dist/src/coding-tools.d.ts +24 -0
- package/dist/src/coding-tools.js +71 -8
- package/dist/src/command-screens.js +1 -1
- package/dist/src/commands.js +1 -1
- package/dist/src/completion-gates.d.ts +42 -7
- package/dist/src/completion-gates.js +55 -9
- package/dist/src/completion.d.ts +8 -0
- package/dist/src/completion.js +19 -1
- package/dist/src/dashboard-view.js +2 -2
- package/dist/src/deadline.js +4 -0
- package/dist/src/graph-manager-chat.js +13 -13
- package/dist/src/graph-runner.js +39 -2
- package/dist/src/graph-server.js +9 -9
- package/dist/src/graph-sync.d.ts +8 -0
- package/dist/src/graph-sync.js +54 -3
- package/dist/src/graph-tool.js +1 -1
- package/dist/src/graph-ui/app.js +262 -93
- package/dist/src/graph-ui/controls.css +43 -22
- package/dist/src/graph-ui/controls.js +31 -1
- package/dist/src/graph-ui/embed.js +62 -13
- package/dist/src/graph-ui/icons.js +4 -0
- package/dist/src/graph-ui/index.html +3 -3
- package/dist/src/graph-ui/manager-state.js +2 -2
- package/dist/src/graph-ui/manager.css +19 -18
- package/dist/src/graph-ui/manager.js +11 -11
- package/dist/src/graph-ui/skill-picker.js +1 -1
- package/dist/src/graph-ui/studio-canvas.js +8 -8
- package/dist/src/graph-ui/studio.css +18 -15
- package/dist/src/graph-ui/studio.js +92 -35
- package/dist/src/graph-ui/style.css +122 -79
- package/dist/src/graph-ui/theme.js +2 -2
- package/dist/src/graph-ui/tokens.css +33 -29
- package/dist/src/graphs.d.ts +3 -2
- package/dist/src/graphs.js +3 -2
- package/dist/src/membership-errors.d.ts +7 -1
- package/dist/src/membership-errors.js +9 -3
- package/dist/src/pull-requests.d.ts +42 -6
- package/dist/src/pull-requests.js +11 -3
- package/dist/src/react-runtime.js +121 -14
- package/dist/src/read-document-doc.d.ts +20 -0
- package/dist/src/read-document-doc.js +524 -0
- package/dist/src/read-document-docx.d.ts +21 -0
- package/dist/src/read-document-docx.js +584 -0
- package/dist/src/read-document-text.d.ts +29 -0
- package/dist/src/read-document-text.js +67 -0
- package/dist/src/read-document-tool.d.ts +48 -0
- package/dist/src/read-document-tool.js +162 -0
- package/dist/src/read-document.d.ts +78 -0
- package/dist/src/read-document.js +353 -0
- package/dist/src/read-image.d.ts +29 -2
- package/dist/src/read-image.js +42 -17
- package/dist/src/runtime.d.ts +19 -0
- package/dist/src/runtime.js +10 -1
- package/dist/src/session-changes.d.ts +6 -1
- package/dist/src/session-changes.js +13 -5
- package/dist/src/side-panel.d.ts +6 -1
- package/dist/src/side-panel.js +12 -10
- package/dist/src/skills/bundled/create-skill/SKILL.md +1 -1
- package/dist/src/skills/bundled/diagram/SKILL.md +1 -1
- package/dist/src/skills/bundled/graph-manager/SKILL.md +37 -3
- package/dist/src/skills/bundled/graph-manager/patterns.md +27 -0
- package/dist/src/skills/bundled/provenance.json +4 -4
- package/dist/src/skills/runtime-skills.js +3 -3
- package/dist/src/stall-recovery.d.ts +6 -2
- package/dist/src/stall-recovery.js +7 -2
- package/dist/src/terminal-ui.js +2 -2
- package/dist/src/time-limit.d.ts +53 -0
- package/dist/src/time-limit.js +79 -0
- package/dist/src/tools.js +92 -7
- package/dist/src/transcript.js +1 -1
- package/dist/src/types.d.ts +6 -0
- package/dist/src/usage-analytics.d.ts +3 -1
- package/dist/src/usage-analytics.js +16 -2
- package/package.json +6 -26
- package/docs/README.md +0 -36
- package/docs/agents/README.md +0 -62
- package/docs/agents/install-for-agents.md +0 -56
- package/docs/agents/mcp-server.md +0 -212
- package/docs/agents/subagent-mode.md +0 -149
- package/docs/concepts/README.md +0 -47
- package/docs/concepts/jev-actionable-routing.md +0 -113
- package/docs/concepts/jev-decision-thresholds.md +0 -412
- package/docs/concepts/jev-efficiency.md +0 -217
- package/docs/concepts/jev-eval-2026-11-01.md +0 -78
- package/docs/concepts/limits.md +0 -52
- package/docs/concepts/memory.md +0 -10
- package/docs/concepts/security.md +0 -50
- package/docs/concepts/workspace-instructions.md +0 -29
- package/docs/getting-started/README.md +0 -82
- package/docs/getting-started/accounts.md +0 -78
- package/docs/getting-started/configure-providers.md +0 -132
- package/docs/guides/README.md +0 -13
- package/docs/guides/browser.md +0 -39
- package/docs/guides/desktop-app.md +0 -414
- package/docs/guides/extensions.md +0 -102
- package/docs/guides/graph-builder.md +0 -116
- package/docs/guides/headless.md +0 -46
- package/docs/guides/tui.md +0 -75
- package/docs/guides/update.md +0 -70
- package/docs/guides/web-search.md +0 -51
- package/docs/guides/windows-code-signing.md +0 -319
- package/docs/llms.txt +0 -45
- package/docs/reference/README.md +0 -7
- package/docs/reference/cli.md +0 -76
- package/docs/reference/config.md +0 -91
- package/docs/reference/slash-commands.md +0 -59
- package/docs/superpowers/plans/2026-11-01-claude-console-sign-in.md +0 -111
- package/docs/superpowers/plans/2026-11-01-jev-node-opt-in.md +0 -910
- package/docs/superpowers/plans/2026-11-02-workflow-pane.md +0 -398
- package/docs/superpowers/plans/2026-11-06-graph-soft-delete.md +0 -125
- package/docs/superpowers/plans/2026-11-09-orchestrator-delegation.md +0 -295
- package/docs/superpowers/plans/2026-11-13-graph-manager-chat.md +0 -203
- package/docs/superpowers/plans/2026-11-14-jev-fair-use-pricing.md +0 -79
- package/docs/superpowers/specs/2026-10-31-work-line-summary-design.md +0 -50
- package/docs/superpowers/specs/2026-11-01-claude-console-sign-in-design.md +0 -176
- package/docs/superpowers/specs/2026-11-01-jev-node-opt-in-design.md +0 -164
- package/docs/superpowers/specs/2026-11-01-pr-section-design.md +0 -111
- package/docs/superpowers/specs/2026-11-02-workflow-pane-design.md +0 -130
- package/docs/superpowers/specs/2026-11-06-bundled-skills-design.md +0 -206
- package/docs/superpowers/specs/2026-11-09-orchestrator-delegation-design.md +0 -291
- package/docs/superpowers/specs/2026-11-13-graph-manager-chat-design.md +0 -182
- package/docs/superpowers/specs/2026-11-14-jev-fair-use-pricing-design.md +0 -156
- package/scripts/jev-efficiency-eval.mjs +0 -187
- package/scripts/jev-efficiency-live.mjs +0 -193
- package/scripts/zcode-engine-replay.mjs +0 -223
- package/tests/agent-centric-mcp-test-plan.md +0 -208
- package/tests/analytics-settings-test-plan.md +0 -165
- package/tests/browser-cli-smoke.mjs +0 -276
- package/tests/browser-test-plan.md +0 -280
- package/tests/chat-side-panel-test-plan.md +0 -309
- package/tests/decision-engine-test-plan.md +0 -163
- package/tests/default-active-jev-test-plan.md +0 -85
- package/tests/harness-extensions-test-plan.md +0 -113
- package/tests/jev-all-decisions-test-plan.md +0 -156
- package/tests/jev-efficiency/criteria.json +0 -158
- package/tests/jev-efficiency/workloads.mjs +0 -242
- package/tests/jev-efficiency-test-plan.md +0 -198
- package/tests/permissions-sandbox-probe.mjs +0 -74
- package/tests/permissions-test-plan.md +0 -191
- package/tests/product-telemetry-test-plan.md +0 -536
- package/tests/thinking-stream-preview-test-plan.md +0 -136
- package/tests/zcode-react-engine-test-plan.md +0 -396
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
/* Measurements. The row is the Siderail row everywhere: 28px tall, 6px radius, 13px type. */
|
|
14
14
|
--rail-width: 232px; /* written live by RailResizeHandle while the edge is dragged */
|
|
15
15
|
--chrome-height: 36px; /* every title strip */
|
|
16
|
-
--reading-measure:
|
|
16
|
+
--reading-measure: 792px; /* the prose column */
|
|
17
17
|
--settings-measure: 880px; /* every settings page: one column, one left edge */
|
|
18
18
|
--row-height: 28px;
|
|
19
19
|
--row-radius: 6px;
|
|
@@ -21,14 +21,13 @@
|
|
|
21
21
|
--btn-height: 32px; /* the primary/soft button */
|
|
22
22
|
--btn-radius: 8px;
|
|
23
23
|
--card-radius: 12px;
|
|
24
|
-
--setting-row-height: 52px; /* a Settings row: a title over its one-line description */
|
|
25
24
|
/* The radius scale. Every corner takes one of these steps, and a corner inside another is the
|
|
26
25
|
outer step minus the padding between them, floored at the next step down: 4 for badges, menu
|
|
27
26
|
rows and inline code, 6 for rows, 28px buttons and icon buttons, 8 for 32px buttons, fields,
|
|
28
27
|
code blocks and menus, 12 for cards and dialogs, 20 for the composer (the one large rounded
|
|
29
28
|
object), and full for dots, avatars, switches and status pills. The --row/--btn/--input/--card
|
|
30
29
|
radii above are positions on it. */
|
|
31
|
-
--radius-xs: 4px; --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px; --radius-
|
|
30
|
+
--radius-xs: 4px; --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px; --radius-full: 999px;
|
|
32
31
|
--radius-composer: 20px;
|
|
33
32
|
|
|
34
33
|
--font-ui: "Geist Sans", "Geist", -apple-system, "SF Pro Text", system-ui, sans-serif;
|
|
@@ -39,10 +38,15 @@
|
|
|
39
38
|
--type-label: 12px;
|
|
40
39
|
--type-section: 15px;
|
|
41
40
|
--type-hint: 12px;
|
|
41
|
+
--type-h1: 17px; /* a message's top heading (D2): one step between the prose and the page title */
|
|
42
42
|
--weight-regular: 400; --weight-strong: 500;
|
|
43
|
-
/* Leading and tracking, one value per size: 12px on 16, 13px on 18,
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
/* Leading and tracking, one value per size, every line on the 2px grid: 12px on 16, 13px on 18,
|
|
44
|
+
14–15px headings and titles on 20, prose 14px on 22, the 17px heading and 20px titles on 24, and
|
|
45
|
+
12px code on 18. 13px type is tracked in by a hair (−0.08px), the way the platform faces set their
|
|
46
|
+
text size; a title is tracked in by a hundredth of its size, and a code meant to be read out (a
|
|
47
|
+
sign-in code) is spaced out. */
|
|
48
|
+
--leading-xs: 16px; --leading-sm: 18px; --leading-md: 20px; --leading-prose: 22px; --leading-lg: 24px;
|
|
49
|
+
--leading-code: 18px;
|
|
46
50
|
--tracking-sm: -0.08px; --tracking-title: -0.01em; --tracking-code: .06em;
|
|
47
51
|
/* A message is the one thing the window is read for at length, so its prose takes one step up
|
|
48
52
|
from the row size. The body is regular 400; a heading is 600 and a bold term 500. A bold term is
|
|
@@ -81,9 +85,11 @@
|
|
|
81
85
|
--hover: color-mix(in srgb, var(--text) 7%, transparent);
|
|
82
86
|
--selected: color-mix(in srgb, var(--text) 12%, transparent);
|
|
83
87
|
--bg-hover: var(--hover);
|
|
84
|
-
/* The neutral accent: the send button, the caret, a checked checkbox, a field's focus halo.
|
|
88
|
+
/* The neutral accent: the send button, the caret, a checked checkbox, a field's focus halo. The halo
|
|
89
|
+
is a focus indicator, so it keeps 3:1 against the ground it sits on (WCAG 1.4.11): the ink at 36%
|
|
90
|
+
here, 48% in light (P-IXD-16). */
|
|
85
91
|
--accent: #ececec; --accent-soft: rgba(245,245,245,.16); --on-accent: #141414;
|
|
86
|
-
--accent-hover: #ffffff; --accent-ring: rgba(245,245,245,.
|
|
92
|
+
--accent-hover: #ffffff; --accent-ring: rgba(245,245,245,.36);
|
|
87
93
|
/* The one hue in the chrome: the primary button's fill, keyboard focus, a switch that is on, links
|
|
88
94
|
and progress. Everything else is neutral, so the blue stays rare and means "the action". */
|
|
89
95
|
--accent-fill: #1372da; --accent-fill-hover: #2a7fdd; --on-accent-fill: #f5f5f5;
|
|
@@ -91,13 +97,12 @@
|
|
|
91
97
|
/* 2026-11-12: the chrome keeps no amber. --warn is the attention ink, a bright neutral: a row or
|
|
92
98
|
a pill that needs its person is marked by contrast, weight and motion, never by a warning hue.
|
|
93
99
|
--err is one clean red, kept for what failed and for removed lines; it is never a button. */
|
|
94
|
-
--ok: #2f9e6a; --err: #e5484d; --warn: #c9c9c9;
|
|
95
|
-
/* Merged: the violet GitHub gives a merged pull request, the one state the three status hues above
|
|
96
|
-
do not already name. */
|
|
97
|
-
--merged: #8e6ee0;
|
|
100
|
+
--ok: #2f9e6a; --err: #e5484d; --warn: #c9c9c9;
|
|
98
101
|
/* Text-safe status variants: --ok/--err/--warn are the dot and border colours the Siderail
|
|
99
102
|
language defines, and at small text sizes they fall short of 4.5:1 on these surfaces. Any use
|
|
100
103
|
of a status colour as foreground text takes the -text variant instead. */
|
|
104
|
+
/* Merged is the violet GitHub gives a merged pull request, the one state the hues above do not
|
|
105
|
+
already name; it only ever shows as a pill's word on its wash, so it has no dot ink. */
|
|
101
106
|
--ok-text: #7cc79a; --err-text: #f47174; --warn-text: #ececec; --merged-text: #bba4f2;
|
|
102
107
|
/* A picked skill in the composer. It is content the person typed, not chrome, and it has to read as
|
|
103
108
|
recognised at a glance, so it carries the one hue outside status and the accent (see ADR 0022).
|
|
@@ -106,7 +111,6 @@
|
|
|
106
111
|
/* A status pill's fill: a faint wash of its hue under the -text ink, light enough that the ink
|
|
107
112
|
keeps 4.5:1 on both the card and the pane ground. */
|
|
108
113
|
--ok-wash: rgba(47,158,106,.14); --err-wash: rgba(229,72,77,.14); --merged-wash: rgba(142,110,224,.14);
|
|
109
|
-
--warn-wash: rgba(245,245,245,.10);
|
|
110
114
|
--add-wash: rgba(47,158,106,.16); --del-wash: rgba(229,72,77,.16);
|
|
111
115
|
--overlay: rgba(0,0,0,.5);
|
|
112
116
|
|
|
@@ -119,8 +123,6 @@
|
|
|
119
123
|
--rail-wash: var(--hover);
|
|
120
124
|
/* 2026-11-12: the rail is a flat ground. The glow and grain are kept as tokens and switched off. */
|
|
121
125
|
--glow-1: transparent; --glow-2: transparent; --glow-size: 440px 380px; --grain: 0;
|
|
122
|
-
/* The waiting update row's halo: faint at rest and brighter at its peak. */
|
|
123
|
-
--update-glow-rest: rgba(245,245,245,.10); --update-glow-peak: rgba(245,245,245,.28);
|
|
124
126
|
|
|
125
127
|
/* Elevation: one shadow per step. lift-2 under a bordered card at rest, lift-3 for the composer
|
|
126
128
|
holding focus, menu for every menu and popover, panel for dialogs and toasts, raised for a chip
|
|
@@ -130,7 +132,6 @@
|
|
|
130
132
|
--lift-3: inset 0 1px 0 rgba(255,255,255,.07), 0 2px 4px rgba(0,0,0,.3), 0 18px 38px -10px rgba(0,0,0,.7);
|
|
131
133
|
--shadow-menu: 0 8px 28px rgba(0,0,0,.4);
|
|
132
134
|
--shadow-panel: var(--shadow-menu);
|
|
133
|
-
--shadow-lift: var(--shadow-menu); /* kept for the graph editor's copy; unused here */
|
|
134
135
|
--shadow-raised: 0 1px 2px rgba(0,0,0,.32);
|
|
135
136
|
--shadow-knob: 0 1px 2px rgba(0,0,0,.4);
|
|
136
137
|
|
|
@@ -143,14 +144,16 @@
|
|
|
143
144
|
the app is idle: the spinner turns only while work runs. */
|
|
144
145
|
/* 2026-11-12: quick and soft, with no overshoot. Row hover arrives and leaves at once; popovers
|
|
145
146
|
and rows take --dur-2, dialogs and view changes --dur-3, height --dur-4. */
|
|
146
|
-
--dur-0: 80ms; --dur-1: 120ms; --dur-2: 160ms; --dur-3: 200ms; --dur-4: 240ms;
|
|
147
|
+
--dur-0: 80ms; --dur-1: 120ms; --dur-2: 160ms; --dur-3: 200ms; --dur-4: 240ms;
|
|
147
148
|
--ease-standard: cubic-bezier(.2,.8,.2,1);
|
|
148
149
|
--ease-out: var(--ease-standard);
|
|
149
150
|
--ease-in-out: cubic-bezier(.65,0,.35,1);
|
|
150
151
|
--ease-exit: cubic-bezier(.4,0,1,1);
|
|
151
|
-
--ease-settle: var(--ease-standard); /* kept for the graph editor's copy; unused here */
|
|
152
152
|
--pop-distance: 4px; --pop-scale: .98;
|
|
153
153
|
--loop-spin: 1s; --loop-shimmer: 1.8s; --loop-breathe: 2.4s;
|
|
154
|
+
/* How long the pointer rests on a quiet affordance (the sidebar's sash) before it lights, so a pointer
|
|
155
|
+
only crossing it lights nothing. */
|
|
156
|
+
--delay-hover-intent: 150ms;
|
|
154
157
|
|
|
155
158
|
color-scheme: dark;
|
|
156
159
|
}
|
|
@@ -169,17 +172,17 @@
|
|
|
169
172
|
--bg-raised: #ffffff;
|
|
170
173
|
--switch-off: color-mix(in srgb, var(--text) 50%, transparent);
|
|
171
174
|
--accent: #1c1c1c; --accent-soft: rgba(28,28,28,.16); --on-accent: #ffffff;
|
|
172
|
-
--accent-hover: #333333; --accent-ring: rgba(28,28,28,.
|
|
175
|
+
--accent-hover: #333333; --accent-ring: rgba(28,28,28,.48);
|
|
173
176
|
--accent-fill: #1680f3; --accent-fill-hover: #1776dd; --on-accent-fill: #ffffff;
|
|
174
177
|
--accent-text: #0b6dd3; --focus: #1680f3;
|
|
175
|
-
--ok: #3d7a5c; --err: #d13438; --warn: #45464b;
|
|
176
|
-
/*
|
|
177
|
-
|
|
178
|
-
|
|
178
|
+
--ok: #3d7a5c; --err: #d13438; --warn: #45464b;
|
|
179
|
+
/* The pass word is a step darker than its dot: on the add wash an added line's "+" needs 4.5:1
|
|
180
|
+
(4.88:1 here, P-IXD-15). No merged ink in the source palette; this violet is in the key of the
|
|
181
|
+
pass and fail inks. */
|
|
182
|
+
--ok-text: #36704f; --err-text: #c4262e; --warn-text: #1c1c1c; --merged-text: #6a4fc4;
|
|
179
183
|
--skill: #3b4fc4; --skill-wash: rgba(59,79,196,.10);
|
|
180
184
|
/* Fainter than the dark washes: at .14 the pass ink on its own wash drops under 4.5:1. */
|
|
181
185
|
--ok-wash: rgba(61,122,92,.08); --err-wash: rgba(209,52,56,.08); --merged-wash: rgba(106,79,196,.08);
|
|
182
|
-
--warn-wash: rgba(28,28,28,.06);
|
|
183
186
|
/* A removed line has to be found beside an added one: at .08 it was all but white. At .13 the
|
|
184
187
|
fail ink still keeps 5:1 on it. */
|
|
185
188
|
--add-wash: rgba(61,122,92,.14); --del-wash: rgba(209,52,56,.13);
|
|
@@ -189,13 +192,11 @@
|
|
|
189
192
|
--code-fn: #795e26; --code-var: #001080; --code-type: #267f99; --code-meta: #af00db;
|
|
190
193
|
|
|
191
194
|
--glow-1: transparent; --glow-2: transparent; --glow-size: 480px 420px; --grain: 0;
|
|
192
|
-
--update-glow-rest: rgba(28,28,28,.08); --update-glow-peak: rgba(28,28,28,.20);
|
|
193
195
|
|
|
194
196
|
--lift-2: 0 1px 2px rgba(16,18,24,.04), 0 6px 24px rgba(16,18,24,.07);
|
|
195
197
|
--lift-3: 0 1px 2px rgba(16,18,24,.05), 0 6px 24px rgba(16,18,24,.085);
|
|
196
198
|
--shadow-menu: 0 2px 4px rgba(16,18,24,.05), 0 8px 20px rgba(16,18,24,.07), 0 24px 48px rgba(16,18,24,.07);
|
|
197
199
|
--shadow-panel: var(--shadow-menu);
|
|
198
|
-
--shadow-lift: var(--shadow-menu);
|
|
199
200
|
--shadow-raised: 0 1px 2px rgba(16,18,24,.12), 0 0 0 .5px rgba(16,18,24,.06);
|
|
200
201
|
--shadow-knob: 0 1px 2px rgba(16,18,24,.3);
|
|
201
202
|
|
|
@@ -243,11 +244,14 @@
|
|
|
243
244
|
:root {
|
|
244
245
|
--panel: 380px; /* the node inspector's width; the edge drag keeps it between 360 and 720 */
|
|
245
246
|
|
|
246
|
-
/* The canvas: the pane's own ground, and the dot of the grid that marks every snap point.
|
|
247
|
+
/* The canvas: the pane's own ground, and the dot of the grid that marks every snap point. The dot is
|
|
248
|
+
the ink at a fixed share of the ground (ADR 0022, A2: every grey is one ink at an alpha), so it is
|
|
249
|
+
a pure neutral in either appearance; light takes a slightly larger share to keep the grid as
|
|
250
|
+
visible on white as it is on the dark pane. */
|
|
247
251
|
--canvas-bg: var(--bg-surface);
|
|
248
|
-
--canvas-dot:
|
|
252
|
+
--canvas-dot: color-mix(in srgb, var(--text) 12%, var(--canvas-bg));
|
|
249
253
|
}
|
|
250
254
|
|
|
251
255
|
:root[data-theme='light'] {
|
|
252
|
-
--canvas-dot:
|
|
256
|
+
--canvas-dot: color-mix(in srgb, var(--text) 14%, var(--canvas-bg));
|
|
253
257
|
}
|
package/dist/src/graphs.d.ts
CHANGED
|
@@ -247,8 +247,9 @@ export declare const GRAPH_MANAGER_GRAPH_ID = "andorra-graph-manager";
|
|
|
247
247
|
* sets neither `capabilities` nor `tools`, exactly as the default graph's execution agent: the
|
|
248
248
|
* defaults allow the shell, which is what grants the `graphs` tool, and filesystem reads, which
|
|
249
249
|
* grant `read_skill_resource`. A delegated subagent never receives `graphs`, so the work stays on
|
|
250
|
-
* this node.
|
|
251
|
-
*
|
|
250
|
+
* this node. Its instruction has the agent ask in its reply, with the user's next message as the
|
|
251
|
+
* answer, and the node keeps session history so that message sees the question; as a top-level
|
|
252
|
+
* agent it is also offered `ask_user` wherever a person can answer.
|
|
252
253
|
*/
|
|
253
254
|
export declare const GRAPH_MANAGER_HARNESS: Graph;
|
|
254
255
|
/**
|
package/dist/src/graphs.js
CHANGED
|
@@ -126,8 +126,9 @@ export const GRAPH_MANAGER_GRAPH_ID = 'andorra-graph-manager';
|
|
|
126
126
|
* sets neither `capabilities` nor `tools`, exactly as the default graph's execution agent: the
|
|
127
127
|
* defaults allow the shell, which is what grants the `graphs` tool, and filesystem reads, which
|
|
128
128
|
* grant `read_skill_resource`. A delegated subagent never receives `graphs`, so the work stays on
|
|
129
|
-
* this node.
|
|
130
|
-
*
|
|
129
|
+
* this node. Its instruction has the agent ask in its reply, with the user's next message as the
|
|
130
|
+
* answer, and the node keeps session history so that message sees the question; as a top-level
|
|
131
|
+
* agent it is also offered `ask_user` wherever a person can answer.
|
|
131
132
|
*/
|
|
132
133
|
export const GRAPH_MANAGER_HARNESS = {
|
|
133
134
|
schemaVersion: 3, id: GRAPH_MANAGER_GRAPH_ID, name: 'Graph Manager', revision: 1, entry: 'manager',
|
|
@@ -5,7 +5,13 @@ export interface MembershipVerdict {
|
|
|
5
5
|
failureReason?: 'tls' | 'dns' | 'network';
|
|
6
6
|
subject?: string;
|
|
7
7
|
}
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* A graph feature the account's membership does not reach.
|
|
10
|
+
*
|
|
11
|
+
* The messages are the CLI's output, so they name `/login`; that advice is always a sentence of its
|
|
12
|
+
* own, which the desktop window replaces with its own way in (Settings › Account) when it shows the
|
|
13
|
+
* refusal (desktop/src/engine/errorWords.ts). Keep it that way when changing the wording.
|
|
14
|
+
*/
|
|
9
15
|
export declare class PaidMembershipRequiredError extends Error {
|
|
10
16
|
constructor(message?: string);
|
|
11
17
|
/**
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
const FEATURES = 'the Andorra
|
|
1
|
+
const FEATURES = 'the Andorra graph, custom graphs and the Graph Editor';
|
|
2
2
|
const REASONS = {
|
|
3
3
|
tls: 'a secure connection to the account service could not be verified',
|
|
4
4
|
dns: 'the account service address could not be resolved',
|
|
5
5
|
network: 'the account service could not be reached',
|
|
6
6
|
};
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* A graph feature the account's membership does not reach.
|
|
9
|
+
*
|
|
10
|
+
* The messages are the CLI's output, so they name `/login`; that advice is always a sentence of its
|
|
11
|
+
* own, which the desktop window replaces with its own way in (Settings › Account) when it shows the
|
|
12
|
+
* refusal (desktop/src/engine/errorWords.ts). Keep it that way when changing the wording.
|
|
13
|
+
*/
|
|
8
14
|
export class PaidMembershipRequiredError extends Error {
|
|
9
15
|
constructor(message = `Paid membership is required for ${FEATURES}. Use /login to sign in. If already signed in, check your membership or connection.`) { super(message); }
|
|
10
16
|
/**
|
|
@@ -19,7 +25,7 @@ export class PaidMembershipRequiredError extends Error {
|
|
|
19
25
|
return new PaidMembershipRequiredError(`Your Andorra membership could not be checked${reason}. This does not mean you were signed out; check your connection and retry.`);
|
|
20
26
|
}
|
|
21
27
|
if (!access.subject)
|
|
22
|
-
return new PaidMembershipRequiredError(`You are signed out of your Andorra account
|
|
28
|
+
return new PaidMembershipRequiredError(`You are signed out of your Andorra account; ${FEATURES} need a signed-in account. Use /login to sign in again.`);
|
|
23
29
|
if (!access.paid)
|
|
24
30
|
return new PaidMembershipRequiredError('This needs a paid membership, and your Andorra account does not have one.');
|
|
25
31
|
return new PaidMembershipRequiredError();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { WakeCarry } from './timers.js';
|
|
1
|
+
import type { WakeCarry, WakeOrigin } from './timers.js';
|
|
2
2
|
/**
|
|
3
3
|
* The pull request a session opened, and what the user (or the agent) asked the engine to do about it.
|
|
4
4
|
*
|
|
@@ -22,14 +22,22 @@ export interface SessionPullRequest {
|
|
|
22
22
|
handledThrough?: string;
|
|
23
23
|
/**
|
|
24
24
|
* An Auto-fix wake armed and not yet delivered. The handled mark moves to `through` only once a run carries
|
|
25
|
-
* the prompt: a wake lost with its engine is armed again by the next watcher instead of being skipped.
|
|
25
|
+
* the prompt: a wake lost with its engine is armed again by the next watcher instead of being skipped. `prompt` is
|
|
26
|
+
* the wake's text, so a run waiting for this review in another engine can take it there (`await_review`).
|
|
26
27
|
*/
|
|
27
28
|
pendingFix?: {
|
|
28
29
|
wakeId: string;
|
|
29
30
|
through: string;
|
|
31
|
+
prompt?: string;
|
|
30
32
|
};
|
|
31
33
|
/** The selections of the run that attached or last configured the PR, so an Auto-fix run continues under them. */
|
|
32
34
|
carry?: WakeCarry;
|
|
35
|
+
/**
|
|
36
|
+
* The graph node an Auto-fix prompt goes back to: the node that switched Auto-fix on, or failing that the node that
|
|
37
|
+
* attached the PR. Without it the prompt starts a new task at the graph's entry node, which is a different agent
|
|
38
|
+
* from the one that owns the PR's work.
|
|
39
|
+
*/
|
|
40
|
+
origin?: WakeOrigin;
|
|
33
41
|
/** The signed-in `gh` account that can read this PR; every call for it runs as this account. */
|
|
34
42
|
ghUser?: string;
|
|
35
43
|
/** Why the watcher last could not read this PR; cleared by the next successful read. */
|
|
@@ -160,10 +168,38 @@ export declare function applyPullRequestSettings(gh: GhRunner, current: SessionP
|
|
|
160
168
|
*/
|
|
161
169
|
export declare function applyPullRequestSettingsAsReadableAccount(gh: GhRunner, current: SessionPullRequest, changes: PullRequestSettings, now?: Date): Promise<SessionPullRequest>;
|
|
162
170
|
/** A session's pull request as its run's `pull_request` tool reaches it; bound to that session by the engine. */
|
|
171
|
+
/**
|
|
172
|
+
* How a wait for the next review ended. `comments` carries the Auto-fix prompt the wait took in place of a wake;
|
|
173
|
+
* `steered` means the user sent the run a message while it waited; `aborted` that the run was stopped.
|
|
174
|
+
*/
|
|
175
|
+
export type ReviewWait = {
|
|
176
|
+
kind: 'comments';
|
|
177
|
+
prompt: string;
|
|
178
|
+
} | {
|
|
179
|
+
kind: 'finished';
|
|
180
|
+
pullRequest: SessionPullRequest;
|
|
181
|
+
} | {
|
|
182
|
+
kind: 'off';
|
|
183
|
+
pullRequest: SessionPullRequest;
|
|
184
|
+
} | {
|
|
185
|
+
kind: 'none';
|
|
186
|
+
} | {
|
|
187
|
+
kind: 'timeout';
|
|
188
|
+
} | {
|
|
189
|
+
kind: 'steered';
|
|
190
|
+
} | {
|
|
191
|
+
kind: 'aborted';
|
|
192
|
+
};
|
|
163
193
|
export interface PullRequestControl {
|
|
164
194
|
status(): Promise<SessionPullRequest | undefined>;
|
|
165
|
-
|
|
166
|
-
|
|
195
|
+
/** `origin` is the graph node making the call, when one is: the node Auto-fix wakes. */
|
|
196
|
+
attach(url: string, settings: PullRequestSettings, origin?: WakeOrigin): Promise<SessionPullRequest>;
|
|
197
|
+
update(settings: PullRequestSettings, origin?: WakeOrigin): Promise<SessionPullRequest>;
|
|
198
|
+
/**
|
|
199
|
+
* Wait, inside the calling run, for the next review comments Auto-fix would wake the session for, the PR to be
|
|
200
|
+
* merged or closed, Auto-fix to be switched off, the user to message the run, `timeoutMs`, or `signal`.
|
|
201
|
+
*/
|
|
202
|
+
awaitReview?(signal: AbortSignal, timeoutMs: number, origin?: WakeOrigin): Promise<ReviewWait>;
|
|
167
203
|
dismiss(): Promise<void>;
|
|
168
204
|
}
|
|
169
205
|
/** Read the settings a caller passed, ignoring anything that is not a boolean setting. */
|
|
@@ -233,8 +269,8 @@ export interface PullRequestWatcherOptions {
|
|
|
233
269
|
intervalMs?: number;
|
|
234
270
|
/** A PR's stored state changed. */
|
|
235
271
|
onUpdated: (sessionId: string, pullRequest: SessionPullRequest) => void;
|
|
236
|
-
/** Arm an Auto-fix prompt for the session, continuing under `carry
|
|
237
|
-
wake: (sessionId: string, prompt: string, carry: WakeCarry | undefined) => string;
|
|
272
|
+
/** Arm an Auto-fix prompt for the session, continuing under `carry` and addressed to `origin`'s node; returns the wake's id. */
|
|
273
|
+
wake: (sessionId: string, prompt: string, carry: WakeCarry | undefined, origin: WakeOrigin | undefined) => string;
|
|
238
274
|
/** Whether this engine still holds the wake `id`, armed and not yet delivered. */
|
|
239
275
|
wakePending: (id: string) => boolean;
|
|
240
276
|
log?: (level: 'info' | 'warn', detail: string) => void;
|
|
@@ -44,7 +44,14 @@ function validPullRequest(value) {
|
|
|
44
44
|
&& typeof record.autoFix === 'boolean' && typeof record.mergeWhenReady === 'boolean'
|
|
45
45
|
&& typeof record.attachedAt === 'string' && typeof record.updatedAt === 'string'
|
|
46
46
|
&& (record.ghUser === undefined || typeof record.ghUser === 'string')
|
|
47
|
-
&& (record.watchError === undefined || typeof record.watchError === 'string')
|
|
47
|
+
&& (record.watchError === undefined || typeof record.watchError === 'string')
|
|
48
|
+
&& (record.origin === undefined || validOrigin(record.origin));
|
|
49
|
+
}
|
|
50
|
+
function validOrigin(value) {
|
|
51
|
+
if (typeof value !== 'object' || value === null)
|
|
52
|
+
return false;
|
|
53
|
+
const origin = value;
|
|
54
|
+
return typeof origin.runId === 'string' && origin.runId.length > 0 && typeof origin.nodeId === 'string' && origin.nodeId.length > 0;
|
|
48
55
|
}
|
|
49
56
|
/**
|
|
50
57
|
* A stored record as this version keeps it. Records written while Auto-archive existed still carry its two fields,
|
|
@@ -700,8 +707,9 @@ export class PullRequestWatcher {
|
|
|
700
707
|
if (current.pendingFix && this.options.wakePending(current.pendingFix.wakeId))
|
|
701
708
|
return;
|
|
702
709
|
// The handled mark is not moved here: it moves when a run carries the prompt (`markAutoFixDelivered`).
|
|
703
|
-
const
|
|
704
|
-
const
|
|
710
|
+
const prompt = autoFixPrompt(current, found);
|
|
711
|
+
const wakeId = this.options.wake(sessionId, prompt, current.carry, current.origin);
|
|
712
|
+
const next = { ...current, pendingFix: { wakeId, through: found.newest, prompt }, updatedAt: new Date().toISOString() };
|
|
705
713
|
await writePullRequest(home, sessionId, next);
|
|
706
714
|
this.options.onUpdated(sessionId, next);
|
|
707
715
|
});
|