@robota-sdk/agent-product 3.2.3 → 3.3.1

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