@kmlckj/aios-agent-server-sdk 0.0.0-stage → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/EVENTS.md +88 -0
  2. package/README.md +628 -2
  3. package/capabilities.json +2398 -0
  4. package/dist/cli/daemon/preferences.d.ts +67 -0
  5. package/dist/cli/daemon/protocol.d.ts +26 -0
  6. package/dist/cli/daemon/resource-limits.d.ts +39 -0
  7. package/dist/core/auth/platform-client.d.ts +59 -0
  8. package/dist/core/host/runtime-dependencies.d.ts +26 -0
  9. package/dist/core/skills/skill-bindings.d.ts +19 -0
  10. package/dist/core/skills/skill-versions.d.ts +31 -0
  11. package/dist/electron/main/bundled-runtime-tools.d.ts +24 -0
  12. package/dist/events.js +1 -0
  13. package/dist/index.js +55 -0
  14. package/dist/sdk/src/auth.d.ts +43 -0
  15. package/dist/sdk/src/authorization-events.d.ts +16 -0
  16. package/dist/sdk/src/authorization.d.ts +10 -0
  17. package/dist/sdk/src/communication.d.ts +9 -0
  18. package/dist/sdk/src/diagnostics.d.ts +24 -0
  19. package/dist/sdk/src/errors.d.ts +4 -0
  20. package/dist/sdk/src/events.d.ts +4 -0
  21. package/dist/sdk/src/file-api.d.ts +29 -0
  22. package/dist/sdk/src/file-storage.d.ts +34 -0
  23. package/dist/sdk/src/index.d.ts +257 -0
  24. package/dist/sdk/src/local-connection.d.ts +9 -0
  25. package/dist/sdk/src/managed-host.d.ts +32 -0
  26. package/dist/sdk/src/native-status.d.ts +59 -0
  27. package/dist/sdk/src/platform.d.ts +35 -0
  28. package/dist/sdk/src/runtime-control.d.ts +111 -0
  29. package/dist/sdk/src/runtime-integrity.d.ts +10 -0
  30. package/dist/sdk/src/tool-reference.d.ts +11 -0
  31. package/dist/sdk/src/tool-result.d.ts +36 -0
  32. package/dist/sdk/src/tool-server.d.ts +14 -0
  33. package/dist/sdk/src/transport.d.ts +25 -0
  34. package/dist/sdk/src/types.d.ts +492 -0
  35. package/dist/shared/account-context-api.d.ts +47 -0
  36. package/dist/shared/action-center-api.d.ts +50 -0
  37. package/dist/shared/agent-capabilities.d.ts +42 -0
  38. package/dist/shared/agent-hooks.d.ts +10 -0
  39. package/dist/shared/agent-team.d.ts +17 -0
  40. package/dist/shared/artifact-evidence.d.ts +18 -0
  41. package/dist/shared/automation-api.d.ts +112 -0
  42. package/dist/shared/client-downloads-api.d.ts +20 -0
  43. package/dist/shared/cloud-assistant-api.d.ts +1020 -0
  44. package/dist/shared/cloud-task-event-api.d.ts +22 -0
  45. package/dist/shared/collaboration-api.d.ts +16 -0
  46. package/dist/shared/collaboration-automation-api.d.ts +55 -0
  47. package/dist/shared/collaboration-deep-link.d.ts +18 -0
  48. package/dist/shared/collaboration-event-api.d.ts +19 -0
  49. package/dist/shared/collaboration-plan-api.d.ts +159 -0
  50. package/dist/shared/collaboration-project-api.d.ts +206 -0
  51. package/dist/shared/collaboration-resource-api.d.ts +41 -0
  52. package/dist/shared/collaboration-task-api.d.ts +372 -0
  53. package/dist/shared/computer-use-api.d.ts +80 -0
  54. package/dist/shared/computer-use-handshake.d.ts +19 -0
  55. package/dist/shared/computer-use-protocol.d.ts +488 -0
  56. package/dist/shared/context-usage.d.ts +15 -0
  57. package/dist/shared/desktop-api.d.ts +449 -0
  58. package/dist/shared/desktop-diagnostics-api.d.ts +56 -0
  59. package/dist/shared/desktop-language.d.ts +3 -0
  60. package/dist/shared/desktop-mcp-service-api.d.ts +157 -0
  61. package/dist/shared/document-session-api.d.ts +91 -0
  62. package/dist/shared/enterprise-knowledge-api.d.ts +103 -0
  63. package/dist/shared/enterprise-project-api.d.ts +26 -0
  64. package/dist/shared/execution-activity.d.ts +3 -0
  65. package/dist/shared/execution-context.d.ts +37 -0
  66. package/dist/shared/execution-identity.d.ts +7 -0
  67. package/dist/shared/execution-profile.d.ts +6 -0
  68. package/dist/shared/execution-target.d.ts +71 -0
  69. package/dist/shared/expert-team-api.d.ts +54 -0
  70. package/dist/shared/feedback-api.d.ts +20 -0
  71. package/dist/shared/git-api.d.ts +227 -0
  72. package/dist/shared/git-http-api.d.ts +12 -0
  73. package/dist/shared/hosted-git-api.d.ts +132 -0
  74. package/dist/shared/js-agent-hooks.d.ts +23 -0
  75. package/dist/shared/local-custom-model-api.d.ts +55 -0
  76. package/dist/shared/local-environment-api.d.ts +110 -0
  77. package/dist/shared/local-mcp-server-api.d.ts +91 -0
  78. package/dist/shared/local-memory.d.ts +165 -0
  79. package/dist/shared/local-plugin-api.d.ts +26 -0
  80. package/dist/shared/local-runtime-api.d.ts +32 -0
  81. package/dist/shared/local-skill-api.d.ts +42 -0
  82. package/dist/shared/local-task-api.d.ts +658 -0
  83. package/dist/shared/local-task-command-client.d.ts +55 -0
  84. package/dist/shared/local-task-command.d.ts +91 -0
  85. package/dist/shared/local-task-event-projection.d.ts +29 -0
  86. package/dist/shared/local-task-projection.d.ts +29 -0
  87. package/dist/shared/local-workspace.d.ts +9 -0
  88. package/dist/shared/managed-authorization.d.ts +70 -0
  89. package/dist/shared/memory-customization.d.ts +32 -0
  90. package/dist/shared/model-routing.d.ts +31 -0
  91. package/dist/shared/model-selection.d.ts +11 -0
  92. package/dist/shared/my-expert-api.d.ts +119 -0
  93. package/dist/shared/navigation-api.d.ts +20 -0
  94. package/dist/shared/office-window-api.d.ts +81 -0
  95. package/dist/shared/platform-branding-api.d.ts +66 -0
  96. package/dist/shared/plugin-market-api.d.ts +120 -0
  97. package/dist/shared/profession-market-api.d.ts +96 -0
  98. package/dist/shared/project-local-skill-api.d.ts +8 -0
  99. package/dist/shared/remote-connection-api.d.ts +97 -0
  100. package/dist/shared/remote-connection.d.ts +62 -0
  101. package/dist/shared/remote-installation-api.d.ts +50 -0
  102. package/dist/shared/remote-tasks-api.d.ts +118 -0
  103. package/dist/shared/runtime-tuning.d.ts +44 -0
  104. package/dist/shared/scene-case-api.d.ts +42 -0
  105. package/dist/shared/security-center-api.d.ts +74 -0
  106. package/dist/shared/sensitive-protection-api.d.ts +71 -0
  107. package/dist/shared/session-policy.d.ts +26 -0
  108. package/dist/shared/shortcut-api.d.ts +7 -0
  109. package/dist/shared/skill-activation-api.d.ts +8 -0
  110. package/dist/shared/skill-asset-api.d.ts +12 -0
  111. package/dist/shared/skill-market-api.d.ts +119 -0
  112. package/dist/shared/skill-upload.d.ts +16 -0
  113. package/dist/shared/speech-recognition-api.d.ts +12 -0
  114. package/dist/shared/storage-integrity.d.ts +15 -0
  115. package/dist/shared/target-bridge-protocol.d.ts +67 -0
  116. package/dist/shared/target-environments.d.ts +15 -0
  117. package/dist/shared/target-resources.d.ts +105 -0
  118. package/dist/shared/task-initialization-api.d.ts +44 -0
  119. package/dist/shared/task-menu-api.d.ts +27 -0
  120. package/dist/shared/task-operation.d.ts +19 -0
  121. package/dist/shared/task-path-policy.d.ts +14 -0
  122. package/dist/shared/task-resource-manifest.d.ts +33 -0
  123. package/dist/shared/task-storage-recovery.d.ts +33 -0
  124. package/dist/shared/task-terminal-api.d.ts +48 -0
  125. package/dist/shared/team-control.d.ts +60 -0
  126. package/dist/shared/tool-activity.d.ts +18 -0
  127. package/dist/shared/update-api.d.ts +65 -0
  128. package/dist/shared/usage-statistics-api.d.ts +18 -0
  129. package/dist/shared/worktree-api.d.ts +188 -0
  130. package/examples/business-assistant.mjs +19 -0
  131. package/examples/common.mjs +51 -0
  132. package/examples/platform-assistant.mjs +9 -0
  133. package/examples/standalone-assistant.mjs +16 -0
  134. package/package.json +20 -4
@@ -0,0 +1,449 @@
1
+ import type { CloudAssistantApi } from './cloud-assistant-api.js';
2
+ import type { CollaborationDesktopApi } from './collaboration-api.js';
3
+ import type { ActionCenterApi } from './action-center-api.js';
4
+ import type { AccountContextApi } from './account-context-api.js';
5
+ import type { UsageStatisticsApi } from './usage-statistics-api.js';
6
+ import type { ShortcutBindings } from './shortcut-api.js';
7
+ import type { ClientDownloadsApi } from './client-downloads-api.js';
8
+ import type { NavigationApi } from './navigation-api.js';
9
+ import type { TaskMenuApi } from './task-menu-api.js';
10
+ import type { DesktopLanguage } from './desktop-language.js';
11
+ import type { MyExpertApi } from './my-expert-api.js';
12
+ import type { LocalTaskApi, LocalTaskAttachmentKind, LocalTaskExecutionApi, LocalTaskPermissionMode } from './local-task-api.js';
13
+ import type { LocalRuntimeApi } from './local-runtime-api.js';
14
+ import type { SkillMarketApi } from './skill-market-api.js';
15
+ import type { SceneCaseApi } from './scene-case-api.js';
16
+ import type { ProfessionMarketApi } from './profession-market-api.js';
17
+ import type { LocalSkillApi } from './local-skill-api.js';
18
+ import type { ProjectLocalSkillApi } from './project-local-skill-api.js';
19
+ import type { SkillActivationApi } from './skill-activation-api.js';
20
+ import type { SkillAssetApi } from './skill-asset-api.js';
21
+ import type { PluginMarketApi } from './plugin-market-api.js';
22
+ import type { LocalPluginApi } from './local-plugin-api.js';
23
+ import type { LocalMcpServerApi } from './local-mcp-server-api.js';
24
+ import type { DesktopMcpServiceApi } from './desktop-mcp-service-api.js';
25
+ import type { ClientReleaseChannel, DesktopUpdatesApi } from './update-api.js';
26
+ import type { SpeechRecognitionApi } from './speech-recognition-api.js';
27
+ import type { TaskInitializationApi } from './task-initialization-api.js';
28
+ import type { DesktopSecurityPolicy, SecurityCenterApi, SecurityRuntimeToolEnablement } from './security-center-api.js';
29
+ import type { AutomationApi } from './automation-api.js';
30
+ import type { EnterpriseKnowledgeApi } from './enterprise-knowledge-api.js';
31
+ import type { ComputerUseApi, ComputerUseSettings } from './computer-use-api.js';
32
+ import type { CollaborationDeepLink } from './collaboration-deep-link.js';
33
+ import type { DesktopFeedbackApi } from './feedback-api.js';
34
+ import type { LocalCustomModelApi } from './local-custom-model-api.js';
35
+ import type { PlatformBrandingApi } from './platform-branding-api.js';
36
+ export type DesktopAppearance = 'system' | 'light' | 'dark';
37
+ export type DesktopEnvironment = 'development' | 'release';
38
+ export type DesktopResponseStyle = 'default' | 'professional' | 'friendly' | 'straightforward' | 'creative' | 'efficient' | 'sarcastic' | 'socratic';
39
+ export interface DesktopPersonalizationSettings {
40
+ responseStyle: DesktopResponseStyle;
41
+ showLoadingWelcome: boolean;
42
+ customInstructions: string;
43
+ }
44
+ export type DirectoryPermission = 'read' | 'read-write';
45
+ export type WriteBackPolicy = 'confirm' | 'allow' | 'deny';
46
+ export interface DesktopPaths {
47
+ appDataDir: string;
48
+ cacheDir: string;
49
+ logsDir: string;
50
+ defaultWorkspaceRoot: string;
51
+ }
52
+ export interface DesktopStorageInfo {
53
+ dataDirectory: string;
54
+ dataBytes: number;
55
+ diskTotalBytes: number;
56
+ diskUsedBytes: number;
57
+ diskAvailableBytes: number;
58
+ }
59
+ export interface SelectFilesResult {
60
+ canceled: boolean;
61
+ files: Array<{
62
+ path: string;
63
+ name: string;
64
+ sizeBytes: number;
65
+ mediaType: string;
66
+ kind: LocalTaskAttachmentKind;
67
+ }>;
68
+ }
69
+ export interface DesktopRuntimeConfig {
70
+ environment: DesktopEnvironment;
71
+ webGatewayUrl: string;
72
+ agentGatewayUrl: string;
73
+ platformBaseUrl: string;
74
+ mcpRegistryUrl: string;
75
+ rendererDevUrl?: string;
76
+ openDevTools: boolean;
77
+ localRuntimePort: number;
78
+ updateFeedUrl?: string;
79
+ buildNumber: number;
80
+ updateChannel: ClientReleaseChannel;
81
+ updatePublicKey?: string;
82
+ }
83
+ export interface LocalSpace {
84
+ id: string;
85
+ name: string;
86
+ kind: 'local' | 'cloud';
87
+ rootPath?: string;
88
+ workspaceId?: string;
89
+ description?: string;
90
+ createdAt: string;
91
+ updatedAt: string;
92
+ }
93
+ export interface AuthorizedDirectory {
94
+ id: string;
95
+ name: string;
96
+ path: string;
97
+ permission: DirectoryPermission;
98
+ writeBackPolicy: WriteBackPolicy;
99
+ expiresAt?: string;
100
+ createdAt: string;
101
+ updatedAt: string;
102
+ }
103
+ export interface CommandPolicy {
104
+ allowlist: string[];
105
+ confirmList: string[];
106
+ denylist: string[];
107
+ }
108
+ export interface NetworkPolicy {
109
+ allowDomains: string[];
110
+ denyDomains: string[];
111
+ proxyMode: 'system' | 'custom' | 'off';
112
+ proxyUrl?: string;
113
+ }
114
+ export interface DesktopSettings extends DesktopPersonalizationSettings {
115
+ git?: import('./git-api.js').GitSettings;
116
+ worktrees?: import('./worktree-api.js').WorktreeSettings;
117
+ storageUnavailable?: boolean;
118
+ appearance: DesktopAppearance;
119
+ displayLanguage: DesktopLanguage;
120
+ fontScale: number;
121
+ launchAtLogin: boolean;
122
+ closeBehavior: 'tray' | 'quit';
123
+ notificationsEnabled: boolean;
124
+ preventSleep: boolean;
125
+ deletionProtection: boolean;
126
+ defaultTaskPermissionMode: LocalTaskPermissionMode;
127
+ securityPolicy: DesktopSecurityPolicy;
128
+ runtimeToolsEnabled: SecurityRuntimeToolEnablement;
129
+ workspaceDirectory: string;
130
+ shortcutBindings: ShortcutBindings;
131
+ downloadDirectory: string;
132
+ proxyMode: 'system' | 'custom' | 'off';
133
+ proxyUrl?: string;
134
+ computerUse: ComputerUseSettings;
135
+ }
136
+ export interface PlatformUser {
137
+ id: string;
138
+ username: string;
139
+ displayName: string;
140
+ email?: string;
141
+ phone?: string;
142
+ avatarUrl?: string | null;
143
+ tenantId?: string | null;
144
+ roles: string[];
145
+ }
146
+ export interface TenantSummary {
147
+ id: string;
148
+ name: string;
149
+ displayName: string;
150
+ status?: string;
151
+ }
152
+ export interface LoginContext {
153
+ currentTenantId?: string | null;
154
+ currentWorkspaceId?: string | null;
155
+ personalMode?: boolean;
156
+ contextVersion?: number;
157
+ }
158
+ export interface AuthSession {
159
+ user: PlatformUser;
160
+ tenants: TenantSummary[];
161
+ context?: LoginContext;
162
+ platformBaseUrl: string;
163
+ authenticatedAt: string;
164
+ accessTokenExpiresAt: string;
165
+ }
166
+ export type AuthLoginType = 'USERNAME' | 'PHONE';
167
+ export interface AuthPasswordChangeRequired {
168
+ nextAction: 'CHANGE_PASSWORD';
169
+ challengeId: string;
170
+ }
171
+ export type AuthLoginResult = AuthSession | AuthPasswordChangeRequired;
172
+ export interface AuthRequiredPasswordChangeRequest {
173
+ challengeId: string;
174
+ newPassword: string;
175
+ confirmPassword: string;
176
+ }
177
+ export interface AuthLoginRequest {
178
+ loginType: AuthLoginType;
179
+ username?: string;
180
+ countryCode?: string;
181
+ phoneNumber?: string;
182
+ password: string;
183
+ device?: LoginDeviceInfo;
184
+ }
185
+ export interface LoginDeviceInfo {
186
+ deviceKey: string;
187
+ deviceType: 'WEB' | 'DESKTOP' | 'IOS' | 'ANDROID';
188
+ deviceName?: string;
189
+ osName?: string;
190
+ osVersion?: string;
191
+ clientName?: string;
192
+ clientVersion?: string;
193
+ appVersion?: string;
194
+ deviceManufacturer?: string;
195
+ deviceModel?: string;
196
+ architecture?: string;
197
+ locale?: string;
198
+ timezone?: string;
199
+ physicalDevice?: boolean;
200
+ platformApiLevel?: number;
201
+ }
202
+ export interface AuthRegisterRequest {
203
+ username: string;
204
+ password: string;
205
+ displayName: string;
206
+ email: string;
207
+ }
208
+ export interface AuthCaptchaResponse {
209
+ captchaId: string;
210
+ imageDataUrl: string;
211
+ expiresIn: number;
212
+ }
213
+ export interface AuthSmsCodeRequest {
214
+ countryCode: string;
215
+ phoneNumber: string;
216
+ captchaId: string;
217
+ captchaCode: string;
218
+ }
219
+ export interface AuthSmsCodeResponse {
220
+ verificationId: string;
221
+ expiresIn: number;
222
+ retryAfter: number;
223
+ }
224
+ export interface AuthSmsRegistrationVerifyRequest {
225
+ verificationId: string;
226
+ countryCode: string;
227
+ phoneNumber: string;
228
+ smsCode: string;
229
+ }
230
+ export interface AuthRegistrationTicketResponse {
231
+ registrationTicket: string;
232
+ expiresIn: number;
233
+ }
234
+ export interface AuthSmsRegistrationCompleteRequest {
235
+ operationId: string;
236
+ registrationTicket: string;
237
+ countryCode: string;
238
+ phoneNumber: string;
239
+ password: string;
240
+ displayName: string;
241
+ agreementVersion: string;
242
+ privacyVersion: string;
243
+ }
244
+ export interface AuthSmsRegistrationCompleteResponse {
245
+ nextAction: 'LOGIN';
246
+ loginType: 'PHONE';
247
+ countryCode: string;
248
+ maskedPhoneNumber: string;
249
+ }
250
+ export interface AuthSwitchSubjectRequest {
251
+ subjectType: 'USER' | 'TENANT';
252
+ subjectId: string;
253
+ }
254
+ export interface WebLoginTicketCreateRequest {
255
+ sourceClientType: 'DESKTOP' | 'IOS' | 'ANDROID';
256
+ targetPath: string;
257
+ }
258
+ export interface WebLoginTicketCreateResponse {
259
+ ticket: string;
260
+ targetPath: string;
261
+ expiresIn: number;
262
+ }
263
+ export interface DesktopDeviceState {
264
+ id: string;
265
+ name: string;
266
+ hostname: string;
267
+ platform: string;
268
+ arch: string;
269
+ identityVersion?: number;
270
+ identitySource?: 'platform-uuid' | 'machine-guid' | 'machine-id' | 'device-fingerprint';
271
+ status: 'online' | 'offline' | 'revoked';
272
+ createdAt: string;
273
+ lastHeartbeatAt?: string;
274
+ revokedAt?: string;
275
+ }
276
+ export type AuditCategory = 'auth' | 'device' | 'filesystem' | 'runtime' | 'security' | 'settings' | 'task';
277
+ export type AuditResult = 'SUCCESS' | 'FAILED' | 'PENDING' | 'INFO';
278
+ export type AuditRecordType = 'denial' | 'command' | 'configuration' | 'network' | 'file' | 'other';
279
+ export type AuditOutcome = 'allowed' | 'approved' | 'rejected' | 'blocked' | 'failed' | 'info' | 'pending';
280
+ export interface AuditRecord {
281
+ id: string;
282
+ timestamp: string;
283
+ category: AuditCategory;
284
+ action: string;
285
+ result: AuditResult;
286
+ resource?: string;
287
+ detail?: string;
288
+ }
289
+ export interface AuditQuery {
290
+ category?: AuditCategory;
291
+ recordType?: AuditRecordType;
292
+ outcome?: AuditOutcome;
293
+ keyword?: string;
294
+ from?: string;
295
+ to?: string;
296
+ limit?: number;
297
+ offset?: number;
298
+ }
299
+ export interface AuditSearchResult {
300
+ records: AuditRecord[];
301
+ total: number;
302
+ }
303
+ export interface ExportAuditResult {
304
+ canceled: boolean;
305
+ path?: string;
306
+ }
307
+ export interface SelectDirectoryResult {
308
+ canceled: boolean;
309
+ path?: string;
310
+ name?: string;
311
+ }
312
+ export type DesktopTitleBarAppearance = 'light' | 'dark';
313
+ export type DesktopWindowAction = 'undo' | 'redo' | 'cut' | 'copy' | 'paste' | 'select-all' | 'minimize' | 'toggle-maximize' | 'toggle-full-screen' | 'close' | 'quit';
314
+ export interface DesktopAboutInfo {
315
+ version: string;
316
+ buildNumber: number;
317
+ electronVersion: string;
318
+ chromeVersion: string;
319
+ nodeVersion: string;
320
+ }
321
+ export interface DesktopQuitConfirmation {
322
+ id: string;
323
+ kind: 'running-task';
324
+ title: string;
325
+ message: string;
326
+ detail: string;
327
+ cancelLabel: string;
328
+ confirmLabel: string;
329
+ }
330
+ export interface DesktopQuitConfirmationResolution {
331
+ id: string;
332
+ confirmed: boolean;
333
+ }
334
+ export interface DesktopApi {
335
+ office: import('./office-window-api.js').OfficeWindowApi;
336
+ diagnostics: import('./desktop-diagnostics-api.js').DesktopDiagnosticsApi;
337
+ remoteConnections: import('./remote-connection-api.js').RemoteConnectionsApi;
338
+ remoteInstallation: import('./remote-installation-api.js').RemoteInstallationApi;
339
+ remoteTasks: import('./remote-tasks-api.js').RemoteTasksApi;
340
+ taskTerminals: import('./task-terminal-api.js').TaskTerminalApi;
341
+ git: import('./git-api.js').GitApi;
342
+ worktrees: import('./worktree-api.js').WorktreeApi;
343
+ localEnvironments: import('./local-environment-api.js').LocalEnvironmentApi;
344
+ hostedGit: import('./hosted-git-api.js').HostedGitApi;
345
+ localMemory: import('./local-memory.js').LocalMemoryApi;
346
+ accountContext: AccountContextApi;
347
+ usageStatistics: UsageStatisticsApi;
348
+ actionCenter: ActionCenterApi;
349
+ branding: PlatformBrandingApi;
350
+ clientDownloads: ClientDownloadsApi;
351
+ navigation: NavigationApi;
352
+ taskMenu: TaskMenuApi;
353
+ app: {
354
+ getConfig: () => Promise<DesktopRuntimeConfig>;
355
+ getVersion: () => Promise<string>;
356
+ getAboutInfo: () => Promise<DesktopAboutInfo>;
357
+ getPaths: () => Promise<DesktopPaths>;
358
+ getStorageInfo: () => Promise<DesktopStorageInfo>;
359
+ openDataDirectory: () => Promise<void>;
360
+ openExternal: (url: string) => Promise<void>;
361
+ writeClipboardText: (text: string) => Promise<void>;
362
+ executeWindowAction: (action: DesktopWindowAction) => Promise<void>;
363
+ setTitleBarAppearance: (appearance: DesktopTitleBarAppearance) => Promise<void>;
364
+ getQuitConfirmation: () => Promise<DesktopQuitConfirmation | null>;
365
+ resolveQuitConfirmation: (resolution: DesktopQuitConfirmationResolution) => Promise<void>;
366
+ onQuitConfirmation: (listener: (confirmation: DesktopQuitConfirmation) => void) => () => void;
367
+ };
368
+ auth: {
369
+ getSession: () => Promise<AuthSession | null>;
370
+ login: (request: AuthLoginRequest) => Promise<AuthLoginResult>;
371
+ startBrowserLogin: () => Promise<AuthSession | null>;
372
+ cancelBrowserLogin: () => Promise<void>;
373
+ completeRequiredPasswordChange: (request: AuthRequiredPasswordChangeRequest) => Promise<AuthSession>;
374
+ cancelRequiredPasswordChange: (challengeId: string) => Promise<void>;
375
+ register: (request: AuthRegisterRequest) => Promise<PlatformUser>;
376
+ getRegistrationCaptcha: () => Promise<AuthCaptchaResponse>;
377
+ sendRegistrationSms: (request: AuthSmsCodeRequest) => Promise<AuthSmsCodeResponse>;
378
+ verifySmsRegistration: (request: AuthSmsRegistrationVerifyRequest) => Promise<AuthRegistrationTicketResponse>;
379
+ completeSmsRegistration: (request: AuthSmsRegistrationCompleteRequest) => Promise<AuthSmsRegistrationCompleteResponse>;
380
+ refresh: () => Promise<AuthSession>;
381
+ switchSubject: (request: AuthSwitchSubjectRequest) => Promise<AuthSession>;
382
+ openWeb: (targetPath: string) => Promise<void>;
383
+ logout: () => Promise<void>;
384
+ onSessionExpired: (listener: (reason: string) => void) => () => void;
385
+ onSessionChanged: (listener: () => void) => () => void;
386
+ };
387
+ cloudAssistant: CloudAssistantApi;
388
+ collaboration: CollaborationDesktopApi;
389
+ collaborationDeepLinks: {
390
+ consumePending: () => Promise<CollaborationDeepLink[]>;
391
+ onOpen: (listener: (deepLink: CollaborationDeepLink) => void) => () => void;
392
+ };
393
+ enterpriseKnowledge: EnterpriseKnowledgeApi & {
394
+ openManagement: () => Promise<void>;
395
+ };
396
+ professionMarket: ProfessionMarketApi;
397
+ myExperts: MyExpertApi;
398
+ skillMarket: SkillMarketApi;
399
+ sceneCases: SceneCaseApi;
400
+ localSkills: LocalSkillApi;
401
+ projectLocalSkills: ProjectLocalSkillApi;
402
+ skillActivation: SkillActivationApi;
403
+ skillAssets: SkillAssetApi;
404
+ pluginMarket: PluginMarketApi;
405
+ localPlugins: LocalPluginApi;
406
+ localMcpServers: LocalMcpServerApi;
407
+ desktopMcpServices: DesktopMcpServiceApi;
408
+ localCustomModels: LocalCustomModelApi;
409
+ computerUse: ComputerUseApi;
410
+ localRuntime: LocalRuntimeApi;
411
+ localTaskExecution: LocalTaskExecutionApi;
412
+ localTasks: LocalTaskApi;
413
+ taskStorageRecovery: import('./task-storage-recovery.js').TaskStorageRecoveryApi;
414
+ storageIntegrity: import('./storage-integrity.js').StorageIntegrityApi;
415
+ automation: AutomationApi;
416
+ speechRecognition: SpeechRecognitionApi;
417
+ taskInitialization: TaskInitializationApi;
418
+ feedback: DesktopFeedbackApi;
419
+ securityCenter: SecurityCenterApi;
420
+ sensitiveProtection: import('./sensitive-protection-api.js').SensitiveProtectionApi;
421
+ device: {
422
+ getState: () => Promise<DesktopDeviceState>;
423
+ heartbeat: () => Promise<DesktopDeviceState>;
424
+ revokeLocal: () => Promise<DesktopDeviceState>;
425
+ };
426
+ settings: {
427
+ get: () => Promise<DesktopSettings>;
428
+ update: (settings: Partial<DesktopSettings>) => Promise<DesktopSettings>;
429
+ onChanged: (listener: (settings: DesktopSettings) => void) => () => void;
430
+ };
431
+ updates: DesktopUpdatesApi;
432
+ fileDialog: {
433
+ selectDirectory: () => Promise<SelectDirectoryResult>;
434
+ selectFiles: () => Promise<SelectFilesResult>;
435
+ getPathForFile: (file: File) => string;
436
+ };
437
+ audit: {
438
+ list: (query?: AuditQuery) => Promise<AuditRecord[]>;
439
+ search: (query?: AuditQuery) => Promise<AuditSearchResult>;
440
+ clear: () => Promise<void>;
441
+ openLogsDir: () => Promise<void>;
442
+ export: () => Promise<ExportAuditResult>;
443
+ };
444
+ }
445
+ declare global {
446
+ interface Window {
447
+ aiosDesktop: DesktopApi;
448
+ }
449
+ }
@@ -0,0 +1,56 @@
1
+ export type DesktopHelpPanel = 'resources' | 'diagnostics';
2
+ export type ResourceModule = 'interface' | 'background' | 'main' | 'graphics' | 'extensions' | 'tasks' | 'helper' | 'sandbox';
3
+ export interface ResourceRow {
4
+ module: ResourceModule;
5
+ processes: number;
6
+ memoryBytes: number;
7
+ cpuPercent: number | null;
8
+ }
9
+ export interface DesktopResourceSnapshot {
10
+ sampledAt: string;
11
+ memory: {
12
+ totalBytes: number;
13
+ appBytes: number;
14
+ otherBytes: number;
15
+ availableBytes: number;
16
+ };
17
+ cpuPercent: number | null;
18
+ rows: ResourceRow[];
19
+ }
20
+ export type DiagnosticStatus = 'waiting' | 'running' | 'passed' | 'warning' | 'failed' | 'skipped';
21
+ export declare const networkDiagnosticCheckIds: readonly ["proxy", "hosts", "service", "tcp", "loss"];
22
+ export declare const localDiagnosticCheckIds: readonly ["system", "storage", "node", "runtime", "dependencies"];
23
+ export type DiagnosticCheckId = typeof networkDiagnosticCheckIds[number] | typeof localDiagnosticCheckIds[number];
24
+ export declare function diagnosticOverall(statuses: DiagnosticStatus[]): DiagnosticStatus;
25
+ export interface DiagnosticCheck {
26
+ id: DiagnosticCheckId;
27
+ status: DiagnosticStatus;
28
+ detail: string;
29
+ value: string;
30
+ durationMs?: number;
31
+ }
32
+ export interface DesktopDiagnosticSnapshot {
33
+ status: DiagnosticStatus;
34
+ startedAt: string | null;
35
+ durationMs: number | null;
36
+ endpoint: string;
37
+ host: string;
38
+ proxy: string;
39
+ checks: DiagnosticCheck[];
40
+ reportDirectory: string;
41
+ reportName: string | null;
42
+ reportError: string | null;
43
+ }
44
+ export interface DesktopDiagnosticsApi {
45
+ openResources(): Promise<void>;
46
+ sampleResources(): Promise<DesktopResourceSnapshot>;
47
+ closeResources(): Promise<void>;
48
+ copyResources(): Promise<void>;
49
+ getDiagnostics(): Promise<DesktopDiagnosticSnapshot>;
50
+ startDiagnostics(): Promise<DesktopDiagnosticSnapshot>;
51
+ onDiagnostics(listener: (snapshot: DesktopDiagnosticSnapshot) => void): () => void;
52
+ openReportDirectory(): Promise<void>;
53
+ exportReport(): Promise<void>;
54
+ revealReport(): Promise<void>;
55
+ onOpen(listener: (panel: DesktopHelpPanel) => void): () => void;
56
+ }
@@ -0,0 +1,3 @@
1
+ export declare const DESKTOP_LANGUAGES: readonly ["zh-CN", "en-US"];
2
+ export type DesktopLanguage = (typeof DESKTOP_LANGUAGES)[number];
3
+ export declare function isDesktopLanguage(value: unknown): value is DesktopLanguage;
@@ -0,0 +1,157 @@
1
+ import type { LocalMcpServer } from './local-mcp-server-api.js';
2
+ export type DesktopMcpServiceCategory = 'INDUSTRIAL_AUTOMATION' | 'ELECTRICAL_ELECTRONICS' | 'CAD_3D' | 'BIM_ARCHITECTURE' | 'CAE_ROBOTICS';
3
+ export type DesktopMcpRiskLevel = 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
4
+ export type DesktopMcpTargetOs = 'WINDOWS' | 'MACOS' | 'LINUX' | 'UNIVERSAL';
5
+ export type DesktopMcpTargetArch = 'X64' | 'ARM64' | 'UNIVERSAL';
6
+ export type DesktopMcpRuntimeType = 'PYTHON' | 'NODE' | 'NATIVE';
7
+ export type DesktopMcpInstallStatus = 'INSTALLED' | 'ENABLED' | 'DISABLED';
8
+ export type DesktopMcpInstallPhase = 'PREPARING' | 'DOWNLOADING' | 'VERIFYING' | 'INSTALLING' | 'CHECKING' | 'COMPLETED';
9
+ export interface DesktopMcpInstallProgress {
10
+ serviceId: string;
11
+ phase: DesktopMcpInstallPhase;
12
+ receivedBytes: number;
13
+ totalBytes: number;
14
+ percent: number;
15
+ }
16
+ export interface DesktopMcpServiceIcon {
17
+ url: string;
18
+ fileName: string;
19
+ contentType: string;
20
+ fileSize: number;
21
+ sha256: string;
22
+ }
23
+ export interface DesktopMcpWindowsUninstallDetectionRule {
24
+ type: 'windows-uninstall';
25
+ displayName: string;
26
+ match: 'exact' | 'prefix' | 'contains';
27
+ relativePaths: string[];
28
+ }
29
+ export type DesktopMcpRuntimeDetectionRule = string | DesktopMcpWindowsUninstallDetectionRule;
30
+ export interface DesktopMcpRuntimeManifest {
31
+ schemaVersion: 1;
32
+ id: string;
33
+ name: string;
34
+ version: string;
35
+ runtime: {
36
+ type: 'python' | 'node' | 'native';
37
+ source?: 'package' | 'software';
38
+ version?: string;
39
+ entry: string;
40
+ args?: string[];
41
+ env?: Record<string, string>;
42
+ detection?: {
43
+ windows?: DesktopMcpRuntimeDetectionRule[];
44
+ macos?: DesktopMcpRuntimeDetectionRule[];
45
+ linux?: DesktopMcpRuntimeDetectionRule[];
46
+ };
47
+ };
48
+ targets: string[];
49
+ software: {
50
+ name: string;
51
+ versions: string[];
52
+ detection?: {
53
+ windows?: string[];
54
+ macos?: string[];
55
+ linux?: string[];
56
+ };
57
+ };
58
+ transport: 'stdio';
59
+ permissions: {
60
+ filesystem: string[];
61
+ network: string[];
62
+ processes: string[];
63
+ };
64
+ toolGroups: string[];
65
+ healthCheck: {
66
+ method: 'mcp-tools-list';
67
+ timeoutSeconds: number;
68
+ };
69
+ }
70
+ export interface DesktopMcpExecutionPackage {
71
+ id: string;
72
+ versionId: string;
73
+ targetOs: DesktopMcpTargetOs;
74
+ targetArch: DesktopMcpTargetArch;
75
+ runtimeType: DesktopMcpRuntimeType;
76
+ fileName: string;
77
+ contentType: string;
78
+ fileSize: number;
79
+ sha256: string;
80
+ signature: string;
81
+ signingKeyId: string;
82
+ createdAt: string;
83
+ downloadUrl?: string;
84
+ }
85
+ export interface DesktopMcpServiceVersion {
86
+ id: string;
87
+ serviceId: string;
88
+ versionNo: string;
89
+ sourceCommit: string;
90
+ releaseNotes?: string;
91
+ manifest: DesktopMcpRuntimeManifest;
92
+ minimumDesktopVersion?: string;
93
+ publishedAt?: string;
94
+ packages: DesktopMcpExecutionPackage[];
95
+ }
96
+ export interface DesktopMcpCatalogService {
97
+ id: string;
98
+ code: string;
99
+ name: string;
100
+ summary?: string;
101
+ icon?: DesktopMcpServiceIcon;
102
+ category: DesktopMcpServiceCategory;
103
+ softwareName: string;
104
+ softwareVersions: string[];
105
+ upstreamRepository: string;
106
+ licenseSpdx: string;
107
+ riskLevel: DesktopMcpRiskLevel;
108
+ currentVersion: DesktopMcpServiceVersion;
109
+ localSoftware?: {
110
+ status: 'NOT_CONFIGURED' | 'DETECTED' | 'NOT_FOUND';
111
+ matchedPath?: string;
112
+ };
113
+ }
114
+ export interface DesktopMcpCatalogQuery {
115
+ keyword?: string;
116
+ category?: DesktopMcpServiceCategory;
117
+ }
118
+ export interface DesktopMcpDownloadTicket {
119
+ serviceId: string;
120
+ serviceCode: string;
121
+ serviceName: string;
122
+ versionId: string;
123
+ versionNo: string;
124
+ manifest: DesktopMcpRuntimeManifest;
125
+ executionPackage: DesktopMcpExecutionPackage & {
126
+ downloadUrl: string;
127
+ };
128
+ expiresInSeconds: number;
129
+ }
130
+ export interface DesktopMcpInstalledService {
131
+ serviceId: string;
132
+ serviceCode: string;
133
+ serviceName: string;
134
+ versionId: string;
135
+ versionNo: string;
136
+ packageId: string;
137
+ packageSha256: string;
138
+ installPath: string;
139
+ installedAt: string;
140
+ status: DesktopMcpInstallStatus;
141
+ server: LocalMcpServer;
142
+ }
143
+ export interface InstallDesktopMcpServiceRequest {
144
+ serviceId: string;
145
+ }
146
+ export interface SetDesktopMcpServiceEnabledRequest {
147
+ serviceId: string;
148
+ enabled: boolean;
149
+ }
150
+ export interface DesktopMcpServiceApi {
151
+ listCatalog: (query?: DesktopMcpCatalogQuery) => Promise<DesktopMcpCatalogService[]>;
152
+ listInstalled: () => Promise<DesktopMcpInstalledService[]>;
153
+ install: (request: InstallDesktopMcpServiceRequest) => Promise<DesktopMcpInstalledService>;
154
+ onInstallProgress: (listener: (progress: DesktopMcpInstallProgress) => void) => () => void;
155
+ setEnabled: (request: SetDesktopMcpServiceEnabledRequest) => Promise<DesktopMcpInstalledService>;
156
+ remove: (serviceId: string) => Promise<void>;
157
+ }