@andorra-labs/code 0.1.12 → 0.1.14
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/dist/src/account-presentation.d.ts +1 -37
- package/dist/src/account-presentation.js +6 -43
- package/dist/src/activity.d.ts +0 -25
- package/dist/src/activity.js +1 -23
- package/dist/src/agent-definitions.d.ts +0 -26
- package/dist/src/agent-definitions.js +0 -43
- package/dist/src/agent-execution.d.ts +0 -2
- package/dist/src/agent-execution.js +347 -554
- package/dist/src/agent-mcp-catalog.d.ts +0 -8
- package/dist/src/agent-mcp-catalog.js +0 -2
- package/dist/src/agent-mcp.d.ts +0 -56
- package/dist/src/agent-mcp.js +11 -155
- package/dist/src/agent-modifiers.d.ts +0 -1
- package/dist/src/agent-modifiers.js +25 -68
- package/dist/src/analytics.d.ts +0 -66
- package/dist/src/analytics.js +0 -45
- package/dist/src/andorra/endpoint.d.ts +7 -0
- package/dist/src/andorra/endpoint.js +46 -0
- package/dist/src/andorra/entry.d.ts +21 -0
- package/dist/src/andorra/entry.js +100 -0
- package/dist/src/andorra/errors.d.ts +2 -0
- package/dist/src/andorra/errors.js +39 -0
- package/dist/src/andorra/hosted.d.ts +52 -0
- package/dist/src/andorra/hosted.js +126 -0
- package/dist/src/andorra/monitor.d.ts +151 -0
- package/dist/src/andorra/monitor.js +393 -0
- package/dist/src/andorra/notices.d.ts +7 -0
- package/dist/src/andorra/notices.js +15 -0
- package/dist/src/andorra/opt-in.d.ts +58 -0
- package/dist/src/andorra/opt-in.js +112 -0
- package/dist/src/andorra/request-watch.d.ts +6 -0
- package/dist/src/andorra/request-watch.js +10 -0
- package/dist/src/andorra/state.d.ts +86 -0
- package/dist/src/andorra/state.js +238 -0
- package/dist/src/andorra/terminal.d.ts +68 -0
- package/dist/src/andorra/terminal.js +125 -0
- package/dist/src/andorra/usage-format.d.ts +9 -0
- package/dist/src/andorra/usage-format.js +19 -0
- package/dist/src/anthropic-console-auth.d.ts +0 -24
- package/dist/src/anthropic-console-auth.js +0 -37
- package/dist/src/anthropic-credentials.d.ts +0 -25
- package/dist/src/anthropic-credentials.js +9 -29
- package/dist/src/app-server/protocol.d.ts +18 -246
- package/dist/src/app-server/protocol.js +1 -132
- package/dist/src/app-server/reasoning.d.ts +0 -31
- package/dist/src/app-server/reasoning.js +0 -54
- package/dist/src/app-server/terminal.d.ts +0 -36
- package/dist/src/app-server/terminal.js +3 -39
- package/dist/src/app-server/workspace.d.ts +0 -167
- package/dist/src/app-server/workspace.js +4 -406
- package/dist/src/app-server.d.ts +52 -925
- package/dist/src/app-server.js +828 -3076
- package/dist/src/artifacts.d.ts +0 -10
- package/dist/src/artifacts.js +1 -11
- package/dist/src/attachments.d.ts +4 -98
- package/dist/src/attachments.js +10 -130
- package/dist/src/auth/AuthManager.d.ts +9 -93
- package/dist/src/auth/AuthManager.js +164 -186
- package/dist/src/auth/callback-page.d.ts +0 -1
- package/dist/src/auth/callback-page.js +0 -4
- package/dist/src/auth/callback.d.ts +0 -25
- package/dist/src/auth/callback.js +1 -29
- package/dist/src/auth/deployment.d.ts +1 -16
- package/dist/src/auth/deployment.js +1 -16
- package/dist/src/auth/index.d.ts +1 -12
- package/dist/src/auth/index.js +1 -12
- package/dist/src/auth/lock.d.ts +0 -1
- package/dist/src/auth/lock.js +0 -1
- package/dist/src/auth/store.d.ts +33 -108
- package/dist/src/auth/store.js +55 -130
- package/dist/src/auth/types.d.ts +0 -8
- package/dist/src/auth-commands.d.ts +0 -5
- package/dist/src/auth-commands.js +0 -1
- package/dist/src/automation-runner.d.ts +0 -9
- package/dist/src/automation-runner.js +0 -11
- package/dist/src/automation-service.d.ts +0 -10
- package/dist/src/automation-service.js +3 -17
- package/dist/src/automation-tool.js +0 -5
- package/dist/src/automation-worker-shutdown.d.ts +0 -1
- package/dist/src/automation-worker-shutdown.js +0 -3
- package/dist/src/automations.d.ts +23 -2
- package/dist/src/automations.js +91 -12
- package/dist/src/background-tasks.d.ts +0 -23
- package/dist/src/background-tasks.js +0 -11
- package/dist/src/boot-trace.d.ts +0 -13
- package/dist/src/boot-trace.js +1 -14
- package/dist/src/browser-activity.js +0 -2
- package/dist/src/browser-bridge.d.ts +0 -2
- package/dist/src/browser-bridge.js +0 -27
- package/dist/src/browser-captcha-tool.d.ts +0 -13
- package/dist/src/browser-captcha-tool.js +3 -35
- package/dist/src/browser-extensions-tool.d.ts +24 -0
- package/dist/src/browser-extensions-tool.js +137 -0
- package/dist/src/browser-extensions.d.ts +127 -0
- package/dist/src/browser-extensions.js +729 -0
- package/dist/src/browser-observation.d.ts +0 -15
- package/dist/src/browser-observation.js +1 -22
- package/dist/src/browser-panel-tool.d.ts +1 -37
- package/dist/src/browser-panel-tool.js +3 -73
- package/dist/src/browser-runner.d.ts +0 -1
- package/dist/src/browser-runner.js +5 -46
- package/dist/src/browser-server.d.ts +0 -6
- package/dist/src/browser-server.js +6 -229
- package/dist/src/browser-session.d.ts +0 -25
- package/dist/src/browser-session.js +1 -71
- package/dist/src/browser-stealth.d.ts +19 -13
- package/dist/src/browser-stealth.js +22 -38
- package/dist/src/browser-ui/app.js +7 -174
- package/dist/src/browser-ui/style.css +0 -68
- package/dist/src/browser-ui/tokens.css +15 -97
- package/dist/src/browser-view.d.ts +106 -295
- package/dist/src/browser-view.js +551 -587
- package/dist/src/capabilities.d.ts +0 -8
- package/dist/src/capabilities.js +0 -29
- package/dist/src/capsolver.d.ts +0 -13
- package/dist/src/capsolver.js +0 -15
- package/dist/src/clarification-ui.d.ts +0 -7
- package/dist/src/clarification-ui.js +0 -8
- package/dist/src/claude-executable.d.ts +0 -1
- package/dist/src/claude-executable.js +1 -2
- package/dist/src/claude-provider.d.ts +6 -19
- package/dist/src/claude-provider.js +155 -63
- package/dist/src/cli-executable.d.ts +0 -16
- package/dist/src/cli-executable.js +0 -7
- package/dist/src/cli-process.d.ts +0 -26
- package/dist/src/cli-process.js +0 -18
- package/dist/src/cli-sign-in.d.ts +0 -20
- package/dist/src/cli-sign-in.js +1 -17
- package/dist/src/cli.d.ts +1 -55
- package/dist/src/cli.js +118 -742
- package/dist/src/code-intelligence/CodeIntelligenceManager.d.ts +4 -59
- package/dist/src/code-intelligence/CodeIntelligenceManager.js +26 -99
- package/dist/src/code-intelligence/ContextLedger.d.ts +0 -4
- package/dist/src/code-intelligence/ContextLedger.js +0 -10
- package/dist/src/code-intelligence/ContextRouter.d.ts +0 -6
- package/dist/src/code-intelligence/ContextRouter.js +0 -8
- package/dist/src/code-intelligence/codegraph/CodeGraphProjectSession.d.ts +0 -2
- package/dist/src/code-intelligence/codegraph/CodeGraphProjectSession.js +5 -12
- package/dist/src/code-intelligence/codegraph/CodeGraphProvider.d.ts +0 -6
- package/dist/src/code-intelligence/codegraph/CodeGraphProvider.js +0 -6
- package/dist/src/code-intelligence/codegraph/CodeGraphSyncBarrier.d.ts +0 -5
- package/dist/src/code-intelligence/codegraph/CodeGraphSyncBarrier.js +1 -17
- package/dist/src/code-intelligence/codegraph/repoExploreTool.d.ts +0 -5
- package/dist/src/code-intelligence/codegraph/repoExploreTool.js +0 -5
- package/dist/src/code-intelligence/repository.d.ts +0 -9
- package/dist/src/code-intelligence/repository.js +1 -11
- package/dist/src/code-intelligence/types.d.ts +0 -8
- package/dist/src/codex-auth.d.ts +0 -44
- package/dist/src/codex-auth.js +0 -45
- package/dist/src/codex-browser-auth.d.ts +0 -13
- package/dist/src/codex-browser-auth.js +3 -20
- package/dist/src/codex-errors.js +0 -2
- package/dist/src/codex-executable.d.ts +0 -2
- package/dist/src/codex-executable.js +1 -7
- package/dist/src/codex-provider.d.ts +0 -13
- package/dist/src/codex-provider.js +0 -28
- package/dist/src/codex-rpc.d.ts +0 -10
- package/dist/src/codex-rpc.js +0 -12
- package/dist/src/coding-tools.d.ts +4 -26
- package/dist/src/coding-tools.js +161 -181
- package/dist/src/command-metrics.d.ts +0 -4
- package/dist/src/command-output-tap.d.ts +0 -11
- package/dist/src/command-output-tap.js +0 -3
- package/dist/src/command-screens.d.ts +41 -1
- package/dist/src/command-screens.js +316 -113
- package/dist/src/commands.d.ts +12 -63
- package/dist/src/commands.js +98 -127
- package/dist/src/completion-gates.d.ts +0 -47
- package/dist/src/completion-gates.js +0 -14
- package/dist/src/completion.d.ts +0 -98
- package/dist/src/completion.js +2 -239
- package/dist/src/config.d.ts +15 -115
- package/dist/src/config.js +123 -172
- package/dist/src/context-budget.d.ts +0 -22
- package/dist/src/context-budget.js +0 -44
- package/dist/src/context-compaction.d.ts +29 -6
- package/dist/src/context-compaction.js +94 -25
- package/dist/src/context-selection.d.ts +0 -24
- package/dist/src/context-selection.js +0 -34
- package/dist/src/dashboard-view.d.ts +2 -2
- package/dist/src/dashboard-view.js +11 -37
- package/dist/src/dashboard.d.ts +0 -2
- package/dist/src/dashboard.js +0 -9
- package/dist/src/deadline.d.ts +0 -45
- package/dist/src/deadline.js +0 -54
- package/dist/src/decision/ContinuationAdapter.d.ts +0 -5
- package/dist/src/decision/ContinuationAdapter.js +0 -5
- package/dist/src/decision/DecisionEngine.d.ts +0 -4
- package/dist/src/decision/DecisionManager.d.ts +0 -1
- package/dist/src/decision/DecisionManager.js +2 -7
- package/dist/src/decision/DecisionPolicy.d.ts +0 -1
- package/dist/src/decision/DecisionPolicy.js +0 -1
- package/dist/src/decision/FactContinuations.d.ts +11 -43
- package/dist/src/decision/FactContinuations.js +126 -95
- package/dist/src/decision/FactServiceGate.d.ts +0 -1
- package/dist/src/decision/FactServiceGate.js +0 -4
- package/dist/src/decision/PreparedSteps.d.ts +0 -15
- package/dist/src/decision/PreparedSteps.js +1 -11
- package/dist/src/decision/applyToolMenu.d.ts +0 -1
- package/dist/src/decision/applyToolMenu.js +2 -6
- package/dist/src/decision/checks.d.ts +15 -28
- package/dist/src/decision/checks.js +118 -49
- package/dist/src/decision/facts.d.ts +0 -16
- package/dist/src/decision/facts.js +0 -30
- package/dist/src/decision/guidancePolicy.js +0 -1
- package/dist/src/decision/hostedPolicy.d.ts +0 -6
- package/dist/src/decision/hostedPolicy.js +0 -7
- package/dist/src/decision/hostedSkills.d.ts +0 -19
- package/dist/src/decision/hostedSkills.js +0 -19
- package/dist/src/decision/optimizationPolicy.d.ts +0 -3
- package/dist/src/decision/optimizationPolicy.js +1 -4
- package/dist/src/decision/providers/AndorraDecisionProvider.d.ts +0 -7
- package/dist/src/decision/providers/AndorraDecisionProvider.js +4 -27
- package/dist/src/decision/providers/HttpDecisionProvider.d.ts +0 -2
- package/dist/src/decision/providers/HttpDecisionProvider.js +0 -6
- package/dist/src/decision/routeTools.d.ts +0 -8
- package/dist/src/decision/routeTools.js +1 -8
- package/dist/src/decision/toolFamilies.d.ts +0 -1
- package/dist/src/decision/toolFamilies.js +1 -2
- package/dist/src/decision/toolMenu.d.ts +0 -3
- package/dist/src/decision/toolMenu.js +0 -4
- package/dist/src/decision/types.d.ts +1 -6
- package/dist/src/default-graph.d.ts +0 -9
- package/dist/src/default-graph.js +0 -9
- package/dist/src/delegation-changes.d.ts +0 -56
- package/dist/src/delegation-changes.js +4 -130
- package/dist/src/diff-preview.d.ts +0 -1
- package/dist/src/diff-preview.js +0 -17
- package/dist/src/duration.d.ts +0 -50
- package/dist/src/duration.js +0 -50
- package/dist/src/efficiency.d.ts +0 -39
- package/dist/src/efficiency.js +0 -16
- package/dist/src/engine/protocol.d.ts +0 -2
- package/dist/src/engine/protocol.js +0 -2
- package/dist/src/engine-streams.d.ts +0 -9
- package/dist/src/extensions.d.ts +3 -2
- package/dist/src/extensions.js +63 -35
- package/dist/src/favicons.d.ts +0 -26
- package/dist/src/favicons.js +0 -34
- package/dist/src/file-diff.d.ts +2 -58
- package/dist/src/file-diff.js +0 -32
- package/dist/src/file-read-key.d.ts +0 -7
- package/dist/src/file-read-key.js +0 -7
- package/dist/src/file-read-state.d.ts +0 -1
- package/dist/src/file-read-state.js +0 -4
- package/dist/src/firefox-cookies.d.ts +0 -34
- package/dist/src/firefox-cookies.js +1 -55
- package/dist/src/git-identity-audit.d.ts +27 -0
- package/dist/src/git-identity-audit.js +286 -0
- package/dist/src/git-identity-guard.d.ts +4 -0
- package/dist/src/git-identity-guard.js +998 -0
- package/dist/src/git-identity-hold.d.ts +12 -0
- package/dist/src/git-identity-hold.js +81 -0
- package/dist/src/git-summary.d.ts +0 -58
- package/dist/src/git-summary.js +2 -212
- package/dist/src/goal-completion-verification.d.ts +2 -2
- package/dist/src/goal-completion-verification.js +3 -6
- package/dist/src/graph-account.d.ts +0 -21
- package/dist/src/graph-account.js +0 -17
- package/dist/src/graph-editor-session.d.ts +0 -1
- package/dist/src/graph-editor-session.js +0 -3
- package/dist/src/graph-health.d.ts +9 -61
- package/dist/src/graph-health.js +34 -59
- package/dist/src/graph-manager-chat.d.ts +36 -153
- package/dist/src/graph-manager-chat.js +161 -182
- package/dist/src/graph-provider-portability.d.ts +1 -21
- package/dist/src/graph-provider-portability.js +6 -45
- package/dist/src/graph-quota.d.ts +0 -33
- package/dist/src/graph-quota.js +1 -44
- package/dist/src/graph-runner.d.ts +0 -1
- package/dist/src/graph-runner.js +58 -391
- package/dist/src/graph-selection.d.ts +0 -14
- package/dist/src/graph-selection.js +2 -15
- package/dist/src/graph-server.d.ts +2 -10
- package/dist/src/graph-server.js +39 -101
- package/dist/src/graph-studio-features.d.ts +0 -5
- package/dist/src/graph-studio-features.js +2 -42
- package/dist/src/graph-sync.d.ts +0 -78
- package/dist/src/graph-sync.js +5 -201
- package/dist/src/graph-tool.d.ts +0 -18
- package/dist/src/graph-tool.js +0 -27
- package/dist/src/graph-ui/app.js +176 -492
- package/dist/src/graph-ui/compat.js +0 -7
- package/dist/src/graph-ui/controls.css +0 -48
- package/dist/src/graph-ui/controls.js +0 -88
- package/dist/src/graph-ui/drafts.js +0 -12
- package/dist/src/graph-ui/edge-router.js +0 -62
- package/dist/src/graph-ui/embed.js +0 -59
- package/dist/src/graph-ui/icons.js +0 -8
- package/dist/src/graph-ui/library.css +0 -5
- package/dist/src/graph-ui/manager-markdown.js +0 -11
- package/dist/src/graph-ui/manager-state.js +1 -78
- package/dist/src/graph-ui/manager.css +0 -18
- package/dist/src/graph-ui/manager.js +43 -185
- package/dist/src/graph-ui/model-picker.js +0 -29
- package/dist/src/graph-ui/sidebar.js +2 -3
- package/dist/src/graph-ui/skill-picker.js +373 -39
- package/dist/src/graph-ui/studio-canvas.js +3 -38
- package/dist/src/graph-ui/studio.css +0 -18
- package/dist/src/graph-ui/studio.js +3 -71
- package/dist/src/graph-ui/style.css +16 -136
- package/dist/src/graph-ui/theme.js +1 -26
- package/dist/src/graph-ui/tokens.css +19 -118
- package/dist/src/graphs.d.ts +6 -157
- package/dist/src/graphs.js +66 -269
- package/dist/src/grep-regex-worker.js +0 -2
- package/dist/src/grep-regex.d.ts +1 -5
- package/dist/src/grep-regex.js +6 -8
- package/dist/src/grok-provider.d.ts +0 -17
- package/dist/src/grok-provider.js +1 -26
- package/dist/src/handoffs.d.ts +0 -11
- package/dist/src/handoffs.js +0 -13
- package/dist/src/hardened-runtime.d.ts +0 -10
- package/dist/src/hardened-runtime.js +9 -47
- package/dist/src/harness-home.d.ts +21 -0
- package/dist/src/harness-home.js +87 -0
- package/dist/src/host-process-guard.d.ts +0 -50
- package/dist/src/host-process-guard.js +0 -641
- package/dist/src/limits.d.ts +0 -64
- package/dist/src/limits.js +0 -62
- package/dist/src/managed-sign-in.d.ts +0 -12
- package/dist/src/managed-sign-in.js +0 -16
- package/dist/src/markdown.d.ts +0 -28
- package/dist/src/markdown.js +1 -175
- package/dist/src/mcp.d.ts +0 -99
- package/dist/src/mcp.js +4 -170
- package/dist/src/membership-errors.d.ts +0 -14
- package/dist/src/membership-errors.js +1 -14
- package/dist/src/membership.d.ts +9 -59
- package/dist/src/membership.js +20 -91
- package/dist/src/memory/LocalToolMemory.d.ts +0 -1
- package/dist/src/memory/LocalToolMemory.js +2 -7
- package/dist/src/memory/MemoryDistiller.js +0 -15
- package/dist/src/memory/MemoryManager.d.ts +0 -3
- package/dist/src/memory/MemoryManager.js +6 -18
- package/dist/src/memory/MemoryPolicy.d.ts +0 -2
- package/dist/src/memory/MemoryPolicy.js +0 -2
- package/dist/src/memory/MemoryProvider.d.ts +0 -6
- package/dist/src/memory/MemoryRetriever.js +0 -7
- package/dist/src/memory/PermissionMemoryProvider.d.ts +0 -1
- package/dist/src/memory/PermissionMemoryProvider.js +0 -1
- package/dist/src/memory/ProjectMemory.d.ts +5 -40
- package/dist/src/memory/ProjectMemory.js +22 -47
- package/dist/src/memory/ToolFailureLessons.d.ts +0 -3
- package/dist/src/memory/ToolFailureLessons.js +0 -6
- package/dist/src/memory/providers/NoOpMemoryProvider.d.ts +0 -1
- package/dist/src/memory/providers/NoOpMemoryProvider.js +0 -1
- package/dist/src/memory/redaction.d.ts +0 -5
- package/dist/src/memory/redaction.js +0 -11
- package/dist/src/memory/repository.d.ts +0 -6
- package/dist/src/memory/repository.js +2 -12
- package/dist/src/memory/types.d.ts +0 -1
- package/dist/src/model-context-windows.d.ts +2 -0
- package/dist/src/model-context-windows.js +24 -0
- package/dist/src/model-health-cache.d.ts +0 -38
- package/dist/src/model-health-cache.js +2 -50
- package/dist/src/model-metadata.d.ts +1 -18
- package/dist/src/model-metadata.js +42 -45
- package/dist/src/model-override.d.ts +0 -36
- package/dist/src/model-override.js +0 -43
- package/dist/src/model-tiers.d.ts +0 -13
- package/dist/src/model-tiers.js +0 -23
- package/dist/src/opencode-catalog.d.ts +0 -2
- package/dist/src/opencode-catalog.js +0 -11
- package/dist/src/opencode-cli-provider.d.ts +0 -35
- package/dist/src/opencode-cli-provider.js +1 -44
- package/dist/src/opencode-provider.d.ts +0 -2
- package/dist/src/opencode-provider.js +1 -16
- package/dist/src/package-name.d.ts +0 -2
- package/dist/src/package-name.js +0 -2
- package/dist/src/paged-transcript.d.ts +0 -11
- package/dist/src/paged-transcript.js +2 -20
- package/dist/src/palette.d.ts +1 -63
- package/dist/src/palette.js +1 -64
- package/dist/src/permissions.d.ts +0 -15
- package/dist/src/permissions.js +17 -21
- package/dist/src/powershell-pool.d.ts +0 -9
- package/dist/src/powershell-pool.js +3 -26
- package/dist/src/process-warnings.d.ts +4 -0
- package/dist/src/process-warnings.js +103 -0
- package/dist/src/profile.d.ts +0 -43
- package/dist/src/profile.js +0 -43
- package/dist/src/project-reservation.d.ts +11 -0
- package/dist/src/project-reservation.js +143 -0
- package/dist/src/provider-connection.d.ts +0 -18
- package/dist/src/provider-connection.js +15 -39
- package/dist/src/provider-engine.d.ts +0 -21
- package/dist/src/provider-engine.js +1 -96
- package/dist/src/provider-import.d.ts +0 -49
- package/dist/src/provider-import.js +0 -60
- package/dist/src/provider-keys.d.ts +1 -36
- package/dist/src/provider-keys.js +5 -48
- package/dist/src/provider-settings.d.ts +16 -3
- package/dist/src/provider-settings.js +36 -52
- package/dist/src/providers.d.ts +14 -219
- package/dist/src/providers.js +69 -326
- package/dist/src/pull-requests.d.ts +0 -173
- package/dist/src/pull-requests.js +5 -195
- package/dist/src/qa/browser/PlaywrightRunner.d.ts +0 -7
- package/dist/src/qa/browser/PlaywrightRunner.js +2 -16
- package/dist/src/qa/command-policy.d.ts +0 -23
- package/dist/src/qa/command-policy.js +0 -30
- package/dist/src/qa/guidance.d.ts +0 -21
- package/dist/src/qa/guidance.js +0 -20
- package/dist/src/qa/profile/ProjectInspector.d.ts +0 -4
- package/dist/src/qa/profile/ProjectInspector.js +0 -6
- package/dist/src/qa/profile/QaConfigLoader.d.ts +0 -7
- package/dist/src/qa/profile/QaConfigLoader.js +0 -6
- package/dist/src/qa/profile/QaProfile.d.ts +0 -7
- package/dist/src/qa/profile/QaProfile.js +0 -7
- package/dist/src/qa/profile/yaml.d.ts +0 -9
- package/dist/src/qa/profile/yaml.js +0 -13
- package/dist/src/qa/qa-authorize.d.ts +0 -19
- package/dist/src/qa/qa-authorize.js +4 -11
- package/dist/src/qa/runtime/ProcessManager.d.ts +0 -31
- package/dist/src/qa/runtime/ProcessManager.js +4 -41
- package/dist/src/qa/runtime/PtyManager.d.ts +0 -4
- package/dist/src/qa/runtime/PtyManager.js +1 -7
- package/dist/src/qa/runtime/changes.d.ts +0 -11
- package/dist/src/qa/runtime/changes.js +1 -3
- package/dist/src/qa/tools.d.ts +0 -10
- package/dist/src/qa/tools.js +0 -12
- package/dist/src/qa/types.d.ts +0 -13
- package/dist/src/react-runtime.d.ts +2 -21
- package/dist/src/react-runtime.js +107 -422
- package/dist/src/read-document-doc.d.ts +0 -6
- package/dist/src/read-document-doc.js +0 -55
- package/dist/src/read-document-docx.d.ts +0 -16
- package/dist/src/read-document-docx.js +2 -69
- package/dist/src/read-document-text.d.ts +0 -17
- package/dist/src/read-document-text.js +0 -22
- package/dist/src/read-document-tool.d.ts +0 -31
- package/dist/src/read-document-tool.js +0 -30
- package/dist/src/read-document.d.ts +0 -49
- package/dist/src/read-document.js +1 -67
- package/dist/src/read-image.d.ts +0 -32
- package/dist/src/read-image.js +0 -33
- package/dist/src/remote/cert.d.ts +0 -18
- package/dist/src/remote/cert.js +0 -44
- package/dist/src/remote/client.d.ts +0 -70
- package/dist/src/remote/client.js +1 -116
- package/dist/src/remote/command.js +0 -17
- package/dist/src/remote/engine-pool.d.ts +0 -152
- package/dist/src/remote/engine-pool.js +22 -339
- package/dist/src/remote/errors.d.ts +0 -15
- package/dist/src/remote/errors.js +0 -7
- package/dist/src/remote/network.d.ts +0 -26
- package/dist/src/remote/network.js +1 -34
- package/dist/src/remote/pairing.d.ts +16 -51
- package/dist/src/remote/pairing.js +50 -57
- package/dist/src/remote/pem.d.ts +0 -4
- package/dist/src/remote/pem.js +0 -4
- package/dist/src/remote/roots.d.ts +0 -20
- package/dist/src/remote/roots.js +0 -8
- package/dist/src/remote/serve.d.ts +0 -47
- package/dist/src/remote/serve.js +0 -30
- package/dist/src/remote/server.d.ts +0 -14
- package/dist/src/remote/server.js +1 -79
- package/dist/src/remote/types.d.ts +1 -32
- package/dist/src/remote/types.js +0 -10
- package/dist/src/run-control.d.ts +2 -9
- package/dist/src/run-control.js +9 -13
- package/dist/src/run-progress.d.ts +0 -170
- package/dist/src/run-progress.js +0 -285
- package/dist/src/run-records.d.ts +0 -443
- package/dist/src/run-records.js +14 -687
- package/dist/src/run-temp.d.ts +12 -0
- package/dist/src/run-temp.js +50 -0
- package/dist/src/runtime.d.ts +12 -228
- package/dist/src/runtime.js +2 -128
- package/dist/src/sandbox-child.js +0 -1
- package/dist/src/save-lock.d.ts +0 -12
- package/dist/src/save-lock.js +0 -28
- package/dist/src/screen-selection.d.ts +0 -23
- package/dist/src/screen-selection.js +0 -22
- package/dist/src/secret-redaction.d.ts +0 -12
- package/dist/src/secret-redaction.js +0 -45
- package/dist/src/session-changes.d.ts +4 -80
- package/dist/src/session-changes.js +25 -130
- package/dist/src/session-goal.d.ts +129 -0
- package/dist/src/session-goal.js +230 -0
- package/dist/src/session-monitor.d.ts +1 -10
- package/dist/src/session-monitor.js +2 -39
- package/dist/src/session-reaper.d.ts +0 -15
- package/dist/src/session-reaper.js +0 -14
- package/dist/src/session-skills.d.ts +15 -44
- package/dist/src/session-skills.js +75 -60
- package/dist/src/session-summary.d.ts +0 -26
- package/dist/src/session-summary.js +0 -32
- package/dist/src/session-title.d.ts +0 -1
- package/dist/src/session-title.js +0 -2
- package/dist/src/sessions.d.ts +3 -122
- package/dist/src/sessions.js +9 -178
- package/dist/src/shell.d.ts +3 -20
- package/dist/src/shell.js +8 -72
- package/dist/src/side-panel.d.ts +5 -99
- package/dist/src/side-panel.js +76 -133
- package/dist/src/sign-in-detection.d.ts +0 -39
- package/dist/src/sign-in-detection.js +0 -43
- package/dist/src/sign-in-offer.d.ts +1 -19
- package/dist/src/sign-in-offer.js +0 -13
- package/dist/src/skill-commands.d.ts +0 -1
- package/dist/src/skill-commands.js +1 -4
- package/dist/src/skills/bundled/control-browser/SKILL.md +1 -1
- package/dist/src/skills/bundled/graph-manager/errors.md +1 -1
- package/dist/src/skills/bundled/provenance.json +738 -738
- package/dist/src/skills/invocable-skills.d.ts +0 -18
- package/dist/src/skills/invocable-skills.js +0 -17
- package/dist/src/skills/project-skills.d.ts +0 -1
- package/dist/src/skills/project-skills.js +0 -3
- package/dist/src/skills/prompt-skills.js +0 -14
- package/dist/src/skills/runtime-skills.d.ts +0 -13
- package/dist/src/skills/runtime-skills.js +0 -37
- package/dist/src/stall-recovery.d.ts +0 -25
- package/dist/src/stall-recovery.js +0 -38
- package/dist/src/stray-files.d.ts +0 -9
- package/dist/src/stray-files.js +0 -16
- package/dist/src/structured-step.d.ts +0 -22
- package/dist/src/structured-step.js +0 -22
- package/dist/src/subagent-run.d.ts +2 -163
- package/dist/src/subagent-run.js +18 -376
- package/dist/src/subagent-tree.d.ts +32 -0
- package/dist/src/subagent-tree.js +128 -0
- package/dist/src/telemetry/aggregate.d.ts +0 -37
- package/dist/src/telemetry/aggregate.js +0 -40
- package/dist/src/telemetry/capture-core.d.ts +0 -87
- package/dist/src/telemetry/capture-core.js +0 -67
- package/dist/src/telemetry/capture.d.ts +0 -1
- package/dist/src/telemetry/capture.js +0 -3
- package/dist/src/telemetry/classify.d.ts +0 -58
- package/dist/src/telemetry/classify.js +0 -60
- package/dist/src/telemetry/decision-capture.d.ts +0 -1
- package/dist/src/telemetry/emitter.d.ts +0 -30
- package/dist/src/telemetry/emitter.js +1 -62
- package/dist/src/telemetry/gate.d.ts +0 -29
- package/dist/src/telemetry/gate.js +0 -22
- package/dist/src/telemetry/identity.d.ts +0 -13
- package/dist/src/telemetry/identity.js +0 -29
- package/dist/src/telemetry/outbox.d.ts +0 -64
- package/dist/src/telemetry/outbox.js +1 -108
- package/dist/src/telemetry/schema.d.ts +1 -49
- package/dist/src/telemetry/schema.js +3 -84
- package/dist/src/telemetry/state.d.ts +0 -53
- package/dist/src/telemetry/state.js +0 -64
- package/dist/src/telemetry/surface.d.ts +0 -31
- package/dist/src/telemetry/surface.js +1 -39
- package/dist/src/telemetry/uploader.d.ts +0 -11
- package/dist/src/telemetry/uploader.js +0 -46
- package/dist/src/telemetry/uploads.d.ts +0 -11
- package/dist/src/telemetry/uploads.js +0 -11
- package/dist/src/telemetry/version.d.ts +0 -4
- package/dist/src/telemetry/version.js +0 -14
- package/dist/src/telemetry/workspace.d.ts +0 -7
- package/dist/src/telemetry/workspace.js +1 -22
- package/dist/src/terminal-ui.d.ts +33 -521
- package/dist/src/terminal-ui.js +145 -884
- package/dist/src/test-edit-guard.d.ts +74 -0
- package/dist/src/test-edit-guard.js +269 -0
- package/dist/src/text.d.ts +0 -1
- package/dist/src/text.js +0 -1
- package/dist/src/time-limit.d.ts +0 -36
- package/dist/src/time-limit.js +0 -37
- package/dist/src/timers.d.ts +0 -161
- package/dist/src/timers.js +0 -126
- package/dist/src/todos.d.ts +0 -1
- package/dist/src/todos.js +0 -3
- package/dist/src/token-rate.d.ts +0 -94
- package/dist/src/token-rate.js +0 -154
- package/dist/src/tool-activity.d.ts +0 -6
- package/dist/src/tool-activity.js +0 -7
- package/dist/src/tool-availability.d.ts +0 -13
- package/dist/src/tool-availability.js +1 -14
- package/dist/src/tool-call-clock.d.ts +1 -4
- package/dist/src/tool-call-clock.js +0 -13
- package/dist/src/tool-catalog.d.ts +0 -11
- package/dist/src/tool-catalog.js +0 -23
- package/dist/src/tool-dependencies.d.ts +0 -5
- package/dist/src/tool-dependencies.js +0 -4
- package/dist/src/tool-diff-stats.d.ts +0 -23
- package/dist/src/tool-diff-stats.js +0 -49
- package/dist/src/tool-errors.d.ts +9 -7
- package/dist/src/tool-errors.js +13 -6
- package/dist/src/tool-failure-tracker.d.ts +3 -11
- package/dist/src/tool-failure-tracker.js +19 -27
- package/dist/src/tool-names.d.ts +0 -16
- package/dist/src/tool-names.js +0 -12
- package/dist/src/tool-profile.d.ts +6 -0
- package/dist/src/tool-profile.js +23 -0
- package/dist/src/tool-result-filter.d.ts +0 -19
- package/dist/src/tool-result-filter.js +1 -66
- package/dist/src/tool-schema-compatibility.d.ts +0 -6
- package/dist/src/tool-schema-compatibility.js +0 -9
- package/dist/src/tools.d.ts +0 -4
- package/dist/src/tools.js +11 -114
- package/dist/src/trajectory.d.ts +0 -13
- package/dist/src/trajectory.js +23 -79
- package/dist/src/transcript.d.ts +0 -41
- package/dist/src/transcript.js +5 -60
- package/dist/src/types.d.ts +4 -168
- package/dist/src/untracked-file-removal.js +0 -20
- package/dist/src/update-check.d.ts +0 -14
- package/dist/src/update-check.js +1 -15
- package/dist/src/update.d.ts +0 -35
- package/dist/src/update.js +0 -100
- package/dist/src/usage-analytics.d.ts +17 -17
- package/dist/src/usage-analytics.js +168 -209
- package/dist/src/web-search.d.ts +0 -23
- package/dist/src/web-search.js +1 -27
- package/dist/src/widgets.d.ts +0 -25
- package/dist/src/widgets.js +0 -24
- package/dist/src/workspace-facts.d.ts +0 -12
- package/dist/src/workspace-facts.js +1 -18
- package/dist/src/workspace-git-metadata.d.ts +0 -16
- package/dist/src/workspace-git-metadata.js +0 -21
- package/dist/src/workspace-instructions.d.ts +3 -15
- package/dist/src/workspace-instructions.js +6 -19
- package/package.json +13 -2
|
@@ -1,20 +1,9 @@
|
|
|
1
|
-
/* Trusted, minimal desktop embedding protocol. No tokens or graph content cross frames;
|
|
2
|
-
the visibility exchange carries only local project folder names and paths. */
|
|
3
1
|
(() => {
|
|
4
2
|
'use strict';
|
|
5
|
-
// A browser-launched Graph Studio is top-level and keeps its normal behavior.
|
|
6
3
|
if (!window.parent || window.parent === window) return;
|
|
7
4
|
|
|
8
5
|
const parentOrigins = new Set(['tauri://localhost', 'http://tauri.localhost', 'http://127.0.0.1:7347']);
|
|
9
6
|
const emit = data => window.parent.postMessage(data, '*');
|
|
10
|
-
// Keyboard events inside this cross-origin iframe never reach the Tauri document, so the desktop
|
|
11
|
-
// window's own shortcuts (desktop/src/engine/shortcuts.ts: Ctrl/Cmd+K the command palette, +N a new
|
|
12
|
-
// task, +B the sidebar, +, Settings) are handed to it over the authenticated frame channel. The
|
|
13
|
-
// rule is the window's: the primary modifier alone (Command on macOS, Control elsewhere), no Shift
|
|
14
|
-
// or Alt; not while an input method is composing, not a key the editor already handled, not while
|
|
15
|
-
// one of the editor's own dialogs is open, and a rich-text field keeps Ctrl+B and Ctrl+K. The
|
|
16
|
-
// host decides whether the shortcut applies to what it shows. Ctrl/Cmd+, keeps its original
|
|
17
|
-
// message, so a desktop that predates the general one still opens Settings.
|
|
18
7
|
const SHORTCUT_KEYS = new Set(['k', 'n', 'b', ',']);
|
|
19
8
|
const mac = /Macintosh|Mac OS X/i.test(typeof navigator === 'undefined' ? '' : navigator.userAgent || '');
|
|
20
9
|
const editorModalOpen = () => typeof document !== 'undefined' && typeof document.querySelector === 'function' && !!document.querySelector('dialog[open]');
|
|
@@ -25,16 +14,10 @@
|
|
|
25
14
|
const key = typeof event.key === 'string' ? event.key.toLowerCase() : '';
|
|
26
15
|
if (!primary || event.altKey || event.shiftKey || !SHORTCUT_KEYS.has(key)) return;
|
|
27
16
|
if (editorModalOpen() || ((key === 'b' || key === 'k') && richText(event.target))) return;
|
|
28
|
-
// The chord is the window's: the web view must not read Ctrl+N as a new window or Ctrl+K as search.
|
|
29
17
|
event.preventDefault();
|
|
30
18
|
if (event.repeat) return;
|
|
31
19
|
emit(key === ',' ? { type: 'andorra.graph.settings.shortcut' } : { type: 'andorra.graph.shortcut', key });
|
|
32
20
|
});
|
|
33
|
-
// The webview's own right-click menu (Back, Refresh, Save as, Print, Inspect) does nothing
|
|
34
|
-
// useful inside the desktop app, and the desktop window's rule (desktop/src/contextMenuPolicy.ts)
|
|
35
|
-
// cannot see events in this cross-origin frame. Apply the same rule here: keep the native menu
|
|
36
|
-
// only in a text field (Cut, Copy, Paste) or on selected text under the pointer (Copy). Menus
|
|
37
|
-
// the editor draws itself, such as a graph row's, cancel the event first and are left alone.
|
|
38
21
|
const textInputTypes = new Set(['text', 'search', 'email', 'url', 'tel', 'password', 'number']);
|
|
39
22
|
const keepsNativeMenu = event => {
|
|
40
23
|
const node = event.target;
|
|
@@ -61,18 +44,13 @@
|
|
|
61
44
|
if (text !== undefined) element.textContent = text;
|
|
62
45
|
return element;
|
|
63
46
|
};
|
|
64
|
-
// Mirror the CLI's graph id rule so a forged value can never leave that key space.
|
|
65
47
|
const safeGraphId = value => typeof value === 'string' && /^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$/.test(value)
|
|
66
48
|
&& !['constructor', 'prototype', '__proto__'].includes(value);
|
|
67
49
|
|
|
68
|
-
// Host-provided project context; absent until the desktop answers the ready message.
|
|
69
50
|
let visibilityProjects;
|
|
70
51
|
let visibilityAvailable = false;
|
|
71
52
|
let visibilityActive;
|
|
72
|
-
// The account epoch the context was rendered under; echoed on every write so the desktop can
|
|
73
|
-
// reject a choice made after it switched accounts.
|
|
74
53
|
let visibilityEpoch;
|
|
75
|
-
// graphId -> string[] of allowed project paths, or null meaning all projects.
|
|
76
54
|
const visibilityChoices = new Map();
|
|
77
55
|
let visibilitySection;
|
|
78
56
|
let visibilityRequests = 0;
|
|
@@ -149,18 +127,8 @@
|
|
|
149
127
|
}
|
|
150
128
|
}
|
|
151
129
|
|
|
152
|
-
// The desktop window's own controls (Back, Reload) render in the editor's toolbar rather than in a
|
|
153
|
-
// second header above it. The host names which apply; the editor owns their labels and only ever
|
|
154
|
-
// reports which one was chosen. `notifications` is drawn only for an older desktop that still asks
|
|
155
|
-
// for it: a current one raises the editor's notification through its own setting (P-ATN-08).
|
|
156
130
|
const HOST_ACTIONS = new Set(['back', 'reload', 'notifications']);
|
|
157
131
|
let hostChrome = false;
|
|
158
|
-
// Framed in the desktop window, the editor's top row is the window's: the host names the room its
|
|
159
|
-
// window controls take at either end, and whether a press on the row's blank space moves the window
|
|
160
|
-
// (the app draws its own caption rows there). The caption is the toolbar, and on macOS also the
|
|
161
|
-
// rail's blank row under the traffic lights (style.css `.rail-caption`). The rule is the desktop's
|
|
162
|
-
// caption rule (desktop/src/components/windowChrome.ts): a control, the title's text and anything
|
|
163
|
-
// focusable keep the press for themselves.
|
|
164
132
|
let captionMoves = false;
|
|
165
133
|
const CAPTION_CONTROL = 'button, input, select, textarea, a, label, summary, [contenteditable], [role], [tabindex], .graph-heading strong, .graph-heading span, .menu-list';
|
|
166
134
|
const captionPress = event => {
|
|
@@ -182,16 +150,11 @@
|
|
|
182
150
|
const root = document.documentElement;
|
|
183
151
|
if (!root?.style) return;
|
|
184
152
|
const left = inset(insets?.left), right = inset(insets?.right);
|
|
185
|
-
// The right inset pads the toolbar (style.css); the left one is a corner the rail keeps clear,
|
|
186
|
-
// a row of the toolbar's height whatever its width, so only its presence is passed on.
|
|
187
153
|
root.style.setProperty('--host-inset-right', `${right}px`);
|
|
188
154
|
if (left || right) root.setAttribute('data-host-insets', ''); else root.removeAttribute('data-host-insets');
|
|
189
|
-
// The traffic lights' corner is over the rail: it keeps a caption row clear above its lists.
|
|
190
155
|
if (left) root.setAttribute('data-host-corner', ''); else root.removeAttribute('data-host-corner');
|
|
191
156
|
}
|
|
192
157
|
const hostAction = action => emit({ type: 'andorra.graph.host.action', action });
|
|
193
|
-
// Exporting through the host writes the file to the user's Downloads folder and reveals it. Only
|
|
194
|
-
// the graph or Agent id crosses the frame; the host fetches the definition from the engine itself.
|
|
195
158
|
const FRAME_REQUEST_ID = /^[a-zA-Z0-9-]{1,80}$/;
|
|
196
159
|
let exportRequests = 0;
|
|
197
160
|
const exportCallbacks = new Map();
|
|
@@ -199,8 +162,6 @@
|
|
|
199
162
|
const requestId = `export-${++exportRequests}`;
|
|
200
163
|
exportCallbacks.set(requestId, resolve);
|
|
201
164
|
emit({ ...request, requestId });
|
|
202
|
-
// A host that never answers (an outdated desktop, a lost frame) must not leave the
|
|
203
|
-
// request dangling; the editor reports the silence instead of waiting forever.
|
|
204
165
|
setTimeout(() => {
|
|
205
166
|
if (exportCallbacks.delete(requestId)) resolve({ ok: false, error: 'The Andorra app did not answer the export request.' });
|
|
206
167
|
}, 15_000);
|
|
@@ -217,8 +178,6 @@
|
|
|
217
178
|
if (slot) {
|
|
218
179
|
slot.replaceChildren();
|
|
219
180
|
if (actions.includes('back')) {
|
|
220
|
-
// The editor hides the desktop's sidebar, so Back carries how many tasks need the person's
|
|
221
|
-
// input there (P-ATN-03): the host's figure and words, drawn as the desktop's ink count pill.
|
|
222
181
|
const count = Number.isInteger(data.attention?.count) && data.attention.count > 0 ? Math.min(999, data.attention.count) : 0;
|
|
223
182
|
const words = count && typeof data.attention.label === 'string' ? data.attention.label.slice(0, 80) : '';
|
|
224
183
|
const back = part('button', undefined, 'ghost btn-small');
|
|
@@ -246,13 +205,10 @@
|
|
|
246
205
|
const text = typeof data.notice === 'string' ? data.notice.slice(0, 80) : '';
|
|
247
206
|
notice.textContent = text; notice.hidden = !text;
|
|
248
207
|
}
|
|
249
|
-
// The inspector's provider warning gains its Configure link once a host can open settings.
|
|
250
208
|
if (first && typeof state !== 'undefined' && state.graph && typeof renderInspector === 'function') renderInspector();
|
|
251
209
|
}
|
|
252
210
|
|
|
253
211
|
window.AndorraEmbed = {
|
|
254
|
-
// `caption`: this editor applies the host's insets and forwards caption presses, so the host may
|
|
255
|
-
// drop its own caption band and let the toolbar be the window's top row.
|
|
256
212
|
ready() { emit({ type: 'andorra.graph.ready', hostChrome: true, caption: true }); },
|
|
257
213
|
hostChrome() { return hostChrome; },
|
|
258
214
|
openProviderSettings() { if (hostChrome) hostAction('providers'); },
|
|
@@ -267,7 +223,6 @@
|
|
|
267
223
|
return result;
|
|
268
224
|
});
|
|
269
225
|
},
|
|
270
|
-
// An Agent's Share action, written by the host like a graph export.
|
|
271
226
|
exportAgent(agentId) {
|
|
272
227
|
if (!hostChrome || !safeGraphId(agentId)) {
|
|
273
228
|
return Promise.resolve({ ok: false, error: 'That Agent cannot be shared here.' })
|
|
@@ -281,7 +236,6 @@
|
|
|
281
236
|
},
|
|
282
237
|
activity(value) {
|
|
283
238
|
if (value?.state !== 'awaiting-input' && value?.state !== 'running' && value?.state !== 'idle') return;
|
|
284
|
-
// Deliberately omit run details, user prompts, file names and credentials.
|
|
285
239
|
emit({
|
|
286
240
|
type: 'andorra.graph.activity', state: value.state,
|
|
287
241
|
updatedAt: typeof value.updatedAt === 'string' ? value.updatedAt.slice(0, 120) : '',
|
|
@@ -298,11 +252,8 @@
|
|
|
298
252
|
};
|
|
299
253
|
|
|
300
254
|
window.addEventListener('message', async event => {
|
|
301
|
-
// Only the actual containing desktop window may drive the embedded editor.
|
|
302
255
|
if (event.source !== window.parent || !parentOrigins.has(event.origin)) return;
|
|
303
256
|
const data = event.data;
|
|
304
|
-
// The desktop client owns the appearance while the editor is framed inside it, so the editor
|
|
305
|
-
// renders the theme the client names rather than one it picks for itself.
|
|
306
257
|
if (data?.type === 'andorra.graph.theme') {
|
|
307
258
|
if (data.theme === 'dark' || data.theme === 'light') window.AndorraTheme?.set(data.theme);
|
|
308
259
|
return;
|
|
@@ -322,9 +273,6 @@
|
|
|
322
273
|
}
|
|
323
274
|
return;
|
|
324
275
|
}
|
|
325
|
-
// A JSON file the user dropped on the window, read by the desktop and handed over for the
|
|
326
|
-
// shared import pipeline. The text is bounded here a second time so a hostile host cannot
|
|
327
|
-
// push an oversized document past the editor's own guards.
|
|
328
276
|
if (data?.type === 'andorra.graph.import' && typeof data.requestId === 'string'
|
|
329
277
|
&& FRAME_REQUEST_ID.test(data.requestId) && typeof data.json === 'string'
|
|
330
278
|
&& data.json.length > 0 && data.json.length <= 512 * 1024) {
|
|
@@ -337,8 +285,6 @@
|
|
|
337
285
|
return;
|
|
338
286
|
}
|
|
339
287
|
if (data?.type === 'andorra.graph.visibility.context') {
|
|
340
|
-
// The epoch is the account context this section renders under; without it a choice could
|
|
341
|
-
// not be attributed, so an unnamed context is ignored rather than half-applied.
|
|
342
288
|
if (typeof data.epoch !== 'string' || !/^[a-zA-Z0-9-]{1,80}$/.test(data.epoch)) return;
|
|
343
289
|
visibilityProjects = Array.isArray(data.projects)
|
|
344
290
|
? data.projects.filter(project => project && typeof project.name === 'string' && typeof project.path === 'string')
|
|
@@ -346,13 +292,10 @@
|
|
|
346
292
|
visibilityAvailable = data.available === true;
|
|
347
293
|
visibilityActive = typeof data.active === 'string' ? data.active : undefined;
|
|
348
294
|
visibilityEpoch = data.epoch;
|
|
349
|
-
// A new account or project list invalidates cached choices; the open graph re-asks its value.
|
|
350
295
|
visibilityChoices.clear();
|
|
351
296
|
refreshVisibility();
|
|
352
297
|
return;
|
|
353
298
|
}
|
|
354
|
-
// Paths are project identities and arrive verbatim, so no length bound is imposed here: a bound
|
|
355
|
-
// the desktop does not share would drop the whole reply and leave the section loading forever.
|
|
356
299
|
if (data?.type === 'andorra.graph.visibility.value' && safeGraphId(data.graphId)
|
|
357
300
|
&& (data.allowed === null || Array.isArray(data.allowed) && data.allowed.every(path => typeof path === 'string'))) {
|
|
358
301
|
visibilityChoices.set(data.graphId, data.allowed === null ? null : [...new Set(data.allowed)]);
|
|
@@ -368,8 +311,6 @@
|
|
|
368
311
|
}, event.origin);
|
|
369
312
|
};
|
|
370
313
|
try {
|
|
371
|
-
// Text fields commit through onchange, usually on blur. Flush the current edited
|
|
372
|
-
// graph rather than the debounce's potentially older pending snapshot.
|
|
373
314
|
document.activeElement?.blur();
|
|
374
315
|
if (typeof hasDraftableEdits === 'function' ? hasDraftableEdits() : state.dirty && state.graph) {
|
|
375
316
|
const snapshot = copy(state.graph);
|
|
@@ -19,7 +19,6 @@ globalThis.AndorraIcons = (() => {
|
|
|
19
19
|
'arrow-left': '<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',
|
|
20
20
|
'chevron-right': '<path d="m9 18 6-6-6-6"/>',
|
|
21
21
|
'chevron-down': '<path d="m6 9 6 6 6-6"/>',
|
|
22
|
-
// A provider with no vendor mark (Lucide's "boxes"), as the desktop's model picker draws it.
|
|
23
22
|
boxes: '<path d="M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z"/><path d="m7 16.5-4.74-2.85"/><path d="m7 16.5 5-3"/><path d="M7 16.5v5.17"/><path d="M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z"/><path d="m17 16.5-5-3"/><path d="m17 16.5 4.74-2.85"/><path d="M17 16.5v5.17"/><path d="M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z"/><path d="M12 8 7.26 5.15"/><path d="m12 8 4.74-2.85"/><path d="M12 13.5V8"/>',
|
|
24
23
|
lock: '<rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>',
|
|
25
24
|
undo: '<path d="M9 14 4 9l5-5"/><path d="M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11"/>',
|
|
@@ -51,7 +50,6 @@ globalThis.AndorraIcons = (() => {
|
|
|
51
50
|
expand: '<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',
|
|
52
51
|
collapse: '<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',
|
|
53
52
|
grip: '<circle cx="9" cy="12" r="1"/><circle cx="9" cy="5" r="1"/><circle cx="9" cy="19" r="1"/><circle cx="15" cy="12" r="1"/><circle cx="15" cy="5" r="1"/><circle cx="15" cy="19" r="1"/>',
|
|
54
|
-
// Node types.
|
|
55
53
|
bot: '<path d="M12 8V4H8"/><rect width="16" height="12" x="4" y="8" rx="2"/><path d="M2 14h2"/><path d="M20 14h2"/><path d="M15 13v2"/><path d="M9 13v2"/>',
|
|
56
54
|
compass: '<circle cx="12" cy="12" r="10"/><polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"/>',
|
|
57
55
|
merge: '<circle cx="18" cy="18" r="3"/><circle cx="6" cy="6" r="3"/><path d="M6 21V9a9 9 0 0 0 9 9"/>',
|
|
@@ -60,12 +58,10 @@ globalThis.AndorraIcons = (() => {
|
|
|
60
58
|
terminal: '<polyline points="4 17 10 11 4 5"/><line x1="12" x2="20" y1="19" y2="19"/>',
|
|
61
59
|
approval: '<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><polyline points="16 11 18 13 22 9"/>',
|
|
62
60
|
flag: '<path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"/><line x1="4" x2="4" y1="22" y2="15"/>',
|
|
63
|
-
// The empty states' marks: a list with no match, and no graph open (Lucide's "workflow" glyph).
|
|
64
61
|
search: '<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>',
|
|
65
62
|
graph: '<rect width="8" height="8" x="3" y="3" rx="2"/><path d="M7 11v4a2 2 0 0 0 2 2h4"/><rect width="8" height="8" x="13" y="13" rx="2"/>',
|
|
66
63
|
};
|
|
67
64
|
|
|
68
|
-
/** The glyph a node type is drawn with. */
|
|
69
65
|
const NODE_ICONS = {
|
|
70
66
|
agent: 'bot', orchestrator: 'compass', join: 'merge', parallel: 'fork', condition: 'fork',
|
|
71
67
|
loop: 'repeat', action: 'terminal', approval: 'approval', end: 'flag',
|
|
@@ -73,7 +69,6 @@ globalThis.AndorraIcons = (() => {
|
|
|
73
69
|
|
|
74
70
|
const SVG = 'http://www.w3.org/2000/svg';
|
|
75
71
|
const shapes = new Map();
|
|
76
|
-
/** The table's markup as element descriptions, parsed once per glyph. */
|
|
77
72
|
function parts(name) {
|
|
78
73
|
if (!shapes.has(name)) {
|
|
79
74
|
const markup = GLYPHS[name] || '';
|
|
@@ -83,7 +78,6 @@ globalThis.AndorraIcons = (() => {
|
|
|
83
78
|
return shapes.get(name);
|
|
84
79
|
}
|
|
85
80
|
|
|
86
|
-
/** A decorative 16px icon, hidden from assistive technology: its control carries the name. */
|
|
87
81
|
function icon(name, size = 16) {
|
|
88
82
|
if (!Object.hasOwn(GLYPHS, name) || typeof document === 'undefined' || typeof document.createElementNS !== 'function') return null;
|
|
89
83
|
const svg = document.createElementNS(SVG, 'svg');
|
|
@@ -100,14 +94,12 @@ globalThis.AndorraIcons = (() => {
|
|
|
100
94
|
return svg;
|
|
101
95
|
}
|
|
102
96
|
|
|
103
|
-
/** Put an icon at the start of a control, keeping whatever label it already carries. */
|
|
104
97
|
function prepend(target, name, size) {
|
|
105
98
|
const glyph = icon(name, size);
|
|
106
99
|
if (glyph && target && typeof target.prepend === 'function') target.prepend(glyph);
|
|
107
100
|
return glyph;
|
|
108
101
|
}
|
|
109
102
|
|
|
110
|
-
/** Fill every `[data-icon]` control the page's own markup declares. */
|
|
111
103
|
function hydrate(root = typeof document !== 'undefined' ? document : undefined) {
|
|
112
104
|
if (!root || typeof root.querySelectorAll !== 'function') return;
|
|
113
105
|
for (const target of root.querySelectorAll('[data-icon]')) {
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
/* Node library rows, and the dialog that saves or copies an Agent definition. */
|
|
2
1
|
.library-row { display: flex; align-items: center; gap: 2px; border-radius: var(--row-radius); }
|
|
3
2
|
.library-row .library-item { flex: 1; min-width: 0; }
|
|
4
|
-
/* An Agent's actions (Use, Clone, Share, Delete) open from a right-click or this quiet icon, which
|
|
5
|
-
appears with the row's hover or focus. */
|
|
6
3
|
.library-more { flex: none; min-width: 0; width: var(--control-height); height: var(--control-height); min-height: 0; border-radius: var(--radius-sm); opacity: 0; transition: opacity var(--dur-1) var(--ease-standard); }
|
|
7
4
|
.library-row:hover .library-more, .library-row:focus-within .library-more { opacity: 1; }
|
|
8
5
|
@media (hover: none) { .library-more { opacity: 1; } }
|
|
9
|
-
/* Add agent and Import agent manage the list rather than adding a node, so they are set apart from
|
|
10
|
-
the Agents below them. */
|
|
11
6
|
.library-row.library-actions-end { border-bottom: 1px solid var(--border); border-radius: 0; padding-bottom: 2px; margin-bottom: 2px; }
|
|
12
7
|
.library-dialog textarea { width: 100%; box-sizing: border-box; min-height: 96px; resize: vertical; font: inherit; }
|
|
13
8
|
.library-dialog {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
/* Graph Manager's replies as the app draws them: Markdown, built as DOM nodes and never parsed as markup. */
|
|
2
1
|
'use strict';
|
|
3
2
|
globalThis.AndorraManagerMarkdown = (() => {
|
|
4
|
-
/** Only these link targets are made links; anything else stays as its text. */
|
|
5
3
|
const SAFE_LINK = /^(https?:\/\/|mailto:)/i;
|
|
6
4
|
|
|
7
5
|
function el(tag, className) {
|
|
@@ -10,10 +8,6 @@ globalThis.AndorraManagerMarkdown = (() => {
|
|
|
10
8
|
return item;
|
|
11
9
|
}
|
|
12
10
|
|
|
13
|
-
/**
|
|
14
|
-
* Inline spans: `code`, **strong**, *emphasis* or _emphasis_, and [text](url). Code is matched
|
|
15
|
-
* first so nothing inside it is read as emphasis. Unmatched markers stay as the text they are.
|
|
16
|
-
*/
|
|
17
11
|
function inline(text, into) {
|
|
18
12
|
const pattern = /`([^`\n]+)`|\*\*([^*\n]+?)\*\*|__([^_\n]+?)__|\*([^*\s][^*\n]*?)\*|(?<![\w])_([^_\s][^_\n]*?)_(?![\w])|\[([^\]\n]+)\]\(([^)\s]+)\)/g;
|
|
19
13
|
let last = 0;
|
|
@@ -42,7 +36,6 @@ globalThis.AndorraManagerMarkdown = (() => {
|
|
|
42
36
|
const TABLE_RULE = /^\s*\|?\s*:?-{2,}:?\s*(\|\s*:?-{2,}:?\s*)*\|?\s*$/;
|
|
43
37
|
const cells = line => line.trim().replace(/^\||\|$/g, '').split('|').map(cell => cell.trim());
|
|
44
38
|
|
|
45
|
-
/** Block structure: fenced code, headings, lists, quotes, rules, tables and paragraphs. */
|
|
46
39
|
function render(source) {
|
|
47
40
|
const root = el('div', 'markdown');
|
|
48
41
|
const lines = String(source ?? '').replace(/\r\n?/g, '\n').split('\n');
|
|
@@ -108,9 +101,6 @@ globalThis.AndorraManagerMarkdown = (() => {
|
|
|
108
101
|
const ordered = NUMBERED.test(line);
|
|
109
102
|
const list = el(ordered ? 'ol' : 'ul');
|
|
110
103
|
if (ordered) { const start = Number(NUMBERED.exec(line)[2]); if (start !== 1) list.start = start; }
|
|
111
|
-
// The list's own indent is its first marker's, however deep: an indented list (or a nested
|
|
112
|
-
// one cut off from its parent by a blank line) is still a list. Its first line always
|
|
113
|
-
// matches, so the loop always consumes at least that line.
|
|
114
104
|
const base = (ordered ? NUMBERED : BULLET).exec(line)[1].length;
|
|
115
105
|
const indent = text => /^\s*/.exec(text)[0].length;
|
|
116
106
|
let item = null;
|
|
@@ -124,7 +114,6 @@ globalThis.AndorraManagerMarkdown = (() => {
|
|
|
124
114
|
index++;
|
|
125
115
|
continue;
|
|
126
116
|
}
|
|
127
|
-
// An indented line continues the item above: a nested marker or a wrapped sentence.
|
|
128
117
|
if (item && current.trim() && indent(current) >= base + 2) {
|
|
129
118
|
const nested = BULLET.exec(current) || NUMBERED.exec(current);
|
|
130
119
|
if (nested) {
|
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
/* What the Graph Manager panel decides before it draws anything: the first-run tip, the model it starts on, whether the agent's save may replace the canvas, which new graph to offer, which graphs it deleted, and the transcript; no DOM dependencies. */
|
|
2
1
|
'use strict';
|
|
3
2
|
globalThis.AndorraManagerState = (() => {
|
|
4
3
|
const TIP_KEY = 'andorra.graphManager.tipDismissed';
|
|
5
4
|
const MODEL_KEY = 'andorra.graphManager.model';
|
|
6
5
|
|
|
7
|
-
/** Storage can be blocked or full (private windows, embedded webviews); a failed read is an unset key. */
|
|
8
6
|
function read(storage, key) {
|
|
9
7
|
try { return storage.getItem(key); } catch { return null; }
|
|
10
8
|
}
|
|
11
9
|
function write(storage, key, value) {
|
|
12
|
-
try { storage.setItem(key, value); } catch {
|
|
10
|
+
try { storage.setItem(key, value); } catch { }
|
|
13
11
|
}
|
|
14
12
|
|
|
15
|
-
/**
|
|
16
|
-
* The tip belongs to New graph alone: `reason` is how the open graph arrived ('new', 'duplicate',
|
|
17
|
-
* 'import' or 'open'). It shows until it is dismissed once in this browser profile.
|
|
18
|
-
*/
|
|
19
13
|
function shouldShowTip(storage, reason) {
|
|
20
14
|
return reason === 'new' && !read(storage, TIP_KEY);
|
|
21
15
|
}
|
|
@@ -23,7 +17,6 @@ globalThis.AndorraManagerState = (() => {
|
|
|
23
17
|
write(storage, TIP_KEY, '1');
|
|
24
18
|
}
|
|
25
19
|
|
|
26
|
-
/** A pair the selects can show: the provider exists and the model is its default or one it lists. */
|
|
27
20
|
function listed(providers, choice) {
|
|
28
21
|
if (!choice || typeof choice.provider !== 'string' || typeof choice.model !== 'string' || !choice.model) return false;
|
|
29
22
|
const provider = (providers || []).find(entry => entry.id === choice.provider);
|
|
@@ -32,11 +25,6 @@ globalThis.AndorraManagerState = (() => {
|
|
|
32
25
|
function savedModel(storage) {
|
|
33
26
|
try { return JSON.parse(read(storage, MODEL_KEY)); } catch { return null; }
|
|
34
27
|
}
|
|
35
|
-
/**
|
|
36
|
-
* The model a chat starts on: the last one chosen here while it is still listed, else the first
|
|
37
|
-
* agent node of the graph that names a listed provider and model, else the first provider's
|
|
38
|
-
* default model (its first listed model when it has no default).
|
|
39
|
-
*/
|
|
40
28
|
function initialModel(storage, graph, providers) {
|
|
41
29
|
const saved = savedModel(storage);
|
|
42
30
|
if (listed(providers, saved)) return { provider: saved.provider, model: saved.model };
|
|
@@ -52,21 +40,11 @@ globalThis.AndorraManagerState = (() => {
|
|
|
52
40
|
write(storage, MODEL_KEY, JSON.stringify({ provider: choice.provider, model: choice.model }));
|
|
53
41
|
}
|
|
54
42
|
|
|
55
|
-
/**
|
|
56
|
-
* What to do when the agent saved the open graph. All three are JSON strings of a canvas: the one
|
|
57
|
-
* sent with the latest message, the one on screen now, and the untouched starter (or null). The
|
|
58
|
-
* new revision loads only when that discards nothing; any other canvas holds edits, so it is offered.
|
|
59
|
-
*/
|
|
60
43
|
function applyDecision({ sentCanvas, currentCanvas, untouched }) {
|
|
61
44
|
if (typeof currentCanvas !== 'string') return 'offer';
|
|
62
45
|
return currentCanvas === sentCanvas || currentCanvas === untouched ? 'load' : 'offer';
|
|
63
46
|
}
|
|
64
47
|
|
|
65
|
-
/**
|
|
66
|
-
* The bundled preset ('default') cannot be saved, so beside it the agent's work arrives as a graph
|
|
67
|
-
* under another id. That save is an offer to open the new graph: `{ id, label }`, the label being
|
|
68
|
-
* the name it was created with or else its id. Beside any other graph, or for any other event, null.
|
|
69
|
-
*/
|
|
70
48
|
function createdGraph(openGraphId, event) {
|
|
71
49
|
if (openGraphId !== 'default' || !event || event.type !== 'graph.saved') return null;
|
|
72
50
|
if (typeof event.graphId !== 'string' || !event.graphId || event.graphId === 'default') return null;
|
|
@@ -74,10 +52,6 @@ globalThis.AndorraManagerState = (() => {
|
|
|
74
52
|
return { id: event.graphId, label: name || event.graphId };
|
|
75
53
|
}
|
|
76
54
|
|
|
77
|
-
/**
|
|
78
|
-
* The ids of the graphs the conversation last reported as deleted. Deleting publishes a revision
|
|
79
|
-
* that must never be loaded; a later save of the same graph (a restore) brings it back.
|
|
80
|
-
*/
|
|
81
55
|
function deletedGraphs(transcript) {
|
|
82
56
|
const deleted = new Set();
|
|
83
57
|
for (const entry of Array.isArray(transcript) ? transcript : []) {
|
|
@@ -94,13 +68,7 @@ globalThis.AndorraManagerState = (() => {
|
|
|
94
68
|
const point = value => plainObject(value) && Number.isFinite(value.x) && Number.isFinite(value.y);
|
|
95
69
|
const GRAPH_FIELDS = { name: text, entry: text, limits: plainObject, metadata: plainObject, widgets: Array.isArray, inputSchema: plainObject, stateSchema: plainObject };
|
|
96
70
|
|
|
97
|
-
/**
|
|
98
|
-
* Whether a draft change has the shape the canvas draws. The backend checks a draft's fields only
|
|
99
|
-
* when it validates or publishes, so a malformed change (a graph patch naming `name: null`, say)
|
|
100
|
-
* can still reach the panel; drawn, it would break every redraw and save until undone.
|
|
101
|
-
*/
|
|
102
71
|
const UNSAFE_KEYS = new Set(['__proto__', 'constructor', 'prototype']);
|
|
103
|
-
/** Whether a parsed value carries a key that would reach an object's prototype when assigned. */
|
|
104
72
|
function unsafeKeys(value, depth = 0) {
|
|
105
73
|
if (depth > 64) return true;
|
|
106
74
|
if (Array.isArray(value)) return value.some(item => unsafeKeys(item, depth + 1));
|
|
@@ -131,13 +99,6 @@ globalThis.AndorraManagerState = (() => {
|
|
|
131
99
|
}
|
|
132
100
|
|
|
133
101
|
const same = (a, b) => JSON.stringify(a) === JSON.stringify(b);
|
|
134
|
-
/**
|
|
135
|
-
* The agent's version of an object (a node, or the graph's fields) merged into the canvas's, field
|
|
136
|
-
* by field, against `base`: the version both last shared. A field the user changed since keeps the
|
|
137
|
-
* user's value; a field only the agent changed takes the agent's; with no base, the agent's version
|
|
138
|
-
* is taken whole. `kept` lists the fields where the user's value won over a different one of the
|
|
139
|
-
* agent's, so the caller knows the canvas no longer follows the agent.
|
|
140
|
-
*/
|
|
141
102
|
function mergeFields(base, current, incoming, keys) {
|
|
142
103
|
if (!plainObject(current) || !plainObject(base)) return { merged: incoming, kept: [] };
|
|
143
104
|
const merged = {}, kept = [];
|
|
@@ -151,10 +112,6 @@ globalThis.AndorraManagerState = (() => {
|
|
|
151
112
|
return { merged, kept };
|
|
152
113
|
}
|
|
153
114
|
|
|
154
|
-
/**
|
|
155
|
-
* Makes `target` hold what `next` holds while keeping every nested object and array that both have,
|
|
156
|
-
* so a reference held elsewhere (an inspector control) still points into the live value.
|
|
157
|
-
*/
|
|
158
115
|
function assignInPlace(target, next) {
|
|
159
116
|
if (Array.isArray(target)) {
|
|
160
117
|
target.length = Math.min(target.length, next.length);
|
|
@@ -168,7 +125,6 @@ globalThis.AndorraManagerState = (() => {
|
|
|
168
125
|
for (const key of Object.keys(target)) if (!Object.hasOwn(next, key)) delete target[key];
|
|
169
126
|
for (const [key, value] of Object.entries(next)) {
|
|
170
127
|
if (UNSAFE_KEYS.has(key)) continue;
|
|
171
|
-
// Only the object's own value is kept and descended into; an inherited one is never written through.
|
|
172
128
|
const current = Object.hasOwn(target, key) ? target[key] : undefined;
|
|
173
129
|
if ((plainObject(current) && plainObject(value)) || (Array.isArray(current) && Array.isArray(value))) assignInPlace(current, value);
|
|
174
130
|
else Object.defineProperty(target, key, { value, writable: true, enumerable: true, configurable: true });
|
|
@@ -176,12 +132,6 @@ globalThis.AndorraManagerState = (() => {
|
|
|
176
132
|
return target;
|
|
177
133
|
}
|
|
178
134
|
|
|
179
|
-
/**
|
|
180
|
-
* Applies one change the agent made to its draft (`graph.edit`'s `edit`) to `graph` in place, the
|
|
181
|
-
* way the draft applied it: a node is set (keeping the object the editor's inspector is bound to),
|
|
182
|
-
* a connection is set whole, a removed node takes its connections with it, a graph patch replaces
|
|
183
|
-
* the fields it names. False when it changed nothing or the change is malformed.
|
|
184
|
-
*/
|
|
185
135
|
function applyEdit(graph, edit) {
|
|
186
136
|
if (!graph || !soundEdit(edit)) return false;
|
|
187
137
|
graph.nodes = plainObject(graph.nodes) ? graph.nodes : {};
|
|
@@ -190,9 +140,6 @@ globalThis.AndorraManagerState = (() => {
|
|
|
190
140
|
const next = JSON.parse(JSON.stringify(edit.node));
|
|
191
141
|
const target = graph.nodes[next.id];
|
|
192
142
|
if (!plainObject(target)) { graph.nodes[next.id] = next; return true; }
|
|
193
|
-
// The inspector's fields write into the objects they were drawn for (the node, its completion,
|
|
194
|
-
// its subagent roles), so those objects stay and their contents change: a field being typed in
|
|
195
|
-
// still commits into the graph.
|
|
196
143
|
assignInPlace(target, next);
|
|
197
144
|
return true;
|
|
198
145
|
}
|
|
@@ -203,11 +150,9 @@ globalThis.AndorraManagerState = (() => {
|
|
|
203
150
|
return true;
|
|
204
151
|
}
|
|
205
152
|
if (edit.kind === 'edge') {
|
|
206
|
-
// A connection is drawn only between cards the canvas has.
|
|
207
153
|
if (!Object.hasOwn(graph.nodes, edit.edge.source) || !Object.hasOwn(graph.nodes, edit.edge.target)) return false;
|
|
208
154
|
const edge = JSON.parse(JSON.stringify(edit.edge));
|
|
209
155
|
const index = graph.edges.findIndex(item => item.id === edge.id);
|
|
210
|
-
// An existing connection keeps the object its inspector's mapping fields write into.
|
|
211
156
|
if (index < 0) graph.edges.push(edge); else if (plainObject(graph.edges[index])) assignInPlace(graph.edges[index], edge); else graph.edges[index] = edge;
|
|
212
157
|
return true;
|
|
213
158
|
}
|
|
@@ -218,28 +163,20 @@ globalThis.AndorraManagerState = (() => {
|
|
|
218
163
|
}
|
|
219
164
|
for (const key of Object.keys(edit.patch)) {
|
|
220
165
|
const value = JSON.parse(JSON.stringify(edit.patch[key]));
|
|
221
|
-
// The graph inspector's fields hold its settings objects (limits, schemas) the same way.
|
|
222
166
|
if ((plainObject(graph[key]) && plainObject(value)) || (Array.isArray(graph[key]) && Array.isArray(value))) assignInPlace(graph[key], value);
|
|
223
167
|
else graph[key] = value;
|
|
224
168
|
}
|
|
225
169
|
return true;
|
|
226
170
|
}
|
|
227
171
|
|
|
228
|
-
/**
|
|
229
|
-
* The transcript after one server event, as a new array. A `snapshot` replaces it, folded like live
|
|
230
|
-
* events; `resolved` marks its approval or question `answered` on a copy and adds no row.
|
|
231
|
-
*/
|
|
232
172
|
function reduce(transcript, event) {
|
|
233
173
|
const current = Array.isArray(transcript) ? transcript : [];
|
|
234
174
|
if (!event || typeof event.type !== 'string') return [...current];
|
|
235
175
|
if (event.type === 'snapshot') return (event.events || []).reduce(reduce, []);
|
|
236
|
-
// A `state` event is not a transcript row: the panel tracks the run state on its own, and a
|
|
237
|
-
// `graph.edit` is applied to the canvas, not listed.
|
|
238
176
|
if (event.type === 'state' || event.type === 'graph.edit') return [...current];
|
|
239
177
|
if (event.type === 'resolved') {
|
|
240
178
|
return current.map(entry => (entry.type === 'approval' || entry.type === 'question') && entry.id === event.id ? { ...entry, answered: true } : entry);
|
|
241
179
|
}
|
|
242
|
-
// A thought and a tool call are one row each, changed in place as the call goes on.
|
|
243
180
|
if (event.type === 'thought' || event.type === 'tool') {
|
|
244
181
|
const index = current.findIndex(entry => entry.type === event.type && entry.id === event.id);
|
|
245
182
|
if (index < 0) return [...current, event];
|
|
@@ -262,12 +199,6 @@ globalThis.AndorraManagerState = (() => {
|
|
|
262
199
|
|
|
263
200
|
const isWork = entry => entry && (entry.type === 'thought' || entry.type === 'tool');
|
|
264
201
|
|
|
265
|
-
/**
|
|
266
|
-
* The transcript as the app's turn reads it: consecutive thoughts and tool calls form one stretch
|
|
267
|
-
* of work between messages. A stretch is settled once anything follows it or the run is over;
|
|
268
|
-
* a settled stretch is drawn as the one line it condenses to, the live one row by row.
|
|
269
|
-
* Each block: `{ kind: 'entry', entry, index }` or `{ kind: 'work', key, entries, settled }`.
|
|
270
|
-
*/
|
|
271
202
|
function blocks(transcript, running) {
|
|
272
203
|
const out = [];
|
|
273
204
|
const list = Array.isArray(transcript) ? transcript : [];
|
|
@@ -283,22 +214,16 @@ globalThis.AndorraManagerState = (() => {
|
|
|
283
214
|
return out;
|
|
284
215
|
}
|
|
285
216
|
|
|
286
|
-
/** Seconds in the transcript's one form: one decimal. */
|
|
287
217
|
function seconds(ms) {
|
|
288
218
|
return `${(Math.max(0, ms) / 1000).toFixed(1)}s`;
|
|
289
219
|
}
|
|
290
|
-
/** A settled thought's line: `Thought for 4s`, or `Thought briefly` under a second. */
|
|
291
220
|
function thoughtLabel(ms) {
|
|
292
221
|
if (typeof ms !== 'number') return 'Thought';
|
|
293
222
|
return ms < 1000 ? 'Thought briefly' : `Thought for ${Math.round(ms / 1000)}s`;
|
|
294
223
|
}
|
|
295
224
|
|
|
296
|
-
/** Graph actions that change the draft; the summary counts them as edits. */
|
|
297
225
|
const EDITS = new Set(['Set step', 'Edit step', 'Remove step', 'Connect', 'Remove connection', 'Edit graph']);
|
|
298
226
|
const plural = (count, one, many) => `${count} ${count === 1 ? one : many}`;
|
|
299
|
-
/**
|
|
300
|
-
* What a settled stretch did, in one sentence: `Thought for 12s, made 5 edits, ran 3 other steps`.
|
|
301
|
-
*/
|
|
302
227
|
function workLabel(entries) {
|
|
303
228
|
const thoughts = entries.filter(entry => entry.type === 'thought');
|
|
304
229
|
const tools = entries.filter(entry => entry.type === 'tool');
|
|
@@ -306,7 +231,6 @@ globalThis.AndorraManagerState = (() => {
|
|
|
306
231
|
if (thoughts.length) parts.push(thoughtLabel(thoughts.reduce((sum, entry) => sum + (typeof entry.durationMs === 'number' ? entry.durationMs : 0), 0)).toLowerCase());
|
|
307
232
|
const edits = tools.filter(entry => EDITS.has(entry.verb)).length;
|
|
308
233
|
const saves = tools.filter(entry => entry.verb === 'Save version' && entry.status === 'done').length;
|
|
309
|
-
// A save that failed or was denied is a step like any other, not a save.
|
|
310
234
|
const other = tools.length - edits - saves;
|
|
311
235
|
if (edits) parts.push(`made ${plural(edits, 'edit', 'edits')}`);
|
|
312
236
|
if (saves) parts.push('saved the graph');
|
|
@@ -315,7 +239,6 @@ globalThis.AndorraManagerState = (() => {
|
|
|
315
239
|
const sentence = parts.join(', ');
|
|
316
240
|
return sentence[0].toUpperCase() + sentence.slice(1);
|
|
317
241
|
}
|
|
318
|
-
/** The stretch's wall time, from its first call's start to its last call's end, or undefined. */
|
|
319
242
|
function workDuration(entries) {
|
|
320
243
|
const starts = entries.map(entry => entry.startedAt).filter(value => typeof value === 'number');
|
|
321
244
|
const ends = entries.map(entry => entry.type === 'thought'
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* The Graph Manager button's tip and the side chat panel. Everything is drawn from `tokens.css`,
|
|
3
|
-
* so the panel follows the editor's register in both appearances.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/* The button's first-run tip hangs under it, over the toolbar's edge and clear of the canvas tips
|
|
7
|
-
(those sit at the canvas's top left). */
|
|
8
1
|
.manager-anchor { position: relative; display: flex; }
|
|
9
2
|
#graph-manager[aria-expanded="true"] { background: var(--selected); }
|
|
10
3
|
.manager-tip {
|
|
@@ -15,7 +8,6 @@
|
|
|
15
8
|
}
|
|
16
9
|
.manager-tip .icon-button { flex: none; min-width: 24px; width: 24px; min-height: 24px; height: 24px; border-radius: var(--radius-sm); }
|
|
17
10
|
|
|
18
|
-
/* The panel is a flex sibling of the canvas and the inspector: opening it narrows the canvas. */
|
|
19
11
|
#manager-panel {
|
|
20
12
|
width: var(--manager-panel, 380px); max-width: 60%; flex-shrink: 0; min-height: 0; border-left: 1px solid var(--border);
|
|
21
13
|
background: var(--bg-surface); display: flex; flex-direction: column; position: relative; z-index: var(--z-raised);
|
|
@@ -48,15 +40,12 @@
|
|
|
48
40
|
.manager-row { min-width: 0; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
|
|
49
41
|
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
|
|
50
42
|
|
|
51
|
-
/* The conversation reads as the app's does: the user's words in a full-width box, the agent's
|
|
52
|
-
reply as prose, and its work as flat gray lines between them. */
|
|
53
43
|
.manager-user-body {
|
|
54
44
|
background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--card-radius);
|
|
55
45
|
padding: var(--space-2) var(--space-3); white-space: pre-wrap; color: var(--text); line-height: var(--leading-sm);
|
|
56
46
|
}
|
|
57
47
|
.manager-assistant { color: var(--text); }
|
|
58
48
|
|
|
59
|
-
/* Markdown in the reply, after the app's `.md` rules. */
|
|
60
49
|
.markdown { white-space: normal; line-height: var(--leading-prose); }
|
|
61
50
|
.markdown > * + * { margin-top: 10px; }
|
|
62
51
|
.markdown > :first-child { margin-top: 0; }
|
|
@@ -79,8 +68,6 @@
|
|
|
79
68
|
.markdown :is(th, td) { border: 1px solid var(--border); padding: 3px 8px; text-align: left; vertical-align: top; }
|
|
80
69
|
.markdown th { color: var(--text-2); font-weight: var(--weight-strong); }
|
|
81
70
|
|
|
82
|
-
/* The agent's work: one flat line per thought or call, as in the app. A finished stretch condenses
|
|
83
|
-
to one counted line (`Thought for 8s, made 4 edits`) that opens back to its rows. */
|
|
84
71
|
.manager-work-live { display: flex; flex-direction: column; gap: 2px; }
|
|
85
72
|
.manager-fold { min-width: 0; }
|
|
86
73
|
.manager-fold-head {
|
|
@@ -92,7 +79,6 @@
|
|
|
92
79
|
button.manager-fold-head { cursor: pointer; }
|
|
93
80
|
button.manager-fold-head:hover { color: var(--text); background: transparent; }
|
|
94
81
|
button.manager-fold-head:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent-ring); border-radius: var(--radius-xs); }
|
|
95
|
-
/* The fold's caret closes the line's words and turns as it opens. */
|
|
96
82
|
button.manager-fold-head::after {
|
|
97
83
|
content: ''; flex: none; align-self: center; order: 1; width: 5px; height: 5px; margin: 0 2px;
|
|
98
84
|
border-right: 1.5px solid var(--text-3); border-bottom: 1.5px solid var(--text-3);
|
|
@@ -109,7 +95,6 @@ button.manager-fold-head::after {
|
|
|
109
95
|
.manager-activity-name, .manager-activity-verb { flex-shrink: 0; color: inherit; }
|
|
110
96
|
.manager-activity-target { color: var(--text); font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; min-width: 4ch; }
|
|
111
97
|
.manager-activity-preview { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; min-width: 0; }
|
|
112
|
-
/* A live thought's preview is the newest words, so a line too long loses its front, not its end. */
|
|
113
98
|
.manager-preview-tail { direction: rtl; text-align: left; }
|
|
114
99
|
.manager-preview-tail > span { direction: ltr; unicode-bidi: isolate; }
|
|
115
100
|
.manager-row-duration { margin-left: auto; order: 2; flex-shrink: 0; min-width: 6ch; text-align: right; color: var(--text-3); font-family: var(--font-mono); font-size: var(--type-xs); }
|
|
@@ -128,7 +113,6 @@ button.manager-fold-head::after {
|
|
|
128
113
|
.manager-activity-reason { font-size: var(--type-xs); color: var(--err-text); white-space: pre-wrap; overflow-wrap: anywhere; padding-left: 2px; }
|
|
129
114
|
.manager-activity-note { font-size: var(--type-xs); color: var(--text-3); padding-left: 2px; }
|
|
130
115
|
|
|
131
|
-
/* A saved or deleted graph is a step done, not a check passed: the muted ink, never green (P-LNT-06). */
|
|
132
116
|
.manager-saved { color: var(--text-2); font-size: var(--type-xs); }
|
|
133
117
|
.manager-row.manager-error { color: var(--err-text); font-size: var(--type-xs); white-space: pre-wrap; }
|
|
134
118
|
.manager-card {
|
|
@@ -148,8 +132,6 @@ button.manager-fold-head::after {
|
|
|
148
132
|
.manager-composer-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); }
|
|
149
133
|
#manager-run-state { flex: 1; min-width: 0; font-size: var(--type-xs); color: var(--text-3); }
|
|
150
134
|
|
|
151
|
-
/* Below this width the inspector floats over the canvas; it stops at the chat panel's edge so the
|
|
152
|
-
two never cover each other. */
|
|
153
135
|
@media (max-width: 1180px) {
|
|
154
136
|
#manager-panel { width: min(var(--manager-panel, 380px), 60%); }
|
|
155
137
|
.workspace.manager-open #inspector { right: min(var(--manager-panel, 380px), 60%); width: min(var(--panel), calc(40% - 24px)); }
|