@robota-sdk/agent-command 3.0.0-beta.79 → 3.0.0-beta.81
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.
- package/README.md +11 -2
- package/dist/node/index.cjs +76 -38
- package/dist/node/index.d.cts +946 -0
- package/dist/node/index.d.cts.map +1 -0
- package/dist/node/index.d.ts +564 -51
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +76 -38
- package/dist/node/index.js.map +1 -1
- package/package.json +34 -16
- package/src/advisor/advisor-command-module.ts +47 -0
- package/src/advisor/advisor-command.test.ts +102 -0
- package/src/advisor/advisor-command.ts +55 -0
- package/src/advisor/advisor-cost-functional.test.ts +92 -0
- package/src/advisor/index.ts +6 -0
- package/src/agent/__tests__/agent-command.test.ts +39 -8
- package/src/agent/agent-command-module.ts +14 -7
- package/src/agent/agent-command-parser.ts +1 -1
- package/src/agent/agent-command.ts +3 -3
- package/src/background/__tests__/background-command-module.test.ts +59 -52
- package/src/background/background-command-module.ts +2 -1
- package/src/background/background-command.ts +3 -3
- package/src/command-module-utils.ts +33 -0
- package/src/compact/__tests__/compact-command-module.test.ts +31 -23
- package/src/compact/compact-command-module.ts +10 -1
- package/src/compact/compact-command.ts +6 -3
- package/src/context/__tests__/context-command-module.test.ts +214 -63
- package/src/context/auto-compact-format.ts +25 -0
- package/src/context/context-breakdown.ts +295 -0
- package/src/context/context-command-module.ts +45 -14
- package/src/context/context-command.ts +34 -257
- package/src/default/__tests__/__snapshots__/model-exposure.test.ts.snap +110 -0
- package/src/default/__tests__/default-command-modules.test.ts +59 -7
- package/src/default/__tests__/model-exposure.test.ts +241 -0
- package/src/default/__tests__/org-policy-forwarding.test.ts +98 -0
- package/src/default/default-command-modules.ts +130 -18
- package/src/default/index.ts +4 -1
- package/src/devices/__tests__/devices-command-module.test.ts +212 -0
- package/src/devices/devices-command-module.ts +224 -0
- package/src/devices/devices-command-port.ts +82 -0
- package/src/devices/index.ts +11 -0
- package/src/doctor/__tests__/doctor-command-module.test.ts +145 -0
- package/src/doctor/__tests__/doctor-display-vocabulary.test.ts +38 -0
- package/src/doctor/__tests__/doctor-fixture.ts +145 -0
- package/src/doctor/__tests__/doctor-redaction.test.ts +29 -0
- package/src/doctor/__tests__/doctor-runner.test.ts +464 -0
- package/src/doctor/doctor-command-module.ts +132 -0
- package/src/doctor/doctor-extensions-probe.ts +299 -0
- package/src/doctor/doctor-node-deps.ts +89 -0
- package/src/doctor/doctor-redaction.ts +99 -0
- package/src/doctor/doctor-render.ts +70 -0
- package/src/doctor/doctor-repair.ts +136 -0
- package/src/doctor/doctor-runner.ts +122 -0
- package/src/doctor/doctor-settings-probe.ts +239 -0
- package/src/doctor/doctor-storage-probe.ts +187 -0
- package/src/doctor/doctor-types.ts +109 -0
- package/src/doctor/index.ts +32 -0
- package/src/editor/__tests__/editor-command-functional.test.ts +49 -16
- package/src/editor/editor-command-module.ts +6 -5
- package/src/editor/editor-command.ts +10 -5
- package/src/effort/effort-command-module.ts +51 -0
- package/src/effort/effort-command.test.ts +140 -0
- package/src/effort/effort-command.ts +122 -0
- package/src/effort/index.ts +6 -0
- package/src/exit/__tests__/exit-command-module.test.ts +16 -9
- package/src/exit/exit-command-module.ts +2 -1
- package/src/exit/exit-command.ts +6 -6
- package/src/fork/__tests__/fork-command.test.ts +184 -0
- package/src/fork/fork-command-module.ts +61 -0
- package/src/fork/fork-command.ts +162 -0
- package/src/fork/index.ts +8 -0
- package/src/git/__tests__/fake-git-port.ts +28 -0
- package/src/git/__tests__/git-command-module.test.ts +103 -0
- package/src/git/__tests__/git-commit.test.ts +185 -0
- package/src/git/__tests__/git-diff.test.ts +125 -0
- package/src/git/__tests__/git-process.test.ts +221 -0
- package/src/git/__tests__/git-status.test.ts +117 -0
- package/src/git/git-command-module.ts +139 -0
- package/src/git/git-commit.ts +251 -0
- package/src/git/git-diff.ts +129 -0
- package/src/git/git-process.ts +169 -0
- package/src/git/git-status.ts +134 -0
- package/src/git/index.ts +17 -0
- package/src/goal/__tests__/goal-command.test.ts +9 -4
- package/src/goal/goal-command-module.ts +2 -1
- package/src/goal/goal-command.ts +6 -9
- package/src/handoff/__tests__/handoff-command.test.ts +218 -0
- package/src/handoff/handoff-command-module.ts +48 -0
- package/src/handoff/handoff-command.ts +187 -0
- package/src/handoff/index.ts +6 -0
- package/src/help/__tests__/help-command-module.test.ts +63 -40
- package/src/help/__tests__/help-command.test.ts +46 -37
- package/src/help/help-command-module.ts +2 -1
- package/src/help/help-command.ts +3 -3
- package/src/index.ts +124 -2
- package/src/keybindings/__tests__/keybindings-command-module.test.ts +57 -0
- package/src/keybindings/index.ts +6 -0
- package/src/keybindings/keybindings-command-module.ts +74 -0
- package/src/language/__tests__/language-command-module.test.ts +33 -28
- package/src/language/language-command-module.ts +2 -1
- package/src/language/language-command.ts +8 -6
- package/src/mcp-activation/__tests__/mcp-activation-command.test.ts +630 -0
- package/src/mcp-activation/__tests__/mcp-model-view.test.ts +211 -0
- package/src/mcp-activation/index.ts +12 -0
- package/src/mcp-activation/mcp-activation-command-module.ts +92 -0
- package/src/mcp-activation/mcp-activation-command.ts +448 -0
- package/src/mcp-activation/mcp-model-notice.ts +85 -0
- package/src/mcp-activation/mcp-model-status.ts +99 -0
- package/src/memory/__tests__/memory-command-module.test.ts +167 -74
- package/src/memory/memory-command-module.ts +18 -1
- package/src/memory/memory-command.ts +38 -38
- package/src/mode/__tests__/mode-command-module.test.ts +51 -38
- package/src/mode/mode-command-module.ts +2 -1
- package/src/mode/mode-command.ts +15 -7
- package/src/output-style/__tests__/output-style-command.test.ts +96 -0
- package/src/output-style/index.ts +6 -0
- package/src/output-style/output-style-command-module.ts +143 -0
- package/src/peers/__tests__/peers-command.test.ts +241 -0
- package/src/peers/index.ts +9 -0
- package/src/peers/peers-command-module.ts +47 -0
- package/src/peers/peers-command.ts +142 -0
- package/src/permissions/__tests__/permissions-command-module.test.ts +149 -37
- package/src/permissions/permissions-command-module.ts +2 -1
- package/src/permissions/permissions-command.ts +46 -4
- package/src/plan/__tests__/plan-command.test.ts +129 -0
- package/src/plan/index.ts +9 -0
- package/src/plan/plan-command-module.ts +49 -0
- package/src/plan/plan-command.ts +92 -0
- package/src/plugin/__tests__/plugin-command-module.test.ts +46 -40
- package/src/plugin/__tests__/plugin-host-boundary.test.ts +11 -0
- package/src/plugin/plugin-command-module.ts +3 -1
- package/src/plugin/plugin-command.ts +17 -16
- package/src/preset/__tests__/host-supplied-preset-registry.test.ts +98 -0
- package/src/preset/__tests__/preset-command-module.test.ts +102 -56
- package/src/preset/preset-command-module.ts +26 -8
- package/src/preset/preset-command.ts +85 -27
- package/src/provider/__tests__/org-policy.test.ts +4 -5
- package/src/provider/__tests__/provider-command-module.test.ts +11 -14
- package/src/provider/__tests__/provider-startup-host-settings.test.ts +16 -0
- package/src/provider/__tests__/scripted-interaction.ts +7 -5
- package/src/provider/provider-command-execution.ts +4 -4
- package/src/provider/provider-command-module.ts +2 -1
- package/src/provider/provider-command-profile-lifecycle.ts +4 -4
- package/src/provider/provider-command-profile-operations.ts +3 -3
- package/src/provider/provider-command-profile.ts +1 -1
- package/src/provider/provider-command-setup.ts +4 -4
- package/src/provider/provider-startup.ts +62 -35
- package/src/remote-control/__tests__/remote-control-command-module.test.ts +36 -0
- package/src/remote-control/__tests__/remote-control-command.test.ts +216 -0
- package/src/remote-control/index.ts +8 -0
- package/src/remote-control/remote-control-command-module.ts +61 -0
- package/src/remote-control/remote-control-command.ts +138 -0
- package/src/reset/__tests__/reset-command-module.test.ts +5 -5
- package/src/reset/reset-command-module.ts +2 -1
- package/src/reset/reset-command.ts +3 -4
- package/src/rewind/__tests__/rewind-command-module.test.ts +40 -0
- package/src/rewind/rewind-command-module.ts +2 -1
- package/src/rewind/rewind-command.ts +73 -6
- package/src/sandbox/__tests__/sandbox-command.test.ts +80 -0
- package/src/sandbox/index.ts +2 -0
- package/src/sandbox/sandbox-command-module.ts +56 -0
- package/src/sandbox/sandbox-command.ts +94 -0
- package/src/schedule/__tests__/loop-command-functional.test.ts +386 -0
- package/src/schedule/__tests__/loop-command.test.ts +360 -0
- package/src/schedule/__tests__/loop-jitter.test.ts +25 -0
- package/src/schedule/__tests__/monitor-model-permission-functional.test.ts +126 -0
- package/src/schedule/__tests__/schedule-command.test.ts +143 -3
- package/src/schedule/__tests__/schedule-redos.test.ts +81 -0
- package/src/schedule/index.ts +3 -0
- package/src/schedule/loop-command.ts +333 -0
- package/src/schedule/loop-jitter.ts +41 -0
- package/src/schedule/schedule-command-module.ts +92 -14
- package/src/schedule/schedule-command.ts +98 -9
- package/src/schedule/schedule-spec-parser.ts +5 -1
- package/src/session/__tests__/rename-host-persistence.test.ts +72 -0
- package/src/session/__tests__/session-command-module.test.ts +210 -45
- package/src/session/session-command-module.ts +68 -37
- package/src/session/session-command.ts +147 -80
- package/src/settings/settings-command-module.ts +3 -2
- package/src/shell/__tests__/resolve-shell-host.test.ts +11 -0
- package/src/shell/__tests__/shell-command-functional.test.ts +23 -1
- package/src/shell/resolve-shell.ts +2 -2
- package/src/shell/shell-command-module.ts +6 -5
- package/src/shell/shell-command.ts +9 -5
- package/src/skills/__tests__/skills-command-module.test.ts +69 -28
- package/src/skills/index.ts +1 -0
- package/src/skills/skills-command-module.ts +22 -5
- package/src/skills/skills-command.ts +14 -13
- package/src/statusline/__tests__/statusline-command-module.test.ts +5 -4
- package/src/statusline/statusline-command-module.ts +2 -1
- package/src/statusline/statusline-command.ts +4 -4
- package/src/theme/__tests__/theme-command.test.ts +204 -0
- package/src/theme/index.ts +12 -0
- package/src/theme/theme-command-module.ts +211 -0
- package/src/user-local/__tests__/user-local-command.test.ts +145 -110
- package/src/user-local/user-local-command-constants.ts +1 -1
- package/src/user-local/user-local-command-module.ts +6 -5
- package/src/user-local/user-local-command.ts +12 -6
- package/src/user-local/user-local-memory-command.ts +17 -7
- package/src/plugins/default-plugin-command-adapter.ts +0 -164
- package/src/plugins/default-plugin-command-source-loader.ts +0 -31
package/dist/node/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ICommand, ICommandPluginAdapter, ICommandResult, ICommandSource } from "@robota-sdk/agent-interface-transport";
|
|
1
|
+
import { IAgentJobHostContext, ICommandHostAdapterAccess, ICommandHostBackgroundTasks, ICommandHostCatalog, ICommandHostCheckpoints, ICommandHostContextReferences, ICommandHostContextWindow, ICommandHostGoal, ICommandHostMemory, ICommandHostNoCapability, ICommandHostPresetApplication, ICommandHostSessionAccess, ICommandHostTerminalHandoff, ICommandHostUserInteraction, ICommandHostWorkspace, ICommandMCPActivationAdapter, ICommandModule, ICommandSandboxStatus, IContributionSource, IOrgPolicy, IProviderCommandModuleOptions, IProviderCommandModuleOptions as IProviderCommandModuleOptions$1, IProviderCommandModuleOptions as IProviderCommandModuleOptions$2, IProviderCommandSettingsAdapter, IProviderCommandSettingsAdapter as IProviderCommandSettingsAdapter$1, IProviderSetupInput, ISettingsDocumentStore, ISkillRootDescriptor, ISystemCommand, IUnknownCommandModuleName, TSandboxCommandMode, TSettings, TSettingsScope, TSettingsSource, TWorkspaceProjectAccess } from "@robota-sdk/agent-framework";
|
|
3
2
|
import { IProviderDefinition, IProviderSetupHelpLink, IProviderSetupStepDefinition, ITerminalOutput, TProviderSetupField } from "@robota-sdk/agent-core";
|
|
4
|
-
|
|
3
|
+
import { ICommand, ICommandResult, ICommandSource, IThemeAppearanceState, IThemeCatalogueEntry, IThemeCataloguePort, IThemeCataloguePort as IThemeCataloguePort$1, TReducedMotionOverride } from "@robota-sdk/agent-interface-command";
|
|
5
4
|
//#region src/agent/agent-command-module.d.ts
|
|
6
5
|
declare function createAgentCommandEntry(): ICommand;
|
|
7
6
|
declare function createAgentSystemCommand(): ISystemCommand;
|
|
@@ -14,11 +13,310 @@ declare function createAgentCommandModule(): ICommandModule;
|
|
|
14
13
|
//#region src/agent/agent-command.d.ts
|
|
15
14
|
declare function executeAgentCommand(session: IAgentJobHostContext, args: string): Promise<ICommandResult>;
|
|
16
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
|
+
type TDevicesOutcome<T> = {
|
|
53
|
+
readonly ok: true;
|
|
54
|
+
readonly value: T;
|
|
55
|
+
} | {
|
|
56
|
+
readonly ok: false;
|
|
57
|
+
readonly reason: TDevicesRefusal;
|
|
58
|
+
};
|
|
59
|
+
interface IDevicesInitResult {
|
|
60
|
+
readonly userId: string;
|
|
61
|
+
readonly deviceId: string;
|
|
62
|
+
readonly signingKeyId: string;
|
|
63
|
+
/** Where the private keys were kept, for the operator. */
|
|
64
|
+
readonly keyStorage?: string;
|
|
65
|
+
}
|
|
66
|
+
interface IDevicesRecoverResult {
|
|
67
|
+
readonly deviceId: string;
|
|
68
|
+
readonly signingKeyId: string;
|
|
69
|
+
readonly revokedSigningKeyCount: number;
|
|
70
|
+
/** Other devices that were certified by a retired signing key and must enrol again. */
|
|
71
|
+
readonly droppedDeviceCount: number;
|
|
72
|
+
}
|
|
73
|
+
interface IDevicesRevokeResult {
|
|
74
|
+
readonly deviceId: string;
|
|
75
|
+
readonly name: string;
|
|
76
|
+
}
|
|
77
|
+
interface IDevicesCommandPort {
|
|
78
|
+
/** This device's view of the roster, or `undefined` when it has no identity yet. */
|
|
79
|
+
list(): Promise<IDevicesView | undefined>;
|
|
80
|
+
/** Create the identity. Runs on the operator terminal (it shows the phrase once). */
|
|
81
|
+
init(options: {
|
|
82
|
+
readonly name?: string;
|
|
83
|
+
}): Promise<TDevicesOutcome<IDevicesInitResult>>;
|
|
84
|
+
/** Rotate the signing key from the phrase. Runs on the operator terminal. */
|
|
85
|
+
recover(): Promise<TDevicesOutcome<IDevicesRecoverResult>>;
|
|
86
|
+
/** Revoke a device by id prefix with the signing key. Confirms on the operator terminal. */
|
|
87
|
+
revoke(deviceIdPrefix: string): Promise<TDevicesOutcome<IDevicesRevokeResult>>;
|
|
88
|
+
}
|
|
89
|
+
//#endregion
|
|
90
|
+
//#region src/devices/devices-command-module.d.ts
|
|
91
|
+
declare function createDevicesCommandModule(port: IDevicesCommandPort): ICommandModule;
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region src/doctor/doctor-types.d.ts
|
|
94
|
+
type TDoctorCheckStatus = 'ok' | 'warn' | 'fail' | 'not-configured' | 'not-probed';
|
|
95
|
+
/** The enumerated probes the read-only doctor does not run. Adding one is a spec change. */
|
|
96
|
+
type TDoctorNotProbed = 'mcp-connection' | 'hook-execution' | 'owner-only-mode';
|
|
97
|
+
interface IDoctorCheck {
|
|
98
|
+
/** Stable, user-typeable id (`settings.<scope>.<family>`, `storage.user`, `mcp.plugin.<id>.<server>`). */
|
|
99
|
+
readonly id: string;
|
|
100
|
+
readonly label: string;
|
|
101
|
+
readonly status: TDoctorCheckStatus;
|
|
102
|
+
/** The exact file or directory the finding is about, when there is one. */
|
|
103
|
+
readonly path?: string;
|
|
104
|
+
/** The specific cause, as the owner reported it — a state word, an issue path, an errno; never a secret. */
|
|
105
|
+
readonly cause?: string;
|
|
106
|
+
/** Free-text detail lines rendered under the check. */
|
|
107
|
+
readonly detail?: readonly string[];
|
|
108
|
+
/** Present when this run can repair the finding; names the allowlisted repair id (equal to `id`). */
|
|
109
|
+
readonly repair?: string;
|
|
110
|
+
}
|
|
111
|
+
interface IDoctorReport {
|
|
112
|
+
readonly checks: readonly IDoctorCheck[];
|
|
113
|
+
readonly failCount: number;
|
|
114
|
+
readonly warnCount: number;
|
|
115
|
+
/** Ids of checks whose `repair` is set in THIS run. */
|
|
116
|
+
readonly repairable: readonly string[];
|
|
117
|
+
/** Exit-code contract: `0` when `failCount === 0`, else `1`. */
|
|
118
|
+
readonly exitCode: 0 | 1;
|
|
119
|
+
}
|
|
120
|
+
/** One TCP reachability result; the probe is injected so tests never touch the network. */
|
|
121
|
+
interface IDoctorEndpointProbeResult {
|
|
122
|
+
readonly reachable: boolean;
|
|
123
|
+
readonly elapsedMs?: number;
|
|
124
|
+
readonly error?: string;
|
|
125
|
+
}
|
|
126
|
+
/** What the host knows and the runner does not: the composition the shell built, and its facts. */
|
|
127
|
+
interface IDoctorInputs {
|
|
128
|
+
readonly cwd: string;
|
|
129
|
+
readonly userHome: string;
|
|
130
|
+
/**
|
|
131
|
+
* The product's own user settings file — the only settings layer the repair allowlist may rewrite.
|
|
132
|
+
* The host names it; this library knows no product layout.
|
|
133
|
+
*/
|
|
134
|
+
readonly userSettingsPath: string;
|
|
135
|
+
/** The product's user store root and its sessions directory, as the host lays them out. */
|
|
136
|
+
readonly userStorage: {
|
|
137
|
+
readonly root: string;
|
|
138
|
+
readonly sessions: string;
|
|
139
|
+
};
|
|
140
|
+
/** The project state root under a trusted workspace, when the host has one. */
|
|
141
|
+
readonly projectStorageRoot?: string;
|
|
142
|
+
/** Every settings source the runtime merge chain reads, in precedence order. */
|
|
143
|
+
readonly settingsSources: readonly TSettingsSource[];
|
|
144
|
+
readonly projectAccess: TWorkspaceProjectAccess;
|
|
145
|
+
readonly providerDefinitions: readonly IProviderDefinition[];
|
|
146
|
+
/** Optional host wording for remediation; omitted values use product-neutral guidance. */
|
|
147
|
+
readonly diagnosticGuidance?: {
|
|
148
|
+
readonly providerResolution?: string;
|
|
149
|
+
readonly projectTrust?: string;
|
|
150
|
+
};
|
|
151
|
+
/** Environment map (test seam; default `process.env`). */
|
|
152
|
+
readonly env: Readonly<Record<string, string | undefined>>;
|
|
153
|
+
readonly contributionSources: readonly IContributionSource[];
|
|
154
|
+
readonly skillRoots: readonly ISkillRootDescriptor[];
|
|
155
|
+
/** Plugin scope directories, most specific first — the same list the session loader reads. */
|
|
156
|
+
readonly pluginsDirs: readonly string[];
|
|
157
|
+
/** Host-composed MCP activation adapter; absent means the CLI has no MCP host. */
|
|
158
|
+
readonly mcpActivation?: ICommandMCPActivationAdapter;
|
|
159
|
+
/** Checks only the host can make (Node version, terminal, CLI version); rendered first. */
|
|
160
|
+
readonly hostChecks: readonly IDoctorCheck[];
|
|
161
|
+
/** A workspace-composition failure the host converted into a check rather than a crash. */
|
|
162
|
+
readonly compositionFailure?: IDoctorCheck;
|
|
163
|
+
}
|
|
164
|
+
/** Storage facts about one path, probed without writing. */
|
|
165
|
+
interface IDoctorPathFacts {
|
|
166
|
+
readonly exists: boolean;
|
|
167
|
+
readonly isDirectory: boolean;
|
|
168
|
+
readonly writable: boolean;
|
|
169
|
+
/** POSIX mode bits, or `undefined` when the platform does not assert them. */
|
|
170
|
+
readonly mode?: number;
|
|
171
|
+
}
|
|
172
|
+
/** Every side effect the runner needs, with Node defaults in `doctor-node-deps.ts`. */
|
|
173
|
+
interface IDoctorDeps {
|
|
174
|
+
readonly probeEndpoint: (host: string, port: number) => Promise<IDoctorEndpointProbeResult>;
|
|
175
|
+
readonly inspectPath: (path: string) => IDoctorPathFacts;
|
|
176
|
+
/** `true` when a bare command name resolves on `PATH`, or a path-form command exists. */
|
|
177
|
+
readonly resolveCommand: (command: string) => boolean;
|
|
178
|
+
/** The platform's owner-only guarantee, from `@robota-sdk/agent-core/node`. */
|
|
179
|
+
readonly ownerOnlyGuarantee: () => 'posix-mode' | 'windows-acl';
|
|
180
|
+
}
|
|
181
|
+
//#endregion
|
|
182
|
+
//#region src/doctor/doctor-render.d.ts
|
|
183
|
+
/** Optional product wording supplied by the host; omission keeps diagnostics product-neutral. */
|
|
184
|
+
interface IDoctorDisplayVocabulary {
|
|
185
|
+
readonly title?: string;
|
|
186
|
+
readonly productName?: string;
|
|
187
|
+
readonly formatRepairCommand?: (checkId: string) => string;
|
|
188
|
+
readonly repairOffer?: string;
|
|
189
|
+
}
|
|
190
|
+
/** Render the report as lines: a title, every check, then the summary and the repair offers. */
|
|
191
|
+
declare function renderDoctorReport(report: IDoctorReport, title?: string, display?: IDoctorDisplayVocabulary): string[];
|
|
192
|
+
//#endregion
|
|
193
|
+
//#region src/doctor/doctor-command-module.d.ts
|
|
194
|
+
declare function createDoctorCommandEntry(): ICommand;
|
|
195
|
+
declare class DoctorCommandSource implements ICommandSource {
|
|
196
|
+
readonly name = "doctor";
|
|
197
|
+
getCommands(): ICommand[];
|
|
198
|
+
}
|
|
199
|
+
/** Register `/doctor` over the host-composed inputs; the host decides whether to supply them. */
|
|
200
|
+
declare function createDoctorCommandModule(inputs: IDoctorInputs, deps?: IDoctorDeps, display?: IDoctorDisplayVocabulary): ICommandModule;
|
|
201
|
+
//#endregion
|
|
202
|
+
//#region src/doctor/doctor-node-deps.d.ts
|
|
203
|
+
/** A bare command resolves through `PATH`; a path-form command must exist as given. */
|
|
204
|
+
declare function resolveCommandOnPath(command: string, env?: Readonly<Record<string, string | undefined>>): boolean;
|
|
205
|
+
declare function createNodeDoctorDeps(env?: Readonly<Record<string, string | undefined>>): IDoctorDeps;
|
|
206
|
+
//#endregion
|
|
207
|
+
//#region src/doctor/doctor-redaction.d.ts
|
|
208
|
+
/**
|
|
209
|
+
* Mask every known secret value and every credential-shaped token in `text`.
|
|
210
|
+
*
|
|
211
|
+
* `secrets` are literal values the doctor learned from its inputs — the resolved credential, every
|
|
212
|
+
* literal `apiKey` in any settings layer (active or not), every value a `$ENV:` reference names,
|
|
213
|
+
* every `env` map value. Values shorter than four characters are not masked: they cannot be
|
|
214
|
+
* credentials and masking them would shred ordinary words.
|
|
215
|
+
*/
|
|
216
|
+
declare function redactDiagnosticText(text: string, secrets?: Iterable<string>): string;
|
|
217
|
+
/**
|
|
218
|
+
* Collect the literal secrets a set of parsed settings layers and the environment expose:
|
|
219
|
+
* `providers.*.apiKey`, `provider.apiKey` (literal, or the value of a `$ENV:` reference), and
|
|
220
|
+
* every `env` map value. The doctor never RENDERS any of these; they feed the redactor so that a
|
|
221
|
+
* value which nonetheless reaches a message is masked.
|
|
222
|
+
*/
|
|
223
|
+
declare function collectSettingsSecrets(layers: ReadonlyArray<TSettings | undefined>, env: Readonly<Record<string, string | undefined>>): string[];
|
|
224
|
+
//#endregion
|
|
225
|
+
//#region src/doctor/doctor-repair.d.ts
|
|
226
|
+
declare const STORAGE_REPAIR_ID = "storage.user";
|
|
227
|
+
/** The closed allowlist for this composition: the host's user settings layer id and `storage.user`. */
|
|
228
|
+
declare function doctorRepairAllowlist(inputs: IDoctorInputs): readonly string[];
|
|
229
|
+
interface IDoctorRepairPlan {
|
|
230
|
+
readonly id: string;
|
|
231
|
+
/** What the writer will do, for the confirmation prompt. */
|
|
232
|
+
readonly description: string;
|
|
233
|
+
readonly path: string;
|
|
234
|
+
}
|
|
235
|
+
type TDoctorRepairPlanResult = {
|
|
236
|
+
readonly ok: true;
|
|
237
|
+
readonly plan: IDoctorRepairPlan;
|
|
238
|
+
} | {
|
|
239
|
+
readonly ok: false;
|
|
240
|
+
readonly reason: string;
|
|
241
|
+
};
|
|
242
|
+
type TDoctorRepairOutcome = {
|
|
243
|
+
readonly applied: true;
|
|
244
|
+
readonly plan: IDoctorRepairPlan;
|
|
245
|
+
} | {
|
|
246
|
+
readonly applied: false;
|
|
247
|
+
readonly reason: string;
|
|
248
|
+
};
|
|
249
|
+
declare function isDoctorRepairId(id: string, inputs: IDoctorInputs): boolean;
|
|
250
|
+
/** Re-read the state now and decide whether `id` is repairable in it. Never writes. */
|
|
251
|
+
declare function planDoctorRepair(id: string, inputs: IDoctorInputs, deps: IDoctorDeps): TDoctorRepairPlanResult;
|
|
252
|
+
/**
|
|
253
|
+
* Plan, confirm, re-plan, write. `confirm` is the host's prompt (`--yes` supplies `() => true`); a
|
|
254
|
+
* refusal or an absent prompt writes nothing. The plan is recomputed after confirmation so a state
|
|
255
|
+
* that changed while the user was deciding is refused rather than overwritten.
|
|
256
|
+
*/
|
|
257
|
+
declare function applyDoctorRepair(id: string, inputs: IDoctorInputs, deps: IDoctorDeps, confirm: (plan: IDoctorRepairPlan) => Promise<boolean>): Promise<TDoctorRepairOutcome>;
|
|
258
|
+
//#endregion
|
|
259
|
+
//#region src/doctor/doctor-runner.d.ts
|
|
260
|
+
/** Aggregate checks into the report; `fail` alone raises the exit code (CLI-067). */
|
|
261
|
+
declare function buildDoctorReport(checks: readonly IDoctorCheck[]): IDoctorReport;
|
|
262
|
+
/** Run every probe and return the redacted report. */
|
|
263
|
+
declare function runDoctor(inputs: IDoctorInputs, deps: IDoctorDeps): Promise<IDoctorReport>;
|
|
264
|
+
//#endregion
|
|
265
|
+
//#region src/keybindings/keybindings-command-module.d.ts
|
|
266
|
+
interface IKeybindingsFilePort {
|
|
267
|
+
ensureFile(): Promise<string>;
|
|
268
|
+
}
|
|
269
|
+
declare function createKeybindingsCommandEntry(): ICommand;
|
|
270
|
+
declare class KeybindingsCommandSource implements ICommandSource {
|
|
271
|
+
readonly name = "keybindings";
|
|
272
|
+
getCommands(): ICommand[];
|
|
273
|
+
}
|
|
274
|
+
declare function createKeybindingsCommandModule(file: IKeybindingsFilePort): ICommandModule;
|
|
275
|
+
//#endregion
|
|
17
276
|
//#region src/default/default-command-modules.d.ts
|
|
18
277
|
interface IDefaultCommandModulesOptions {
|
|
19
278
|
cwd: string;
|
|
279
|
+
userLocalStorageRoot: string;
|
|
280
|
+
/** Product-owned prefix for the interactive editor's temporary directory. */
|
|
281
|
+
editorTemporaryDirectoryPrefix?: string;
|
|
282
|
+
contributionSources?: readonly IContributionSource[];
|
|
283
|
+
skillRoots?: readonly ISkillRootDescriptor[];
|
|
20
284
|
providerDefinitions: readonly IProviderDefinition[];
|
|
21
285
|
providerSettingsAdapter: IProviderCommandSettingsAdapter$1;
|
|
286
|
+
/**
|
|
287
|
+
* CLI-083 (issue #2287) — the org policy, so `allowedProviders` and `requireApiKeyFromEnv` are
|
|
288
|
+
* reachable. This parameter existed, was removed by `92596bc6f` along with its only caller, and
|
|
289
|
+
* the consumer never stopped reading it: `provider-command-profile-operations.ts` still
|
|
290
|
+
* destructures `orgPolicy` from its options and enforces on it. Optional, so its absence stays
|
|
291
|
+
* distinguishable from a policy that allows everything — and that optionality is why nothing went
|
|
292
|
+
* red when the producer dropped it.
|
|
293
|
+
*/
|
|
294
|
+
orgPolicy?: IOrgPolicy;
|
|
295
|
+
/** Optional TUI-owned file capability; absence means `/keybindings` is not registered. */
|
|
296
|
+
keybindingsFilePort?: IKeybindingsFilePort;
|
|
297
|
+
/**
|
|
298
|
+
* SCREEN-2002: the surface's theme catalogue. Absence means `/theme` is not registered at all —
|
|
299
|
+
* print mode and `--serve` render no themes, and a command that cannot do anything is better
|
|
300
|
+
* missing than present-and-failing.
|
|
301
|
+
*/
|
|
302
|
+
themeCataloguePort?: IThemeCataloguePort$1;
|
|
303
|
+
/**
|
|
304
|
+
* The host that keeps this device's identity (its terminal, credential store and state files).
|
|
305
|
+
* Absence means `/devices` is not registered: without it the command could do nothing.
|
|
306
|
+
*/
|
|
307
|
+
devicesPort?: IDevicesCommandPort;
|
|
308
|
+
/** OBSERVABILITY-1991: host-composed doctor inputs; absence means `/doctor` is not registered. */
|
|
309
|
+
doctorInputs?: IDoctorInputs;
|
|
310
|
+
/** Product-owned diagnostic wording; absent keeps `/doctor` product-neutral. */
|
|
311
|
+
doctorDisplay?: IDoctorDisplayVocabulary;
|
|
312
|
+
/** Product-owned command to resume a saved fork; absent yields neutral host guidance. */
|
|
313
|
+
formatForkResumeCommand?: (sessionId: string) => string;
|
|
314
|
+
/** Host-owned fallback text and kill switch for session-local repeat. */
|
|
315
|
+
loopOptions?: {
|
|
316
|
+
defaultPrompt?: string;
|
|
317
|
+
resolveDefaultPrompt?: () => string;
|
|
318
|
+
disabled?: boolean;
|
|
319
|
+
};
|
|
22
320
|
/**
|
|
23
321
|
* Whitelist of module `name`s to keep. When provided, only modules whose `name`
|
|
24
322
|
* appears here survive. Omitted → all modules kept (no-regression).
|
|
@@ -30,13 +328,16 @@ interface IDefaultCommandModulesOptions {
|
|
|
30
328
|
*/
|
|
31
329
|
disabledCommandModules?: readonly string[];
|
|
32
330
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
331
|
+
/**
|
|
332
|
+
* Result of {@link createDefaultCommandModules} (INFRA-032): the selected `modules` plus any preset
|
|
333
|
+
* `enabledCommandModules`/`disabledCommandModules` names that matched no built module. Unknown names
|
|
334
|
+
* are returned as data (not dropped silently) so the CLI startup path can surface a non-fatal notice.
|
|
335
|
+
*/
|
|
336
|
+
interface IDefaultCommandModulesResult {
|
|
337
|
+
readonly modules: readonly ICommandModule[];
|
|
338
|
+
readonly unknownModuleNames: readonly IUnknownCommandModuleName[];
|
|
339
|
+
}
|
|
340
|
+
declare function createDefaultCommandModules({ cwd: _cwd, userLocalStorageRoot, editorTemporaryDirectoryPrefix, contributionSources, skillRoots, providerDefinitions, providerSettingsAdapter, orgPolicy, keybindingsFilePort, themeCataloguePort, devicesPort, doctorInputs, doctorDisplay, formatForkResumeCommand, loopOptions, enabledCommandModules, disabledCommandModules }: IDefaultCommandModulesOptions): IDefaultCommandModulesResult;
|
|
40
341
|
//#endregion
|
|
41
342
|
//#region src/background/background-command-module.d.ts
|
|
42
343
|
declare function createBackgroundCommandEntry(): ICommand;
|
|
@@ -47,7 +348,7 @@ declare class BackgroundCommandSource implements ICommandSource {
|
|
|
47
348
|
declare function createBackgroundCommandModule(): ICommandModule;
|
|
48
349
|
//#endregion
|
|
49
350
|
//#region src/background/background-command.d.ts
|
|
50
|
-
declare function executeBackgroundCommand(context:
|
|
351
|
+
declare function executeBackgroundCommand(context: ICommandHostBackgroundTasks, args: string): Promise<ICommandResult>;
|
|
51
352
|
//#endregion
|
|
52
353
|
//#region src/goal/goal-command-module.d.ts
|
|
53
354
|
declare function createGoalCommandEntry(): ICommand;
|
|
@@ -59,7 +360,42 @@ declare function createGoalCommandModule(): ICommandModule;
|
|
|
59
360
|
//#endregion
|
|
60
361
|
//#region src/goal/goal-command.d.ts
|
|
61
362
|
declare const GOAL_COMMAND_DESCRIPTION = "Assign an autonomous goal the agent pursues across turns until satisfied.";
|
|
62
|
-
declare function executeGoalCommand(context:
|
|
363
|
+
declare function executeGoalCommand(context: ICommandHostGoal, args: string): Promise<ICommandResult>;
|
|
364
|
+
//#endregion
|
|
365
|
+
//#region src/handoff/handoff-command.d.ts
|
|
366
|
+
/**
|
|
367
|
+
* `/handoff` (HANDOFF-001, issue #1864) — move this session to another machine.
|
|
368
|
+
*
|
|
369
|
+
* The command holds no protocol. It reads an injected adapter and touches no transport, for the same
|
|
370
|
+
* reason `/peers` does not: the carrier, the wire composition and the device identity are
|
|
371
|
+
* composition-root concerns and must have one owner.
|
|
372
|
+
*
|
|
373
|
+
* ## What it is FOR, which is the consent
|
|
374
|
+
*
|
|
375
|
+
* A hand-off loses things on purpose — uncommitted working-tree changes and running subprocesses
|
|
376
|
+
* stay on this machine, because moving them would make this a file-sync product and a process cannot
|
|
377
|
+
* migrate at all. Those are the operator's to lose, so they are named in the prompt BEFORE the
|
|
378
|
+
* question, not reported afterwards. A confirmation that did not mention them is not consent.
|
|
379
|
+
*
|
|
380
|
+
* ## The sentence it always ends on
|
|
381
|
+
*
|
|
382
|
+
* Every outcome that is not `done` says the session is still on this machine. That is not
|
|
383
|
+
* reassurance: it is the one invariant the whole design exists to preserve, and the operator is the
|
|
384
|
+
* person who has to know whether to keep typing here or walk to the other computer.
|
|
385
|
+
*/
|
|
386
|
+
type THandoffHost = ICommandHostAdapterAccess & Partial<ICommandHostUserInteraction>;
|
|
387
|
+
declare function executeHandoffCommand(context: THandoffHost, args: string): Promise<ICommandResult>;
|
|
388
|
+
//#endregion
|
|
389
|
+
//#region src/handoff/handoff-command-module.d.ts
|
|
390
|
+
declare function createHandoffCommandEntry(): ICommand;
|
|
391
|
+
declare class HandoffCommandSource implements ICommandSource {
|
|
392
|
+
readonly name = "handoff";
|
|
393
|
+
getCommands(): ICommand[];
|
|
394
|
+
}
|
|
395
|
+
declare function createHandoffCommandModule(): ICommandModule;
|
|
396
|
+
//#endregion
|
|
397
|
+
//#region src/plan/plan-command-module.d.ts
|
|
398
|
+
declare function createPlanCommandModule(): ICommandModule;
|
|
63
399
|
//#endregion
|
|
64
400
|
//#region src/compact/compact-command-module.d.ts
|
|
65
401
|
declare function createCompactCommandEntry(): ICommand;
|
|
@@ -70,7 +406,7 @@ declare class CompactCommandSource implements ICommandSource {
|
|
|
70
406
|
declare function createCompactCommandModule(): ICommandModule;
|
|
71
407
|
//#endregion
|
|
72
408
|
//#region src/compact/compact-command.d.ts
|
|
73
|
-
declare function executeCompactCommand(context:
|
|
409
|
+
declare function executeCompactCommand(context: ICommandHostContextWindow & ICommandHostSessionAccess, args: string): Promise<ICommandResult>;
|
|
74
410
|
//#endregion
|
|
75
411
|
//#region src/context/context-command-module.d.ts
|
|
76
412
|
declare function createContextCommandEntry(): ICommand;
|
|
@@ -81,7 +417,9 @@ declare class ContextCommandSource implements ICommandSource {
|
|
|
81
417
|
declare function createContextCommandModule(): ICommandModule;
|
|
82
418
|
//#endregion
|
|
83
419
|
//#region src/context/context-command.d.ts
|
|
84
|
-
|
|
420
|
+
/** The roles the `/context` surface reads. Named once so five signatures do not restate it. */
|
|
421
|
+
type TContextCommandHost = ICommandHostAdapterAccess & ICommandHostContextReferences & ICommandHostContextWindow & ICommandHostSessionAccess;
|
|
422
|
+
declare function executeContextCommand(context: TContextCommandHost, args: string): Promise<ICommandResult>;
|
|
85
423
|
//#endregion
|
|
86
424
|
//#region src/editor/resolve-editor.d.ts
|
|
87
425
|
/**
|
|
@@ -96,7 +434,7 @@ declare function resolveEditor(): IResolvedEditor;
|
|
|
96
434
|
//#endregion
|
|
97
435
|
//#region src/editor/editor-command.d.ts
|
|
98
436
|
declare const EDITOR_COMMAND_DESCRIPTION = "Compose a message in $EDITOR (optionally pre-filled with `/editor <text>`), then return it.";
|
|
99
|
-
declare function executeEditorCommand(context:
|
|
437
|
+
declare function executeEditorCommand(context: ICommandHostTerminalHandoff & ICommandHostWorkspace, args: string, temporaryDirectoryPrefix?: string): Promise<ICommandResult>;
|
|
100
438
|
//#endregion
|
|
101
439
|
//#region src/editor/editor-command-module.d.ts
|
|
102
440
|
declare function createEditorCommandEntry(): ICommand;
|
|
@@ -104,7 +442,85 @@ declare class EditorCommandSource implements ICommandSource {
|
|
|
104
442
|
readonly name = "editor";
|
|
105
443
|
getCommands(): ICommand[];
|
|
106
444
|
}
|
|
107
|
-
declare function createEditorCommandModule(): ICommandModule;
|
|
445
|
+
declare function createEditorCommandModule(temporaryDirectoryPrefix?: string): ICommandModule;
|
|
446
|
+
//#endregion
|
|
447
|
+
//#region src/git/git-process.d.ts
|
|
448
|
+
interface IGitProcessRunOptions {
|
|
449
|
+
cwd: string;
|
|
450
|
+
timeoutMs?: number;
|
|
451
|
+
signal?: AbortSignal;
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* `not-found` covers every spawn failure — ENOENT, EACCES, ENOTDIR, … — with the code in `detail`;
|
|
455
|
+
* the other three are the run's own bounds.
|
|
456
|
+
*/
|
|
457
|
+
type TGitProcessFailureReason = 'not-found' | 'timeout' | 'aborted' | 'output-too-large';
|
|
458
|
+
type TGitProcessOutcome = {
|
|
459
|
+
kind: 'exited';
|
|
460
|
+
stdout: string;
|
|
461
|
+
stderr: string;
|
|
462
|
+
exitCode: number;
|
|
463
|
+
} | {
|
|
464
|
+
kind: 'failed';
|
|
465
|
+
reason: TGitProcessFailureReason;
|
|
466
|
+
detail: string;
|
|
467
|
+
};
|
|
468
|
+
interface IGitProcessPort {
|
|
469
|
+
run(args: readonly string[], options: IGitProcessRunOptions): Promise<TGitProcessOutcome>;
|
|
470
|
+
}
|
|
471
|
+
interface ICreateGitProcessOptions {
|
|
472
|
+
/** The executable to run; `git` on PATH by default. */
|
|
473
|
+
executable?: string;
|
|
474
|
+
/** The environment to derive the child's from; the live process environment by default. */
|
|
475
|
+
env?: NodeJS.ProcessEnv;
|
|
476
|
+
}
|
|
477
|
+
/** The child's environment: `source` minus the repository-redirecting variables. */
|
|
478
|
+
declare function gitEnvironment(source?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
479
|
+
/** The production port: argv-only `execFile`, stdin closed, output capped, timeout bounded. */
|
|
480
|
+
declare function createGitProcess(options?: ICreateGitProcessOptions): IGitProcessPort;
|
|
481
|
+
//#endregion
|
|
482
|
+
//#region src/git/git-command-module.d.ts
|
|
483
|
+
declare function createGitCommandEntry(): ICommand;
|
|
484
|
+
/** What the verbs need from the host: the working directory and the ask-the-user port. */
|
|
485
|
+
type TGitCommandContext = Pick<ICommandHostWorkspace, 'getCwd'> & ICommandHostUserInteraction;
|
|
486
|
+
declare function executeGitCommand(context: TGitCommandContext, args: string, port?: IGitProcessPort): Promise<ICommandResult>;
|
|
487
|
+
declare class GitCommandSource implements ICommandSource {
|
|
488
|
+
readonly name = "git";
|
|
489
|
+
getCommands(): ICommand[];
|
|
490
|
+
}
|
|
491
|
+
interface IGitCommandModuleOptions {
|
|
492
|
+
/** The process seam; the production `createGitProcess()` by default, injectable for tests. */
|
|
493
|
+
port?: IGitProcessPort;
|
|
494
|
+
}
|
|
495
|
+
declare function createGitCommandModule(options?: IGitCommandModuleOptions): ICommandModule;
|
|
496
|
+
//#endregion
|
|
497
|
+
//#region src/effort/effort-command-module.d.ts
|
|
498
|
+
declare function createEffortCommandEntry(): ICommand;
|
|
499
|
+
declare class EffortCommandSource implements ICommandSource {
|
|
500
|
+
readonly name = "effort";
|
|
501
|
+
getCommands(): ICommand[];
|
|
502
|
+
}
|
|
503
|
+
declare function createEffortCommandModule(): ICommandModule;
|
|
504
|
+
//#endregion
|
|
505
|
+
//#region src/effort/effort-command.d.ts
|
|
506
|
+
declare function executeEffortCommand(context: ICommandHostAdapterAccess & ICommandHostSessionAccess & ICommandHostUserInteraction & ICommandHostWorkspace, args: string): Promise<ICommandResult>;
|
|
507
|
+
//#endregion
|
|
508
|
+
//#region src/advisor/advisor-command-module.d.ts
|
|
509
|
+
declare function createAdvisorCommandEntry(): ICommand;
|
|
510
|
+
declare class AdvisorCommandSource implements ICommandSource {
|
|
511
|
+
readonly name = "advisor";
|
|
512
|
+
getCommands(): ICommand[];
|
|
513
|
+
}
|
|
514
|
+
declare function createAdvisorCommandModule(): ICommandModule;
|
|
515
|
+
//#endregion
|
|
516
|
+
//#region src/advisor/advisor-command.d.ts
|
|
517
|
+
/** The user-settings key `/advisor` saves the default advisor under. */
|
|
518
|
+
declare const ADVISOR_SETTING_KEY = "advisorModel";
|
|
519
|
+
/**
|
|
520
|
+
* `/advisor` — show the advisor, set it (`<profile>` or `<profile>:<model>`), or turn it off. A
|
|
521
|
+
* change the user makes is also saved as the default for later sessions.
|
|
522
|
+
*/
|
|
523
|
+
declare function executeAdvisorCommand(context: ICommandHostAdapterAccess & ICommandHostWorkspace, args: string): Promise<ICommandResult>;
|
|
108
524
|
//#endregion
|
|
109
525
|
//#region src/exit/exit-command-module.d.ts
|
|
110
526
|
declare function createExitCommandEntry(): ICommand;
|
|
@@ -115,7 +531,7 @@ declare class ExitCommandSource implements ICommandSource {
|
|
|
115
531
|
declare function createExitCommandModule(): ICommandModule;
|
|
116
532
|
//#endregion
|
|
117
533
|
//#region src/exit/exit-command.d.ts
|
|
118
|
-
declare function executeExitCommand(context:
|
|
534
|
+
declare function executeExitCommand(context: ICommandHostUserInteraction, _args: string): Promise<ICommandResult>;
|
|
119
535
|
//#endregion
|
|
120
536
|
//#region src/help/help-command-module.d.ts
|
|
121
537
|
declare function createHelpCommandEntry(): ICommand;
|
|
@@ -126,7 +542,16 @@ declare class HelpCommandSource implements ICommandSource {
|
|
|
126
542
|
declare function createHelpCommandModule(): ICommandModule;
|
|
127
543
|
//#endregion
|
|
128
544
|
//#region src/help/help-command.d.ts
|
|
129
|
-
declare function executeHelpCommand(context:
|
|
545
|
+
declare function executeHelpCommand(context: ICommandHostCatalog, _args: string): ICommandResult;
|
|
546
|
+
//#endregion
|
|
547
|
+
//#region src/theme/theme-command-module.d.ts
|
|
548
|
+
declare function executeThemeCommand(catalogue: IThemeCataloguePort$1 | undefined, args: string): ICommandResult;
|
|
549
|
+
declare function createThemeCommandEntry(): ICommand;
|
|
550
|
+
declare class ThemeCommandSource implements ICommandSource {
|
|
551
|
+
readonly name = "theme";
|
|
552
|
+
getCommands(): ICommand[];
|
|
553
|
+
}
|
|
554
|
+
declare function createThemeCommandModule(catalogue: IThemeCataloguePort$1): ICommandModule;
|
|
130
555
|
//#endregion
|
|
131
556
|
//#region src/language/language-command-module.d.ts
|
|
132
557
|
declare function createLanguageCommandEntry(): ICommand;
|
|
@@ -137,7 +562,7 @@ declare class LanguageCommandSource implements ICommandSource {
|
|
|
137
562
|
declare function createLanguageCommandModule(): ICommandModule;
|
|
138
563
|
//#endregion
|
|
139
564
|
//#region src/language/language-command.d.ts
|
|
140
|
-
declare function executeLanguageCommand(context:
|
|
565
|
+
declare function executeLanguageCommand(context: ICommandHostUserInteraction, args: string): Promise<ICommandResult>;
|
|
141
566
|
//#endregion
|
|
142
567
|
//#region src/memory/memory-command-module.d.ts
|
|
143
568
|
declare function createMemoryCommandEntry(): ICommand;
|
|
@@ -148,7 +573,49 @@ declare class MemoryCommandSource implements ICommandSource {
|
|
|
148
573
|
declare function createMemoryCommandModule(): ICommandModule;
|
|
149
574
|
//#endregion
|
|
150
575
|
//#region src/memory/memory-command.d.ts
|
|
151
|
-
declare function executeMemoryCommand(context:
|
|
576
|
+
declare function executeMemoryCommand(context: ICommandHostMemory & ICommandHostWorkspace, rawArgs: string): Promise<ICommandResult>;
|
|
577
|
+
//#endregion
|
|
578
|
+
//#region src/mcp-activation/mcp-activation-command-module.d.ts
|
|
579
|
+
declare function createMCPActivationCommandEntry(): ICommand;
|
|
580
|
+
declare class MCPActivationCommandSource implements ICommandSource {
|
|
581
|
+
readonly name = "mcp-activation";
|
|
582
|
+
getCommands(): ICommand[];
|
|
583
|
+
}
|
|
584
|
+
declare function createMCPActivationCommandModule(): ICommandModule;
|
|
585
|
+
//#endregion
|
|
586
|
+
//#region src/mcp-activation/mcp-activation-command.d.ts
|
|
587
|
+
/** What `/mcp` reaches: its port, and — to sign in — the live session and the user. */
|
|
588
|
+
type TMCPActivationCommandContext = ICommandHostAdapterAccess & Pick<ICommandHostSessionAccess, 'getSession'> & ICommandHostUserInteraction & Partial<Pick<ICommandHostWorkspace, 'getCommandInvocationSource'>>;
|
|
589
|
+
declare function executeMCPActivationCommand(context: TMCPActivationCommandContext, args: string): Promise<ICommandResult>;
|
|
590
|
+
//#endregion
|
|
591
|
+
//#region src/mcp-activation/mcp-model-notice.d.ts
|
|
592
|
+
/**
|
|
593
|
+
* What the MODEL is told about an MCP server it cannot use, and which user command fixes it.
|
|
594
|
+
*
|
|
595
|
+
* Fixed words only. A server's name comes from a definition a repository may write, so it is named
|
|
596
|
+
* only when it is safe to paste into any shell; otherwise the notice stays generic and points at
|
|
597
|
+
* `/mcp status`, where the user sees the name. Nothing a server or its definition returned — reason
|
|
598
|
+
* text, endpoint, header or token — ever reaches these strings.
|
|
599
|
+
*
|
|
600
|
+
* The actions themselves (approving a server, signing in, trusting a workspace) are the user's: the
|
|
601
|
+
* model can only suggest the command.
|
|
602
|
+
*/
|
|
603
|
+
/** Why a server's tools are unavailable, as a user action that would fix it. */
|
|
604
|
+
type TMCPUserAction = 'approve' | 'sign-in' | 'trust-workspace';
|
|
605
|
+
/**
|
|
606
|
+
* Where the user can act: `session` is an interactive session they can type a `/mcp` command into;
|
|
607
|
+
* `terminal` is a run with no such prompt (print, serve), where sign-in is the terminal command.
|
|
608
|
+
*/
|
|
609
|
+
type TMCPUserActionSurface = 'session' | 'terminal';
|
|
610
|
+
/** The command the user runs for `action`; `<server>` stands for a name that cannot be shown. */
|
|
611
|
+
declare function mcpUserActionCommand(serverId: string, action: TMCPUserAction, surface?: TMCPUserActionSurface): string;
|
|
612
|
+
/** One server's notice: what is missing and the exact command to suggest. */
|
|
613
|
+
declare function mcpUserActionNotice(serverId: string, action: TMCPUserAction, surface?: TMCPUserActionSurface): string;
|
|
614
|
+
/**
|
|
615
|
+
* The notice for every server that could not start for a reason the user can fix, or `undefined`
|
|
616
|
+
* when there is none. Meant for the model's context at session start.
|
|
617
|
+
*/
|
|
618
|
+
declare function mcpUnavailableServersNotice(servers: ReadonlyMap<string, TMCPUserAction>): string | undefined;
|
|
152
619
|
//#endregion
|
|
153
620
|
//#region src/mode/mode-command-module.d.ts
|
|
154
621
|
declare function createModeCommandEntry(): ICommand;
|
|
@@ -159,7 +626,31 @@ declare class ModeCommandSource implements ICommandSource {
|
|
|
159
626
|
declare function createModeCommandModule(): ICommandModule;
|
|
160
627
|
//#endregion
|
|
161
628
|
//#region src/mode/mode-command.d.ts
|
|
162
|
-
declare function executeModeCommand(context:
|
|
629
|
+
declare function executeModeCommand(context: ICommandHostAdapterAccess & ICommandHostSessionAccess & ICommandHostUserInteraction, args: string): Promise<ICommandResult>;
|
|
630
|
+
//#endregion
|
|
631
|
+
//#region src/sandbox/sandbox-command-module.d.ts
|
|
632
|
+
declare class SandboxCommandSource implements ICommandSource {
|
|
633
|
+
readonly name = "sandbox";
|
|
634
|
+
getCommands(): ICommand[];
|
|
635
|
+
}
|
|
636
|
+
declare function createSandboxCommandModule(): ICommandModule;
|
|
637
|
+
//#endregion
|
|
638
|
+
//#region src/sandbox/sandbox-command.d.ts
|
|
639
|
+
declare const SANDBOX_MODES: readonly {
|
|
640
|
+
readonly mode: TSandboxCommandMode;
|
|
641
|
+
readonly description: string;
|
|
642
|
+
}[];
|
|
643
|
+
declare function formatSandboxStatus(status: ICommandSandboxStatus): string;
|
|
644
|
+
declare function executeSandboxCommand(context: ICommandHostAdapterAccess & ICommandHostUserInteraction, args: string): Promise<ICommandResult>;
|
|
645
|
+
//#endregion
|
|
646
|
+
//#region src/output-style/output-style-command-module.d.ts
|
|
647
|
+
declare function executeOutputStyleCommand(context: ICommandHostAdapterAccess & ICommandHostSessionAccess & ICommandHostUserInteraction, args: string): Promise<ICommandResult>;
|
|
648
|
+
declare function createOutputStyleCommandEntry(): ICommand;
|
|
649
|
+
declare class OutputStyleCommandSource implements ICommandSource {
|
|
650
|
+
readonly name = "output-style";
|
|
651
|
+
getCommands(): ICommand[];
|
|
652
|
+
}
|
|
653
|
+
declare function createOutputStyleCommandModule(): ICommandModule;
|
|
163
654
|
//#endregion
|
|
164
655
|
//#region src/permissions/permissions-command-module.d.ts
|
|
165
656
|
declare function createPermissionsCommandEntry(): ICommand;
|
|
@@ -170,7 +661,7 @@ declare class PermissionsCommandSource implements ICommandSource {
|
|
|
170
661
|
declare function createPermissionsCommandModule(): ICommandModule;
|
|
171
662
|
//#endregion
|
|
172
663
|
//#region src/permissions/permissions-command.d.ts
|
|
173
|
-
declare function executePermissionsCommand(context:
|
|
664
|
+
declare function executePermissionsCommand(context: ICommandHostAdapterAccess & ICommandHostSessionAccess, args: string): ICommandResult;
|
|
174
665
|
//#endregion
|
|
175
666
|
//#region src/plugin/plugin-command-module.d.ts
|
|
176
667
|
declare function createPluginCommandEntry(): ICommand;
|
|
@@ -182,8 +673,8 @@ declare class PluginManagerCommandSource implements ICommandSource {
|
|
|
182
673
|
declare function createPluginCommandModule(): ICommandModule;
|
|
183
674
|
//#endregion
|
|
184
675
|
//#region src/plugin/plugin-command.d.ts
|
|
185
|
-
declare function executePluginCommand(context:
|
|
186
|
-
declare function executeReloadPluginsCommand(context:
|
|
676
|
+
declare function executePluginCommand(context: ICommandHostAdapterAccess, args: string): Promise<ICommandResult>;
|
|
677
|
+
declare function executeReloadPluginsCommand(context: ICommandHostAdapterAccess, _args: string): Promise<ICommandResult>;
|
|
187
678
|
//#endregion
|
|
188
679
|
//#region src/preset/preset-command-module.d.ts
|
|
189
680
|
declare function createPresetCommandEntry(): ICommand;
|
|
@@ -194,7 +685,7 @@ declare class PresetCommandSource implements ICommandSource {
|
|
|
194
685
|
declare function createPresetCommandModule(): ICommandModule;
|
|
195
686
|
//#endregion
|
|
196
687
|
//#region src/preset/preset-command.d.ts
|
|
197
|
-
declare function executePresetCommand(context:
|
|
688
|
+
declare function executePresetCommand(context: ICommandHostPresetApplication & ICommandHostSessionAccess & ICommandHostUserInteraction & ICommandHostAdapterAccess, args: string): Promise<ICommandResult>;
|
|
198
689
|
//#endregion
|
|
199
690
|
//#region src/shell/resolve-shell.d.ts
|
|
200
691
|
interface IResolvedShell {
|
|
@@ -206,14 +697,14 @@ interface IResolvedShell {
|
|
|
206
697
|
commandArgs(command: string): readonly string[];
|
|
207
698
|
}
|
|
208
699
|
/** Resolve the interactive shell for the current platform via the agent-core SSOT resolver. */
|
|
209
|
-
declare function resolveShell(): IResolvedShell;
|
|
700
|
+
declare function resolveShell(executable?: string): IResolvedShell;
|
|
210
701
|
//#endregion
|
|
211
702
|
//#region src/shell/spawn-inherited.d.ts
|
|
212
703
|
declare function spawnInherited(command: string, args: readonly string[], cwd: string): Promise<number>;
|
|
213
704
|
//#endregion
|
|
214
705
|
//#region src/shell/shell-command.d.ts
|
|
215
706
|
declare const SHELL_COMMAND_DESCRIPTION = "Drop to an interactive shell (or run `/shell <command>` interactively), then return to the agent.";
|
|
216
|
-
declare function executeShellCommand(context:
|
|
707
|
+
declare function executeShellCommand(context: ICommandHostTerminalHandoff & ICommandHostWorkspace, args: string, executable?: string): Promise<ICommandResult>;
|
|
217
708
|
//#endregion
|
|
218
709
|
//#region src/shell/shell-command-module.d.ts
|
|
219
710
|
declare function createShellCommandEntry(): ICommand;
|
|
@@ -221,7 +712,7 @@ declare class ShellCommandSource implements ICommandSource {
|
|
|
221
712
|
readonly name = "shell";
|
|
222
713
|
getCommands(): ICommand[];
|
|
223
714
|
}
|
|
224
|
-
declare function createShellCommandModule(): ICommandModule;
|
|
715
|
+
declare function createShellCommandModule(executable?: string): ICommandModule;
|
|
225
716
|
//#endregion
|
|
226
717
|
//#region src/provider/provider-command-module.d.ts
|
|
227
718
|
declare function createProviderCommandEntry(): ICommand;
|
|
@@ -232,7 +723,7 @@ declare class ProviderCommandSource implements ICommandSource {
|
|
|
232
723
|
declare function createProviderCommandModule(options: IProviderCommandModuleOptions$2): ICommandModule;
|
|
233
724
|
//#endregion
|
|
234
725
|
//#region src/provider/provider-command-execution.d.ts
|
|
235
|
-
declare function executeProviderCommand(context:
|
|
726
|
+
declare function executeProviderCommand(context: ICommandHostUserInteraction, args: string, options: IProviderCommandModuleOptions$1): Promise<ICommandResult>;
|
|
236
727
|
//#endregion
|
|
237
728
|
//#region src/provider/provider-setup-flow.d.ts
|
|
238
729
|
type TProviderSetupType = string;
|
|
@@ -282,6 +773,8 @@ declare function validateProviderSetupValue(step: IProviderSetupPromptStep, valu
|
|
|
282
773
|
interface IProviderStartupContext {
|
|
283
774
|
provider?: string;
|
|
284
775
|
settingsScope?: TSettingsScope;
|
|
776
|
+
settingsSources: readonly TSettingsSource[];
|
|
777
|
+
settingsStores: readonly ISettingsDocumentStore[];
|
|
285
778
|
}
|
|
286
779
|
interface IEnsureProviderConfigOptions {
|
|
287
780
|
formatError: (defs: readonly IProviderDefinition[]) => string;
|
|
@@ -292,12 +785,23 @@ interface IEnsureProviderConfigOptions {
|
|
|
292
785
|
declare function runProviderStartupSetup(cwd: string, ctx: IProviderStartupContext, promptInput: TPromptInput, terminal: ITerminalOutput, providerDefinitions: readonly IProviderDefinition[]): Promise<void>;
|
|
293
786
|
declare function ensureProviderConfig(cwd: string, ctx: IProviderStartupContext, promptInput: TPromptInput, terminal: ITerminalOutput, providerDefinitions: readonly IProviderDefinition[], options: IEnsureProviderConfigOptions): Promise<void>;
|
|
294
787
|
//#endregion
|
|
788
|
+
//#region src/remote-control/remote-control-command-module.d.ts
|
|
789
|
+
declare function createRemoteControlCommandEntry(): ICommand;
|
|
790
|
+
declare class RemoteControlCommandSource implements ICommandSource {
|
|
791
|
+
readonly name = "remote-control";
|
|
792
|
+
getCommands(): ICommand[];
|
|
793
|
+
}
|
|
794
|
+
declare function createRemoteControlCommandModule(): ICommandModule;
|
|
795
|
+
//#endregion
|
|
796
|
+
//#region src/remote-control/remote-control-command.d.ts
|
|
797
|
+
declare function executeRemoteControlCommand(context: ICommandHostAdapterAccess & Pick<ICommandHostWorkspace, 'getCommandInvocationSource'>, args: string): ICommandResult;
|
|
798
|
+
//#endregion
|
|
295
799
|
//#region src/reset/reset-command-module.d.ts
|
|
296
800
|
declare function createResetCommandEntry(): ICommand;
|
|
297
801
|
declare function createResetCommandModule(): ICommandModule;
|
|
298
802
|
//#endregion
|
|
299
803
|
//#region src/reset/reset-command.d.ts
|
|
300
|
-
declare function executeResetCommand(
|
|
804
|
+
declare function executeResetCommand(): ICommandResult;
|
|
301
805
|
//#endregion
|
|
302
806
|
//#region src/rewind/rewind-command-module.d.ts
|
|
303
807
|
declare class RewindCommandSource implements ICommandSource {
|
|
@@ -307,16 +811,28 @@ declare class RewindCommandSource implements ICommandSource {
|
|
|
307
811
|
declare function createRewindCommandModule(): ICommandModule;
|
|
308
812
|
//#endregion
|
|
309
813
|
//#region src/rewind/rewind-command.d.ts
|
|
310
|
-
declare function executeRewindCommand(context:
|
|
814
|
+
declare function executeRewindCommand(context: ICommandHostCheckpoints, rawArgs: string): Promise<ICommandResult>;
|
|
815
|
+
//#endregion
|
|
816
|
+
//#region src/schedule/loop-command.d.ts
|
|
817
|
+
interface ILoopCommandOptions {
|
|
818
|
+
/** Product-host-owned maintenance text, used only when the operator omits a prompt. */
|
|
819
|
+
defaultPrompt?: string;
|
|
820
|
+
/** Re-read the project/user default for each new loop; an explicit prompt never calls this. */
|
|
821
|
+
resolveDefaultPrompt?: () => string;
|
|
822
|
+
/** Host kill switch; listing and stopping existing loops remain available. */
|
|
823
|
+
disabled?: boolean;
|
|
824
|
+
}
|
|
825
|
+
declare function executeLoopCommand(host: Pick<IAgentJobHostContext, 'spawnScheduledWake' | 'listSchedules' | 'createSelfPacedLoop' | 'listSelfPacedLoops' | 'stopSelfPacedLoop'>, cancelBackgroundTask: (taskId: string, reason: string) => Promise<void>, args: string, options?: ILoopCommandOptions): Promise<ICommandResult>;
|
|
311
826
|
//#endregion
|
|
312
827
|
//#region src/schedule/schedule-command-module.d.ts
|
|
313
828
|
declare function createScheduleCommandEntry(): ICommand;
|
|
314
829
|
declare function createMonitorCommandEntry(): ICommand;
|
|
830
|
+
declare function createLoopCommandEntry(): ICommand;
|
|
315
831
|
declare class ScheduleCommandSource implements ICommandSource {
|
|
316
832
|
readonly name = "schedule";
|
|
317
833
|
getCommands(): ICommand[];
|
|
318
834
|
}
|
|
319
|
-
declare function createScheduleCommandModule(): ICommandModule;
|
|
835
|
+
declare function createScheduleCommandModule(options?: ILoopCommandOptions): ICommandModule;
|
|
320
836
|
//#endregion
|
|
321
837
|
//#region src/schedule/schedule-command.d.ts
|
|
322
838
|
declare function executeScheduleCommand(host: IAgentJobHostContext, args: string, now?: number): Promise<ICommandResult>;
|
|
@@ -346,11 +862,12 @@ declare function parseScheduleSpec(args: string, now: number): TScheduleParseRes
|
|
|
346
862
|
//#endregion
|
|
347
863
|
//#region src/session/session-command.d.ts
|
|
348
864
|
declare const CLEAR_COMMAND_MESSAGE = "Conversation cleared.";
|
|
349
|
-
declare function executeClearCommand(context:
|
|
350
|
-
declare function executeRenameCommand(_context:
|
|
351
|
-
declare function executeResumeCommand(
|
|
352
|
-
|
|
353
|
-
declare function
|
|
865
|
+
declare function executeClearCommand(context: ICommandHostSessionAccess & ICommandHostUserInteraction, _args: string): Promise<ICommandResult>;
|
|
866
|
+
declare function executeRenameCommand(_context: ICommandHostNoCapability, args: string): ICommandResult;
|
|
867
|
+
declare function executeResumeCommand(): ICommandResult;
|
|
868
|
+
type TCostCommandContext = ICommandHostSessionAccess & ICommandHostWorkspace & ICommandHostAdapterAccess;
|
|
869
|
+
declare function executeCostCommand(context: TCostCommandContext, args: string): ICommandResult;
|
|
870
|
+
declare function executeValidateSessionCommand(context: ICommandHostSessionAccess & ICommandHostWorkspace, _args: string): ICommandResult;
|
|
354
871
|
//#endregion
|
|
355
872
|
//#region src/session/session-command-module.d.ts
|
|
356
873
|
declare function createClearCommandEntry(): ICommand;
|
|
@@ -374,7 +891,8 @@ declare function createSettingsCommandModule(): ICommandModule;
|
|
|
374
891
|
//#endregion
|
|
375
892
|
//#region src/skills/skills-command-module.d.ts
|
|
376
893
|
interface ISkillsCommandModuleOptions {
|
|
377
|
-
readonly
|
|
894
|
+
readonly contributionSources: readonly IContributionSource[];
|
|
895
|
+
readonly skillRoots?: readonly ISkillRootDescriptor[];
|
|
378
896
|
}
|
|
379
897
|
declare function createSkillsCommandEntry(): ICommand;
|
|
380
898
|
declare class SkillsCommandSource implements ICommandSource {
|
|
@@ -384,8 +902,8 @@ declare class SkillsCommandSource implements ICommandSource {
|
|
|
384
902
|
declare function createSkillsCommandModule(options: ISkillsCommandModuleOptions): ICommandModule;
|
|
385
903
|
//#endregion
|
|
386
904
|
//#region src/skills/skills-command.d.ts
|
|
387
|
-
declare const SKILLS_COMMAND_DESCRIPTION = "
|
|
388
|
-
declare function executeSkillsCommand(context:
|
|
905
|
+
declare const SKILLS_COMMAND_DESCRIPTION = "List registered skills, or activate one by name";
|
|
906
|
+
declare function executeSkillsCommand(context: ICommandHostCatalog & ICommandHostWorkspace, args?: string): Promise<ICommandResult>;
|
|
389
907
|
//#endregion
|
|
390
908
|
//#region src/statusline/statusline-command-module.d.ts
|
|
391
909
|
declare function createStatusLineCommandEntry(): ICommand;
|
|
@@ -397,7 +915,7 @@ declare function createStatusLineCommandModule(): ICommandModule;
|
|
|
397
915
|
//#endregion
|
|
398
916
|
//#region src/statusline/statusline-command.d.ts
|
|
399
917
|
declare const STATUSLINE_USAGE: string;
|
|
400
|
-
declare function executeStatusLineCommand(_context:
|
|
918
|
+
declare function executeStatusLineCommand(_context: ICommandHostNoCapability, args: string): ICommandResult;
|
|
401
919
|
//#endregion
|
|
402
920
|
//#region src/user-local/user-local-command-module.d.ts
|
|
403
921
|
declare function createUserLocalCommandEntry(): ICommand;
|
|
@@ -405,29 +923,24 @@ declare class UserLocalCommandSource implements ICommandSource {
|
|
|
405
923
|
readonly name = "user-local";
|
|
406
924
|
getCommands(): ICommand[];
|
|
407
925
|
}
|
|
408
|
-
declare function createUserLocalCommandModule(): ICommandModule;
|
|
926
|
+
declare function createUserLocalCommandModule(storageRoot: string): ICommandModule;
|
|
409
927
|
//#endregion
|
|
410
928
|
//#region src/user-local/user-local-command-constants.d.ts
|
|
411
|
-
declare const USER_LOCAL_COMMAND_DESCRIPTION = "Inspect
|
|
929
|
+
declare const USER_LOCAL_COMMAND_DESCRIPTION = "Inspect user-local storage and memory state.";
|
|
412
930
|
declare const USER_LOCAL_COMMAND_ARGUMENT_HINT = "storage list [--format json] | memory set/list/inspect/disable/delete";
|
|
413
931
|
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>";
|
|
414
932
|
//#endregion
|
|
415
933
|
//#region src/user-local/user-local-command.d.ts
|
|
416
934
|
interface IUserLocalDirectCommandOptions {
|
|
417
935
|
readonly cwd: string;
|
|
936
|
+
readonly storageRoot: string;
|
|
418
937
|
readonly argv: readonly string[];
|
|
419
938
|
readonly format?: string;
|
|
420
939
|
readonly summary?: string;
|
|
421
940
|
readonly source?: string;
|
|
422
941
|
}
|
|
423
942
|
declare function executeUserLocalDirectCommand(options: IUserLocalDirectCommandOptions): Promise<ICommandResult>;
|
|
424
|
-
declare function executeUserLocalCommand(context:
|
|
425
|
-
//#endregion
|
|
426
|
-
//#region src/plugins/default-plugin-command-adapter.d.ts
|
|
427
|
-
declare function createDefaultPluginCommandAdapter(cwd: string): ICommandPluginAdapter;
|
|
428
|
-
//#endregion
|
|
429
|
-
//#region src/plugins/default-plugin-command-source-loader.d.ts
|
|
430
|
-
declare function reloadPluginCommandSource(registry: CommandRegistry): number;
|
|
943
|
+
declare function executeUserLocalCommand(context: ICommandHostWorkspace, rawArgs: string, storageRoot: string): Promise<ICommandResult>;
|
|
431
944
|
//#endregion
|
|
432
|
-
export { AgentCommandSource, BackgroundCommandSource, CLEAR_COMMAND_MESSAGE, CompactCommandSource, ContextCommandSource, EDITOR_COMMAND_DESCRIPTION, EditorCommandSource, ExitCommandSource, GOAL_COMMAND_DESCRIPTION, GoalCommandSource, HelpCommandSource, type IDefaultCommandModulesOptions, type IEnsureProviderConfigOptions, type IProviderCommandModuleOptions, type IProviderCommandSettingsAdapter, type IProviderSetupFlowOptions, type IProviderSetupFlowState, type IProviderSetupPromptStep, type IProviderStartupContext, type IResolvedEditor, type IResolvedShell, type IScheduleSpec, type IUserLocalDirectCommandOptions, LanguageCommandSource, MemoryCommandSource, ModeCommandSource, PermissionsCommandSource, PluginManagerCommandSource, PresetCommandSource, ProviderCommandSource, RewindCommandSource, SHELL_COMMAND_DESCRIPTION, SKILLS_COMMAND_DESCRIPTION, STATUSLINE_USAGE, ScheduleCommandSource, SessionCommandSource, SettingsCommandSource, ShellCommandSource, SkillsCommandSource, StatusLineCommandSource, type TPromptInput, type TProviderSetupFlowSubmitResult, type TProviderSetupType, type TScheduleParseResult, USER_LOCAL_COMMAND_ARGUMENT_HINT, USER_LOCAL_COMMAND_DESCRIPTION, USER_LOCAL_COMMAND_USAGE, UserLocalCommandSource, createAgentCommandEntry, createAgentCommandModule, createAgentSystemCommand, createBackgroundCommandEntry, createBackgroundCommandModule, createClearCommandEntry, createCompactCommandEntry, createCompactCommandModule, createContextCommandEntry, createContextCommandModule, createCostCommandEntry, createDefaultCommandModules,
|
|
945
|
+
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 IDevicesCommandPort, type IDevicesInitResult, 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 IThemeAppearanceState, type IThemeCatalogueEntry, type IThemeCataloguePort, type IUserLocalDirectCommandOptions, KeybindingsCommandSource, LanguageCommandSource, MCPActivationCommandSource, MemoryCommandSource, ModeCommandSource, 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, 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, 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, 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 };
|
|
433
946
|
//# sourceMappingURL=index.d.ts.map
|