@zvada/agent-server 0.3.27 → 0.3.28

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 (170) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +6 -4
  3. package/dist/core/agents/acp/account.js +111 -0
  4. package/dist/core/agents/acp/acp-agent.js +247 -158
  5. package/dist/core/agents/acp/adapter.js +103 -34
  6. package/dist/core/agents/acp/client.js +169 -42
  7. package/dist/core/agents/acp/known-agents.js +12 -5
  8. package/dist/core/agents/acp/mappings.js +84 -20
  9. package/dist/core/agents/acp/models.js +59 -0
  10. package/dist/core/agents/acp/profile.js +36 -0
  11. package/dist/core/agents/acp/prompts.js +248 -0
  12. package/dist/core/agents/acp/requests.js +4 -4
  13. package/dist/core/agents/claude-code/login.js +4 -1
  14. package/dist/core/agents/claude-code/session.js +38 -10
  15. package/dist/core/agents/claude-code/spawn.js +0 -26
  16. package/dist/core/agents/codex-app-server/client.js +12 -13
  17. package/dist/core/agents/codex-app-server/login.js +4 -1
  18. package/dist/core/agents/gemini/failures.js +133 -0
  19. package/dist/core/agents/gemini/login.js +173 -0
  20. package/dist/core/agents/gemini/profile.js +137 -0
  21. package/dist/core/agents/gemini/tools.js +91 -0
  22. package/dist/core/agents/login.js +8 -6
  23. package/dist/core/agents/stderr-tail.js +5 -2
  24. package/dist/core/presets.js +13 -0
  25. package/dist/core/processes/native-processes.js +23 -1
  26. package/dist/core/provision/install-build.js +70 -26
  27. package/dist/core/provision/pins.js +5 -0
  28. package/dist/core/provision/provisioner.js +39 -16
  29. package/dist/core/provision/releases.js +39 -1
  30. package/dist/core/provision/tools.js +87 -28
  31. package/dist/operator/errors.js +2 -2
  32. package/dist/operator/operator.js +171 -74
  33. package/dist/operator/render.js +33 -25
  34. package/dist/operator/session-tools.js +2 -1
  35. package/dist/protocol/account.js +5 -1
  36. package/dist/protocol/auth.js +5 -1
  37. package/dist/protocol/credentials.js +9 -1
  38. package/dist/protocol/harness.js +9 -1
  39. package/dist/server/bin.js +22 -7
  40. package/dist/server/install.js +6 -4
  41. package/dist/types/core/agents/acp/account.d.ts +55 -0
  42. package/dist/types/core/agents/acp/account.d.ts.map +1 -0
  43. package/dist/types/core/agents/acp/acp-agent.d.ts +65 -36
  44. package/dist/types/core/agents/acp/acp-agent.d.ts.map +1 -1
  45. package/dist/types/core/agents/acp/adapter.d.ts +28 -3
  46. package/dist/types/core/agents/acp/adapter.d.ts.map +1 -1
  47. package/dist/types/core/agents/acp/client.d.ts +66 -4
  48. package/dist/types/core/agents/acp/client.d.ts.map +1 -1
  49. package/dist/types/core/agents/acp/known-agents.d.ts +4 -2
  50. package/dist/types/core/agents/acp/known-agents.d.ts.map +1 -1
  51. package/dist/types/core/agents/acp/mappings.d.ts +53 -7
  52. package/dist/types/core/agents/acp/mappings.d.ts.map +1 -1
  53. package/dist/types/core/agents/acp/models.d.ts +22 -0
  54. package/dist/types/core/agents/acp/models.d.ts.map +1 -0
  55. package/dist/types/core/agents/acp/profile.d.ts +92 -0
  56. package/dist/types/core/agents/acp/profile.d.ts.map +1 -0
  57. package/dist/types/core/agents/acp/prompts.d.ts +108 -0
  58. package/dist/types/core/agents/acp/prompts.d.ts.map +1 -0
  59. package/dist/types/core/agents/acp/requests.d.ts +7 -1
  60. package/dist/types/core/agents/acp/requests.d.ts.map +1 -1
  61. package/dist/types/core/agents/claude-code/login.d.ts.map +1 -1
  62. package/dist/types/core/agents/claude-code/session.d.ts +3 -0
  63. package/dist/types/core/agents/claude-code/session.d.ts.map +1 -1
  64. package/dist/types/core/agents/claude-code/spawn.d.ts +0 -8
  65. package/dist/types/core/agents/claude-code/spawn.d.ts.map +1 -1
  66. package/dist/types/core/agents/codex-app-server/client.d.ts.map +1 -1
  67. package/dist/types/core/agents/codex-app-server/login.d.ts.map +1 -1
  68. package/dist/types/core/agents/gemini/failures.d.ts +25 -0
  69. package/dist/types/core/agents/gemini/failures.d.ts.map +1 -0
  70. package/dist/types/core/agents/gemini/login.d.ts +28 -0
  71. package/dist/types/core/agents/gemini/login.d.ts.map +1 -0
  72. package/dist/types/core/agents/gemini/profile.d.ts +30 -0
  73. package/dist/types/core/agents/gemini/profile.d.ts.map +1 -0
  74. package/dist/types/core/agents/gemini/tools.d.ts +18 -0
  75. package/dist/types/core/agents/gemini/tools.d.ts.map +1 -0
  76. package/dist/types/core/agents/login.d.ts +15 -5
  77. package/dist/types/core/agents/login.d.ts.map +1 -1
  78. package/dist/types/core/agents/stderr-tail.d.ts +1 -1
  79. package/dist/types/core/agents/stderr-tail.d.ts.map +1 -1
  80. package/dist/types/core/presets.d.ts +2 -2
  81. package/dist/types/core/presets.d.ts.map +1 -1
  82. package/dist/types/core/processes/native-processes.d.ts +6 -0
  83. package/dist/types/core/processes/native-processes.d.ts.map +1 -1
  84. package/dist/types/core/provision/checksums.d.ts +7 -1
  85. package/dist/types/core/provision/checksums.d.ts.map +1 -1
  86. package/dist/types/core/provision/install-build.d.ts +32 -6
  87. package/dist/types/core/provision/install-build.d.ts.map +1 -1
  88. package/dist/types/core/provision/pins.d.ts +4 -0
  89. package/dist/types/core/provision/pins.d.ts.map +1 -1
  90. package/dist/types/core/provision/provisioner.d.ts +18 -7
  91. package/dist/types/core/provision/provisioner.d.ts.map +1 -1
  92. package/dist/types/core/provision/releases.d.ts +2 -1
  93. package/dist/types/core/provision/releases.d.ts.map +1 -1
  94. package/dist/types/core/provision/tools.d.ts +36 -7
  95. package/dist/types/core/provision/tools.d.ts.map +1 -1
  96. package/dist/types/operator/errors.d.ts +5 -1
  97. package/dist/types/operator/errors.d.ts.map +1 -1
  98. package/dist/types/operator/operator.d.ts.map +1 -1
  99. package/dist/types/operator/render.d.ts +11 -6
  100. package/dist/types/operator/render.d.ts.map +1 -1
  101. package/dist/types/operator/session-tools.d.ts.map +1 -1
  102. package/dist/types/operator/types.d.ts +1 -0
  103. package/dist/types/operator/types.d.ts.map +1 -1
  104. package/dist/types/protocol/account.d.ts +4 -2
  105. package/dist/types/protocol/account.d.ts.map +1 -1
  106. package/dist/types/protocol/auth.d.ts +10 -7
  107. package/dist/types/protocol/auth.d.ts.map +1 -1
  108. package/dist/types/protocol/clis.d.ts +4 -3
  109. package/dist/types/protocol/clis.d.ts.map +1 -1
  110. package/dist/types/protocol/config.d.ts +2 -0
  111. package/dist/types/protocol/config.d.ts.map +1 -1
  112. package/dist/types/protocol/conversation.d.ts +3 -3
  113. package/dist/types/protocol/credentials.d.ts +8 -0
  114. package/dist/types/protocol/credentials.d.ts.map +1 -1
  115. package/dist/types/protocol/execution.d.ts +1 -1
  116. package/dist/types/protocol/harness.d.ts +5 -2
  117. package/dist/types/protocol/harness.d.ts.map +1 -1
  118. package/dist/types/protocol/lifecycle.d.ts +8 -8
  119. package/dist/types/protocol/models.d.ts +3 -0
  120. package/dist/types/protocol/models.d.ts.map +1 -1
  121. package/dist/types/protocol/wire-api.d.ts +39 -29
  122. package/dist/types/protocol/wire-api.d.ts.map +1 -1
  123. package/dist/types/protocol/wire.d.ts +13 -10
  124. package/dist/types/protocol/wire.d.ts.map +1 -1
  125. package/dist/types/server/install.d.ts +2 -1
  126. package/dist/types/server/install.d.ts.map +1 -1
  127. package/docs/consuming.md +6 -0
  128. package/docs/deploy.md +17 -8
  129. package/docs/harnesses.md +166 -44
  130. package/package.json +1 -1
  131. package/src/core/agents/acp/account.ts +158 -0
  132. package/src/core/agents/acp/acp-agent.ts +288 -178
  133. package/src/core/agents/acp/adapter.ts +126 -35
  134. package/src/core/agents/acp/client.ts +196 -49
  135. package/src/core/agents/acp/known-agents.ts +14 -5
  136. package/src/core/agents/acp/mappings.ts +112 -21
  137. package/src/core/agents/acp/models.ts +72 -0
  138. package/src/core/agents/acp/profile.ts +127 -0
  139. package/src/core/agents/acp/prompts.ts +287 -0
  140. package/src/core/agents/acp/requests.ts +16 -9
  141. package/src/core/agents/claude-code/login.ts +4 -1
  142. package/src/core/agents/claude-code/session.ts +38 -8
  143. package/src/core/agents/claude-code/spawn.ts +0 -26
  144. package/src/core/agents/codex-app-server/client.ts +11 -18
  145. package/src/core/agents/codex-app-server/login.ts +4 -5
  146. package/src/core/agents/gemini/failures.ts +148 -0
  147. package/src/core/agents/gemini/login.ts +188 -0
  148. package/src/core/agents/gemini/profile.ts +162 -0
  149. package/src/core/agents/gemini/tools.ts +99 -0
  150. package/src/core/agents/login.ts +14 -8
  151. package/src/core/agents/stderr-tail.ts +5 -2
  152. package/src/core/presets.ts +15 -2
  153. package/src/core/processes/native-processes.ts +32 -1
  154. package/src/core/provision/checksums.ts +12 -2
  155. package/src/core/provision/install-build.ts +122 -55
  156. package/src/core/provision/pins.ts +5 -0
  157. package/src/core/provision/provisioner.ts +62 -27
  158. package/src/core/provision/releases.ts +47 -1
  159. package/src/core/provision/tools.ts +124 -31
  160. package/src/operator/errors.ts +5 -2
  161. package/src/operator/operator.ts +181 -77
  162. package/src/operator/render.ts +60 -28
  163. package/src/operator/session-tools.ts +2 -1
  164. package/src/operator/types.ts +1 -0
  165. package/src/protocol/account.ts +5 -2
  166. package/src/protocol/auth.ts +5 -1
  167. package/src/protocol/credentials.ts +11 -2
  168. package/src/protocol/harness.ts +9 -1
  169. package/src/server/bin.ts +20 -6
  170. package/src/server/install.ts +6 -3
@@ -1,5 +1,5 @@
1
- import type { ContentBlock, McpServer, PermissionOption, RequestPermissionRequest, RequestPermissionResponse, ToolCallContent, ToolCallLocation } from "@agentclientprotocol/sdk";
2
- import type { AgentInput, McpServerConfig, PermissionMode, PermissionToolCall, ToolKind, ToolLocation, ToolResultContent } from "../../../protocol/index.ts";
1
+ import type { ContentBlock, McpServer, PermissionOption, RequestPermissionRequest, RequestPermissionResponse, SessionConfigOption, ToolCallContent, ToolCallLocation } from "@agentclientprotocol/sdk";
2
+ import type { AgentInput, FileKind, McpServerConfig, McpTool, PermissionMode, PermissionToolCall, ToolKind, ToolLocation, ToolResultContent } from "../../../protocol/index.ts";
3
3
  /**
4
4
  * The single bridge between ACP's vocabulary and the engine's. Everything here
5
5
  * is a pure conversion shared by the agent (outbound requests, permission
@@ -28,6 +28,12 @@ export interface AcpPromptCapabilities {
28
28
  image: boolean;
29
29
  embeddedContext: boolean;
30
30
  }
31
+ /**
32
+ * Refuse a file of a kind the harness does not offer (`capabilities.files`),
33
+ * before any agent starts: what an agent says it embeds is not what it reads,
34
+ * so the harness's own list decides (LLP 0020, decision 13).
35
+ */
36
+ export declare function refuseFiles(input: AgentInput, harness: string, files: readonly FileKind[]): void;
31
37
  /**
32
38
  * Engine turn input → ACP prompt content blocks. Every agent takes text and
33
39
  * resource links; image data needs the `image` capability and inline files
@@ -35,8 +41,15 @@ export interface AcpPromptCapabilities {
35
41
  * the agent cannot take fails the turn instead of vanishing.
36
42
  */
37
43
  export declare function toPromptBlocks(input: AgentInput, prompt: AcpPromptCapabilities): ContentBlock[];
38
- /** ACP permission request → the engine's PermissionToolCall (SDK-validated, no casts). */
39
- export declare function permissionToolCall(request: RequestPermissionRequest): PermissionToolCall;
44
+ /**
45
+ * ACP permission request → the engine's PermissionToolCall (SDK-validated, no
46
+ * casts). `described` is what the harness's tool rules read of the call
47
+ * (`AcpProfile.stream`): an ACP agent names its tools by no rule of its own.
48
+ */
49
+ export declare function permissionToolCall(request: RequestPermissionRequest, described?: {
50
+ mcp?: McpTool;
51
+ command?: string;
52
+ }): PermissionToolCall;
40
53
  export declare const CANCELLED_OUTCOME: RequestPermissionResponse;
41
54
  /**
42
55
  * Pick the option matching the decision: allow → `allow_once` only, deny →
@@ -47,10 +60,43 @@ export declare const CANCELLED_OUTCOME: RequestPermissionResponse;
47
60
  */
48
61
  export declare function chooseOutcome(options: PermissionOption[], allow: boolean): RequestPermissionResponse;
49
62
  /**
50
- * Decide an ACP permission request without the engine broker: mirrors the
51
- * codex posture where only `default` mode asks — every other mode auto-decides.
63
+ * Whether a request is the user's to answer in `mode`, when the turn has a
64
+ * broker: everything in `default`; in `accept_edits` what is neither an edit
65
+ * nor a read, as Claude and Codex ask for a command in that mode. Every other
66
+ * mode decides by itself (`autoDecide`).
67
+ */
68
+ export declare function asksInMode(request: RequestPermissionRequest, mode: PermissionMode): boolean;
69
+ /**
70
+ * Decide an ACP permission request without the engine broker:
71
+ * `bypass_permissions` allows everything, `accept_edits` edits and reads, and
72
+ * every other mode denies.
52
73
  */
53
74
  export declare function autoDecide(request: RequestPermissionRequest, mode: PermissionMode | undefined): RequestPermissionResponse;
54
- /** An ACP mode id the engine has a name for: its own, or Claude's (claude-agent-acp). */
75
+ /** An ACP mode id the engine has a name for: its own, or Claude's (claude-agent-acp), however it is cased and separated. */
55
76
  export declare function permissionModeOf(modeId: string): PermissionMode | undefined;
77
+ /** An agent's own id for an engine mode, where its ids name none (`AcpProfile.modeIds`). */
78
+ export type ModeIds = Partial<Record<PermissionMode, string>>;
79
+ /**
80
+ * An agent's mode ids and the engine's modes, each way: the agent's own ids
81
+ * first (`own`), then the ids that name a mode (`permissionModeOf`).
82
+ */
83
+ export declare function modeNames(own?: ModeIds): {
84
+ /** The engine's mode an agent's mode id is, when the engine can name it. */
85
+ modeOf: (modeId: string) => PermissionMode | undefined;
86
+ /** The agent's id for `mode`, of the ids it offers. */
87
+ idOf: (mode: PermissionMode, offered: readonly string[]) => string | undefined;
88
+ };
89
+ /** A select config option (`model`, `thought_level`). */
90
+ export type SelectOption = SessionConfigOption & {
91
+ type: "select";
92
+ };
93
+ /** Every choice a select option offers, whether listed flat or in groups. */
94
+ export declare function selectableChoices(option: SelectOption): Array<{
95
+ value: string;
96
+ name: string;
97
+ }>;
98
+ /** Every value a select option offers. */
99
+ export declare function selectableValues(option: SelectOption): string[];
100
+ /** The agent's select option of a category, as it stands. */
101
+ export declare function selectOf(options: readonly SessionConfigOption[], category: "model" | "thought_level"): SelectOption | undefined;
56
102
  //# sourceMappingURL=mappings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mappings.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/acp/mappings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,YAAY,EACZ,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,UAAU,CACzB,OAAO,EAAE,wBAAwB,EACjC,IAAI,EAAE,cAAc,GAAG,SAAS,GAC9B,yBAAyB,CAM3B;AAED,yFAAyF;AACzF,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAY3E"}
1
+ {"version":3,"file":"mappings.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/acp/mappings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,wBAAwB,EACxB,yBAAyB,EACzB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EACX,UAAU,EACV,QAAQ,EACR,eAAe,EACf,OAAO,EACP,cAAc,EACd,kBAAkB,EAClB,QAAQ,EACR,YAAY,EACZ,iBAAiB,EACjB,MAAM,4BAA4B,CAAC;AAUpC;;;;;;GAMG;AAGH,gFAAgF;AAChF,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAEhF;AAED,4FAA4F;AAC5F,wBAAgB,eAAe,CAC9B,SAAS,EAAE,gBAAgB,EAAE,GAAG,IAAI,GAAG,SAAS,GAC9C,YAAY,EAAE,GAAG,SAAS,CAG5B;AAGD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAClC,OAAO,EAAE,eAAe,EAAE,GAAG,IAAI,GAAG,SAAS,GAC3C,iBAAiB,EAAE,CAcrB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC9B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,SAAS,GACrD,SAAS,EAAE,CAkBb;AAED,sFAAsF;AACtF,MAAM,WAAW,qBAAqB;IACrC,KAAK,EAAE,OAAO,CAAC;IACf,eAAe,EAAE,OAAO,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAA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,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AAEpE,6EAA6E;AAC7E,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAM9F;AAED,0CAA0C;AAC1C,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,EAAE,CAE/D;AAED,6DAA6D;AAC7D,wBAAgB,QAAQ,CACvB,OAAO,EAAE,SAAS,mBAAmB,EAAE,EACvC,QAAQ,EAAE,OAAO,GAAG,eAAe,GACjC,YAAY,GAAG,SAAS,CAI1B"}
@@ -0,0 +1,22 @@
1
+ import type { AgentHarness, ModelDescriptor } from "../../../protocol/index.ts";
2
+ import type { ListModelsOptions } from "../base.ts";
3
+ import { type AcpAccount } from "./account.ts";
4
+ import { type SelectOption } from "./mappings.ts";
5
+ /**
6
+ * The model a turn that names none runs, for a harness that lists its
7
+ * models: the agent's current one when the harness offers it, else the first
8
+ * the agent lists that it offers (a person's own default may be another
9
+ * vendor's model), else none.
10
+ */
11
+ export declare function defaultModel(option: SelectOption, offers: (value: string) => boolean): string | undefined;
12
+ /**
13
+ * The models an agent offers, from a session with no turn: each value of its
14
+ * `model` option that `offers` takes, labelled by the option's name, the
15
+ * default the one a turn naming none runs (`defaultModel`). A model's levels
16
+ * are those its `thought_level` offers once it is set, which change with the
17
+ * model, so each is set in turn; only the default model's level is its own,
18
+ * the others carrying over the one set before. The read stops between models
19
+ * once `signal` aborts.
20
+ */
21
+ export declare function listAcpModels(account: AcpAccount, harness: AgentHarness, offers: (value: string) => boolean, options: ListModelsOptions): Promise<ModelDescriptor[]>;
22
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/acp/models.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,OAAO,EAAE,KAAK,UAAU,EAA8B,MAAM,cAAc,CAAC;AAC3E,OAAO,EAAE,KAAK,YAAY,EAAiD,MAAM,eAAe,CAAC;AAGjG;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,sBAMpF;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC5B,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,EAClC,OAAO,EAAE,iBAAiB,GACxB,OAAO,CAAC,eAAe,EAAE,CAAC,CAmC5B"}
@@ -0,0 +1,92 @@
1
+ import type { InitializeResponse } from "@agentclientprotocol/sdk";
2
+ import type { AgentCapabilities, AgentHarness, McpTool, RunConfig } from "../../../protocol/index.ts";
3
+ import type { AgentExecuteOptions } from "../base.ts";
4
+ import type { CliLogin } from "../login.ts";
5
+ import type { AcpAccount } from "./account.ts";
6
+ import type { AcpLaunch } from "./client.ts";
7
+ import type { ModeIds } from "./mappings.ts";
8
+ /** A tool call as the agent names it: ACP's `name`, its input, and once it ended its output. */
9
+ export interface AcpToolCall {
10
+ name?: string | null;
11
+ rawInput?: unknown;
12
+ rawOutput?: unknown;
13
+ }
14
+ /** What a harness reads of its agent's tool calls beyond ACP's kind and text (LLP 0002). */
15
+ export interface AcpToolRules {
16
+ /**
17
+ * What a call acts on, from the agent's own names: its MCP server and
18
+ * tool, told apart against the session's own server names, and a
19
+ * command's line. What it does not say is left out.
20
+ */
21
+ describe(call: AcpToolCall, servers: readonly string[]): {
22
+ mcp?: McpTool;
23
+ command?: string;
24
+ };
25
+ /**
26
+ * A finished call's output, where the agent's `rawOutput` holds it: its
27
+ * text, a command's exit code (`metadata.exitCode`; non-zero fails the
28
+ * call), and `failed` for a call the agent says did not run, with no exit
29
+ * code to say it (the text then says why). Undefined: ACP's reading.
30
+ */
31
+ output?(call: AcpToolCall): {
32
+ text: string;
33
+ exitCode?: number;
34
+ failed?: boolean;
35
+ } | undefined;
36
+ }
37
+ /**
38
+ * What one ACP agent decides that the protocol does not: the name it runs
39
+ * under, what it supports (`capabilities.steering`: a prompt sent while one
40
+ * runs is input to the running turn), how it starts, and where it departs
41
+ * from what its `initialize` says. The protocol is `ProfiledAcpAgent`'s, so a harness
42
+ * that runs one agent over ACP is a profile, never a second client; it
43
+ * reaches the agent only through its harness's registration
44
+ * (`ProfiledAcpAgent`). Operator-level only: nothing in it comes from the
45
+ * wire.
46
+ */
47
+ export interface AcpProfile {
48
+ /** The harness it runs under: its turns, its processes and its host-tool leases say so. */
49
+ readonly harness: AgentHarness;
50
+ /** What it supports (LLP 0001, D22). */
51
+ readonly capabilities: AgentCapabilities;
52
+ /**
53
+ * The agent subprocess to start, undefined when none is configured. Never
54
+ * from the wire: the command is arbitrary code execution.
55
+ */
56
+ launch(): Promise<AcpLaunch | undefined> | AcpLaunch | undefined;
57
+ /** Throws for a turn it cannot run (a setting the agent cannot honour), first in the turn, before anything starts. */
58
+ admit?(options: AgentExecuteOptions): void;
59
+ /** Throws for an agent it cannot drive (a version below its floor), at once after `initialize`. */
60
+ accept?(init: InitializeResponse): void;
61
+ /** The agent takes HTTP MCP servers, though its `initialize` does not say so. */
62
+ readonly httpMcp?: boolean;
63
+ /** The agent's own id for an engine mode, where its ids name none (`permissionModeOf`). */
64
+ readonly modeIds?: ModeIds;
65
+ /**
66
+ * What a new conversation starts with and keeps for its life: `meta(options)`
67
+ * goes with `session/new`, never with a resume or a load. A later turn on
68
+ * that conversation whose `meta` differs did not apply `settings`.
69
+ */
70
+ readonly newSession?: {
71
+ readonly settings: readonly (keyof RunConfig)[];
72
+ meta(options: AgentExecuteOptions): Record<string, unknown> | undefined;
73
+ };
74
+ /**
75
+ * Present: the harness lists its models, and a turn runs only one it
76
+ * `offers`, also when it names none. Absent: a turn names any the agent
77
+ * offers.
78
+ */
79
+ readonly models?: {
80
+ offers(value: string): boolean;
81
+ };
82
+ /** What its tool calls are beyond ACP's kind; the harness's adapter reads them the same. */
83
+ readonly tools?: AcpToolRules;
84
+ /**
85
+ * Its CLI's own login (`Agent.login`), which reads the account through
86
+ * the agent's own sessions with no turn. Absent: the agent signs in on its own.
87
+ */
88
+ login?(account: AcpAccount): CliLogin;
89
+ }
90
+ /** The `acp` harness: any ACP v1 agent the operator launches, taken at its `initialize`'s word. */
91
+ export declare function genericAcpProfile(launch: AcpProfile["launch"]): AcpProfile;
92
+ //# sourceMappingURL=profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/acp/profile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EACX,iBAAiB,EACjB,YAAY,EACZ,OAAO,EACP,SAAS,EACT,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,gGAAgG;AAChG,MAAM,WAAW,WAAW;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,4FAA4F;AAC5F,MAAM,WAAW,YAAY;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,WA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IACrD,4FAA4F;IAC5F,QAAQ,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;IAC9B;;;OAGG;IACH,KAAK,CAAC,CAAC,OAAO,EAAE,UAAU,GAAG,QAAQ,CAAC;CACtC;AAmCD,mGAAmG;AACnG,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,GAAG,UAAU,CAE1E"}
@@ -0,0 +1,108 @@
1
+ import type { ContentBlock, PromptResponse, SessionUpdate } from "@agentclientprotocol/sdk";
2
+ import type { AgentRequests } from "./client.ts";
3
+ /** How a turn's prompts end, and the steers the agent read on the way. */
4
+ export interface PromptEnds {
5
+ /** The agent read a steer: its echo goes before what the agent says next. */
6
+ read(steerId: string): void;
7
+ /** No prompt is in flight: the newest prompt's stop reason, the usage summed over every answer. */
8
+ ended(result: Pick<PromptResponse, "stopReason" | "usage">): void;
9
+ /** The turn's own prompt failed, and no prompt is in flight. */
10
+ failed(error: unknown): void;
11
+ }
12
+ export interface TurnPromptsOptions {
13
+ /** Send a prompt on the turn's session. */
14
+ send(prompt: ContentBlock[]): Promise<PromptResponse>;
15
+ /** What the agent asks, for a turn that takes steers (`AcpClient.asking`). */
16
+ asking?: AgentRequests;
17
+ /** The turn's: once aborted no steer is sent, and those left are undelivered. */
18
+ signal: AbortSignal;
19
+ ends: PromptEnds;
20
+ }
21
+ /**
22
+ * The prompts a turn has in flight: its own, then each steer, sent as a
23
+ * prompt of its own to an agent that takes a prompt while one runs as input
24
+ * to the running turn (Antigravity). Such an agent answers the prompt before
25
+ * at once (`end_turn`, the usage of the steps it finished) and goes on; it
26
+ * refuses a prompt while it asks the person.
27
+ *
28
+ * - Order: steers wait in order, and the head stays the head until it is
29
+ * settled. It is sent once the agent asks nothing (`asking`); it is taken
30
+ * when the prompt before it answers, and refused when its own prompt
31
+ * fails. A refused head goes again, in place, only when a request of the
32
+ * agent's arrived after it was sent (the two crossed); refused with none
33
+ * between, it is undelivered, and the next steer is the head.
34
+ * - Read: a taken steer is read by the first model call that starts after
35
+ * it was taken; the call running then goes on without it. A call ends with
36
+ * a usage report (`usage_update`, after every call; its tool calls are
37
+ * announced after it), and its output is its message and thought chunks.
38
+ * Taken while a call streams (from its first chunk to its usage report),
39
+ * it waits for that report, whatever tool calls are open (a command left
40
+ * running in the background). Otherwise, while a tool call of the turn is
41
+ * open, or after a call's usage report or the end of its last open tool
42
+ * call with no chunk since, no call is known to run: it is read at the
43
+ * next chunk, or the next usage report for a call that made none. After a tool ends the wire cannot
44
+ * tell whether Antigravity's next call carries it (one run of three did):
45
+ * the echo is then one message early at worst, never after its reply. Otherwise one usage report must pass first, then the same. A steer's
46
+ * own answer reads nothing (a later steer supersedes it at once); one still
47
+ * unread when the turn ends with its prompts answered, cancelled included,
48
+ * is read then, and none when the turn fails. The echo goes out just before
49
+ * what it is read at (`update`). One whose own prompt fails was never read,
50
+ * and is undelivered.
51
+ * - Result: the turn ends when no prompt is in flight, with the stop reason
52
+ * of the newest prompt sent that answered and the usage of every answer.
53
+ */
54
+ export declare class TurnPrompts {
55
+ private readonly options;
56
+ private readonly flying;
57
+ /** Steers not yet taken, the head first. */
58
+ private readonly waiting;
59
+ /** Steers taken and not yet read, in order. */
60
+ private readonly taken;
61
+ /** The turn's tool calls not yet `completed` or `failed`: while one is, no model call runs. */
62
+ private readonly tools;
63
+ /** The turn has made a chunk or a tool update. */
64
+ private produced;
65
+ /** No call's output since a call (its usage report, after output) or the last open tool call ended. */
66
+ private betweenCalls;
67
+ /** A model call is streaming, for certain: from a chunk to the next usage report. */
68
+ private streaming;
69
+ private sent;
70
+ private newest?;
71
+ private usage?;
72
+ private failure?;
73
+ private done;
74
+ private pumping;
75
+ private settle;
76
+ /** Settles once no prompt is in flight, or the agent is gone. */
77
+ readonly settled: Promise<void>;
78
+ constructor(options: TurnPromptsOptions);
79
+ /** Whether the turn still takes a prompt. */
80
+ get open(): boolean;
81
+ /** The turn's own prompt. */
82
+ start(prompt: ContentBlock[]): void;
83
+ /** A steer: it waits behind the steers before it. */
84
+ steer(steerId: string, prompt: ContentBlock[]): void;
85
+ /**
86
+ * An update of the turn's session, before it goes out: a chunk reads the
87
+ * steers taken whose call has started, a usage report ends a call.
88
+ */
89
+ update(update: SessionUpdate): void;
90
+ /** How many steers taken, in order, are past every usage report they waited for. */
91
+ private ready;
92
+ /** The agent is gone: nothing more is told. */
93
+ close(): void;
94
+ private send;
95
+ private answered;
96
+ private refused;
97
+ /** The head is taken: the next steer is the head. */
98
+ private take;
99
+ /** Read the first `count` steers taken. */
100
+ private read;
101
+ /** Send the head once the agent asks nothing, unless it is in flight already. */
102
+ private pump;
103
+ /** Whether a steer may still go: the turn runs, and its own prompt has not failed. */
104
+ private get sending();
105
+ private remove;
106
+ private endIfIdle;
107
+ }
108
+ //# sourceMappingURL=prompts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/acp/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAS,MAAM,0BAA0B,CAAC;AACnG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAkCjD,0EAA0E;AAC1E,MAAM,WAAW,UAAU;IAC1B,6EAA6E;IAC7E,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,mGAAmG;IACnG,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,cAAc,EAAE,YAAY,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC;IAClE,gEAAgE;IAChE,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,kBAAkB;IAClC,2CAA2C;IAC3C,IAAI,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IACtD,8EAA8E;IAC9E,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,iFAAiF;I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OAAO,CAAC,QAAQ;IAgBhB,OAAO,CAAC,OAAO;IAef,qDAAqD;IACrD,OAAO,CAAC,IAAI;IAcZ,2CAA2C;IAC3C,OAAO,CAAC,IAAI;IAIZ,iFAAiF;YACnE,IAAI;IAqBlB,sFAAsF;IACtF,OAAO,KAAK,OAAO,GAElB;IAED,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,SAAS;CAcjB"}
@@ -1,6 +1,7 @@
1
1
  import type { CreateElicitationRequest, CreateElicitationResponse, RequestPermissionRequest, RequestPermissionResponse } from "@agentclientprotocol/sdk";
2
- import type { PermissionMode } from "../../../protocol/index.ts";
2
+ import type { McpTool, PermissionMode } from "../../../protocol/index.ts";
3
3
  import type { ElicitationRequestHandler, PermissionRequestHandler } from "../base.ts";
4
+ import type { AcpToolCall } from "./profile.ts";
4
5
  /**
5
6
  * What the turn running on a session answers the agent's requests with: set
6
7
  * and cleared as ONE value, so stale partial state (an authorization bypass)
@@ -20,6 +21,11 @@ export interface TurnScope {
20
21
  export interface RequestScope {
21
22
  readonly acpSessionId: string;
22
23
  turn?: TurnScope;
24
+ /** What the harness's tool rules read of a call (`AcpProfile.stream`). */
25
+ describe?(call: AcpToolCall): {
26
+ mcp?: McpTool;
27
+ command?: string;
28
+ };
23
29
  }
24
30
  /** Answer an agent permission request against the session's current turn. */
25
31
  export declare function answerPermission(scope: RequestScope, request: RequestPermissionRequest): Promise<RequestPermissionResponse>;
@@ -1 +1 @@
1
- {"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/acp/requests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAUtF;;;;;GAKG;AACH,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C;IAWrD,MAAM,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC;IAoBnD,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC;IAmG9D,MAAM,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;CASlD"}
@@ -59,6 +59,8 @@ export declare class ClaudeSession implements PooledProcess, PooledClient {
59
59
  private readonly planWindows;
60
60
  /** The `claude` process the engine started for it; none under an operator's spawner. */
61
61
  private native?;
62
+ /** The CLI was still running when the session asked it to stop. */
63
+ private stoppedCli;
62
64
  /** Its end, once it began: settles when its process is stopped. */
63
65
  private ending?;
64
66
  private readonly closeHandlers;
@@ -166,6 +168,7 @@ export declare class ClaudeSession implements PooledProcess, PooledClient {
166
168
  terminate(reason?: ClaudeSessionEndReason): Promise<void>;
167
169
  private end;
168
170
  private consumeEvents;
171
+ private failStream;
169
172
  /** What an event says of the session: its native id, its mode, plan windows, spend, steers read. */
170
173
  private observe;
171
174
  /** Hand an event to the running turn; a result answering it settles the turn. */
@@ -1 +1 @@
1
- {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/claude-code/session.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,mBAAmB,EAMnB,cAAc,EACd,MAAM,gCAAgC,CAAC;AAExC,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAMlF,OAAO,EAEN,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,WAAW,EACX,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EACN,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAM1B,MAAM,cAAc,CAAC;AAItB,OAAO,EAAE,WAAW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,WAAW;IAWnB,2FAA2F;IAC3F,OAAO,KAAK,SAAS,GAEpB;IAED;;;;;;;;;;OAUG;IACH,aAAa,CAAC,SAAS,SAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;IAM3D;;;;;OAKG;IACG,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,SAAS,SAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAO3E;;;;;;OAMG;IACG,YAAY,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YAKtD,SAAS;IAcvB;;;;;;;OAOG;YACW,eAAe;IAc7B,oEAAoE;YACtD,YAAY;IAe1B;;;;OAIG;IACH,SAAS,CAAC,MAAM,GAAE,sBAAmC,GAAG,OAAO,CAAC,IAAI,CAAC;YAUvD,GAAG;YA4BH,aAAa;YA4Bb,UAAU;IAgBxB,oGAAoG;IACpG,OAAO,CAAC,OAAO;IA2Bf,iFAAiF;IACjF,OAAO,CAAC,KAAK;IAgCb;;;OAGG;IACH,OAAO,CAAC,aAAa;IAcrB,OAAO,CAAC,OAAO;CAKf;AAED,sFAAsF;AACtF,MAAM,WAAW,cAAc;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,wFAAwF;IACxF,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,gFAAgF;AAChF,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;AAE3E;;;;GAIG;AACH,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,qBAAqB,GAAG,IAAI,CAAC,sBAAsB,EAAE,cAAc,CAAC,GAC5E,iBAAiB,CAiDnB"}
@@ -17,13 +17,5 @@ export interface ClaudeSpawn {
17
17
  * callback, which the SDK calls only from its own spawner, is called here.
18
18
  */
19
19
  export declare function claudeSpawner(spawn: ClaudeSpawn, operator?: Spawner, stderr?: (data: string) => void): Spawner;
20
- /**
21
- * Put the CLI's own words back into the SDK's exit error, as the SDK's own
22
- * spawner words it ("Claude Code process exited with code 1. stderr: …"):
23
- * the last 2 KB, trimmed, with its secrets redacted (the SDK redacts its own;
24
- * this marks each `[REDACTED]`). The SDK builds that tail only from its own
25
- * spawner. Its message alone changes, so the error keeps its class and fields.
26
- */
27
- export declare function withStderr(error: unknown, tail: string): unknown;
28
20
  export {};
29
21
  //# sourceMappingURL=spawn.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spawn.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/claude-code/spawn.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAgC,MAAM,gCAAgC,CAAC;AAC5F,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAK1F,KAAK,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC,CAAC;AAE9D,kFAAkF;AAClF,MAAM,WAAW,WAAW;IAC3B,SAAS,EAAE,eAAe,CAAC;IAC3B,sFAAsF;IACtF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iGAAiG;IACjG,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;CAC5C;AAqDD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC5B,KAAK,EAAE,WAAW,EAClB,QAAQ,CAAC,EAAE,OAAO,EAClB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAuCT;AAKD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAUhE"}
1
+ {"version":3,"file":"spawn.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/claude-code/spawn.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAgC,MAAM,gCAAgC,CAAC;AAC5F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AgB,GAAG,WAAW,CA4BpE;AAKD,kGAAkG;AAClG,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GAAG,MAAM,CAE/E;AAGD;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GAAG,MAAM,CAa9E;AAED,sGAAsG;AACtG,qBAAa,aAAc,YAAW,QAAQ;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,oBAAoB;IAE1D,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GAAG,MAAM;IAItD,gEAAgE;YAClD,IAAI;IAgBZ,OAAO,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAUrD,MAAM,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC;IASnD,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,WAAW,CAAC;IAuDpF,MAAM,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;CAGlD"}
@@ -0,0 +1,25 @@
1
+ import { type ErrorInfo } from "../../../protocol/index.ts";
2
+ import type { AcpRawEvent } from "../acp/adapter.ts";
3
+ import type { EventTransformer } from "../types.ts";
4
+ /**
5
+ * The failure an Antigravity message chunk reports, when the chunk's whole
6
+ * text is one of its wordings: the category from Google's status (its word
7
+ * in any case), `network` for a request that got no HTTP response, and any
8
+ * other executor error by its words (`classifyError`); the message Google's
9
+ * own sentence with its status, never the map dump of `Details`, or the
10
+ * executor's words as they are.
11
+ */
12
+ export declare function antigravityFailure(text: string): ErrorInfo | undefined;
13
+ /**
14
+ * The gemini adapter's reading of a failed model call, in front of the ACP
15
+ * adapter: Antigravity never fails a prompt for it, but sends one message
16
+ * chunk saying so (`antigravityFailure`) and answers `end_turn`. Such a chunk
17
+ * is held; any later content of the turn (`isContent`) lets it go as the
18
+ * text it is, in its place, while updates that are not content do not. A
19
+ * steer read waits behind it: after the chunk once it goes, or before the
20
+ * turn's end (the agent took the steer). At the prompt's answer a chunk still
21
+ * held fails the turn instead, with its category and message and the
22
+ * answer's usage; a cancelled prompt stays cancelled, its words shown.
23
+ */
24
+ export declare function antigravityFailures(acp: EventTransformer<AcpRawEvent>): EventTransformer<AcpRawEvent>;
25
+ //# sourceMappingURL=failures.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"failures.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/gemini/failures.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,SAAS,EAAiB,MAAM,4BAA4B,CAAC;AAC/F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AA6CpD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAatE;AAoBD;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAClC,GAAG,EAAE,gBAAgB,CAAC,WAAW,CAAC,GAChC,gBAAgB,CAAC,WAAW,CAAC,CA6C/B"}
@@ -0,0 +1,28 @@
1
+ import type { AuthMethod } from "../../../protocol/index.ts";
2
+ import { type AcpAccount } from "../acp/account.ts";
3
+ import { type CliLogin, type LoginOptions, type LoginStatus, type NativeLogin } from "../login.ts";
4
+ /**
5
+ * The Antigravity CLI's login: one per OS user, in the system keyring
6
+ * (`store` absent), whatever folder flags it runs with. Its status is a
7
+ * session the agent opens, or refuses; sign-in is `agy acp --login`; sign-out
8
+ * the agent's ACP `logout`.
9
+ */
10
+ export declare class AntigravityCliLogin implements CliLogin {
11
+ private readonly account;
12
+ constructor(account: AcpAccount);
13
+ /**
14
+ * Its sign-ins, and the command that runs one in a terminal, with the
15
+ * launch's fixed environment: refused, as a turn is, with no agy to run.
16
+ */
17
+ methods(_options: LoginOptions): Promise<AuthMethod[]>;
18
+ status(options: LoginOptions): Promise<LoginStatus>;
19
+ /**
20
+ * `agy acp --login`: it prints the sign-in address, then reads the code
21
+ * the page shows from stdin, and exits 0 once it stored the login. A desktop
22
+ * agy also opens the browser itself.
23
+ */
24
+ start(id: string, options: LoginOptions): Promise<NativeLogin>;
25
+ /** The method Google documents, ACP `logout`: it removes the OS keyring entry (LLP 0020.002). */
26
+ logout(options: LoginOptions): Promise<void>;
27
+ }
28
+ //# sourceMappingURL=login.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/gemini/login.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAK7D,OAAO,EAAE,KAAK,UAAU,EAAsC,MAAM,mBAAmB,CAAC;AACxF,OAAO,EACN,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,WAAW,EAGhB,MAAM,aAAa,CAAC;AAqDrB;;;;;GAKG;AACH,qBAAa,mBAAoB,YAAW,QAAQ;IACvC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,UAAU;IAEhD;;;OAGG;IACG,OAAO,CAAC,QAAQ,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAMtD,MAAM,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC;IAWzD;;;;OAIG;IACG,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC;IAkEpE,iGAAiG;IAC3F,MAAM,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;CAQlD"}
@@ -0,0 +1,30 @@
1
+ import { type AcpAgentOptions, ProfiledAcpAgent } from "../acp/acp-agent.ts";
2
+ import type { AcpProfile } from "../acp/profile.ts";
3
+ import type { InheritConfig } from "../inherit-config.ts";
4
+ import type { AdapterFactory } from "../types.ts";
5
+ /** The oldest Antigravity CLI the harness drives: the one its behaviour was measured on. */
6
+ export declare const ANTIGRAVITY_FLOOR = "1.5.13";
7
+ /**
8
+ * A Gemini model, by its id: `gemini-<version>-…`. Antigravity also lists
9
+ * Claude and GPT-OSS models and its `gemini-pro-orchestrator-*` entries,
10
+ * which the harness does not offer.
11
+ */
12
+ export declare function isGeminiModel(id: string): boolean;
13
+ /** What the gemini harness is made with: the operator's, never the wire's. */
14
+ export interface GeminiOptions {
15
+ inheritConfig?: InheritConfig;
16
+ /** Where agy is: the registry's provisioner, as for the other harnesses. */
17
+ resolveCliPath: () => Promise<string | undefined>;
18
+ }
19
+ /**
20
+ * The `gemini` harness's profile: Google's Antigravity CLI (`agy acp`) on the
21
+ * person's own Antigravity sign-in, offering Gemini models only.
22
+ */
23
+ export declare function geminiProfile(options: GeminiOptions): AcpProfile;
24
+ /**
25
+ * The `gemini` harness as the registry registers it: the ACP agent on its
26
+ * profile, and the ACP adapter reading the same profile behind Antigravity's
27
+ * failure reading (`antigravityFailures`).
28
+ */
29
+ export declare function geminiHarness(options: GeminiOptions & Omit<AcpAgentOptions, "resolveLaunch">): [ProfiledAcpAgent, AdapterFactory];
30
+ //# sourceMappingURL=profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/gemini/profile.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,eAAe,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE7E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAKlD,4FAA4F;AAC5F,eAAO,MAAM,iBAAiB,WAAW,CAAC;AA8B1C;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAEjD;AAwDD,8EAA8E;AAC9E,MAAM,WAAW,aAAa;IAC7B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,4EAA4E;IAC5E,cAAc,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAClD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,UAAU,CA2BhE;AAGD;;;;GAIG;AACH,wBAAgB,aAAa,CAC5B,OAAO,EAAE,aAAa,GAAG,IAAI,CAAC,eAAe,EAAE,eAAe,CAAC,GAC7D,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAOpC"}
@@ -0,0 +1,18 @@
1
+ import type { McpTool } from "../../../protocol/index.ts";
2
+ import type { AcpToolRules } from "../acp/profile.ts";
3
+ /**
4
+ * The server and tool of an MCP call, against the session's own server
5
+ * names, the longest that fits first: Antigravity's `_` joins both and is
6
+ * in either, so a name it cannot tell apart that way names neither, nor do
7
+ * two servers it spells the same.
8
+ */
9
+ export declare function antigravityMcpTool(name: string, servers: readonly string[]): McpTool | undefined;
10
+ /**
11
+ * What an Antigravity tool call is beyond ACP's kind: `run_command`'s
12
+ * `CommandLine` is its command; an MCP tool is `mcp_<server>_<tool>` for a
13
+ * server the engine passed, and `call_mcp_tool` with `ServerName` and
14
+ * `ToolName` for one from a configuration file. Its other calls say nothing
15
+ * more, and nothing is guessed.
16
+ */
17
+ export declare const antigravityToolRules: AcpToolRules;
18
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/gemini/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAQtD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,GAAG,SAAS,CAahG;AAoDD;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,YAUlC,CAAC"}