@serviceme/devtools-protocol 2.0.0 → 2.0.2

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 (5) hide show
  1. package/dist/index.d.mts +1663 -1614
  2. package/dist/index.d.ts +1663 -1614
  3. package/dist/index.js +1205 -1487
  4. package/dist/index.mjs +1018 -1278
  5. package/package.json +6 -6
package/dist/index.d.ts CHANGED
@@ -1,79 +1,78 @@
1
- import { AgentPermissionSummary, CopilotCustomizationScope, CopilotCustomizationViewPayload, CopilotAvailablePackagePayload, CopilotArtifactSummaryPayload, CopilotSourceRecordPayload, CopilotPackageUpdatePreviewPayload, BridgeSkillKind, BridgeSkillRepoEntry, BridgeSkillRepoFile, BridgeLinkMode, BridgeLinkedSkill, BridgeRepoEntry, BridgeRepoSyncPull, TaskExecutionLog, ScheduledTaskType, TaskPayload, ScheduledTask, ScheduledTaskV1, ScheduledTasksConfig, TaskWorkspaceRef } from '@serviceme/devtools-shared';
2
- export { AgentPermissionSummary, AgentToolPermission, AgentToolRiskLevel, BridgeLinkMode, BridgeLinkedSkill, BridgeRepoEntry, BridgeRepoSyncPull, BridgeSkillKind, BridgeSkillRepoEntry, BridgeSkillRepoFile, CommandPayload, CopilotArtifactStatePayload, CopilotArtifactSummaryPayload, CopilotArtifactViewPayload, CopilotAvailablePackagePayload, CopilotCustomizationScope, CopilotCustomizationViewPayload, CopilotPackageDefinitionPayload, CopilotPackageInstallationPayload, CopilotPackageUpdatePreviewPayload, CopilotPackageViewPayload, CopilotSourceRecordPayload, CopilotSourceViewPayload, GithubCopilotCliPayload, HttpRequestPayload, ScheduledTask, ScheduledTaskType, ScheduledTaskV1, ScheduledTasksConfig, ShellPayload, TaskExecutionLog, TaskExecutionStatus, TaskPayload, TaskRunStatus, TaskWorkspaceRef } from '@serviceme/devtools-shared';
3
-
4
- type AgentScope = "workspace" | "user";
5
- type AgentOwnerKind = "builtin" | "external";
6
- type AgentScopeStatus = "absent" | "available" | "installed" | "blocked" | "conflict";
7
- type AgentMutationAction = "install" | "uninstall" | "move" | "removeExternal" | "publish" | "republish" | "submit-to-official";
8
-
9
- interface AgentScopeState {
10
- scope: AgentScope;
11
- status: AgentScopeStatus;
12
- kind?: AgentOwnerKind;
13
- path?: string;
14
- isInstalled: boolean;
15
- canInstall: boolean;
16
- canUninstall: boolean;
17
- canRemove: boolean;
18
- canMoveHere: boolean;
19
- summary?: string;
20
- }
21
- interface AgentMarketplaceEntry {
22
- id: string;
23
- displayName: string;
24
- description: string;
25
- version: string;
26
- updatedAt: string;
27
- categoryId?: string;
28
- isCatalogAgent: boolean;
29
- recommended: boolean;
30
- installCount: number;
31
- ownerScope?: AgentScope;
32
- ownerKind?: AgentOwnerKind;
33
- hasConflict: boolean;
34
- tools: string[];
35
- source?: "official" | "community" | "local";
36
- localAgentPath?: string;
37
- canPublish?: boolean;
38
- workspaceState: AgentScopeState;
39
- userState: AgentScopeState;
40
- }
41
- interface AgentMarketplaceState {
42
- configPath: string;
43
- userAgentsPath: string;
44
- agents: AgentMarketplaceEntry[];
45
- installedAgentIds?: string[];
46
- workspaceOpen?: boolean;
47
- }
48
- interface AgentMutationRequest {
49
- agentId: string;
50
- targetScope: AgentScope;
51
- action: AgentMutationAction;
52
- confirmed?: boolean;
53
- }
54
- interface AgentMutationResult {
55
- state: AgentMarketplaceState;
56
- agentId: string;
57
- targetScope: AgentScope;
58
- action: AgentMutationAction;
59
- changed: boolean;
60
- status: "success" | "blocked" | "requires_confirmation";
61
- message?: string;
62
- tools?: string[];
63
- prUrl?: string;
64
- fromVersion?: string;
65
- toVersion?: string;
66
- }
67
- interface AgentPermissionsResult {
68
- agentId: string;
69
- summary: AgentPermissionSummary;
70
- }
71
- declare function isAgentMarketplaceState(value: unknown): value is AgentMarketplaceState;
72
- declare function isAgentMutationRequest(value: unknown): value is AgentMutationRequest;
73
- declare function isAgentMutationResult(value: unknown): value is AgentMutationResult;
74
- declare function isAgentPermissionSummary(value: unknown): value is AgentPermissionSummary;
75
- declare function isAgentPermissionsResult(value: unknown): value is AgentPermissionsResult;
76
-
1
+ import { AgentPermissionSummary, AgentToolPermission, AgentToolRiskLevel, BridgeLinkMode, BridgeLinkedSkill, BridgeRepoEntry, BridgeRepoSyncPull, BridgeSkillKind, BridgeSkillRepoEntry, BridgeSkillRepoFile, CommandPayload, CopilotArtifactStatePayload, CopilotArtifactSummaryPayload, CopilotArtifactViewPayload, CopilotAvailablePackagePayload, CopilotCustomizationScope, CopilotCustomizationViewPayload, CopilotPackageDefinitionPayload, CopilotPackageInstallationPayload, CopilotPackageUpdatePreviewPayload, CopilotPackageViewPayload, CopilotSourceRecordPayload, CopilotSourceViewPayload, GithubCopilotCliPayload, HttpRequestPayload, ScheduledTask, ScheduledTaskType, ScheduledTaskV1, ScheduledTasksConfig, ShellPayload, TaskExecutionLog, TaskExecutionStatus, TaskPayload, TaskRunStatus, TaskWorkspaceRef } from "@serviceme/devtools-shared";
2
+ //#region src/agent.d.ts
3
+ export type AgentScope = "workspace" | "user";
4
+ export type AgentOwnerKind = "builtin" | "external";
5
+ export type AgentScopeStatus = "absent" | "available" | "installed" | "blocked" | "conflict";
6
+ export type AgentMutationAction = "install" | "uninstall" | "move" | "removeExternal" | "publish" | "republish" | "submit-to-official";
7
+ export interface AgentScopeState {
8
+ scope: AgentScope;
9
+ status: AgentScopeStatus;
10
+ kind?: AgentOwnerKind;
11
+ path?: string;
12
+ isInstalled: boolean;
13
+ canInstall: boolean;
14
+ canUninstall: boolean;
15
+ canRemove: boolean;
16
+ canMoveHere: boolean;
17
+ summary?: string;
18
+ }
19
+ export interface AgentMarketplaceEntry {
20
+ id: string;
21
+ displayName: string;
22
+ description: string;
23
+ version: string;
24
+ updatedAt: string;
25
+ categoryId?: string;
26
+ isCatalogAgent: boolean;
27
+ recommended: boolean;
28
+ installCount: number;
29
+ ownerScope?: AgentScope;
30
+ ownerKind?: AgentOwnerKind;
31
+ hasConflict: boolean;
32
+ tools: string[];
33
+ source?: "official" | "community" | "local";
34
+ localAgentPath?: string;
35
+ canPublish?: boolean;
36
+ workspaceState: AgentScopeState;
37
+ userState: AgentScopeState;
38
+ }
39
+ export interface AgentMarketplaceState {
40
+ configPath: string;
41
+ userAgentsPath: string;
42
+ agents: AgentMarketplaceEntry[];
43
+ installedAgentIds?: string[];
44
+ workspaceOpen?: boolean;
45
+ }
46
+ export interface AgentMutationRequest {
47
+ agentId: string;
48
+ targetScope: AgentScope;
49
+ action: AgentMutationAction;
50
+ confirmed?: boolean;
51
+ }
52
+ export interface AgentMutationResult {
53
+ state: AgentMarketplaceState;
54
+ agentId: string;
55
+ targetScope: AgentScope;
56
+ action: AgentMutationAction;
57
+ changed: boolean;
58
+ status: "success" | "blocked" | "requires_confirmation";
59
+ message?: string;
60
+ tools?: string[];
61
+ prUrl?: string;
62
+ fromVersion?: string;
63
+ toVersion?: string;
64
+ }
65
+ export interface AgentPermissionsResult {
66
+ agentId: string;
67
+ summary: AgentPermissionSummary;
68
+ }
69
+ export declare function isAgentMarketplaceState(value: unknown): value is AgentMarketplaceState;
70
+ export declare function isAgentMutationRequest(value: unknown): value is AgentMutationRequest;
71
+ export declare function isAgentMutationResult(value: unknown): value is AgentMutationResult;
72
+ export declare function isAgentPermissionSummary(value: unknown): value is AgentPermissionSummary;
73
+ export declare function isAgentPermissionsResult(value: unknown): value is AgentPermissionsResult;
74
+ //#endregion
75
+ //#region src/brand.d.ts
77
76
  /**
78
77
  * Phantom brand types — compile-time guards against accidental string mixing.
79
78
  *
@@ -100,8 +99,8 @@ declare function isAgentPermissionsResult(value: unknown): value is AgentPermiss
100
99
  * per ADL-004 §不变量. Crossing the bridge requires the `auth.tokenRead`
101
100
  * capability and the Extension process advertising it.
102
101
  */
103
- type SecretToken = string & {
104
- readonly __serviceme_secret_brand: "SecretToken";
102
+ export type SecretToken = string & {
103
+ readonly __serviceme_secret_brand: "SecretToken";
105
104
  };
106
105
  /**
107
106
  * A device HMAC secret byte buffer.
@@ -109,26 +108,11 @@ type SecretToken = string & {
109
108
  * Lives only in the IdentityStore JSON file (Phase 5.2 `DeviceCore`).
110
109
  * Cross-process consumers see only `publicId` + `secretVersion`.
111
110
  */
112
- type DeviceSecret = string & {
113
- readonly __serviceme_secret_brand: "DeviceSecret";
111
+ export type DeviceSecret = string & {
112
+ readonly __serviceme_secret_brand: "DeviceSecret";
114
113
  };
115
-
116
- /**
117
- * Auth protocol — Phase 5.1 cross-process contract.
118
- *
119
- * Per ADL-003 these pure data models live in `@serviceme/devtools-protocol`,
120
- * NOT `@serviceme/devtools-shared`. Per ADL-004 the auth token byte string **never**
121
- * crosses the bridge or any protocol payload — it lives only in OS keychain
122
- * (CLI) or VSCode SecretStorage (Extension). `SecretToken` is a TypeScript
123
- * phantom brand used purely as a static-typing guarantee against accidental
124
- * string→token mixing at compile time.
125
- *
126
- * Wire shapes for the bridge methods (`auth.status`, `auth.login`, …) follow
127
- * `docs/architecture/phase-5-auth-device-toolbox.md § P5-2 (并入本文时对应 § P5-2 拆分)` §3
128
- * (Bridge method 新增). Result types are always objects so the wire format
129
- * matches the rest of `BridgeMethodMap`.
130
- */
131
-
114
+ //#endregion
115
+ //#region src/auth.d.ts
132
116
  /**
133
117
  * Authentication providers registered with `AuthCore`.
134
118
  *
@@ -137,8 +121,8 @@ type DeviceSecret = string & {
137
121
  * values are the same strings; the protocol type is the canonical cross-
138
122
  * process contract.
139
123
  */
140
- type AuthProvider = "github" | "microsoft";
141
- declare const AUTH_PROVIDERS: readonly AuthProvider[];
124
+ export type AuthProvider = "github" | "microsoft";
125
+ export declare const AUTH_PROVIDERS: readonly AuthProvider[];
142
126
  /**
143
127
  * Lightweight account metadata safe to serialize across the bridge.
144
128
  *
@@ -146,18 +130,18 @@ declare const AUTH_PROVIDERS: readonly AuthProvider[];
146
130
  * those stay in OS keychain / SecretStorage. Only identity + display
147
131
  * fields + non-sensitive timing info cross the wire.
148
132
  */
149
- interface AuthAccountMeta {
150
- /** Provider-side unique id (e.g. GitHub user id, MSA oid). */
151
- id: string;
152
- provider: AuthProvider;
153
- /** Best-effort display name (GitHub `name`, MSA `displayName`, etc.). */
154
- displayName?: string;
155
- /** Login handle (e.g. GitHub `login`, MSA userPrincipalName). */
156
- login?: string;
157
- email?: string;
158
- avatarUrl?: string;
159
- /** Token expiry as unix ms — `null` / `undefined` for sessions without expiry. */
160
- expiresAt?: number | null;
133
+ export interface AuthAccountMeta {
134
+ /** Provider-side unique id (e.g. GitHub user id, MSA oid). */
135
+ id: string;
136
+ provider: AuthProvider;
137
+ /** Best-effort display name (GitHub `name`, MSA `displayName`, etc.). */
138
+ displayName?: string;
139
+ /** Login handle (e.g. GitHub `login`, MSA userPrincipalName). */
140
+ login?: string;
141
+ email?: string;
142
+ avatarUrl?: string;
143
+ /** Token expiry as unix ms — `null` / `undefined` for sessions without expiry. */
144
+ expiresAt?: number | null;
161
145
  }
162
146
  /**
163
147
  * Outcome of `auth.login` (device-flow initiation).
@@ -167,29 +151,29 @@ interface AuthAccountMeta {
167
151
  * that received it. This shape only exposes device-flow UI hooks so the
168
152
  * user can complete the OAuth handshake.
169
153
  */
170
- interface AuthLoginResult {
171
- provider: AuthProvider;
172
- /**
173
- * Provider-issued opaque device code used only for token polling.
174
- * Keep this internal to runtime logic; UI should display `userCode` instead.
175
- */
176
- deviceCode?: string;
177
- /** GitHub device-flow user code shown to the user (e.g. "ABCD-1234"). */
178
- userCode?: string;
179
- /** Verification URL the user must open (e.g. https://github.com/login/device). */
180
- verificationUrl?: string;
181
- /** Unix-ms expiry of the device-flow code itself (NOT the token). */
182
- expiresAt?: number;
183
- /**
184
- * Provider-declared minimum polling interval (ms) for the token endpoint,
185
- * per the OAuth Device Flow spec's `interval` field. `completeDeviceFlow()`
186
- * MUST NOT poll faster than this — polling too fast repeatedly can put
187
- * GitHub's device_code into a persistent `slow_down` state that never
188
- * clears, even after the user authorizes.
189
- */
190
- pollIntervalMs?: number;
191
- /** Optional human-readable copy for the UI. */
192
- message?: string;
154
+ export interface AuthLoginResult {
155
+ provider: AuthProvider;
156
+ /**
157
+ * Provider-issued opaque device code used only for token polling.
158
+ * Keep this internal to runtime logic; UI should display `userCode` instead.
159
+ */
160
+ deviceCode?: string;
161
+ /** GitHub device-flow user code shown to the user (e.g. "ABCD-1234"). */
162
+ userCode?: string;
163
+ /** Verification URL the user must open (e.g. https://github.com/login/device). */
164
+ verificationUrl?: string;
165
+ /** Unix-ms expiry of the device-flow code itself (NOT the token). */
166
+ expiresAt?: number;
167
+ /**
168
+ * Provider-declared minimum polling interval (ms) for the token endpoint,
169
+ * per the OAuth Device Flow spec's `interval` field. `completeDeviceFlow()`
170
+ * MUST NOT poll faster than this — polling too fast repeatedly can put
171
+ * GitHub's device_code into a persistent `slow_down` state that never
172
+ * clears, even after the user authorizes.
173
+ */
174
+ pollIntervalMs?: number;
175
+ /** Optional human-readable copy for the UI. */
176
+ message?: string;
193
177
  }
194
178
  /**
195
179
  * Lightweight, non-secret handle to the active auth session.
@@ -197,11 +181,11 @@ interface AuthLoginResult {
197
181
  * The full `AuthState` (token + refresh token) lives in the Extension
198
182
  * SecretStorage; this protocol payload is what crosses the bridge.
199
183
  */
200
- interface AuthSessionHandle {
201
- provider: AuthProvider;
202
- account?: AuthAccountMeta;
203
- /** Unix-ms token expiry; mirrors the same field on `AuthAccountMeta`. */
204
- expiresAt?: number | null;
184
+ export interface AuthSessionHandle {
185
+ provider: AuthProvider;
186
+ account?: AuthAccountMeta;
187
+ /** Unix-ms token expiry; mirrors the same field on `AuthAccountMeta`. */
188
+ expiresAt?: number | null;
205
189
  }
206
190
  /**
207
191
  * Snapshot of all known authentication providers — used by `auth.status`.
@@ -209,29 +193,29 @@ interface AuthSessionHandle {
209
193
  * Mirrors `3.功能拆分.md` §3 wire shape: `{ activeProvider, accounts }`.
210
194
  * `accounts` is keyed by provider so multi-account lookups are O(1).
211
195
  */
212
- interface AuthStatus {
213
- activeProvider: AuthProvider | null;
214
- accounts: Partial<Record<AuthProvider, AuthAccountMeta>>;
215
- hasAnySession: boolean;
216
- lastError?: string;
196
+ export interface AuthStatus {
197
+ activeProvider: AuthProvider | null;
198
+ accounts: Partial<Record<AuthProvider, AuthAccountMeta>>;
199
+ hasAnySession: boolean;
200
+ lastError?: string;
217
201
  }
218
202
  /** `auth.status` — no params. */
219
- type AuthStatusParams = Record<string, never>;
203
+ export type AuthStatusParams = Record<string, never>;
220
204
  /** `auth.login` — triggers device flow for the chosen provider. */
221
- interface AuthLoginParams {
222
- provider: AuthProvider;
223
- /** When true, skip cached session and force re-auth. */
224
- force?: boolean;
205
+ export interface AuthLoginParams {
206
+ provider: AuthProvider;
207
+ /** When true, skip cached session and force re-auth. */
208
+ force?: boolean;
225
209
  }
226
210
  /** `auth.logout` — clears session locally (token bytes removed at the source). */
227
- interface AuthLogoutParams {
228
- /** Provider to log out; omit to log out every active provider. */
229
- provider?: AuthProvider;
211
+ export interface AuthLogoutParams {
212
+ /** Provider to log out; omit to log out every active provider. */
213
+ provider?: AuthProvider;
230
214
  }
231
- interface AuthLogoutResult {
232
- /** Provider that was affected (null when no session existed). */
233
- provider: AuthProvider | null;
234
- success: boolean;
215
+ export interface AuthLogoutResult {
216
+ /** Provider that was affected (null when no session existed). */
217
+ provider: AuthProvider | null;
218
+ success: boolean;
235
219
  }
236
220
  /**
237
221
  * `auth.whoami` — minimal identity for the active session.
@@ -241,24 +225,24 @@ interface AuthLogoutResult {
241
225
  * so the bridge result stays object-shaped (consistent with every other
242
226
  * method in `BridgeMethodMap`); consumer-side `null` ⇒ unauthenticated.
243
227
  */
244
- interface AuthWhoamiResult {
245
- provider: AuthProvider | null;
246
- login?: string;
247
- name?: string;
248
- avatarUrl?: string;
249
- email?: string;
228
+ export interface AuthWhoamiResult {
229
+ provider: AuthProvider | null;
230
+ login?: string;
231
+ name?: string;
232
+ avatarUrl?: string;
233
+ email?: string;
250
234
  }
251
235
  /**
252
236
  * `auth.switch` — flip the active provider to the requested one.
253
237
  *
254
238
  * Added per `2.需求澄清.md` §2.3 owner decision (CLI/QuickPick parity).
255
239
  */
256
- interface AuthSwitchParams {
257
- provider: AuthProvider;
240
+ export interface AuthSwitchParams {
241
+ provider: AuthProvider;
258
242
  }
259
- interface AuthSwitchResult {
260
- activeProvider: AuthProvider | null;
261
- account: AuthAccountMeta | null;
243
+ export interface AuthSwitchResult {
244
+ activeProvider: AuthProvider | null;
245
+ account: AuthAccountMeta | null;
262
246
  }
263
247
  /**
264
248
  * Future-facing read-write handle to a `SecretToken` — exposed only when
@@ -268,125 +252,127 @@ interface AuthSwitchResult {
268
252
  * field without a runtime/compile-time brand assertion, preventing
269
253
  * accidental leak via plain `string` parameters.
270
254
  */
271
- type AuthTokenEnvelope = {
272
- /** Token bytes — never logged, never emitted over the wire unless the
273
- * Extension advertised `auth.tokenRead`. */
274
- token: SecretToken;
275
- provider: AuthProvider;
276
- accountId: string;
255
+ export type AuthTokenEnvelope = {
256
+ /** Token bytes — never logged, never emitted over the wire unless the
257
+ * Extension advertised `auth.tokenRead`. */
258
+ token: SecretToken;
259
+ provider: AuthProvider;
260
+ accountId: string;
277
261
  };
278
- declare function isAuthProvider(value: unknown): value is AuthProvider;
279
- declare function isAuthAccountMeta(value: unknown): value is AuthAccountMeta;
280
- declare function isAuthLoginResult(value: unknown): value is AuthLoginResult;
281
- declare function isAuthSessionHandle(value: unknown): value is AuthSessionHandle;
282
- declare function isAuthStatus(value: unknown): value is AuthStatus;
283
- declare function isAuthLoginParams(value: unknown): value is AuthLoginParams;
284
- declare function isAuthLogoutParams(value: unknown): value is AuthLogoutParams;
285
- declare function isAuthLogoutResult(value: unknown): value is AuthLogoutResult;
286
- declare function isAuthWhoamiResult(value: unknown): value is AuthWhoamiResult;
287
- declare function isAuthSwitchParams(value: unknown): value is AuthSwitchParams;
288
- declare function isAuthSwitchResult(value: unknown): value is AuthSwitchResult;
289
-
290
- interface CopilotCustomizationsListParams {
291
- scope: CopilotCustomizationScope;
292
- workspaceDir?: string;
293
- }
294
- interface CopilotCustomizationsListResult {
295
- view: CopilotCustomizationViewPayload;
296
- /** Installable plugin.json packages enumerated from the enabled git
297
- * sources. Optional for wire compatibility with older CLI builds. */
298
- availablePackages?: CopilotAvailablePackagePayload[];
299
- }
300
- interface CopilotPackageInstallParams {
301
- scope: CopilotCustomizationScope;
302
- workspaceDir?: string;
303
- sourceId: string;
304
- packageId: string;
305
- artifactIds: string[];
306
- pinnedVersion?: string;
307
- localMode?: "live" | "private-workspace-override";
308
- }
309
- interface CopilotPackageUpdateParams {
310
- scope: CopilotCustomizationScope;
311
- workspaceDir?: string;
312
- packageId: string;
313
- artifactIds: string[];
314
- pinnedVersion?: string;
315
- }
316
- interface CopilotPackageUninstallParams {
317
- scope: CopilotCustomizationScope;
318
- workspaceDir?: string;
319
- packageId: string;
320
- }
321
- interface CopilotPackageMoveParams {
322
- workspaceDir?: string;
323
- packageId: string;
324
- from: CopilotCustomizationScope;
325
- to: CopilotCustomizationScope;
326
- }
327
- interface CopilotLegacyPreviewParams {
328
- workspaceDir?: string;
329
- }
330
- interface CopilotLegacyPreviewResult {
331
- sourceLabel: "~/.agents";
332
- count: number;
333
- artifacts: CopilotArtifactSummaryPayload[];
334
- }
335
- interface CopilotLegacyMigrateParams {
336
- workspaceDir?: string;
337
- artifactIds: string[];
338
- }
339
- interface CopilotSourceListParams {
340
- scope: CopilotCustomizationScope;
341
- workspaceDir?: string;
342
- }
343
- interface CopilotSourceListResult {
344
- sources: CopilotSourceRecordPayload[];
345
- }
346
- interface CopilotSourceRemoveParams {
347
- scope: CopilotCustomizationScope;
348
- workspaceDir?: string;
349
- sourceId: string;
350
- }
351
- interface CopilotSourceRemoveResult {
352
- removed: true;
353
- }
354
- interface CopilotUpdatePreviewParams {
355
- scope: CopilotCustomizationScope;
356
- workspaceDir?: string;
357
- packageId: string;
358
- revision: string;
359
- }
360
- interface CopilotUpdatePreviewResult {
361
- preview: CopilotPackageUpdatePreviewPayload;
362
- }
363
- type CopilotPackageInstallResult = CopilotCustomizationsListResult;
364
- type CopilotPackageUpdateResult = CopilotCustomizationsListResult;
365
- type CopilotPackageUninstallResult = CopilotCustomizationsListResult;
366
- type CopilotPackageMoveResult = CopilotCustomizationsListResult;
367
- type CopilotLegacyMigrateResult = CopilotCustomizationsListResult;
368
- declare function isCopilotCustomizationViewPayload(value: unknown): value is CopilotCustomizationViewPayload;
369
- declare function isCopilotCustomizationsListParams(value: unknown): value is CopilotCustomizationsListParams;
370
- declare function isCopilotCustomizationsListResult(value: unknown): value is CopilotCustomizationsListResult;
371
- declare function isCopilotPackageInstallParams(value: unknown): value is CopilotPackageInstallParams;
372
- declare function isCopilotPackageUpdateParams(value: unknown): value is CopilotPackageUpdateParams;
373
- declare function isCopilotPackageUninstallParams(value: unknown): value is CopilotPackageUninstallParams;
374
- declare function isCopilotPackageMoveParams(value: unknown): value is CopilotPackageMoveParams;
375
- declare function isCopilotLegacyPreviewParams(value: unknown): value is CopilotLegacyPreviewParams;
376
- declare function isCopilotLegacyMigrateParams(value: unknown): value is CopilotLegacyMigrateParams;
377
- declare function isCopilotSourceListParams(value: unknown): value is CopilotSourceListParams;
378
- declare function isCopilotSourceListResult(value: unknown): value is CopilotSourceListResult;
379
- declare function isCopilotSourceRemoveParams(value: unknown): value is CopilotSourceRemoveParams;
380
- declare function isCopilotSourceRemoveResult(value: unknown): value is CopilotSourceRemoveResult;
381
- declare function isCopilotUpdatePreviewParams(value: unknown): value is CopilotUpdatePreviewParams;
382
- declare function isCopilotUpdatePreviewResult(value: unknown): value is CopilotUpdatePreviewResult;
383
- declare function isCopilotLegacyPreviewResult(value: unknown): value is CopilotLegacyPreviewResult;
384
- declare const isCopilotPackageInstallResult: typeof isCopilotCustomizationsListResult;
385
- declare const isCopilotPackageUpdateResult: typeof isCopilotCustomizationsListResult;
386
- declare const isCopilotPackageUninstallResult: typeof isCopilotCustomizationsListResult;
387
- declare const isCopilotPackageMoveResult: typeof isCopilotCustomizationsListResult;
388
- declare const isCopilotLegacyMigrateResult: typeof isCopilotCustomizationsListResult;
389
-
262
+ export declare function isAuthProvider(value: unknown): value is AuthProvider;
263
+ export declare function isAuthAccountMeta(value: unknown): value is AuthAccountMeta;
264
+ export declare function isAuthLoginResult(value: unknown): value is AuthLoginResult;
265
+ export declare function isAuthSessionHandle(value: unknown): value is AuthSessionHandle;
266
+ export declare function isAuthStatus(value: unknown): value is AuthStatus;
267
+ export declare function isAuthLoginParams(value: unknown): value is AuthLoginParams;
268
+ export declare function isAuthLogoutParams(value: unknown): value is AuthLogoutParams;
269
+ export declare function isAuthLogoutResult(value: unknown): value is AuthLogoutResult;
270
+ export declare function isAuthWhoamiResult(value: unknown): value is AuthWhoamiResult;
271
+ export declare function isAuthSwitchParams(value: unknown): value is AuthSwitchParams;
272
+ export declare function isAuthSwitchResult(value: unknown): value is AuthSwitchResult;
273
+ //#endregion
274
+ //#region src/bridge-copilot-customizations.d.ts
275
+ export interface CopilotCustomizationsListParams {
276
+ scope: CopilotCustomizationScope;
277
+ workspaceDir?: string;
278
+ }
279
+ export interface CopilotCustomizationsListResult {
280
+ view: CopilotCustomizationViewPayload;
281
+ /** Installable plugin.json packages enumerated from the enabled git
282
+ * sources. Optional for wire compatibility with older CLI builds. */
283
+ availablePackages?: CopilotAvailablePackagePayload[];
284
+ }
285
+ export interface CopilotPackageInstallParams {
286
+ scope: CopilotCustomizationScope;
287
+ workspaceDir?: string;
288
+ sourceId: string;
289
+ packageId: string;
290
+ artifactIds: string[];
291
+ pinnedVersion?: string;
292
+ localMode?: "live" | "private-workspace-override";
293
+ }
294
+ export interface CopilotPackageUpdateParams {
295
+ scope: CopilotCustomizationScope;
296
+ workspaceDir?: string;
297
+ packageId: string;
298
+ artifactIds: string[];
299
+ pinnedVersion?: string;
300
+ }
301
+ export interface CopilotPackageUninstallParams {
302
+ scope: CopilotCustomizationScope;
303
+ workspaceDir?: string;
304
+ packageId: string;
305
+ }
306
+ export interface CopilotPackageMoveParams {
307
+ workspaceDir?: string;
308
+ packageId: string;
309
+ from: CopilotCustomizationScope;
310
+ to: CopilotCustomizationScope;
311
+ }
312
+ export interface CopilotLegacyPreviewParams {
313
+ workspaceDir?: string;
314
+ }
315
+ export interface CopilotLegacyPreviewResult {
316
+ sourceLabel: "~/.agents";
317
+ count: number;
318
+ artifacts: CopilotArtifactSummaryPayload[];
319
+ }
320
+ export interface CopilotLegacyMigrateParams {
321
+ workspaceDir?: string;
322
+ artifactIds: string[];
323
+ }
324
+ export interface CopilotSourceListParams {
325
+ scope: CopilotCustomizationScope;
326
+ workspaceDir?: string;
327
+ }
328
+ export interface CopilotSourceListResult {
329
+ sources: CopilotSourceRecordPayload[];
330
+ }
331
+ export interface CopilotSourceRemoveParams {
332
+ scope: CopilotCustomizationScope;
333
+ workspaceDir?: string;
334
+ sourceId: string;
335
+ }
336
+ export interface CopilotSourceRemoveResult {
337
+ removed: true;
338
+ }
339
+ export interface CopilotUpdatePreviewParams {
340
+ scope: CopilotCustomizationScope;
341
+ workspaceDir?: string;
342
+ packageId: string;
343
+ revision: string;
344
+ }
345
+ export interface CopilotUpdatePreviewResult {
346
+ preview: CopilotPackageUpdatePreviewPayload;
347
+ }
348
+ export type CopilotPackageInstallResult = CopilotCustomizationsListResult;
349
+ export type CopilotPackageUpdateResult = CopilotCustomizationsListResult;
350
+ export type CopilotPackageUninstallResult = CopilotCustomizationsListResult;
351
+ export type CopilotPackageMoveResult = CopilotCustomizationsListResult;
352
+ export type CopilotLegacyMigrateResult = CopilotCustomizationsListResult;
353
+ export declare function isCopilotCustomizationViewPayload(value: unknown): value is CopilotCustomizationViewPayload;
354
+ export declare function isCopilotCustomizationsListParams(value: unknown): value is CopilotCustomizationsListParams;
355
+ export declare function isCopilotCustomizationsListResult(value: unknown): value is CopilotCustomizationsListResult;
356
+ export declare function isCopilotPackageInstallParams(value: unknown): value is CopilotPackageInstallParams;
357
+ export declare function isCopilotPackageUpdateParams(value: unknown): value is CopilotPackageUpdateParams;
358
+ export declare function isCopilotPackageUninstallParams(value: unknown): value is CopilotPackageUninstallParams;
359
+ export declare function isCopilotPackageMoveParams(value: unknown): value is CopilotPackageMoveParams;
360
+ export declare function isCopilotLegacyPreviewParams(value: unknown): value is CopilotLegacyPreviewParams;
361
+ export declare function isCopilotLegacyMigrateParams(value: unknown): value is CopilotLegacyMigrateParams;
362
+ export declare function isCopilotSourceListParams(value: unknown): value is CopilotSourceListParams;
363
+ export declare function isCopilotSourceListResult(value: unknown): value is CopilotSourceListResult;
364
+ export declare function isCopilotSourceRemoveParams(value: unknown): value is CopilotSourceRemoveParams;
365
+ export declare function isCopilotSourceRemoveResult(value: unknown): value is CopilotSourceRemoveResult;
366
+ export declare function isCopilotUpdatePreviewParams(value: unknown): value is CopilotUpdatePreviewParams;
367
+ export declare function isCopilotUpdatePreviewResult(value: unknown): value is CopilotUpdatePreviewResult;
368
+ export declare function isCopilotLegacyPreviewResult(value: unknown): value is CopilotLegacyPreviewResult;
369
+ export declare const isCopilotPackageInstallResult: typeof isCopilotCustomizationsListResult;
370
+ export declare const isCopilotPackageUpdateResult: typeof isCopilotCustomizationsListResult;
371
+ export declare const isCopilotPackageUninstallResult: typeof isCopilotCustomizationsListResult;
372
+ export declare const isCopilotPackageMoveResult: typeof isCopilotCustomizationsListResult;
373
+ export declare const isCopilotLegacyMigrateResult: typeof isCopilotCustomizationsListResult;
374
+ //#endregion
375
+ //#region src/bridge-copilot-plugins.d.ts
390
376
  /**
391
377
  * `copilotPlugin.*` — whole-package plugin registration.
392
378
  *
@@ -396,116 +382,93 @@ declare const isCopilotLegacyMigrateResult: typeof isCopilotCustomizationsListRe
396
382
  * per-artifact install pipeline: browse lists leniently, installs
397
383
  * stay strict.
398
384
  */
399
- interface CopilotPluginRegistrationPayload {
400
- /** `${repoId}:${pluginId}` — path-safe. */
401
- registrationId: string;
402
- repoId: string;
403
- pluginId: string;
404
- displayName?: string;
405
- version?: string;
406
- scopes: Array<"workspace" | "personal">;
407
- /** High-risk content the user must see before registering. */
408
- mcpServers: string[];
409
- hasExtensions: boolean;
410
- /** Enablement in VS Code settings (`chat.pluginLocations` value).
411
- * Overlaid extension-side after the bridge returns; older CLIs and
412
- * unregistered rows omit it. */
413
- enabled?: boolean;
414
- }
415
- type CopilotPluginListParams = Record<string, never>;
416
- interface CopilotPluginListResult {
417
- plugins: CopilotPluginRegistrationPayload[];
418
- }
419
- interface CopilotPluginRegisterParams {
420
- /** Optional wire compat — plugins are personal-scope only and the
421
- * registrar defaults to "personal" when omitted. */
422
- scope?: "workspace" | "personal";
423
- workspaceDir?: string;
424
- repoId: string;
425
- pluginId: string;
426
- }
427
- type CopilotPluginRegisterResult = CopilotPluginListResult;
428
- interface CopilotPluginUnregisterParams {
429
- /** Optional wire compat — see CopilotPluginRegisterParams.scope. */
430
- scope?: "workspace" | "personal";
431
- workspaceDir?: string;
432
- registrationId: string;
433
- }
434
- type CopilotPluginUnregisterResult = CopilotPluginListResult;
435
- declare function isCopilotPluginListParams(value: unknown): value is CopilotPluginListParams;
436
- declare function isCopilotPluginListResult(value: unknown): value is CopilotPluginListResult;
437
- declare function isCopilotPluginRegisterParams(value: unknown): value is CopilotPluginRegisterParams;
438
- declare const isCopilotPluginRegisterResult: typeof isCopilotPluginListResult;
439
- declare function isCopilotPluginUnregisterParams(value: unknown): value is CopilotPluginUnregisterParams;
440
- declare const isCopilotPluginUnregisterResult: typeof isCopilotPluginListResult;
441
-
442
- /**
443
- * Skill & Agent v2 — Bridge protocol methods for the v2 skill/agent
444
- * repository pipeline (M5).
445
- *
446
- * Two new top-level method groups land here per
447
- * docs/architecture/skill-agent-v2-repo.md §6:
448
- *
449
- * - **`copilotContent.*`** — read + install skills/agents from local
450
- * clones (legacy `skillRepo.*` spellings stay wire-compatible via
451
- * `COPILOT_CONTENT_METHOD_ALIASES`)
452
- * - **`repo.*`** — manage the repo catalog (CRUD + sync)
453
- *
454
- * Draft methods (`skillRepo.draft.*`) and the `repo.syncAll` orchestrator
455
- * are typed for forward compatibility but their bridge handlers are
456
- * not wired in this PR — they land alongside the CLI/extension
457
- * integration in subsequent M5 follow-ups.
458
- *
459
- * All shapes are pure types. Runtime validation lives in
460
- * `isXxxResult` helpers in the bottom half of this file. Validators
461
- * are deliberately structural (no zod) so the protocol package
462
- * stays zero-dep.
463
- */
464
-
385
+ export interface CopilotPluginRegistrationPayload {
386
+ /** `${repoId}:${pluginId}` — path-safe. */
387
+ registrationId: string;
388
+ repoId: string;
389
+ pluginId: string;
390
+ displayName?: string;
391
+ version?: string;
392
+ scopes: Array<"workspace" | "personal">;
393
+ /** High-risk content the user must see before registering. */
394
+ mcpServers: string[];
395
+ hasExtensions: boolean;
396
+ /** Enablement in VS Code settings (`chat.pluginLocations` value).
397
+ * Overlaid extension-side after the bridge returns; older CLIs and
398
+ * unregistered rows omit it. */
399
+ enabled?: boolean;
400
+ }
401
+ export type CopilotPluginListParams = Record<string, never>;
402
+ export interface CopilotPluginListResult {
403
+ plugins: CopilotPluginRegistrationPayload[];
404
+ }
405
+ export interface CopilotPluginRegisterParams {
406
+ /** Optional wire compat — plugins are personal-scope only and the
407
+ * registrar defaults to "personal" when omitted. */
408
+ scope?: "workspace" | "personal";
409
+ workspaceDir?: string;
410
+ repoId: string;
411
+ pluginId: string;
412
+ }
413
+ export type CopilotPluginRegisterResult = CopilotPluginListResult;
414
+ export interface CopilotPluginUnregisterParams {
415
+ /** Optional wire compat — see CopilotPluginRegisterParams.scope. */
416
+ scope?: "workspace" | "personal";
417
+ workspaceDir?: string;
418
+ registrationId: string;
419
+ }
420
+ export type CopilotPluginUnregisterResult = CopilotPluginListResult;
421
+ export declare function isCopilotPluginListParams(value: unknown): value is CopilotPluginListParams;
422
+ export declare function isCopilotPluginListResult(value: unknown): value is CopilotPluginListResult;
423
+ export declare function isCopilotPluginRegisterParams(value: unknown): value is CopilotPluginRegisterParams;
424
+ export declare const isCopilotPluginRegisterResult: typeof isCopilotPluginListResult;
425
+ export declare function isCopilotPluginUnregisterParams(value: unknown): value is CopilotPluginUnregisterParams;
426
+ export declare const isCopilotPluginUnregisterResult: typeof isCopilotPluginListResult;
427
+ //#endregion
428
+ //#region src/bridge-skill-repo.d.ts
465
429
  /** A single skill/agent entry inside a repo (SkillStore.SkillEntry). */
466
- interface BridgeSkillRepoDetail extends BridgeSkillRepoEntry {
467
- files: BridgeSkillRepoFile[];
430
+ export interface BridgeSkillRepoDetail extends BridgeSkillRepoEntry {
431
+ files: BridgeSkillRepoFile[];
468
432
  }
469
433
  /** `skillRepo.list` — enumerate available skills/agents. */
470
- interface SkillRepoListParams {
471
- /** Restrict to one repo; omit to list across all. */
472
- repoId?: string;
473
- /** Restrict to one kind; omit to include both skills + agents. */
474
- kind?: BridgeSkillKind;
475
- /** Active workspace dir — workspace-scope disable marks only apply
476
- * to their own workspace, so the overlay needs it to mark rows. */
477
- workspaceDir?: string;
478
- }
479
- interface SkillRepoListResult {
480
- entries: BridgeSkillRepoEntry[];
434
+ export interface SkillRepoListParams {
435
+ /** Restrict to one repo; omit to list across all. */
436
+ repoId?: string;
437
+ /** Restrict to one kind; omit to include both skills + agents. */
438
+ kind?: BridgeSkillKind;
439
+ /** Active workspace dir — workspace-scope disable marks only apply
440
+ * to their own workspace, so the overlay needs it to mark rows. */
441
+ workspaceDir?: string;
442
+ }
443
+ export interface SkillRepoListResult {
444
+ entries: BridgeSkillRepoEntry[];
481
445
  }
482
446
  /** `skillRepo.get` — full detail of one entry. */
483
- interface SkillRepoGetParams {
484
- repoId: string;
485
- name: string;
486
- }
487
- interface SkillRepoGetResult extends BridgeSkillRepoDetail {
447
+ export interface SkillRepoGetParams {
448
+ repoId: string;
449
+ name: string;
488
450
  }
451
+ export interface SkillRepoGetResult extends BridgeSkillRepoDetail {}
489
452
  /** `skillRepo.install` — link an entry into a workspace or the global user scope. */
490
- interface SkillRepoInstallParams {
491
- repoId: string;
492
- name: string;
493
- workspaceDir: string;
494
- /** "skill" (default) or "agent" — selects the repo subfolder + scan directory. */
495
- kind?: BridgeSkillKind;
496
- /** Override the link mode. Defaults to platform-optimal. */
497
- mode?: "auto" | BridgeLinkMode;
498
- /**
499
- * Which scope to install into. "workspace" (default, back-compat)
500
- * links into `<workspaceDir>/.github/...`; "user" links into the
501
- * global `~/.agents/...` scope, visible to every workspace.
502
- */
503
- scope?: "workspace" | "user";
504
- }
505
- interface SkillRepoInstallResult {
506
- mode: BridgeLinkMode;
507
- linkPath: string;
508
- targetPath: string;
453
+ export interface SkillRepoInstallParams {
454
+ repoId: string;
455
+ name: string;
456
+ workspaceDir: string;
457
+ /** "skill" (default) or "agent" — selects the repo subfolder + scan directory. */
458
+ kind?: BridgeSkillKind;
459
+ /** Override the link mode. Defaults to platform-optimal. */
460
+ mode?: "auto" | BridgeLinkMode;
461
+ /**
462
+ * Which scope to install into. "workspace" (default, back-compat)
463
+ * links into `<workspaceDir>/.github/...`; "user" links into the
464
+ * global `~/.agents/...` scope, visible to every workspace.
465
+ */
466
+ scope?: "workspace" | "user";
467
+ }
468
+ export interface SkillRepoInstallResult {
469
+ mode: BridgeLinkMode;
470
+ linkPath: string;
471
+ targetPath: string;
509
472
  }
510
473
  /**
511
474
  * `skillRepo.convertToSymlink` — replace an existing, real (non-symlink)
@@ -514,34 +477,34 @@ interface SkillRepoInstallResult {
514
477
  * `skillRepo.install`; the handler refuses when there's nothing real
515
478
  * to convert (already a symlink, or nothing installed).
516
479
  */
517
- interface SkillRepoConvertToSymlinkParams {
518
- repoId: string;
519
- name: string;
520
- workspaceDir: string;
521
- /** "skill" (default) or "agent". */
522
- kind?: BridgeSkillKind;
523
- /** Override the link mode. Defaults to platform-optimal. */
524
- mode?: "auto" | BridgeLinkMode;
525
- /** "workspace" (default) or "user" (global) scope. */
526
- scope?: "workspace" | "user";
527
- }
528
- interface SkillRepoConvertToSymlinkResult {
529
- mode: BridgeLinkMode;
530
- linkPath: string;
531
- targetPath: string;
480
+ export interface SkillRepoConvertToSymlinkParams {
481
+ repoId: string;
482
+ name: string;
483
+ workspaceDir: string;
484
+ /** "skill" (default) or "agent". */
485
+ kind?: BridgeSkillKind;
486
+ /** Override the link mode. Defaults to platform-optimal. */
487
+ mode?: "auto" | BridgeLinkMode;
488
+ /** "workspace" (default) or "user" (global) scope. */
489
+ scope?: "workspace" | "user";
490
+ }
491
+ export interface SkillRepoConvertToSymlinkResult {
492
+ mode: BridgeLinkMode;
493
+ linkPath: string;
494
+ targetPath: string;
532
495
  }
533
496
  /** `skillRepo.uninstall` — remove a link from a workspace or the global user scope. */
534
- interface SkillRepoUninstallParams {
535
- repoId: string;
536
- name: string;
537
- workspaceDir: string;
538
- /** "skill" (default) or "agent". */
539
- kind?: BridgeSkillKind;
540
- /** "workspace" (default) or "user" (global) scope. */
541
- scope?: "workspace" | "user";
542
- }
543
- interface SkillRepoUninstallResult {
544
- removed: true;
497
+ export interface SkillRepoUninstallParams {
498
+ repoId: string;
499
+ name: string;
500
+ workspaceDir: string;
501
+ /** "skill" (default) or "agent". */
502
+ kind?: BridgeSkillKind;
503
+ /** "workspace" (default) or "user" (global) scope. */
504
+ scope?: "workspace" | "user";
505
+ }
506
+ export interface SkillRepoUninstallResult {
507
+ removed: true;
545
508
  }
546
509
  /**
547
510
  * `skillRepo.setEntryEnabled` — enable/disable a per-artifact skill or
@@ -549,262 +512,327 @@ interface SkillRepoUninstallResult {
549
512
  * machine-local mark and removes the materialized link; enable clears
550
513
  * the mark and re-links from the untouched declaration/source.
551
514
  */
552
- interface SkillRepoSetEntryEnabledParams {
515
+ export interface SkillRepoSetEntryEnabledParams {
516
+ repoId: string;
517
+ name: string;
518
+ /** "skill" (default) or "agent". */
519
+ kind?: BridgeSkillKind;
520
+ /** "workspace" (default) or "user" (global) scope. */
521
+ scope?: "workspace" | "user";
522
+ workspaceDir?: string;
523
+ enabled: boolean;
524
+ }
525
+ export interface SkillRepoSetEntryEnabledResult {
526
+ enabled: boolean;
527
+ }
528
+ /**
529
+ * `copilotContent.detectUnmanaged` — read-only detection of workspace
530
+ * Copilot content (skills/agents/hooks/MCP) that exists without a
531
+ * `.github/serviceme-plugins.json` declaration. See the core detector
532
+ * for the provenance rules (symlink targets, content fingerprints,
533
+ * generated-config identity maps).
534
+ */
535
+ export interface CopilotContentDetectUnmanagedParams {
536
+ workspaceDir: string;
537
+ }
538
+ export interface CopilotContentDetectUnmanagedResult {
539
+ /** Sources resolved exactly (symlink) or uniquely (fingerprint). */
540
+ adoptions: Array<{
553
541
  repoId: string;
554
542
  name: string;
555
- /** "skill" (default) or "agent". */
556
- kind?: BridgeSkillKind;
557
- /** "workspace" (default) or "user" (global) scope. */
558
- scope?: "workspace" | "user";
559
- workspaceDir?: string;
560
- enabled: boolean;
543
+ kind: "skill" | "agent";
544
+ source: "symlink" | "fingerprint";
545
+ }>;
546
+ /** Real copies whose content matches several repos — user picks. */
547
+ ambiguous: Array<{
548
+ name: string;
549
+ kind: "skill" | "agent";
550
+ candidates: string[];
551
+ }>;
552
+ /** Hook/MCP integrations recorded in generated serviceme configs. */
553
+ integrations: Array<{
554
+ repoId: string;
555
+ pluginId: string;
556
+ kind: "hook" | "mcp";
557
+ }>;
558
+ /** Present but not adoptable — transparency only. */
559
+ unmatched: Array<{
560
+ name: string;
561
+ kind: string;
562
+ reason: string;
563
+ }>;
561
564
  }
562
- interface SkillRepoSetEntryEnabledResult {
563
- enabled: boolean;
565
+ /**
566
+ * `copilotContent.adoptUnmanaged` — initialize the workspace
567
+ * declaration from detected content: convert real copies to symlinks
568
+ * when asked, record the selections (including hook/MCP kinds), and
569
+ * reconcile. Returns the standard restore entry statuses.
570
+ */
571
+ export interface CopilotContentAdoptUnmanagedParams {
572
+ workspaceDir: string;
573
+ entries: Array<{
574
+ repoId: string;
575
+ name: string;
576
+ kind: "skill" | "agent";
577
+ /** Convert a real copy into a symlink before adopting. */
578
+ convertRealCopy?: boolean;
579
+ }>;
580
+ integrations?: Array<{
581
+ repoId: string;
582
+ pluginId: string;
583
+ kind: "hook" | "mcp";
584
+ }>;
564
585
  }
586
+ export type CopilotContentAdoptUnmanagedResult = {
587
+ changed: boolean;
588
+ entries: CopilotContentRestoreResult["entries"];
589
+ };
565
590
  /** `skillRepo.listLinked` — every link currently in a workspace and/or user (global) scope. */
566
- interface SkillRepoListLinkedParams {
567
- workspaceDir: string;
568
- /** "skill" (default) or "agent". */
569
- kind?: BridgeSkillKind;
570
- /**
571
- * Which scope(s) to scan. "workspace" (default, back-compat) scans only
572
- * `<workspaceDir>/.github/...`; "user" scans only the global
573
- * `~/.agents/...` scope; "all" scans and merges both.
574
- */
575
- scope?: "workspace" | "user" | "all";
576
- }
577
- interface SkillRepoListLinkedResult {
578
- links: BridgeLinkedSkill[];
591
+ export interface SkillRepoListLinkedParams {
592
+ workspaceDir: string;
593
+ /** "skill" (default) or "agent". */
594
+ kind?: BridgeSkillKind;
595
+ /**
596
+ * Which scope(s) to scan. "workspace" (default, back-compat) scans only
597
+ * `<workspaceDir>/.github/...`; "user" scans only the global
598
+ * `~/.agents/...` scope; "all" scans and merges both.
599
+ */
600
+ scope?: "workspace" | "user" | "all";
601
+ }
602
+ export interface SkillRepoListLinkedResult {
603
+ links: BridgeLinkedSkill[];
579
604
  }
580
605
  /** `skillRepo.draft.create` — start a new draft. */
581
- interface SkillRepoDraftCreateParams {
582
- kind: BridgeSkillKind;
583
- /** Files including a manifest (SKILL.md or AGENT.md). */
584
- files: BridgeSkillRepoFile[];
585
- /** Optional caller-supplied id (otherwise 16-hex-char random). */
586
- id?: string;
606
+ export interface SkillRepoDraftCreateParams {
607
+ kind: BridgeSkillKind;
608
+ /** Files including a manifest (SKILL.md or AGENT.md). */
609
+ files: BridgeSkillRepoFile[];
610
+ /** Optional caller-supplied id (otherwise 16-hex-char random). */
611
+ id?: string;
587
612
  }
588
- interface SkillRepoDraftCreateResult {
589
- id: string;
613
+ export interface SkillRepoDraftCreateResult {
614
+ id: string;
590
615
  }
591
616
  /** `skillRepo.draft.commit` — push a draft to its target repo. */
592
- interface SkillRepoDraftCommitParams {
593
- kind: BridgeSkillKind;
594
- id: string;
595
- /** Target repo. Must have `writeEnabled: true`. */
596
- repoId: string;
597
- /** Optional override; otherwise defaults to the draft's manifest `name`. */
598
- skillName?: string;
599
- /** Optional override; otherwise defaults to main. */
600
- branch?: string;
601
- /** When true, skip the network push (local commit only). */
602
- skipPush?: boolean;
603
- }
604
- interface SkillRepoDraftCommitResult {
605
- repoId: string;
606
- skillName: string;
607
- commitSha: string;
608
- pushedRef?: string;
609
- pushedSha?: string;
617
+ export interface SkillRepoDraftCommitParams {
618
+ kind: BridgeSkillKind;
619
+ id: string;
620
+ /** Target repo. Must have `writeEnabled: true`. */
621
+ repoId: string;
622
+ /** Optional override; otherwise defaults to the draft's manifest `name`. */
623
+ skillName?: string;
624
+ /** Optional override; otherwise defaults to main. */
625
+ branch?: string;
626
+ /** When true, skip the network push (local commit only). */
627
+ skipPush?: boolean;
628
+ }
629
+ export interface SkillRepoDraftCommitResult {
630
+ repoId: string;
631
+ skillName: string;
632
+ commitSha: string;
633
+ pushedRef?: string;
634
+ pushedSha?: string;
610
635
  }
611
636
  /** `skillRepo.draft.list` — list drafts of a kind. */
612
- interface SkillRepoDraftListParams {
613
- kind: BridgeSkillKind;
637
+ export interface SkillRepoDraftListParams {
638
+ kind: BridgeSkillKind;
614
639
  }
615
- interface SkillRepoDraftListResult {
616
- drafts: Array<{
617
- id: string;
618
- kind: BridgeSkillKind;
619
- name: string;
620
- description: string;
621
- modifiedAt: string;
622
- }>;
640
+ export interface SkillRepoDraftListResult {
641
+ drafts: Array<{
642
+ id: string;
643
+ kind: BridgeSkillKind;
644
+ name: string;
645
+ description: string;
646
+ modifiedAt: string;
647
+ }>;
623
648
  }
624
649
  /** `skillRepo.draft.delete` — remove a draft. */
625
- interface SkillRepoDraftDeleteParams {
626
- kind: BridgeSkillKind;
627
- id: string;
650
+ export interface SkillRepoDraftDeleteParams {
651
+ kind: BridgeSkillKind;
652
+ id: string;
628
653
  }
629
- interface SkillRepoDraftDeleteResult {
630
- deleted: true;
654
+ export interface SkillRepoDraftDeleteResult {
655
+ deleted: true;
631
656
  }
632
657
  /** `repo.list` — enumerate known repos. */
633
- interface RepoListParams {
634
- /** Optional source filter; default includes both. */
635
- source?: "default" | "user";
658
+ export interface RepoListParams {
659
+ /** Optional source filter; default includes both. */
660
+ source?: "default" | "user";
636
661
  }
637
- interface RepoListResult {
638
- repos: BridgeRepoEntry[];
662
+ export interface RepoListResult {
663
+ repos: BridgeRepoEntry[];
639
664
  }
640
665
  /** `repo.add` — add a user repo. */
641
- interface RepoAddParams {
642
- url: string;
643
- /** Auto-detected from upstream when omitted. */
644
- branch?: string;
645
- /** Optional display name. */
646
- name?: string;
647
- /** Whether the repo participates in scheduled syncs. Defaults to true. */
648
- enabled?: boolean;
649
- /** Route git traffic via the server proxy (default true). */
650
- useProxy?: boolean;
651
- }
652
- interface RepoAddResult {
653
- repo: BridgeRepoEntry;
654
- branch: string;
655
- cloned: boolean;
666
+ export interface RepoAddParams {
667
+ url: string;
668
+ /** Auto-detected from upstream when omitted. */
669
+ branch?: string;
670
+ /** Optional display name. */
671
+ name?: string;
672
+ /** Whether the repo participates in scheduled syncs. Defaults to true. */
673
+ enabled?: boolean;
674
+ /** Route git traffic via the server proxy (default true). */
675
+ useProxy?: boolean;
676
+ }
677
+ export interface RepoAddResult {
678
+ repo: BridgeRepoEntry;
679
+ branch: string;
680
+ cloned: boolean;
656
681
  }
657
682
  /** `repo.remove` — remove a user repo. */
658
- interface RepoRemoveParams {
659
- repoId: string;
683
+ export interface RepoRemoveParams {
684
+ repoId: string;
660
685
  }
661
- interface RepoRemoveResult {
662
- removed: true;
686
+ export interface RepoRemoveResult {
687
+ removed: true;
663
688
  }
664
689
  /** `repo.enable` — flip the `enabled` flag to true. */
665
- interface RepoEnableParams {
666
- repoId: string;
690
+ export interface RepoEnableParams {
691
+ repoId: string;
667
692
  }
668
- interface RepoEnableResult {
669
- repo: BridgeRepoEntry;
693
+ export interface RepoEnableResult {
694
+ repo: BridgeRepoEntry;
670
695
  }
671
696
  /** `repo.disable` — flip the `enabled` flag to false. */
672
- interface RepoDisableParams {
673
- repoId: string;
697
+ export interface RepoDisableParams {
698
+ repoId: string;
674
699
  }
675
- interface RepoDisableResult {
676
- repo: BridgeRepoEntry;
700
+ export interface RepoDisableResult {
701
+ repo: BridgeRepoEntry;
677
702
  }
678
703
  /** `repo.update` — update editable fields of an existing repo. */
679
- interface RepoUpdateParams {
680
- repoId: string;
681
- url?: string;
682
- branch?: string;
683
- name?: string;
684
- enabled?: boolean;
685
- useProxy?: boolean;
704
+ export interface RepoUpdateParams {
705
+ repoId: string;
706
+ url?: string;
707
+ branch?: string;
708
+ name?: string;
709
+ enabled?: boolean;
710
+ useProxy?: boolean;
686
711
  }
687
- interface RepoUpdateResult {
688
- repo: BridgeRepoEntry;
712
+ export interface RepoUpdateResult {
713
+ repo: BridgeRepoEntry;
689
714
  }
690
715
  /** `repo.sync` — pull a single repo. */
691
- interface RepoSyncParams {
692
- repoId: string;
716
+ export interface RepoSyncParams {
717
+ repoId: string;
693
718
  }
694
- interface RepoSyncResult {
695
- pulls: [BridgeRepoSyncPull];
719
+ export interface RepoSyncResult {
720
+ pulls: [BridgeRepoSyncPull];
696
721
  }
697
722
  /** `repo.syncAll` — pull every enabled repo. */
698
- type RepoSyncAllParams = Record<string, never>;
699
- interface RepoSyncAllResult {
700
- pulls: BridgeRepoSyncPull[];
723
+ export type RepoSyncAllParams = Record<string, never>;
724
+ export interface RepoSyncAllResult {
725
+ pulls: BridgeRepoSyncPull[];
701
726
  }
702
727
  /** `repo.resetParseCache` — re-clone every enabled repo checkout so
703
728
  * listing/parsing runs against a pristine tree (recovers from
704
729
  * historical-parser drift). Same result shape as syncAll. */
705
- type RepoResetParseCacheParams = Record<string, never>;
706
- type RepoResetParseCacheResult = RepoSyncAllResult;
730
+ export type RepoResetParseCacheParams = Record<string, never>;
731
+ export type RepoResetParseCacheResult = RepoSyncAllResult;
707
732
  /** Status of one declared entry after a reconciliation pass. */
708
- type CopilotContentStatus = "restored" | "adopted" | "pending_approval" | "missing_source" | "conflict" | "drifted";
733
+ export type CopilotContentStatus = "restored" | "adopted" | "pending_approval" | "missing_source" | "conflict" | "drifted";
709
734
  /** `copilotContent.restore` — reconcile declared workspace content on this machine. */
710
- interface CopilotContentRestoreParams {
711
- /** Absolute workspace root containing .github/serviceme-plugins.json. */
712
- workspaceDir: string;
713
- }
714
- interface CopilotContentRestoreResult {
715
- changed: boolean;
716
- entries: Array<{
717
- identity: string;
718
- status: CopilotContentStatus;
719
- message?: string;
720
- }>;
735
+ export interface CopilotContentRestoreParams {
736
+ /** Absolute workspace root containing .github/serviceme-plugins.json. */
737
+ workspaceDir: string;
738
+ }
739
+ export interface CopilotContentRestoreResult {
740
+ changed: boolean;
741
+ entries: Array<{
742
+ identity: string;
743
+ status: CopilotContentStatus;
744
+ message?: string;
745
+ }>;
721
746
  }
722
747
  /** `copilotContent.status` — read the declaration and current link state without mutating. */
723
- interface CopilotContentStatusParams {
724
- workspaceDir: string;
725
- }
726
- interface CopilotContentStatusResult extends CopilotContentRestoreResult {
748
+ export interface CopilotContentStatusParams {
749
+ workspaceDir: string;
727
750
  }
751
+ export interface CopilotContentStatusResult extends CopilotContentRestoreResult {}
728
752
  /** `copilotContent.approve` — record local approval then re-reconcile. */
729
- interface CopilotContentApproveParams {
730
- workspaceDir: string;
731
- identities: string[];
732
- }
733
- interface CopilotContentApproveResult extends CopilotContentRestoreResult {
753
+ export interface CopilotContentApproveParams {
754
+ workspaceDir: string;
755
+ identities: string[];
734
756
  }
757
+ export interface CopilotContentApproveResult extends CopilotContentRestoreResult {}
735
758
  /** `copilotContent.migrateLegacy` — report legacy ~/.agents links available for migration. */
736
- interface CopilotContentMigrateLegacyParams {
737
- workspaceDir: string;
759
+ export interface CopilotContentMigrateLegacyParams {
760
+ workspaceDir: string;
738
761
  }
739
- interface CopilotContentMigrateLegacyResult {
740
- entries: Array<{
741
- identity: string;
742
- status: CopilotContentStatus;
743
- message?: string;
744
- }>;
762
+ export interface CopilotContentMigrateLegacyResult {
763
+ entries: Array<{
764
+ identity: string;
765
+ status: CopilotContentStatus;
766
+ message?: string;
767
+ }>;
745
768
  }
746
769
  /** Integration kinds that require machine-local configuration files. */
747
- type CopilotContentIntegrationKind = "mcp" | "hook";
770
+ export type CopilotContentIntegrationKind = "mcp" | "hook";
748
771
  /** Lifecycle status of one machine-local integration configuration. */
749
- type CopilotContentIntegrationStatus = "active" | "inactive" | "pending_approval" | "missing_local_configuration";
772
+ export type CopilotContentIntegrationStatus = "active" | "inactive" | "pending_approval" | "missing_local_configuration";
750
773
  /**
751
774
  * `copilotContent.integrationStatus` — read-only diagnostics for the
752
775
  * machine-local MCP / hook integrations of a declared workspace.
753
776
  */
754
- interface CopilotContentIntegrationStatusParams {
755
- /** Absolute workspace root containing .github/serviceme-plugins.json. */
756
- workspaceDir: string;
757
- }
758
- interface CopilotContentIntegrationStatusResult {
759
- integrations: Array<{
760
- identity: string;
761
- kind: CopilotContentIntegrationKind;
762
- /** Absolute path of the machine-local config backing the integration. */
763
- configPath: string;
764
- /** Server or hook names the identity owns in the config. */
765
- names: string[];
766
- status: CopilotContentIntegrationStatus;
767
- }>;
768
- }
769
- declare function isSkillRepoListResult(value: unknown): value is SkillRepoListResult;
770
- declare function isSkillRepoGetResult(value: unknown): value is SkillRepoGetResult;
771
- declare function isSkillRepoInstallResult(value: unknown): value is SkillRepoInstallResult;
772
- declare function isSkillRepoConvertToSymlinkResult(value: unknown): value is SkillRepoConvertToSymlinkResult;
773
- declare function isSkillRepoUninstallResult(value: unknown): value is SkillRepoUninstallResult;
774
- declare function isSkillRepoSetEntryEnabledResult(value: unknown): value is SkillRepoSetEntryEnabledResult;
775
- declare function isSkillRepoListLinkedResult(value: unknown): value is SkillRepoListLinkedResult;
776
- declare function isSkillRepoDraftCreateResult(value: unknown): value is SkillRepoDraftCreateResult;
777
- declare function isSkillRepoDraftCommitResult(value: unknown): value is SkillRepoDraftCommitResult;
778
- declare function isSkillRepoDraftListResult(value: unknown): value is SkillRepoDraftListResult;
779
- declare function isSkillRepoDraftDeleteResult(value: unknown): value is SkillRepoDraftDeleteResult;
780
- declare function isRepoListResult(value: unknown): value is RepoListResult;
781
- declare function isRepoAddResult(value: unknown): value is RepoAddResult;
782
- declare function isRepoRemoveResult(value: unknown): value is RepoRemoveResult;
783
- declare function isRepoEnableResult(value: unknown): value is RepoEnableResult;
784
- declare function isRepoDisableResult(value: unknown): value is RepoDisableResult;
785
- declare function isRepoUpdateResult(value: unknown): value is RepoUpdateResult;
786
- declare function isRepoSyncResult(value: unknown): value is RepoSyncResult;
787
- declare function isRepoSyncAllResult(value: unknown): value is RepoSyncAllResult;
788
- declare function isCopilotContentRestoreResult(value: unknown): value is CopilotContentRestoreResult;
789
- declare function isCopilotContentStatusResult(value: unknown): value is CopilotContentStatusResult;
790
- declare function isCopilotContentApproveResult(value: unknown): value is CopilotContentApproveResult;
791
- declare function isCopilotContentMigrateLegacyResult(value: unknown): value is CopilotContentMigrateLegacyResult;
792
- declare function isCopilotContentIntegrationStatusResult(value: unknown): value is CopilotContentIntegrationStatusResult;
793
- declare function isSkillRepoListParams(value: unknown): value is SkillRepoListParams;
794
- declare function isSkillRepoGetParams(value: unknown): value is SkillRepoGetParams;
795
- declare function isSkillRepoInstallParams(value: unknown): value is SkillRepoInstallParams;
796
- declare function isSkillRepoConvertToSymlinkParams(value: unknown): value is SkillRepoConvertToSymlinkParams;
797
- declare function isSkillRepoUninstallParams(value: unknown): value is SkillRepoUninstallParams;
798
- declare function isSkillRepoSetEntryEnabledParams(value: unknown): value is SkillRepoSetEntryEnabledParams;
799
- declare function isSkillRepoListLinkedParams(value: unknown): value is SkillRepoListLinkedParams;
800
- declare function isRepoListParams(value: unknown): value is RepoListParams;
801
- declare function isRepoAddParams(value: unknown): value is RepoAddParams;
802
- declare function isRepoRemoveParams(value: unknown): value is RepoRemoveParams;
803
- declare function isRepoEnableParams(value: unknown): value is RepoEnableParams;
804
- declare function isRepoDisableParams(value: unknown): value is RepoDisableParams;
805
- declare function isRepoSyncParams(value: unknown): value is RepoSyncParams;
806
- declare function isRepoSyncAllParams(value: unknown): value is RepoSyncAllParams;
807
-
777
+ export interface CopilotContentIntegrationStatusParams {
778
+ /** Absolute workspace root containing .github/serviceme-plugins.json. */
779
+ workspaceDir: string;
780
+ }
781
+ export interface CopilotContentIntegrationStatusResult {
782
+ integrations: Array<{
783
+ identity: string;
784
+ kind: CopilotContentIntegrationKind;
785
+ /** Absolute path of the machine-local config backing the integration. */
786
+ configPath: string;
787
+ /** Server or hook names the identity owns in the config. */
788
+ names: string[];
789
+ status: CopilotContentIntegrationStatus;
790
+ }>;
791
+ }
792
+ export declare function isSkillRepoListResult(value: unknown): value is SkillRepoListResult;
793
+ export declare function isSkillRepoGetResult(value: unknown): value is SkillRepoGetResult;
794
+ export declare function isSkillRepoInstallResult(value: unknown): value is SkillRepoInstallResult;
795
+ export declare function isSkillRepoConvertToSymlinkResult(value: unknown): value is SkillRepoConvertToSymlinkResult;
796
+ export declare function isSkillRepoUninstallResult(value: unknown): value is SkillRepoUninstallResult;
797
+ export declare function isSkillRepoSetEntryEnabledResult(value: unknown): value is SkillRepoSetEntryEnabledResult;
798
+ export declare function isCopilotContentDetectUnmanagedParams(value: unknown): value is CopilotContentDetectUnmanagedParams;
799
+ export declare function isCopilotContentDetectUnmanagedResult(value: unknown): value is CopilotContentDetectUnmanagedResult;
800
+ export declare function isCopilotContentAdoptUnmanagedParams(value: unknown): value is CopilotContentAdoptUnmanagedParams;
801
+ export declare function isCopilotContentAdoptUnmanagedResult(value: unknown): value is CopilotContentAdoptUnmanagedResult;
802
+ export declare function isSkillRepoListLinkedResult(value: unknown): value is SkillRepoListLinkedResult;
803
+ export declare function isSkillRepoDraftCreateResult(value: unknown): value is SkillRepoDraftCreateResult;
804
+ export declare function isSkillRepoDraftCommitResult(value: unknown): value is SkillRepoDraftCommitResult;
805
+ export declare function isSkillRepoDraftListResult(value: unknown): value is SkillRepoDraftListResult;
806
+ export declare function isSkillRepoDraftDeleteResult(value: unknown): value is SkillRepoDraftDeleteResult;
807
+ export declare function isRepoListResult(value: unknown): value is RepoListResult;
808
+ export declare function isRepoAddResult(value: unknown): value is RepoAddResult;
809
+ export declare function isRepoRemoveResult(value: unknown): value is RepoRemoveResult;
810
+ export declare function isRepoEnableResult(value: unknown): value is RepoEnableResult;
811
+ export declare function isRepoDisableResult(value: unknown): value is RepoDisableResult;
812
+ export declare function isRepoUpdateResult(value: unknown): value is RepoUpdateResult;
813
+ export declare function isRepoSyncResult(value: unknown): value is RepoSyncResult;
814
+ export declare function isRepoSyncAllResult(value: unknown): value is RepoSyncAllResult;
815
+ export declare function isCopilotContentRestoreResult(value: unknown): value is CopilotContentRestoreResult;
816
+ export declare function isCopilotContentStatusResult(value: unknown): value is CopilotContentStatusResult;
817
+ export declare function isCopilotContentApproveResult(value: unknown): value is CopilotContentApproveResult;
818
+ export declare function isCopilotContentMigrateLegacyResult(value: unknown): value is CopilotContentMigrateLegacyResult;
819
+ export declare function isCopilotContentIntegrationStatusResult(value: unknown): value is CopilotContentIntegrationStatusResult;
820
+ export declare function isSkillRepoListParams(value: unknown): value is SkillRepoListParams;
821
+ export declare function isSkillRepoGetParams(value: unknown): value is SkillRepoGetParams;
822
+ export declare function isSkillRepoInstallParams(value: unknown): value is SkillRepoInstallParams;
823
+ export declare function isSkillRepoConvertToSymlinkParams(value: unknown): value is SkillRepoConvertToSymlinkParams;
824
+ export declare function isSkillRepoUninstallParams(value: unknown): value is SkillRepoUninstallParams;
825
+ export declare function isSkillRepoSetEntryEnabledParams(value: unknown): value is SkillRepoSetEntryEnabledParams;
826
+ export declare function isSkillRepoListLinkedParams(value: unknown): value is SkillRepoListLinkedParams;
827
+ export declare function isRepoListParams(value: unknown): value is RepoListParams;
828
+ export declare function isRepoAddParams(value: unknown): value is RepoAddParams;
829
+ export declare function isRepoRemoveParams(value: unknown): value is RepoRemoveParams;
830
+ export declare function isRepoEnableParams(value: unknown): value is RepoEnableParams;
831
+ export declare function isRepoDisableParams(value: unknown): value is RepoDisableParams;
832
+ export declare function isRepoSyncParams(value: unknown): value is RepoSyncParams;
833
+ export declare function isRepoSyncAllParams(value: unknown): value is RepoSyncAllParams;
834
+ //#endregion
835
+ //#region src/device.d.ts
808
836
  /**
809
837
  * Device protocol — Phase 5.1 cross-process contract.
810
838
  *
@@ -821,8 +849,8 @@ declare function isRepoSyncAllParams(value: unknown): value is RepoSyncAllParams
821
849
  * - `device.enroll` → { publicId, bindingState, expiresAt }
822
850
  * - `device.rotate-secret` → { publicId, secretVersion }
823
851
  */
824
- type DeviceBindingState = "anonymous" | "pending" | "claimed" | "expired";
825
- declare const DEVICE_BINDING_STATES: readonly DeviceBindingState[];
852
+ export type DeviceBindingState = "anonymous" | "pending" | "claimed" | "expired";
853
+ export declare const DEVICE_BINDING_STATES: readonly DeviceBindingState[];
826
854
  /**
827
855
  * Public, non-secret half of the device identity.
828
856
  *
@@ -830,10 +858,10 @@ declare const DEVICE_BINDING_STATES: readonly DeviceBindingState[];
830
858
  * The rotated HMAC secret bytes themselves live in the IdentityStore
831
859
  * JSON file and **never** enter protocol payloads.
832
860
  */
833
- interface DeviceIdentityState {
834
- publicId: string;
835
- secretVersion: number;
836
- bindingState: DeviceBindingState;
861
+ export interface DeviceIdentityState {
862
+ publicId: string;
863
+ secretVersion: number;
864
+ bindingState: DeviceBindingState;
837
865
  }
838
866
  /**
839
867
  * Snapshot of the installed environment for this device.
@@ -843,250 +871,252 @@ interface DeviceIdentityState {
843
871
  * so the same value persists across Extension and CLI processes.
844
872
  * `machineId` is the raw hostname for diagnostics.
845
873
  */
846
- interface DeviceMetadata {
847
- installationId: string;
848
- machineId: string;
849
- platform: NodeJS.Platform | string;
850
- hostname?: string;
851
- vscodeVersion?: string;
852
- extensionVersion?: string;
874
+ export interface DeviceMetadata {
875
+ installationId: string;
876
+ machineId: string;
877
+ platform: NodeJS.Platform | string;
878
+ hostname?: string;
879
+ vscodeVersion?: string;
880
+ extensionVersion?: string;
853
881
  }
854
882
  /**
855
883
  * Result of `device.status` — public identity + environment + sync timing.
856
884
  */
857
- interface DeviceStatus {
858
- bindingState: DeviceBindingState;
859
- identity?: DeviceIdentityState;
860
- metadata?: DeviceMetadata;
861
- /** ISO timestamp of the last successful server sync. */
862
- lastSyncAt?: string;
863
- /** Last sync error message (omitted when last sync succeeded). */
864
- lastSyncError?: string;
885
+ export interface DeviceStatus {
886
+ bindingState: DeviceBindingState;
887
+ identity?: DeviceIdentityState;
888
+ metadata?: DeviceMetadata;
889
+ /** ISO timestamp of the last successful server sync. */
890
+ lastSyncAt?: string;
891
+ /** Last sync error message (omitted when last sync succeeded). */
892
+ lastSyncError?: string;
865
893
  }
866
894
  /** `device.status` — no params. */
867
- type DeviceStatusParams = Record<string, never>;
895
+ export type DeviceStatusParams = Record<string, never>;
868
896
  /** `device.enroll` — kick off enrollment (or re-enrollment). */
869
- interface DeviceEnrollParams {
870
- /** When true, drop the current identity and start fresh. */
871
- force?: boolean;
872
- /** When true, the existing auth code is required to re-enroll. */
873
- requireAuth?: boolean;
874
- }
875
- interface DeviceEnrollResult {
876
- publicId: string;
877
- bindingState: DeviceBindingState;
878
- /** ISO timestamp at which this device-secret expires (forces re-enroll). */
879
- expiresAt?: string;
897
+ export interface DeviceEnrollParams {
898
+ /** When true, drop the current identity and start fresh. */
899
+ force?: boolean;
900
+ /** When true, the existing auth code is required to re-enroll. */
901
+ requireAuth?: boolean;
902
+ }
903
+ export interface DeviceEnrollResult {
904
+ publicId: string;
905
+ bindingState: DeviceBindingState;
906
+ /** ISO timestamp at which this device-secret expires (forces re-enroll). */
907
+ expiresAt?: string;
880
908
  }
881
909
  /** `device.rotate-secret` — rotate HMAC secret while keeping grace window. */
882
- interface DeviceRotateSecretParams {
883
- /**
884
- * Grace period (days) during which the previous secret still validates
885
- * in-flight requests. Defaults to 7 per `2.需求澄清.md` §1.2.
886
- */
887
- gracePeriodDays?: number;
888
- }
889
- interface DeviceRotateSecretResult {
890
- publicId: string;
891
- secretVersion: number;
892
- gracePeriodDays: number;
893
- /** ISO timestamp marking the end of the grace window for the old secret. */
894
- gracePeriodEndsAt?: string;
895
- }
896
- declare function isDeviceBindingState(value: unknown): value is DeviceBindingState;
897
- declare function isDeviceIdentityState(value: unknown): value is DeviceIdentityState;
898
- declare function isDeviceMetadata(value: unknown): value is DeviceMetadata;
899
- declare function isDeviceStatus(value: unknown): value is DeviceStatus;
900
- declare function isDeviceEnrollParams(value: unknown): value is DeviceEnrollParams;
901
- declare function isDeviceEnrollResult(value: unknown): value is DeviceEnrollResult;
902
- declare function isDeviceRotateSecretParams(value: unknown): value is DeviceRotateSecretParams;
903
- declare function isDeviceRotateSecretResult(value: unknown): value is DeviceRotateSecretResult;
904
-
905
- type ServicemeErrorCode = "protocol_mismatch" | "cli_not_found" | "cli_start_failed" | "command_timeout" | "request_cancelled" | "invalid_params" | "opencode_not_installed" | "opencode_startup_timeout" | "opencode_request_failed" | "opencode_backend_not_running" | "opencode_session_not_found" | "copilot_not_installed" | "copilot_auth_required" | "copilot_execution_failed" | "copilot_timeout" | "json_invalid_input" | "env_tool_not_found" | "task_not_found" | "task_already_exists" | "invalid_schedule" | "invalid_payload" | "confirmation_required" | "workspace_not_found" | "daemon_not_running" | "executor_timeout" | "executor_error" | "task_already_running" | "not_found" | "internal_error" | "auth_not_logged_in" | "auth_provider_not_registered" | "device_not_enrolled" | "toolbox_invalid_scope";
906
- declare const SERVICEME_ERROR_CODES: readonly ["protocol_mismatch", "cli_not_found", "cli_start_failed", "command_timeout", "request_cancelled", "invalid_params", "opencode_not_installed", "opencode_startup_timeout", "opencode_request_failed", "opencode_backend_not_running", "opencode_session_not_found", "copilot_not_installed", "copilot_auth_required", "copilot_execution_failed", "copilot_timeout", "json_invalid_input", "env_tool_not_found", "task_not_found", "task_already_exists", "invalid_schedule", "invalid_payload", "confirmation_required", "workspace_not_found", "daemon_not_running", "executor_timeout", "executor_error", "task_already_running", "not_found", "internal_error", "auth_not_logged_in", "auth_provider_not_registered", "device_not_enrolled", "toolbox_invalid_scope"];
907
- interface ServicemeErrorDetails {
910
+ export interface DeviceRotateSecretParams {
911
+ /**
912
+ * Grace period (days) during which the previous secret still validates
913
+ * in-flight requests. Defaults to 7 per `2.需求澄清.md` §1.2.
914
+ */
915
+ gracePeriodDays?: number;
916
+ }
917
+ export interface DeviceRotateSecretResult {
918
+ publicId: string;
919
+ secretVersion: number;
920
+ gracePeriodDays: number;
921
+ /** ISO timestamp marking the end of the grace window for the old secret. */
922
+ gracePeriodEndsAt?: string;
923
+ }
924
+ export declare function isDeviceBindingState(value: unknown): value is DeviceBindingState;
925
+ export declare function isDeviceIdentityState(value: unknown): value is DeviceIdentityState;
926
+ export declare function isDeviceMetadata(value: unknown): value is DeviceMetadata;
927
+ export declare function isDeviceStatus(value: unknown): value is DeviceStatus;
928
+ export declare function isDeviceEnrollParams(value: unknown): value is DeviceEnrollParams;
929
+ export declare function isDeviceEnrollResult(value: unknown): value is DeviceEnrollResult;
930
+ export declare function isDeviceRotateSecretParams(value: unknown): value is DeviceRotateSecretParams;
931
+ export declare function isDeviceRotateSecretResult(value: unknown): value is DeviceRotateSecretResult;
932
+ //#endregion
933
+ //#region src/errors.d.ts
934
+ export type ServicemeErrorCode = "protocol_mismatch" | "cli_not_found" | "cli_start_failed" | "command_timeout" | "request_cancelled" | "invalid_params" | "opencode_not_installed" | "opencode_startup_timeout" | "opencode_request_failed" | "opencode_backend_not_running" | "opencode_session_not_found" | "copilot_not_installed" | "copilot_auth_required" | "copilot_execution_failed" | "copilot_timeout" | "json_invalid_input" | "env_tool_not_found" | "task_not_found" | "task_already_exists" | "invalid_schedule" | "invalid_payload" | "confirmation_required" | "workspace_not_found" | "daemon_not_running" | "executor_timeout" | "executor_error" | "task_already_running" | "not_found" | "internal_error" | "auth_not_logged_in" | "auth_provider_not_registered" | "device_not_enrolled" | "toolbox_invalid_scope";
935
+ export declare const SERVICEME_ERROR_CODES: readonly ["protocol_mismatch", "cli_not_found", "cli_start_failed", "command_timeout", "request_cancelled", "invalid_params", "opencode_not_installed", "opencode_startup_timeout", "opencode_request_failed", "opencode_backend_not_running", "opencode_session_not_found", "copilot_not_installed", "copilot_auth_required", "copilot_execution_failed", "copilot_timeout", "json_invalid_input", "env_tool_not_found", "task_not_found", "task_already_exists", "invalid_schedule", "invalid_payload", "confirmation_required", "workspace_not_found", "daemon_not_running", "executor_timeout", "executor_error", "task_already_running", "not_found", "internal_error", "auth_not_logged_in", "auth_provider_not_registered", "device_not_enrolled", "toolbox_invalid_scope"];
936
+ export interface ServicemeErrorDetails {
937
+ code: ServicemeErrorCode;
938
+ message: string;
939
+ retryable: boolean;
940
+ details?: unknown;
941
+ }
942
+ export declare function isServicemeErrorCode(value: unknown): value is ServicemeErrorCode;
943
+ export declare function isServicemeErrorDetails(value: unknown): value is ServicemeErrorDetails;
944
+ export declare function isRetryableErrorCode(code: ServicemeErrorCode): boolean;
945
+ export declare class ServicemeProtocolError extends Error {
946
+ readonly code: ServicemeErrorCode;
947
+ readonly retryable: boolean;
948
+ readonly details?: unknown;
949
+ constructor(input: {
908
950
  code: ServicemeErrorCode;
909
951
  message: string;
910
- retryable: boolean;
952
+ retryable?: boolean;
911
953
  details?: unknown;
912
- }
913
- declare function isServicemeErrorCode(value: unknown): value is ServicemeErrorCode;
914
- declare function isServicemeErrorDetails(value: unknown): value is ServicemeErrorDetails;
915
- declare function isRetryableErrorCode(code: ServicemeErrorCode): boolean;
916
- declare class ServicemeProtocolError extends Error {
917
- readonly code: ServicemeErrorCode;
918
- readonly retryable: boolean;
919
- readonly details?: unknown;
920
- constructor(input: {
921
- code: ServicemeErrorCode;
922
- message: string;
923
- retryable?: boolean;
924
- details?: unknown;
925
- });
926
- toJSON(): ServicemeErrorDetails;
927
- }
928
- declare function createServicemeError(code: ServicemeErrorCode, message: string, details?: unknown): ServicemeProtocolError;
929
- declare function normalizeServicemeError(error: unknown, fallbackCode?: ServicemeErrorCode): ServicemeErrorDetails;
930
-
931
- interface ScheduledTasksConfigV1 {
932
- version: 1;
933
- tasks: ScheduledTaskV1[];
934
- }
935
- interface ScheduledTasksLogFile {
936
- logs: TaskExecutionLog[];
937
- }
938
- type ConcurrencyPolicy = "reject" | "parallel";
939
- type TaskTriggerType = "manual" | "schedule";
940
- interface TaskExecutionSnapshot {
941
- executionId: string;
942
- taskId: string;
943
- name: string;
944
- type: ScheduledTaskType;
945
- payload: TaskPayload;
946
- workspacePath: string;
947
- timeoutMs?: number;
948
- concurrencyPolicy?: ConcurrencyPolicy;
949
- metadata?: {
950
- trigger: TaskTriggerType;
951
- requestedAt: string;
952
- };
953
- }
954
- interface TaskExecuteResult {
955
- executionId: string;
956
- accepted: true;
957
- }
958
- interface TaskCancelResult {
959
- executionId: string;
960
- cancelled: boolean;
961
- }
962
- interface RunningTaskInfo {
963
- executionId: string;
964
- taskId: string;
965
- startedAt: string;
966
- }
967
- interface TaskListRunningResult {
968
- executions: RunningTaskInfo[];
969
- }
970
- interface TaskStartedEventParams {
971
- executionId: string;
972
- taskId: string;
973
- startedAt: string;
974
- }
975
- interface TaskOutputEventParams {
976
- executionId: string;
977
- stream: "stdout" | "stderr";
978
- data: string;
979
- }
980
- interface TaskCompletedEventParams {
981
- executionId: string;
982
- log: TaskExecutionLog;
983
- }
984
- interface TaskFailedEventParams {
985
- executionId: string;
986
- status: "failure" | "timeout";
987
- reason: "error" | "timeout";
988
- log: TaskExecutionLog;
989
- }
990
- interface TaskCancelledEventParams {
991
- executionId: string;
992
- log: TaskExecutionLog;
993
- }
994
- interface SchedulerStatus {
995
- running: boolean;
996
- pid: number | null;
997
- uptimeSeconds: number | null;
998
- tasksRegistered: number;
999
- tasksEnabled: number;
1000
- workspacePath: string;
1001
- pidFile: string;
1002
- }
1003
- interface ScheduleCreateResult {
1004
- task: ScheduledTask;
1005
- }
1006
- interface ScheduleListResult {
1007
- tasks: ScheduledTask[];
1008
- total: number;
1009
- }
1010
- interface ScheduleGetResult {
1011
- task: ScheduledTask;
1012
- }
1013
- interface ScheduleEditResult {
1014
- task: ScheduledTask;
1015
- }
1016
- interface ScheduleDeleteResult {
1017
- id: string;
1018
- name: string;
1019
- }
1020
- interface ScheduleToggleResult {
1021
- task: ScheduledTask;
1022
- }
1023
- interface ScheduleTriggerResult {
1024
- log: TaskExecutionLog;
1025
- }
1026
- interface ScheduleLogsResult {
1027
- logs: TaskExecutionLog[];
1028
- total: number;
1029
- }
1030
- interface SchedulerStartResult {
1031
- pid: number;
1032
- status: "started" | "already_running";
1033
- workspacePath: string;
1034
- }
1035
- interface SchedulerStopResult {
1036
- status: "stopped";
1037
- pid: number;
1038
- }
1039
- interface ScheduleCreateDryRunResult {
1040
- action: "create";
1041
- task: Omit<ScheduledTask, "id" | "createdAt" | "updatedAt">;
1042
- conflicts: string[];
1043
- }
1044
- interface ScheduleEditDryRunResult {
1045
- action: "edit";
1046
- before: ScheduledTask;
1047
- after: ScheduledTask;
1048
- diff: string[];
1049
- }
1050
- interface ScheduleDeleteDryRunResult {
1051
- action: "delete";
1052
- task: ScheduledTask;
1053
- }
1054
- declare function isScheduledTaskType(value: unknown): value is ScheduledTaskType;
954
+ });
955
+ toJSON(): ServicemeErrorDetails;
956
+ }
957
+ export declare function createServicemeError(code: ServicemeErrorCode, message: string, details?: unknown): ServicemeProtocolError;
958
+ export declare function normalizeServicemeError(error: unknown, fallbackCode?: ServicemeErrorCode): ServicemeErrorDetails;
959
+ //#endregion
960
+ //#region src/scheduled-tasks.d.ts
961
+ export interface ScheduledTasksConfigV1 {
962
+ version: 1;
963
+ tasks: ScheduledTaskV1[];
964
+ }
965
+ export interface ScheduledTasksLogFile {
966
+ logs: TaskExecutionLog[];
967
+ }
968
+ export type ConcurrencyPolicy = "reject" | "parallel";
969
+ export type TaskTriggerType = "manual" | "schedule";
970
+ export interface TaskExecutionSnapshot {
971
+ executionId: string;
972
+ taskId: string;
973
+ name: string;
974
+ type: ScheduledTaskType;
975
+ payload: TaskPayload;
976
+ workspacePath: string;
977
+ timeoutMs?: number;
978
+ concurrencyPolicy?: ConcurrencyPolicy;
979
+ metadata?: {
980
+ trigger: TaskTriggerType;
981
+ requestedAt: string;
982
+ };
983
+ }
984
+ export interface TaskExecuteResult {
985
+ executionId: string;
986
+ accepted: true;
987
+ }
988
+ export interface TaskCancelResult {
989
+ executionId: string;
990
+ cancelled: boolean;
991
+ }
992
+ export interface RunningTaskInfo {
993
+ executionId: string;
994
+ taskId: string;
995
+ startedAt: string;
996
+ }
997
+ export interface TaskListRunningResult {
998
+ executions: RunningTaskInfo[];
999
+ }
1000
+ export interface TaskStartedEventParams {
1001
+ executionId: string;
1002
+ taskId: string;
1003
+ startedAt: string;
1004
+ }
1005
+ export interface TaskOutputEventParams {
1006
+ executionId: string;
1007
+ stream: "stdout" | "stderr";
1008
+ data: string;
1009
+ }
1010
+ export interface TaskCompletedEventParams {
1011
+ executionId: string;
1012
+ log: TaskExecutionLog;
1013
+ }
1014
+ export interface TaskFailedEventParams {
1015
+ executionId: string;
1016
+ status: "failure" | "timeout";
1017
+ reason: "error" | "timeout";
1018
+ log: TaskExecutionLog;
1019
+ }
1020
+ export interface TaskCancelledEventParams {
1021
+ executionId: string;
1022
+ log: TaskExecutionLog;
1023
+ }
1024
+ export interface SchedulerStatus {
1025
+ running: boolean;
1026
+ pid: number | null;
1027
+ uptimeSeconds: number | null;
1028
+ tasksRegistered: number;
1029
+ tasksEnabled: number;
1030
+ workspacePath: string;
1031
+ pidFile: string;
1032
+ }
1033
+ export interface ScheduleCreateResult {
1034
+ task: ScheduledTask;
1035
+ }
1036
+ export interface ScheduleListResult {
1037
+ tasks: ScheduledTask[];
1038
+ total: number;
1039
+ }
1040
+ export interface ScheduleGetResult {
1041
+ task: ScheduledTask;
1042
+ }
1043
+ export interface ScheduleEditResult {
1044
+ task: ScheduledTask;
1045
+ }
1046
+ export interface ScheduleDeleteResult {
1047
+ id: string;
1048
+ name: string;
1049
+ }
1050
+ export interface ScheduleToggleResult {
1051
+ task: ScheduledTask;
1052
+ }
1053
+ export interface ScheduleTriggerResult {
1054
+ log: TaskExecutionLog;
1055
+ }
1056
+ export interface ScheduleLogsResult {
1057
+ logs: TaskExecutionLog[];
1058
+ total: number;
1059
+ }
1060
+ export interface SchedulerStartResult {
1061
+ pid: number;
1062
+ status: "started" | "already_running";
1063
+ workspacePath: string;
1064
+ }
1065
+ export interface SchedulerStopResult {
1066
+ status: "stopped";
1067
+ pid: number;
1068
+ }
1069
+ export interface ScheduleCreateDryRunResult {
1070
+ action: "create";
1071
+ task: Omit<ScheduledTask, "id" | "createdAt" | "updatedAt">;
1072
+ conflicts: string[];
1073
+ }
1074
+ export interface ScheduleEditDryRunResult {
1075
+ action: "edit";
1076
+ before: ScheduledTask;
1077
+ after: ScheduledTask;
1078
+ diff: string[];
1079
+ }
1080
+ export interface ScheduleDeleteDryRunResult {
1081
+ action: "delete";
1082
+ task: ScheduledTask;
1083
+ }
1084
+ export declare function isScheduledTaskType(value: unknown): value is ScheduledTaskType;
1055
1085
  /**
1056
1086
  * Validates a v1 task shape (no `workspace`). Used for reading legacy config
1057
1087
  * during migration only. New code should validate against {@link ScheduledTask}
1058
1088
  * with {@link isScheduledTask}.
1059
1089
  */
1060
- declare function isScheduledTaskV1(value: unknown): value is ScheduledTaskV1;
1090
+ export declare function isScheduledTaskV1(value: unknown): value is ScheduledTaskV1;
1061
1091
  /** Validates a {@link TaskWorkspaceRef} payload. */
1062
- declare function isTaskWorkspaceRef(value: unknown): value is TaskWorkspaceRef;
1092
+ export declare function isTaskWorkspaceRef(value: unknown): value is TaskWorkspaceRef;
1063
1093
  /** Validates a v2 task shape. Requires the `workspace` field. */
1064
- declare function isScheduledTask(value: unknown): value is ScheduledTask;
1094
+ export declare function isScheduledTask(value: unknown): value is ScheduledTask;
1065
1095
  /** Validates a v2 {@link ScheduledTasksConfig} (version: 2). */
1066
- declare function isScheduledTasksConfig(value: unknown): value is ScheduledTasksConfig;
1096
+ export declare function isScheduledTasksConfig(value: unknown): value is ScheduledTasksConfig;
1067
1097
  /** Validates a v1 {@link ScheduledTasksConfigV1} (version: 1). */
1068
- declare function isScheduledTasksConfigV1(value: unknown): value is ScheduledTasksConfigV1;
1069
- declare function isTaskExecutionLog(value: unknown): value is TaskExecutionLog;
1070
- declare function isSchedulerStatus(value: unknown): value is SchedulerStatus;
1071
- declare function isTaskExecuteResult(value: unknown): value is TaskExecuteResult;
1072
- declare function isTaskCancelResult(value: unknown): value is TaskCancelResult;
1073
- declare function isTaskListRunningResult(value: unknown): value is TaskListRunningResult;
1074
- declare function isTaskStartedEventParams(value: unknown): value is TaskStartedEventParams;
1075
- declare function isTaskOutputEventParams(value: unknown): value is TaskOutputEventParams;
1076
- declare function isTaskCompletedEventParams(value: unknown): value is TaskCompletedEventParams;
1077
- declare function isTaskFailedEventParams(value: unknown): value is TaskFailedEventParams;
1078
- declare function isTaskCancelledEventParams(value: unknown): value is TaskCancelledEventParams;
1079
- type AgentSessionStatus = "idle" | "running" | "needs-input" | "completed" | "failed" | "aborted";
1080
- declare function isAgentSessionStatus(value: unknown): value is AgentSessionStatus;
1098
+ export declare function isScheduledTasksConfigV1(value: unknown): value is ScheduledTasksConfigV1;
1099
+ export declare function isTaskExecutionLog(value: unknown): value is TaskExecutionLog;
1100
+ export declare function isSchedulerStatus(value: unknown): value is SchedulerStatus;
1101
+ export declare function isTaskExecuteResult(value: unknown): value is TaskExecuteResult;
1102
+ export declare function isTaskCancelResult(value: unknown): value is TaskCancelResult;
1103
+ export declare function isTaskListRunningResult(value: unknown): value is TaskListRunningResult;
1104
+ export declare function isTaskStartedEventParams(value: unknown): value is TaskStartedEventParams;
1105
+ export declare function isTaskOutputEventParams(value: unknown): value is TaskOutputEventParams;
1106
+ export declare function isTaskCompletedEventParams(value: unknown): value is TaskCompletedEventParams;
1107
+ export declare function isTaskFailedEventParams(value: unknown): value is TaskFailedEventParams;
1108
+ export declare function isTaskCancelledEventParams(value: unknown): value is TaskCancelledEventParams;
1109
+ export type AgentSessionStatus = "idle" | "running" | "needs-input" | "completed" | "failed" | "aborted";
1110
+ export declare function isAgentSessionStatus(value: unknown): value is AgentSessionStatus;
1081
1111
  /**
1082
1112
  * Result of a single v1→v2 migration. `task` is included for callers that
1083
1113
  * want to log it; `issues` lists soft validation problems (e.g. unknown task
1084
1114
  * type) so the migration scanner can surface diagnostics without aborting.
1085
1115
  */
1086
- interface MigratedTask {
1087
- task: ScheduledTask;
1088
- /** Soft warnings about the migrated task. Empty for clean migrations. */
1089
- issues: string[];
1116
+ export interface MigratedTask {
1117
+ task: ScheduledTask;
1118
+ /** Soft warnings about the migrated task. Empty for clean migrations. */
1119
+ issues: string[];
1090
1120
  }
1091
1121
  /**
1092
1122
  * Converts a single v1 task to v2 by attaching the given workspace context.
@@ -1097,7 +1127,7 @@ interface MigratedTask {
1097
1127
  * lacked. Callers (e.g. `MigrateToGlobal`) build this from the file location
1098
1128
  * of the v1 config plus auto-probed git metadata.
1099
1129
  */
1100
- declare function migrateTaskV1ToV2(v1: ScheduledTaskV1, workspace: TaskWorkspaceRef): MigratedTask;
1130
+ export declare function migrateTaskV1ToV2(v1: ScheduledTaskV1, workspace: TaskWorkspaceRef): MigratedTask;
1101
1131
  /**
1102
1132
  * Converts a v1 config (from a single per-workspace file) to a v2 config
1103
1133
  * (the global config). Every v1 task inherits the supplied workspace context
@@ -1107,11 +1137,12 @@ declare function migrateTaskV1ToV2(v1: ScheduledTaskV1, workspace: TaskWorkspace
1107
1137
  * Tasks with structural issues (unknown task type) are still migrated but
1108
1138
  * surface a non-fatal issue string.
1109
1139
  */
1110
- declare function migrateV1ToV2(v1Config: ScheduledTasksConfigV1, workspace: TaskWorkspaceRef): {
1111
- config: ScheduledTasksConfig;
1112
- issues: string[];
1140
+ export declare function migrateV1ToV2(v1Config: ScheduledTasksConfigV1, workspace: TaskWorkspaceRef): {
1141
+ config: ScheduledTasksConfig;
1142
+ issues: string[];
1113
1143
  };
1114
-
1144
+ //#endregion
1145
+ //#region src/toolbox.d.ts
1115
1146
  /**
1116
1147
  * Toolbox protocol — Phase 5.1 cross-process contract.
1117
1148
  *
@@ -1136,8 +1167,8 @@ declare function migrateV1ToV2(v1Config: ScheduledTasksConfigV1, workspace: Task
1136
1167
  * `toolbox.list` without `--scope` defaults to `user` per
1137
1168
  * `3.功能拆分.md` (对齐 skill/agent "个人优先" 惯例).
1138
1169
  */
1139
- type ToolboxScope = "user" | "workspace";
1140
- declare const TOOLBOX_SCOPES: readonly ToolboxScope[];
1170
+ export type ToolboxScope = "user" | "workspace";
1171
+ export declare const TOOLBOX_SCOPES: readonly ToolboxScope[];
1141
1172
  /**
1142
1173
  * Single toolbox entry — matches the extension's
1143
1174
  * `apps/extension/src/config/external-tools.ts` shape and lets users
@@ -1147,25 +1178,25 @@ declare const TOOLBOX_SCOPES: readonly ToolboxScope[];
1147
1178
  * only reordered). `order` is the user-defined sort position; absent
1148
1179
  * means "append".
1149
1180
  */
1150
- interface ExternalTool {
1151
- id: string;
1152
- name: string;
1153
- description: string;
1154
- icon: string;
1155
- url: string;
1156
- isDefault?: boolean;
1157
- order?: number;
1158
- /** Scope this entry belongs to; omitted entries default to `user`. */
1159
- scope?: ToolboxScope;
1160
- /** ISO timestamp of last use — drives "recently used" sort. */
1161
- lastUsedAt?: string;
1181
+ export interface ExternalTool {
1182
+ id: string;
1183
+ name: string;
1184
+ description: string;
1185
+ icon: string;
1186
+ url: string;
1187
+ isDefault?: boolean;
1188
+ order?: number;
1189
+ /** Scope this entry belongs to; omitted entries default to `user`. */
1190
+ scope?: ToolboxScope;
1191
+ /** ISO timestamp of last use — drives "recently used" sort. */
1192
+ lastUsedAt?: string;
1162
1193
  }
1163
1194
  /**
1164
1195
  * Snapshot of all toolbox entries in one scope (returned by `toolbox.list`).
1165
1196
  */
1166
- interface ToolboxList {
1167
- scope: ToolboxScope;
1168
- tools: ExternalTool[];
1197
+ export interface ToolboxList {
1198
+ scope: ToolboxScope;
1199
+ tools: ExternalTool[];
1169
1200
  }
1170
1201
  /**
1171
1202
  * Patch payload for `toolbox.update`.
@@ -1174,371 +1205,380 @@ interface ToolboxList {
1174
1205
  * tools for anything other than `order` (matches the current
1175
1206
  * `ToolBoxService.updateExternalTool` rule).
1176
1207
  */
1177
- type ExternalToolPatch = Partial<Omit<ExternalTool, "id">>;
1208
+ export type ExternalToolPatch = Partial<Omit<ExternalTool, "id">>;
1178
1209
  /** `toolbox.list` — list entries of one scope. */
1179
- interface ToolboxListParams {
1180
- scope?: ToolboxScope;
1210
+ export interface ToolboxListParams {
1211
+ scope?: ToolboxScope;
1181
1212
  }
1182
- type ToolboxListResult = ToolboxList;
1213
+ export type ToolboxListResult = ToolboxList;
1183
1214
  /** `toolbox.add` — append a non-default entry to the requested scope. */
1184
- type ToolboxAddParams = ExternalTool;
1185
- interface ToolboxAddResult {
1186
- scope: ToolboxScope;
1187
- tool: ExternalTool;
1215
+ export type ToolboxAddParams = ExternalTool;
1216
+ export interface ToolboxAddResult {
1217
+ scope: ToolboxScope;
1218
+ tool: ExternalTool;
1188
1219
  }
1189
1220
  /** `toolbox.remove` — delete one entry by id. */
1190
- interface ToolboxRemoveParams {
1191
- id: string;
1192
- scope?: ToolboxScope;
1221
+ export interface ToolboxRemoveParams {
1222
+ id: string;
1223
+ scope?: ToolboxScope;
1193
1224
  }
1194
- interface ToolboxRemoveResult {
1195
- scope: ToolboxScope;
1196
- toolId: string;
1197
- success: boolean;
1225
+ export interface ToolboxRemoveResult {
1226
+ scope: ToolboxScope;
1227
+ toolId: string;
1228
+ success: boolean;
1198
1229
  }
1199
1230
  /** `toolbox.update` — patch one entry by id. */
1200
- interface ToolboxUpdateParams {
1201
- id: string;
1202
- patch: ExternalToolPatch;
1203
- scope?: ToolboxScope;
1204
- }
1205
- interface ToolboxUpdateResult {
1206
- scope: ToolboxScope;
1207
- tool: ExternalTool;
1208
- }
1209
- declare function isToolboxScope(value: unknown): value is ToolboxScope;
1210
- declare function isExternalTool(value: unknown): value is ExternalTool;
1211
- declare function isExternalToolPatch(value: unknown): value is ExternalToolPatch;
1212
- declare function isToolboxList(value: unknown): value is ToolboxList;
1213
- declare function isToolboxListParams(value: unknown): value is ToolboxListParams;
1214
- declare function isToolboxAddParams(value: unknown): value is ToolboxAddParams;
1215
- declare function isToolboxAddResult(value: unknown): value is ToolboxAddResult;
1216
- declare function isToolboxRemoveParams(value: unknown): value is ToolboxRemoveParams;
1217
- declare function isToolboxRemoveResult(value: unknown): value is ToolboxRemoveResult;
1218
- declare function isToolboxUpdateParams(value: unknown): value is ToolboxUpdateParams;
1219
- declare function isToolboxUpdateResult(value: unknown): value is ToolboxUpdateResult;
1220
-
1221
- declare const SERVICEME_PROTOCOL_VERSION: 2;
1222
- type SupportedBridgeProtocolVersion = 1 | 2;
1223
- interface BridgeCapabilities {
1224
- bridge: true;
1225
- json: 1;
1226
- env: 1;
1227
- tasks?: 1;
1228
- /** v2 skill/agent repo catalog: list, install, manage drafts. */
1229
- skillRepo?: 1;
1230
- /** v2 repo catalog: list, add, remove, enable, disable, sync. */
1231
- repoMgmt?: 1;
1232
- /** Declarative Copilot content reconciliation: status / restore / approve / migrateLegacy. */
1233
- copilotContent?: 1;
1234
- /** Auth domain (Phase 5.1): auth.status / login / logout / whoami / switch. */
1235
- auth?: 1;
1236
- /** Device domain (Phase 5.1): device.status / enroll / rotate-secret. */
1237
- device?: 1;
1238
- /** Toolbox domain (Phase 5.1): toolbox.list / add / remove / update. */
1239
- toolbox?: 1;
1240
- /**
1241
- * Read token bytes across the bridge (Phase 5.1, ADL-004).
1242
- *
1243
- * Default OFF. Only the Extension process ever advertises this bit.
1244
- * CLI must read tokens directly via OS keychain; it MUST NOT advertise
1245
- * `auth.tokenRead` even when its own auth realm is available.
1246
- */
1247
- "auth.tokenRead"?: 1;
1248
- }
1249
- declare function isBridgeCapabilities(value: unknown): value is BridgeCapabilities;
1250
- interface BridgeMethodMap {
1251
- "system.hello": {
1252
- params: {
1253
- clientName: string;
1254
- clientVersion: string;
1255
- wantedCapabilities?: string[];
1256
- };
1257
- result: {
1258
- cliVersion: string;
1259
- protocolVersion: SupportedBridgeProtocolVersion;
1260
- capabilities: BridgeCapabilities;
1261
- pid: number;
1262
- };
1263
- };
1264
- "system.ping": {
1265
- params: Record<string, never>;
1266
- result: {
1267
- now: string;
1268
- };
1269
- };
1270
- "system.shutdown": {
1271
- params: Record<string, never>;
1272
- result: {
1273
- shuttingDown: true;
1274
- };
1275
- };
1276
- "task.execute": {
1277
- params: TaskExecutionSnapshot;
1278
- result: TaskExecuteResult;
1279
- };
1280
- "task.cancel": {
1281
- params: {
1282
- executionId: string;
1283
- };
1284
- result: TaskCancelResult;
1285
- };
1286
- "task.list-running": {
1287
- params: Record<string, never>;
1288
- result: TaskListRunningResult;
1289
- };
1290
- /**
1291
- * Canonical name is `copilotContent.*`; `skillRepo.*` is kept as a
1292
- * legacy alias for older bridge peers. New callers must use the
1293
- * canonical names (see COPILOT_CONTENT_METHOD_ALIASES).
1294
- */
1295
- "copilotContent.list": {
1296
- params: SkillRepoListParams;
1297
- result: SkillRepoListResult;
1298
- };
1299
- "copilotContent.get": {
1300
- params: SkillRepoGetParams;
1301
- result: SkillRepoGetResult;
1302
- };
1303
- "copilotContent.install": {
1304
- params: SkillRepoInstallParams;
1305
- result: SkillRepoInstallResult;
1306
- };
1307
- "copilotContent.convertToSymlink": {
1308
- params: SkillRepoConvertToSymlinkParams;
1309
- result: SkillRepoConvertToSymlinkResult;
1310
- };
1311
- "copilotContent.uninstall": {
1312
- params: SkillRepoUninstallParams;
1313
- result: SkillRepoUninstallResult;
1314
- };
1315
- "copilotContent.setEntryEnabled": {
1316
- params: SkillRepoSetEntryEnabledParams;
1317
- result: SkillRepoSetEntryEnabledResult;
1318
- };
1319
- "copilotContent.listLinked": {
1320
- params: SkillRepoListLinkedParams;
1321
- result: SkillRepoListLinkedResult;
1322
- };
1323
- "copilotContent.draft.create": {
1324
- params: SkillRepoDraftCreateParams;
1325
- result: SkillRepoDraftCreateResult;
1326
- };
1327
- "copilotContent.draft.commit": {
1328
- params: SkillRepoDraftCommitParams;
1329
- result: SkillRepoDraftCommitResult;
1330
- };
1331
- "copilotContent.draft.list": {
1332
- params: SkillRepoDraftListParams;
1333
- result: SkillRepoDraftListResult;
1334
- };
1335
- "copilotContent.draft.delete": {
1336
- params: SkillRepoDraftDeleteParams;
1337
- result: SkillRepoDraftDeleteResult;
1338
- };
1339
- "skillRepo.list": {
1340
- params: SkillRepoListParams;
1341
- result: SkillRepoListResult;
1342
- };
1343
- "skillRepo.get": {
1344
- params: SkillRepoGetParams;
1345
- result: SkillRepoGetResult;
1346
- };
1347
- "skillRepo.install": {
1348
- params: SkillRepoInstallParams;
1349
- result: SkillRepoInstallResult;
1350
- };
1351
- "skillRepo.convertToSymlink": {
1352
- params: SkillRepoConvertToSymlinkParams;
1353
- result: SkillRepoConvertToSymlinkResult;
1354
- };
1355
- "skillRepo.uninstall": {
1356
- params: SkillRepoUninstallParams;
1357
- result: SkillRepoUninstallResult;
1358
- };
1359
- "skillRepo.setEntryEnabled": {
1360
- params: SkillRepoSetEntryEnabledParams;
1361
- result: SkillRepoSetEntryEnabledResult;
1362
- };
1363
- "skillRepo.listLinked": {
1364
- params: SkillRepoListLinkedParams;
1365
- result: SkillRepoListLinkedResult;
1366
- };
1367
- "skillRepo.draft.create": {
1368
- params: SkillRepoDraftCreateParams;
1369
- result: SkillRepoDraftCreateResult;
1370
- };
1371
- "skillRepo.draft.commit": {
1372
- params: SkillRepoDraftCommitParams;
1373
- result: SkillRepoDraftCommitResult;
1374
- };
1375
- "skillRepo.draft.list": {
1376
- params: SkillRepoDraftListParams;
1377
- result: SkillRepoDraftListResult;
1378
- };
1379
- "skillRepo.draft.delete": {
1380
- params: SkillRepoDraftDeleteParams;
1381
- result: SkillRepoDraftDeleteResult;
1382
- };
1383
- "repo.list": {
1384
- params: RepoListParams;
1385
- result: RepoListResult;
1386
- };
1387
- "repo.add": {
1388
- params: RepoAddParams;
1389
- result: RepoAddResult;
1390
- };
1391
- "repo.remove": {
1392
- params: RepoRemoveParams;
1393
- result: RepoRemoveResult;
1394
- };
1395
- "repo.enable": {
1396
- params: RepoEnableParams;
1397
- result: RepoEnableResult;
1398
- };
1399
- "repo.disable": {
1400
- params: RepoDisableParams;
1401
- result: RepoDisableResult;
1402
- };
1403
- "repo.update": {
1404
- params: RepoUpdateParams;
1405
- result: RepoUpdateResult;
1406
- };
1407
- "repo.sync": {
1408
- params: RepoSyncParams;
1409
- result: RepoSyncResult;
1410
- };
1411
- "repo.syncAll": {
1412
- params: RepoSyncAllParams;
1413
- result: RepoSyncAllResult;
1414
- };
1415
- "repo.resetParseCache": {
1416
- params: RepoResetParseCacheParams;
1417
- result: RepoResetParseCacheResult;
1418
- };
1419
- "copilotContent.status": {
1420
- params: CopilotContentStatusParams;
1421
- result: CopilotContentStatusResult;
1422
- };
1423
- "copilotContent.restore": {
1424
- params: CopilotContentRestoreParams;
1425
- result: CopilotContentRestoreResult;
1426
- };
1427
- "copilotContent.approve": {
1428
- params: CopilotContentApproveParams;
1429
- result: CopilotContentApproveResult;
1430
- };
1431
- "copilotContent.migrateLegacy": {
1432
- params: CopilotContentMigrateLegacyParams;
1433
- result: CopilotContentMigrateLegacyResult;
1434
- };
1435
- "copilotContent.integrationStatus": {
1436
- params: CopilotContentIntegrationStatusParams;
1437
- result: CopilotContentIntegrationStatusResult;
1438
- };
1439
- "copilotContent.customizations.list": {
1440
- params: CopilotCustomizationsListParams;
1441
- result: CopilotCustomizationsListResult;
1442
- };
1443
- "copilotPlugin.list": {
1444
- params: CopilotPluginListParams;
1445
- result: CopilotPluginListResult;
1446
- };
1447
- "copilotPlugin.register": {
1448
- params: CopilotPluginRegisterParams;
1449
- result: CopilotPluginRegisterResult;
1450
- };
1451
- "copilotPlugin.unregister": {
1452
- params: CopilotPluginUnregisterParams;
1453
- result: CopilotPluginUnregisterResult;
1454
- };
1455
- "copilotContent.package.install": {
1456
- params: CopilotPackageInstallParams;
1457
- result: CopilotPackageInstallResult;
1458
- };
1459
- "copilotContent.package.update": {
1460
- params: CopilotPackageUpdateParams;
1461
- result: CopilotPackageUpdateResult;
1462
- };
1463
- "copilotContent.package.uninstall": {
1464
- params: CopilotPackageUninstallParams;
1465
- result: CopilotPackageUninstallResult;
1466
- };
1467
- "copilotContent.package.move": {
1468
- params: CopilotPackageMoveParams;
1469
- result: CopilotPackageMoveResult;
1470
- };
1471
- "copilotContent.legacy.preview": {
1472
- params: CopilotLegacyPreviewParams;
1473
- result: CopilotLegacyPreviewResult;
1474
- };
1475
- "copilotContent.legacy.migrate": {
1476
- params: CopilotLegacyMigrateParams;
1477
- result: CopilotLegacyMigrateResult;
1478
- };
1479
- "copilotContent.sources.list": {
1480
- params: CopilotSourceListParams;
1481
- result: CopilotSourceListResult;
1482
- };
1483
- "copilotContent.sources.remove": {
1484
- params: CopilotSourceRemoveParams;
1485
- result: CopilotSourceRemoveResult;
1486
- };
1487
- "copilotContent.package.previewUpdate": {
1488
- params: CopilotUpdatePreviewParams;
1489
- result: CopilotUpdatePreviewResult;
1490
- };
1491
- "auth.status": {
1492
- params: Record<string, never>;
1493
- result: AuthStatus;
1494
- };
1495
- "auth.login": {
1496
- params: AuthLoginParams;
1497
- result: AuthLoginResult;
1498
- };
1499
- "auth.logout": {
1500
- params: AuthLogoutParams;
1501
- result: AuthLogoutResult;
1502
- };
1503
- "auth.whoami": {
1504
- params: Record<string, never>;
1505
- result: AuthWhoamiResult;
1506
- };
1507
- "auth.switch": {
1508
- params: AuthSwitchParams;
1509
- result: AuthSwitchResult;
1510
- };
1511
- "device.status": {
1512
- params: Record<string, never>;
1513
- result: DeviceStatus;
1514
- };
1515
- "device.enroll": {
1516
- params: DeviceEnrollParams;
1517
- result: DeviceEnrollResult;
1518
- };
1519
- "device.rotate-secret": {
1520
- params: DeviceRotateSecretParams;
1521
- result: DeviceRotateSecretResult;
1522
- };
1523
- "toolbox.list": {
1524
- params: ToolboxListParams;
1525
- result: ToolboxListResult;
1526
- };
1527
- "toolbox.add": {
1528
- params: ToolboxAddParams;
1529
- result: ToolboxAddResult;
1530
- };
1531
- "toolbox.remove": {
1532
- params: ToolboxRemoveParams;
1533
- result: ToolboxRemoveResult;
1534
- };
1535
- "toolbox.update": {
1536
- params: ToolboxUpdateParams;
1537
- result: ToolboxUpdateResult;
1538
- };
1539
- }
1540
- declare const BRIDGE_METHODS: readonly ["system.hello", "system.ping", "system.shutdown", "task.execute", "task.cancel", "task.list-running", "copilotContent.list", "copilotContent.get", "copilotContent.install", "copilotContent.convertToSymlink", "copilotContent.uninstall", "copilotContent.setEntryEnabled", "copilotContent.listLinked", "copilotContent.draft.create", "copilotContent.draft.commit", "copilotContent.draft.list", "copilotContent.draft.delete", "skillRepo.list", "skillRepo.get", "skillRepo.install", "skillRepo.convertToSymlink", "skillRepo.uninstall", "skillRepo.setEntryEnabled", "skillRepo.listLinked", "skillRepo.draft.create", "skillRepo.draft.commit", "skillRepo.draft.list", "skillRepo.draft.delete", "repo.list", "repo.add", "repo.remove", "repo.enable", "repo.disable", "repo.update", "repo.sync", "repo.syncAll", "repo.resetParseCache", "copilotContent.status", "copilotContent.restore", "copilotContent.approve", "copilotContent.migrateLegacy", "copilotContent.integrationStatus", "copilotContent.customizations.list", "copilotContent.package.install", "copilotContent.package.update", "copilotContent.package.uninstall", "copilotContent.package.move", "copilotPlugin.list", "copilotPlugin.register", "copilotPlugin.unregister", "copilotContent.legacy.preview", "copilotContent.legacy.migrate", "copilotContent.sources.list", "copilotContent.sources.remove", "copilotContent.package.previewUpdate", "auth.status", "auth.login", "auth.logout", "auth.whoami", "auth.switch", "device.status", "device.enroll", "device.rotate-secret", "toolbox.list", "toolbox.add", "toolbox.remove", "toolbox.update"];
1541
- type BridgeMethod = keyof BridgeMethodMap;
1231
+ export interface ToolboxUpdateParams {
1232
+ id: string;
1233
+ patch: ExternalToolPatch;
1234
+ scope?: ToolboxScope;
1235
+ }
1236
+ export interface ToolboxUpdateResult {
1237
+ scope: ToolboxScope;
1238
+ tool: ExternalTool;
1239
+ }
1240
+ export declare function isToolboxScope(value: unknown): value is ToolboxScope;
1241
+ export declare function isExternalTool(value: unknown): value is ExternalTool;
1242
+ export declare function isExternalToolPatch(value: unknown): value is ExternalToolPatch;
1243
+ export declare function isToolboxList(value: unknown): value is ToolboxList;
1244
+ export declare function isToolboxListParams(value: unknown): value is ToolboxListParams;
1245
+ export declare function isToolboxAddParams(value: unknown): value is ToolboxAddParams;
1246
+ export declare function isToolboxAddResult(value: unknown): value is ToolboxAddResult;
1247
+ export declare function isToolboxRemoveParams(value: unknown): value is ToolboxRemoveParams;
1248
+ export declare function isToolboxRemoveResult(value: unknown): value is ToolboxRemoveResult;
1249
+ export declare function isToolboxUpdateParams(value: unknown): value is ToolboxUpdateParams;
1250
+ export declare function isToolboxUpdateResult(value: unknown): value is ToolboxUpdateResult;
1251
+ //#endregion
1252
+ //#region src/bridge.d.ts
1253
+ export declare const SERVICEME_PROTOCOL_VERSION: 2;
1254
+ export type SupportedBridgeProtocolVersion = 1 | 2;
1255
+ export interface BridgeCapabilities {
1256
+ bridge: true;
1257
+ json: 1;
1258
+ env: 1;
1259
+ tasks?: 1;
1260
+ /** v2 skill/agent repo catalog: list, install, manage drafts. */
1261
+ skillRepo?: 1;
1262
+ /** v2 repo catalog: list, add, remove, enable, disable, sync. */
1263
+ repoMgmt?: 1;
1264
+ /** Declarative Copilot content reconciliation: status / restore / approve / migrateLegacy. */
1265
+ copilotContent?: 1;
1266
+ /** Auth domain (Phase 5.1): auth.status / login / logout / whoami / switch. */
1267
+ auth?: 1;
1268
+ /** Device domain (Phase 5.1): device.status / enroll / rotate-secret. */
1269
+ device?: 1;
1270
+ /** Toolbox domain (Phase 5.1): toolbox.list / add / remove / update. */
1271
+ toolbox?: 1;
1272
+ /**
1273
+ * Read token bytes across the bridge (Phase 5.1, ADL-004).
1274
+ *
1275
+ * Default OFF. Only the Extension process ever advertises this bit.
1276
+ * CLI must read tokens directly via OS keychain; it MUST NOT advertise
1277
+ * `auth.tokenRead` even when its own auth realm is available.
1278
+ */
1279
+ "auth.tokenRead"?: 1;
1280
+ }
1281
+ export declare function isBridgeCapabilities(value: unknown): value is BridgeCapabilities;
1282
+ export interface BridgeMethodMap {
1283
+ "system.hello": {
1284
+ params: {
1285
+ clientName: string;
1286
+ clientVersion: string;
1287
+ wantedCapabilities?: string[];
1288
+ };
1289
+ result: {
1290
+ cliVersion: string;
1291
+ protocolVersion: SupportedBridgeProtocolVersion;
1292
+ capabilities: BridgeCapabilities;
1293
+ pid: number;
1294
+ };
1295
+ };
1296
+ "system.ping": {
1297
+ params: Record<string, never>;
1298
+ result: {
1299
+ now: string;
1300
+ };
1301
+ };
1302
+ "system.shutdown": {
1303
+ params: Record<string, never>;
1304
+ result: {
1305
+ shuttingDown: true;
1306
+ };
1307
+ };
1308
+ "task.execute": {
1309
+ params: TaskExecutionSnapshot;
1310
+ result: TaskExecuteResult;
1311
+ };
1312
+ "task.cancel": {
1313
+ params: {
1314
+ executionId: string;
1315
+ };
1316
+ result: TaskCancelResult;
1317
+ };
1318
+ "task.list-running": {
1319
+ params: Record<string, never>;
1320
+ result: TaskListRunningResult;
1321
+ };
1322
+ /**
1323
+ * Canonical name is `copilotContent.*`; `skillRepo.*` is kept as a
1324
+ * legacy alias for older bridge peers. New callers must use the
1325
+ * canonical names (see COPILOT_CONTENT_METHOD_ALIASES).
1326
+ */
1327
+ "copilotContent.list": {
1328
+ params: SkillRepoListParams;
1329
+ result: SkillRepoListResult;
1330
+ };
1331
+ "copilotContent.get": {
1332
+ params: SkillRepoGetParams;
1333
+ result: SkillRepoGetResult;
1334
+ };
1335
+ "copilotContent.install": {
1336
+ params: SkillRepoInstallParams;
1337
+ result: SkillRepoInstallResult;
1338
+ };
1339
+ "copilotContent.convertToSymlink": {
1340
+ params: SkillRepoConvertToSymlinkParams;
1341
+ result: SkillRepoConvertToSymlinkResult;
1342
+ };
1343
+ "copilotContent.uninstall": {
1344
+ params: SkillRepoUninstallParams;
1345
+ result: SkillRepoUninstallResult;
1346
+ };
1347
+ "copilotContent.setEntryEnabled": {
1348
+ params: SkillRepoSetEntryEnabledParams;
1349
+ result: SkillRepoSetEntryEnabledResult;
1350
+ };
1351
+ "copilotContent.detectUnmanaged": {
1352
+ params: CopilotContentDetectUnmanagedParams;
1353
+ result: CopilotContentDetectUnmanagedResult;
1354
+ };
1355
+ "copilotContent.adoptUnmanaged": {
1356
+ params: CopilotContentAdoptUnmanagedParams;
1357
+ result: CopilotContentAdoptUnmanagedResult;
1358
+ };
1359
+ "copilotContent.listLinked": {
1360
+ params: SkillRepoListLinkedParams;
1361
+ result: SkillRepoListLinkedResult;
1362
+ };
1363
+ "copilotContent.draft.create": {
1364
+ params: SkillRepoDraftCreateParams;
1365
+ result: SkillRepoDraftCreateResult;
1366
+ };
1367
+ "copilotContent.draft.commit": {
1368
+ params: SkillRepoDraftCommitParams;
1369
+ result: SkillRepoDraftCommitResult;
1370
+ };
1371
+ "copilotContent.draft.list": {
1372
+ params: SkillRepoDraftListParams;
1373
+ result: SkillRepoDraftListResult;
1374
+ };
1375
+ "copilotContent.draft.delete": {
1376
+ params: SkillRepoDraftDeleteParams;
1377
+ result: SkillRepoDraftDeleteResult;
1378
+ };
1379
+ "skillRepo.list": {
1380
+ params: SkillRepoListParams;
1381
+ result: SkillRepoListResult;
1382
+ };
1383
+ "skillRepo.get": {
1384
+ params: SkillRepoGetParams;
1385
+ result: SkillRepoGetResult;
1386
+ };
1387
+ "skillRepo.install": {
1388
+ params: SkillRepoInstallParams;
1389
+ result: SkillRepoInstallResult;
1390
+ };
1391
+ "skillRepo.convertToSymlink": {
1392
+ params: SkillRepoConvertToSymlinkParams;
1393
+ result: SkillRepoConvertToSymlinkResult;
1394
+ };
1395
+ "skillRepo.uninstall": {
1396
+ params: SkillRepoUninstallParams;
1397
+ result: SkillRepoUninstallResult;
1398
+ };
1399
+ "skillRepo.setEntryEnabled": {
1400
+ params: SkillRepoSetEntryEnabledParams;
1401
+ result: SkillRepoSetEntryEnabledResult;
1402
+ };
1403
+ "skillRepo.listLinked": {
1404
+ params: SkillRepoListLinkedParams;
1405
+ result: SkillRepoListLinkedResult;
1406
+ };
1407
+ "skillRepo.draft.create": {
1408
+ params: SkillRepoDraftCreateParams;
1409
+ result: SkillRepoDraftCreateResult;
1410
+ };
1411
+ "skillRepo.draft.commit": {
1412
+ params: SkillRepoDraftCommitParams;
1413
+ result: SkillRepoDraftCommitResult;
1414
+ };
1415
+ "skillRepo.draft.list": {
1416
+ params: SkillRepoDraftListParams;
1417
+ result: SkillRepoDraftListResult;
1418
+ };
1419
+ "skillRepo.draft.delete": {
1420
+ params: SkillRepoDraftDeleteParams;
1421
+ result: SkillRepoDraftDeleteResult;
1422
+ };
1423
+ "repo.list": {
1424
+ params: RepoListParams;
1425
+ result: RepoListResult;
1426
+ };
1427
+ "repo.add": {
1428
+ params: RepoAddParams;
1429
+ result: RepoAddResult;
1430
+ };
1431
+ "repo.remove": {
1432
+ params: RepoRemoveParams;
1433
+ result: RepoRemoveResult;
1434
+ };
1435
+ "repo.enable": {
1436
+ params: RepoEnableParams;
1437
+ result: RepoEnableResult;
1438
+ };
1439
+ "repo.disable": {
1440
+ params: RepoDisableParams;
1441
+ result: RepoDisableResult;
1442
+ };
1443
+ "repo.update": {
1444
+ params: RepoUpdateParams;
1445
+ result: RepoUpdateResult;
1446
+ };
1447
+ "repo.sync": {
1448
+ params: RepoSyncParams;
1449
+ result: RepoSyncResult;
1450
+ };
1451
+ "repo.syncAll": {
1452
+ params: RepoSyncAllParams;
1453
+ result: RepoSyncAllResult;
1454
+ };
1455
+ "repo.resetParseCache": {
1456
+ params: RepoResetParseCacheParams;
1457
+ result: RepoResetParseCacheResult;
1458
+ };
1459
+ "copilotContent.status": {
1460
+ params: CopilotContentStatusParams;
1461
+ result: CopilotContentStatusResult;
1462
+ };
1463
+ "copilotContent.restore": {
1464
+ params: CopilotContentRestoreParams;
1465
+ result: CopilotContentRestoreResult;
1466
+ };
1467
+ "copilotContent.approve": {
1468
+ params: CopilotContentApproveParams;
1469
+ result: CopilotContentApproveResult;
1470
+ };
1471
+ "copilotContent.migrateLegacy": {
1472
+ params: CopilotContentMigrateLegacyParams;
1473
+ result: CopilotContentMigrateLegacyResult;
1474
+ };
1475
+ "copilotContent.integrationStatus": {
1476
+ params: CopilotContentIntegrationStatusParams;
1477
+ result: CopilotContentIntegrationStatusResult;
1478
+ };
1479
+ "copilotContent.customizations.list": {
1480
+ params: CopilotCustomizationsListParams;
1481
+ result: CopilotCustomizationsListResult;
1482
+ };
1483
+ "copilotPlugin.list": {
1484
+ params: CopilotPluginListParams;
1485
+ result: CopilotPluginListResult;
1486
+ };
1487
+ "copilotPlugin.register": {
1488
+ params: CopilotPluginRegisterParams;
1489
+ result: CopilotPluginRegisterResult;
1490
+ };
1491
+ "copilotPlugin.unregister": {
1492
+ params: CopilotPluginUnregisterParams;
1493
+ result: CopilotPluginUnregisterResult;
1494
+ };
1495
+ "copilotContent.package.install": {
1496
+ params: CopilotPackageInstallParams;
1497
+ result: CopilotPackageInstallResult;
1498
+ };
1499
+ "copilotContent.package.update": {
1500
+ params: CopilotPackageUpdateParams;
1501
+ result: CopilotPackageUpdateResult;
1502
+ };
1503
+ "copilotContent.package.uninstall": {
1504
+ params: CopilotPackageUninstallParams;
1505
+ result: CopilotPackageUninstallResult;
1506
+ };
1507
+ "copilotContent.package.move": {
1508
+ params: CopilotPackageMoveParams;
1509
+ result: CopilotPackageMoveResult;
1510
+ };
1511
+ "copilotContent.legacy.preview": {
1512
+ params: CopilotLegacyPreviewParams;
1513
+ result: CopilotLegacyPreviewResult;
1514
+ };
1515
+ "copilotContent.legacy.migrate": {
1516
+ params: CopilotLegacyMigrateParams;
1517
+ result: CopilotLegacyMigrateResult;
1518
+ };
1519
+ "copilotContent.sources.list": {
1520
+ params: CopilotSourceListParams;
1521
+ result: CopilotSourceListResult;
1522
+ };
1523
+ "copilotContent.sources.remove": {
1524
+ params: CopilotSourceRemoveParams;
1525
+ result: CopilotSourceRemoveResult;
1526
+ };
1527
+ "copilotContent.package.previewUpdate": {
1528
+ params: CopilotUpdatePreviewParams;
1529
+ result: CopilotUpdatePreviewResult;
1530
+ };
1531
+ "auth.status": {
1532
+ params: Record<string, never>;
1533
+ result: AuthStatus;
1534
+ };
1535
+ "auth.login": {
1536
+ params: AuthLoginParams;
1537
+ result: AuthLoginResult;
1538
+ };
1539
+ "auth.logout": {
1540
+ params: AuthLogoutParams;
1541
+ result: AuthLogoutResult;
1542
+ };
1543
+ "auth.whoami": {
1544
+ params: Record<string, never>;
1545
+ result: AuthWhoamiResult;
1546
+ };
1547
+ "auth.switch": {
1548
+ params: AuthSwitchParams;
1549
+ result: AuthSwitchResult;
1550
+ };
1551
+ "device.status": {
1552
+ params: Record<string, never>;
1553
+ result: DeviceStatus;
1554
+ };
1555
+ "device.enroll": {
1556
+ params: DeviceEnrollParams;
1557
+ result: DeviceEnrollResult;
1558
+ };
1559
+ "device.rotate-secret": {
1560
+ params: DeviceRotateSecretParams;
1561
+ result: DeviceRotateSecretResult;
1562
+ };
1563
+ "toolbox.list": {
1564
+ params: ToolboxListParams;
1565
+ result: ToolboxListResult;
1566
+ };
1567
+ "toolbox.add": {
1568
+ params: ToolboxAddParams;
1569
+ result: ToolboxAddResult;
1570
+ };
1571
+ "toolbox.remove": {
1572
+ params: ToolboxRemoveParams;
1573
+ result: ToolboxRemoveResult;
1574
+ };
1575
+ "toolbox.update": {
1576
+ params: ToolboxUpdateParams;
1577
+ result: ToolboxUpdateResult;
1578
+ };
1579
+ }
1580
+ export declare const BRIDGE_METHODS: readonly ["system.hello", "system.ping", "system.shutdown", "task.execute", "task.cancel", "task.list-running", "copilotContent.list", "copilotContent.get", "copilotContent.install", "copilotContent.convertToSymlink", "copilotContent.uninstall", "copilotContent.setEntryEnabled", "copilotContent.detectUnmanaged", "copilotContent.adoptUnmanaged", "copilotContent.listLinked", "copilotContent.draft.create", "copilotContent.draft.commit", "copilotContent.draft.list", "copilotContent.draft.delete", "skillRepo.list", "skillRepo.get", "skillRepo.install", "skillRepo.convertToSymlink", "skillRepo.uninstall", "skillRepo.setEntryEnabled", "skillRepo.listLinked", "skillRepo.draft.create", "skillRepo.draft.commit", "skillRepo.draft.list", "skillRepo.draft.delete", "repo.list", "repo.add", "repo.remove", "repo.enable", "repo.disable", "repo.update", "repo.sync", "repo.syncAll", "repo.resetParseCache", "copilotContent.status", "copilotContent.restore", "copilotContent.approve", "copilotContent.migrateLegacy", "copilotContent.integrationStatus", "copilotContent.customizations.list", "copilotContent.package.install", "copilotContent.package.update", "copilotContent.package.uninstall", "copilotContent.package.move", "copilotPlugin.list", "copilotPlugin.register", "copilotPlugin.unregister", "copilotContent.legacy.preview", "copilotContent.legacy.migrate", "copilotContent.sources.list", "copilotContent.sources.remove", "copilotContent.package.previewUpdate", "auth.status", "auth.login", "auth.logout", "auth.whoami", "auth.switch", "device.status", "device.enroll", "device.rotate-secret", "toolbox.list", "toolbox.add", "toolbox.remove", "toolbox.update"];
1581
+ export type BridgeMethod = keyof BridgeMethodMap;
1542
1582
  /**
1543
1583
  * Legacy `skillRepo.*` → canonical `copilotContent.*` method aliases.
1544
1584
  * Both names stay wire-compatible during the migration window; new
@@ -1546,413 +1586,422 @@ type BridgeMethod = keyof BridgeMethodMap;
1546
1586
  * spellings to the same handler and always answer with the method name
1547
1587
  * the request actually used.
1548
1588
  */
1549
- declare const COPILOT_CONTENT_METHOD_ALIASES: {
1550
- readonly "skillRepo.list": "copilotContent.list";
1551
- readonly "skillRepo.get": "copilotContent.get";
1552
- readonly "skillRepo.install": "copilotContent.install";
1553
- readonly "skillRepo.convertToSymlink": "copilotContent.convertToSymlink";
1554
- readonly "skillRepo.uninstall": "copilotContent.uninstall";
1555
- readonly "skillRepo.setEntryEnabled": "copilotContent.setEntryEnabled";
1556
- readonly "skillRepo.listLinked": "copilotContent.listLinked";
1557
- readonly "skillRepo.draft.create": "copilotContent.draft.create";
1558
- readonly "skillRepo.draft.commit": "copilotContent.draft.commit";
1559
- readonly "skillRepo.draft.list": "copilotContent.draft.list";
1560
- readonly "skillRepo.draft.delete": "copilotContent.draft.delete";
1589
+ export declare const COPILOT_CONTENT_METHOD_ALIASES: {
1590
+ readonly "skillRepo.list": "copilotContent.list";
1591
+ readonly "skillRepo.get": "copilotContent.get";
1592
+ readonly "skillRepo.install": "copilotContent.install";
1593
+ readonly "skillRepo.convertToSymlink": "copilotContent.convertToSymlink";
1594
+ readonly "skillRepo.uninstall": "copilotContent.uninstall";
1595
+ readonly "skillRepo.setEntryEnabled": "copilotContent.setEntryEnabled";
1596
+ readonly "skillRepo.listLinked": "copilotContent.listLinked";
1597
+ readonly "skillRepo.draft.create": "copilotContent.draft.create";
1598
+ readonly "skillRepo.draft.commit": "copilotContent.draft.commit";
1599
+ readonly "skillRepo.draft.list": "copilotContent.draft.list";
1600
+ readonly "skillRepo.draft.delete": "copilotContent.draft.delete";
1561
1601
  };
1562
1602
  /**
1563
1603
  * Normalize a legacy `skillRepo.*` method name to its canonical
1564
1604
  * `copilotContent.*` spelling. Unknown names pass through unchanged.
1565
1605
  */
1566
- declare function normalizeBridgeMethod(method: BridgeMethod): BridgeMethod;
1567
- type BridgeParams<M extends BridgeMethod> = BridgeMethodMap[M]["params"];
1568
- type BridgeResult<M extends BridgeMethod> = BridgeMethodMap[M]["result"];
1569
- interface BridgeEventMap {
1570
- "task.started": TaskStartedEventParams;
1571
- "task.output": TaskOutputEventParams;
1572
- "task.completed": TaskCompletedEventParams;
1573
- "task.failed": TaskFailedEventParams;
1574
- "task.cancelled": TaskCancelledEventParams;
1575
- }
1576
- declare const BRIDGE_EVENTS: readonly ["task.started", "task.output", "task.completed", "task.failed", "task.cancelled"];
1577
- type BridgeEventName = keyof BridgeEventMap;
1578
- type BridgeEventParams<E extends BridgeEventName> = BridgeEventMap[E];
1579
- interface BridgeRequest<M extends BridgeMethod = BridgeMethod> {
1580
- protocolVersion: SupportedBridgeProtocolVersion;
1581
- kind: "request";
1582
- id: string;
1583
- method: M;
1584
- params: BridgeParams<M>;
1585
- }
1586
- interface BridgeSuccessResponse<M extends BridgeMethod = BridgeMethod> {
1587
- protocolVersion: SupportedBridgeProtocolVersion;
1588
- kind: "response";
1589
- id: string;
1590
- ok: true;
1591
- result: BridgeResult<M>;
1592
- }
1593
- interface BridgeErrorResponse {
1594
- protocolVersion: SupportedBridgeProtocolVersion;
1595
- kind: "response";
1596
- id: string;
1597
- ok: false;
1598
- error: ServicemeErrorDetails;
1599
- }
1600
- type BridgeResponse<M extends BridgeMethod = BridgeMethod> = BridgeSuccessResponse<M> | BridgeErrorResponse;
1601
- interface BridgeEvent<E extends BridgeEventName = BridgeEventName> {
1602
- protocolVersion: SupportedBridgeProtocolVersion;
1603
- kind: "event";
1604
- event: E;
1605
- params: BridgeEventParams<E>;
1606
- }
1607
- type BridgeMessage = BridgeRequest | BridgeResponse | BridgeEvent;
1608
- declare function isSystemHelloResult(value: unknown): value is BridgeResult<"system.hello">;
1609
- declare function isSystemPingResult(value: unknown): value is BridgeResult<"system.ping">;
1610
- declare function isSystemShutdownResult(value: unknown): value is BridgeResult<"system.shutdown">;
1611
- declare function getBridgeResultValidator(method: BridgeMethod): ((value: unknown) => boolean) | undefined;
1612
- declare function getBridgeEventParamsValidator(event: BridgeEventName): ((value: unknown) => boolean) | undefined;
1613
- declare function isBridgeMethod(value: unknown): value is BridgeMethod;
1614
- declare function isBridgeEventName(value: unknown): value is BridgeEventName;
1615
- declare function isBridgeRequest(value: unknown): value is BridgeRequest;
1616
- declare function isBridgeResponse(value: unknown): value is BridgeResponse;
1617
- declare function isBridgeEvent(value: unknown): value is BridgeEvent;
1618
-
1619
- declare const SERVICEME_CLI_SCHEMA_VERSION: 1;
1620
- interface CliSuccess<T> {
1621
- schemaVersion: typeof SERVICEME_CLI_SCHEMA_VERSION;
1622
- ok: true;
1623
- data: T;
1624
- }
1625
- interface CliFailure {
1626
- schemaVersion: typeof SERVICEME_CLI_SCHEMA_VERSION;
1627
- ok: false;
1628
- error: ServicemeErrorDetails;
1629
- }
1630
- type CliEnvelope<T> = CliSuccess<T> | CliFailure;
1631
- declare function createCliSuccess<T>(data: T): CliSuccess<T>;
1632
- declare function createCliFailure(error: ServicemeErrorDetails): CliFailure;
1633
- declare function isCliEnvelope(value: unknown): value is CliEnvelope<unknown>;
1634
-
1635
- interface CopilotDoctorResult {
1636
- installed: boolean;
1637
- version: string | null;
1638
- authenticated: boolean;
1639
- }
1640
- interface CopilotPromptOptions {
1641
- prompt: string;
1642
- workspace?: string;
1643
- allowTools?: string[];
1644
- autopilot?: boolean;
1645
- timeout?: number;
1646
- model?: string;
1647
- agent?: string;
1648
- }
1649
- interface CopilotPromptResult {
1650
- output: string;
1651
- exitCode: number;
1652
- }
1653
- declare const COPILOT_ERROR_CODES: {
1654
- readonly NOT_INSTALLED: "copilot_not_installed";
1655
- readonly AUTH_REQUIRED: "copilot_auth_required";
1656
- readonly EXECUTION_FAILED: "copilot_execution_failed";
1657
- readonly TIMEOUT: "copilot_timeout";
1606
+ export declare function normalizeBridgeMethod(method: BridgeMethod): BridgeMethod;
1607
+ export type BridgeParams<M extends BridgeMethod> = BridgeMethodMap[M]["params"];
1608
+ export type BridgeResult<M extends BridgeMethod> = BridgeMethodMap[M]["result"];
1609
+ export interface BridgeEventMap {
1610
+ "task.started": TaskStartedEventParams;
1611
+ "task.output": TaskOutputEventParams;
1612
+ "task.completed": TaskCompletedEventParams;
1613
+ "task.failed": TaskFailedEventParams;
1614
+ "task.cancelled": TaskCancelledEventParams;
1615
+ }
1616
+ export declare const BRIDGE_EVENTS: readonly ["task.started", "task.output", "task.completed", "task.failed", "task.cancelled"];
1617
+ export type BridgeEventName = keyof BridgeEventMap;
1618
+ export type BridgeEventParams<E extends BridgeEventName> = BridgeEventMap[E];
1619
+ export interface BridgeRequest<M extends BridgeMethod = BridgeMethod> {
1620
+ protocolVersion: SupportedBridgeProtocolVersion;
1621
+ kind: "request";
1622
+ id: string;
1623
+ method: M;
1624
+ params: BridgeParams<M>;
1625
+ }
1626
+ export interface BridgeSuccessResponse<M extends BridgeMethod = BridgeMethod> {
1627
+ protocolVersion: SupportedBridgeProtocolVersion;
1628
+ kind: "response";
1629
+ id: string;
1630
+ ok: true;
1631
+ result: BridgeResult<M>;
1632
+ }
1633
+ export interface BridgeErrorResponse {
1634
+ protocolVersion: SupportedBridgeProtocolVersion;
1635
+ kind: "response";
1636
+ id: string;
1637
+ ok: false;
1638
+ error: ServicemeErrorDetails;
1639
+ }
1640
+ export type BridgeResponse<M extends BridgeMethod = BridgeMethod> = BridgeSuccessResponse<M> | BridgeErrorResponse;
1641
+ export interface BridgeEvent<E extends BridgeEventName = BridgeEventName> {
1642
+ protocolVersion: SupportedBridgeProtocolVersion;
1643
+ kind: "event";
1644
+ event: E;
1645
+ params: BridgeEventParams<E>;
1646
+ }
1647
+ export type BridgeMessage = BridgeRequest | BridgeResponse | BridgeEvent;
1648
+ export declare function isSystemHelloResult(value: unknown): value is BridgeResult<"system.hello">;
1649
+ export declare function isSystemPingResult(value: unknown): value is BridgeResult<"system.ping">;
1650
+ export declare function isSystemShutdownResult(value: unknown): value is BridgeResult<"system.shutdown">;
1651
+ export declare function getBridgeResultValidator(method: BridgeMethod): ((value: unknown) => boolean) | undefined;
1652
+ export declare function getBridgeEventParamsValidator(event: BridgeEventName): ((value: unknown) => boolean) | undefined;
1653
+ export declare function isBridgeMethod(value: unknown): value is BridgeMethod;
1654
+ export declare function isBridgeEventName(value: unknown): value is BridgeEventName;
1655
+ export declare function isBridgeRequest(value: unknown): value is BridgeRequest;
1656
+ export declare function isBridgeResponse(value: unknown): value is BridgeResponse;
1657
+ export declare function isBridgeEvent(value: unknown): value is BridgeEvent;
1658
+ //#endregion
1659
+ //#region src/cli.d.ts
1660
+ export declare const SERVICEME_CLI_SCHEMA_VERSION: 1;
1661
+ export interface CliSuccess<T> {
1662
+ schemaVersion: typeof SERVICEME_CLI_SCHEMA_VERSION;
1663
+ ok: true;
1664
+ data: T;
1665
+ }
1666
+ export interface CliFailure {
1667
+ schemaVersion: typeof SERVICEME_CLI_SCHEMA_VERSION;
1668
+ ok: false;
1669
+ error: ServicemeErrorDetails;
1670
+ }
1671
+ export type CliEnvelope<T> = CliSuccess<T> | CliFailure;
1672
+ export declare function createCliSuccess<T>(data: T): CliSuccess<T>;
1673
+ export declare function createCliFailure(error: ServicemeErrorDetails): CliFailure;
1674
+ export declare function isCliEnvelope(value: unknown): value is CliEnvelope<unknown>;
1675
+ //#endregion
1676
+ //#region src/copilot.d.ts
1677
+ export interface CopilotDoctorResult {
1678
+ installed: boolean;
1679
+ version: string | null;
1680
+ authenticated: boolean;
1681
+ }
1682
+ export interface CopilotPromptOptions {
1683
+ prompt: string;
1684
+ workspace?: string;
1685
+ allowTools?: string[];
1686
+ autopilot?: boolean;
1687
+ timeout?: number;
1688
+ model?: string;
1689
+ agent?: string;
1690
+ }
1691
+ export interface CopilotPromptResult {
1692
+ output: string;
1693
+ exitCode: number;
1694
+ }
1695
+ export declare const COPILOT_ERROR_CODES: {
1696
+ readonly NOT_INSTALLED: "copilot_not_installed";
1697
+ readonly AUTH_REQUIRED: "copilot_auth_required";
1698
+ readonly EXECUTION_FAILED: "copilot_execution_failed";
1699
+ readonly TIMEOUT: "copilot_timeout";
1658
1700
  };
1659
-
1660
- declare const KNOWN_ENVIRONMENT_TOOLS: readonly ["git", "node", "npm", "pnpm", "nvm", "nrm", "rtk", "codegraph", "ocx", "dotnet", "nuget"];
1661
- type KnownEnvironmentTool = (typeof KNOWN_ENVIRONMENT_TOOLS)[number];
1662
- interface ToolCheckResult {
1663
- installed: boolean;
1664
- version?: string;
1665
- path?: string;
1666
- error?: string;
1667
- }
1668
- type EnvironmentCheckResult = Record<KnownEnvironmentTool, ToolCheckResult>;
1669
- declare function isKnownEnvironmentTool(value: string): value is KnownEnvironmentTool;
1670
- declare function isToolCheckResult(value: unknown): value is ToolCheckResult;
1671
- declare function isEnvironmentCheckResult(value: unknown): value is EnvironmentCheckResult;
1672
-
1673
- type ServiceMeImageFormat = "jpeg" | "png" | "webp";
1674
- declare const SERVICEME_IMAGE_FORMATS: readonly ["jpeg", "png", "webp"];
1675
- interface ServiceMeImageCompressOptions {
1676
- quality: number;
1677
- replaceOriginImage: boolean;
1678
- outputPath?: string;
1679
- format?: ServiceMeImageFormat;
1680
- sharpModulePath?: string;
1681
- minimumCompressionRatio?: number;
1682
- }
1683
- interface ServiceMeImageCompressResult {
1684
- originalSize: number;
1685
- compressedSize: number;
1686
- compressionRatio: number;
1687
- outputPath: string;
1688
- }
1689
- interface ServiceMeImageInfo {
1690
- width: number;
1691
- height: number;
1692
- format: string;
1693
- size: number;
1694
- colorSpace?: string;
1695
- }
1696
- interface ServiceMeImageValidationResult {
1697
- valid: boolean;
1698
- }
1699
- declare function isServiceMeImageFormat(value: unknown): value is ServiceMeImageFormat;
1700
- declare function isServiceMeImageCompressOptions(value: unknown): value is ServiceMeImageCompressOptions;
1701
- declare function isServiceMeImageCompressResult(value: unknown): value is ServiceMeImageCompressResult;
1702
- declare function isServiceMeImageInfo(value: unknown): value is ServiceMeImageInfo;
1703
- declare function isServiceMeImageValidationResult(value: unknown): value is ServiceMeImageValidationResult;
1704
-
1705
- type JsonSortAlgorithm = "default" | "keyLength" | "alphaNum" | "values" | "type";
1706
- type JsonSortOrder = "asc" | "desc";
1707
- declare const JSON_SORT_ALGORITHMS: readonly ["default", "keyLength", "alphaNum", "values", "type"];
1708
- declare const JSON_SORT_ORDERS: readonly ["asc", "desc"];
1709
- interface JsonSortOptions {
1710
- sortOrder: JsonSortOrder;
1711
- sortAlgo: JsonSortAlgorithm;
1712
- }
1713
- interface JsonValidationResult {
1714
- valid: boolean;
1715
- error?: string;
1716
- }
1717
- declare const DEFAULT_JSON_SORT_OPTIONS: JsonSortOptions;
1718
- declare function isRecord(value: unknown): value is Record<string, unknown>;
1719
- declare function isJsonSortAlgorithm(value: unknown): value is JsonSortAlgorithm;
1720
- declare function isJsonSortOrder(value: unknown): value is JsonSortOrder;
1721
- declare function isJsonSortOptions(value: unknown): value is JsonSortOptions;
1722
- declare function isJsonValidationResult(value: unknown): value is JsonValidationResult;
1723
- declare function isJsonOutputResult(value: unknown): value is {
1724
- output: string;
1701
+ //#endregion
1702
+ //#region src/env.d.ts
1703
+ export declare const KNOWN_ENVIRONMENT_TOOLS: readonly ["git", "node", "npm", "pnpm", "nvm", "nrm", "rtk", "codegraph", "ocx", "dotnet", "nuget"];
1704
+ export type KnownEnvironmentTool = (typeof KNOWN_ENVIRONMENT_TOOLS)[number];
1705
+ export interface ToolCheckResult {
1706
+ installed: boolean;
1707
+ version?: string;
1708
+ path?: string;
1709
+ error?: string;
1710
+ }
1711
+ export type EnvironmentCheckResult = Record<KnownEnvironmentTool, ToolCheckResult>;
1712
+ export declare function isKnownEnvironmentTool(value: string): value is KnownEnvironmentTool;
1713
+ export declare function isToolCheckResult(value: unknown): value is ToolCheckResult;
1714
+ export declare function isEnvironmentCheckResult(value: unknown): value is EnvironmentCheckResult;
1715
+ //#endregion
1716
+ //#region src/image.d.ts
1717
+ export type ServiceMeImageFormat = "jpeg" | "png" | "webp";
1718
+ export declare const SERVICEME_IMAGE_FORMATS: readonly ["jpeg", "png", "webp"];
1719
+ export interface ServiceMeImageCompressOptions {
1720
+ quality: number;
1721
+ replaceOriginImage: boolean;
1722
+ outputPath?: string;
1723
+ format?: ServiceMeImageFormat;
1724
+ sharpModulePath?: string;
1725
+ minimumCompressionRatio?: number;
1726
+ }
1727
+ export interface ServiceMeImageCompressResult {
1728
+ originalSize: number;
1729
+ compressedSize: number;
1730
+ compressionRatio: number;
1731
+ outputPath: string;
1732
+ }
1733
+ export interface ServiceMeImageInfo {
1734
+ width: number;
1735
+ height: number;
1736
+ format: string;
1737
+ size: number;
1738
+ colorSpace?: string;
1739
+ }
1740
+ export interface ServiceMeImageValidationResult {
1741
+ valid: boolean;
1742
+ }
1743
+ export declare function isServiceMeImageFormat(value: unknown): value is ServiceMeImageFormat;
1744
+ export declare function isServiceMeImageCompressOptions(value: unknown): value is ServiceMeImageCompressOptions;
1745
+ export declare function isServiceMeImageCompressResult(value: unknown): value is ServiceMeImageCompressResult;
1746
+ export declare function isServiceMeImageInfo(value: unknown): value is ServiceMeImageInfo;
1747
+ export declare function isServiceMeImageValidationResult(value: unknown): value is ServiceMeImageValidationResult;
1748
+ //#endregion
1749
+ //#region src/json.d.ts
1750
+ export type JsonSortAlgorithm = "default" | "keyLength" | "alphaNum" | "values" | "type";
1751
+ export type JsonSortOrder = "asc" | "desc";
1752
+ export declare const JSON_SORT_ALGORITHMS: readonly ["default", "keyLength", "alphaNum", "values", "type"];
1753
+ export declare const JSON_SORT_ORDERS: readonly ["asc", "desc"];
1754
+ export interface JsonSortOptions {
1755
+ sortOrder: JsonSortOrder;
1756
+ sortAlgo: JsonSortAlgorithm;
1757
+ }
1758
+ export interface JsonValidationResult {
1759
+ valid: boolean;
1760
+ error?: string;
1761
+ }
1762
+ export declare const DEFAULT_JSON_SORT_OPTIONS: JsonSortOptions;
1763
+ export declare function isRecord(value: unknown): value is Record<string, unknown>;
1764
+ export declare function isJsonSortAlgorithm(value: unknown): value is JsonSortAlgorithm;
1765
+ export declare function isJsonSortOrder(value: unknown): value is JsonSortOrder;
1766
+ export declare function isJsonSortOptions(value: unknown): value is JsonSortOptions;
1767
+ export declare function isJsonValidationResult(value: unknown): value is JsonValidationResult;
1768
+ export declare function isJsonOutputResult(value: unknown): value is {
1769
+ output: string;
1725
1770
  };
1726
-
1771
+ //#endregion
1772
+ //#region src/marketplace.d.ts
1727
1773
  type MarketplaceSkillSource = "official" | "community";
1728
- interface MarketplaceSkillItem {
1729
- id: string;
1730
- name: string;
1731
- description: string;
1732
- version?: string;
1733
- updatedAt?: string;
1734
- source: MarketplaceSkillSource;
1735
- author?: string;
1736
- path: string;
1737
- hasScripts: boolean;
1738
- hasHooks: boolean;
1739
- categoryId?: string;
1740
- recommended?: boolean;
1741
- setupHint?: string;
1742
- }
1743
- interface MarketplaceCatalog {
1744
- skills: MarketplaceSkillItem[];
1745
- fetchedAt: string;
1746
- }
1747
- interface SkillDownloadFile {
1748
- /** Relative path within the skill folder (e.g. "SKILL.md", "scripts/helper.py") */
1749
- path: string;
1750
- content: string;
1751
- executable: boolean;
1752
- }
1753
- interface UploadFile {
1754
- /** Relative path within the skill/agent folder (e.g. "SKILL.md", "examples/demo.md") */
1755
- path: string;
1756
- content: string;
1757
- }
1758
- interface UploadSkillPayload {
1759
- name: string;
1760
- description: string;
1761
- version?: string;
1762
- content?: string;
1763
- localPath?: string;
1764
- files?: UploadFile[];
1765
- }
1766
- interface SubmitToOfficialPayload {
1767
- version?: string;
1768
- expectedOfficialVersion?: string;
1769
- }
1770
- interface SubmitToOfficialResult {
1771
- prUrl: string;
1772
- fromVersion?: string | null;
1773
- toVersion?: string;
1774
- }
1775
- interface LocalPublishableSkill {
1776
- id: string;
1777
- name: string;
1778
- description: string;
1779
- localPath: string;
1780
- scope: "workspace" | "user";
1781
- alreadyPublished: boolean;
1774
+ export interface MarketplaceSkillItem {
1775
+ id: string;
1776
+ name: string;
1777
+ description: string;
1778
+ version?: string;
1779
+ updatedAt?: string;
1780
+ source: MarketplaceSkillSource;
1781
+ author?: string;
1782
+ path: string;
1783
+ hasScripts: boolean;
1784
+ hasHooks: boolean;
1785
+ categoryId?: string;
1786
+ recommended?: boolean;
1787
+ setupHint?: string;
1788
+ }
1789
+ export interface MarketplaceCatalog {
1790
+ skills: MarketplaceSkillItem[];
1791
+ fetchedAt: string;
1792
+ }
1793
+ export interface SkillDownloadFile {
1794
+ /** Relative path within the skill folder (e.g. "SKILL.md", "scripts/helper.py") */
1795
+ path: string;
1796
+ content: string;
1797
+ executable: boolean;
1798
+ }
1799
+ export interface UploadFile {
1800
+ /** Relative path within the skill/agent folder (e.g. "SKILL.md", "examples/demo.md") */
1801
+ path: string;
1802
+ content: string;
1803
+ }
1804
+ export interface UploadSkillPayload {
1805
+ name: string;
1806
+ description: string;
1807
+ version?: string;
1808
+ content?: string;
1809
+ localPath?: string;
1810
+ files?: UploadFile[];
1811
+ }
1812
+ export interface SubmitToOfficialPayload {
1813
+ version?: string;
1814
+ expectedOfficialVersion?: string;
1815
+ }
1816
+ export interface SubmitToOfficialResult {
1817
+ prUrl: string;
1818
+ fromVersion?: string | null;
1819
+ toVersion?: string;
1820
+ }
1821
+ export interface LocalPublishableSkill {
1822
+ id: string;
1823
+ name: string;
1824
+ description: string;
1825
+ localPath: string;
1826
+ scope: "workspace" | "user";
1827
+ alreadyPublished: boolean;
1782
1828
  }
1783
1829
  type MarketplaceAgentSource = "official" | "community";
1784
- interface MarketplaceAgentItem {
1785
- id: string;
1786
- name: string;
1787
- description: string;
1788
- version?: string;
1789
- updatedAt?: string;
1790
- source: MarketplaceAgentSource;
1791
- author?: string;
1792
- path: string;
1793
- tools: string[];
1794
- categoryId?: string;
1795
- recommended?: boolean;
1796
- }
1797
- interface MarketplaceAgentsCatalog {
1798
- agents: MarketplaceAgentItem[];
1799
- fetchedAt: string;
1800
- }
1801
- interface AgentDownloadFile {
1802
- /** Relative path within the agent folder (e.g. "my-agent.agent.md", "tools/helper.py") */
1803
- path: string;
1804
- content: string;
1805
- executable: boolean;
1806
- }
1807
- interface UploadAgentPayload {
1808
- name: string;
1809
- description: string;
1810
- version?: string;
1811
- content?: string;
1812
- localPath?: string;
1813
- files?: UploadFile[];
1814
- }
1815
- interface LocalPublishableAgent {
1816
- id: string;
1817
- name: string;
1818
- description: string;
1819
- localPath: string;
1820
- scope: "workspace" | "user";
1821
- alreadyPublished: boolean;
1822
- }
1823
-
1824
- declare const SERVICEME_CLI_NAME = "serviceme";
1825
- declare const SERVICEME_CLI_VERSION = "2.0.0";
1826
- declare const SERVICEME_CLI_CAPABILITIES: {
1827
- readonly bridge: true;
1828
- readonly tasks: 1;
1829
- readonly json: 1;
1830
- readonly env: 1;
1831
- readonly image: 1;
1832
- readonly project: 1;
1830
+ export interface MarketplaceAgentItem {
1831
+ id: string;
1832
+ name: string;
1833
+ description: string;
1834
+ version?: string;
1835
+ updatedAt?: string;
1836
+ source: MarketplaceAgentSource;
1837
+ author?: string;
1838
+ path: string;
1839
+ tools: string[];
1840
+ categoryId?: string;
1841
+ recommended?: boolean;
1842
+ }
1843
+ export interface MarketplaceAgentsCatalog {
1844
+ agents: MarketplaceAgentItem[];
1845
+ fetchedAt: string;
1846
+ }
1847
+ export interface AgentDownloadFile {
1848
+ /** Relative path within the agent folder (e.g. "my-agent.agent.md", "tools/helper.py") */
1849
+ path: string;
1850
+ content: string;
1851
+ executable: boolean;
1852
+ }
1853
+ export interface UploadAgentPayload {
1854
+ name: string;
1855
+ description: string;
1856
+ version?: string;
1857
+ content?: string;
1858
+ localPath?: string;
1859
+ files?: UploadFile[];
1860
+ }
1861
+ export interface LocalPublishableAgent {
1862
+ id: string;
1863
+ name: string;
1864
+ description: string;
1865
+ localPath: string;
1866
+ scope: "workspace" | "user";
1867
+ alreadyPublished: boolean;
1868
+ }
1869
+ //#endregion
1870
+ //#region src/metadata.d.ts
1871
+ export declare const SERVICEME_CLI_NAME = "serviceme";
1872
+ export declare const SERVICEME_CLI_VERSION = "2.0.2";
1873
+ export declare const SERVICEME_CLI_CAPABILITIES: {
1874
+ readonly bridge: true;
1875
+ readonly tasks: 1;
1876
+ readonly json: 1;
1877
+ readonly env: 1;
1878
+ readonly image: 1;
1879
+ readonly project: 1;
1833
1880
  };
1834
-
1835
- interface ServiceMeProjectScaffoldPruneResult {
1836
- applied: boolean;
1837
- preset: string;
1838
- commands: string[];
1839
- }
1840
- interface ServiceMeProjectGitInitResult {
1841
- initialized: boolean;
1842
- command: string;
1843
- }
1844
- interface ServiceMeProjectMakeScriptsExecutableResult {
1845
- processedCount: number;
1846
- updatedCount: number;
1847
- platform: NodeJS.Platform;
1848
- scripts: string[];
1849
- }
1850
- interface ServiceMeProjectInstallDepsResult {
1851
- installed: boolean;
1852
- command: string;
1853
- }
1854
- interface ServiceMeProjectExtractTemplateInput {
1855
- extractedDirName: string;
1856
- projectFilePattern: string;
1857
- }
1858
- interface ServiceMeProjectExtractTemplateResult {
1859
- actualDirName: string;
1860
- }
1861
- declare function isServiceMeProjectScaffoldPruneResult(value: unknown): value is ServiceMeProjectScaffoldPruneResult;
1862
- declare function isServiceMeProjectGitInitResult(value: unknown): value is ServiceMeProjectGitInitResult;
1863
- declare function isServiceMeProjectMakeScriptsExecutableResult(value: unknown): value is ServiceMeProjectMakeScriptsExecutableResult;
1864
- declare function isServiceMeProjectInstallDepsResult(value: unknown): value is ServiceMeProjectInstallDepsResult;
1865
- declare function isServiceMeProjectExtractTemplateInput(value: unknown): value is ServiceMeProjectExtractTemplateInput;
1866
- declare function isServiceMeProjectExtractTemplateResult(value: unknown): value is ServiceMeProjectExtractTemplateResult;
1867
-
1868
- type SkillScope = "workspace" | "user";
1869
- type SkillOwnerKind = "builtin" | "external";
1870
- type SkillScopeStatus = "absent" | "available" | "installed" | "blocked" | "conflict";
1871
- type SkillMutationAction = "install" | "uninstall" | "move" | "removeExternal" | "publish" | "republish" | "submit-to-official";
1872
- interface SkillScopeState {
1873
- scope: SkillScope;
1874
- status: SkillScopeStatus;
1875
- kind?: SkillOwnerKind;
1876
- path?: string;
1877
- isInstalled: boolean;
1878
- canInstall: boolean;
1879
- canUninstall: boolean;
1880
- canRemove: boolean;
1881
- canMoveHere: boolean;
1882
- summary?: string;
1883
- }
1884
- interface SkillMarketplaceEntry {
1885
- id: string;
1886
- displayName: string;
1887
- description: string;
1888
- version: string;
1889
- updatedAt: string;
1890
- categoryId?: string;
1891
- enabled?: boolean;
1892
- isCatalogSkill: boolean;
1893
- recommended: boolean;
1894
- installCount: number;
1895
- requiresSetup?: boolean;
1896
- setupHint?: string;
1897
- homepage?: string;
1898
- ownerScope?: SkillScope;
1899
- ownerKind?: SkillOwnerKind;
1900
- hasConflict: boolean;
1901
- hasScripts?: boolean;
1902
- hasHooks?: boolean;
1903
- source?: "official" | "community" | "local";
1904
- localSkillPath?: string;
1905
- canPublish?: boolean;
1906
- workspaceState: SkillScopeState;
1907
- userState: SkillScopeState;
1908
- }
1909
- interface SkillMarketplaceState {
1910
- configPath: string;
1911
- userSkillsPath: string;
1912
- skills: SkillMarketplaceEntry[];
1913
- enabledSkillIds?: string[];
1914
- recommendedSkillIds?: string[];
1915
- onboardingRequired: boolean;
1916
- hasPersistedSelection: boolean;
1917
- workspaceOpen?: boolean;
1918
- }
1919
- interface SkillMutationRequest {
1920
- skillId: string;
1921
- targetScope: SkillScope;
1922
- action: SkillMutationAction;
1923
- confirmed?: boolean;
1924
- }
1925
- interface SkillMutationResult {
1926
- state: SkillMarketplaceState;
1927
- skillId: string;
1928
- targetScope: SkillScope;
1929
- action: SkillMutationAction;
1930
- changed: boolean;
1931
- status: "success" | "blocked" | "requires_confirmation";
1932
- message?: string;
1933
- hasScripts?: boolean;
1934
- hasHooks?: boolean;
1935
- prUrl?: string;
1936
- fromVersion?: string;
1937
- toVersion?: string;
1938
- }
1939
- interface SkillReconcileResult {
1940
- state: SkillMarketplaceState;
1941
- changed: boolean;
1942
- }
1943
- interface PublishableSkillEntry {
1944
- id: string;
1945
- displayName: string;
1946
- path: string;
1947
- version?: string;
1948
- }
1949
- interface SkillPublishableResult {
1950
- skills: PublishableSkillEntry[];
1951
- }
1952
- declare function isSkillMarketplaceState(value: unknown): value is SkillMarketplaceState;
1953
- declare function isSkillMutationRequest(value: unknown): value is SkillMutationRequest;
1954
- declare function isSkillMutationResult(value: unknown): value is SkillMutationResult;
1955
- declare function isSkillReconcileResult(value: unknown): value is SkillReconcileResult;
1956
- declare function isSkillPublishableResult(value: unknown): value is SkillPublishableResult;
1957
-
1958
- export { AUTH_PROVIDERS, type AgentDownloadFile, type AgentMarketplaceEntry, type AgentMarketplaceState, type AgentMutationAction, type AgentMutationRequest, type AgentMutationResult, type AgentOwnerKind, type AgentPermissionsResult, type AgentScope, type AgentScopeState, type AgentScopeStatus, type AgentSessionStatus, type AuthAccountMeta, type AuthLoginParams, type AuthLoginResult, type AuthLogoutParams, type AuthLogoutResult, type AuthProvider, type AuthSessionHandle, type AuthStatus, type AuthStatusParams, type AuthSwitchParams, type AuthSwitchResult, type AuthTokenEnvelope, type AuthWhoamiResult, BRIDGE_EVENTS, BRIDGE_METHODS, type BridgeCapabilities, type BridgeErrorResponse, type BridgeEvent, type BridgeEventMap, type BridgeEventName, type BridgeEventParams, type BridgeMessage, type BridgeMethod, type BridgeMethodMap, type BridgeParams, type BridgeRequest, type BridgeResponse, type BridgeResult, type BridgeSkillRepoDetail, type BridgeSuccessResponse, COPILOT_CONTENT_METHOD_ALIASES, COPILOT_ERROR_CODES, type CliEnvelope, type CliFailure, type CliSuccess, type ConcurrencyPolicy, type CopilotContentApproveParams, type CopilotContentApproveResult, type CopilotContentIntegrationKind, type CopilotContentIntegrationStatus, type CopilotContentIntegrationStatusParams, type CopilotContentIntegrationStatusResult, type CopilotContentMigrateLegacyParams, type CopilotContentMigrateLegacyResult, type CopilotContentRestoreParams, type CopilotContentRestoreResult, type CopilotContentStatus, type CopilotContentStatusParams, type CopilotContentStatusResult, type CopilotCustomizationsListParams, type CopilotCustomizationsListResult, type CopilotDoctorResult, type CopilotLegacyMigrateParams, type CopilotLegacyMigrateResult, type CopilotLegacyPreviewParams, type CopilotLegacyPreviewResult, type CopilotPackageInstallParams, type CopilotPackageInstallResult, type CopilotPackageMoveParams, type CopilotPackageMoveResult, type CopilotPackageUninstallParams, type CopilotPackageUninstallResult, type CopilotPackageUpdateParams, type CopilotPackageUpdateResult, type CopilotPluginListParams, type CopilotPluginListResult, type CopilotPluginRegisterParams, type CopilotPluginRegisterResult, type CopilotPluginRegistrationPayload, type CopilotPluginUnregisterParams, type CopilotPluginUnregisterResult, type CopilotPromptOptions, type CopilotPromptResult, type CopilotSourceListParams, type CopilotSourceListResult, type CopilotSourceRemoveParams, type CopilotSourceRemoveResult, type CopilotUpdatePreviewParams, type CopilotUpdatePreviewResult, DEFAULT_JSON_SORT_OPTIONS, DEVICE_BINDING_STATES, type DeviceBindingState, type DeviceEnrollParams, type DeviceEnrollResult, type DeviceIdentityState, type DeviceMetadata, type DeviceRotateSecretParams, type DeviceRotateSecretResult, type DeviceSecret, type DeviceStatus, type DeviceStatusParams, type EnvironmentCheckResult, type ExternalTool, type ExternalToolPatch, JSON_SORT_ALGORITHMS, JSON_SORT_ORDERS, type JsonSortAlgorithm, type JsonSortOptions, type JsonSortOrder, type JsonValidationResult, KNOWN_ENVIRONMENT_TOOLS, type KnownEnvironmentTool, type LocalPublishableAgent, type LocalPublishableSkill, type MarketplaceAgentItem, type MarketplaceAgentsCatalog, type MarketplaceCatalog, type MarketplaceSkillItem, type MigratedTask, type PublishableSkillEntry, type RepoAddParams, type RepoAddResult, type RepoDisableParams, type RepoDisableResult, type RepoEnableParams, type RepoEnableResult, type RepoListParams, type RepoListResult, type RepoRemoveParams, type RepoRemoveResult, type RepoResetParseCacheParams, type RepoResetParseCacheResult, type RepoSyncAllParams, type RepoSyncAllResult, type RepoSyncParams, type RepoSyncResult, type RepoUpdateParams, type RepoUpdateResult, type RunningTaskInfo, SERVICEME_CLI_CAPABILITIES, SERVICEME_CLI_NAME, SERVICEME_CLI_SCHEMA_VERSION, SERVICEME_CLI_VERSION, SERVICEME_ERROR_CODES, SERVICEME_IMAGE_FORMATS, SERVICEME_PROTOCOL_VERSION, type ScheduleCreateDryRunResult, type ScheduleCreateResult, type ScheduleDeleteDryRunResult, type ScheduleDeleteResult, type ScheduleEditDryRunResult, type ScheduleEditResult, type ScheduleGetResult, type ScheduleListResult, type ScheduleLogsResult, type ScheduleToggleResult, type ScheduleTriggerResult, type ScheduledTasksConfigV1, type ScheduledTasksLogFile, type SchedulerStartResult, type SchedulerStatus, type SchedulerStopResult, type SecretToken, type ServiceMeImageCompressOptions, type ServiceMeImageCompressResult, type ServiceMeImageFormat, type ServiceMeImageInfo, type ServiceMeImageValidationResult, type ServiceMeProjectExtractTemplateInput, type ServiceMeProjectExtractTemplateResult, type ServiceMeProjectGitInitResult, type ServiceMeProjectInstallDepsResult, type ServiceMeProjectMakeScriptsExecutableResult, type ServiceMeProjectScaffoldPruneResult, type ServicemeErrorCode, type ServicemeErrorDetails, ServicemeProtocolError, type SkillDownloadFile, type SkillMarketplaceEntry, type SkillMarketplaceState, type SkillMutationAction, type SkillMutationRequest, type SkillMutationResult, type SkillOwnerKind, type SkillPublishableResult, type SkillReconcileResult, type SkillRepoConvertToSymlinkParams, type SkillRepoConvertToSymlinkResult, type SkillRepoDraftCommitParams, type SkillRepoDraftCommitResult, type SkillRepoDraftCreateParams, type SkillRepoDraftCreateResult, type SkillRepoDraftDeleteParams, type SkillRepoDraftDeleteResult, type SkillRepoDraftListParams, type SkillRepoDraftListResult, type SkillRepoGetParams, type SkillRepoGetResult, type SkillRepoInstallParams, type SkillRepoInstallResult, type SkillRepoListLinkedParams, type SkillRepoListLinkedResult, type SkillRepoListParams, type SkillRepoListResult, type SkillRepoSetEntryEnabledParams, type SkillRepoSetEntryEnabledResult, type SkillRepoUninstallParams, type SkillRepoUninstallResult, type SkillScope, type SkillScopeState, type SkillScopeStatus, type SubmitToOfficialPayload, type SubmitToOfficialResult, type SupportedBridgeProtocolVersion, TOOLBOX_SCOPES, type TaskCancelResult, type TaskCancelledEventParams, type TaskCompletedEventParams, type TaskExecuteResult, type TaskExecutionSnapshot, type TaskFailedEventParams, type TaskListRunningResult, type TaskOutputEventParams, type TaskStartedEventParams, type TaskTriggerType, type ToolCheckResult, type ToolboxAddParams, type ToolboxAddResult, type ToolboxList, type ToolboxListParams, type ToolboxListResult, type ToolboxRemoveParams, type ToolboxRemoveResult, type ToolboxScope, type ToolboxUpdateParams, type ToolboxUpdateResult, type UploadAgentPayload, type UploadFile, type UploadSkillPayload, createCliFailure, createCliSuccess, createServicemeError, getBridgeEventParamsValidator, getBridgeResultValidator, isAgentMarketplaceState, isAgentMutationRequest, isAgentMutationResult, isAgentPermissionSummary, isAgentPermissionsResult, isAgentSessionStatus, isAuthAccountMeta, isAuthLoginParams, isAuthLoginResult, isAuthLogoutParams, isAuthLogoutResult, isAuthProvider, isAuthSessionHandle, isAuthStatus, isAuthSwitchParams, isAuthSwitchResult, isAuthWhoamiResult, isBridgeCapabilities, isBridgeEvent, isBridgeEventName, isBridgeMethod, isBridgeRequest, isBridgeResponse, isCliEnvelope, isCopilotContentApproveResult, isCopilotContentIntegrationStatusResult, isCopilotContentMigrateLegacyResult, isCopilotContentRestoreResult, isCopilotContentStatusResult, isCopilotCustomizationViewPayload, isCopilotCustomizationsListParams, isCopilotCustomizationsListResult, isCopilotLegacyMigrateParams, isCopilotLegacyMigrateResult, isCopilotLegacyPreviewParams, isCopilotLegacyPreviewResult, isCopilotPackageInstallParams, isCopilotPackageInstallResult, isCopilotPackageMoveParams, isCopilotPackageMoveResult, isCopilotPackageUninstallParams, isCopilotPackageUninstallResult, isCopilotPackageUpdateParams, isCopilotPackageUpdateResult, isCopilotPluginListParams, isCopilotPluginListResult, isCopilotPluginRegisterParams, isCopilotPluginRegisterResult, isCopilotPluginUnregisterParams, isCopilotPluginUnregisterResult, isCopilotSourceListParams, isCopilotSourceListResult, isCopilotSourceRemoveParams, isCopilotSourceRemoveResult, isCopilotUpdatePreviewParams, isCopilotUpdatePreviewResult, isDeviceBindingState, isDeviceEnrollParams, isDeviceEnrollResult, isDeviceIdentityState, isDeviceMetadata, isDeviceRotateSecretParams, isDeviceRotateSecretResult, isDeviceStatus, isEnvironmentCheckResult, isExternalTool, isExternalToolPatch, isJsonOutputResult, isJsonSortAlgorithm, isJsonSortOptions, isJsonSortOrder, isJsonValidationResult, isKnownEnvironmentTool, isRecord, isRepoAddParams, isRepoAddResult, isRepoDisableParams, isRepoDisableResult, isRepoEnableParams, isRepoEnableResult, isRepoListParams, isRepoListResult, isRepoRemoveParams, isRepoRemoveResult, isRepoSyncAllParams, isRepoSyncAllResult, isRepoSyncParams, isRepoSyncResult, isRepoUpdateResult, isRetryableErrorCode, isScheduledTask, isScheduledTaskType, isScheduledTaskV1, isScheduledTasksConfig, isScheduledTasksConfigV1, isSchedulerStatus, isServiceMeImageCompressOptions, isServiceMeImageCompressResult, isServiceMeImageFormat, isServiceMeImageInfo, isServiceMeImageValidationResult, isServiceMeProjectExtractTemplateInput, isServiceMeProjectExtractTemplateResult, isServiceMeProjectGitInitResult, isServiceMeProjectInstallDepsResult, isServiceMeProjectMakeScriptsExecutableResult, isServiceMeProjectScaffoldPruneResult, isServicemeErrorCode, isServicemeErrorDetails, isSkillMarketplaceState, isSkillMutationRequest, isSkillMutationResult, isSkillPublishableResult, isSkillReconcileResult, isSkillRepoConvertToSymlinkParams, isSkillRepoConvertToSymlinkResult, isSkillRepoDraftCommitResult, isSkillRepoDraftCreateResult, isSkillRepoDraftDeleteResult, isSkillRepoDraftListResult, isSkillRepoGetParams, isSkillRepoGetResult, isSkillRepoInstallParams, isSkillRepoInstallResult, isSkillRepoListLinkedParams, isSkillRepoListLinkedResult, isSkillRepoListParams, isSkillRepoListResult, isSkillRepoSetEntryEnabledParams, isSkillRepoSetEntryEnabledResult, isSkillRepoUninstallParams, isSkillRepoUninstallResult, isSystemHelloResult, isSystemPingResult, isSystemShutdownResult, isTaskCancelResult, isTaskCancelledEventParams, isTaskCompletedEventParams, isTaskExecuteResult, isTaskExecutionLog, isTaskFailedEventParams, isTaskListRunningResult, isTaskOutputEventParams, isTaskStartedEventParams, isTaskWorkspaceRef, isToolCheckResult, isToolboxAddParams, isToolboxAddResult, isToolboxList, isToolboxListParams, isToolboxRemoveParams, isToolboxRemoveResult, isToolboxScope, isToolboxUpdateParams, isToolboxUpdateResult, migrateTaskV1ToV2, migrateV1ToV2, normalizeBridgeMethod, normalizeServicemeError };
1881
+ //#endregion
1882
+ //#region src/project.d.ts
1883
+ export interface ServiceMeProjectScaffoldPruneResult {
1884
+ applied: boolean;
1885
+ preset: string;
1886
+ commands: string[];
1887
+ }
1888
+ export interface ServiceMeProjectGitInitResult {
1889
+ initialized: boolean;
1890
+ command: string;
1891
+ }
1892
+ export interface ServiceMeProjectMakeScriptsExecutableResult {
1893
+ processedCount: number;
1894
+ updatedCount: number;
1895
+ platform: NodeJS.Platform;
1896
+ scripts: string[];
1897
+ }
1898
+ export interface ServiceMeProjectInstallDepsResult {
1899
+ installed: boolean;
1900
+ command: string;
1901
+ }
1902
+ export interface ServiceMeProjectExtractTemplateInput {
1903
+ extractedDirName: string;
1904
+ projectFilePattern: string;
1905
+ }
1906
+ export interface ServiceMeProjectExtractTemplateResult {
1907
+ actualDirName: string;
1908
+ }
1909
+ export declare function isServiceMeProjectScaffoldPruneResult(value: unknown): value is ServiceMeProjectScaffoldPruneResult;
1910
+ export declare function isServiceMeProjectGitInitResult(value: unknown): value is ServiceMeProjectGitInitResult;
1911
+ export declare function isServiceMeProjectMakeScriptsExecutableResult(value: unknown): value is ServiceMeProjectMakeScriptsExecutableResult;
1912
+ export declare function isServiceMeProjectInstallDepsResult(value: unknown): value is ServiceMeProjectInstallDepsResult;
1913
+ export declare function isServiceMeProjectExtractTemplateInput(value: unknown): value is ServiceMeProjectExtractTemplateInput;
1914
+ export declare function isServiceMeProjectExtractTemplateResult(value: unknown): value is ServiceMeProjectExtractTemplateResult;
1915
+ //#endregion
1916
+ //#region src/skill.d.ts
1917
+ export type SkillScope = "workspace" | "user";
1918
+ export type SkillOwnerKind = "builtin" | "external";
1919
+ export type SkillScopeStatus = "absent" | "available" | "installed" | "blocked" | "conflict";
1920
+ export type SkillMutationAction = "install" | "uninstall" | "move" | "removeExternal" | "publish" | "republish" | "submit-to-official";
1921
+ export interface SkillScopeState {
1922
+ scope: SkillScope;
1923
+ status: SkillScopeStatus;
1924
+ kind?: SkillOwnerKind;
1925
+ path?: string;
1926
+ isInstalled: boolean;
1927
+ canInstall: boolean;
1928
+ canUninstall: boolean;
1929
+ canRemove: boolean;
1930
+ canMoveHere: boolean;
1931
+ summary?: string;
1932
+ }
1933
+ export interface SkillMarketplaceEntry {
1934
+ id: string;
1935
+ displayName: string;
1936
+ description: string;
1937
+ version: string;
1938
+ updatedAt: string;
1939
+ categoryId?: string;
1940
+ enabled?: boolean;
1941
+ isCatalogSkill: boolean;
1942
+ recommended: boolean;
1943
+ installCount: number;
1944
+ requiresSetup?: boolean;
1945
+ setupHint?: string;
1946
+ homepage?: string;
1947
+ ownerScope?: SkillScope;
1948
+ ownerKind?: SkillOwnerKind;
1949
+ hasConflict: boolean;
1950
+ hasScripts?: boolean;
1951
+ hasHooks?: boolean;
1952
+ source?: "official" | "community" | "local";
1953
+ localSkillPath?: string;
1954
+ canPublish?: boolean;
1955
+ workspaceState: SkillScopeState;
1956
+ userState: SkillScopeState;
1957
+ }
1958
+ export interface SkillMarketplaceState {
1959
+ configPath: string;
1960
+ userSkillsPath: string;
1961
+ skills: SkillMarketplaceEntry[];
1962
+ enabledSkillIds?: string[];
1963
+ recommendedSkillIds?: string[];
1964
+ onboardingRequired: boolean;
1965
+ hasPersistedSelection: boolean;
1966
+ workspaceOpen?: boolean;
1967
+ }
1968
+ export interface SkillMutationRequest {
1969
+ skillId: string;
1970
+ targetScope: SkillScope;
1971
+ action: SkillMutationAction;
1972
+ confirmed?: boolean;
1973
+ }
1974
+ export interface SkillMutationResult {
1975
+ state: SkillMarketplaceState;
1976
+ skillId: string;
1977
+ targetScope: SkillScope;
1978
+ action: SkillMutationAction;
1979
+ changed: boolean;
1980
+ status: "success" | "blocked" | "requires_confirmation";
1981
+ message?: string;
1982
+ hasScripts?: boolean;
1983
+ hasHooks?: boolean;
1984
+ prUrl?: string;
1985
+ fromVersion?: string;
1986
+ toVersion?: string;
1987
+ }
1988
+ export interface SkillReconcileResult {
1989
+ state: SkillMarketplaceState;
1990
+ changed: boolean;
1991
+ }
1992
+ export interface PublishableSkillEntry {
1993
+ id: string;
1994
+ displayName: string;
1995
+ path: string;
1996
+ version?: string;
1997
+ }
1998
+ export interface SkillPublishableResult {
1999
+ skills: PublishableSkillEntry[];
2000
+ }
2001
+ export declare function isSkillMarketplaceState(value: unknown): value is SkillMarketplaceState;
2002
+ export declare function isSkillMutationRequest(value: unknown): value is SkillMutationRequest;
2003
+ export declare function isSkillMutationResult(value: unknown): value is SkillMutationResult;
2004
+ export declare function isSkillReconcileResult(value: unknown): value is SkillReconcileResult;
2005
+ export declare function isSkillPublishableResult(value: unknown): value is SkillPublishableResult;
2006
+ //#endregion
2007
+ export type { AgentPermissionSummary, AgentToolPermission, AgentToolRiskLevel, BridgeLinkMode, BridgeLinkedSkill, BridgeRepoEntry, BridgeRepoSyncPull, BridgeSkillKind, BridgeSkillRepoEntry, BridgeSkillRepoFile, CommandPayload, CopilotArtifactStatePayload, CopilotArtifactSummaryPayload, CopilotArtifactViewPayload, CopilotAvailablePackagePayload, CopilotCustomizationScope, CopilotCustomizationViewPayload, CopilotPackageDefinitionPayload, CopilotPackageInstallationPayload, CopilotPackageUpdatePreviewPayload, CopilotPackageViewPayload, CopilotSourceRecordPayload, CopilotSourceViewPayload, GithubCopilotCliPayload, HttpRequestPayload, ScheduledTask, ScheduledTaskType, ScheduledTaskV1, ScheduledTasksConfig, ShellPayload, TaskExecutionLog, TaskExecutionStatus, TaskPayload, TaskRunStatus, TaskWorkspaceRef };