@robota-sdk/agent-command 3.0.0-beta.100

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 (251) hide show
  1. package/CHANGELOG.md +1351 -0
  2. package/LICENSE +661 -0
  3. package/README.md +100 -0
  4. package/dist/node/index.cjs +121 -0
  5. package/dist/node/index.d.cts +1053 -0
  6. package/dist/node/index.d.cts.map +1 -0
  7. package/dist/node/index.d.ts +1053 -0
  8. package/dist/node/index.d.ts.map +1 -0
  9. package/dist/node/index.js +122 -0
  10. package/dist/node/index.js.map +1 -0
  11. package/package.json +83 -0
  12. package/src/advisor/advisor-command-module.ts +47 -0
  13. package/src/advisor/advisor-command.test.ts +102 -0
  14. package/src/advisor/advisor-command.ts +55 -0
  15. package/src/advisor/advisor-cost-functional.test.ts +92 -0
  16. package/src/advisor/index.ts +6 -0
  17. package/src/agent/__tests__/agent-command.test.ts +597 -0
  18. package/src/agent/agent-command-module.ts +89 -0
  19. package/src/agent/agent-command-parser.ts +180 -0
  20. package/src/agent/agent-command.ts +255 -0
  21. package/src/agent/index.ts +7 -0
  22. package/src/background/__tests__/background-command-module.test.ts +261 -0
  23. package/src/background/background-command-module.ts +52 -0
  24. package/src/background/background-command.ts +65 -0
  25. package/src/background/index.ts +6 -0
  26. package/src/command-module-utils.test.ts +37 -0
  27. package/src/command-module-utils.ts +35 -0
  28. package/src/compact/__tests__/compact-command-module.test.ts +181 -0
  29. package/src/compact/compact-command-module.ts +59 -0
  30. package/src/compact/compact-command.ts +33 -0
  31. package/src/compact/index.ts +6 -0
  32. package/src/context/__tests__/context-command-module.test.ts +502 -0
  33. package/src/context/auto-compact-format.ts +25 -0
  34. package/src/context/context-breakdown.ts +295 -0
  35. package/src/context/context-command-module.ts +82 -0
  36. package/src/context/context-command.ts +291 -0
  37. package/src/context/index.ts +6 -0
  38. package/src/default/__tests__/__snapshots__/model-exposure.test.ts.snap +121 -0
  39. package/src/default/__tests__/default-command-modules.test.ts +192 -0
  40. package/src/default/__tests__/model-exposure.test.ts +269 -0
  41. package/src/default/__tests__/org-policy-forwarding.test.ts +106 -0
  42. package/src/default/__tests__/provider-environment-forwarding.test.ts +98 -0
  43. package/src/default/default-command-modules.ts +247 -0
  44. package/src/default/index.ts +5 -0
  45. package/src/devices/__tests__/devices-command-module.test.ts +299 -0
  46. package/src/devices/devices-command-module.ts +308 -0
  47. package/src/devices/devices-command-port.ts +143 -0
  48. package/src/devices/index.ts +14 -0
  49. package/src/doctor/__tests__/doctor-command-module.test.ts +145 -0
  50. package/src/doctor/__tests__/doctor-display-vocabulary.test.ts +38 -0
  51. package/src/doctor/__tests__/doctor-fixture.ts +146 -0
  52. package/src/doctor/__tests__/doctor-redaction.test.ts +29 -0
  53. package/src/doctor/__tests__/doctor-runner.test.ts +484 -0
  54. package/src/doctor/doctor-command-module.ts +132 -0
  55. package/src/doctor/doctor-extensions-probe.ts +323 -0
  56. package/src/doctor/doctor-node-deps.ts +88 -0
  57. package/src/doctor/doctor-redaction.ts +99 -0
  58. package/src/doctor/doctor-render.ts +70 -0
  59. package/src/doctor/doctor-repair.ts +136 -0
  60. package/src/doctor/doctor-runner.ts +122 -0
  61. package/src/doctor/doctor-settings-probe.ts +239 -0
  62. package/src/doctor/doctor-storage-probe.ts +187 -0
  63. package/src/doctor/doctor-types.ts +109 -0
  64. package/src/doctor/index.ts +32 -0
  65. package/src/editor/__tests__/editor-command-functional.test.ts +124 -0
  66. package/src/editor/editor-command-module.ts +53 -0
  67. package/src/editor/editor-command.ts +58 -0
  68. package/src/editor/index.ts +7 -0
  69. package/src/editor/resolve-editor.ts +21 -0
  70. package/src/effort/effort-command-module.ts +51 -0
  71. package/src/effort/effort-command.test.ts +203 -0
  72. package/src/effort/effort-command.ts +136 -0
  73. package/src/effort/index.ts +6 -0
  74. package/src/events/__tests__/events-command.test.ts +73 -0
  75. package/src/events/events-command-module.ts +49 -0
  76. package/src/events/events-command.ts +69 -0
  77. package/src/events/index.ts +2 -0
  78. package/src/exit/__tests__/exit-command-module.test.ts +61 -0
  79. package/src/exit/exit-command-module.ts +47 -0
  80. package/src/exit/exit-command.ts +26 -0
  81. package/src/exit/index.ts +6 -0
  82. package/src/fork/__tests__/fork-command.test.ts +184 -0
  83. package/src/fork/fork-command-module.ts +61 -0
  84. package/src/fork/fork-command.ts +162 -0
  85. package/src/fork/index.ts +8 -0
  86. package/src/git/__tests__/fake-git-port.ts +35 -0
  87. package/src/git/__tests__/git-command-module.test.ts +111 -0
  88. package/src/git/__tests__/git-commit.test.ts +185 -0
  89. package/src/git/git-command-module.ts +138 -0
  90. package/src/git/git-commit.ts +254 -0
  91. package/src/git/index.ts +20 -0
  92. package/src/goal/__tests__/goal-command.test.ts +80 -0
  93. package/src/goal/goal-command-module.ts +49 -0
  94. package/src/goal/goal-command.ts +69 -0
  95. package/src/goal/index.ts +6 -0
  96. package/src/handoff/__tests__/handoff-command-module.test.ts +25 -0
  97. package/src/handoff/__tests__/handoff-command.test.ts +218 -0
  98. package/src/handoff/handoff-command-module.ts +49 -0
  99. package/src/handoff/handoff-command.ts +187 -0
  100. package/src/handoff/index.ts +6 -0
  101. package/src/help/__tests__/help-command-module.test.ts +134 -0
  102. package/src/help/__tests__/help-command.test.ts +130 -0
  103. package/src/help/help-command-module.ts +47 -0
  104. package/src/help/help-command.ts +11 -0
  105. package/src/help/index.ts +6 -0
  106. package/src/index.ts +163 -0
  107. package/src/keybindings/__tests__/keybindings-command-module.test.ts +57 -0
  108. package/src/keybindings/index.ts +6 -0
  109. package/src/keybindings/keybindings-command-module.ts +88 -0
  110. package/src/language/__tests__/language-command-module.test.ts +126 -0
  111. package/src/language/index.ts +6 -0
  112. package/src/language/language-command-module.ts +55 -0
  113. package/src/language/language-command.ts +52 -0
  114. package/src/mcp-activation/__tests__/mcp-activation-command.test.ts +895 -0
  115. package/src/mcp-activation/__tests__/mcp-model-view.test.ts +242 -0
  116. package/src/mcp-activation/__tests__/mcp-skill-command.test.ts +141 -0
  117. package/src/mcp-activation/index.ts +12 -0
  118. package/src/mcp-activation/mcp-activation-command-module.ts +123 -0
  119. package/src/mcp-activation/mcp-activation-command.ts +662 -0
  120. package/src/mcp-activation/mcp-model-notice.ts +99 -0
  121. package/src/mcp-activation/mcp-model-status.ts +104 -0
  122. package/src/memory/__tests__/memory-command-module.test.ts +476 -0
  123. package/src/memory/__tests__/memory-command-unavailable.test.ts +63 -0
  124. package/src/memory/index.ts +6 -0
  125. package/src/memory/memory-command-module.ts +77 -0
  126. package/src/memory/memory-command.ts +326 -0
  127. package/src/mode/__tests__/mode-command-module.test.ts +230 -0
  128. package/src/mode/index.ts +6 -0
  129. package/src/mode/mode-command-module.ts +55 -0
  130. package/src/mode/mode-command.ts +67 -0
  131. package/src/model/__tests__/model-command-module.test.ts +80 -0
  132. package/src/model/__tests__/model-command.test.ts +265 -0
  133. package/src/model/index.ts +6 -0
  134. package/src/model/model-command-module.ts +56 -0
  135. package/src/model/model-command.ts +249 -0
  136. package/src/output-style/__tests__/output-style-command.test.ts +96 -0
  137. package/src/output-style/index.ts +6 -0
  138. package/src/output-style/output-style-command-module.ts +143 -0
  139. package/src/peers/__tests__/peers-command-module.test.ts +24 -0
  140. package/src/peers/__tests__/peers-command.test.ts +399 -0
  141. package/src/peers/index.ts +9 -0
  142. package/src/peers/peers-command-module.ts +49 -0
  143. package/src/peers/peers-command.ts +220 -0
  144. package/src/permissions/__tests__/permissions-command-module.test.ts +276 -0
  145. package/src/permissions/index.ts +6 -0
  146. package/src/permissions/permissions-command-module.ts +55 -0
  147. package/src/permissions/permissions-command.ts +89 -0
  148. package/src/plan/__tests__/plan-command.test.ts +129 -0
  149. package/src/plan/index.ts +9 -0
  150. package/src/plan/plan-command-module.ts +49 -0
  151. package/src/plan/plan-command.ts +92 -0
  152. package/src/plugin/__tests__/plugin-active-turn.test.ts +100 -0
  153. package/src/plugin/__tests__/plugin-command-module.test.ts +300 -0
  154. package/src/plugin/__tests__/plugin-host-boundary.test.ts +11 -0
  155. package/src/plugin/index.ts +7 -0
  156. package/src/plugin/plugin-command-module.ts +85 -0
  157. package/src/plugin/plugin-command.ts +271 -0
  158. package/src/preset/__tests__/host-supplied-preset-registry.test.ts +98 -0
  159. package/src/preset/__tests__/preset-command-module.test.ts +220 -0
  160. package/src/preset/index.ts +6 -0
  161. package/src/preset/preset-command-module.ts +80 -0
  162. package/src/preset/preset-command.ts +148 -0
  163. package/src/provider/__tests__/optional-provider-credentials.test.ts +130 -0
  164. package/src/provider/__tests__/org-policy.test.ts +174 -0
  165. package/src/provider/__tests__/provider-command-module.test.ts +884 -0
  166. package/src/provider/__tests__/provider-connection-setup.test.ts +567 -0
  167. package/src/provider/__tests__/provider-reference-switch.test.ts +113 -0
  168. package/src/provider/__tests__/provider-setup-flow.test.ts +244 -0
  169. package/src/provider/__tests__/provider-startup-host-settings.test.ts +16 -0
  170. package/src/provider/__tests__/scripted-interaction.ts +40 -0
  171. package/src/provider/index.ts +32 -0
  172. package/src/provider/provider-command-execution.ts +235 -0
  173. package/src/provider/provider-command-module.ts +82 -0
  174. package/src/provider/provider-command-profile-lifecycle.ts +239 -0
  175. package/src/provider/provider-command-profile-operations.ts +218 -0
  176. package/src/provider/provider-command-profile.ts +116 -0
  177. package/src/provider/provider-command-setup.ts +79 -0
  178. package/src/provider/provider-connection-setup.ts +287 -0
  179. package/src/provider/provider-connection-validation.ts +38 -0
  180. package/src/provider/provider-onboarding.ts +73 -0
  181. package/src/provider/provider-prompt-interaction.ts +28 -0
  182. package/src/provider/provider-setup-ask.ts +67 -0
  183. package/src/provider/provider-setup-flow.ts +326 -0
  184. package/src/provider/provider-startup.ts +225 -0
  185. package/src/remote-control/__tests__/remote-control-command-module.test.ts +36 -0
  186. package/src/remote-control/__tests__/remote-control-command.test.ts +216 -0
  187. package/src/remote-control/index.ts +8 -0
  188. package/src/remote-control/remote-control-command-module.ts +61 -0
  189. package/src/remote-control/remote-control-command.ts +138 -0
  190. package/src/reset/__tests__/reset-command-module.test.ts +63 -0
  191. package/src/reset/index.ts +2 -0
  192. package/src/reset/reset-command-module.ts +47 -0
  193. package/src/reset/reset-command.ts +10 -0
  194. package/src/rewind/__tests__/rewind-command-module.test.ts +287 -0
  195. package/src/rewind/index.ts +2 -0
  196. package/src/rewind/rewind-command-module.ts +56 -0
  197. package/src/rewind/rewind-command.ts +279 -0
  198. package/src/sandbox/__tests__/sandbox-command.test.ts +80 -0
  199. package/src/sandbox/index.ts +2 -0
  200. package/src/sandbox/sandbox-command-module.ts +56 -0
  201. package/src/sandbox/sandbox-command.ts +94 -0
  202. package/src/schedule/__tests__/loop-command-functional.test.ts +399 -0
  203. package/src/schedule/__tests__/loop-command.test.ts +594 -0
  204. package/src/schedule/__tests__/loop-jitter.test.ts +25 -0
  205. package/src/schedule/__tests__/monitor-model-permission-functional.test.ts +126 -0
  206. package/src/schedule/__tests__/schedule-command.test.ts +247 -0
  207. package/src/schedule/__tests__/schedule-redos.test.ts +114 -0
  208. package/src/schedule/index.ts +12 -0
  209. package/src/schedule/loop-command.ts +427 -0
  210. package/src/schedule/loop-jitter.ts +41 -0
  211. package/src/schedule/schedule-command-module.ts +184 -0
  212. package/src/schedule/schedule-command.ts +161 -0
  213. package/src/schedule/schedule-spec-parser.ts +70 -0
  214. package/src/session/__tests__/model-pricing.test.ts +66 -0
  215. package/src/session/__tests__/rename-host-persistence.test.ts +72 -0
  216. package/src/session/__tests__/session-command-module.test.ts +589 -0
  217. package/src/session/index.ts +17 -0
  218. package/src/session/model-pricing.ts +26 -0
  219. package/src/session/session-command-module.ts +197 -0
  220. package/src/session/session-command.ts +272 -0
  221. package/src/settings/index.ts +7 -0
  222. package/src/settings/settings-command-module.ts +47 -0
  223. package/src/shell/__tests__/resolve-shell-host.test.ts +11 -0
  224. package/src/shell/__tests__/shell-command-functional.test.ts +118 -0
  225. package/src/shell/index.ts +8 -0
  226. package/src/shell/resolve-shell.ts +25 -0
  227. package/src/shell/shell-command-module.ts +53 -0
  228. package/src/shell/shell-command.ts +48 -0
  229. package/src/shell/spawn-inherited.ts +32 -0
  230. package/src/skills/__tests__/skill-read-command.test.ts +64 -0
  231. package/src/skills/__tests__/skills-command-module.test.ts +200 -0
  232. package/src/skills/index.ts +7 -0
  233. package/src/skills/skill-read-command.ts +60 -0
  234. package/src/skills/skills-command-module.ts +76 -0
  235. package/src/skills/skills-command.ts +108 -0
  236. package/src/statusline/__tests__/statusline-command-module.test.ts +96 -0
  237. package/src/statusline/index.ts +6 -0
  238. package/src/statusline/statusline-command-module.ts +55 -0
  239. package/src/statusline/statusline-command.ts +80 -0
  240. package/src/terminal-client/__tests__/terminal-client-commands.test.ts +216 -0
  241. package/src/terminal-client/index.ts +5 -0
  242. package/src/terminal-client/terminal-client-commands.ts +109 -0
  243. package/src/theme/__tests__/theme-command.test.ts +204 -0
  244. package/src/theme/index.ts +12 -0
  245. package/src/theme/theme-command-module.ts +221 -0
  246. package/src/user-local/__tests__/user-local-command.test.ts +180 -0
  247. package/src/user-local/index.ts +13 -0
  248. package/src/user-local/user-local-command-constants.ts +5 -0
  249. package/src/user-local/user-local-command-module.ts +65 -0
  250. package/src/user-local/user-local-command.ts +214 -0
  251. package/src/user-local/user-local-memory-command.ts +160 -0
@@ -0,0 +1,1053 @@
1
+ import { IAgentJobHostContext, ICommandHostAdapterAccess, ICommandHostBackgroundTasks, ICommandHostCatalog, ICommandHostCheckpoints, ICommandHostContextReferences, ICommandHostContextWindow, ICommandHostGoal, ICommandHostMemory, ICommandHostNoCapability, ICommandHostPresetApplication, ICommandHostSessionAccess, ICommandHostSetupState, ICommandHostTerminalHandoff, ICommandHostUserInteraction, ICommandHostWorkspace, ICommandMCPActivationAdapter, ICommandModule, ICommandProductVocabulary, ICommandSandboxStatus, IContributionSource, ICreateGitProcessOptions, IGitProcessPort, IGitProcessPort as IGitProcessPort$1, IGitProcessRunOptions, IOrgPolicy, IProviderCommandModuleOptions, IProviderCommandModuleOptions as IProviderCommandModuleOptions$1, IProviderCommandModuleOptions as IProviderCommandModuleOptions$2, IProviderCommandModuleOptions as IProviderCommandModuleOptions$3, IProviderCommandSettingsAdapter, IProviderCommandSettingsAdapter as IProviderCommandSettingsAdapter$1, IProviderConnectionHost, IProviderSetupInput, ISettingsDocumentStore, ISkillRootDescriptor, ISystemCommand, IUnknownCommandModuleName, TGitProcessFailureReason, TGitProcessOutcome, TSandboxCommandMode, TSettings, TSettingsScope, TSettingsSource, TWorkspaceProjectAccess, createGitProcess, gitEnvironment } from "@robota-sdk/agent-framework";
2
+ import { IProviderDefinition, IProviderSetupHelpLink, IProviderSetupStepDefinition, ITerminalOutput, IUserInteraction, TProviderCredentialResolver, TProviderSetupField } from "@robota-sdk/agent-core";
3
+ import { ICommand, ICommandResult, ICommandSource, IThemeAppearanceState, IThemeCatalogueEntry, IThemeCataloguePort, IThemeCataloguePort as IThemeCataloguePort$1, TCommandInvocationSource, TReducedMotionOverride } from "@robota-sdk/agent-interface-command";
4
+ //#region src/agent/agent-command-module.d.ts
5
+ declare function createAgentCommandEntry(): ICommand;
6
+ declare function createAgentSystemCommand(): ISystemCommand;
7
+ declare class AgentCommandSource implements ICommandSource {
8
+ readonly name = "agent";
9
+ getCommands(): ICommand[];
10
+ }
11
+ declare function createAgentCommandModule(): ICommandModule;
12
+ //#endregion
13
+ //#region src/agent/agent-command.d.ts
14
+ declare function executeAgentCommand(session: IAgentJobHostContext, args: string): Promise<ICommandResult>;
15
+ //#endregion
16
+ //#region src/devices/devices-command-port.d.ts
17
+ /**
18
+ * What `/devices` needs from the host that keeps this device's identity.
19
+ *
20
+ * The host owns every secret: the recovery phrase is shown and read on the host's own terminal, and
21
+ * private keys live in its credential store. What crosses this port back to the command is ids,
22
+ * names, times and closed refusal reasons — nothing the command formats can carry a secret, because
23
+ * the command never receives one. A thrown error's message is the host's promise to the same effect.
24
+ */
25
+ interface IDeviceListEntry {
26
+ readonly deviceId: string;
27
+ readonly name: string;
28
+ readonly thisDevice: boolean;
29
+ /** Whether this entry is known to hold the device-signing key. Only known for this device. */
30
+ readonly holdsSigningKey: boolean;
31
+ readonly certificateExpiresAt: number;
32
+ }
33
+ interface IDevicesView {
34
+ readonly userId: string;
35
+ readonly devices: readonly IDeviceListEntry[];
36
+ readonly revokedDeviceCount: number;
37
+ /** When the roster and revocation list this device holds stop being accepted. */
38
+ readonly listsExpireAt: number;
39
+ }
40
+ /** Why an operation did not happen. Closed, so no free text from the secret path reaches a result. */
41
+ type TDevicesRefusal =
42
+ /** No interactive terminal: the phrase is never shown on or read from anything else. */
43
+ 'no-terminal' | 'not-initialized' | 'already-initialized' |
44
+ /** The operator cancelled at the terminal. */
45
+ 'cancelled' |
46
+ /** The re-typed words or passphrase did not match. */
47
+ 'confirmation-failed' | 'phrase-invalid' |
48
+ /** The phrase is valid but derives another identity than this device's. */
49
+ 'phrase-mismatch' | 'no-signing-key' | 'signing-key-expired' | 'unknown-device' | 'ambiguous-device' | 'self-revocation' |
50
+ /** Another process changed the identity while this operation waited on the operator. */
51
+ 'changed-concurrently' |
52
+ /** No signaling relay is configured to meet the other device through. */
53
+ 'no-relay' |
54
+ /** What was typed is not an enrollment code. */
55
+ 'code-invalid' |
56
+ /** The code was typed on the command line, where history keeps it. */
57
+ 'code-on-command-line' |
58
+ /** No device waits for that code or proved it: wrong, expired, already used, or something in between. */
59
+ 'code-not-accepted' |
60
+ /** Nobody joined before the code expired. */
61
+ 'enrollment-expired' |
62
+ /** Too many attempts failed to prove the code; it no longer works. */
63
+ 'too-many-attempts' |
64
+ /** The operator of either device declined. */
65
+ 'enrollment-declined' |
66
+ /** An operator did not answer in time. */
67
+ 'enrollment-timed-out' |
68
+ /** The connection or the exchange with the other device failed partway. */
69
+ 'enrollment-failed';
70
+ type TDevicesOutcome<T> = {
71
+ readonly ok: true;
72
+ readonly value: T;
73
+ } | {
74
+ readonly ok: false;
75
+ readonly reason: TDevicesRefusal;
76
+ };
77
+ interface IDevicesInitResult {
78
+ readonly userId: string;
79
+ readonly deviceId: string;
80
+ readonly signingKeyId: string;
81
+ /** Where the private keys were kept, for the operator. */
82
+ readonly keyStorage?: string;
83
+ }
84
+ interface IDevicesRecoverResult {
85
+ readonly deviceId: string;
86
+ readonly signingKeyId: string;
87
+ readonly revokedSigningKeyCount: number;
88
+ /** Other devices that were certified by a retired signing key and must enrol again. */
89
+ readonly droppedDeviceCount: number;
90
+ }
91
+ interface IDevicesRevokeResult {
92
+ readonly deviceId: string;
93
+ readonly name: string;
94
+ }
95
+ /** This session's endpoint in the device mesh. */
96
+ interface IDevicesMeshStatus {
97
+ /** `off`: the setting is off, or this run does not open the mesh. `failed`: it could not open. */
98
+ readonly state: 'off' | 'starting' | 'on' | 'failed';
99
+ /** Why it could not open, for `failed`. */
100
+ readonly reason?: string;
101
+ /** How this device looks for the others, in the operator's words. */
102
+ readonly sources: readonly string[];
103
+ /** The devices with an admitted link now. */
104
+ readonly linked: readonly {
105
+ readonly deviceId: string;
106
+ readonly name?: string;
107
+ readonly locality: 'same-host' | 'another-host';
108
+ }[];
109
+ }
110
+ interface IDevicesAddResult {
111
+ readonly deviceId: string;
112
+ readonly name: string;
113
+ /** Whether the new device said it kept what it was given. */
114
+ readonly confirmed: boolean;
115
+ }
116
+ interface IDevicesJoinResult {
117
+ readonly userId: string;
118
+ readonly deviceId: string;
119
+ readonly name: string;
120
+ /** Where the private keys were kept, for the operator. */
121
+ readonly keyStorage?: string;
122
+ }
123
+ interface IDevicesCommandPort {
124
+ /** This device's view of the roster, or `undefined` when it has no identity yet. */
125
+ list(): Promise<IDevicesView | undefined>;
126
+ /** The device mesh as this session runs it. Absent on a host with no device mesh. */
127
+ meshStatus?(): IDevicesMeshStatus;
128
+ /** Create the identity. Runs on the operator terminal (it shows the phrase once). */
129
+ init(options: {
130
+ readonly name?: string;
131
+ }): Promise<TDevicesOutcome<IDevicesInitResult>>;
132
+ /** Rotate the signing key from the phrase. Runs on the operator terminal. */
133
+ recover(): Promise<TDevicesOutcome<IDevicesRecoverResult>>;
134
+ /** Revoke a device by id prefix with the signing key. Confirms on the operator terminal. */
135
+ revoke(deviceIdPrefix: string): Promise<TDevicesOutcome<IDevicesRevokeResult>>;
136
+ /**
137
+ * Enrol another device with the signing key: show a one-time code, and certify the device that
138
+ * proves it once both operators confirm the string both devices show. Runs on the operator terminal.
139
+ */
140
+ add(): Promise<TDevicesOutcome<IDevicesAddResult>>;
141
+ /**
142
+ * Join the user's devices with a code another device shows, once both operators confirm the string
143
+ * both devices show. Runs on the operator terminal.
144
+ */
145
+ join(options: {
146
+ readonly name?: string;
147
+ }): Promise<TDevicesOutcome<IDevicesJoinResult>>;
148
+ }
149
+ //#endregion
150
+ //#region src/devices/devices-command-module.d.ts
151
+ declare function createDevicesCommandModule(port: IDevicesCommandPort): ICommandModule;
152
+ //#endregion
153
+ //#region src/doctor/doctor-types.d.ts
154
+ type TDoctorCheckStatus = 'ok' | 'warn' | 'fail' | 'not-configured' | 'not-probed';
155
+ /** The enumerated probes the read-only doctor does not run. Adding one is a spec change. */
156
+ type TDoctorNotProbed = 'mcp-connection' | 'hook-execution' | 'owner-only-mode';
157
+ interface IDoctorCheck {
158
+ /** Stable, user-typeable id (`settings.<scope>.<family>`, `storage.user`, `mcp.plugin.<id>.<server>`). */
159
+ readonly id: string;
160
+ readonly label: string;
161
+ readonly status: TDoctorCheckStatus;
162
+ /** The exact file or directory the finding is about, when there is one. */
163
+ readonly path?: string;
164
+ /** The specific cause, as the owner reported it — a state word, an issue path, an errno; never a secret. */
165
+ readonly cause?: string;
166
+ /** Free-text detail lines rendered under the check. */
167
+ readonly detail?: readonly string[];
168
+ /** Present when this run can repair the finding; names the allowlisted repair id (equal to `id`). */
169
+ readonly repair?: string;
170
+ }
171
+ interface IDoctorReport {
172
+ readonly checks: readonly IDoctorCheck[];
173
+ readonly failCount: number;
174
+ readonly warnCount: number;
175
+ /** Ids of checks whose `repair` is set in THIS run. */
176
+ readonly repairable: readonly string[];
177
+ /** Exit-code contract: `0` when `failCount === 0`, else `1`. */
178
+ readonly exitCode: 0 | 1;
179
+ }
180
+ /** One TCP reachability result; the probe is injected so tests never touch the network. */
181
+ interface IDoctorEndpointProbeResult {
182
+ readonly reachable: boolean;
183
+ readonly elapsedMs?: number;
184
+ readonly error?: string;
185
+ }
186
+ /** What the host knows and the runner does not: the composition the shell built, and its facts. */
187
+ interface IDoctorInputs {
188
+ readonly cwd: string;
189
+ readonly userHome: string;
190
+ /**
191
+ * The product's own user settings file — the only settings layer the repair allowlist may rewrite.
192
+ * The host names it; this library knows no product layout.
193
+ */
194
+ readonly userSettingsPath: string;
195
+ /** The product's user store root and its sessions directory, as the host lays them out. */
196
+ readonly userStorage: {
197
+ readonly root: string;
198
+ readonly sessions: string;
199
+ };
200
+ /** The project state root under a trusted workspace, when the host has one. */
201
+ readonly projectStorageRoot?: string;
202
+ /** Every settings source the runtime merge chain reads, in precedence order. */
203
+ readonly settingsSources: readonly TSettingsSource[];
204
+ readonly projectAccess: TWorkspaceProjectAccess;
205
+ readonly providerDefinitions: readonly IProviderDefinition[];
206
+ /** Optional host wording for remediation; omitted values use product-neutral guidance. */
207
+ readonly diagnosticGuidance?: {
208
+ readonly providerResolution?: string;
209
+ readonly projectTrust?: string;
210
+ };
211
+ /** Environment map (test seam; default `process.env`). */
212
+ readonly env: Readonly<Record<string, string | undefined>>;
213
+ readonly contributionSources: readonly IContributionSource[];
214
+ readonly skillRoots: readonly ISkillRootDescriptor[];
215
+ /** Plugin scope directories, most specific first — the same list the session loader reads. */
216
+ readonly pluginsDirs: readonly string[];
217
+ /** Host-composed MCP activation adapter; absent means the CLI has no MCP host. */
218
+ readonly mcpActivation?: ICommandMCPActivationAdapter;
219
+ /** Checks only the host can make (Node version, terminal, CLI version); rendered first. */
220
+ readonly hostChecks: readonly IDoctorCheck[];
221
+ /** A workspace-composition failure the host converted into a check rather than a crash. */
222
+ readonly compositionFailure?: IDoctorCheck;
223
+ }
224
+ /** Storage facts about one path, probed without writing. */
225
+ interface IDoctorPathFacts {
226
+ readonly exists: boolean;
227
+ readonly isDirectory: boolean;
228
+ readonly writable: boolean;
229
+ /** POSIX mode bits, or `undefined` when the platform does not assert them. */
230
+ readonly mode?: number;
231
+ }
232
+ /** Every side effect the runner needs, with Node defaults in `doctor-node-deps.ts`. */
233
+ interface IDoctorDeps {
234
+ readonly probeEndpoint: (host: string, port: number) => Promise<IDoctorEndpointProbeResult>;
235
+ readonly inspectPath: (path: string) => IDoctorPathFacts;
236
+ /** `true` when a bare command name resolves on `PATH`, or a path-form command exists. */
237
+ readonly resolveCommand: (command: string) => boolean;
238
+ /** The platform's owner-only guarantee, from `@robota-sdk/agent-core/node`. */
239
+ readonly ownerOnlyGuarantee: () => 'posix-mode' | 'windows-acl';
240
+ }
241
+ //#endregion
242
+ //#region src/doctor/doctor-render.d.ts
243
+ /** Optional product wording supplied by the host; omission keeps diagnostics product-neutral. */
244
+ interface IDoctorDisplayVocabulary {
245
+ readonly title?: string;
246
+ readonly productName?: string;
247
+ readonly formatRepairCommand?: (checkId: string) => string;
248
+ readonly repairOffer?: string;
249
+ }
250
+ /** Render the report as lines: a title, every check, then the summary and the repair offers. */
251
+ declare function renderDoctorReport(report: IDoctorReport, title?: string, display?: IDoctorDisplayVocabulary): string[];
252
+ //#endregion
253
+ //#region src/doctor/doctor-command-module.d.ts
254
+ declare function createDoctorCommandEntry(): ICommand;
255
+ declare class DoctorCommandSource implements ICommandSource {
256
+ readonly name = "doctor";
257
+ getCommands(): ICommand[];
258
+ }
259
+ /** Register `/doctor` over the host-composed inputs; the host decides whether to supply them. */
260
+ declare function createDoctorCommandModule(inputs: IDoctorInputs, deps?: IDoctorDeps, display?: IDoctorDisplayVocabulary): ICommandModule;
261
+ //#endregion
262
+ //#region src/doctor/doctor-node-deps.d.ts
263
+ /** A bare command resolves through `PATH`; a path-form command must exist as given. */
264
+ declare function resolveCommandOnPath(command: string, env?: Readonly<Record<string, string | undefined>>): boolean;
265
+ declare function createNodeDoctorDeps(env?: Readonly<Record<string, string | undefined>>): IDoctorDeps;
266
+ //#endregion
267
+ //#region src/doctor/doctor-redaction.d.ts
268
+ /**
269
+ * Mask every known secret value and every credential-shaped token in `text`.
270
+ *
271
+ * `secrets` are literal values the doctor learned from its inputs — the resolved credential, every
272
+ * literal `apiKey` in any settings layer (active or not), every value a `$ENV:` reference names,
273
+ * every `env` map value. Values shorter than four characters are not masked: they cannot be
274
+ * credentials and masking them would shred ordinary words.
275
+ */
276
+ declare function redactDiagnosticText(text: string, secrets?: Iterable<string>): string;
277
+ /**
278
+ * Collect the literal secrets a set of parsed settings layers and the environment expose:
279
+ * `providers.*.apiKey`, `provider.apiKey` (literal, or the value of a `$ENV:` reference), and
280
+ * every `env` map value. The doctor never RENDERS any of these; they feed the redactor so that a
281
+ * value which nonetheless reaches a message is masked.
282
+ */
283
+ declare function collectSettingsSecrets(layers: ReadonlyArray<TSettings | undefined>, env: Readonly<Record<string, string | undefined>>): string[];
284
+ //#endregion
285
+ //#region src/doctor/doctor-repair.d.ts
286
+ declare const STORAGE_REPAIR_ID = "storage.user";
287
+ /** The closed allowlist for this composition: the host's user settings layer id and `storage.user`. */
288
+ declare function doctorRepairAllowlist(inputs: IDoctorInputs): readonly string[];
289
+ interface IDoctorRepairPlan {
290
+ readonly id: string;
291
+ /** What the writer will do, for the confirmation prompt. */
292
+ readonly description: string;
293
+ readonly path: string;
294
+ }
295
+ type TDoctorRepairPlanResult = {
296
+ readonly ok: true;
297
+ readonly plan: IDoctorRepairPlan;
298
+ } | {
299
+ readonly ok: false;
300
+ readonly reason: string;
301
+ };
302
+ type TDoctorRepairOutcome = {
303
+ readonly applied: true;
304
+ readonly plan: IDoctorRepairPlan;
305
+ } | {
306
+ readonly applied: false;
307
+ readonly reason: string;
308
+ };
309
+ declare function isDoctorRepairId(id: string, inputs: IDoctorInputs): boolean;
310
+ /** Re-read the state now and decide whether `id` is repairable in it. Never writes. */
311
+ declare function planDoctorRepair(id: string, inputs: IDoctorInputs, deps: IDoctorDeps): TDoctorRepairPlanResult;
312
+ /**
313
+ * Plan, confirm, re-plan, write. `confirm` is the host's prompt (`--yes` supplies `() => true`); a
314
+ * refusal or an absent prompt writes nothing. The plan is recomputed after confirmation so a state
315
+ * that changed while the user was deciding is refused rather than overwritten.
316
+ */
317
+ declare function applyDoctorRepair(id: string, inputs: IDoctorInputs, deps: IDoctorDeps, confirm: (plan: IDoctorRepairPlan) => Promise<boolean>): Promise<TDoctorRepairOutcome>;
318
+ //#endregion
319
+ //#region src/doctor/doctor-runner.d.ts
320
+ /** Aggregate checks into the report; `fail` alone raises the exit code (CLI-067). */
321
+ declare function buildDoctorReport(checks: readonly IDoctorCheck[]): IDoctorReport;
322
+ /** Run every probe and return the redacted report. */
323
+ declare function runDoctor(inputs: IDoctorInputs, deps: IDoctorDeps): Promise<IDoctorReport>;
324
+ //#endregion
325
+ //#region src/keybindings/keybindings-command-module.d.ts
326
+ interface IKeybindingsFilePort {
327
+ ensureFile(): Promise<string>;
328
+ }
329
+ declare function createKeybindingsCommandEntry(): ICommand;
330
+ declare class KeybindingsCommandSource implements ICommandSource {
331
+ readonly name = "keybindings";
332
+ getCommands(): ICommand[];
333
+ }
334
+ declare function createKeybindingsCommandModule(file: IKeybindingsFilePort | undefined): ICommandModule;
335
+ //#endregion
336
+ //#region src/default/default-command-modules.d.ts
337
+ interface IDefaultCommandModulesOptions {
338
+ cwd: string;
339
+ userLocalStorageRoot: string;
340
+ /** Product-owned prefix for the interactive editor's temporary directory. */
341
+ editorTemporaryDirectoryPrefix?: string;
342
+ contributionSources?: readonly IContributionSource[];
343
+ skillRoots?: readonly ISkillRootDescriptor[];
344
+ providerDefinitions: readonly IProviderDefinition[];
345
+ providerSettingsAdapter: IProviderCommandSettingsAdapter$1;
346
+ /**
347
+ * CLI-083 (issue #2287) — the org policy, so `allowedProviders` and `requireApiKeyFromEnv` are
348
+ * reachable. This parameter existed, was removed by `92596bc6f` along with its only caller, and
349
+ * the consumer never stopped reading it: `provider-command-profile-operations.ts` still
350
+ * destructures `orgPolicy` from its options and enforces on it. Optional, so its absence stays
351
+ * distinguishable from a policy that allows everything — and that optionality is why nothing went
352
+ * red when the producer dropped it.
353
+ */
354
+ orgPolicy?: IOrgPolicy;
355
+ /**
356
+ * Where `/provider` and `/model` check a `$ENV:` or default credential variable: the host's startup
357
+ * snapshot when it withholds its own credentials from `process.env`. Absent, `process.env` is read.
358
+ */
359
+ providerEnvironment?: Readonly<Record<string, string | undefined>>;
360
+ /** Host-owned connection acquisition and transactional credential persistence. */
361
+ providerConnectionHost?: IProviderConnectionHost;
362
+ /** Host-owned resolution of an opaque saved credential reference. */
363
+ providerCredentialResolver?: TProviderCredentialResolver;
364
+ /** Optional TUI-owned file capability; absent, `/keybindings` says it belongs to an interactive terminal. */
365
+ keybindingsFilePort?: IKeybindingsFilePort;
366
+ /**
367
+ * SCREEN-2002: the surface's theme catalogue. Absent (print mode, `--serve`), `/theme` is still
368
+ * listed and says it belongs to an interactive terminal, which runs it when attached.
369
+ */
370
+ themeCataloguePort?: IThemeCataloguePort$1;
371
+ /**
372
+ * The host that keeps this device's identity (its terminal, credential store and state files).
373
+ * Absence means `/devices` is not registered: without it the command could do nothing.
374
+ */
375
+ devicesPort?: IDevicesCommandPort;
376
+ /** OBSERVABILITY-1991: host-composed doctor inputs; absence means `/doctor` is not registered. */
377
+ doctorInputs?: IDoctorInputs;
378
+ /** Product-owned diagnostic wording; absent keeps `/doctor` product-neutral. */
379
+ doctorDisplay?: IDoctorDisplayVocabulary;
380
+ /** Product-owned command to resume a saved fork; absent yields neutral host guidance. */
381
+ formatForkResumeCommand?: (sessionId: string) => string;
382
+ /** Host-owned fallback text and kill switch for session-local repeat. */
383
+ loopOptions?: {
384
+ defaultPrompt?: string;
385
+ resolveDefaultPrompt?: () => string;
386
+ disabled?: boolean;
387
+ };
388
+ /**
389
+ * Whitelist of module `name`s to keep. When provided, only modules whose `name`
390
+ * appears here survive. Omitted → all modules kept (no-regression).
391
+ */
392
+ enabledCommandModules?: readonly string[];
393
+ /**
394
+ * Blacklist of module `name`s to remove. Applied after the whitelist, so a name
395
+ * present in both is removed (deny > allow). Omitted → no modules removed.
396
+ */
397
+ disabledCommandModules?: readonly string[];
398
+ }
399
+ /**
400
+ * Result of {@link createDefaultCommandModules} (INFRA-032): the selected `modules` plus any preset
401
+ * `enabledCommandModules`/`disabledCommandModules` names that matched no built module. Unknown names
402
+ * are returned as data (not dropped silently) so the CLI startup path can surface a non-fatal notice.
403
+ */
404
+ interface IDefaultCommandModulesResult {
405
+ readonly modules: readonly ICommandModule[];
406
+ readonly unknownModuleNames: readonly IUnknownCommandModuleName[];
407
+ }
408
+ declare function createDefaultCommandModules({ cwd: _cwd, userLocalStorageRoot, editorTemporaryDirectoryPrefix, contributionSources, skillRoots, providerDefinitions, providerSettingsAdapter, orgPolicy, keybindingsFilePort, themeCataloguePort, devicesPort, doctorInputs, doctorDisplay, formatForkResumeCommand, loopOptions, enabledCommandModules, disabledCommandModules, providerEnvironment, providerConnectionHost, providerCredentialResolver }: IDefaultCommandModulesOptions): IDefaultCommandModulesResult;
409
+ //#endregion
410
+ //#region src/background/background-command-module.d.ts
411
+ declare function createBackgroundCommandEntry(): ICommand;
412
+ declare class BackgroundCommandSource implements ICommandSource {
413
+ readonly name = "background";
414
+ getCommands(): ICommand[];
415
+ }
416
+ declare function createBackgroundCommandModule(): ICommandModule;
417
+ //#endregion
418
+ //#region src/background/background-command.d.ts
419
+ declare function executeBackgroundCommand(context: ICommandHostBackgroundTasks, args: string): Promise<ICommandResult>;
420
+ //#endregion
421
+ //#region src/goal/goal-command-module.d.ts
422
+ declare function createGoalCommandEntry(): ICommand;
423
+ declare class GoalCommandSource implements ICommandSource {
424
+ readonly name = "goal";
425
+ getCommands(): ICommand[];
426
+ }
427
+ declare function createGoalCommandModule(): ICommandModule;
428
+ //#endregion
429
+ //#region src/goal/goal-command.d.ts
430
+ declare const GOAL_COMMAND_DESCRIPTION = "Assign an autonomous goal the agent pursues across turns until satisfied.";
431
+ declare function executeGoalCommand(context: ICommandHostGoal, args: string): Promise<ICommandResult>;
432
+ //#endregion
433
+ //#region src/handoff/handoff-command.d.ts
434
+ /**
435
+ * `/handoff` (HANDOFF-001, issue #1864) — move this session to another machine.
436
+ *
437
+ * The command holds no protocol. It reads an injected adapter and touches no transport, for the same
438
+ * reason `/peers` does not: the carrier, the wire composition and the device identity are
439
+ * composition-root concerns and must have one owner.
440
+ *
441
+ * ## What it is FOR, which is the consent
442
+ *
443
+ * A hand-off loses things on purpose — uncommitted working-tree changes and running subprocesses
444
+ * stay on this machine, because moving them would make this a file-sync product and a process cannot
445
+ * migrate at all. Those are the operator's to lose, so they are named in the prompt BEFORE the
446
+ * question, not reported afterwards. A confirmation that did not mention them is not consent.
447
+ *
448
+ * ## The sentence it always ends on
449
+ *
450
+ * Every outcome that is not `done` says the session is still on this machine. That is not
451
+ * reassurance: it is the one invariant the whole design exists to preserve, and the operator is the
452
+ * person who has to know whether to keep typing here or walk to the other computer.
453
+ */
454
+ type THandoffHost = ICommandHostAdapterAccess & Partial<ICommandHostUserInteraction>;
455
+ declare function executeHandoffCommand(context: THandoffHost, args: string): Promise<ICommandResult>;
456
+ //#endregion
457
+ //#region src/handoff/handoff-command-module.d.ts
458
+ declare function createHandoffCommandEntry(): ICommand;
459
+ declare class HandoffCommandSource implements ICommandSource {
460
+ readonly name = "handoff";
461
+ getCommands(): ICommand[];
462
+ }
463
+ declare function createHandoffCommandModule(): ICommandModule;
464
+ //#endregion
465
+ //#region src/plan/plan-command-module.d.ts
466
+ declare function createPlanCommandModule(): ICommandModule;
467
+ //#endregion
468
+ //#region src/compact/compact-command-module.d.ts
469
+ declare function createCompactCommandEntry(): ICommand;
470
+ declare class CompactCommandSource implements ICommandSource {
471
+ readonly name = "compact";
472
+ getCommands(): ICommand[];
473
+ }
474
+ declare function createCompactCommandModule(): ICommandModule;
475
+ //#endregion
476
+ //#region src/compact/compact-command.d.ts
477
+ declare function executeCompactCommand(context: ICommandHostContextWindow & ICommandHostSessionAccess, args: string): Promise<ICommandResult>;
478
+ //#endregion
479
+ //#region src/context/context-command-module.d.ts
480
+ declare function createContextCommandEntry(): ICommand;
481
+ declare class ContextCommandSource implements ICommandSource {
482
+ readonly name = "context";
483
+ getCommands(): ICommand[];
484
+ }
485
+ declare function createContextCommandModule(): ICommandModule;
486
+ //#endregion
487
+ //#region src/context/context-command.d.ts
488
+ /** The roles the `/context` surface reads. Named once so five signatures do not restate it. */
489
+ type TContextCommandHost = ICommandHostAdapterAccess & ICommandHostContextReferences & ICommandHostContextWindow & ICommandHostSessionAccess;
490
+ declare function executeContextCommand(context: TContextCommandHost, args: string): Promise<ICommandResult>;
491
+ //#endregion
492
+ //#region src/editor/resolve-editor.d.ts
493
+ /**
494
+ * TERM-004: editor-selection seam. Resolves `$VISUAL` → `$EDITOR` → `vi` (POSIX-first; a Windows
495
+ * default is a TERM-007 concern). Splits on whitespace so `"code -w"` / `"subl -w"` style values work.
496
+ */
497
+ interface IResolvedEditor {
498
+ command: string;
499
+ args: readonly string[];
500
+ }
501
+ declare function resolveEditor(): IResolvedEditor;
502
+ //#endregion
503
+ //#region src/editor/editor-command.d.ts
504
+ declare const EDITOR_COMMAND_DESCRIPTION = "Compose a message in $EDITOR (optionally pre-filled with `/editor <text>`), then return it.";
505
+ declare function executeEditorCommand(context: ICommandHostTerminalHandoff & ICommandHostWorkspace, args: string, temporaryDirectoryPrefix?: string): Promise<ICommandResult>;
506
+ //#endregion
507
+ //#region src/editor/editor-command-module.d.ts
508
+ declare function createEditorCommandEntry(): ICommand;
509
+ declare class EditorCommandSource implements ICommandSource {
510
+ readonly name = "editor";
511
+ getCommands(): ICommand[];
512
+ }
513
+ declare function createEditorCommandModule(temporaryDirectoryPrefix?: string): ICommandModule;
514
+ //#endregion
515
+ //#region src/git/git-command-module.d.ts
516
+ declare function createGitCommandEntry(): ICommand;
517
+ /** What the verbs need from the host: the working directory and the ask-the-user port. */
518
+ type TGitCommandContext = Pick<ICommandHostWorkspace, 'getCwd'> & ICommandHostUserInteraction;
519
+ declare function executeGitCommand(context: TGitCommandContext, args: string, port?: IGitProcessPort$1): Promise<ICommandResult>;
520
+ declare class GitCommandSource implements ICommandSource {
521
+ readonly name = "git";
522
+ getCommands(): ICommand[];
523
+ }
524
+ interface IGitCommandModuleOptions {
525
+ /** The process seam; the production `createGitProcess()` by default, injectable for tests. */
526
+ port?: IGitProcessPort$1;
527
+ }
528
+ declare function createGitCommandModule(options?: IGitCommandModuleOptions): ICommandModule;
529
+ //#endregion
530
+ //#region src/effort/effort-command-module.d.ts
531
+ declare function createEffortCommandEntry(): ICommand;
532
+ declare class EffortCommandSource implements ICommandSource {
533
+ readonly name = "effort";
534
+ getCommands(): ICommand[];
535
+ }
536
+ declare function createEffortCommandModule(): ICommandModule;
537
+ //#endregion
538
+ //#region src/effort/effort-command.d.ts
539
+ declare function executeEffortCommand(context: ICommandHostAdapterAccess & ICommandHostSessionAccess & ICommandHostUserInteraction & ICommandHostWorkspace, args: string): Promise<ICommandResult>;
540
+ //#endregion
541
+ //#region src/advisor/advisor-command-module.d.ts
542
+ declare function createAdvisorCommandEntry(): ICommand;
543
+ declare class AdvisorCommandSource implements ICommandSource {
544
+ readonly name = "advisor";
545
+ getCommands(): ICommand[];
546
+ }
547
+ declare function createAdvisorCommandModule(): ICommandModule;
548
+ //#endregion
549
+ //#region src/advisor/advisor-command.d.ts
550
+ /** The user-settings key `/advisor` saves the default advisor under. */
551
+ declare const ADVISOR_SETTING_KEY = "advisorModel";
552
+ /**
553
+ * `/advisor` — show the advisor, set it (`<profile>` or `<profile>:<model>`), or turn it off. A
554
+ * change the user makes is also saved as the default for later sessions.
555
+ */
556
+ declare function executeAdvisorCommand(context: ICommandHostAdapterAccess & ICommandHostWorkspace, args: string): Promise<ICommandResult>;
557
+ //#endregion
558
+ //#region src/exit/exit-command-module.d.ts
559
+ declare function createExitCommandEntry(): ICommand;
560
+ declare class ExitCommandSource implements ICommandSource {
561
+ readonly name = "exit";
562
+ getCommands(): ICommand[];
563
+ }
564
+ declare function createExitCommandModule(): ICommandModule;
565
+ //#endregion
566
+ //#region src/exit/exit-command.d.ts
567
+ declare function executeExitCommand(context: ICommandHostUserInteraction, _args: string): Promise<ICommandResult>;
568
+ //#endregion
569
+ //#region src/help/help-command-module.d.ts
570
+ declare function createHelpCommandEntry(): ICommand;
571
+ declare class HelpCommandSource implements ICommandSource {
572
+ readonly name = "help";
573
+ getCommands(): ICommand[];
574
+ }
575
+ declare function createHelpCommandModule(): ICommandModule;
576
+ //#endregion
577
+ //#region src/help/help-command.d.ts
578
+ declare function executeHelpCommand(context: ICommandHostCatalog, _args: string): ICommandResult;
579
+ //#endregion
580
+ //#region src/theme/theme-command-module.d.ts
581
+ declare function executeThemeCommand(catalogue: IThemeCataloguePort$1 | undefined, args: string): ICommandResult;
582
+ declare function createThemeCommandEntry(): ICommand;
583
+ declare class ThemeCommandSource implements ICommandSource {
584
+ readonly name = "theme";
585
+ getCommands(): ICommand[];
586
+ }
587
+ declare function createThemeCommandModule(catalogue: IThemeCataloguePort$1 | undefined): ICommandModule;
588
+ //#endregion
589
+ //#region src/language/language-command-module.d.ts
590
+ declare function createLanguageCommandEntry(): ICommand;
591
+ declare class LanguageCommandSource implements ICommandSource {
592
+ readonly name = "language";
593
+ getCommands(): ICommand[];
594
+ }
595
+ declare function createLanguageCommandModule(): ICommandModule;
596
+ //#endregion
597
+ //#region src/language/language-command.d.ts
598
+ declare function executeLanguageCommand(context: ICommandHostUserInteraction, args: string): Promise<ICommandResult>;
599
+ //#endregion
600
+ //#region src/memory/memory-command-module.d.ts
601
+ declare function createMemoryCommandEntry(): ICommand;
602
+ declare class MemoryCommandSource implements ICommandSource {
603
+ readonly name = "memory";
604
+ getCommands(): ICommand[];
605
+ }
606
+ declare function createMemoryCommandModule(): ICommandModule;
607
+ //#endregion
608
+ //#region src/memory/memory-command.d.ts
609
+ /** The host's view of the session's permission mode, when it has one. */
610
+ type TMemoryCommandModeAccess = ICommandHostAdapterAccess & Partial<Pick<ICommandHostSessionAccess, 'getSession'>>;
611
+ declare function executeMemoryCommand(context: ICommandHostMemory & ICommandHostWorkspace & TMemoryCommandModeAccess, rawArgs: string): Promise<ICommandResult>;
612
+ //#endregion
613
+ //#region src/mcp-activation/mcp-activation-command-module.d.ts
614
+ declare function createMCPActivationCommandEntry(): ICommand;
615
+ declare class MCPActivationCommandSource implements ICommandSource {
616
+ readonly name = "mcp-activation";
617
+ getCommands(): ICommand[];
618
+ }
619
+ declare function createMCPActivationCommandModule(): ICommandModule;
620
+ //#endregion
621
+ //#region src/mcp-activation/mcp-activation-command.d.ts
622
+ /** What `/mcp` reaches: its port, and — to sign in — the live session and the user. */
623
+ type TMCPActivationCommandContext = ICommandHostAdapterAccess & Pick<ICommandHostSessionAccess, 'getSession'> & ICommandHostUserInteraction & Partial<Pick<ICommandHostWorkspace, 'getCommandInvocationSource'>> & {
624
+ getCommandSurfaceLocalityEvidence?(): 'local' | 'remote' | undefined;
625
+ getCommandProductVocabulary?(): ICommandProductVocabulary | undefined;
626
+ };
627
+ declare function executeMCPActivationCommand(context: TMCPActivationCommandContext, args: string): Promise<ICommandResult>;
628
+ //#endregion
629
+ //#region src/mcp-activation/mcp-model-notice.d.ts
630
+ /**
631
+ * What the MODEL is told about an MCP server it cannot use, and which user command fixes it.
632
+ *
633
+ * Fixed words only. A server's name comes from a definition a repository may write, so it is named
634
+ * only when it is safe to paste into any shell; otherwise the notice stays generic and points at
635
+ * `/mcp status`, where the user sees the name. Nothing a server or its definition returned — reason
636
+ * text, endpoint, header or token — ever reaches these strings.
637
+ *
638
+ * The actions themselves (approving a server, signing in, trusting a workspace) are the user's: the
639
+ * model can only suggest the command.
640
+ */
641
+ /** Why a server's tools are unavailable, as a user action that would fix it. */
642
+ type TMCPUserAction = 'approve' | 'sign-in' | 'trust-workspace';
643
+ /**
644
+ * Where the user can act: `session` is an interactive session they can type a `/mcp` command into;
645
+ * `terminal` is a run with no such prompt (print, serve), where sign-in is the terminal command.
646
+ */
647
+ type TMCPUserActionSurface = 'session' | 'terminal';
648
+ /** The command the user runs for `action`; `<server>` stands for a name that cannot be shown. */
649
+ declare function mcpUserActionCommand(serverId: string, action: TMCPUserAction, surface?: TMCPUserActionSurface, cliName?: string): string | undefined;
650
+ /** One server's notice: what is missing and the exact command to suggest. */
651
+ declare function mcpUserActionNotice(serverId: string, action: TMCPUserAction, surface?: TMCPUserActionSurface, cliName?: string): string;
652
+ /**
653
+ * The notice for every server that could not start for a reason the user can fix, or `undefined`
654
+ * when there is none. Meant for the model's context at session start.
655
+ */
656
+ declare function mcpUnavailableServersNotice(servers: ReadonlyMap<string, TMCPUserAction>, cliName?: string): string | undefined;
657
+ //#endregion
658
+ //#region src/mode/mode-command-module.d.ts
659
+ declare function createModeCommandEntry(): ICommand;
660
+ declare class ModeCommandSource implements ICommandSource {
661
+ readonly name = "mode";
662
+ getCommands(): ICommand[];
663
+ }
664
+ declare function createModeCommandModule(): ICommandModule;
665
+ //#endregion
666
+ //#region src/mode/mode-command.d.ts
667
+ declare function executeModeCommand(context: ICommandHostAdapterAccess & ICommandHostSessionAccess & ICommandHostUserInteraction, args: string): Promise<ICommandResult>;
668
+ //#endregion
669
+ //#region src/model/model-command-module.d.ts
670
+ declare function createModelCommandEntry(): ICommand;
671
+ declare class ModelCommandSource implements ICommandSource {
672
+ readonly name = "model";
673
+ getCommands(): ICommand[];
674
+ }
675
+ declare function createModelCommandModule(options: IProviderCommandModuleOptions$3): ICommandModule;
676
+ //#endregion
677
+ //#region src/model/model-command.d.ts
678
+ type TModelCommandContext = ICommandHostSessionAccess & ICommandHostUserInteraction;
679
+ declare function executeModelCommand(context: TModelCommandContext, args: string, options: IProviderCommandModuleOptions$1): Promise<ICommandResult>;
680
+ //#endregion
681
+ //#region src/sandbox/sandbox-command-module.d.ts
682
+ declare class SandboxCommandSource implements ICommandSource {
683
+ readonly name = "sandbox";
684
+ getCommands(): ICommand[];
685
+ }
686
+ declare function createSandboxCommandModule(): ICommandModule;
687
+ //#endregion
688
+ //#region src/sandbox/sandbox-command.d.ts
689
+ declare const SANDBOX_MODES: readonly {
690
+ readonly mode: TSandboxCommandMode;
691
+ readonly description: string;
692
+ }[];
693
+ declare function formatSandboxStatus(status: ICommandSandboxStatus): string;
694
+ declare function executeSandboxCommand(context: ICommandHostAdapterAccess & ICommandHostUserInteraction, args: string): Promise<ICommandResult>;
695
+ //#endregion
696
+ //#region src/output-style/output-style-command-module.d.ts
697
+ declare function executeOutputStyleCommand(context: ICommandHostAdapterAccess & ICommandHostSessionAccess & ICommandHostUserInteraction, args: string): Promise<ICommandResult>;
698
+ declare function createOutputStyleCommandEntry(): ICommand;
699
+ declare class OutputStyleCommandSource implements ICommandSource {
700
+ readonly name = "output-style";
701
+ getCommands(): ICommand[];
702
+ }
703
+ declare function createOutputStyleCommandModule(): ICommandModule;
704
+ //#endregion
705
+ //#region src/permissions/permissions-command-module.d.ts
706
+ declare function createPermissionsCommandEntry(): ICommand;
707
+ declare class PermissionsCommandSource implements ICommandSource {
708
+ readonly name = "permissions";
709
+ getCommands(): ICommand[];
710
+ }
711
+ declare function createPermissionsCommandModule(): ICommandModule;
712
+ //#endregion
713
+ //#region src/permissions/permissions-command.d.ts
714
+ declare function executePermissionsCommand(context: ICommandHostAdapterAccess & ICommandHostSessionAccess, args: string): ICommandResult;
715
+ //#endregion
716
+ //#region src/plugin/plugin-command-module.d.ts
717
+ declare function createPluginCommandEntry(): ICommand;
718
+ declare function createReloadPluginsCommandEntry(): ICommand;
719
+ declare class PluginManagerCommandSource implements ICommandSource {
720
+ readonly name = "plugin-manager";
721
+ getCommands(): ICommand[];
722
+ }
723
+ declare function createPluginCommandModule(): ICommandModule;
724
+ //#endregion
725
+ //#region src/plugin/plugin-command.d.ts
726
+ /** What `/plugin` reaches: its adapter port, and — for install/uninstall — this connection's locality. */
727
+ type TPluginCommandContext = ICommandHostAdapterAccess & Partial<Pick<ICommandHostWorkspace, 'getCommandSurfaceLocality'>>;
728
+ declare function executePluginCommand(context: TPluginCommandContext, args: string): Promise<ICommandResult>;
729
+ declare function executeReloadPluginsCommand(context: ICommandHostAdapterAccess, _args: string): Promise<ICommandResult>;
730
+ //#endregion
731
+ //#region src/preset/preset-command-module.d.ts
732
+ declare function createPresetCommandEntry(): ICommand;
733
+ declare class PresetCommandSource implements ICommandSource {
734
+ readonly name = "preset";
735
+ getCommands(): ICommand[];
736
+ }
737
+ declare function createPresetCommandModule(): ICommandModule;
738
+ //#endregion
739
+ //#region src/preset/preset-command.d.ts
740
+ declare function executePresetCommand(context: ICommandHostPresetApplication & ICommandHostSessionAccess & ICommandHostUserInteraction & ICommandHostAdapterAccess, args: string): Promise<ICommandResult>;
741
+ //#endregion
742
+ //#region src/shell/resolve-shell.d.ts
743
+ interface IResolvedShell {
744
+ /** Executable to spawn. */
745
+ command: string;
746
+ /** Args for an interactive shell session (drop-to-shell). */
747
+ interactiveArgs: readonly string[];
748
+ /** Args to run a single command string non-interactively. */
749
+ commandArgs(command: string): readonly string[];
750
+ }
751
+ /** Resolve the interactive shell for the current platform via the agent-core SSOT resolver. */
752
+ declare function resolveShell(executable?: string): IResolvedShell;
753
+ //#endregion
754
+ //#region src/shell/spawn-inherited.d.ts
755
+ declare function spawnInherited(command: string, args: readonly string[], cwd: string): Promise<number>;
756
+ //#endregion
757
+ //#region src/shell/shell-command.d.ts
758
+ declare const SHELL_COMMAND_DESCRIPTION = "Drop to an interactive shell (or run `/shell <command>` interactively), then return to the agent.";
759
+ declare function executeShellCommand(context: ICommandHostTerminalHandoff & ICommandHostWorkspace, args: string, executable?: string): Promise<ICommandResult>;
760
+ //#endregion
761
+ //#region src/shell/shell-command-module.d.ts
762
+ declare function createShellCommandEntry(): ICommand;
763
+ declare class ShellCommandSource implements ICommandSource {
764
+ readonly name = "shell";
765
+ getCommands(): ICommand[];
766
+ }
767
+ declare function createShellCommandModule(executable?: string): ICommandModule;
768
+ //#endregion
769
+ //#region src/provider/provider-command-module.d.ts
770
+ declare function createProviderCommandEntry(): ICommand;
771
+ declare class ProviderCommandSource implements ICommandSource {
772
+ readonly name = "provider";
773
+ getCommands(): ICommand[];
774
+ }
775
+ declare function createProviderCommandModule(options: IProviderCommandModuleOptions$2): ICommandModule;
776
+ //#endregion
777
+ //#region src/provider/provider-command-execution.d.ts
778
+ declare function executeProviderCommand(context: ICommandHostUserInteraction & ICommandHostSetupState, args: string, options: IProviderCommandModuleOptions$1): Promise<ICommandResult>;
779
+ //#endregion
780
+ //#region src/provider/provider-setup-flow.d.ts
781
+ type TProviderSetupType = string;
782
+ type TPromptInput = (label: string, masked?: boolean, options?: {
783
+ signal?: AbortSignal;
784
+ }) => Promise<string>;
785
+ interface IProviderSetupPromptStep extends IProviderSetupStepDefinition {
786
+ key: TProviderSetupField;
787
+ }
788
+ interface IProviderSetupFlowState {
789
+ type: TProviderSetupType;
790
+ steps: readonly IProviderSetupPromptStep[];
791
+ setupHelpLinks: readonly IProviderSetupHelpLink[];
792
+ stepIndex: number;
793
+ values: Partial<Record<TProviderSetupField, string>>;
794
+ existingProfileNames: readonly string[];
795
+ profileName?: string;
796
+ setCurrent?: boolean;
797
+ }
798
+ interface IProviderSetupFlowOptions {
799
+ includeEditOnlySteps?: boolean;
800
+ existingProfileNames?: readonly string[];
801
+ initialValues?: Partial<Record<TProviderSetupField, string>>;
802
+ profileName?: string;
803
+ setCurrent?: boolean;
804
+ }
805
+ type TProviderSetupFlowSubmitResult = {
806
+ status: 'next';
807
+ state: IProviderSetupFlowState;
808
+ } | {
809
+ status: 'complete';
810
+ input: IProviderSetupInput;
811
+ } | {
812
+ status: 'error';
813
+ state: IProviderSetupFlowState;
814
+ message: string;
815
+ };
816
+ declare function createProviderSetupFlow(type: TProviderSetupType, providerDefinitions: readonly IProviderDefinition[], options?: IProviderSetupFlowOptions): IProviderSetupFlowState;
817
+ declare function formatProviderSetupSelectionPrompt(providerDefinitions: readonly IProviderDefinition[]): string;
818
+ declare function resolveProviderSetupSelection(rawValue: string, providerDefinitions: readonly IProviderDefinition[]): TProviderSetupType;
819
+ declare function getProviderSetupStep(state: IProviderSetupFlowState): IProviderSetupPromptStep;
820
+ declare function submitProviderSetupValue(state: IProviderSetupFlowState, rawValue: string): TProviderSetupFlowSubmitResult;
821
+ declare function runProviderSetupPromptFlow(type: TProviderSetupType, promptInput: TPromptInput, providerDefinitions: readonly IProviderDefinition[], options?: IProviderSetupFlowOptions): Promise<IProviderSetupInput>;
822
+ declare function formatProviderSetupPromptLabel(step: IProviderSetupPromptStep, setupHelpLinks?: readonly IProviderSetupHelpLink[]): string;
823
+ declare function formatProviderSetupChoiceLabel(definition: IProviderDefinition): string;
824
+ declare function formatProviderSetupHelpLinks(setupHelpLinks?: readonly IProviderSetupHelpLink[]): string;
825
+ declare function validateProviderSetupValue(step: IProviderSetupPromptStep, value: string): string | undefined;
826
+ //#endregion
827
+ //#region src/provider/provider-startup.d.ts
828
+ interface IProviderStartupContext {
829
+ provider?: string;
830
+ settingsScope?: TSettingsScope;
831
+ settingsSources: readonly TSettingsSource[];
832
+ settingsStores: readonly ISettingsDocumentStore[];
833
+ /** Selected host snapshot for configure-time credential reference checks. */
834
+ env?: Record<string, string | undefined>;
835
+ connectionHost?: IProviderConnectionHost;
836
+ orgPolicy?: IOrgPolicy;
837
+ interaction?: IUserInteraction;
838
+ }
839
+ interface IEnsureProviderConfigOptions {
840
+ formatError: (defs: readonly IProviderDefinition[]) => string;
841
+ isInteractive?: () => boolean;
842
+ /** Environment map for env-default synthesis (test seam, default: process.env). */
843
+ env?: Record<string, string | undefined>;
844
+ }
845
+ declare function runProviderStartupSetup(cwd: string, ctx: IProviderStartupContext, promptInput: TPromptInput, terminal: ITerminalOutput, providerDefinitions: readonly IProviderDefinition[]): Promise<void>;
846
+ declare function ensureProviderConfig(cwd: string, ctx: IProviderStartupContext, promptInput: TPromptInput, terminal: ITerminalOutput, providerDefinitions: readonly IProviderDefinition[], options: IEnsureProviderConfigOptions): Promise<void>;
847
+ //#endregion
848
+ //#region src/remote-control/remote-control-command-module.d.ts
849
+ declare function createRemoteControlCommandEntry(): ICommand;
850
+ declare class RemoteControlCommandSource implements ICommandSource {
851
+ readonly name = "remote-control";
852
+ getCommands(): ICommand[];
853
+ }
854
+ declare function createRemoteControlCommandModule(): ICommandModule;
855
+ //#endregion
856
+ //#region src/remote-control/remote-control-command.d.ts
857
+ declare function executeRemoteControlCommand(context: ICommandHostAdapterAccess & Pick<ICommandHostWorkspace, 'getCommandInvocationSource'>, args: string): ICommandResult;
858
+ //#endregion
859
+ //#region src/reset/reset-command-module.d.ts
860
+ declare function createResetCommandEntry(): ICommand;
861
+ declare function createResetCommandModule(): ICommandModule;
862
+ //#endregion
863
+ //#region src/reset/reset-command.d.ts
864
+ declare function executeResetCommand(): ICommandResult;
865
+ //#endregion
866
+ //#region src/rewind/rewind-command-module.d.ts
867
+ declare class RewindCommandSource implements ICommandSource {
868
+ readonly name = "rewind";
869
+ getCommands(): ICommand[];
870
+ }
871
+ declare function createRewindCommandModule(): ICommandModule;
872
+ //#endregion
873
+ //#region src/rewind/rewind-command.d.ts
874
+ type TRewindCommandContext = ICommandHostCheckpoints & {
875
+ getCommandProductVocabulary?(): ICommandProductVocabulary | undefined;
876
+ };
877
+ declare function executeRewindCommand(context: TRewindCommandContext, rawArgs: string): Promise<ICommandResult>;
878
+ //#endregion
879
+ //#region src/schedule/loop-command.d.ts
880
+ interface ILoopCommandOptions {
881
+ /** Product-host-owned maintenance text, used only when the operator omits a prompt. */
882
+ defaultPrompt?: string;
883
+ /** Re-read the project/user default for each new loop; an explicit prompt never calls this. */
884
+ resolveDefaultPrompt?: () => string;
885
+ /** Host kill switch; listing and stopping existing loops remain available. */
886
+ disabled?: boolean;
887
+ }
888
+ /**
889
+ * #3288 §1: who invoked `/loop`, and how to ask them. `ui` is the injected "ask the user" port
890
+ * (absent for a headless/automation host — see `ICommandHostUserInteraction`); `source` is the
891
+ * command's own invocation source. Defaults to `{ ui: undefined, source: 'user' }` when the caller
892
+ * omits it, matching every pre-existing (headless) call site: proceed unconfirmed, the same as
893
+ * before this gate existed.
894
+ */
895
+ interface ILoopInvocationContext {
896
+ readonly ui: IUserInteraction | undefined;
897
+ readonly source: TCommandInvocationSource;
898
+ }
899
+ declare function executeLoopCommand(host: Pick<IAgentJobHostContext, 'spawnScheduledWake' | 'listSchedules' | 'createSelfPacedLoop' | 'listSelfPacedLoops' | 'stopSelfPacedLoop'>, cancelBackgroundTask: (taskId: string, reason: string) => Promise<void>, args: string, options?: ILoopCommandOptions, invocation?: ILoopInvocationContext): Promise<ICommandResult>;
900
+ //#endregion
901
+ //#region src/schedule/schedule-command-module.d.ts
902
+ declare function createScheduleCommandEntry(): ICommand;
903
+ declare function createMonitorCommandEntry(): ICommand;
904
+ declare function createLoopCommandEntry(): ICommand;
905
+ declare class ScheduleCommandSource implements ICommandSource {
906
+ readonly name = "schedule";
907
+ getCommands(): ICommand[];
908
+ }
909
+ declare function createScheduleCommandModule(options?: ILoopCommandOptions): ICommandModule;
910
+ //#endregion
911
+ //#region src/schedule/schedule-command.d.ts
912
+ declare function executeScheduleCommand(host: IAgentJobHostContext, args: string, now?: number): Promise<ICommandResult>;
913
+ declare function executeMonitorCommand(host: IAgentJobHostContext, args: string): Promise<ICommandResult>;
914
+ //#endregion
915
+ //#region src/schedule/schedule-spec-parser.d.ts
916
+ /**
917
+ * FLOW-005: parse the `<when>` portion of `/schedule` into a cron expression croner accepts.
918
+ *
919
+ * Two forms:
920
+ * in <N><unit> <instruction> — one-shot, fires once at now + duration (s|m|h|d)
921
+ * cron "<expr>" <instruction> — recurring, a standard cron expression
922
+ */
923
+ interface IScheduleSpec {
924
+ cronExpression: string;
925
+ instruction: string;
926
+ recurring: boolean;
927
+ }
928
+ type TScheduleParseResult = {
929
+ ok: true;
930
+ spec: IScheduleSpec;
931
+ } | {
932
+ ok: false;
933
+ error: string;
934
+ };
935
+ declare function parseScheduleSpec(args: string, now: number): TScheduleParseResult;
936
+ //#endregion
937
+ //#region src/session/session-command.d.ts
938
+ declare const CLEAR_COMMAND_MESSAGE = "Conversation cleared.";
939
+ declare function executeClearCommand(context: ICommandHostSessionAccess & ICommandHostUserInteraction, _args: string): Promise<ICommandResult>;
940
+ declare function executeRenameCommand(_context: ICommandHostNoCapability, args: string): ICommandResult;
941
+ declare function executeResumeCommand(): ICommandResult;
942
+ type TCostCommandContext = ICommandHostSessionAccess & ICommandHostWorkspace & ICommandHostAdapterAccess;
943
+ declare function executeCostCommand(context: TCostCommandContext, args: string): ICommandResult;
944
+ declare function executeValidateSessionCommand(context: ICommandHostSessionAccess & ICommandHostWorkspace, _args: string): ICommandResult;
945
+ //#endregion
946
+ //#region src/session/session-command-module.d.ts
947
+ declare function createClearCommandEntry(): ICommand;
948
+ declare function createRenameCommandEntry(): ICommand;
949
+ declare function createResumeCommandEntry(): ICommand;
950
+ declare function createCostCommandEntry(): ICommand;
951
+ declare function createValidateSessionCommandEntry(): ICommand;
952
+ declare class SessionCommandSource implements ICommandSource {
953
+ readonly name = "session";
954
+ getCommands(): ICommand[];
955
+ }
956
+ declare function createSessionCommandModule(): ICommandModule;
957
+ //#endregion
958
+ //#region src/settings/settings-command-module.d.ts
959
+ declare function createSettingsCommandEntry(): ICommand;
960
+ declare class SettingsCommandSource implements ICommandSource {
961
+ readonly name = "settings";
962
+ getCommands(): ICommand[];
963
+ }
964
+ declare function createSettingsCommandModule(): ICommandModule;
965
+ //#endregion
966
+ //#region src/skills/skills-command-module.d.ts
967
+ interface ISkillsCommandModuleOptions {
968
+ readonly contributionSources: readonly IContributionSource[];
969
+ readonly skillRoots?: readonly ISkillRootDescriptor[];
970
+ }
971
+ declare function createSkillsCommandEntry(): ICommand;
972
+ declare class SkillsCommandSource implements ICommandSource {
973
+ readonly name = "skills";
974
+ getCommands(): ICommand[];
975
+ }
976
+ declare function createSkillsCommandModule(options: ISkillsCommandModuleOptions): ICommandModule;
977
+ //#endregion
978
+ //#region src/skills/skills-command.d.ts
979
+ declare const SKILLS_COMMAND_DESCRIPTION = "List registered skills, or activate one by name";
980
+ declare function executeSkillsCommand(context: ICommandHostCatalog & ICommandHostWorkspace, args?: string): Promise<ICommandResult>;
981
+ //#endregion
982
+ //#region src/statusline/statusline-command-module.d.ts
983
+ declare function createStatusLineCommandEntry(): ICommand;
984
+ declare class StatusLineCommandSource implements ICommandSource {
985
+ readonly name = "statusline";
986
+ getCommands(): ICommand[];
987
+ }
988
+ declare function createStatusLineCommandModule(): ICommandModule;
989
+ //#endregion
990
+ //#region src/statusline/statusline-command.d.ts
991
+ declare const STATUSLINE_USAGE: string;
992
+ declare function executeStatusLineCommand(_context: ICommandHostNoCapability, args: string): ICommandResult;
993
+ //#endregion
994
+ //#region src/terminal-client/terminal-client-commands.d.ts
995
+ /** A command the terminal runs itself, with the terminal's own handoff and working directory. */
996
+ interface ITerminalClientCommand {
997
+ readonly name: string;
998
+ execute(host: ICommandHostTerminalHandoff & ICommandHostWorkspace, args: string): ICommandResult | Promise<ICommandResult>;
999
+ }
1000
+ /** The terminal's own capabilities — the same ones its in-process command modules are given. */
1001
+ interface ITerminalClientCommandOptions {
1002
+ /** The shell `/shell` runs; absent → the platform shell, as for the in-process command. */
1003
+ readonly shellExecutable?: string;
1004
+ /** Product-owned prefix for `/editor`'s temporary directory; absent → the command's default. */
1005
+ readonly editorTemporaryDirectoryPrefix?: string;
1006
+ /** Absent → `/keybindings` answers where key bindings live, as the in-process command does. */
1007
+ readonly keybindingsFile?: IKeybindingsFilePort;
1008
+ /** Absent → `/theme` answers where themes live, as the in-process command does. */
1009
+ readonly themeCatalogue?: IThemeCataloguePort$1;
1010
+ /**
1011
+ * The same module selection the default assembly is given (`agent-command-shell`, …): a module it
1012
+ * leaves out is left out here too, so an attached terminal offers no command a standalone one
1013
+ * would not. Absent → every client-run module.
1014
+ */
1015
+ readonly enabledCommandModules?: readonly string[];
1016
+ /** Applied after `enabledCommandModules`, as in the default assembly (deny > allow). */
1017
+ readonly disabledCommandModules?: readonly string[];
1018
+ }
1019
+ /**
1020
+ * Every client-run command the module selection keeps, whether or not its port is given. The set
1021
+ * shrinks only with the selection, never with a missing port: the attached terminal routes by it, so
1022
+ * a selected command left out would run on the daemon instead — and without its port the command
1023
+ * still answers as its in-process twin does.
1024
+ */
1025
+ declare function createTerminalClientCommands(options: ITerminalClientCommandOptions): readonly ITerminalClientCommand[];
1026
+ //#endregion
1027
+ //#region src/user-local/user-local-command-module.d.ts
1028
+ declare function createUserLocalCommandEntry(): ICommand;
1029
+ declare class UserLocalCommandSource implements ICommandSource {
1030
+ readonly name = "user-local";
1031
+ getCommands(): ICommand[];
1032
+ }
1033
+ declare function createUserLocalCommandModule(storageRoot: string): ICommandModule;
1034
+ //#endregion
1035
+ //#region src/user-local/user-local-command-constants.d.ts
1036
+ declare const USER_LOCAL_COMMAND_DESCRIPTION = "Inspect user-local storage and memory state.";
1037
+ declare const USER_LOCAL_COMMAND_ARGUMENT_HINT = "storage list [--format json] | memory set/list/inspect/disable/delete";
1038
+ declare const USER_LOCAL_COMMAND_USAGE = "Usage: user-local storage list [--format json] | user-local memory set <category> <key> <value> --summary <summary> --source <source> | user-local memory list [--format json] | user-local memory inspect <category> <key> [--format json] | user-local memory disable <category> <key> | user-local memory delete <category> <key>";
1039
+ //#endregion
1040
+ //#region src/user-local/user-local-command.d.ts
1041
+ interface IUserLocalDirectCommandOptions {
1042
+ readonly cwd: string;
1043
+ readonly storageRoot: string;
1044
+ readonly argv: readonly string[];
1045
+ readonly format?: string;
1046
+ readonly summary?: string;
1047
+ readonly source?: string;
1048
+ }
1049
+ declare function executeUserLocalDirectCommand(options: IUserLocalDirectCommandOptions): Promise<ICommandResult>;
1050
+ declare function executeUserLocalCommand(context: ICommandHostWorkspace, rawArgs: string, storageRoot: string): Promise<ICommandResult>;
1051
+ //#endregion
1052
+ export { ADVISOR_SETTING_KEY, AdvisorCommandSource, AgentCommandSource, BackgroundCommandSource, CLEAR_COMMAND_MESSAGE, CompactCommandSource, ContextCommandSource, DoctorCommandSource, EDITOR_COMMAND_DESCRIPTION, EditorCommandSource, EffortCommandSource, ExitCommandSource, GOAL_COMMAND_DESCRIPTION, GitCommandSource, GoalCommandSource, HandoffCommandSource, HelpCommandSource, type ICreateGitProcessOptions, type IDefaultCommandModulesOptions, type IDefaultCommandModulesResult, type IDeviceListEntry, type IDevicesAddResult, type IDevicesCommandPort, type IDevicesInitResult, type IDevicesJoinResult, type IDevicesMeshStatus, type IDevicesRecoverResult, type IDevicesRevokeResult, type IDevicesView, type IDoctorCheck, type IDoctorDeps, type IDoctorDisplayVocabulary, type IDoctorEndpointProbeResult, type IDoctorInputs, type IDoctorPathFacts, type IDoctorRepairPlan, type IDoctorReport, type IEnsureProviderConfigOptions, type IGitCommandModuleOptions, type IGitProcessPort, type IGitProcessRunOptions, type IKeybindingsFilePort, type ILoopCommandOptions, type IProviderCommandModuleOptions, type IProviderCommandSettingsAdapter, type IProviderSetupFlowOptions, type IProviderSetupFlowState, type IProviderSetupPromptStep, type IProviderStartupContext, type IResolvedEditor, type IResolvedShell, type IScheduleSpec, type ISkillsCommandModuleOptions, type ITerminalClientCommand, type ITerminalClientCommandOptions, type IThemeAppearanceState, type IThemeCatalogueEntry, type IThemeCataloguePort, type IUserLocalDirectCommandOptions, KeybindingsCommandSource, LanguageCommandSource, MCPActivationCommandSource, MemoryCommandSource, ModeCommandSource, ModelCommandSource, OutputStyleCommandSource, PermissionsCommandSource, PluginManagerCommandSource, PresetCommandSource, ProviderCommandSource, RemoteControlCommandSource, RewindCommandSource, SANDBOX_MODES, SHELL_COMMAND_DESCRIPTION, SKILLS_COMMAND_DESCRIPTION, STATUSLINE_USAGE, STORAGE_REPAIR_ID, SandboxCommandSource, ScheduleCommandSource, SessionCommandSource, SettingsCommandSource, ShellCommandSource, SkillsCommandSource, StatusLineCommandSource, type TDevicesOutcome, type TDevicesRefusal, type TDoctorCheckStatus, type TDoctorNotProbed, type TDoctorRepairOutcome, type TDoctorRepairPlanResult, type TGitCommandContext, type TGitProcessFailureReason, type TGitProcessOutcome, type TMCPUserAction, type TMCPUserActionSurface, type TPromptInput, type TProviderSetupFlowSubmitResult, type TProviderSetupType, type TReducedMotionOverride, type TScheduleParseResult, ThemeCommandSource, USER_LOCAL_COMMAND_ARGUMENT_HINT, USER_LOCAL_COMMAND_DESCRIPTION, USER_LOCAL_COMMAND_USAGE, UserLocalCommandSource, applyDoctorRepair, buildDoctorReport, collectSettingsSecrets, createAdvisorCommandEntry, createAdvisorCommandModule, createAgentCommandEntry, createAgentCommandModule, createAgentSystemCommand, createBackgroundCommandEntry, createBackgroundCommandModule, createClearCommandEntry, createCompactCommandEntry, createCompactCommandModule, createContextCommandEntry, createContextCommandModule, createCostCommandEntry, createDefaultCommandModules, createDevicesCommandModule, createDoctorCommandEntry, createDoctorCommandModule, createEditorCommandEntry, createEditorCommandModule, createEffortCommandEntry, createEffortCommandModule, createExitCommandEntry, createExitCommandModule, createGitCommandEntry, createGitCommandModule, createGitProcess, createGoalCommandEntry, createGoalCommandModule, createHandoffCommandEntry, createHandoffCommandModule, createHelpCommandEntry, createHelpCommandModule, createKeybindingsCommandEntry, createKeybindingsCommandModule, createLanguageCommandEntry, createLanguageCommandModule, createLoopCommandEntry, createMCPActivationCommandEntry, createMCPActivationCommandModule, createMemoryCommandEntry, createMemoryCommandModule, createModeCommandEntry, createModeCommandModule, createModelCommandEntry, createModelCommandModule, createMonitorCommandEntry, createNodeDoctorDeps, createOutputStyleCommandEntry, createOutputStyleCommandModule, createPermissionsCommandEntry, createPermissionsCommandModule, createPlanCommandModule, createPluginCommandEntry, createPluginCommandModule, createPresetCommandEntry, createPresetCommandModule, createProviderCommandEntry, createProviderCommandModule, createProviderSetupFlow, createReloadPluginsCommandEntry, createRemoteControlCommandEntry, createRemoteControlCommandModule, createRenameCommandEntry, createResetCommandEntry, createResetCommandModule, createResumeCommandEntry, createRewindCommandModule, createSandboxCommandModule, createScheduleCommandEntry, createScheduleCommandModule, createSessionCommandModule, createSettingsCommandEntry, createSettingsCommandModule, createShellCommandEntry, createShellCommandModule, createSkillsCommandEntry, createSkillsCommandModule, createStatusLineCommandEntry, createStatusLineCommandModule, createTerminalClientCommands, createThemeCommandEntry, createThemeCommandModule, createUserLocalCommandEntry, createUserLocalCommandModule, createValidateSessionCommandEntry, doctorRepairAllowlist, ensureProviderConfig, executeAdvisorCommand, executeAgentCommand, executeBackgroundCommand, executeClearCommand, executeCompactCommand, executeContextCommand, executeCostCommand, executeEditorCommand, executeEffortCommand, executeExitCommand, executeGitCommand, executeGoalCommand, executeHandoffCommand, executeHelpCommand, executeLanguageCommand, executeLoopCommand, executeMCPActivationCommand, executeMemoryCommand, executeModeCommand, executeModelCommand, executeMonitorCommand, executeOutputStyleCommand, executePermissionsCommand, executePluginCommand, executePresetCommand, executeProviderCommand, executeReloadPluginsCommand, executeRemoteControlCommand, executeRenameCommand, executeResetCommand, executeResumeCommand, executeRewindCommand, executeSandboxCommand, executeScheduleCommand, executeShellCommand, executeSkillsCommand, executeStatusLineCommand, executeThemeCommand, executeUserLocalCommand, executeUserLocalDirectCommand, executeValidateSessionCommand, formatProviderSetupChoiceLabel, formatProviderSetupHelpLinks, formatProviderSetupPromptLabel, formatProviderSetupSelectionPrompt, formatSandboxStatus, getProviderSetupStep, gitEnvironment, isDoctorRepairId, mcpUnavailableServersNotice, mcpUserActionCommand, mcpUserActionNotice, parseScheduleSpec, planDoctorRepair, redactDiagnosticText, renderDoctorReport, resolveCommandOnPath, resolveEditor, resolveProviderSetupSelection, resolveShell, runDoctor, runProviderSetupPromptFlow, runProviderStartupSetup, spawnInherited, submitProviderSetupValue, validateProviderSetupValue };
1053
+ //# sourceMappingURL=index.d.ts.map