@andorra-labs/code 0.1.10 → 0.1.12
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 +31 -205
- package/THIRD_PARTY_NOTICES.md +30 -0
- package/dist/src/agent-execution.js +50 -2
- package/dist/src/agent-mcp.js +5 -0
- package/dist/src/app-server/protocol.d.ts +9 -1
- package/dist/src/app-server/protocol.js +1 -1
- package/dist/src/app-server.d.ts +49 -1
- package/dist/src/app-server.js +353 -64
- package/dist/src/automation-service.js +1 -1
- package/dist/src/browser-panel-tool.d.ts +24 -3
- package/dist/src/browser-panel-tool.js +80 -6
- package/dist/src/browser-runner.js +3 -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/browser-view.d.ts +16 -0
- package/dist/src/browser-view.js +38 -2
- package/dist/src/claude-provider.js +15 -2
- package/dist/src/cli.d.ts +2 -1
- package/dist/src/cli.js +175 -43
- package/dist/src/code-intelligence/CodeIntelligenceManager.js +1 -1
- package/dist/src/codex-provider.js +6 -3
- package/dist/src/coding-tools.d.ts +26 -1
- package/dist/src/coding-tools.js +104 -33
- 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 +51 -1
- package/dist/src/completion.js +164 -5
- package/dist/src/config.d.ts +1 -0
- package/dist/src/config.js +2 -0
- package/dist/src/dashboard-view.js +2 -2
- package/dist/src/deadline.js +4 -0
- package/dist/src/decision/PreparedSteps.js +1 -1
- package/dist/src/delegation-changes.js +19 -2
- package/dist/src/diff-preview.d.ts +1 -0
- package/dist/src/diff-preview.js +12 -3
- package/dist/src/engine-streams.d.ts +22 -0
- package/dist/src/engine-streams.js +16 -0
- package/dist/src/extensions.js +17 -6
- package/dist/src/file-read-key.d.ts +8 -0
- package/dist/src/file-read-key.js +12 -0
- package/dist/src/graph-editor-session.js +2 -1
- package/dist/src/graph-health.d.ts +21 -0
- package/dist/src/graph-health.js +46 -0
- package/dist/src/graph-manager-chat.d.ts +52 -3
- package/dist/src/graph-manager-chat.js +62 -17
- package/dist/src/graph-runner.js +62 -5
- package/dist/src/graph-server.d.ts +1 -1
- package/dist/src/graph-server.js +48 -27
- 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 +362 -123
- package/dist/src/graph-ui/controls.css +95 -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 +7 -0
- package/dist/src/graph-ui/index.html +4 -4
- package/dist/src/graph-ui/manager-state.js +143 -5
- package/dist/src/graph-ui/manager.css +21 -20
- package/dist/src/graph-ui/manager.js +337 -75
- package/dist/src/graph-ui/model-picker.js +279 -0
- package/dist/src/graph-ui/provider-glyphs/alibaba-cloud.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/anthropic.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/aws-bedrock.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/claude.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/deepseek.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/fireworks.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/kimi.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/minimax.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/openai.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/opencode.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/openrouter.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/xai.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/xiaomi-mimo.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/zai.png +0 -0
- 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 +5 -2
- package/dist/src/graphs.js +10 -9
- package/dist/src/mcp.d.ts +52 -14
- package/dist/src/mcp.js +285 -128
- package/dist/src/membership-errors.d.ts +7 -1
- package/dist/src/membership-errors.js +9 -3
- package/dist/src/memory/ProjectMemory.d.ts +77 -0
- package/dist/src/memory/ProjectMemory.js +310 -0
- package/dist/src/memory/index.d.ts +1 -0
- package/dist/src/memory/index.js +1 -0
- package/dist/src/opencode-provider.js +5 -6
- package/dist/src/package-name.d.ts +3 -0
- package/dist/src/package-name.js +3 -0
- package/dist/src/provider-engine.js +2 -2
- package/dist/src/pull-requests.d.ts +42 -6
- package/dist/src/pull-requests.js +11 -3
- package/dist/src/qa/runtime/PtyManager.js +2 -1
- package/dist/src/react-runtime.js +137 -22
- 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/remote/cert.d.ts +1 -1
- package/dist/src/remote/cert.js +2 -7
- package/dist/src/remote/client.js +1 -1
- package/dist/src/remote/pem.d.ts +6 -0
- package/dist/src/remote/pem.js +11 -0
- package/dist/src/run-records.js +49 -10
- package/dist/src/runtime.d.ts +21 -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/sessions.d.ts +3 -1
- package/dist/src/sessions.js +5 -3
- package/dist/src/side-panel.d.ts +6 -1
- package/dist/src/side-panel.js +12 -10
- package/dist/src/sign-in-detection.d.ts +82 -0
- package/dist/src/sign-in-detection.js +197 -0
- package/dist/src/sign-in-offer.d.ts +35 -0
- package/dist/src/sign-in-offer.js +116 -0
- 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 +59 -7
- 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.d.ts +6 -0
- package/dist/src/skills/runtime-skills.js +16 -3
- package/dist/src/stall-recovery.d.ts +6 -2
- package/dist/src/stall-recovery.js +7 -2
- package/dist/src/stray-files.d.ts +14 -0
- package/dist/src/stray-files.js +81 -0
- package/dist/src/subagent-run.js +6 -1
- package/dist/src/terminal-ui.d.ts +1 -1
- package/dist/src/terminal-ui.js +11 -5
- package/dist/src/time-limit.d.ts +53 -0
- package/dist/src/time-limit.js +79 -0
- package/dist/src/tool-activity.js +1 -1
- package/dist/src/tool-schema-compatibility.d.ts +7 -2
- package/dist/src/tool-schema-compatibility.js +8 -4
- package/dist/src/tools.js +92 -7
- package/dist/src/transcript.d.ts +5 -0
- package/dist/src/transcript.js +12 -4
- package/dist/src/types.d.ts +8 -0
- package/dist/src/untracked-file-removal.d.ts +3 -0
- package/dist/src/untracked-file-removal.js +125 -0
- package/dist/src/update-check.js +1 -1
- package/dist/src/update.d.ts +11 -1
- package/dist/src/update.js +27 -5
- package/dist/src/usage-analytics.d.ts +3 -1
- package/dist/src/usage-analytics.js +16 -2
- package/dist/src/workspace-git-metadata.d.ts +15 -0
- package/dist/src/workspace-git-metadata.js +50 -1
- package/dist/src/workspace-instructions.js +1 -1
- 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
package/dist/src/graph-sync.js
CHANGED
|
@@ -642,7 +642,13 @@ export class GraphSync {
|
|
|
642
642
|
}
|
|
643
643
|
async perform() {
|
|
644
644
|
this.deadline = this.now() + 20_000;
|
|
645
|
-
|
|
645
|
+
// The timer re-checks an account that is already in sync every 30 seconds, and the local sweep
|
|
646
|
+
// takes several passes to visit every file. Saying "Saving…" and then "will resume" for each of
|
|
647
|
+
// them would take back a verdict nothing has changed: while a pass sends nothing, the account
|
|
648
|
+
// stays synced. A save or delete replaces this object, and so does the first upload of the pass
|
|
649
|
+
// (a revision save marks nothing pending), so a change during the pass is reported.
|
|
650
|
+
const recheck = this.status.state === 'synced' ? this.status : undefined;
|
|
651
|
+
this.status = recheck ?? { state: 'syncing', detail: 'Saving graphs to your account…' };
|
|
646
652
|
// Repair interrupted local deletions before network authorization: even an offline machine
|
|
647
653
|
// must not show a graph whose tombstone was committed before a crash. A save that landed
|
|
648
654
|
// after that tombstone is revived rather than removed.
|
|
@@ -718,6 +724,8 @@ export class GraphSync {
|
|
|
718
724
|
if (options.confirm || !await this.cached(hash)) {
|
|
719
725
|
// A refused snapshot stays on this machine and is offered again on a later sweep, so an
|
|
720
726
|
// upgraded account uploads it then.
|
|
727
|
+
if (this.status === recheck)
|
|
728
|
+
this.status = { state: 'syncing', detail: 'Saving graphs to your account…' };
|
|
721
729
|
try {
|
|
722
730
|
await this.request(`/${hash}${options.pin ? '?pin=1' : ''}`, token, raw);
|
|
723
731
|
}
|
|
@@ -865,7 +873,16 @@ export class GraphSync {
|
|
|
865
873
|
? await readFile(join(this.folder, 'snapshots', `${hash}.json`), 'utf8')
|
|
866
874
|
: await this.request(`/${hash}`, token);
|
|
867
875
|
// A cloud receipt proves upload, not that its user-visible copy still exists.
|
|
868
|
-
|
|
876
|
+
// A graph another window's sweep or a save is writing right now is not a sync failure:
|
|
877
|
+
// the checkpoint keeps this snapshot first, and the next pass restores it.
|
|
878
|
+
try {
|
|
879
|
+
await this.restoreSnapshot(raw, hash, receipts, deleted);
|
|
880
|
+
}
|
|
881
|
+
catch (error) {
|
|
882
|
+
if (error instanceof SaveLockBusyError)
|
|
883
|
+
throw new SyncPaused();
|
|
884
|
+
throw error;
|
|
885
|
+
}
|
|
869
886
|
progress.page.remaining.shift();
|
|
870
887
|
await atomic(progressPath, JSON.stringify(progress));
|
|
871
888
|
}
|
|
@@ -879,7 +896,7 @@ export class GraphSync {
|
|
|
879
896
|
? { state: 'offline', detail: `${refused.size} graph change(s) exceed the free tier and were saved on this computer only. Upgrade to Premium to sync them.` }
|
|
880
897
|
: invalidLocalFiles
|
|
881
898
|
? { state: 'offline', detail: `${invalidLocalFiles} local graph file(s) could not be read. Other graphs synchronized; original files preserved.` }
|
|
882
|
-
: !localComplete ? { state: 'pending', detail: 'Saved locally; local history sync will resume automatically.' }
|
|
899
|
+
: !localComplete && !(recheck !== undefined && this.status === recheck) ? { state: 'pending', detail: 'Saved locally; local history sync will resume automatically.' }
|
|
883
900
|
: { state: 'synced', detail: 'Graphs saved locally and to your account' };
|
|
884
901
|
}
|
|
885
902
|
async restoreDraft(raw, hash) {
|
|
@@ -898,6 +915,32 @@ export class GraphSync {
|
|
|
898
915
|
}
|
|
899
916
|
await immutable(path, raw);
|
|
900
917
|
}
|
|
918
|
+
/**
|
|
919
|
+
* Whether this exact snapshot is already published here, read without the save lock. Revision
|
|
920
|
+
* files are immutable, so a published one cannot change under the read; anything less than a
|
|
921
|
+
* published copy with these exact contents — a missing or different file, an unpublished one past
|
|
922
|
+
* the latest pointer, a conflict — is left to the locked restore, which decides it. The conflict
|
|
923
|
+
* copy's id is derived from this snapshot's hash, so its receipt can only be this snapshot's.
|
|
924
|
+
*/
|
|
925
|
+
async alreadyRestored(graph, hash, receipts) {
|
|
926
|
+
const published = async (id, matches) => {
|
|
927
|
+
try {
|
|
928
|
+
const folder = join(this.directory, 'graphs', id);
|
|
929
|
+
const latest = JSON.parse(await readFile(join(folder, 'latest.json'), 'utf8'));
|
|
930
|
+
if (!Number.isSafeInteger(latest) || latest < graph.revision)
|
|
931
|
+
return false;
|
|
932
|
+
return matches(await readFile(join(folder, `${graph.revision}.json`), 'utf8'));
|
|
933
|
+
}
|
|
934
|
+
catch {
|
|
935
|
+
return false;
|
|
936
|
+
}
|
|
937
|
+
};
|
|
938
|
+
if (await published(graph.id, raw => digest(envelope('revision', JSON.parse(raw))) === hash))
|
|
939
|
+
return true;
|
|
940
|
+
const conflict = `cloud-${hash.slice(0, 40)}`;
|
|
941
|
+
const path = join(this.directory, 'graphs', conflict, `${graph.revision}.json`);
|
|
942
|
+
return receipts[path] !== undefined && await published(conflict, raw => digest(raw) === receipts[path]);
|
|
943
|
+
}
|
|
901
944
|
async restoreSnapshot(raw, hash, receipts, deleted) {
|
|
902
945
|
const value = parseSnapshot(raw, hash);
|
|
903
946
|
// A graph deleted on this machine stays deleted: its snapshots stay cached but restore no
|
|
@@ -918,6 +961,14 @@ export class GraphSync {
|
|
|
918
961
|
await immutable(join(this.folder, 'snapshots', `${hash}.json`), raw);
|
|
919
962
|
return;
|
|
920
963
|
}
|
|
964
|
+
// Every sweep visits every snapshot the account holds, and a restore takes the graph's save
|
|
965
|
+
// lock. A revision this machine already holds needs no restore, so it must not take the lock:
|
|
966
|
+
// each window's engine runs its own sweep, and hundreds of needless locks per pass made the
|
|
967
|
+
// sweeps collide with each other and with the user's saves until no pass could finish.
|
|
968
|
+
if (await this.alreadyRestored(graph, hash, receipts)) {
|
|
969
|
+
await immutable(join(this.folder, 'snapshots', `${hash}.json`), raw);
|
|
970
|
+
return;
|
|
971
|
+
}
|
|
921
972
|
// The guard re-reads the tombstone file under the graph's save lock, so a delete that landed
|
|
922
973
|
// while this pass was running is honored even though this pass read an older verdict.
|
|
923
974
|
let restored = true;
|
package/dist/src/graph-tool.js
CHANGED
|
@@ -85,7 +85,7 @@ export function createGraphTool(pool = sharedPool) {
|
|
|
85
85
|
name: 'graphs', capability: 'external', executionMode: 'sequential',
|
|
86
86
|
description: 'Create, edit, validate, publish, delete or restore Andorra graphs (multi-agent workflows) in the signed-in account\'s graph store, the same store the Graph Builder and graph picker use. Never write graph files on disk. '
|
|
87
87
|
+ 'Call action andorra_graph_guide first for node types, ports, limits and error codes; load the skill andorra:graph-manager to design a graph with the user. '
|
|
88
|
-
+ 'Put the action\'s arguments in args. Drafts are kept in this Andorra process for up to an hour; publish saves a revision and syncs it to the account. Publish, delete and restore ask for permission. '
|
|
88
|
+
+ 'Put the action\'s arguments in args. Drafts are kept in this Andorra process for up to an hour; publish saves a revision and syncs it to the account. Publish, delete and restore ask the user for permission, except under Full Access, which approves them without a prompt; never tell the user a prompt is coming when the task runs in Full Access. '
|
|
89
89
|
+ `Actions and their args (* required): ${actionSummary()}.`,
|
|
90
90
|
parameters: { type: 'object', additionalProperties: false, properties: {
|
|
91
91
|
action: { type: 'string', enum: ACTIONS },
|