@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,74 @@
1
+ export type DesktopPlatform = 'macos' | 'windows' | 'linux' | 'other';
2
+ export type LinuxSystemPermissionKind = 'linux-desktop' | 'linux-accessibility';
3
+ export type SystemPermissionKind = 'full-disk-access' | 'accessibility' | 'automation' | LinuxSystemPermissionKind;
4
+ export type SystemPermissionStatus = 'authorized' | 'not-authorized' | 'not-determined';
5
+ export interface FileSecurityPolicy {
6
+ autoAllowPaths: string[];
7
+ requireApprovalPaths: string[];
8
+ }
9
+ export interface CommandSecurityPolicy {
10
+ allowCommands: string[];
11
+ requireApprovalCommands: string[];
12
+ denyCommands: string[];
13
+ }
14
+ export interface NetworkSecurityPolicy {
15
+ blockAll: boolean;
16
+ allowDomains: string[];
17
+ denyDomains: string[];
18
+ }
19
+ export interface DesktopSecurityPolicy {
20
+ file: FileSecurityPolicy;
21
+ command: CommandSecurityPolicy;
22
+ network: NetworkSecurityPolicy;
23
+ }
24
+ export type SecurityRuntimeToolId = 'python' | 'node' | 'git-bash';
25
+ export type SecurityRuntimeToolEnablement = Record<SecurityRuntimeToolId, boolean>;
26
+ export declare function createDefaultRuntimeToolEnablement(): SecurityRuntimeToolEnablement;
27
+ export interface DesktopRuntimeSecuritySettings {
28
+ policy: DesktopSecurityPolicy;
29
+ deletionProtection: boolean;
30
+ runtimeToolsEnabled: SecurityRuntimeToolEnablement;
31
+ }
32
+ export declare const DEFAULT_SENSITIVE_FILE_PATHS_BY_PLATFORM: {
33
+ readonly macos: readonly ["~/.ssh/", "~/.aws/", "~/.gnupg/", "~/.gpg/", "~/.kube/config", "~/.docker/config.json", "~/.docker/daemon.json", "~/.netrc", "~/.npmrc", "~/.pypirc", "~/.gem/credentials", "~/.config/gh/hosts.yml", "~/.git-credentials", "~/.config/gcloud/", "~/.azure/", "~/.terraform.d/credentials.tfrc.json", "~/library/keychains/"];
34
+ readonly windows: readonly ["%USERPROFILE%\\.ssh\\", "%USERPROFILE%\\.aws\\", "%USERPROFILE%\\.kube\\config", "%USERPROFILE%\\.docker\\config.json", "%USERPROFILE%\\.docker\\daemon.json", "%USERPROFILE%\\.netrc", "%USERPROFILE%\\.npmrc", "%USERPROFILE%\\.pypirc", "%USERPROFILE%\\.gem\\credentials", "%USERPROFILE%\\.config\\gh\\hosts.yml", "%USERPROFILE%\\.git-credentials", "%USERPROFILE%\\.config\\gcloud\\", "%USERPROFILE%\\.azure\\", "%USERPROFILE%\\.terraform.d\\credentials.tfrc.json"];
35
+ readonly linux: readonly ["~/.ssh/", "~/.aws/", "~/.gnupg/", "~/.gpg/", "~/.kube/config", "~/.docker/config.json", "~/.docker/daemon.json", "~/.netrc", "~/.npmrc", "~/.pypirc", "~/.gem/credentials", "~/.config/gh/hosts.yml", "~/.git-credentials", "~/.config/gcloud/", "~/.azure/", "~/.terraform.d/credentials.tfrc.json", "/etc/", "/root/", "/boot/", "/dev/", "~/.local/share/keyrings/", "~/.password-store/"];
36
+ readonly other: readonly ["~/.ssh/", "~/.aws/", "~/.gnupg/", "~/.gpg/", "~/.kube/config", "~/.docker/config.json", "~/.docker/daemon.json", "~/.netrc", "~/.npmrc", "~/.pypirc", "~/.gem/credentials", "~/.config/gh/hosts.yml", "~/.git-credentials", "~/.config/gcloud/", "~/.azure/", "~/.terraform.d/credentials.tfrc.json"];
37
+ };
38
+ export declare function desktopPlatformFromNodePlatform(platform?: string): DesktopPlatform;
39
+ export declare function currentDesktopPlatform(): DesktopPlatform;
40
+ export declare function getDefaultSensitiveFilePaths(platform: DesktopPlatform): ("/etc/" | "/root/" | "/boot/" | "/dev/" | "~/.ssh/" | "~/.aws/" | "~/.gnupg/" | "~/.gpg/" | "~/.kube/config" | "~/.docker/config.json" | "~/.docker/daemon.json" | "~/.netrc" | "~/.npmrc" | "~/.pypirc" | "~/.gem/credentials" | "~/.config/gh/hosts.yml" | "~/.git-credentials" | "~/.config/gcloud/" | "~/.azure/" | "~/.terraform.d/credentials.tfrc.json" | "~/library/keychains/" | "%USERPROFILE%\\.ssh\\" | "%USERPROFILE%\\.aws\\" | "%USERPROFILE%\\.kube\\config" | "%USERPROFILE%\\.docker\\config.json" | "%USERPROFILE%\\.docker\\daemon.json" | "%USERPROFILE%\\.netrc" | "%USERPROFILE%\\.npmrc" | "%USERPROFILE%\\.pypirc" | "%USERPROFILE%\\.gem\\credentials" | "%USERPROFILE%\\.config\\gh\\hosts.yml" | "%USERPROFILE%\\.git-credentials" | "%USERPROFILE%\\.config\\gcloud\\" | "%USERPROFILE%\\.azure\\" | "%USERPROFILE%\\.terraform.d\\credentials.tfrc.json" | "~/.local/share/keyrings/" | "~/.password-store/")[];
41
+ export declare function mergeDefaultSensitiveFilePaths(values: readonly string[], platform: DesktopPlatform): string[];
42
+ export declare const DEFAULT_DENIED_COMMANDS: readonly ["rm -rf /", "rm -rf /*", "mkfs", "format c:", "diskpart clean", "clear-disk", "initialize-disk", "remove-partition", "remove-volume", "format-volume", "wmic partition delete", "wmic logicaldisk delete", "bcdedit /delete", "vssadmin delete shadows", "wbadmin delete", "shutdown", "reboot"];
43
+ export declare function mergeDefaultDeniedCommands(values: string[], platform: DesktopPlatform): string[];
44
+ export declare function createDefaultSecurityPolicy(platform?: DesktopPlatform): DesktopSecurityPolicy;
45
+ export interface SecurityRuntimeTool {
46
+ id: SecurityRuntimeToolId;
47
+ name: string;
48
+ description: string;
49
+ available: boolean;
50
+ enabled: boolean;
51
+ version?: string;
52
+ systemVersion?: string;
53
+ }
54
+ export interface SecuritySystemPermission {
55
+ kind: SystemPermissionKind;
56
+ name: string;
57
+ description: string;
58
+ status: SystemPermissionStatus;
59
+ required: false;
60
+ }
61
+ export interface SecurityCenterSnapshot {
62
+ platform: DesktopPlatform;
63
+ sandboxEnabled: boolean;
64
+ commandApprovalEnabled: boolean;
65
+ networkAccessEnabled: boolean;
66
+ securityGatewayEnabled: boolean;
67
+ transportEncrypted: boolean;
68
+ runtimeTools: SecurityRuntimeTool[];
69
+ systemPermissions: SecuritySystemPermission[];
70
+ }
71
+ export interface SecurityCenterApi {
72
+ getSnapshot: () => Promise<SecurityCenterSnapshot>;
73
+ requestSystemPermission: (kind: SystemPermissionKind) => Promise<SecurityCenterSnapshot>;
74
+ }
@@ -0,0 +1,71 @@
1
+ export type SensitiveRuleSource = 'system' | 'user';
2
+ export type SensitiveDecision = 'original' | 'protect' | 'deny';
3
+ export interface SensitiveRule {
4
+ id: string;
5
+ name: string;
6
+ source: SensitiveRuleSource;
7
+ enabled: boolean;
8
+ config: string;
9
+ keywords: boolean;
10
+ entropy: boolean;
11
+ }
12
+ export interface SensitiveEntry {
13
+ id: string;
14
+ name: string;
15
+ source: 'user';
16
+ enabled: boolean;
17
+ plaintext: string;
18
+ ciphertext: string;
19
+ }
20
+ /** A renderer projection, never an authorization decision or a substitute for scanning. */
21
+ export interface SensitiveReference {
22
+ id: string;
23
+ ciphertext: string;
24
+ ruleNames: string[];
25
+ }
26
+ export interface SensitiveProtectionSnapshot {
27
+ enabled: boolean;
28
+ rules: SensitiveRule[];
29
+ entries: SensitiveEntry[];
30
+ }
31
+ export type SensitiveProtectionMutation = {
32
+ kind: 'enabled';
33
+ enabled: boolean;
34
+ } | {
35
+ kind: 'rule';
36
+ id?: string;
37
+ name: string;
38
+ config: string;
39
+ } | {
40
+ kind: 'rule-enabled';
41
+ id: string;
42
+ enabled: boolean;
43
+ } | {
44
+ kind: 'rule-delete';
45
+ id: string;
46
+ } | {
47
+ kind: 'entry';
48
+ name: string;
49
+ plaintext: string;
50
+ } | {
51
+ kind: 'entry-enabled';
52
+ id: string;
53
+ enabled: boolean;
54
+ } | {
55
+ kind: 'entry-delete';
56
+ id: string;
57
+ };
58
+ export interface SensitiveProtectionApi {
59
+ snapshot(): Promise<SensitiveProtectionSnapshot>;
60
+ update(request: SensitiveProtectionMutation): Promise<SensitiveProtectionSnapshot>;
61
+ reveal(taskId: string, id: string): Promise<string>;
62
+ references(taskId: string): Promise<SensitiveReference[]>;
63
+ }
64
+ export interface SensitiveMatch extends SensitiveReference {
65
+ plaintext: string;
66
+ }
67
+ export interface SensitiveInspection {
68
+ enabled: boolean;
69
+ matches: SensitiveMatch[];
70
+ }
71
+ export declare function sensitiveProtectionActive(permissionMode: string, enabled: boolean): boolean;
@@ -0,0 +1,26 @@
1
+ import { type TaskPathPolicy } from './task-path-policy.js';
2
+ export interface SessionMemoryPolicy {
3
+ scope: string;
4
+ read: boolean;
5
+ write: boolean;
6
+ }
7
+ export interface RunMemoryPolicy {
8
+ read?: boolean;
9
+ write?: boolean;
10
+ }
11
+ /** A turn may narrow the session grant, never widen it or change its namespace. */
12
+ export declare function narrowMemoryPolicy(base: SessionMemoryPolicy | undefined, value?: unknown): SessionMemoryPolicy | undefined;
13
+ export interface SessionScopePolicy {
14
+ scope: string;
15
+ memory: SessionMemoryPolicy;
16
+ paths?: TaskPathPolicy;
17
+ }
18
+ export interface ApplicationRule {
19
+ id: string;
20
+ version: string;
21
+ scope: 'application' | 'project' | 'session';
22
+ text: string;
23
+ }
24
+ export declare function parseSessionPolicy(value: unknown, sessionId: string): SessionScopePolicy;
25
+ export declare function parseApplicationRules(value: unknown): ApplicationRule[];
26
+ export declare function applicationInstructions(instructions: string, rules?: ApplicationRule[]): string;
@@ -0,0 +1,7 @@
1
+ export declare const SHORTCUT_COMMANDS: readonly ["openSettings", "toggleVoice", "searchConversation", "sendMessage", "insertNewline", "newTask", "stopGeneration", "previousTask", "nextTask", "toggleSidebar", "toggleResourcePanel", "toggleFullscreen", "toggleMainWindow", "increaseFont", "decreaseFont", "resetFont", "openReferencePicker", "openSlashCommands"];
2
+ export type ShortcutCommand = (typeof SHORTCUT_COMMANDS)[number];
3
+ export type ShortcutBindings = Partial<Record<ShortcutCommand, string | null>>;
4
+ export declare const MAC_DEFAULT_SHORTCUT_BINDINGS: Record<ShortcutCommand, string>;
5
+ export declare const WINDOWS_DEFAULT_SHORTCUT_BINDINGS: Record<ShortcutCommand, string>;
6
+ export declare function defaultShortcutBindings(isMac: boolean): Record<ShortcutCommand, string>;
7
+ export declare const FIXED_SHORTCUT_COMMANDS: Set<"openSettings" | "toggleVoice" | "searchConversation" | "sendMessage" | "insertNewline" | "newTask" | "stopGeneration" | "previousTask" | "nextTask" | "toggleSidebar" | "toggleResourcePanel" | "toggleFullscreen" | "toggleMainWindow" | "increaseFont" | "decreaseFont" | "resetFont" | "openReferencePicker" | "openSlashCommands">;
@@ -0,0 +1,8 @@
1
+ export interface SetSkillEnabledRequest {
2
+ skillId: string;
3
+ enabled: boolean;
4
+ }
5
+ export interface SkillActivationApi {
6
+ listDisabledSkillIds: () => Promise<string[]>;
7
+ setEnabled: (request: SetSkillEnabledRequest) => Promise<void>;
8
+ }
@@ -0,0 +1,12 @@
1
+ export interface SkillAssetReadRequest {
2
+ source: string;
3
+ }
4
+ export interface SkillAssetContent {
5
+ name: string;
6
+ mediaType: string;
7
+ sizeBytes: number;
8
+ data: ArrayBuffer;
9
+ }
10
+ export interface SkillAssetApi {
11
+ read: (request: SkillAssetReadRequest) => Promise<SkillAssetContent>;
12
+ }
@@ -0,0 +1,119 @@
1
+ export type SkillMarketPriceType = 'FREE' | 'PAID';
2
+ export type SkillMarketScope = 'PLATFORM' | 'ENTERPRISE' | 'MINE';
3
+ export declare function skillMarketItemKey(skill: {
4
+ skillId: string;
5
+ tenantId?: string | null;
6
+ }): string;
7
+ export interface SkillMarketItem {
8
+ executionScope?: string;
9
+ skillId: string;
10
+ /** Scope of the user's binding, independent of the tab/source label. */
11
+ tenantId?: string | null;
12
+ ownerType?: string | null;
13
+ name: string;
14
+ summary: string;
15
+ iconUrl: string | null;
16
+ priceType: SkillMarketPriceType;
17
+ priceLabel: string;
18
+ developerName: string;
19
+ isOpenSource: boolean;
20
+ isOfficial: boolean;
21
+ userCount: number;
22
+ userCountLabel: string;
23
+ categoryCode: string | null;
24
+ categoryName: string | null;
25
+ installed: boolean;
26
+ canInstall: boolean;
27
+ canUse: boolean;
28
+ publishStatus?: string | null;
29
+ publishedVersion?: string | null;
30
+ location?: 'CLOUD' | 'LOCAL';
31
+ }
32
+ export interface SkillMarketCategory {
33
+ categoryId: string | null;
34
+ categoryCode: string;
35
+ categoryName: string;
36
+ sortNo: number;
37
+ }
38
+ export interface SkillMarketSection {
39
+ sectionId: string;
40
+ sectionCode: string;
41
+ sectionName: string;
42
+ sortNo: number;
43
+ items: SkillMarketItem[];
44
+ }
45
+ export interface SkillMarketHome {
46
+ sections: SkillMarketSection[];
47
+ }
48
+ export interface SkillMarketSearchQuery {
49
+ scope?: SkillMarketScope;
50
+ enabledOnly?: boolean;
51
+ keyword?: string;
52
+ categoryCode?: string;
53
+ pageNum?: number;
54
+ pageSize?: number;
55
+ }
56
+ export interface SkillMarketSearchResult {
57
+ items: SkillMarketItem[];
58
+ total: number;
59
+ /** MINE merges two independently paginated collections; their union size is not a page cursor. */
60
+ hasMore?: boolean;
61
+ }
62
+ export interface SkillMarketVersion {
63
+ versionId: string;
64
+ versionNo: string;
65
+ packageRef: string | null;
66
+ deployStatus: string | null;
67
+ configJson: string | null;
68
+ changelog: string | null;
69
+ updatedAt: string | null;
70
+ }
71
+ export interface PrepareSkillForLocalTaskRequest {
72
+ skillId: string;
73
+ source: SkillMarketScope;
74
+ tenantId?: string | null;
75
+ }
76
+ export interface InstallSkillRequest {
77
+ skillId: string;
78
+ source: 'STORE' | 'ENTERPRISE';
79
+ tenantId?: string | null;
80
+ }
81
+ export interface SkillMarketRating {
82
+ averageScore: number;
83
+ ratingCount: number;
84
+ starCountMap: Record<string, number>;
85
+ }
86
+ export interface SkillMarketCase {
87
+ caseId: string;
88
+ title: string;
89
+ coverUrl: string | null;
90
+ description: string | null;
91
+ }
92
+ export interface SkillMarketUserState {
93
+ installed: boolean;
94
+ enabled: boolean;
95
+ purchased: boolean;
96
+ subscriptionExpired: boolean;
97
+ canInstall: boolean;
98
+ canUse: boolean;
99
+ canEnable: boolean;
100
+ hasUsed: boolean;
101
+ actionScope: string;
102
+ actionDisabledReason: string | null;
103
+ }
104
+ export interface SkillMarketDetail extends SkillMarketItem {
105
+ description: string;
106
+ currentVersion: SkillMarketVersion | null;
107
+ rating: SkillMarketRating;
108
+ cases: SkillMarketCase[];
109
+ userSkillState: SkillMarketUserState;
110
+ }
111
+ export interface SkillMarketApi {
112
+ getHome: () => Promise<SkillMarketHome>;
113
+ listCategories: () => Promise<SkillMarketCategory[]>;
114
+ search: (query?: SkillMarketSearchQuery) => Promise<SkillMarketSearchResult>;
115
+ getDetail: (skillId: string, tenantId?: string | null) => Promise<SkillMarketDetail>;
116
+ install: (request: InstallSkillRequest) => Promise<void>;
117
+ remove: (skillId: string, tenantId?: string | null) => Promise<void>;
118
+ prepareForLocalTask: (request: PrepareSkillForLocalTaskRequest) => Promise<import('./local-task-api.js').LocalTaskSkillReference>;
119
+ }
@@ -0,0 +1,16 @@
1
+ export declare const PERSONAL_SKILL_UPLOAD_PATH: "/api/v1/skills/upload";
2
+ export declare const MAX_SKILL_UPLOAD_BYTES: number;
3
+ export interface PersonalSkillUploadRequest {
4
+ fileName: string;
5
+ data: ArrayBuffer;
6
+ }
7
+ export interface PersonalSkillUploadResult {
8
+ skillId: string;
9
+ versionId: string;
10
+ name: string;
11
+ scope: 'PERSONAL';
12
+ tenantId: null;
13
+ publishStatus: 'UNPUBLISHED';
14
+ }
15
+ export declare function validateSkillUploadFile(name: string, size: number): void;
16
+ export declare function parsePersonalSkillUploadResult(value: unknown): PersonalSkillUploadResult;
@@ -0,0 +1,12 @@
1
+ export interface SpeechRecognitionRequest {
2
+ audio: ArrayBuffer;
3
+ mediaType: 'audio/webm' | 'audio/mp4' | 'audio/wav';
4
+ durationMs: number;
5
+ }
6
+ export interface SpeechRecognitionResult {
7
+ text: string;
8
+ durationMs: number;
9
+ }
10
+ export interface SpeechRecognitionApi {
11
+ transcribe(request: SpeechRecognitionRequest): Promise<SpeechRecognitionResult>;
12
+ }
@@ -0,0 +1,15 @@
1
+ export type StorageProblem = 'missing' | 'temporarily_unavailable' | 'corrupt' | 'unsupported_version';
2
+ export interface StorageIntegrityIssue {
3
+ canReset?: boolean;
4
+ id: string;
5
+ fileName: string;
6
+ status: StorageProblem;
7
+ message: string;
8
+ detectedAt: string;
9
+ recoveryAvailable: boolean;
10
+ }
11
+ export interface StorageIntegrityApi {
12
+ listIssues(): Promise<StorageIntegrityIssue[]>;
13
+ recover(issueId: string): Promise<void>;
14
+ reset(issueId: string): Promise<void>;
15
+ }
@@ -0,0 +1,67 @@
1
+ import type { ExecutionTargetIdentity, ExecutionTargetPlatform } from './execution-target.js';
2
+ /** Independent of the desktop, CLI product version, and private daemon protocol. */
3
+ export declare const TARGET_BRIDGE_PROTOCOL = 1;
4
+ export interface TargetBridgeInfo {
5
+ identity: ExecutionTargetIdentity;
6
+ platform: ExecutionTargetPlatform;
7
+ arch: string;
8
+ cliVersion: string;
9
+ daemonInstanceId: string;
10
+ protocol: {
11
+ min: number;
12
+ max: number;
13
+ };
14
+ capabilities: string[];
15
+ }
16
+ export interface BridgeRequestSession {
17
+ generation: string;
18
+ target: ExecutionTargetIdentity;
19
+ auth?: {
20
+ bindingId: string;
21
+ clientAuthGeneration: number;
22
+ };
23
+ }
24
+ export interface TargetBridgeRequest {
25
+ type: 'request';
26
+ requestId: string;
27
+ method: string;
28
+ params: Record<string, unknown>;
29
+ session?: BridgeRequestSession;
30
+ }
31
+ export type TargetBridgeResponse = {
32
+ type: 'response';
33
+ requestId: string;
34
+ generation?: string;
35
+ auth?: {
36
+ bindingId: string;
37
+ clientAuthGeneration: number;
38
+ };
39
+ } & ({
40
+ ok: true;
41
+ result: unknown;
42
+ } | {
43
+ ok: false;
44
+ error: {
45
+ code: string;
46
+ message: string;
47
+ };
48
+ });
49
+ export interface TargetBridgeHello {
50
+ generation: string;
51
+ protocol: number;
52
+ target: TargetBridgeInfo;
53
+ authentication: {
54
+ state: 'unbound';
55
+ };
56
+ }
57
+ export interface TargetBridgeEvent {
58
+ type: 'event';
59
+ generation: string;
60
+ subscriptionId: string;
61
+ topic: string;
62
+ auth: {
63
+ bindingId: string;
64
+ clientAuthGeneration: number;
65
+ };
66
+ data: unknown;
67
+ }
@@ -0,0 +1,15 @@
1
+ import type { LocalEnvironmentCatalog, LocalEnvironmentFile, SaveLocalEnvironmentRequest } from './local-environment-api.js';
2
+ export interface TargetEnvironmentMethods {
3
+ list(): Promise<LocalEnvironmentCatalog>;
4
+ save(request: SaveLocalEnvironmentRequest): Promise<LocalEnvironmentFile>;
5
+ remove(request: {
6
+ localWorkspaceId: string;
7
+ fileName: string;
8
+ expectedRevision: string;
9
+ }): Promise<void>;
10
+ select(request: {
11
+ localWorkspaceId: string;
12
+ environmentId?: string;
13
+ }): Promise<void>;
14
+ }
15
+ export declare const TARGET_ENVIRONMENT_NAMES: readonly (keyof TargetEnvironmentMethods)[];
@@ -0,0 +1,105 @@
1
+ import type { TaskRef, WorkspaceRef } from './execution-target.js';
2
+ import type { AvailableChatModel } from './cloud-assistant-api.js';
3
+ import type { LocalCustomModel, SaveLocalCustomModelRequest } from './local-custom-model-api.js';
4
+ import type { LocalPluginApi } from './local-plugin-api.js';
5
+ import type { ProfessionMarketApi } from './profession-market-api.js';
6
+ import type { TaskInitializationApi } from './task-initialization-api.js';
7
+ import type { SkillMarketItem } from './skill-market-api.js';
8
+ import type { LocalMcpServer, SaveLocalMcpServerRequest, SetLocalMcpServerEnabledRequest, SetLocalMcpServerToolEnabledRequest } from './local-mcp-server-api.js';
9
+ export interface TargetMcpCatalog {
10
+ items: LocalMcpServer[];
11
+ revision: string;
12
+ }
13
+ export interface TargetModelCatalog {
14
+ items: LocalCustomModel[];
15
+ revision: string;
16
+ }
17
+ export type TargetModelCommand = {
18
+ expectedRevision: string;
19
+ } & ({
20
+ action: 'save';
21
+ request: SaveLocalCustomModelRequest;
22
+ } | {
23
+ action: 'remove';
24
+ request: string;
25
+ });
26
+ export type TargetMcpCommand = {
27
+ expectedRevision: string;
28
+ } & ({
29
+ action: 'save';
30
+ request: SaveLocalMcpServerRequest;
31
+ } | {
32
+ action: 'enable';
33
+ request: SetLocalMcpServerEnabledRequest;
34
+ } | {
35
+ action: 'tool';
36
+ request: SetLocalMcpServerToolEnabledRequest;
37
+ } | {
38
+ action: 'remove' | 'discover' | 'grant' | 'revoke';
39
+ request: string;
40
+ });
41
+ export interface TargetResourceMethods {
42
+ modelList: () => Promise<TargetModelCatalog>;
43
+ modelCommand: (command: TargetModelCommand) => Promise<{
44
+ catalog: TargetModelCatalog;
45
+ model?: LocalCustomModel;
46
+ }>;
47
+ mcpList: () => Promise<TargetMcpCatalog>;
48
+ mcpCommand: (command: TargetMcpCommand) => Promise<TargetMcpCatalog>;
49
+ models: () => Promise<{
50
+ models: AvailableChatModel[];
51
+ customModels: LocalCustomModel[];
52
+ warnings: string[];
53
+ }>;
54
+ skills: () => Promise<{
55
+ items: SkillMarketItem[];
56
+ warnings: string[];
57
+ }>;
58
+ plugins: LocalPluginApi['list'];
59
+ setPluginEnabled: LocalPluginApi['setEnabled'];
60
+ professions: (query: Parameters<ProfessionMarketApi['listInstalled']>[0]) => Promise<Awaited<ReturnType<ProfessionMarketApi['listInstalled']>> & {
61
+ warnings: string[];
62
+ }>;
63
+ prepareProfession: ProfessionMarketApi['prepareForLocalTask'];
64
+ recordProfessionUsage: ProfessionMarketApi['recordUsage'];
65
+ generateTitle: TaskInitializationApi['generateTitle'];
66
+ enhancePrompt: TaskInitializationApi['enhancePrompt'];
67
+ recommendModel: TaskInitializationApi['recommendModel'];
68
+ resolveModelForExecution: TaskInitializationApi['resolveModelForExecution'];
69
+ }
70
+ export type TargetResourceName = keyof TargetResourceMethods;
71
+ export type TargetResourceScope = {
72
+ connectionId: string;
73
+ workspace: WorkspaceRef;
74
+ } | {
75
+ task: TaskRef;
76
+ };
77
+ export interface TargetSkillSyncPlan {
78
+ id: string;
79
+ sourceName: string;
80
+ folderName: string;
81
+ sha256: string;
82
+ sizeBytes: number;
83
+ files: number;
84
+ }
85
+ export interface TargetExpertSyncPlan {
86
+ id: string;
87
+ expertId: string;
88
+ name: string;
89
+ version: string;
90
+ sha256: string;
91
+ sizeBytes: number;
92
+ files: number;
93
+ skills: Array<{
94
+ reference: string;
95
+ folderName: string;
96
+ sha256: string;
97
+ sizeBytes: number;
98
+ files: number;
99
+ }>;
100
+ warnings: string[];
101
+ }
102
+ export interface TargetResourcesApi {
103
+ invoke<K extends TargetResourceName>(scope: TargetResourceScope, method: K, args: Parameters<TargetResourceMethods[K]>): Promise<Awaited<ReturnType<TargetResourceMethods[K]>>>;
104
+ }
105
+ export declare const TARGET_RESOURCE_NAMES: readonly TargetResourceName[];
@@ -0,0 +1,44 @@
1
+ export interface GenerateTaskTitleRequest {
2
+ permissionMode?: 'ask_dangerous' | 'allow_all';
3
+ prompt: string;
4
+ projectId?: string;
5
+ }
6
+ export interface GenerateTaskTitleResult {
7
+ title: string;
8
+ model: string;
9
+ }
10
+ export interface EnhanceTaskPromptRequest {
11
+ permissionMode?: 'ask_dangerous' | 'allow_all';
12
+ prompt: string;
13
+ projectId?: string;
14
+ }
15
+ export interface EnhanceTaskPromptResult {
16
+ prompt: string;
17
+ model: string;
18
+ }
19
+ export interface RecommendTaskModelRequest {
20
+ permissionMode?: 'ask_dangerous' | 'allow_all';
21
+ prompt: string;
22
+ projectId?: string;
23
+ attachments?: Array<{
24
+ name: string;
25
+ mediaType: string;
26
+ }>;
27
+ }
28
+ export interface RecommendTaskModelResult {
29
+ model: string;
30
+ source: 'recommended' | 'default';
31
+ }
32
+ export interface ResolveTaskExecutionModelRequest extends RecommendTaskModelRequest {
33
+ recommendedModel?: string;
34
+ }
35
+ export interface ResolveTaskExecutionModelResult {
36
+ model: string;
37
+ source: 'existing' | 'recommended' | 'default';
38
+ }
39
+ export interface TaskInitializationApi {
40
+ generateTitle(request: GenerateTaskTitleRequest): Promise<GenerateTaskTitleResult>;
41
+ enhancePrompt(request: EnhanceTaskPromptRequest): Promise<EnhanceTaskPromptResult>;
42
+ recommendModel(request: RecommendTaskModelRequest): Promise<RecommendTaskModelResult>;
43
+ resolveModelForExecution(request: ResolveTaskExecutionModelRequest): Promise<ResolveTaskExecutionModelResult>;
44
+ }
@@ -0,0 +1,27 @@
1
+ export type TaskMenuTarget = {
2
+ kind: 'local';
3
+ taskId: string;
4
+ } | {
5
+ kind: 'cloud';
6
+ taskId: string;
7
+ projectId: string;
8
+ };
9
+ export type TaskMenuAction = {
10
+ kind: 'new-task';
11
+ } | TaskMenuTarget;
12
+ export interface TaskMenuEntry {
13
+ target: TaskMenuTarget;
14
+ title: string;
15
+ projectName?: string;
16
+ updatedAt: string;
17
+ unread: boolean;
18
+ }
19
+ export interface TaskMenuSnapshot {
20
+ ownerUserId: string;
21
+ source: 'local' | 'cloud';
22
+ tasks: TaskMenuEntry[];
23
+ }
24
+ export interface TaskMenuApi {
25
+ update(snapshot: TaskMenuSnapshot): Promise<void>;
26
+ onAction(listener: (action: TaskMenuAction) => void): () => void;
27
+ }
@@ -0,0 +1,19 @@
1
+ /** A reference to the existing execution owner, never another task or scheduler. */
2
+ export interface TaskOperationReference {
3
+ id: string;
4
+ sessionId: string;
5
+ runId: string;
6
+ kind: 'process' | 'document' | 'model-media';
7
+ ownerId: string;
8
+ createdAt: string;
9
+ }
10
+ export interface TaskOperationSnapshot {
11
+ reference: TaskOperationReference;
12
+ status: 'running' | 'completed' | 'failed' | 'cancelled' | 'unknown';
13
+ canCancel: boolean;
14
+ observedAt: string;
15
+ /** Actual owner response. This can include expiring remote download URLs; it is not browser-safe HTML. */
16
+ result?: unknown;
17
+ /** Unknown is not success or cancellation; e.g. a process owner exited without a terminal record. */
18
+ reason?: string;
19
+ }
@@ -0,0 +1,14 @@
1
+ /** Explicit host grants. Omitted policy preserves existing desktop/CLI task behavior. */
2
+ export interface TaskPathPolicy {
3
+ cwd?: string;
4
+ readRoots: string[];
5
+ writeRoots: string[];
6
+ /** Elevated requires a sandbox already provisioned by the machine administrator. */
7
+ windowsSandbox?: 'unelevated' | 'elevated';
8
+ }
9
+ export interface ResolvedTaskPathPolicy extends TaskPathPolicy {
10
+ cwd: string;
11
+ workspaceRoot: string;
12
+ stateRoot: string;
13
+ }
14
+ export declare function parseTaskPathPolicy(value: unknown): TaskPathPolicy;