@andorra-labs/code 0.1.15 → 0.1.17

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 (242) hide show
  1. package/dist/src/acp-agent.d.ts +6 -0
  2. package/dist/src/acp-agent.js +15 -4
  3. package/dist/src/agent-definitions.js +29 -6
  4. package/dist/src/agent-execution.js +15 -10
  5. package/dist/src/agent-mcp-catalog.js +1 -0
  6. package/dist/src/agent-mcp.d.ts +4 -1
  7. package/dist/src/agent-mcp.js +46 -10
  8. package/dist/src/andorra/entry.d.ts +10 -0
  9. package/dist/src/andorra/entry.js +18 -4
  10. package/dist/src/andorra/hosted.d.ts +2 -1
  11. package/dist/src/andorra/hosted.js +2 -1
  12. package/dist/src/andorra/notices.d.ts +5 -0
  13. package/dist/src/andorra/notices.js +7 -0
  14. package/dist/src/andorra/state.d.ts +3 -2
  15. package/dist/src/andorra/state.js +4 -4
  16. package/dist/src/andorra/terminal.js +7 -2
  17. package/dist/src/anthropic-credentials.js +2 -0
  18. package/dist/src/app-server/error.d.ts +5 -0
  19. package/dist/src/app-server/error.js +7 -0
  20. package/dist/src/app-server/protocol.d.ts +22 -44
  21. package/dist/src/app-server/protocol.js +5 -1
  22. package/dist/src/app-server/workspace.d.ts +89 -0
  23. package/dist/src/app-server/workspace.js +457 -11
  24. package/dist/src/app-server.d.ts +465 -32
  25. package/dist/src/app-server.js +3308 -517
  26. package/dist/src/auth/deployment.js +2 -2
  27. package/dist/src/bridge/cloud.d.ts +27 -0
  28. package/dist/src/bridge/cloud.js +187 -0
  29. package/dist/src/bridge/command.d.ts +30 -0
  30. package/dist/src/bridge/command.js +347 -0
  31. package/dist/src/bridge/control.d.ts +68 -0
  32. package/dist/src/bridge/control.js +233 -0
  33. package/dist/src/bridge/engines.d.ts +90 -0
  34. package/dist/src/bridge/engines.js +601 -0
  35. package/dist/src/bridge/host-ops.d.ts +9 -0
  36. package/dist/src/bridge/host-ops.js +129 -0
  37. package/dist/src/bridge/host.d.ts +47 -0
  38. package/dist/src/bridge/host.js +540 -0
  39. package/dist/src/bridge/link.d.ts +38 -0
  40. package/dist/src/bridge/link.js +508 -0
  41. package/dist/src/bridge/login-link.d.ts +29 -0
  42. package/dist/src/bridge/login-link.js +54 -0
  43. package/dist/src/bridge/protocol.d.ts +136 -0
  44. package/dist/src/bridge/protocol.js +11 -0
  45. package/dist/src/bridge/store.d.ts +12 -0
  46. package/dist/src/bridge/store.js +61 -0
  47. package/dist/src/bridge/wording.d.ts +6 -0
  48. package/dist/src/bridge/wording.js +10 -0
  49. package/dist/src/browser-runner.js +1 -0
  50. package/dist/src/browser-server.js +7 -1
  51. package/dist/src/browser-ui/style.css +3 -3
  52. package/dist/src/browser-ui/tokens.css +28 -17
  53. package/dist/src/change-authors.d.ts +41 -0
  54. package/dist/src/change-authors.js +146 -0
  55. package/dist/src/claude-provider.js +3 -1
  56. package/dist/src/cli.js +202 -38
  57. package/dist/src/codex-errors.js +4 -1
  58. package/dist/src/coding-tools.js +15 -15
  59. package/dist/src/command-screens.d.ts +6 -0
  60. package/dist/src/command-screens.js +19 -14
  61. package/dist/src/commands.d.ts +14 -1
  62. package/dist/src/compaction-phrases.d.ts +4 -0
  63. package/dist/src/compaction-phrases.js +20 -0
  64. package/dist/src/completion.js +82 -5
  65. package/dist/src/config.d.ts +71 -3
  66. package/dist/src/config.js +202 -77
  67. package/dist/src/context-compaction.js +2 -1
  68. package/dist/src/deadline.js +13 -1
  69. package/dist/src/decision/DecisionManager.js +3 -2
  70. package/dist/src/decision/checks.js +1 -1
  71. package/dist/src/decision/requestPhrases.d.ts +4 -0
  72. package/dist/src/decision/requestPhrases.js +22 -0
  73. package/dist/src/default-graph.js +1 -1
  74. package/dist/src/file-diff.d.ts +4 -0
  75. package/dist/src/file-diff.js +2 -1
  76. package/dist/src/github-app/agent-writes.d.ts +102 -0
  77. package/dist/src/github-app/agent-writes.js +320 -0
  78. package/dist/src/github-app/client.d.ts +349 -0
  79. package/dist/src/github-app/client.js +810 -0
  80. package/dist/src/github-app/event-source.d.ts +208 -0
  81. package/dist/src/github-app/event-source.js +684 -0
  82. package/dist/src/github-app/metrics.d.ts +32 -0
  83. package/dist/src/github-app/metrics.js +49 -0
  84. package/dist/src/github-app/review-loop.d.ts +274 -0
  85. package/dist/src/github-app/review-loop.js +1177 -0
  86. package/dist/src/github-app/review-node.d.ts +81 -0
  87. package/dist/src/github-app/review-node.js +205 -0
  88. package/dist/src/github-app/review-post.d.ts +73 -0
  89. package/dist/src/github-app/review-post.js +139 -0
  90. package/dist/src/github-app/review-text.d.ts +107 -0
  91. package/dist/src/github-app/review-text.js +1133 -0
  92. package/dist/src/github-app/review-threads.d.ts +47 -0
  93. package/dist/src/github-app/review-threads.js +107 -0
  94. package/dist/src/github-app/reviewer.d.ts +121 -0
  95. package/dist/src/github-app/reviewer.js +598 -0
  96. package/dist/src/github-app/store.d.ts +59 -0
  97. package/dist/src/github-app/store.js +148 -0
  98. package/dist/src/github-app/triggers.d.ts +141 -0
  99. package/dist/src/github-app/triggers.js +441 -0
  100. package/dist/src/github-inbox.d.ts +55 -0
  101. package/dist/src/github-inbox.js +153 -0
  102. package/dist/src/github-names.d.ts +8 -0
  103. package/dist/src/github-names.js +8 -0
  104. package/dist/src/glob-search.d.ts +61 -0
  105. package/dist/src/glob-search.js +180 -0
  106. package/dist/src/graph-health.js +13 -4
  107. package/dist/src/graph-manager-chat.js +1 -1
  108. package/dist/src/graph-preview.d.ts +46 -0
  109. package/dist/src/graph-preview.js +55 -0
  110. package/dist/src/graph-provider-portability.js +34 -11
  111. package/dist/src/graph-quota.d.ts +29 -2
  112. package/dist/src/graph-quota.js +68 -10
  113. package/dist/src/graph-runner.js +88 -10
  114. package/dist/src/graph-server.d.ts +1 -1
  115. package/dist/src/graph-server.js +11 -9
  116. package/dist/src/graph-sync.js +3 -3
  117. package/dist/src/graph-ui/app.js +201 -40
  118. package/dist/src/graph-ui/controls.css +1 -0
  119. package/dist/src/graph-ui/embed.js +2 -2
  120. package/dist/src/graph-ui/icons.js +3 -1
  121. package/dist/src/graph-ui/index.html +1 -1
  122. package/dist/src/graph-ui/manager.css +1 -1
  123. package/dist/src/graph-ui/manager.js +2 -2
  124. package/dist/src/graph-ui/sidebar.js +30 -0
  125. package/dist/src/graph-ui/studio-canvas.js +26 -13
  126. package/dist/src/graph-ui/studio.css +15 -7
  127. package/dist/src/graph-ui/studio.js +26 -5
  128. package/dist/src/graph-ui/style.css +77 -45
  129. package/dist/src/graph-ui/theme.js +3 -36
  130. package/dist/src/graph-ui/tokens.css +28 -20
  131. package/dist/src/graphs.d.ts +34 -1
  132. package/dist/src/graphs.js +162 -17
  133. package/dist/src/image-input.d.ts +16 -0
  134. package/dist/src/image-input.js +41 -0
  135. package/dist/src/membership.d.ts +30 -1
  136. package/dist/src/membership.js +48 -8
  137. package/dist/src/model-health-cache.js +1 -1
  138. package/dist/src/model-metadata.d.ts +7 -1
  139. package/dist/src/model-metadata.js +39 -17
  140. package/dist/src/model-relay/local.d.ts +116 -0
  141. package/dist/src/model-relay/local.js +468 -0
  142. package/dist/src/model-relay/remote.d.ts +129 -0
  143. package/dist/src/model-relay/remote.js +252 -0
  144. package/dist/src/model-relay/runs.d.ts +34 -0
  145. package/dist/src/model-relay/runs.js +146 -0
  146. package/dist/src/model-relay/wire.d.ts +5 -0
  147. package/dist/src/model-relay/wire.js +5 -0
  148. package/dist/src/plan-pass.d.ts +59 -0
  149. package/dist/src/plan-pass.js +165 -0
  150. package/dist/src/project-registry.d.ts +21 -0
  151. package/dist/src/project-registry.js +74 -0
  152. package/dist/src/provider-engine.js +3 -0
  153. package/dist/src/provider-import.d.ts +0 -12
  154. package/dist/src/provider-import.js +7 -195
  155. package/dist/src/providers.d.ts +40 -2
  156. package/dist/src/providers.js +93 -23
  157. package/dist/src/pull-request-checks.d.ts +26 -0
  158. package/dist/src/pull-request-checks.js +56 -0
  159. package/dist/src/pull-request-conversation.d.ts +134 -0
  160. package/dist/src/pull-request-conversation.js +221 -0
  161. package/dist/src/pull-request-create.d.ts +175 -0
  162. package/dist/src/pull-request-create.js +392 -0
  163. package/dist/src/pull-request-details.d.ts +242 -0
  164. package/dist/src/pull-request-details.js +614 -0
  165. package/dist/src/pull-request-edit.d.ts +23 -0
  166. package/dist/src/pull-request-edit.js +91 -0
  167. package/dist/src/pull-request-logs.d.ts +87 -0
  168. package/dist/src/pull-request-logs.js +183 -0
  169. package/dist/src/pull-request-merge.d.ts +112 -0
  170. package/dist/src/pull-request-merge.js +258 -0
  171. package/dist/src/pull-request-review.d.ts +137 -0
  172. package/dist/src/pull-request-review.js +401 -0
  173. package/dist/src/pull-requests.d.ts +369 -8
  174. package/dist/src/pull-requests.js +524 -55
  175. package/dist/src/react-runtime.js +38 -5
  176. package/dist/src/remote/engine-pool.d.ts +88 -4
  177. package/dist/src/remote/engine-pool.js +379 -90
  178. package/dist/src/remote/roots.d.ts +19 -0
  179. package/dist/src/remote/roots.js +45 -7
  180. package/dist/src/remote/types.d.ts +0 -44
  181. package/dist/src/run-control.d.ts +17 -0
  182. package/dist/src/run-control.js +47 -0
  183. package/dist/src/run-progress.d.ts +10 -0
  184. package/dist/src/run-progress.js +122 -0
  185. package/dist/src/run-records.d.ts +7 -2
  186. package/dist/src/run-records.js +71 -6
  187. package/dist/src/runtime.d.ts +9 -1
  188. package/dist/src/runtime.js +24 -4
  189. package/dist/src/session-changes.d.ts +35 -0
  190. package/dist/src/session-changes.js +194 -6
  191. package/dist/src/session-monitor.js +2 -1
  192. package/dist/src/session-reaper.d.ts +1 -1
  193. package/dist/src/session-reaper.js +6 -1
  194. package/dist/src/session-summary.d.ts +2 -1
  195. package/dist/src/session-summary.js +2 -1
  196. package/dist/src/sessions.d.ts +11 -1
  197. package/dist/src/sessions.js +17 -4
  198. package/dist/src/skills/bundled/diagram/SKILL.md +5 -3
  199. package/dist/src/skills/bundled/graph-manager/SKILL.md +7 -4
  200. package/dist/src/skills/bundled/provenance.json +2 -2
  201. package/dist/src/skills/runtime-skills.js +1 -1
  202. package/dist/src/subagent-run.js +1 -0
  203. package/dist/src/telemetry/capture-core.d.ts +17 -0
  204. package/dist/src/telemetry/capture-core.js +59 -1
  205. package/dist/src/telemetry/classify.d.ts +3 -1
  206. package/dist/src/telemetry/classify.js +37 -0
  207. package/dist/src/telemetry/emitter.d.ts +17 -0
  208. package/dist/src/telemetry/emitter.js +76 -5
  209. package/dist/src/telemetry/schema.d.ts +47 -2
  210. package/dist/src/telemetry/schema.js +120 -5
  211. package/dist/src/telemetry/surface.d.ts +3 -1
  212. package/dist/src/telemetry/surface.js +4 -1
  213. package/dist/src/telemetry/uploader.d.ts +6 -1
  214. package/dist/src/telemetry/uploader.js +22 -3
  215. package/dist/src/terminal-ui.d.ts +1 -0
  216. package/dist/src/terminal-ui.js +10 -3
  217. package/dist/src/test-edit-guard.d.ts +7 -0
  218. package/dist/src/test-edit-guard.js +49 -1
  219. package/dist/src/timers.d.ts +2 -0
  220. package/dist/src/tools.js +59 -9
  221. package/dist/src/transcript.js +8 -2
  222. package/dist/src/types.d.ts +7 -0
  223. package/dist/src/usage-analytics.js +18 -10
  224. package/package.json +6 -1
  225. package/dist/src/remote/cert.d.ts +0 -11
  226. package/dist/src/remote/cert.js +0 -87
  227. package/dist/src/remote/client.d.ts +0 -119
  228. package/dist/src/remote/client.js +0 -544
  229. package/dist/src/remote/command.d.ts +0 -4
  230. package/dist/src/remote/command.js +0 -194
  231. package/dist/src/remote/errors.d.ts +0 -11
  232. package/dist/src/remote/errors.js +0 -14
  233. package/dist/src/remote/network.d.ts +0 -22
  234. package/dist/src/remote/network.js +0 -102
  235. package/dist/src/remote/pairing.d.ts +0 -63
  236. package/dist/src/remote/pairing.js +0 -299
  237. package/dist/src/remote/pem.d.ts +0 -2
  238. package/dist/src/remote/pem.js +0 -7
  239. package/dist/src/remote/serve.d.ts +0 -68
  240. package/dist/src/remote/serve.js +0 -244
  241. package/dist/src/remote/server.d.ts +0 -21
  242. package/dist/src/remote/server.js +0 -406
@@ -0,0 +1,7 @@
1
+ export class AppServerError extends Error {
2
+ code;
3
+ constructor(code, message) {
4
+ super(message);
5
+ this.code = code;
6
+ }
7
+ }
@@ -1,5 +1,9 @@
1
1
  export declare const APP_SERVER_PROTOCOL_VERSION = 2;
2
- export declare const APP_SERVER_CAPABILITIES: readonly ["run.start.runPermissions", "automations", "providers.models", "providers.test", "providers.test.model", "providers.streamIdleTimeout", "providers.modelContextWindows", "providers.name", "providers.claude", "providers.claudeAuth", "providers.grok", "providers.google", "providers.opencode", "providers.auth.submit", "providers.opencodeGo", "providers.discover.draft", "providers.detectSignIns", "providers.codexAuth", "providers.codexAuth.logout", "providers.codexAccounts", "providers.anthropicConsole", "run.resume.direction", "run.resume.model", "run.steer", "run.overrideAllNodes", "run.setModel", "run.setModel.node", "run.setPermissions", "run.start.continueSession", "run.start.entryHistory", "remote.owner.projects", "remote.workspaces.probe", "remote.engine.relay", "remote.hosting.device.grant", "extensions.manage", "extensions.resources", "skills.invoke", "mcp.manage", "mcp.edit", "mcp.status", "runs.files", "sessions.files", "account.profile", "sessions.stats", "sessions.usage", "config.analytics", "config.analytics.planGate", "sessions.trajectory", "config.externalSubagent", "config.codeIntel", "config.decisions", "browser.view", "attachments.read", "config.general", "sessions.pullRequest", "browser.view.go", "config.browser", "config.webSearch", "background.tasks", "workspace.warm", "browser.cookies.firefox", "browser.extensions", "sessions.compact", "sessions.goal", "sessions.changes", "run.current", "sessions.jev", "providers.andorra", "graphs.visibility"];
2
+ export declare const APP_SERVER_CAPABILITIES: readonly ["run.start.runPermissions", "model.relay", "automations", "providers.models", "providers.test", "providers.test.model", "providers.streamIdleTimeout", "providers.modelContextWindows", "providers.textOnlyModels", "providers.name", "providers.claude", "providers.claudeAuth", "providers.grok", "providers.google", "providers.opencode", "providers.auth.submit", "providers.opencodeGo", "providers.discover.draft", "providers.detectSignIns", "providers.codexAuth", "providers.codexAuth.logout", "providers.codexAccounts", "providers.anthropicConsole", "run.resume.direction", "run.resume.model", "run.resume.compact", "run.steer", "run.overrideAllNodes", "run.setModel", "run.setModel.node", "run.setPermissions", "run.start.continueSession", "run.start.entryHistory", "remote.owner.projects", "remote.engine.relay", "environments.bridge", "environments.cloud", "extensions.manage", "extensions.resources", "skills.invoke", "mcp.manage", "mcp.edit", "mcp.status", "runs.files", "sessions.files", "account.profile", "sessions.stats", "sessions.usage", "sessions.usage.hourly", "config.analytics", "config.analytics.planGate", "sessions.trajectory", "config.externalSubagent", "config.codeIntel", "config.decisions", "browser.view", "attachments.read", "config.general", "sessions.pullRequest", "sessions.pullRequest.details", "sessions.pullRequest.review", "sessions.pullRequest.review.teams", "sessions.pullRequest.merge", "sessions.pullRequest.create", "sessions.pullRequest.conversation", "sessions.pullRequest.suggestions", "sessions.pullRequest.checkLogs", "sessions.pullRequest.edit", "sessions.pullRequest.mergeQueue", "sessions.pullRequest.merge.bypass", "sessions.pullRequest.create.fork", "sessions.pullRequest.attach", "pullRequests.reviewRequests", "issues.list", "browser.view.go", "config.browser", "config.webSearch", "background.tasks", "workspace.warm", "browser.cookies.firefox", "browser.extensions", "sessions.compact", "sessions.goal", "sessions.changes", "run.current", "sessions.jev", "providers.andorra", "graphs.visibility", "github.app", "github.app.agentWrites", "github.app.triggers", "github.app.reviews", "sessions.pin", "workspace.files", "workspace.search", "workspace.linkBase", "workspace.write", "sessions.changes.authors", "run.note"];
3
+ /** Remote engine events about the engine version a desktop runs, sent to every connection of that version. */
4
+ export declare const REMOTE_ENGINE_INSTALLING_EVENT = "remote.engine.installing";
5
+ export declare const REMOTE_ENGINE_READY_EVENT = "remote.engine.ready";
6
+ export declare const REMOTE_ENGINE_INSTALL_FAILED_EVENT = "remote.engine.install-failed";
3
7
  export interface AppServerRequest {
4
8
  id: number | string;
5
9
  method: string;
@@ -33,7 +37,7 @@ export interface AppServerHostInfo {
33
37
  running?: boolean;
34
38
  capabilities: readonly string[];
35
39
  }
36
- export type AppServerErrorCode = 'invalid-request' | 'unknown-method' | 'invalid-params' | 'busy' | 'engine-busy' | 'not-found' | 'login-required' | 'auth' | 'storage' | 'network' | 'cancelled' | 'internal' | 'remote' | 'nothing-to-continue';
40
+ export type AppServerErrorCode = 'invalid-request' | 'unknown-method' | 'invalid-params' | 'busy' | 'engine-busy' | 'not-found' | 'login-required' | 'auth' | 'storage' | 'network' | 'cancelled' | 'internal' | 'remote' | 'nothing-to-continue' | 'forbidden';
37
41
  export type AppServerPermissionMode = 'read-only' | 'plan' | 'ask-for-approval' | 'approve-for-me' | 'full-access';
38
42
  export interface AppServerProviderAuth {
39
43
  state: 'signedOut' | 'starting' | 'waiting' | 'signedIn' | 'cancelled' | 'error';
@@ -67,7 +71,7 @@ export interface AppServerProviderAuth {
67
71
  }
68
72
  export interface AppServerProvider {
69
73
  id: string;
70
- type: 'openai-compatible' | 'anthropic' | 'codex' | 'claude' | 'opencode-go' | 'grok' | 'opencode' | 'google' | 'andorra';
74
+ type: 'openai-compatible' | 'anthropic' | 'codex' | 'claude' | 'opencode-go' | 'grok' | 'opencode' | 'google' | 'andorra' | 'relayed';
71
75
  baseUrl: string;
72
76
  model: string;
73
77
  apiKeyEnv?: string;
@@ -238,8 +242,10 @@ export interface AppServerUsageAnalytics {
238
242
  unreadable: number;
239
243
  };
240
244
  filesScanned: number;
245
+ /** 1 is the rolling last 24 hours, whose `days` rows are UTC hours keyed "YYYY-MM-DDTHH"; otherwise UTC dates. */
241
246
  windowDays: number;
242
247
  }
248
+ /** `author` marks an added or removed line of a file the person also edited: `user` for theirs, `agent` for the agent's. */
243
249
  export interface AppServerFileDiffLine {
244
250
  kind: 'context' | 'add' | 'del';
245
251
  text: string;
@@ -247,6 +253,7 @@ export interface AppServerFileDiffLine {
247
253
  newLine?: number;
248
254
  noNewline?: true;
249
255
  clipped?: true;
256
+ author?: 'agent' | 'user';
250
257
  }
251
258
  export interface AppServerFileDiffHunk {
252
259
  oldStart: number;
@@ -275,6 +282,8 @@ export interface AppServerSessionFileChange {
275
282
  to: 'lf' | 'crlf' | 'mixed';
276
283
  };
277
284
  changedOnDisk?: true;
285
+ /** Saved from the Files tab: `only` when the person alone changed the file, `also` when the agent changed it too. */
286
+ editedByUser?: 'only' | 'also';
278
287
  undoable: boolean;
279
288
  version: number;
280
289
  firstChangedAt: string;
@@ -286,10 +295,12 @@ export interface AppServerSessionChanges {
286
295
  revision: number;
287
296
  changes: AppServerSessionFileChange[];
288
297
  }
298
+ /** `userLines`, on a `user-edited` conflict, are the person's lines in the file now, as inclusive ranges. */
289
299
  export interface AppServerSessionChangeConflict {
290
300
  path: string;
291
- reason: 'changed-on-disk' | 'no-baseline';
301
+ reason: 'changed-on-disk' | 'no-baseline' | 'user-edited';
292
302
  message: string;
303
+ userLines?: [number, number][];
293
304
  }
294
305
  export interface AppServerSessionChangesKept extends AppServerSessionChanges {
295
306
  kept: string[];
@@ -312,6 +323,7 @@ export interface AppServerSessionSummary {
312
323
  turns: number;
313
324
  lastTask?: string;
314
325
  archived?: boolean;
326
+ pinned?: boolean;
315
327
  jevEnabled?: boolean;
316
328
  lastTurnStatus?: AppServerTurnStatus;
317
329
  timers?: AppServerTimerState[];
@@ -350,29 +362,35 @@ export interface AppServerRunSummary {
350
362
  task?: string;
351
363
  sessionId?: string;
352
364
  }
365
+ /** `locked` marks a graph a free account can view, export and duplicate but not change or run. */
353
366
  export interface AppServerGraphSummary {
354
367
  id: string;
355
368
  name: string;
356
369
  revision: number;
357
370
  preset: boolean;
371
+ locked?: boolean;
358
372
  updatedAt?: string;
359
373
  }
374
+ /** `ignored`: Git ignores the entry, or it sits inside a folder Git ignores. Absent outside a repository or when Git could not say. */
360
375
  export interface AppServerTreeEntry {
361
376
  name: string;
362
377
  path: string;
363
378
  type: 'file' | 'directory';
364
379
  size?: number;
380
+ ignored?: boolean;
365
381
  }
366
382
  export interface AppServerGitFile {
367
383
  path: string;
368
384
  index: string;
369
385
  worktree: string;
370
386
  }
387
+ /** `prefix`: where the project folder sits in its repository (`app/`), when it is not the repository's top; `files` are named from the top. */
371
388
  export interface AppServerGitStatus {
372
389
  repository: boolean;
373
390
  branch?: string;
374
391
  files: AppServerGitFile[];
375
392
  truncated?: boolean;
393
+ prefix?: string;
376
394
  }
377
395
  export interface AppServerBranchList {
378
396
  repository: boolean;
@@ -395,51 +413,11 @@ export interface AppServerBundle {
395
413
  relativePath?: string;
396
414
  command?: string;
397
415
  }
398
- export type AppServerRemoteTransport = 'https' | 'http';
399
416
  export interface AppServerProject {
400
417
  path: string;
401
418
  name?: string;
402
419
  addedAt: string;
403
420
  }
404
- export interface AppServerRemoteHostingStatus {
405
- serving: boolean;
406
- port: number;
407
- transport: AppServerRemoteTransport;
408
- hostname: string;
409
- fingerprint: string;
410
- code: string | null;
411
- invitationExpiresAt: string | null;
412
- invitationGrant?: 'browse' | 'full';
413
- devices: {
414
- id: string;
415
- label?: string;
416
- addedAt: string;
417
- lastSeenAt?: string;
418
- grant?: 'browse' | 'full';
419
- }[];
420
- shares: {
421
- id: string;
422
- path: string;
423
- label?: string;
424
- }[];
425
- }
426
- export interface AppServerRemoteWorkspace {
427
- id: string;
428
- nickname: string;
429
- host: string;
430
- hosts: string[];
431
- port: number;
432
- transport: AppServerRemoteTransport;
433
- fingerprint: string;
434
- hostname?: string;
435
- platform?: string;
436
- version?: string;
437
- addedAt: string;
438
- status: 'online' | 'offline' | 'identity-changed' | 'unauthorized' | 'unknown';
439
- grant?: 'browse' | 'full';
440
- relay?: boolean;
441
- statusDetail?: string;
442
- }
443
421
  export interface AppServerRemoteProject {
444
422
  rootId: string;
445
423
  name: string;
@@ -1,2 +1,6 @@
1
1
  export const APP_SERVER_PROTOCOL_VERSION = 2;
2
- export const APP_SERVER_CAPABILITIES = ['run.start.runPermissions', 'automations', 'providers.models', 'providers.test', 'providers.test.model', 'providers.streamIdleTimeout', 'providers.modelContextWindows', 'providers.name', 'providers.claude', 'providers.claudeAuth', 'providers.grok', 'providers.google', 'providers.opencode', 'providers.auth.submit', 'providers.opencodeGo', 'providers.discover.draft', 'providers.detectSignIns', 'providers.codexAuth', 'providers.codexAuth.logout', 'providers.codexAccounts', 'providers.anthropicConsole', 'run.resume.direction', 'run.resume.model', 'run.steer', 'run.overrideAllNodes', 'run.setModel', 'run.setModel.node', 'run.setPermissions', 'run.start.continueSession', 'run.start.entryHistory', 'remote.owner.projects', 'remote.workspaces.probe', 'remote.engine.relay', 'remote.hosting.device.grant', 'extensions.manage', 'extensions.resources', 'skills.invoke', 'mcp.manage', 'mcp.edit', 'mcp.status', 'runs.files', 'sessions.files', 'account.profile', 'sessions.stats', 'sessions.usage', 'config.analytics', 'config.analytics.planGate', 'sessions.trajectory', 'config.externalSubagent', 'config.codeIntel', 'config.decisions', 'browser.view', 'attachments.read', 'config.general', 'sessions.pullRequest', 'browser.view.go', 'config.browser', 'config.webSearch', 'background.tasks', 'workspace.warm', 'browser.cookies.firefox', 'browser.extensions', 'sessions.compact', 'sessions.goal', 'sessions.changes', 'run.current', 'sessions.jev', 'providers.andorra', 'graphs.visibility'];
2
+ export const APP_SERVER_CAPABILITIES = ['run.start.runPermissions', 'model.relay', 'automations', 'providers.models', 'providers.test', 'providers.test.model', 'providers.streamIdleTimeout', 'providers.modelContextWindows', 'providers.textOnlyModels', 'providers.name', 'providers.claude', 'providers.claudeAuth', 'providers.grok', 'providers.google', 'providers.opencode', 'providers.auth.submit', 'providers.opencodeGo', 'providers.discover.draft', 'providers.detectSignIns', 'providers.codexAuth', 'providers.codexAuth.logout', 'providers.codexAccounts', 'providers.anthropicConsole', 'run.resume.direction', 'run.resume.model', 'run.resume.compact', 'run.steer', 'run.overrideAllNodes', 'run.setModel', 'run.setModel.node', 'run.setPermissions', 'run.start.continueSession', 'run.start.entryHistory', 'remote.owner.projects', 'remote.engine.relay', 'environments.bridge', 'environments.cloud', 'extensions.manage', 'extensions.resources', 'skills.invoke', 'mcp.manage', 'mcp.edit', 'mcp.status', 'runs.files', 'sessions.files', 'account.profile', 'sessions.stats', 'sessions.usage', 'sessions.usage.hourly', 'config.analytics', 'config.analytics.planGate', 'sessions.trajectory', 'config.externalSubagent', 'config.codeIntel', 'config.decisions', 'browser.view', 'attachments.read', 'config.general', 'sessions.pullRequest', 'sessions.pullRequest.details', 'sessions.pullRequest.review', 'sessions.pullRequest.review.teams', 'sessions.pullRequest.merge', 'sessions.pullRequest.create', 'sessions.pullRequest.conversation', 'sessions.pullRequest.suggestions', 'sessions.pullRequest.checkLogs', 'sessions.pullRequest.edit', 'sessions.pullRequest.mergeQueue', 'sessions.pullRequest.merge.bypass', 'sessions.pullRequest.create.fork', 'sessions.pullRequest.attach', 'pullRequests.reviewRequests', 'issues.list', 'browser.view.go', 'config.browser', 'config.webSearch', 'background.tasks', 'workspace.warm', 'browser.cookies.firefox', 'browser.extensions', 'sessions.compact', 'sessions.goal', 'sessions.changes', 'run.current', 'sessions.jev', 'providers.andorra', 'graphs.visibility', 'github.app', 'github.app.agentWrites', 'github.app.triggers', 'github.app.reviews', 'sessions.pin', 'workspace.files', 'workspace.search', 'workspace.linkBase', 'workspace.write', 'sessions.changes.authors', 'run.note'];
3
+ /** Remote engine events about the engine version a desktop runs, sent to every connection of that version. */
4
+ export const REMOTE_ENGINE_INSTALLING_EVENT = 'remote.engine.installing';
5
+ export const REMOTE_ENGINE_READY_EVENT = 'remote.engine.ready';
6
+ export const REMOTE_ENGINE_INSTALL_FAILED_EVENT = 'remote.engine.install-failed';
@@ -11,11 +11,26 @@ export declare function readTree(root: string, options?: {
11
11
  entries: AppServerTreeEntry[];
12
12
  truncated: boolean;
13
13
  }>;
14
+ /**
15
+ * A project file's text, capped at 512 KB. A whole text file also carries `hash`, the SHA-256 of its bytes, which
16
+ * `workspace.write` checks before it saves; `notUtf8` marks one whose bytes are not UTF-8, so saving the decoded text
17
+ * would change them.
18
+ */
14
19
  export declare function readWorkspaceFile(root: string, name: unknown): Promise<{
15
20
  content: string;
16
21
  truncated: boolean;
17
22
  binary: boolean;
18
23
  size: number;
24
+ hash?: string;
25
+ notUtf8?: true;
26
+ }>;
27
+ /** The most a save from the Files tab may write. */
28
+ export declare const MAX_WRITE_BYTES: number;
29
+ /** `workspace.write`'s checked parameters: the file, as a project-relative path with `/`, and the bytes to save. */
30
+ export declare function writeTarget(root: string, params: Record<string, unknown>): Promise<{
31
+ relative: string;
32
+ bytes: Buffer;
33
+ expectedHash: string;
19
34
  }>;
20
35
  export declare function gitStatus(root: string, options?: {
21
36
  maxBytes?: number;
@@ -87,3 +102,77 @@ export declare function listExtensions(config: Config, signal?: AbortSignal, dir
87
102
  }[];
88
103
  notices: string[];
89
104
  }>;
105
+ /**
106
+ * Every file in the project for quick open, `/`-separated and relative to `root`, capped at 50,000. `.git` and
107
+ * `.andorracode` are skipped, `node_modules` is not walked into (as the tree), symbolic links are not followed, and
108
+ * files Git ignores are marked.
109
+ */
110
+ export declare function listWorkspaceFiles(root: string): Promise<{
111
+ files: {
112
+ path: string;
113
+ ignored?: true;
114
+ }[];
115
+ truncated: boolean;
116
+ }>;
117
+ export declare const SEARCH_MAX_FILES = 200;
118
+ export declare const SEARCH_MAX_MATCHES = 2000;
119
+ export interface WorkspaceSearchOptions {
120
+ query: string;
121
+ regex?: boolean;
122
+ caseSensitive?: boolean;
123
+ wholeWord?: boolean;
124
+ /** Comma-separated globs a file must match (any), and must not match (none). */
125
+ include?: string;
126
+ exclude?: string;
127
+ }
128
+ export interface WorkspaceSearchMatch {
129
+ line: number;
130
+ text: string;
131
+ ranges: {
132
+ start: number;
133
+ end: number;
134
+ }[];
135
+ }
136
+ export interface WorkspaceSearchResult {
137
+ files: {
138
+ path: string;
139
+ matches: WorkspaceSearchMatch[];
140
+ }[];
141
+ matchCount: number;
142
+ /** Why the results stop short of every match, when they do. */
143
+ incomplete?: string;
144
+ engine: 'ripgrep' | 'built-in';
145
+ }
146
+ /** Comma-separated globs; a comma inside `{…}` or `[…]` belongs to its glob (`*.{ts,tsx}`). */
147
+ export declare function globList(value: unknown): string[];
148
+ export declare function searchOptions(params: Record<string, unknown>): WorkspaceSearchOptions;
149
+ /**
150
+ * Ripgrep's byte offsets (ordered) as string offsets, walking the line once; a plain ASCII line needs no walk. A
151
+ * minified line of a megabyte with thousands of matches stays linear.
152
+ */
153
+ export declare function charRanges(text: string, submatches: readonly {
154
+ start: number;
155
+ end: number;
156
+ }[]): {
157
+ start: number;
158
+ end: number;
159
+ }[];
160
+ /**
161
+ * Searches the project's files for `options.query`, with ripgrep when it is installed (it skips what Git ignores) and
162
+ * a built-in scan otherwise. Results stop at 200 files, 2,000 matches or 10 seconds, and say so (`incomplete`).
163
+ */
164
+ export declare function searchWorkspace(root: string, options: WorkspaceSearchOptions, signal?: AbortSignal, rg?: string | null): Promise<WorkspaceSearchResult>;
165
+ /** A GitHub remote URL (https, ssh or git@) as its web address, or undefined for any other host. */
166
+ export declare function githubWebUrl(remote: string): string | undefined;
167
+ /**
168
+ * What a GitHub link to lines needs: the repository's web address, the commit checked out, whether that commit is on
169
+ * a remote branch (so the link resolves), and where the project sits in the repository. Fields are left out where Git
170
+ * cannot say.
171
+ */
172
+ export declare function gitLinkBase(root: string): Promise<{
173
+ repository: boolean;
174
+ webUrl?: string;
175
+ head?: string;
176
+ pushed?: boolean;
177
+ prefix?: string;
178
+ }>;