@kmlckj/aios-agent-server-sdk 0.0.0-stage → 0.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 (141) hide show
  1. package/EVENTS.md +88 -0
  2. package/README.md +656 -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 +65 -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 +260 -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 +39 -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 +405 -0
  35. package/dist/shared/account-context-api.d.ts +47 -0
  36. package/dist/shared/account-schedules-api.d.ts +110 -0
  37. package/dist/shared/action-center-api.d.ts +50 -0
  38. package/dist/shared/agent-capabilities.d.ts +42 -0
  39. package/dist/shared/agent-hooks.d.ts +10 -0
  40. package/dist/shared/agent-team.d.ts +19 -0
  41. package/dist/shared/artifact-evidence.d.ts +18 -0
  42. package/dist/shared/automation-api.d.ts +112 -0
  43. package/dist/shared/client-downloads-api.d.ts +20 -0
  44. package/dist/shared/cloud-assistant-api.d.ts +532 -0
  45. package/dist/shared/cloud-task-resources.d.ts +24 -0
  46. package/dist/shared/cloud-task-runtime-api.d.ts +253 -0
  47. package/dist/shared/collaboration-api.d.ts +17 -0
  48. package/dist/shared/collaboration-automation-api.d.ts +55 -0
  49. package/dist/shared/collaboration-deep-link.d.ts +15 -0
  50. package/dist/shared/collaboration-event-api.d.ts +19 -0
  51. package/dist/shared/collaboration-plan-api.d.ts +159 -0
  52. package/dist/shared/collaboration-project-api.d.ts +206 -0
  53. package/dist/shared/collaboration-resource-api.d.ts +41 -0
  54. package/dist/shared/collaboration-task-api.d.ts +276 -0
  55. package/dist/shared/collaboration-task-execution.d.ts +39 -0
  56. package/dist/shared/computer-use-api.d.ts +80 -0
  57. package/dist/shared/computer-use-handshake.d.ts +19 -0
  58. package/dist/shared/computer-use-protocol.d.ts +488 -0
  59. package/dist/shared/context-usage.d.ts +15 -0
  60. package/dist/shared/desktop-api.d.ts +450 -0
  61. package/dist/shared/desktop-diagnostics-api.d.ts +56 -0
  62. package/dist/shared/desktop-language.d.ts +3 -0
  63. package/dist/shared/desktop-mcp-service-api.d.ts +157 -0
  64. package/dist/shared/document-session-api.d.ts +91 -0
  65. package/dist/shared/enterprise-knowledge-api.d.ts +103 -0
  66. package/dist/shared/enterprise-project-api.d.ts +26 -0
  67. package/dist/shared/execution-activity.d.ts +3 -0
  68. package/dist/shared/execution-context.d.ts +62 -0
  69. package/dist/shared/execution-identity.d.ts +7 -0
  70. package/dist/shared/execution-profile.d.ts +6 -0
  71. package/dist/shared/execution-target.d.ts +71 -0
  72. package/dist/shared/expert-selection.d.ts +22 -0
  73. package/dist/shared/expert-team-api.d.ts +54 -0
  74. package/dist/shared/feedback-api.d.ts +20 -0
  75. package/dist/shared/git-api.d.ts +227 -0
  76. package/dist/shared/git-http-api.d.ts +12 -0
  77. package/dist/shared/hosted-git-api.d.ts +132 -0
  78. package/dist/shared/js-agent-hooks.d.ts +23 -0
  79. package/dist/shared/local-custom-model-api.d.ts +55 -0
  80. package/dist/shared/local-environment-api.d.ts +110 -0
  81. package/dist/shared/local-mcp-server-api.d.ts +91 -0
  82. package/dist/shared/local-memory.d.ts +165 -0
  83. package/dist/shared/local-plugin-api.d.ts +26 -0
  84. package/dist/shared/local-runtime-api.d.ts +32 -0
  85. package/dist/shared/local-skill-api.d.ts +42 -0
  86. package/dist/shared/local-task-api.d.ts +658 -0
  87. package/dist/shared/local-task-command-client.d.ts +55 -0
  88. package/dist/shared/local-task-command.d.ts +93 -0
  89. package/dist/shared/local-task-event-projection.d.ts +29 -0
  90. package/dist/shared/local-task-projection.d.ts +29 -0
  91. package/dist/shared/local-workspace.d.ts +9 -0
  92. package/dist/shared/managed-authorization.d.ts +72 -0
  93. package/dist/shared/memory-customization.d.ts +32 -0
  94. package/dist/shared/model-routing.d.ts +31 -0
  95. package/dist/shared/model-selection.d.ts +11 -0
  96. package/dist/shared/my-expert-api.d.ts +119 -0
  97. package/dist/shared/navigation-api.d.ts +20 -0
  98. package/dist/shared/office-window-api.d.ts +81 -0
  99. package/dist/shared/platform-branding-api.d.ts +66 -0
  100. package/dist/shared/plugin-market-api.d.ts +120 -0
  101. package/dist/shared/profession-market-api.d.ts +96 -0
  102. package/dist/shared/project-local-skill-api.d.ts +8 -0
  103. package/dist/shared/remote-connection-api.d.ts +97 -0
  104. package/dist/shared/remote-connection.d.ts +62 -0
  105. package/dist/shared/remote-installation-api.d.ts +50 -0
  106. package/dist/shared/remote-tasks-api.d.ts +118 -0
  107. package/dist/shared/runtime-tuning.d.ts +44 -0
  108. package/dist/shared/scene-case-api.d.ts +42 -0
  109. package/dist/shared/sdk-session-contract.d.ts +96 -0
  110. package/dist/shared/security-center-api.d.ts +74 -0
  111. package/dist/shared/sensitive-protection-api.d.ts +71 -0
  112. package/dist/shared/session-policy.d.ts +26 -0
  113. package/dist/shared/shortcut-api.d.ts +7 -0
  114. package/dist/shared/skill-activation-api.d.ts +8 -0
  115. package/dist/shared/skill-asset-api.d.ts +12 -0
  116. package/dist/shared/skill-market-api.d.ts +119 -0
  117. package/dist/shared/skill-upload.d.ts +16 -0
  118. package/dist/shared/speech-recognition-api.d.ts +12 -0
  119. package/dist/shared/storage-integrity.d.ts +15 -0
  120. package/dist/shared/target-bridge-protocol.d.ts +67 -0
  121. package/dist/shared/target-environments.d.ts +15 -0
  122. package/dist/shared/target-resources.d.ts +105 -0
  123. package/dist/shared/task-enterprise-project-api.d.ts +75 -0
  124. package/dist/shared/task-execution-api.d.ts +35 -0
  125. package/dist/shared/task-initialization-api.d.ts +44 -0
  126. package/dist/shared/task-menu-api.d.ts +27 -0
  127. package/dist/shared/task-operation.d.ts +19 -0
  128. package/dist/shared/task-path-policy.d.ts +14 -0
  129. package/dist/shared/task-resource-manifest.d.ts +33 -0
  130. package/dist/shared/task-storage-recovery.d.ts +33 -0
  131. package/dist/shared/task-terminal-api.d.ts +48 -0
  132. package/dist/shared/team-control.d.ts +60 -0
  133. package/dist/shared/tool-activity.d.ts +18 -0
  134. package/dist/shared/update-api.d.ts +65 -0
  135. package/dist/shared/usage-statistics-api.d.ts +18 -0
  136. package/dist/shared/worktree-api.d.ts +188 -0
  137. package/examples/business-assistant.mjs +19 -0
  138. package/examples/common.mjs +51 -0
  139. package/examples/platform-assistant.mjs +9 -0
  140. package/examples/standalone-assistant.mjs +16 -0
  141. package/package.json +40 -4
@@ -0,0 +1,91 @@
1
+ /** Editor state is distinct from the last saved disk revision. */
2
+ export interface DocumentEditorVersion {
3
+ documentId: string;
4
+ diskRevision: string;
5
+ editorRevision: number;
6
+ }
7
+ export type DocumentSelectionLocator = {
8
+ kind: 'text';
9
+ start: number;
10
+ end: number;
11
+ format?: 'markdown' | 'html';
12
+ element?: string;
13
+ htmlTextRanges?: Array<{
14
+ start: number;
15
+ end: number;
16
+ }>;
17
+ } | {
18
+ kind: 'word';
19
+ targetJson: string;
20
+ } | {
21
+ kind: 'word-table';
22
+ table: number;
23
+ nodeId: string;
24
+ row: [number, number];
25
+ column: [number, number];
26
+ } | {
27
+ kind: 'word-image';
28
+ part: string;
29
+ imageId: string;
30
+ } | {
31
+ kind: 'sheet-image';
32
+ sheetId: string;
33
+ sheetName: string;
34
+ imageId: string;
35
+ imageIndex: number;
36
+ } | {
37
+ kind: 'cells';
38
+ sheetId: string;
39
+ sheetName: string;
40
+ row: [number, number];
41
+ column: [number, number];
42
+ } | {
43
+ kind: 'slide-elements';
44
+ slideIndex: number;
45
+ elementIds: string[];
46
+ } | {
47
+ kind: 'image-region';
48
+ imageWidth: number;
49
+ imageHeight: number;
50
+ rect: DocumentRectangle;
51
+ };
52
+ export interface DocumentRectangle {
53
+ x: number;
54
+ y: number;
55
+ width: number;
56
+ height: number;
57
+ }
58
+ export interface DocumentSelection extends DocumentEditorVersion {
59
+ fileName: string;
60
+ locator: DocumentSelectionLocator;
61
+ text: string;
62
+ }
63
+ /** A snapshot replacement is an explicit whole editor transaction, not a text conversion. */
64
+ export type DocumentEdit = {
65
+ kind: 'replace-snapshot';
66
+ data: Uint8Array;
67
+ } | {
68
+ kind: 'replace-text';
69
+ selection: DocumentSelection;
70
+ text: string;
71
+ } | {
72
+ kind: 'set-cells';
73
+ selection: DocumentSelection;
74
+ values: Array<Array<string | number | boolean | null>>;
75
+ } | {
76
+ kind: 'update-slide-text';
77
+ selection: DocumentSelection;
78
+ elementId: string;
79
+ text: string;
80
+ };
81
+ export interface DocumentEditorController {
82
+ getVersion(): DocumentEditorVersion;
83
+ getSelection(): DocumentSelection | null;
84
+ /** Present only for editors that expose reference navigation. */
85
+ readonly locateSelection?: (selection: DocumentSelection) => void;
86
+ exportSnapshot(): Promise<Uint8Array>;
87
+ applyEdit(edit: DocumentEdit, expectedEditorRevision: number): Promise<void>;
88
+ save(): Promise<void>;
89
+ undo(): Promise<void>;
90
+ redo(): Promise<void>;
91
+ }
@@ -0,0 +1,103 @@
1
+ export type EnterpriseKnowledgeType = 'STANDARD' | 'GRAPH' | 'OBJECT_STORAGE';
2
+ export type EnterpriseKnowledgeNodeType = 'ROOT' | 'ORGANIZATION' | 'FOLDER' | 'KNOWLEDGE_BASE' | 'GRAPH' | 'OBJECT_STORAGE';
3
+ export interface EnterpriseKnowledgeCapabilities {
4
+ retrieve: boolean;
5
+ upload: boolean;
6
+ listFiles: boolean;
7
+ batchDeleteFiles: boolean;
8
+ }
9
+ export interface EnterpriseKnowledgeBase {
10
+ id: string;
11
+ sourceId: string | null;
12
+ name: string;
13
+ description: string;
14
+ knowledgeType: EnterpriseKnowledgeType;
15
+ status: string | null;
16
+ capabilities: EnterpriseKnowledgeCapabilities;
17
+ }
18
+ export interface EnterpriseKnowledgeTreeNode {
19
+ id: string;
20
+ parentId: string | null;
21
+ nodeType: EnterpriseKnowledgeNodeType;
22
+ name: string;
23
+ protected: boolean;
24
+ deletable: boolean;
25
+ knowledgeBase: EnterpriseKnowledgeBase | null;
26
+ children: EnterpriseKnowledgeTreeNode[];
27
+ }
28
+ export interface EnterpriseKnowledgeTreeResult {
29
+ tenantId: string | null;
30
+ permissionScope: string | null;
31
+ nodes: EnterpriseKnowledgeTreeNode[];
32
+ }
33
+ export interface EnterpriseKnowledgeSearchQuery {
34
+ keyword?: string;
35
+ page?: number;
36
+ pageSize?: number;
37
+ }
38
+ export interface EnterpriseKnowledgeSearchResult {
39
+ items: EnterpriseKnowledgeBase[];
40
+ page: number;
41
+ pageSize: number;
42
+ total: number;
43
+ }
44
+ export interface EnterpriseKnowledgeDocument {
45
+ id: string;
46
+ name: string;
47
+ status: string | null;
48
+ fileType: string | null;
49
+ sizeBytes: number | null;
50
+ createdByName: string | null;
51
+ createdAt: string | null;
52
+ updatedAt: string | null;
53
+ canPreview: boolean;
54
+ canDownload: boolean;
55
+ }
56
+ export interface EnterpriseKnowledgeDocumentPreviewRequest {
57
+ documentId: string;
58
+ fileName: string;
59
+ page?: number;
60
+ }
61
+ export interface EnterpriseKnowledgeDocumentPreviewResult {
62
+ name: string;
63
+ mediaType: string | null;
64
+ sizeBytes: number;
65
+ dataUrl: string;
66
+ page: number;
67
+ pageCount: number;
68
+ canDownload: boolean;
69
+ }
70
+ export interface EnterpriseKnowledgeDocumentDownloadLink {
71
+ documentId: string;
72
+ downloadUrl: string;
73
+ }
74
+ export interface EnterpriseKnowledgeAttachment {
75
+ id: string;
76
+ documentId: string;
77
+ knowledgeBaseId: string;
78
+ name: string;
79
+ mimeType: string;
80
+ sizeBytes: number;
81
+ url: string;
82
+ }
83
+ export interface EnterpriseKnowledgeDocumentQuery {
84
+ sourceId: string;
85
+ keyword?: string;
86
+ page?: number;
87
+ pageSize?: number;
88
+ }
89
+ export interface EnterpriseKnowledgeDocumentResult {
90
+ items: EnterpriseKnowledgeDocument[];
91
+ page: number;
92
+ pageSize: number;
93
+ total: number;
94
+ hasPrevious: boolean;
95
+ hasNext: boolean;
96
+ }
97
+ export interface EnterpriseKnowledgeApi {
98
+ tree(): Promise<EnterpriseKnowledgeTreeResult>;
99
+ search(query?: EnterpriseKnowledgeSearchQuery): Promise<EnterpriseKnowledgeSearchResult>;
100
+ listDocuments(query: EnterpriseKnowledgeDocumentQuery): Promise<EnterpriseKnowledgeDocumentResult>;
101
+ readDocument(request: EnterpriseKnowledgeDocumentPreviewRequest): Promise<EnterpriseKnowledgeDocumentPreviewResult>;
102
+ getDocumentDownloadLink(documentId: string): Promise<EnterpriseKnowledgeDocumentDownloadLink>;
103
+ }
@@ -0,0 +1,26 @@
1
+ export interface EnterpriseProjectResource {
2
+ tenant_id: string;
3
+ workspace_id: string;
4
+ resource_type: 'AGENT' | 'AICODING_AGENT' | 'AICODING_WORKFLOW';
5
+ resource_id: string;
6
+ }
7
+ export interface EnterpriseProjectCapability extends EnterpriseProjectResource {
8
+ record_id: string;
9
+ name: string;
10
+ description?: string | null;
11
+ contract_revision: string;
12
+ }
13
+ export interface EnterpriseProjectCapabilityPage {
14
+ list: EnterpriseProjectCapability[];
15
+ page: number;
16
+ page_size: number;
17
+ has_next: boolean;
18
+ verification_pending: number;
19
+ }
20
+ export interface EnterpriseProjectSearchRequest {
21
+ userId: string;
22
+ tenantId: string;
23
+ keyword: string;
24
+ page: number;
25
+ }
26
+ export declare function enterpriseProjectKey(resource: EnterpriseProjectResource): string;
@@ -0,0 +1,3 @@
1
+ import type { LocalTaskExecutionState } from './local-task-api.js';
2
+ export type OwnedRuntimeActivity = Pick<LocalTaskExecutionState, 'taskId' | 'running' | 'pendingInteractionCount' | 'activity'>;
3
+ export declare function readExecutionActivity(value: unknown): NonNullable<LocalTaskExecutionState['activity']>;
@@ -0,0 +1,62 @@
1
+ import { type ModelRoutingIdentity } from './model-routing.js';
2
+ /** Supplied only by the authenticated application host, never by tool arguments. */
3
+ export interface ExecutionContext {
4
+ actor: {
5
+ userId: string;
6
+ tenantId: string | null;
7
+ name?: string;
8
+ };
9
+ owner: {
10
+ userId: string;
11
+ tenantId: string | null;
12
+ name?: string;
13
+ };
14
+ workspaceId: string | null;
15
+ projectId?: string;
16
+ collaborationProjectId?: string;
17
+ assistantId?: string;
18
+ platformSessionId?: string;
19
+ platformTurnId?: string;
20
+ platformTaskId?: string;
21
+ platformRunId?: string;
22
+ traceId?: string;
23
+ /** Host-owned business data; never used as identity or routing headers. */
24
+ metadata?: Record<string, Record<string, string | number | boolean | null>>;
25
+ usageScene: 'personal' | 'greeting' | 'task' | 'collaboration' | 'coding';
26
+ }
27
+ export interface ExecutionBinding {
28
+ sessionId: string;
29
+ runId: string;
30
+ context?: ExecutionContext;
31
+ }
32
+ /** A supplemental message has its own correlation IDs but must retain the active execution scope. */
33
+ export declare function executionSteeringScope(context?: ExecutionContext): {
34
+ actor: {
35
+ userId: string;
36
+ tenantId: string | null;
37
+ name?: string;
38
+ };
39
+ owner: {
40
+ userId: string;
41
+ tenantId: string | null;
42
+ name?: string;
43
+ };
44
+ workspaceId: string | null;
45
+ projectId?: string;
46
+ collaborationProjectId?: string;
47
+ assistantId?: string;
48
+ platformSessionId?: string;
49
+ platformTurnId?: string;
50
+ platformTaskId?: string;
51
+ platformRunId?: string;
52
+ traceId?: string;
53
+ /** Host-owned business data; never used as identity or routing headers. */
54
+ metadata?: Record<string, Record<string, string | number | boolean | null>>;
55
+ usageScene: "personal" | "greeting" | "task" | "collaboration" | "coding";
56
+ } | null;
57
+ export declare function parseExecutionContext(value: unknown): ExecutionContext;
58
+ export declare function parseExecutionBinding(value: unknown): ExecutionBinding;
59
+ export declare function executionRoutingIdentity(context: ExecutionContext): ModelRoutingIdentity;
60
+ export declare function executionContextHeaders(binding: ExecutionBinding): Record<string, string>;
61
+ export declare function executionBindingHeaders(binding?: ExecutionBinding): Record<string, string>;
62
+ export declare function decodeExecutionBinding(value: string | undefined): ExecutionBinding | undefined;
@@ -0,0 +1,7 @@
1
+ /** Local application identity is not a platform user or tenant. */
2
+ export interface StandaloneExecutionIdentity {
3
+ mode: 'standalone';
4
+ appId: string;
5
+ userScope: string;
6
+ }
7
+ export declare function validateStandaloneIdentity(value: StandaloneExecutionIdentity): StandaloneExecutionIdentity;
@@ -0,0 +1,6 @@
1
+ /** Describes the execution host, not the user's authorization or model permissions. */
2
+ export interface ExecutionProfile {
3
+ host: 'desktop' | 'server';
4
+ role: 'personal' | 'task' | 'coding';
5
+ }
6
+ export declare function parseExecutionProfile(value: unknown): ExecutionProfile;
@@ -0,0 +1,71 @@
1
+ /** Execution location is independent of workspace kind and worktree environments. */
2
+ export type ExecutionTargetKind = 'local' | 'ssh' | 'docker' | 'wsl';
3
+ export type RemoteExecutionTargetKind = Exclude<ExecutionTargetKind, 'local'>;
4
+ export type ExecutionTargetPlatform = 'darwin' | 'linux' | 'win32';
5
+ export interface OwnerPrincipal {
6
+ platformUrl: string;
7
+ userId: string;
8
+ }
9
+ export interface ExecutionTargetIdentity {
10
+ executionTargetId: string;
11
+ dataRootId: string;
12
+ }
13
+ export interface TaskRef extends ExecutionTargetIdentity {
14
+ kind: ExecutionTargetKind;
15
+ owner: OwnerPrincipal;
16
+ taskId: string;
17
+ }
18
+ export interface WorkspaceRef extends ExecutionTargetIdentity {
19
+ kind: ExecutionTargetKind;
20
+ owner: OwnerPrincipal;
21
+ workspaceId: string;
22
+ /** Resolved by the target, never by the controlling machine's path/fs APIs. */
23
+ canonicalPath: string;
24
+ name: string;
25
+ }
26
+ export interface MemberRef {
27
+ task: TaskRef;
28
+ runId: string;
29
+ sourceThreadId: string;
30
+ teamRunId?: string;
31
+ memberRunId?: string;
32
+ }
33
+ export interface TargetFileRef {
34
+ task: TaskRef;
35
+ fileId: string;
36
+ contentVersion: string;
37
+ name: string;
38
+ }
39
+ export interface TargetArtifactRef {
40
+ task: TaskRef;
41
+ artifactId: string;
42
+ file: TargetFileRef;
43
+ runId?: string;
44
+ memberRunId?: string;
45
+ }
46
+ /** This is a verified session reference, not credentials or proof supplied by a caller. */
47
+ export interface TargetAuthBinding {
48
+ id: string;
49
+ owner: OwnerPrincipal;
50
+ tenantId: string;
51
+ personalMode: boolean;
52
+ contextVersion: number;
53
+ sessionId: string;
54
+ clientAuthGeneration: number;
55
+ expiresAt: string;
56
+ }
57
+ export type ExecutionTargetErrorCode = 'INVALID_TARGET_REFERENCE' | 'TARGET_MISMATCH' | 'OWNER_MISMATCH' | 'TASK_SCOPE_UNSUPPORTED' | 'TARGET_UNAVAILABLE' | 'STALE_BINDING' | 'PROTOCOL_ERROR' | 'PROTOCOL_MISMATCH' | 'METHOD_UNAVAILABLE' | 'HANDSHAKE_REQUIRED' | 'AUTH_REQUIRED' | 'INPUT_TOO_LARGE' | 'CONNECTION_CLOSED' | 'QUERY_CANCELLED';
58
+ export declare class ExecutionTargetError extends Error {
59
+ readonly code: ExecutionTargetErrorCode;
60
+ readonly cause?: unknown;
61
+ constructor(code: ExecutionTargetErrorCode, message: string, options?: {
62
+ cause?: unknown;
63
+ });
64
+ }
65
+ export declare function canonicalPlatformUrl(value: string): string;
66
+ export declare function principalKey(owner: OwnerPrincipal): string;
67
+ export declare function targetKey(target: ExecutionTargetIdentity): string;
68
+ export declare function taskRefKey(ref: TaskRef): string;
69
+ export declare function workspaceRefKey(ref: WorkspaceRef): string;
70
+ export declare function assertTargetIdentity(expected: ExecutionTargetIdentity, actual: ExecutionTargetIdentity): void;
71
+ export declare function assertOwnerPrincipal(expected: OwnerPrincipal, actual: OwnerPrincipal): void;
@@ -0,0 +1,22 @@
1
+ import type { AgentTeamDefinition } from './agent-team.js';
2
+ import type { LocalTaskProfessionReference } from './local-task-api.js';
3
+ /** Only an immutable platform version is selected; executable content is resolved by the host. */
4
+ export interface ExpertSelection {
5
+ professionId: string;
6
+ versionId: string;
7
+ }
8
+ /** A business host must authorize this source before supplying it. It is never model input. */
9
+ export interface ResolvedExpertSource extends ExpertSelection {
10
+ versionNo: string;
11
+ professionForm: 'EXPERT' | 'EXPERT_TEAM';
12
+ name: string;
13
+ summary: string;
14
+ iconUrl?: string | null;
15
+ instructions?: string;
16
+ packageRef?: string;
17
+ }
18
+ export interface PreparedExpertAgent {
19
+ profession: LocalTaskProfessionReference;
20
+ instructions: string;
21
+ team?: AgentTeamDefinition;
22
+ }
@@ -0,0 +1,54 @@
1
+ import type { LocalTaskExpertTeamMemberReference } from './local-task-api.js';
2
+ export interface ExpertTeamAgentSnapshot extends LocalTaskExpertTeamMemberReference {
3
+ sdk?: Pick<import('./agent-team.js').AgentTeamMember, 'model' | 'reasoningEffort' | 'tools' | 'paths'>;
4
+ runtimeRole: string;
5
+ description: string;
6
+ instructions: string;
7
+ maxTurns: number | null;
8
+ skills: string[];
9
+ capabilities: string[];
10
+ }
11
+ export type ExpertTeamWritePolicy = 'leader_only' | 'team_shared_workspace';
12
+ export interface ExpertTeamRunSnapshot {
13
+ schemaVersion: 1;
14
+ packageFormat: 'aios-expert-team';
15
+ packageId: string;
16
+ packageVersion: string;
17
+ packageHash: string;
18
+ snapshotHash: string;
19
+ displayName: string;
20
+ description: string;
21
+ teamAvatarRelativePath: string;
22
+ leader: ExpertTeamAgentSnapshot;
23
+ members: ExpertTeamAgentSnapshot[];
24
+ workflow: string;
25
+ writePolicy: ExpertTeamWritePolicy;
26
+ }
27
+ /**
28
+ * 首次执行前由 Electron 主进程锁定的任务级专家团快照。
29
+ * Renderer 不能创建或修改此对象;后续消息、重试和恢复必须复用同一份快照。
30
+ */
31
+ export interface TeamExecutionSnapshot {
32
+ schemaVersion: 1;
33
+ teamRunId: string;
34
+ taskId: string;
35
+ selectionLockedAt: string;
36
+ package: ExpertTeamRunSnapshot;
37
+ taskSnapshotHash: string;
38
+ source?: {
39
+ kind: 'application';
40
+ agentId: string;
41
+ agentVersion: string;
42
+ };
43
+ }
44
+ export interface ExpertTeamTaskSnapshot extends TeamExecutionSnapshot {
45
+ professionId: string;
46
+ professionVersionId: string;
47
+ professionVersionNo: string;
48
+ }
49
+ export interface PrepareExpertTeamPackageRequest {
50
+ professionId: string;
51
+ versionId: string;
52
+ versionNo: string;
53
+ packageRef: string;
54
+ }
@@ -0,0 +1,20 @@
1
+ export interface DesktopFeedbackFileAttachment {
2
+ name: string;
3
+ mediaType: string;
4
+ sizeBytes: number;
5
+ sourcePath?: string;
6
+ data?: ArrayBuffer;
7
+ }
8
+ export interface SubmitDesktopFeedbackRequest {
9
+ description: string;
10
+ attachments: DesktopFeedbackFileAttachment[];
11
+ includeDiagnostics: boolean;
12
+ }
13
+ export interface DesktopFeedbackSubmission {
14
+ id: string;
15
+ status: 'PENDING' | 'PROCESSED';
16
+ createdAt: string;
17
+ }
18
+ export interface DesktopFeedbackApi {
19
+ submit(request: SubmitDesktopFeedbackRequest): Promise<DesktopFeedbackSubmission>;
20
+ }