@andorra-labs/code 0.1.11 → 0.1.13

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.
Files changed (614) hide show
  1. package/README.md +8 -2
  2. package/THIRD_PARTY_NOTICES.md +15 -0
  3. package/dist/src/account-presentation.d.ts +1 -37
  4. package/dist/src/account-presentation.js +2 -42
  5. package/dist/src/activity.d.ts +0 -25
  6. package/dist/src/activity.js +1 -23
  7. package/dist/src/agent-definitions.d.ts +0 -26
  8. package/dist/src/agent-definitions.js +0 -43
  9. package/dist/src/agent-execution.d.ts +0 -2
  10. package/dist/src/agent-execution.js +59 -414
  11. package/dist/src/agent-mcp-catalog.d.ts +0 -8
  12. package/dist/src/agent-mcp-catalog.js +0 -2
  13. package/dist/src/agent-mcp.d.ts +0 -56
  14. package/dist/src/agent-mcp.js +14 -153
  15. package/dist/src/agent-modifiers.d.ts +0 -1
  16. package/dist/src/agent-modifiers.js +25 -68
  17. package/dist/src/analytics.d.ts +0 -66
  18. package/dist/src/analytics.js +0 -45
  19. package/dist/src/anthropic-console-auth.d.ts +0 -24
  20. package/dist/src/anthropic-console-auth.js +0 -37
  21. package/dist/src/anthropic-credentials.d.ts +0 -25
  22. package/dist/src/anthropic-credentials.js +0 -28
  23. package/dist/src/app-server/protocol.d.ts +19 -244
  24. package/dist/src/app-server/protocol.js +1 -132
  25. package/dist/src/app-server/reasoning.d.ts +0 -31
  26. package/dist/src/app-server/reasoning.js +0 -54
  27. package/dist/src/app-server/terminal.d.ts +0 -36
  28. package/dist/src/app-server/terminal.js +3 -39
  29. package/dist/src/app-server/workspace.d.ts +0 -167
  30. package/dist/src/app-server/workspace.js +4 -406
  31. package/dist/src/app-server.d.ts +33 -918
  32. package/dist/src/app-server.js +608 -2984
  33. package/dist/src/artifacts.d.ts +0 -10
  34. package/dist/src/artifacts.js +1 -11
  35. package/dist/src/attachments.d.ts +4 -98
  36. package/dist/src/attachments.js +10 -130
  37. package/dist/src/auth/AuthManager.d.ts +0 -93
  38. package/dist/src/auth/AuthManager.js +3 -165
  39. package/dist/src/auth/callback-page.d.ts +0 -1
  40. package/dist/src/auth/callback-page.js +0 -4
  41. package/dist/src/auth/callback.d.ts +0 -25
  42. package/dist/src/auth/callback.js +1 -29
  43. package/dist/src/auth/deployment.d.ts +0 -16
  44. package/dist/src/auth/deployment.js +0 -16
  45. package/dist/src/auth/index.d.ts +0 -11
  46. package/dist/src/auth/index.js +0 -11
  47. package/dist/src/auth/lock.d.ts +0 -1
  48. package/dist/src/auth/lock.js +0 -1
  49. package/dist/src/auth/store.d.ts +7 -108
  50. package/dist/src/auth/store.js +21 -129
  51. package/dist/src/auth/types.d.ts +0 -8
  52. package/dist/src/auth-commands.d.ts +0 -5
  53. package/dist/src/auth-commands.js +0 -1
  54. package/dist/src/automation-runner.d.ts +0 -9
  55. package/dist/src/automation-runner.js +0 -11
  56. package/dist/src/automation-service.d.ts +0 -10
  57. package/dist/src/automation-service.js +3 -17
  58. package/dist/src/automation-tool.js +0 -5
  59. package/dist/src/automation-worker-shutdown.d.ts +0 -1
  60. package/dist/src/automation-worker-shutdown.js +0 -3
  61. package/dist/src/automations.d.ts +23 -2
  62. package/dist/src/automations.js +91 -12
  63. package/dist/src/background-tasks.d.ts +0 -23
  64. package/dist/src/background-tasks.js +0 -11
  65. package/dist/src/boot-trace.d.ts +0 -13
  66. package/dist/src/boot-trace.js +1 -14
  67. package/dist/src/browser-activity.js +0 -2
  68. package/dist/src/browser-bridge.d.ts +0 -2
  69. package/dist/src/browser-bridge.js +0 -27
  70. package/dist/src/browser-captcha-tool.d.ts +0 -13
  71. package/dist/src/browser-captcha-tool.js +3 -35
  72. package/dist/src/browser-extensions-tool.d.ts +24 -0
  73. package/dist/src/browser-extensions-tool.js +137 -0
  74. package/dist/src/browser-extensions.d.ts +127 -0
  75. package/dist/src/browser-extensions.js +729 -0
  76. package/dist/src/browser-observation.d.ts +0 -15
  77. package/dist/src/browser-observation.js +1 -22
  78. package/dist/src/browser-panel-tool.d.ts +10 -25
  79. package/dist/src/browser-panel-tool.js +64 -60
  80. package/dist/src/browser-runner.d.ts +0 -1
  81. package/dist/src/browser-runner.js +7 -46
  82. package/dist/src/browser-server.d.ts +0 -6
  83. package/dist/src/browser-server.js +6 -229
  84. package/dist/src/browser-session.d.ts +0 -25
  85. package/dist/src/browser-session.js +1 -71
  86. package/dist/src/browser-stealth.d.ts +0 -12
  87. package/dist/src/browser-stealth.js +0 -36
  88. package/dist/src/browser-ui/app.js +7 -174
  89. package/dist/src/browser-ui/style.css +0 -68
  90. package/dist/src/browser-ui/tokens.css +11 -93
  91. package/dist/src/browser-view.d.ts +52 -290
  92. package/dist/src/browser-view.js +354 -567
  93. package/dist/src/capabilities.d.ts +0 -8
  94. package/dist/src/capabilities.js +0 -29
  95. package/dist/src/capsolver.d.ts +0 -13
  96. package/dist/src/capsolver.js +0 -15
  97. package/dist/src/clarification-ui.d.ts +0 -7
  98. package/dist/src/clarification-ui.js +0 -8
  99. package/dist/src/claude-executable.d.ts +0 -1
  100. package/dist/src/claude-executable.js +1 -2
  101. package/dist/src/claude-provider.d.ts +6 -19
  102. package/dist/src/claude-provider.js +166 -61
  103. package/dist/src/cli-executable.d.ts +0 -16
  104. package/dist/src/cli-executable.js +0 -7
  105. package/dist/src/cli-process.d.ts +0 -26
  106. package/dist/src/cli-process.js +0 -18
  107. package/dist/src/cli-sign-in.d.ts +0 -20
  108. package/dist/src/cli-sign-in.js +1 -17
  109. package/dist/src/cli.d.ts +3 -56
  110. package/dist/src/cli.js +193 -702
  111. package/dist/src/code-intelligence/CodeIntelligenceManager.d.ts +4 -59
  112. package/dist/src/code-intelligence/CodeIntelligenceManager.js +27 -100
  113. package/dist/src/code-intelligence/ContextLedger.d.ts +0 -4
  114. package/dist/src/code-intelligence/ContextLedger.js +0 -10
  115. package/dist/src/code-intelligence/ContextRouter.d.ts +0 -6
  116. package/dist/src/code-intelligence/ContextRouter.js +0 -8
  117. package/dist/src/code-intelligence/codegraph/CodeGraphProjectSession.d.ts +0 -2
  118. package/dist/src/code-intelligence/codegraph/CodeGraphProjectSession.js +5 -12
  119. package/dist/src/code-intelligence/codegraph/CodeGraphProvider.d.ts +0 -6
  120. package/dist/src/code-intelligence/codegraph/CodeGraphProvider.js +0 -6
  121. package/dist/src/code-intelligence/codegraph/CodeGraphSyncBarrier.d.ts +0 -5
  122. package/dist/src/code-intelligence/codegraph/CodeGraphSyncBarrier.js +1 -17
  123. package/dist/src/code-intelligence/codegraph/repoExploreTool.d.ts +0 -5
  124. package/dist/src/code-intelligence/codegraph/repoExploreTool.js +0 -5
  125. package/dist/src/code-intelligence/repository.d.ts +0 -9
  126. package/dist/src/code-intelligence/repository.js +1 -11
  127. package/dist/src/code-intelligence/types.d.ts +0 -8
  128. package/dist/src/codex-auth.d.ts +0 -44
  129. package/dist/src/codex-auth.js +0 -45
  130. package/dist/src/codex-browser-auth.d.ts +0 -13
  131. package/dist/src/codex-browser-auth.js +3 -20
  132. package/dist/src/codex-errors.js +0 -2
  133. package/dist/src/codex-executable.d.ts +0 -2
  134. package/dist/src/codex-executable.js +1 -7
  135. package/dist/src/codex-provider.d.ts +0 -13
  136. package/dist/src/codex-provider.js +1 -26
  137. package/dist/src/codex-rpc.d.ts +0 -10
  138. package/dist/src/codex-rpc.js +0 -12
  139. package/dist/src/coding-tools.d.ts +6 -27
  140. package/dist/src/coding-tools.js +193 -205
  141. package/dist/src/command-metrics.d.ts +0 -4
  142. package/dist/src/command-output-tap.d.ts +0 -11
  143. package/dist/src/command-output-tap.js +0 -3
  144. package/dist/src/command-screens.d.ts +24 -0
  145. package/dist/src/command-screens.js +132 -100
  146. package/dist/src/commands.d.ts +6 -63
  147. package/dist/src/commands.js +20 -100
  148. package/dist/src/completion-gates.d.ts +0 -47
  149. package/dist/src/completion-gates.js +0 -14
  150. package/dist/src/completion.d.ts +2 -58
  151. package/dist/src/completion.js +90 -186
  152. package/dist/src/config.d.ts +12 -116
  153. package/dist/src/config.js +41 -171
  154. package/dist/src/context-budget.d.ts +0 -22
  155. package/dist/src/context-budget.js +0 -44
  156. package/dist/src/context-compaction.d.ts +29 -6
  157. package/dist/src/context-compaction.js +94 -25
  158. package/dist/src/context-selection.d.ts +0 -24
  159. package/dist/src/context-selection.js +0 -34
  160. package/dist/src/dashboard-view.d.ts +0 -2
  161. package/dist/src/dashboard-view.js +0 -35
  162. package/dist/src/dashboard.d.ts +0 -2
  163. package/dist/src/dashboard.js +0 -9
  164. package/dist/src/deadline.d.ts +0 -45
  165. package/dist/src/deadline.js +0 -54
  166. package/dist/src/decision/ContinuationAdapter.d.ts +0 -5
  167. package/dist/src/decision/ContinuationAdapter.js +0 -5
  168. package/dist/src/decision/DecisionEngine.d.ts +0 -4
  169. package/dist/src/decision/DecisionManager.d.ts +0 -1
  170. package/dist/src/decision/DecisionManager.js +2 -7
  171. package/dist/src/decision/DecisionPolicy.d.ts +0 -1
  172. package/dist/src/decision/DecisionPolicy.js +0 -1
  173. package/dist/src/decision/FactContinuations.d.ts +11 -43
  174. package/dist/src/decision/FactContinuations.js +126 -95
  175. package/dist/src/decision/FactServiceGate.d.ts +0 -1
  176. package/dist/src/decision/FactServiceGate.js +0 -4
  177. package/dist/src/decision/PreparedSteps.d.ts +0 -15
  178. package/dist/src/decision/PreparedSteps.js +1 -11
  179. package/dist/src/decision/applyToolMenu.d.ts +0 -1
  180. package/dist/src/decision/applyToolMenu.js +1 -5
  181. package/dist/src/decision/checks.d.ts +15 -28
  182. package/dist/src/decision/checks.js +118 -49
  183. package/dist/src/decision/facts.d.ts +0 -16
  184. package/dist/src/decision/facts.js +0 -30
  185. package/dist/src/decision/guidancePolicy.js +0 -1
  186. package/dist/src/decision/hostedPolicy.d.ts +0 -6
  187. package/dist/src/decision/hostedPolicy.js +0 -7
  188. package/dist/src/decision/hostedSkills.d.ts +0 -19
  189. package/dist/src/decision/hostedSkills.js +0 -19
  190. package/dist/src/decision/optimizationPolicy.d.ts +0 -3
  191. package/dist/src/decision/optimizationPolicy.js +1 -4
  192. package/dist/src/decision/providers/AndorraDecisionProvider.d.ts +0 -7
  193. package/dist/src/decision/providers/AndorraDecisionProvider.js +4 -27
  194. package/dist/src/decision/providers/HttpDecisionProvider.d.ts +0 -2
  195. package/dist/src/decision/providers/HttpDecisionProvider.js +0 -6
  196. package/dist/src/decision/routeTools.d.ts +0 -8
  197. package/dist/src/decision/routeTools.js +1 -8
  198. package/dist/src/decision/toolFamilies.d.ts +0 -1
  199. package/dist/src/decision/toolFamilies.js +0 -1
  200. package/dist/src/decision/toolMenu.d.ts +0 -3
  201. package/dist/src/decision/toolMenu.js +0 -4
  202. package/dist/src/decision/types.d.ts +0 -6
  203. package/dist/src/default-graph.d.ts +0 -9
  204. package/dist/src/default-graph.js +0 -9
  205. package/dist/src/delegation-changes.d.ts +0 -56
  206. package/dist/src/delegation-changes.js +15 -124
  207. package/dist/src/diff-preview.d.ts +1 -1
  208. package/dist/src/diff-preview.js +4 -12
  209. package/dist/src/duration.d.ts +0 -50
  210. package/dist/src/duration.js +0 -50
  211. package/dist/src/efficiency.d.ts +0 -39
  212. package/dist/src/efficiency.js +0 -16
  213. package/dist/src/engine/protocol.d.ts +0 -2
  214. package/dist/src/engine/protocol.js +0 -2
  215. package/dist/src/engine-streams.d.ts +13 -0
  216. package/dist/src/engine-streams.js +16 -0
  217. package/dist/src/extensions.d.ts +3 -2
  218. package/dist/src/extensions.js +76 -37
  219. package/dist/src/favicons.d.ts +0 -26
  220. package/dist/src/favicons.js +0 -34
  221. package/dist/src/file-diff.d.ts +2 -58
  222. package/dist/src/file-diff.js +0 -32
  223. package/dist/src/file-read-key.d.ts +1 -0
  224. package/dist/src/file-read-key.js +5 -0
  225. package/dist/src/file-read-state.d.ts +0 -1
  226. package/dist/src/file-read-state.js +0 -4
  227. package/dist/src/firefox-cookies.d.ts +0 -34
  228. package/dist/src/firefox-cookies.js +1 -55
  229. package/dist/src/git-identity-audit.d.ts +27 -0
  230. package/dist/src/git-identity-audit.js +286 -0
  231. package/dist/src/git-identity-guard.d.ts +4 -0
  232. package/dist/src/git-identity-guard.js +998 -0
  233. package/dist/src/git-identity-hold.d.ts +12 -0
  234. package/dist/src/git-identity-hold.js +81 -0
  235. package/dist/src/git-summary.d.ts +0 -58
  236. package/dist/src/git-summary.js +2 -212
  237. package/dist/src/goal-completion-verification.d.ts +2 -2
  238. package/dist/src/goal-completion-verification.js +3 -6
  239. package/dist/src/graph-account.d.ts +0 -21
  240. package/dist/src/graph-account.js +0 -17
  241. package/dist/src/graph-editor-session.d.ts +0 -1
  242. package/dist/src/graph-editor-session.js +1 -3
  243. package/dist/src/graph-health.d.ts +7 -49
  244. package/dist/src/graph-health.js +35 -46
  245. package/dist/src/graph-manager-chat.d.ts +27 -128
  246. package/dist/src/graph-manager-chat.js +36 -166
  247. package/dist/src/graph-provider-portability.d.ts +1 -21
  248. package/dist/src/graph-provider-portability.js +6 -45
  249. package/dist/src/graph-quota.d.ts +0 -33
  250. package/dist/src/graph-quota.js +1 -44
  251. package/dist/src/graph-runner.d.ts +0 -1
  252. package/dist/src/graph-runner.js +47 -387
  253. package/dist/src/graph-selection.d.ts +0 -14
  254. package/dist/src/graph-selection.js +0 -14
  255. package/dist/src/graph-server.d.ts +3 -11
  256. package/dist/src/graph-server.js +70 -111
  257. package/dist/src/graph-studio-features.d.ts +0 -5
  258. package/dist/src/graph-studio-features.js +2 -42
  259. package/dist/src/graph-sync.d.ts +0 -78
  260. package/dist/src/graph-sync.js +5 -201
  261. package/dist/src/graph-tool.d.ts +0 -18
  262. package/dist/src/graph-tool.js +0 -27
  263. package/dist/src/graph-ui/app.js +229 -498
  264. package/dist/src/graph-ui/compat.js +0 -7
  265. package/dist/src/graph-ui/controls.css +47 -43
  266. package/dist/src/graph-ui/controls.js +0 -88
  267. package/dist/src/graph-ui/drafts.js +0 -12
  268. package/dist/src/graph-ui/edge-router.js +0 -62
  269. package/dist/src/graph-ui/embed.js +0 -59
  270. package/dist/src/graph-ui/icons.js +2 -7
  271. package/dist/src/graph-ui/index.html +2 -2
  272. package/dist/src/graph-ui/library.css +0 -5
  273. package/dist/src/graph-ui/manager-markdown.js +0 -11
  274. package/dist/src/graph-ui/manager-state.js +110 -49
  275. package/dist/src/graph-ui/manager.css +2 -20
  276. package/dist/src/graph-ui/manager.js +251 -166
  277. package/dist/src/graph-ui/model-picker.js +250 -0
  278. package/dist/src/graph-ui/provider-glyphs/alibaba-cloud.png +0 -0
  279. package/dist/src/graph-ui/provider-glyphs/anthropic.png +0 -0
  280. package/dist/src/graph-ui/provider-glyphs/aws-bedrock.png +0 -0
  281. package/dist/src/graph-ui/provider-glyphs/claude.png +0 -0
  282. package/dist/src/graph-ui/provider-glyphs/deepseek.png +0 -0
  283. package/dist/src/graph-ui/provider-glyphs/fireworks.png +0 -0
  284. package/dist/src/graph-ui/provider-glyphs/kimi.png +0 -0
  285. package/dist/src/graph-ui/provider-glyphs/minimax.png +0 -0
  286. package/dist/src/graph-ui/provider-glyphs/openai.png +0 -0
  287. package/dist/src/graph-ui/provider-glyphs/opencode.png +0 -0
  288. package/dist/src/graph-ui/provider-glyphs/openrouter.png +0 -0
  289. package/dist/src/graph-ui/provider-glyphs/xai.png +0 -0
  290. package/dist/src/graph-ui/provider-glyphs/xiaomi-mimo.png +0 -0
  291. package/dist/src/graph-ui/provider-glyphs/zai.png +0 -0
  292. package/dist/src/graph-ui/sidebar.js +2 -3
  293. package/dist/src/graph-ui/skill-picker.js +373 -39
  294. package/dist/src/graph-ui/studio-canvas.js +3 -38
  295. package/dist/src/graph-ui/studio.css +0 -18
  296. package/dist/src/graph-ui/studio.js +3 -71
  297. package/dist/src/graph-ui/style.css +11 -134
  298. package/dist/src/graph-ui/theme.js +1 -26
  299. package/dist/src/graph-ui/tokens.css +15 -114
  300. package/dist/src/graphs.d.ts +7 -156
  301. package/dist/src/graphs.js +72 -273
  302. package/dist/src/grep-regex-worker.js +0 -2
  303. package/dist/src/grep-regex.d.ts +1 -5
  304. package/dist/src/grep-regex.js +6 -8
  305. package/dist/src/grok-provider.d.ts +0 -17
  306. package/dist/src/grok-provider.js +1 -26
  307. package/dist/src/handoffs.d.ts +0 -11
  308. package/dist/src/handoffs.js +0 -13
  309. package/dist/src/hardened-runtime.d.ts +0 -10
  310. package/dist/src/hardened-runtime.js +8 -46
  311. package/dist/src/harness-home.d.ts +21 -0
  312. package/dist/src/harness-home.js +87 -0
  313. package/dist/src/host-process-guard.d.ts +0 -50
  314. package/dist/src/host-process-guard.js +0 -641
  315. package/dist/src/limits.d.ts +0 -64
  316. package/dist/src/limits.js +0 -62
  317. package/dist/src/managed-sign-in.d.ts +0 -12
  318. package/dist/src/managed-sign-in.js +0 -16
  319. package/dist/src/markdown.d.ts +0 -28
  320. package/dist/src/markdown.js +1 -175
  321. package/dist/src/mcp.d.ts +21 -82
  322. package/dist/src/mcp.js +228 -237
  323. package/dist/src/membership-errors.d.ts +0 -14
  324. package/dist/src/membership-errors.js +0 -13
  325. package/dist/src/membership.d.ts +2 -60
  326. package/dist/src/membership.js +0 -85
  327. package/dist/src/memory/LocalToolMemory.d.ts +0 -1
  328. package/dist/src/memory/LocalToolMemory.js +2 -7
  329. package/dist/src/memory/MemoryDistiller.js +0 -15
  330. package/dist/src/memory/MemoryManager.d.ts +0 -3
  331. package/dist/src/memory/MemoryManager.js +6 -18
  332. package/dist/src/memory/MemoryPolicy.d.ts +0 -2
  333. package/dist/src/memory/MemoryPolicy.js +0 -2
  334. package/dist/src/memory/MemoryProvider.d.ts +0 -6
  335. package/dist/src/memory/MemoryRetriever.js +0 -7
  336. package/dist/src/memory/PermissionMemoryProvider.d.ts +0 -1
  337. package/dist/src/memory/PermissionMemoryProvider.js +0 -1
  338. package/dist/src/memory/ProjectMemory.d.ts +42 -0
  339. package/dist/src/memory/ProjectMemory.js +285 -0
  340. package/dist/src/memory/ToolFailureLessons.d.ts +0 -3
  341. package/dist/src/memory/ToolFailureLessons.js +0 -6
  342. package/dist/src/memory/index.d.ts +1 -0
  343. package/dist/src/memory/index.js +1 -0
  344. package/dist/src/memory/providers/NoOpMemoryProvider.d.ts +0 -1
  345. package/dist/src/memory/providers/NoOpMemoryProvider.js +0 -1
  346. package/dist/src/memory/redaction.d.ts +0 -5
  347. package/dist/src/memory/redaction.js +0 -11
  348. package/dist/src/memory/repository.d.ts +0 -6
  349. package/dist/src/memory/repository.js +2 -12
  350. package/dist/src/memory/types.d.ts +0 -1
  351. package/dist/src/model-health-cache.d.ts +0 -38
  352. package/dist/src/model-health-cache.js +1 -49
  353. package/dist/src/model-metadata.d.ts +0 -18
  354. package/dist/src/model-metadata.js +2 -42
  355. package/dist/src/model-override.d.ts +0 -36
  356. package/dist/src/model-override.js +0 -43
  357. package/dist/src/model-tiers.d.ts +0 -13
  358. package/dist/src/model-tiers.js +0 -23
  359. package/dist/src/opencode-catalog.d.ts +0 -2
  360. package/dist/src/opencode-catalog.js +0 -11
  361. package/dist/src/opencode-cli-provider.d.ts +0 -35
  362. package/dist/src/opencode-cli-provider.js +1 -44
  363. package/dist/src/opencode-provider.d.ts +0 -2
  364. package/dist/src/opencode-provider.js +6 -22
  365. package/dist/src/package-name.d.ts +1 -0
  366. package/dist/src/package-name.js +1 -0
  367. package/dist/src/paged-transcript.d.ts +0 -11
  368. package/dist/src/paged-transcript.js +2 -20
  369. package/dist/src/palette.d.ts +0 -63
  370. package/dist/src/palette.js +0 -63
  371. package/dist/src/permissions.d.ts +0 -15
  372. package/dist/src/permissions.js +0 -17
  373. package/dist/src/powershell-pool.d.ts +0 -9
  374. package/dist/src/powershell-pool.js +3 -26
  375. package/dist/src/process-warnings.d.ts +4 -0
  376. package/dist/src/process-warnings.js +103 -0
  377. package/dist/src/profile.d.ts +0 -43
  378. package/dist/src/profile.js +0 -43
  379. package/dist/src/project-reservation.d.ts +11 -0
  380. package/dist/src/project-reservation.js +143 -0
  381. package/dist/src/provider-connection.d.ts +0 -18
  382. package/dist/src/provider-connection.js +0 -39
  383. package/dist/src/provider-engine.d.ts +0 -21
  384. package/dist/src/provider-engine.js +3 -98
  385. package/dist/src/provider-import.d.ts +0 -49
  386. package/dist/src/provider-import.js +0 -60
  387. package/dist/src/provider-keys.d.ts +1 -36
  388. package/dist/src/provider-keys.js +5 -48
  389. package/dist/src/provider-settings.d.ts +0 -2
  390. package/dist/src/provider-settings.js +0 -32
  391. package/dist/src/providers.d.ts +0 -217
  392. package/dist/src/providers.js +0 -315
  393. package/dist/src/pull-requests.d.ts +0 -173
  394. package/dist/src/pull-requests.js +5 -195
  395. package/dist/src/qa/browser/PlaywrightRunner.d.ts +0 -7
  396. package/dist/src/qa/browser/PlaywrightRunner.js +2 -16
  397. package/dist/src/qa/command-policy.d.ts +0 -23
  398. package/dist/src/qa/command-policy.js +0 -30
  399. package/dist/src/qa/guidance.d.ts +0 -21
  400. package/dist/src/qa/guidance.js +0 -20
  401. package/dist/src/qa/profile/ProjectInspector.d.ts +0 -4
  402. package/dist/src/qa/profile/ProjectInspector.js +0 -6
  403. package/dist/src/qa/profile/QaConfigLoader.d.ts +0 -7
  404. package/dist/src/qa/profile/QaConfigLoader.js +0 -6
  405. package/dist/src/qa/profile/QaProfile.d.ts +0 -7
  406. package/dist/src/qa/profile/QaProfile.js +0 -7
  407. package/dist/src/qa/profile/yaml.d.ts +0 -9
  408. package/dist/src/qa/profile/yaml.js +0 -13
  409. package/dist/src/qa/qa-authorize.d.ts +0 -19
  410. package/dist/src/qa/qa-authorize.js +4 -11
  411. package/dist/src/qa/runtime/ProcessManager.d.ts +0 -31
  412. package/dist/src/qa/runtime/ProcessManager.js +4 -41
  413. package/dist/src/qa/runtime/PtyManager.d.ts +0 -4
  414. package/dist/src/qa/runtime/PtyManager.js +2 -7
  415. package/dist/src/qa/runtime/changes.d.ts +0 -11
  416. package/dist/src/qa/runtime/changes.js +1 -3
  417. package/dist/src/qa/tools.d.ts +0 -10
  418. package/dist/src/qa/tools.js +0 -12
  419. package/dist/src/qa/types.d.ts +0 -13
  420. package/dist/src/react-runtime.d.ts +2 -21
  421. package/dist/src/react-runtime.js +106 -418
  422. package/dist/src/read-document-doc.d.ts +0 -6
  423. package/dist/src/read-document-doc.js +0 -55
  424. package/dist/src/read-document-docx.d.ts +0 -16
  425. package/dist/src/read-document-docx.js +2 -69
  426. package/dist/src/read-document-text.d.ts +0 -17
  427. package/dist/src/read-document-text.js +0 -22
  428. package/dist/src/read-document-tool.d.ts +0 -31
  429. package/dist/src/read-document-tool.js +0 -30
  430. package/dist/src/read-document.d.ts +0 -49
  431. package/dist/src/read-document.js +1 -67
  432. package/dist/src/read-image.d.ts +0 -32
  433. package/dist/src/read-image.js +0 -33
  434. package/dist/src/remote/cert.d.ts +1 -19
  435. package/dist/src/remote/cert.js +2 -51
  436. package/dist/src/remote/client.d.ts +0 -70
  437. package/dist/src/remote/client.js +2 -117
  438. package/dist/src/remote/command.js +0 -17
  439. package/dist/src/remote/engine-pool.d.ts +0 -152
  440. package/dist/src/remote/engine-pool.js +17 -335
  441. package/dist/src/remote/errors.d.ts +0 -15
  442. package/dist/src/remote/errors.js +0 -7
  443. package/dist/src/remote/network.d.ts +0 -26
  444. package/dist/src/remote/network.js +1 -34
  445. package/dist/src/remote/pairing.d.ts +16 -51
  446. package/dist/src/remote/pairing.js +50 -57
  447. package/dist/src/remote/pem.d.ts +2 -0
  448. package/dist/src/remote/pem.js +7 -0
  449. package/dist/src/remote/roots.d.ts +0 -20
  450. package/dist/src/remote/roots.js +0 -8
  451. package/dist/src/remote/serve.d.ts +0 -47
  452. package/dist/src/remote/serve.js +0 -30
  453. package/dist/src/remote/server.d.ts +0 -14
  454. package/dist/src/remote/server.js +1 -79
  455. package/dist/src/remote/types.d.ts +1 -32
  456. package/dist/src/remote/types.js +0 -10
  457. package/dist/src/run-control.d.ts +0 -7
  458. package/dist/src/run-control.js +0 -7
  459. package/dist/src/run-progress.d.ts +0 -170
  460. package/dist/src/run-progress.js +0 -285
  461. package/dist/src/run-records.d.ts +0 -443
  462. package/dist/src/run-records.js +44 -678
  463. package/dist/src/run-temp.d.ts +12 -0
  464. package/dist/src/run-temp.js +50 -0
  465. package/dist/src/runtime.d.ts +11 -227
  466. package/dist/src/runtime.js +0 -127
  467. package/dist/src/sandbox-child.js +0 -1
  468. package/dist/src/save-lock.d.ts +0 -12
  469. package/dist/src/save-lock.js +0 -28
  470. package/dist/src/screen-selection.d.ts +0 -23
  471. package/dist/src/screen-selection.js +0 -22
  472. package/dist/src/secret-redaction.d.ts +0 -12
  473. package/dist/src/secret-redaction.js +0 -45
  474. package/dist/src/session-changes.d.ts +4 -80
  475. package/dist/src/session-changes.js +25 -130
  476. package/dist/src/session-goal.d.ts +129 -0
  477. package/dist/src/session-goal.js +230 -0
  478. package/dist/src/session-monitor.d.ts +1 -10
  479. package/dist/src/session-monitor.js +2 -39
  480. package/dist/src/session-reaper.d.ts +0 -15
  481. package/dist/src/session-reaper.js +0 -14
  482. package/dist/src/session-skills.d.ts +15 -44
  483. package/dist/src/session-skills.js +75 -60
  484. package/dist/src/session-summary.d.ts +0 -26
  485. package/dist/src/session-summary.js +0 -32
  486. package/dist/src/session-title.d.ts +0 -1
  487. package/dist/src/session-title.js +0 -2
  488. package/dist/src/sessions.d.ts +2 -120
  489. package/dist/src/sessions.js +9 -178
  490. package/dist/src/shell.d.ts +3 -20
  491. package/dist/src/shell.js +8 -72
  492. package/dist/src/side-panel.d.ts +5 -99
  493. package/dist/src/side-panel.js +76 -133
  494. package/dist/src/sign-in-detection.d.ts +43 -0
  495. package/dist/src/sign-in-detection.js +154 -0
  496. package/dist/src/sign-in-offer.d.ts +17 -0
  497. package/dist/src/sign-in-offer.js +103 -0
  498. package/dist/src/skill-commands.d.ts +0 -1
  499. package/dist/src/skill-commands.js +1 -4
  500. package/dist/src/skills/bundled/control-browser/SKILL.md +1 -1
  501. package/dist/src/skills/bundled/graph-manager/SKILL.md +22 -4
  502. package/dist/src/skills/bundled/provenance.json +2 -2
  503. package/dist/src/skills/invocable-skills.d.ts +0 -18
  504. package/dist/src/skills/invocable-skills.js +0 -17
  505. package/dist/src/skills/project-skills.d.ts +0 -1
  506. package/dist/src/skills/project-skills.js +0 -3
  507. package/dist/src/skills/prompt-skills.js +0 -14
  508. package/dist/src/skills/runtime-skills.d.ts +1 -8
  509. package/dist/src/skills/runtime-skills.js +8 -32
  510. package/dist/src/stall-recovery.d.ts +0 -25
  511. package/dist/src/stall-recovery.js +0 -38
  512. package/dist/src/stray-files.d.ts +5 -0
  513. package/dist/src/stray-files.js +65 -0
  514. package/dist/src/structured-step.d.ts +0 -22
  515. package/dist/src/structured-step.js +0 -22
  516. package/dist/src/subagent-run.d.ts +0 -163
  517. package/dist/src/subagent-run.js +10 -374
  518. package/dist/src/subagent-tree.d.ts +32 -0
  519. package/dist/src/subagent-tree.js +128 -0
  520. package/dist/src/telemetry/aggregate.d.ts +0 -37
  521. package/dist/src/telemetry/aggregate.js +0 -40
  522. package/dist/src/telemetry/capture-core.d.ts +0 -87
  523. package/dist/src/telemetry/capture-core.js +0 -67
  524. package/dist/src/telemetry/capture.d.ts +0 -1
  525. package/dist/src/telemetry/capture.js +0 -3
  526. package/dist/src/telemetry/classify.d.ts +0 -58
  527. package/dist/src/telemetry/classify.js +0 -60
  528. package/dist/src/telemetry/decision-capture.d.ts +0 -1
  529. package/dist/src/telemetry/emitter.d.ts +0 -30
  530. package/dist/src/telemetry/emitter.js +1 -62
  531. package/dist/src/telemetry/gate.d.ts +0 -29
  532. package/dist/src/telemetry/gate.js +0 -22
  533. package/dist/src/telemetry/identity.d.ts +0 -13
  534. package/dist/src/telemetry/identity.js +0 -29
  535. package/dist/src/telemetry/outbox.d.ts +0 -64
  536. package/dist/src/telemetry/outbox.js +1 -108
  537. package/dist/src/telemetry/schema.d.ts +1 -49
  538. package/dist/src/telemetry/schema.js +1 -82
  539. package/dist/src/telemetry/state.d.ts +0 -53
  540. package/dist/src/telemetry/state.js +0 -64
  541. package/dist/src/telemetry/surface.d.ts +0 -31
  542. package/dist/src/telemetry/surface.js +1 -39
  543. package/dist/src/telemetry/uploader.d.ts +0 -11
  544. package/dist/src/telemetry/uploader.js +0 -46
  545. package/dist/src/telemetry/uploads.d.ts +0 -11
  546. package/dist/src/telemetry/uploads.js +0 -11
  547. package/dist/src/telemetry/version.d.ts +0 -4
  548. package/dist/src/telemetry/version.js +0 -14
  549. package/dist/src/telemetry/workspace.d.ts +0 -7
  550. package/dist/src/telemetry/workspace.js +1 -22
  551. package/dist/src/terminal-ui.d.ts +15 -524
  552. package/dist/src/terminal-ui.js +80 -876
  553. package/dist/src/test-edit-guard.d.ts +74 -0
  554. package/dist/src/test-edit-guard.js +269 -0
  555. package/dist/src/text.d.ts +0 -1
  556. package/dist/src/text.js +0 -1
  557. package/dist/src/time-limit.d.ts +0 -36
  558. package/dist/src/time-limit.js +0 -37
  559. package/dist/src/timers.d.ts +0 -161
  560. package/dist/src/timers.js +0 -126
  561. package/dist/src/todos.d.ts +0 -1
  562. package/dist/src/todos.js +0 -3
  563. package/dist/src/token-rate.d.ts +0 -94
  564. package/dist/src/token-rate.js +0 -154
  565. package/dist/src/tool-activity.d.ts +0 -6
  566. package/dist/src/tool-activity.js +1 -8
  567. package/dist/src/tool-availability.d.ts +0 -13
  568. package/dist/src/tool-availability.js +1 -14
  569. package/dist/src/tool-call-clock.d.ts +1 -4
  570. package/dist/src/tool-call-clock.js +0 -13
  571. package/dist/src/tool-catalog.d.ts +0 -11
  572. package/dist/src/tool-catalog.js +0 -23
  573. package/dist/src/tool-dependencies.d.ts +0 -5
  574. package/dist/src/tool-dependencies.js +0 -4
  575. package/dist/src/tool-diff-stats.d.ts +0 -23
  576. package/dist/src/tool-diff-stats.js +0 -49
  577. package/dist/src/tool-errors.d.ts +9 -7
  578. package/dist/src/tool-errors.js +13 -6
  579. package/dist/src/tool-failure-tracker.d.ts +3 -11
  580. package/dist/src/tool-failure-tracker.js +19 -27
  581. package/dist/src/tool-names.d.ts +0 -16
  582. package/dist/src/tool-names.js +0 -12
  583. package/dist/src/tool-profile.d.ts +6 -0
  584. package/dist/src/tool-profile.js +23 -0
  585. package/dist/src/tool-result-filter.d.ts +0 -19
  586. package/dist/src/tool-result-filter.js +1 -66
  587. package/dist/src/tool-schema-compatibility.d.ts +1 -2
  588. package/dist/src/tool-schema-compatibility.js +2 -7
  589. package/dist/src/tools.d.ts +0 -4
  590. package/dist/src/tools.js +11 -114
  591. package/dist/src/trajectory.d.ts +0 -13
  592. package/dist/src/trajectory.js +23 -79
  593. package/dist/src/transcript.d.ts +1 -37
  594. package/dist/src/transcript.js +11 -61
  595. package/dist/src/types.d.ts +2 -167
  596. package/dist/src/untracked-file-removal.d.ts +3 -0
  597. package/dist/src/untracked-file-removal.js +105 -0
  598. package/dist/src/update-check.d.ts +0 -14
  599. package/dist/src/update-check.js +2 -16
  600. package/dist/src/update.d.ts +4 -29
  601. package/dist/src/update.js +20 -98
  602. package/dist/src/usage-analytics.d.ts +17 -17
  603. package/dist/src/usage-analytics.js +168 -209
  604. package/dist/src/web-search.d.ts +0 -23
  605. package/dist/src/web-search.js +1 -27
  606. package/dist/src/widgets.d.ts +0 -25
  607. package/dist/src/widgets.js +0 -24
  608. package/dist/src/workspace-facts.d.ts +0 -12
  609. package/dist/src/workspace-facts.js +1 -18
  610. package/dist/src/workspace-git-metadata.d.ts +4 -5
  611. package/dist/src/workspace-git-metadata.js +37 -9
  612. package/dist/src/workspace-instructions.d.ts +3 -15
  613. package/dist/src/workspace-instructions.js +7 -20
  614. package/package.json +2 -2
@@ -1,27 +1,16 @@
1
- /* Orthogonal visibility-grid routing in graph coordinates, drawn with rounded elbows; no DOM dependencies. */
2
1
  'use strict';
3
2
  globalThis.AndorraEdgeRouter = (() => {
4
3
  const clear = (a, b, boxes) => !boxes.some(r => a.x === b.x
5
4
  ? a.x > r.x && a.x < r.x + r.width && Math.max(a.y,b.y) > r.y && Math.min(a.y,b.y) < r.y+r.height
6
5
  : a.y > r.y && a.y < r.y+r.height && Math.max(a.x,b.x) > r.x && Math.min(a.x,b.x) < r.x+r.width);
7
- // Two connections closer than this read as one line: the stroke and its halo are about 6px wide.
8
- // It matches the 8px between neighbouring lanes, which therefore still count as apart.
9
6
  const GAP = 8;
10
- // How far a crowded row or shaft is moved, and how many times, before the next corridor is tried.
11
7
  const NUDGE = 10, NUDGES = 4;
12
- /** Whether two orthogonal segments run along (almost) the same line and share a stretch of it. */
13
8
  function collinear(a, b, c, d) {
14
9
  const shared = (p, q, r, s) => Math.min(Math.max(p,q),Math.max(r,s)) - Math.max(Math.min(p,q),Math.min(r,s)) > 0;
15
10
  if (a.y === b.y && c.y === d.y && a.x !== b.x && c.x !== d.x) return Math.abs(a.y-c.y) < GAP && shared(a.x,b.x,c.x,d.x);
16
11
  if (a.x === b.x && c.x === d.x && a.y !== b.y && c.y !== d.y) return Math.abs(a.x-c.x) < GAP && shared(a.y,b.y,c.y,d.y);
17
12
  return false;
18
13
  }
19
- /**
20
- * The segments of the routes drawn so far, filed by the line they run along, so a check looks only
21
- * at the few segments near one line. Each entry remembers whether it is its route's final run and
22
- * where that route ends: two routes into the same input port necessarily meet on the last stretch
23
- * before its arrowhead, so those final runs may coincide; everywhere else routes keep apart.
24
- */
25
14
  function lineIndex(occupied) {
26
15
  const rows = new Map(), columns = new Map();
27
16
  for (const route of occupied) for (let i = 1; i < route.length; i++) {
@@ -33,7 +22,6 @@ globalThis.AndorraEdgeRouter = (() => {
33
22
  }
34
23
  return { rows, columns, empty: !occupied.length };
35
24
  }
36
- /** Whether segment a-b runs along a drawn segment; `final` and `end` describe a-b the same way. */
37
25
  function along(index, a, b, final = false, end = undefined) {
38
26
  if (index.empty || (a.x === b.x && a.y === b.y)) return false;
39
27
  const table = a.y === b.y ? index.rows : index.columns, bucket = Math.floor((a.y === b.y ? a.y : a.x) / GAP);
@@ -43,20 +31,13 @@ globalThis.AndorraEdgeRouter = (() => {
43
31
  }
44
32
  return false;
45
33
  }
46
- /** Whether a route (source to target) would draw over one of the routes indexed in `index`. */
47
34
  function crowdsIndex(points, index) {
48
35
  if (index.empty) return false;
49
36
  const end = points.at(-1);
50
37
  for (let i = 1; i < points.length; i++) if (along(index, points[i-1], points[i], i === points.length - 1, end)) return true;
51
38
  return false;
52
39
  }
53
- /** Whether a route would draw over any of the `occupied` routes. */
54
40
  const crowds = (points, occupied) => crowdsIndex(points, lineIndex(occupied));
55
- /**
56
- * Routes one connection from an output port (`source`) to an input port (`target`) around the cards.
57
- * `lane` separates connections that share corridors; `occupied` lists the routes already drawn, in
58
- * a stable order, and a corridor that would draw over one of them is moved aside when it can be.
59
- */
60
41
  function routeEdge(source, target, rectangles, lane = 0, padding = 12, occupied = []) {
61
42
  const escape = padding + 2, start = {x:source.x+escape,y:source.y}, end = {x:target.x-escape,y:target.y};
62
43
  const boxes = rectangles.map(r => ({x:r.x-padding,y:r.y-padding,width:r.width+padding*2,height:r.height+padding*2}));
@@ -70,21 +51,8 @@ globalThis.AndorraEdgeRouter = (() => {
70
51
  const finish = points => simplify([source,...points,target]);
71
52
  const clearOfCards = points => points.every((p,i)=>!i||clear(points[i-1],p,boxes));
72
53
  const index = lineIndex(occupied);
73
- // 'ok' draws; 'crowded' clears every card but lies on a connection already drawn; 'blocked' crosses a card.
74
54
  const verdict = points => !clearOfCards(points) ? 'blocked' : crowdsIndex(finish(points), index) ? 'crowded' : 'ok';
75
- // The row `k` steps aside: rows above every endpoint move up, rows below move down, and a row
76
- // between them tries both.
77
55
  const rowNudges = (y, k) => (y <= Math.min(start.y,end.y) ? [-1] : y >= Math.max(start.y,end.y) ? [1] : [1,-1]).map(way=>y+way*NUDGE*k);
78
- /**
79
- * The first variant of a corridor that clears every card and every connection drawn before it.
80
- * `build(row, dx)` draws the corridor along `row` with its shafts moved `dx` outward. Only a
81
- * corridor that clears the cards and lies on another connection is moved aside; one that crosses
82
- * a card is left to the next corridor, as it always was, which keeps a dense graph fast and a
83
- * lone connection routed exactly as before.
84
- */
85
- // The first corridor that cleared the cards but lay on another connection. When no corridor is
86
- // free of both, it is the route, as it was before routes kept apart: falling through to the grid
87
- // search instead costs far more on a dense graph and finds no better line.
88
56
  let crowdedFallback;
89
57
  const corridor = (build, row) => {
90
58
  const base = build(row, 0), first = verdict(base);
@@ -98,20 +66,9 @@ globalThis.AndorraEdgeRouter = (() => {
98
66
  crowdedFallback ??= finish(base);
99
67
  return undefined;
100
68
  };
101
- // Most editor layouts have open rows or columns. Check these bounded,
102
- // inexpensive candidates before building a visibility-grid search.
103
69
  const middleX=(start.x+end.x)/2, middleY=(start.y+end.y)/2;
104
- // Candidate rows span the whole layout, so an outer row derived from the
105
- // global extremes detours across the canvas as soon as one card sits far
106
- // outside the cards this edge involves. Try the nearest rows only: scanning
107
- // every row costs quadratic time in a dense graph, and the visibility
108
- // search below covers the rest of the layout.
109
70
  const rowsByDistance=[...new Set([middleY,...ys])].sort((a,b)=>Math.abs(a-start.y)+Math.abs(a-end.y)-Math.abs(b-start.y)-Math.abs(b-end.y));
110
71
  const rowCandidates=rowsByDistance.slice(0,12);
111
- // Return edges often share a destination. Give each lane its own shafts so
112
- // overlapping lines do not look like a branch. Keep the normal endpoints: a
113
- // crowded layout may block these wider corridors, in which case the
114
- // existing obstacle-aware search takes over.
115
72
  if (target.x <= source.x) {
116
73
  const offset=(lane+1)*8;
117
74
  for (const y of rowCandidates) {
@@ -124,10 +81,6 @@ globalThis.AndorraEdgeRouter = (() => {
124
81
  [(row)=>[start,{x:start.x,y:row},{x:end.x,y:row},end],middleY],
125
82
  ...rowCandidates.map(y=>[(row)=>[start,{x:start.x,y:row},{x:end.x,y:row},end],y]),
126
83
  ]){const found=corridor(build,row);if(found)return found;}
127
- // Find a clear shaft beside each endpoint, then use the nearest clear rows.
128
- // Endpoint rows cannot cross their own cards, hence right/left constraints.
129
- // These wider corridors have no lane offset, so a blocked lane shaft still
130
- // returns beside the cards instead of following the layout's extremes.
131
84
  const right=xs.filter(x=>x>=start.x&&clear(start,{x,y:start.y},boxes)).sort((a,b)=>a-b);
132
85
  const left=xs.filter(x=>x<=end.x&&clear({x,y:end.y},end,boxes)).sort((a,b)=>b-a);
133
86
  for(const y of rowCandidates){
@@ -142,8 +95,6 @@ globalThis.AndorraEdgeRouter = (() => {
142
95
  function pop(){const first=heap[0],last=heap.pop();if(heap.length){let i=0;while(i*2+1<heap.length){let j=i*2+1;if(j+1<heap.length&&heap[j+1].score<heap[j].score)j++;if(heap[j].score>=last.score)break;heap[i]=heap[j];i=j;}heap[i]=last;}return first;}
143
96
  const initial={x:xs.indexOf(start.x),y:ys.indexOf(start.y),dir:0,cost:0,parent:null};
144
97
  const costs=new Map([[key(initial.x,initial.y,0),0]]), visibility=new Map();
145
- // The grid search is the last resort for a card-crowded layout and ignores the routes drawn
146
- // before it: weighting their lines made it expand many times as far on a dense graph.
147
98
  push({...initial,score:heuristic(initial.x,initial.y)});
148
99
  let result;
149
100
  let expanded=0;
@@ -159,21 +110,12 @@ globalThis.AndorraEdgeRouter = (() => {
159
110
  }
160
111
  }
161
112
  if(!result && padding > 0)return routeEdge(source,target,rectangles,lane,0,occupied);
162
- // Overlapping nodes can enclose a port completely. Keep such edges visible
163
- // so users can select them and move the overlapping cards apart.
164
113
  let points;
165
114
  if(result){points=[];for(let item=result;item;item=item.parent)points.push({x:xs[item.x],y:ys[item.y]});points.reverse();}
166
115
  else {const y=Math.min(source.y,target.y,...rectangles.map(r=>r.y))-30-lane*8;points=[start,{x:start.x,y},{x:end.x,y},end];}
167
116
  points=[source,...points,target];
168
117
  return simplify(points);
169
118
  }
170
- /**
171
- * Routes every connection of a graph in the order given, each one kept off the routes before it,
172
- * so parallel connections never draw on top of each other. The order is the graph's own (its
173
- * edge list), never the drawing order, so selecting a connection does not move any route.
174
- * Each entry is `{source, target}` or null for a connection that cannot be drawn; the result
175
- * keeps those positions.
176
- */
177
119
  function routeEdges(entries, rectangles) {
178
120
  const occupied=[];
179
121
  return entries.map((entry,index)=>{
@@ -184,8 +126,6 @@ globalThis.AndorraEdgeRouter = (() => {
184
126
  });
185
127
  }
186
128
  function path(points){return points.map((p,i)=>`${i?'L':'M'} ${p.x} ${p.y}`).join(' ');}
187
- // The route stays orthogonal, so it still clears every card, but each elbow is drawn as a quarter
188
- // curve. The radius shrinks on short segments so two neighbouring corners never overlap.
189
129
  function roundedPath(points,radius=10){
190
130
  if(points.length<3)return path(points);
191
131
  const round=value=>Math.round(value*100)/100;
@@ -202,8 +142,6 @@ globalThis.AndorraEdgeRouter = (() => {
202
142
  const last=points.at(-1);
203
143
  return d+` L ${last.x} ${last.y}`;
204
144
  }
205
- // Where an outcome's pill sits: the middle of the route's longest horizontal run, the stretch of
206
- // line least likely to sit under a card.
207
145
  function labelPoint(points){
208
146
  let best=null,length=-1;
209
147
  for(let i=1;i<points.length;i++){
@@ -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);
@@ -18,6 +18,8 @@ globalThis.AndorraIcons = (() => {
18
18
  const GLYPHS = {
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
+ 'chevron-down': '<path d="m6 9 6 6 6-6"/>',
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"/>',
21
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"/>',
22
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"/>',
23
25
  redo: '<path d="m15 14 5-5-5-5"/><path d="M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13"/>',
@@ -48,7 +50,6 @@ globalThis.AndorraIcons = (() => {
48
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"/>',
49
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"/>',
50
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"/>',
51
- // Node types.
52
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"/>',
53
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"/>',
54
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"/>',
@@ -57,12 +58,10 @@ globalThis.AndorraIcons = (() => {
57
58
  terminal: '<polyline points="4 17 10 11 4 5"/><line x1="12" x2="20" y1="19" y2="19"/>',
58
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"/>',
59
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"/>',
60
- // The empty states' marks: a list with no match, and no graph open (Lucide's "workflow" glyph).
61
61
  search: '<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>',
62
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"/>',
63
63
  };
64
64
 
65
- /** The glyph a node type is drawn with. */
66
65
  const NODE_ICONS = {
67
66
  agent: 'bot', orchestrator: 'compass', join: 'merge', parallel: 'fork', condition: 'fork',
68
67
  loop: 'repeat', action: 'terminal', approval: 'approval', end: 'flag',
@@ -70,7 +69,6 @@ globalThis.AndorraIcons = (() => {
70
69
 
71
70
  const SVG = 'http://www.w3.org/2000/svg';
72
71
  const shapes = new Map();
73
- /** The table's markup as element descriptions, parsed once per glyph. */
74
72
  function parts(name) {
75
73
  if (!shapes.has(name)) {
76
74
  const markup = GLYPHS[name] || '';
@@ -80,7 +78,6 @@ globalThis.AndorraIcons = (() => {
80
78
  return shapes.get(name);
81
79
  }
82
80
 
83
- /** A decorative 16px icon, hidden from assistive technology: its control carries the name. */
84
81
  function icon(name, size = 16) {
85
82
  if (!Object.hasOwn(GLYPHS, name) || typeof document === 'undefined' || typeof document.createElementNS !== 'function') return null;
86
83
  const svg = document.createElementNS(SVG, 'svg');
@@ -97,14 +94,12 @@ globalThis.AndorraIcons = (() => {
97
94
  return svg;
98
95
  }
99
96
 
100
- /** Put an icon at the start of a control, keeping whatever label it already carries. */
101
97
  function prepend(target, name, size) {
102
98
  const glyph = icon(name, size);
103
99
  if (glyph && target && typeof target.prepend === 'function') target.prepend(glyph);
104
100
  return glyph;
105
101
  }
106
102
 
107
- /** Fill every `[data-icon]` control the page's own markup declares. */
108
103
  function hydrate(root = typeof document !== 'undefined' ? document : undefined) {
109
104
  if (!root || typeof root.querySelectorAll !== 'function') return;
110
105
  for (const target of root.querySelectorAll('[data-icon]')) {
@@ -3,5 +3,5 @@
3
3
  <head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Graph Editor · Andorra Code</title><link rel="icon" type="image/png" href="/andorra-logo.png"><link rel="stylesheet" href="/tokens.css"><link rel="stylesheet" href="/style.css"><link rel="stylesheet" href="/library.css"><link rel="stylesheet" href="/studio.css"><link rel="stylesheet" href="/controls.css"><link rel="stylesheet" href="/manager.css"><script src="/theme.js"></script></head>
4
4
  <body>
5
5
  <aside class="rail" id="library-rail"><div id="rail-resize" role="separator" aria-label="Resize library sidebar" aria-orientation="vertical" aria-controls="library-rail" tabindex="0"></div><div class="rail-caption" aria-hidden="true"></div><div class="rail-body" tabindex="0" aria-label="Graph and step library"><div class="section-label">Your graphs <button id="new-graph" aria-label="Create graph" title="Create graph" data-icon="plus"></button></div><div class="rail-search"><input id="search" type="search" placeholder="Find a graph" aria-label="Find a graph"></div><nav id="graphs" aria-label="Graphs" tabindex="0"></nav><div class="section-label library-label">Step library</div><div class="rail-search"><input id="node-search" type="search" placeholder="Search steps…" aria-label="Search steps"></div><nav id="node-library" aria-label="Step library"></nav><p class="hint">Drag a step onto the canvas, or select it and press Enter to add it. Connect each outcome to one or more destinations.</p></div><footer class="rail-footer">Your account <span id="sync-status" role="status">Saved locally; cloud sync pending</span></footer></aside>
6
- <main><header class="chrome"><div id="host-chrome" class="host-chrome" hidden></div><div class="graph-heading"><strong id="graph-title">Graph Editor</strong><span id="revision">Loading graphs…</span><span id="host-notice" class="chip chip-accent" role="status" hidden></span></div><div class="chrome-actions" id="chrome-actions"><button id="toggle-inspector" class="icon-button" aria-expanded="true" aria-label="Inspector" title="Show or hide the inspector" data-icon="panel-right"></button><div class="menu" id="more-wrap"><button id="more" class="icon-button" aria-haspopup="menu" aria-expanded="false" aria-controls="more-menu" aria-label="More actions" title="More actions" data-icon="more"></button><div id="more-menu" class="menu-list" role="menu" aria-label="More actions" hidden><button id="duplicate" type="button" role="menuitem" data-icon="copy">Duplicate</button></div></div><div class="manager-anchor" hidden><button id="graph-manager" class="btn-small studio-secondary" type="button" aria-label="Graph Manager" aria-expanded="false" aria-controls="manager-panel" title="Build or change this graph with Graph Manager" data-icon="bot" hidden><span>Graph Manager</span></button><div id="manager-tip" class="manager-tip" role="note" hidden><span>Let Graph Manager build this graph with you.</span><button id="manager-tip-close" type="button" class="icon-button" aria-label="Dismiss" title="Dismiss" data-icon="x"></button></div></div><button id="save" class="primary btn-small">Save</button></div></header><div class="workspace"><section id="canvas" aria-label="Graph canvas"><div id="scene"><svg id="edges" aria-label="Graph connections"></svg><div id="nodes"></div></div><div id="empty"><div class="empty-state"><span class="empty-state-icon" data-icon="graph"></span><p class="empty-state-title">No graph open</p><p class="empty-state-line">Create a graph to get started.</p><div class="empty-state-action"><button id="empty-create" type="button" class="primary btn-small">Create Graph</button></div></div></div><div id="canvas-hint" class="canvas-hint" role="note"><span id="canvas-hint-text">Drag or scroll to pan · Pinch or Ctrl/Cmd+scroll to zoom</span><button id="canvas-hint-close" type="button" class="icon-button" aria-label="Dismiss canvas tips" title="Dismiss" data-icon="x"></button></div><div class="canvas-toolbar" role="toolbar" aria-label="Canvas controls"><button id="undo" aria-label="Undo" title="Undo (Ctrl/Cmd+Z)" data-icon="undo"></button><button id="redo" aria-label="Redo" title="Redo (Ctrl/Cmd+Y)" data-icon="redo"></button><span class="toolbar-divider" aria-hidden="true"></span><button id="zoom-out" aria-label="Zoom out" title="Zoom out" data-icon="zoom-out"></button><output id="zoom" aria-label="Zoom level">100%</output><button id="zoom-in" aria-label="Zoom in" title="Zoom in" data-icon="zoom-in"></button><button id="fit" aria-label="Fit graph" title="Fit graph" data-icon="fit"></button><button id="layout" aria-label="Arrange" title="Arrange steps" data-icon="arrange"></button></div></section><aside id="inspector"><div id="resize" role="separator" aria-label="Resize inspector" aria-orientation="vertical" tabindex="0"></div><header class="panel-header"><strong id="inspector-title">Graph settings</strong><button id="graph-settings" class="btn-small" title="Show the graph's own settings">Graph Settings</button></header><div id="inspector-body"></div></aside><aside id="manager-panel" aria-label="Graph Manager" hidden><div id="manager-resize" role="separator" aria-label="Resize Graph Manager" aria-orientation="vertical" tabindex="0"></div><header class="panel-header"><strong>Graph Manager</strong><span class="manager-header-actions"><button id="manager-new-chat" type="button" class="btn-small" title="Start a new conversation. The current one stays in your history.">New Chat</button><button id="manager-close" type="button" class="icon-button" aria-label="Close Graph Manager" title="Close" data-icon="x"></button></span></header><div class="manager-models"><select id="manager-provider" aria-label="Graph Manager provider"></select><select id="manager-model" aria-label="Graph Manager model"></select></div><div id="manager-notices"></div><div id="manager-transcript" role="log" aria-label="Graph Manager conversation" tabindex="0"></div><footer class="manager-composer"><textarea id="manager-input" rows="3" placeholder="Ask Graph Manager to build or change this graph" aria-label="Message Graph Manager"></textarea><div class="manager-composer-actions"><span id="manager-run-state" role="status"></span><button id="manager-stop" type="button" class="btn-small" hidden>Stop</button><button id="manager-send" type="button" class="primary btn-small">Send</button></div></footer></aside></div><footer class="status"><span id="status" role="status" aria-live="polite">Connecting to your workspace…</span><span class="status-actions"><button id="theme-toggle" type="button" hidden>Light</button><button id="export">Export JSON</button></span></footer></main>
7
- <script src="/compat.js" defer></script><script src="/icons.js" defer></script><script src="/controls.js" defer></script><script src="/skill-picker.js" defer></script><script src="/edge-router.js" defer></script><script src="/drafts.js" defer></script><script src="/app.js" defer></script><script src="/manager-markdown.js" defer></script><script src="/manager-state.js" defer></script><script src="/manager.js" defer></script><script src="/embed.js" defer></script><script src="/sidebar.js" defer></script><script src="/studio.js" defer></script><script src="/studio-canvas.js" defer></script></body></html>
6
+ <main><header class="chrome"><div id="host-chrome" class="host-chrome" hidden></div><div class="graph-heading"><strong id="graph-title">Graph Editor</strong><span id="revision">Loading graphs…</span><span id="host-notice" class="chip chip-accent" role="status" hidden></span></div><div class="chrome-actions" id="chrome-actions"><button id="toggle-inspector" class="icon-button" aria-expanded="true" aria-label="Inspector" title="Show or hide the inspector" data-icon="panel-right"></button><div class="menu" id="more-wrap"><button id="more" class="icon-button" aria-haspopup="menu" aria-expanded="false" aria-controls="more-menu" aria-label="More actions" title="More actions" data-icon="more"></button><div id="more-menu" class="menu-list" role="menu" aria-label="More actions" hidden><button id="duplicate" type="button" role="menuitem" data-icon="copy">Duplicate</button></div></div><div class="manager-anchor" hidden><button id="graph-manager" class="btn-small studio-secondary" type="button" aria-label="Graph Manager" aria-expanded="false" aria-controls="manager-panel" title="Build or change this graph with Graph Manager" data-icon="bot" hidden><span>Graph Manager</span></button><div id="manager-tip" class="manager-tip" role="note" hidden><span>Let Graph Manager build this graph with you.</span><button id="manager-tip-close" type="button" class="icon-button" aria-label="Dismiss" title="Dismiss" data-icon="x"></button></div></div><button id="save" class="primary btn-small">Save</button></div></header><div class="workspace"><section id="canvas" aria-label="Graph canvas"><div id="scene"><svg id="edges" aria-label="Graph connections"></svg><div id="nodes"></div></div><div id="empty"><div class="empty-state"><span class="empty-state-icon" data-icon="graph"></span><p class="empty-state-title">No graph open</p><p class="empty-state-line">Create a graph to get started.</p><div class="empty-state-action"><button id="empty-create" type="button" class="primary btn-small">Create Graph</button></div></div></div><div id="canvas-hint" class="canvas-hint" role="note"><span id="canvas-hint-text">Drag or scroll to pan · Pinch or Ctrl/Cmd+scroll to zoom</span><button id="canvas-hint-close" type="button" class="icon-button" aria-label="Dismiss canvas tips" title="Dismiss" data-icon="x"></button></div><div class="canvas-toolbar" role="toolbar" aria-label="Canvas controls"><button id="undo" aria-label="Undo" title="Undo (Ctrl/Cmd+Z)" data-icon="undo"></button><button id="redo" aria-label="Redo" title="Redo (Ctrl/Cmd+Y)" data-icon="redo"></button><span class="toolbar-divider" aria-hidden="true"></span><button id="zoom-out" aria-label="Zoom out" title="Zoom out" data-icon="zoom-out"></button><output id="zoom" aria-label="Zoom level">100%</output><button id="zoom-in" aria-label="Zoom in" title="Zoom in" data-icon="zoom-in"></button><button id="fit" aria-label="Fit graph" title="Fit graph" data-icon="fit"></button><button id="layout" aria-label="Arrange" title="Arrange steps" data-icon="arrange"></button></div></section><aside id="inspector"><div id="resize" role="separator" aria-label="Resize inspector" aria-orientation="vertical" tabindex="0"></div><header class="panel-header"><strong id="inspector-title">Graph settings</strong><button id="graph-settings" class="btn-small" title="Show the graph's own settings">Graph Settings</button></header><div id="inspector-body"></div></aside><aside id="manager-panel" aria-label="Graph Manager" hidden><div id="manager-resize" role="separator" aria-label="Resize Graph Manager" aria-orientation="vertical" tabindex="0"></div><header class="panel-header"><strong>Graph Manager</strong><span class="manager-header-actions"><button id="manager-new-chat" type="button" class="btn-small" title="Start a new conversation. The current one stays in your history.">New Chat</button><button id="manager-close" type="button" class="icon-button" aria-label="Close Graph Manager" title="Close" data-icon="x"></button></span></header><div class="manager-models" id="manager-models"></div><div id="manager-notices"></div><div id="manager-transcript" role="log" aria-label="Graph Manager conversation" tabindex="0"></div><footer class="manager-composer"><textarea id="manager-input" rows="3" placeholder="Ask Graph Manager to build or change this graph" aria-label="Message Graph Manager"></textarea><div class="manager-composer-actions"><span id="manager-run-state" role="status"></span><button id="manager-stop" type="button" class="btn-small" hidden>Stop</button><button id="manager-send" type="button" class="primary btn-small">Send</button></div></footer></aside></div><footer class="status"><span id="status" role="status" aria-live="polite">Connecting to your workspace…</span><span class="status-actions"><button id="theme-toggle" type="button" hidden>Light</button><button id="export">Export JSON</button></span></footer></main>
7
+ <script src="/compat.js" defer></script><script src="/icons.js" defer></script><script src="/controls.js" defer></script><script src="/skill-picker.js" defer></script><script src="/model-picker.js" defer></script><script src="/edge-router.js" defer></script><script src="/drafts.js" defer></script><script src="/app.js" defer></script><script src="/manager-markdown.js" defer></script><script src="/manager-state.js" defer></script><script src="/manager.js" defer></script><script src="/embed.js" defer></script><script src="/sidebar.js" defer></script><script src="/studio.js" defer></script><script src="/studio-canvas.js" defer></script></body></html>
@@ -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) {