@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.
- package/EVENTS.md +88 -0
- package/README.md +656 -2
- package/capabilities.json +2398 -0
- package/dist/cli/daemon/preferences.d.ts +67 -0
- package/dist/cli/daemon/protocol.d.ts +26 -0
- package/dist/cli/daemon/resource-limits.d.ts +39 -0
- package/dist/core/auth/platform-client.d.ts +65 -0
- package/dist/core/host/runtime-dependencies.d.ts +26 -0
- package/dist/core/skills/skill-bindings.d.ts +19 -0
- package/dist/core/skills/skill-versions.d.ts +31 -0
- package/dist/electron/main/bundled-runtime-tools.d.ts +24 -0
- package/dist/events.js +1 -0
- package/dist/index.js +55 -0
- package/dist/sdk/src/auth.d.ts +43 -0
- package/dist/sdk/src/authorization-events.d.ts +16 -0
- package/dist/sdk/src/authorization.d.ts +10 -0
- package/dist/sdk/src/communication.d.ts +9 -0
- package/dist/sdk/src/diagnostics.d.ts +24 -0
- package/dist/sdk/src/errors.d.ts +4 -0
- package/dist/sdk/src/events.d.ts +4 -0
- package/dist/sdk/src/file-api.d.ts +29 -0
- package/dist/sdk/src/file-storage.d.ts +34 -0
- package/dist/sdk/src/index.d.ts +260 -0
- package/dist/sdk/src/local-connection.d.ts +9 -0
- package/dist/sdk/src/managed-host.d.ts +32 -0
- package/dist/sdk/src/native-status.d.ts +59 -0
- package/dist/sdk/src/platform.d.ts +39 -0
- package/dist/sdk/src/runtime-control.d.ts +111 -0
- package/dist/sdk/src/runtime-integrity.d.ts +10 -0
- package/dist/sdk/src/tool-reference.d.ts +11 -0
- package/dist/sdk/src/tool-result.d.ts +36 -0
- package/dist/sdk/src/tool-server.d.ts +14 -0
- package/dist/sdk/src/transport.d.ts +25 -0
- package/dist/sdk/src/types.d.ts +405 -0
- package/dist/shared/account-context-api.d.ts +47 -0
- package/dist/shared/account-schedules-api.d.ts +110 -0
- package/dist/shared/action-center-api.d.ts +50 -0
- package/dist/shared/agent-capabilities.d.ts +42 -0
- package/dist/shared/agent-hooks.d.ts +10 -0
- package/dist/shared/agent-team.d.ts +19 -0
- package/dist/shared/artifact-evidence.d.ts +18 -0
- package/dist/shared/automation-api.d.ts +112 -0
- package/dist/shared/client-downloads-api.d.ts +20 -0
- package/dist/shared/cloud-assistant-api.d.ts +532 -0
- package/dist/shared/cloud-task-resources.d.ts +24 -0
- package/dist/shared/cloud-task-runtime-api.d.ts +253 -0
- package/dist/shared/collaboration-api.d.ts +17 -0
- package/dist/shared/collaboration-automation-api.d.ts +55 -0
- package/dist/shared/collaboration-deep-link.d.ts +15 -0
- package/dist/shared/collaboration-event-api.d.ts +19 -0
- package/dist/shared/collaboration-plan-api.d.ts +159 -0
- package/dist/shared/collaboration-project-api.d.ts +206 -0
- package/dist/shared/collaboration-resource-api.d.ts +41 -0
- package/dist/shared/collaboration-task-api.d.ts +276 -0
- package/dist/shared/collaboration-task-execution.d.ts +39 -0
- package/dist/shared/computer-use-api.d.ts +80 -0
- package/dist/shared/computer-use-handshake.d.ts +19 -0
- package/dist/shared/computer-use-protocol.d.ts +488 -0
- package/dist/shared/context-usage.d.ts +15 -0
- package/dist/shared/desktop-api.d.ts +450 -0
- package/dist/shared/desktop-diagnostics-api.d.ts +56 -0
- package/dist/shared/desktop-language.d.ts +3 -0
- package/dist/shared/desktop-mcp-service-api.d.ts +157 -0
- package/dist/shared/document-session-api.d.ts +91 -0
- package/dist/shared/enterprise-knowledge-api.d.ts +103 -0
- package/dist/shared/enterprise-project-api.d.ts +26 -0
- package/dist/shared/execution-activity.d.ts +3 -0
- package/dist/shared/execution-context.d.ts +62 -0
- package/dist/shared/execution-identity.d.ts +7 -0
- package/dist/shared/execution-profile.d.ts +6 -0
- package/dist/shared/execution-target.d.ts +71 -0
- package/dist/shared/expert-selection.d.ts +22 -0
- package/dist/shared/expert-team-api.d.ts +54 -0
- package/dist/shared/feedback-api.d.ts +20 -0
- package/dist/shared/git-api.d.ts +227 -0
- package/dist/shared/git-http-api.d.ts +12 -0
- package/dist/shared/hosted-git-api.d.ts +132 -0
- package/dist/shared/js-agent-hooks.d.ts +23 -0
- package/dist/shared/local-custom-model-api.d.ts +55 -0
- package/dist/shared/local-environment-api.d.ts +110 -0
- package/dist/shared/local-mcp-server-api.d.ts +91 -0
- package/dist/shared/local-memory.d.ts +165 -0
- package/dist/shared/local-plugin-api.d.ts +26 -0
- package/dist/shared/local-runtime-api.d.ts +32 -0
- package/dist/shared/local-skill-api.d.ts +42 -0
- package/dist/shared/local-task-api.d.ts +658 -0
- package/dist/shared/local-task-command-client.d.ts +55 -0
- package/dist/shared/local-task-command.d.ts +93 -0
- package/dist/shared/local-task-event-projection.d.ts +29 -0
- package/dist/shared/local-task-projection.d.ts +29 -0
- package/dist/shared/local-workspace.d.ts +9 -0
- package/dist/shared/managed-authorization.d.ts +72 -0
- package/dist/shared/memory-customization.d.ts +32 -0
- package/dist/shared/model-routing.d.ts +31 -0
- package/dist/shared/model-selection.d.ts +11 -0
- package/dist/shared/my-expert-api.d.ts +119 -0
- package/dist/shared/navigation-api.d.ts +20 -0
- package/dist/shared/office-window-api.d.ts +81 -0
- package/dist/shared/platform-branding-api.d.ts +66 -0
- package/dist/shared/plugin-market-api.d.ts +120 -0
- package/dist/shared/profession-market-api.d.ts +96 -0
- package/dist/shared/project-local-skill-api.d.ts +8 -0
- package/dist/shared/remote-connection-api.d.ts +97 -0
- package/dist/shared/remote-connection.d.ts +62 -0
- package/dist/shared/remote-installation-api.d.ts +50 -0
- package/dist/shared/remote-tasks-api.d.ts +118 -0
- package/dist/shared/runtime-tuning.d.ts +44 -0
- package/dist/shared/scene-case-api.d.ts +42 -0
- package/dist/shared/sdk-session-contract.d.ts +96 -0
- package/dist/shared/security-center-api.d.ts +74 -0
- package/dist/shared/sensitive-protection-api.d.ts +71 -0
- package/dist/shared/session-policy.d.ts +26 -0
- package/dist/shared/shortcut-api.d.ts +7 -0
- package/dist/shared/skill-activation-api.d.ts +8 -0
- package/dist/shared/skill-asset-api.d.ts +12 -0
- package/dist/shared/skill-market-api.d.ts +119 -0
- package/dist/shared/skill-upload.d.ts +16 -0
- package/dist/shared/speech-recognition-api.d.ts +12 -0
- package/dist/shared/storage-integrity.d.ts +15 -0
- package/dist/shared/target-bridge-protocol.d.ts +67 -0
- package/dist/shared/target-environments.d.ts +15 -0
- package/dist/shared/target-resources.d.ts +105 -0
- package/dist/shared/task-enterprise-project-api.d.ts +75 -0
- package/dist/shared/task-execution-api.d.ts +35 -0
- package/dist/shared/task-initialization-api.d.ts +44 -0
- package/dist/shared/task-menu-api.d.ts +27 -0
- package/dist/shared/task-operation.d.ts +19 -0
- package/dist/shared/task-path-policy.d.ts +14 -0
- package/dist/shared/task-resource-manifest.d.ts +33 -0
- package/dist/shared/task-storage-recovery.d.ts +33 -0
- package/dist/shared/task-terminal-api.d.ts +48 -0
- package/dist/shared/team-control.d.ts +60 -0
- package/dist/shared/tool-activity.d.ts +18 -0
- package/dist/shared/update-api.d.ts +65 -0
- package/dist/shared/usage-statistics-api.d.ts +18 -0
- package/dist/shared/worktree-api.d.ts +188 -0
- package/examples/business-assistant.mjs +19 -0
- package/examples/common.mjs +51 -0
- package/examples/platform-assistant.mjs +9 -0
- package/examples/standalone-assistant.mjs +16 -0
- package/package.json +40 -4
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
export type PluginMarketKind = 'CLOUD' | 'LOCAL' | 'MCP' | 'OFFICIAL';
|
|
2
|
+
export type PluginMarketScope = 'PLATFORM' | 'ENTERPRISE' | 'MINE';
|
|
3
|
+
export interface PluginMarketCategory {
|
|
4
|
+
categoryId: string | null;
|
|
5
|
+
categoryCode: string;
|
|
6
|
+
categoryName: string;
|
|
7
|
+
sortNo: number;
|
|
8
|
+
}
|
|
9
|
+
export interface PluginMarketTag {
|
|
10
|
+
tagId: string;
|
|
11
|
+
name: string;
|
|
12
|
+
}
|
|
13
|
+
export interface PluginMarketItem {
|
|
14
|
+
recordId: string;
|
|
15
|
+
pluginId: string;
|
|
16
|
+
name: string;
|
|
17
|
+
summary: string;
|
|
18
|
+
iconUrl: string | null;
|
|
19
|
+
author: string;
|
|
20
|
+
isOfficial: boolean;
|
|
21
|
+
pluginKind: PluginMarketKind;
|
|
22
|
+
pluginKindLabel: string;
|
|
23
|
+
categoryCode: string | null;
|
|
24
|
+
categoryName: string | null;
|
|
25
|
+
version: string | null;
|
|
26
|
+
publishedAt: string | null;
|
|
27
|
+
tags: PluginMarketTag[];
|
|
28
|
+
}
|
|
29
|
+
export interface PluginMarketTool {
|
|
30
|
+
toolId: string;
|
|
31
|
+
name: string;
|
|
32
|
+
description: string | null;
|
|
33
|
+
functionName: string;
|
|
34
|
+
inputSchema: Record<string, unknown>;
|
|
35
|
+
outputSchema?: Record<string, unknown>;
|
|
36
|
+
exampleRequestJson?: string | null;
|
|
37
|
+
exampleResponseJson?: string | null;
|
|
38
|
+
}
|
|
39
|
+
export interface PluginMarketDetail extends PluginMarketItem {
|
|
40
|
+
description: string;
|
|
41
|
+
tools: PluginMarketTool[];
|
|
42
|
+
snapshotAvailable: boolean;
|
|
43
|
+
}
|
|
44
|
+
export interface PluginMarketListQuery {
|
|
45
|
+
scope?: Exclude<PluginMarketScope, 'MINE'>;
|
|
46
|
+
keyword?: string;
|
|
47
|
+
categoryCode?: string;
|
|
48
|
+
pluginKind?: PluginMarketKind;
|
|
49
|
+
page?: number;
|
|
50
|
+
pageSize?: number;
|
|
51
|
+
}
|
|
52
|
+
export interface PluginMarketListResult {
|
|
53
|
+
items: PluginMarketItem[];
|
|
54
|
+
total: number;
|
|
55
|
+
}
|
|
56
|
+
export type PluginAuthorizationComponentType = 'TEXT' | 'PASSWORD' | 'TOKEN' | 'URL' | 'EMAIL' | 'SELECT';
|
|
57
|
+
export interface PluginAuthorizationFieldOption {
|
|
58
|
+
label?: string | null;
|
|
59
|
+
value: string;
|
|
60
|
+
}
|
|
61
|
+
export interface PluginAuthorizationField {
|
|
62
|
+
key: string;
|
|
63
|
+
label: string;
|
|
64
|
+
componentType: PluginAuthorizationComponentType;
|
|
65
|
+
valueType: 'SECRET';
|
|
66
|
+
required: boolean;
|
|
67
|
+
placeholder?: string | null;
|
|
68
|
+
helpText?: string | null;
|
|
69
|
+
validation?: Record<string, unknown> | null;
|
|
70
|
+
options?: PluginAuthorizationFieldOption[] | null;
|
|
71
|
+
order: number;
|
|
72
|
+
}
|
|
73
|
+
export interface PluginAuthorizationDefinition {
|
|
74
|
+
definitionId?: string | null;
|
|
75
|
+
namespace?: string | null;
|
|
76
|
+
mode: 'NONE' | 'USER_CREDENTIAL' | 'CALLBACK';
|
|
77
|
+
schemaVersion: number;
|
|
78
|
+
title?: string | null;
|
|
79
|
+
description?: string | null;
|
|
80
|
+
helpUrl?: string | null;
|
|
81
|
+
fields: PluginAuthorizationField[];
|
|
82
|
+
verificationToolKey?: string | null;
|
|
83
|
+
status?: string | null;
|
|
84
|
+
}
|
|
85
|
+
export type PluginAuthorizationStatusValue = 'NOT_REQUIRED' | 'UNSET' | 'ACTIVE' | 'UNVERIFIED' | 'INVALID' | 'EXPIRED' | 'NEEDS_UPDATE' | 'REVOKED';
|
|
86
|
+
export interface PluginAuthorizationStatus {
|
|
87
|
+
callbackPageUrl?: string;
|
|
88
|
+
pluginId: string;
|
|
89
|
+
authorizationId?: string | null;
|
|
90
|
+
authorizationRequired: boolean;
|
|
91
|
+
entitled: boolean;
|
|
92
|
+
setupAllowed: boolean;
|
|
93
|
+
status: PluginAuthorizationStatusValue;
|
|
94
|
+
needsUpdate: boolean;
|
|
95
|
+
definition: PluginAuthorizationDefinition;
|
|
96
|
+
maskedFields: Record<string, string>;
|
|
97
|
+
lastVerifiedAt?: string | null;
|
|
98
|
+
}
|
|
99
|
+
export type PluginAuthorizationFieldOperation = {
|
|
100
|
+
operation: 'KEEP';
|
|
101
|
+
} | {
|
|
102
|
+
operation: 'CLEAR';
|
|
103
|
+
} | {
|
|
104
|
+
operation: 'SET';
|
|
105
|
+
value: string;
|
|
106
|
+
};
|
|
107
|
+
export interface PluginAuthorizationSaveRequest {
|
|
108
|
+
schemaVersion: number;
|
|
109
|
+
fields: Record<string, PluginAuthorizationFieldOperation>;
|
|
110
|
+
}
|
|
111
|
+
export interface PluginMarketApi {
|
|
112
|
+
listCategories: () => Promise<PluginMarketCategory[]>;
|
|
113
|
+
list: (query?: PluginMarketListQuery) => Promise<PluginMarketListResult>;
|
|
114
|
+
getDetail: (recordId: string) => Promise<PluginMarketDetail>;
|
|
115
|
+
prepare: (pluginId: string, recordId: string, resourceVersion: string) => Promise<PluginMarketDetail>;
|
|
116
|
+
getAuthorization: (pluginId: string) => Promise<PluginAuthorizationStatus>;
|
|
117
|
+
saveAuthorization: (pluginId: string, request: PluginAuthorizationSaveRequest) => Promise<PluginAuthorizationStatus>;
|
|
118
|
+
revokeAuthorization: (pluginId: string) => Promise<void>;
|
|
119
|
+
verifyAuthorization: (pluginId: string) => Promise<PluginAuthorizationStatus>;
|
|
120
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
export type ProfessionForm = 'EXPERT' | 'EXPERT_TEAM';
|
|
2
|
+
export type ProfessionPriceType = 'FREE' | 'PAID';
|
|
3
|
+
export interface ProfessionMarketCategory {
|
|
4
|
+
categoryId: string;
|
|
5
|
+
categoryCode: string;
|
|
6
|
+
categoryName: string;
|
|
7
|
+
description: string;
|
|
8
|
+
iconUrl: string | null;
|
|
9
|
+
sortNo: number;
|
|
10
|
+
professionCount: number;
|
|
11
|
+
}
|
|
12
|
+
export interface ProfessionMarketItem {
|
|
13
|
+
professionId: string;
|
|
14
|
+
professionForm: ProfessionForm;
|
|
15
|
+
name: string;
|
|
16
|
+
summary: string;
|
|
17
|
+
iconUrl: string | null;
|
|
18
|
+
priceType: ProfessionPriceType;
|
|
19
|
+
priceLabel: string;
|
|
20
|
+
developerId: string;
|
|
21
|
+
developerName: string;
|
|
22
|
+
openSource: boolean;
|
|
23
|
+
official: boolean;
|
|
24
|
+
userCount: number;
|
|
25
|
+
userCountLabel: string;
|
|
26
|
+
categoryId: string | null;
|
|
27
|
+
categoryCode: string | null;
|
|
28
|
+
categoryName: string | null;
|
|
29
|
+
}
|
|
30
|
+
export interface ProfessionMarketSearchQuery {
|
|
31
|
+
professionForm: ProfessionForm;
|
|
32
|
+
keyword?: string;
|
|
33
|
+
categoryCode?: string;
|
|
34
|
+
pageNum?: number;
|
|
35
|
+
pageSize?: number;
|
|
36
|
+
}
|
|
37
|
+
export interface ProfessionMarketSearchResult {
|
|
38
|
+
items: ProfessionMarketItem[];
|
|
39
|
+
total: number;
|
|
40
|
+
pageNum: number;
|
|
41
|
+
pageSize: number;
|
|
42
|
+
}
|
|
43
|
+
export interface InstalledProfessionItem {
|
|
44
|
+
professionId: string;
|
|
45
|
+
professionForm: ProfessionForm;
|
|
46
|
+
name: string;
|
|
47
|
+
summary: string;
|
|
48
|
+
iconUrl: string | null;
|
|
49
|
+
categoryName: string | null;
|
|
50
|
+
enabled: boolean;
|
|
51
|
+
installedAt: string;
|
|
52
|
+
}
|
|
53
|
+
export interface ListInstalledProfessionsQuery {
|
|
54
|
+
professionForm: ProfessionForm;
|
|
55
|
+
enabled?: boolean;
|
|
56
|
+
pageNum?: number;
|
|
57
|
+
pageSize?: number;
|
|
58
|
+
}
|
|
59
|
+
export interface InstalledProfessionResult {
|
|
60
|
+
items: InstalledProfessionItem[];
|
|
61
|
+
total: number;
|
|
62
|
+
pageNum: number;
|
|
63
|
+
pageSize: number;
|
|
64
|
+
}
|
|
65
|
+
export interface ProfessionVersion {
|
|
66
|
+
versionId: string;
|
|
67
|
+
versionNo: string;
|
|
68
|
+
packageRef: string | null;
|
|
69
|
+
professionMd: string;
|
|
70
|
+
deployStatus: string;
|
|
71
|
+
changelog: string;
|
|
72
|
+
}
|
|
73
|
+
export interface UserProfessionState {
|
|
74
|
+
installed: boolean;
|
|
75
|
+
enabled: boolean;
|
|
76
|
+
canInstall: boolean;
|
|
77
|
+
canEnable: boolean;
|
|
78
|
+
canUse: boolean;
|
|
79
|
+
hasUsed: boolean;
|
|
80
|
+
actionScope: string;
|
|
81
|
+
actionDisabledReason: string | null;
|
|
82
|
+
}
|
|
83
|
+
export interface ProfessionMarketDetail extends ProfessionMarketItem {
|
|
84
|
+
coverUrl: string | null;
|
|
85
|
+
description: string;
|
|
86
|
+
currentVersion: ProfessionVersion | null;
|
|
87
|
+
userProfessionState: UserProfessionState | null;
|
|
88
|
+
}
|
|
89
|
+
export interface ProfessionMarketApi {
|
|
90
|
+
listCategories: (professionForm: ProfessionForm) => Promise<ProfessionMarketCategory[]>;
|
|
91
|
+
search: (query: ProfessionMarketSearchQuery) => Promise<ProfessionMarketSearchResult>;
|
|
92
|
+
getDetail: (professionId: string) => Promise<ProfessionMarketDetail>;
|
|
93
|
+
listInstalled: (query: ListInstalledProfessionsQuery) => Promise<InstalledProfessionResult>;
|
|
94
|
+
prepareForLocalTask: (professionId: string, versionId?: string) => Promise<import('./local-task-api.js').LocalTaskProfessionReference>;
|
|
95
|
+
recordUsage: (professionId: string) => Promise<void>;
|
|
96
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface ReplaceProjectLocalSkillsRequest {
|
|
2
|
+
projectId: string;
|
|
3
|
+
folderNames: string[];
|
|
4
|
+
}
|
|
5
|
+
export interface ProjectLocalSkillApi {
|
|
6
|
+
list: (projectId: string) => Promise<string[]>;
|
|
7
|
+
replace: (request: ReplaceProjectLocalSkillsRequest) => Promise<string[]>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { RemoteAuthenticationPrompt, RemoteConnectionProfile, RemoteConnectionState, RemoteEndpoint, RemoteInstallMode, RemoteProbe, RemoteProbeEndpoint } from './remote-connection.js';
|
|
2
|
+
import type { WorkspaceRef } from './execution-target.js';
|
|
3
|
+
import type { TargetBridgeInfo } from './target-bridge-protocol.js';
|
|
4
|
+
export interface ConnectionInput {
|
|
5
|
+
id?: string;
|
|
6
|
+
name: string;
|
|
7
|
+
endpoint: RemoteEndpoint;
|
|
8
|
+
installMode: RemoteInstallMode;
|
|
9
|
+
installRoot: string;
|
|
10
|
+
dataRoot: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ConnectionSnapshot {
|
|
13
|
+
connectionId: string;
|
|
14
|
+
state: RemoteConnectionState;
|
|
15
|
+
generation: number;
|
|
16
|
+
operationId?: string;
|
|
17
|
+
target?: TargetBridgeInfo;
|
|
18
|
+
error?: {
|
|
19
|
+
code: string;
|
|
20
|
+
message: string;
|
|
21
|
+
};
|
|
22
|
+
retryAt?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface ConnectionOperation {
|
|
25
|
+
id: string;
|
|
26
|
+
connectionId: string;
|
|
27
|
+
status: 'running' | 'completed' | 'failed' | 'cancelled';
|
|
28
|
+
error?: ConnectionSnapshot['error'];
|
|
29
|
+
}
|
|
30
|
+
export interface TargetCredentialChoice {
|
|
31
|
+
kind: 'system' | 'vault' | 'session';
|
|
32
|
+
secret?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface RemoteDirectoryPage {
|
|
35
|
+
canonicalPath: string;
|
|
36
|
+
parentPath: string;
|
|
37
|
+
items: Array<{
|
|
38
|
+
name: string;
|
|
39
|
+
path: string;
|
|
40
|
+
symbolicLink: boolean;
|
|
41
|
+
}>;
|
|
42
|
+
total: number;
|
|
43
|
+
revision: string;
|
|
44
|
+
nextCursor?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface RemoteConnectionsApi {
|
|
47
|
+
readonly supportedKinds: readonly RemoteEndpoint['kind'][];
|
|
48
|
+
resolveEndpoint(endpoint: RemoteProbeEndpoint): Promise<RemoteProbeEndpoint>;
|
|
49
|
+
selectIdentityFile(): Promise<string | null>;
|
|
50
|
+
discover(kind: 'ssh' | 'docker' | 'wsl'): Promise<Array<{
|
|
51
|
+
name: string;
|
|
52
|
+
endpoint: RemoteEndpoint;
|
|
53
|
+
running?: boolean;
|
|
54
|
+
}>>;
|
|
55
|
+
startContainer(endpoint: Extract<RemoteEndpoint, {
|
|
56
|
+
kind: 'docker';
|
|
57
|
+
}>): Promise<void>;
|
|
58
|
+
list(): Promise<Array<{
|
|
59
|
+
profile: RemoteConnectionProfile;
|
|
60
|
+
connection: ConnectionSnapshot;
|
|
61
|
+
}>>;
|
|
62
|
+
get(id: string): Promise<RemoteConnectionProfile>;
|
|
63
|
+
save(input: ConnectionInput, expectedRevision?: string): Promise<RemoteConnectionProfile>;
|
|
64
|
+
/** SSH input is staged for verification; saving the connection persists verified credentials using OS encryption. */
|
|
65
|
+
test(endpoint: RemoteProbeEndpoint, sshSecret?: string): Promise<RemoteProbe>;
|
|
66
|
+
connect(id: string, credentials?: TargetCredentialChoice): Promise<ConnectionOperation>;
|
|
67
|
+
/** Finish the wizard, reusing an existing connection with the same endpoint and directory. */
|
|
68
|
+
complete(id: string): Promise<RemoteConnectionProfile>;
|
|
69
|
+
disconnect(id: string): Promise<ConnectionSnapshot>;
|
|
70
|
+
revokeAuthorization(id: string): Promise<void>;
|
|
71
|
+
remove(id: string, expectedRevision: string): Promise<{
|
|
72
|
+
removed: string;
|
|
73
|
+
targetDataPreserved: true;
|
|
74
|
+
}>;
|
|
75
|
+
operationStatus(id: string): Promise<ConnectionOperation>;
|
|
76
|
+
cancelOperation(id: string): Promise<ConnectionOperation>;
|
|
77
|
+
pendingPrompts(): Promise<RemoteAuthenticationPrompt[]>;
|
|
78
|
+
answerPrompt(id: string, answer: string | null): Promise<void>;
|
|
79
|
+
listDirectories(id: string, query: {
|
|
80
|
+
path?: string;
|
|
81
|
+
cursor?: string;
|
|
82
|
+
limit?: number;
|
|
83
|
+
}): Promise<RemoteDirectoryPage>;
|
|
84
|
+
resolveDirectory(id: string, path: string): Promise<{
|
|
85
|
+
canonicalPath: string;
|
|
86
|
+
name: string;
|
|
87
|
+
}>;
|
|
88
|
+
registerWorkspace(id: string, request: {
|
|
89
|
+
path: string;
|
|
90
|
+
name?: string;
|
|
91
|
+
}): Promise<RemoteConnectionProfile>;
|
|
92
|
+
listWorkspaces(id: string): Promise<WorkspaceRef[]>;
|
|
93
|
+
removeWorkspace(id: string, workspaceId: string): Promise<RemoteConnectionProfile>;
|
|
94
|
+
onChanged(listener: (snapshot: ConnectionSnapshot) => void): () => void;
|
|
95
|
+
onPrompt(listener: (prompt: RemoteAuthenticationPrompt) => void): () => void;
|
|
96
|
+
onPromptsChanged(listener: (prompts: RemoteAuthenticationPrompt[]) => void): () => void;
|
|
97
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { ExecutionTargetIdentity, OwnerPrincipal, WorkspaceRef } from './execution-target.js';
|
|
2
|
+
export type RemoteInstallMode = 'local-download-upload' | 'remote-download';
|
|
3
|
+
export type RemoteEndpoint = {
|
|
4
|
+
kind: 'ssh';
|
|
5
|
+
host: string;
|
|
6
|
+
port?: number;
|
|
7
|
+
username?: string;
|
|
8
|
+
identityFile?: string;
|
|
9
|
+
authentication?: 'password' | 'key';
|
|
10
|
+
system: 'posix' | 'windows';
|
|
11
|
+
} | {
|
|
12
|
+
kind: 'docker';
|
|
13
|
+
context: string;
|
|
14
|
+
endpoint: string;
|
|
15
|
+
daemonId: string;
|
|
16
|
+
containerId: string;
|
|
17
|
+
user?: string;
|
|
18
|
+
} | {
|
|
19
|
+
kind: 'wsl';
|
|
20
|
+
distribution: string;
|
|
21
|
+
user?: string;
|
|
22
|
+
};
|
|
23
|
+
/** Automatic detection is a probe input, never a persisted execution endpoint. */
|
|
24
|
+
export type RemoteProbeEndpoint = Exclude<RemoteEndpoint, {
|
|
25
|
+
kind: 'ssh';
|
|
26
|
+
}> | (Omit<Extract<RemoteEndpoint, {
|
|
27
|
+
kind: 'ssh';
|
|
28
|
+
}>, 'system'> & {
|
|
29
|
+
system: 'auto' | 'posix' | 'windows';
|
|
30
|
+
});
|
|
31
|
+
export interface RemoteConnectionProfile {
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
owner: OwnerPrincipal;
|
|
35
|
+
endpoint: RemoteEndpoint;
|
|
36
|
+
installMode: RemoteInstallMode;
|
|
37
|
+
/** Target-native absolute paths. Never passed to the controlling host's fs. */
|
|
38
|
+
installRoot: string;
|
|
39
|
+
dataRoot: string;
|
|
40
|
+
target?: ExecutionTargetIdentity;
|
|
41
|
+
workspaces: WorkspaceRef[];
|
|
42
|
+
revision: string;
|
|
43
|
+
}
|
|
44
|
+
export type RemoteConnectionState = 'disconnected' | 'connecting' | 'provisioning' | 'ready' | 'reconnecting' | 'needs_action';
|
|
45
|
+
export interface RemoteAuthenticationPrompt {
|
|
46
|
+
id: string;
|
|
47
|
+
connectionId: string;
|
|
48
|
+
kind: 'host-trust' | 'password' | 'key-passphrase' | 'interactive' | 'vault-unlock';
|
|
49
|
+
text: string;
|
|
50
|
+
}
|
|
51
|
+
export interface RemoteProbe {
|
|
52
|
+
platform: 'darwin' | 'linux' | 'win32';
|
|
53
|
+
arch: 'x64' | 'arm64';
|
|
54
|
+
user: string;
|
|
55
|
+
home: string;
|
|
56
|
+
libc?: 'glibc';
|
|
57
|
+
tools: {
|
|
58
|
+
tar: boolean;
|
|
59
|
+
curl: boolean;
|
|
60
|
+
sha256: boolean;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { RemoteProbe, RemoteInstallMode } from './remote-connection.js';
|
|
2
|
+
export interface InstallationProgress {
|
|
3
|
+
id: string;
|
|
4
|
+
connectionId: string;
|
|
5
|
+
owner: string;
|
|
6
|
+
phase: 'prepared' | 'downloading' | 'uploading' | 'installing' | 'completed' | 'failed' | 'cancelled' | 'interrupted';
|
|
7
|
+
version: string;
|
|
8
|
+
target: string;
|
|
9
|
+
totalBytes: number;
|
|
10
|
+
transferredBytes: number;
|
|
11
|
+
stage: string;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
error?: string;
|
|
14
|
+
clientAuthGeneration: number;
|
|
15
|
+
tenantId: string;
|
|
16
|
+
targetCleanupPending?: boolean;
|
|
17
|
+
transferTotalBytes?: number;
|
|
18
|
+
activity?: string;
|
|
19
|
+
logs?: Array<{
|
|
20
|
+
at: string;
|
|
21
|
+
level: 'info' | 'success' | 'error';
|
|
22
|
+
message: string;
|
|
23
|
+
}>;
|
|
24
|
+
}
|
|
25
|
+
export interface InstallationPlan extends InstallationProgress {
|
|
26
|
+
fingerprint: string;
|
|
27
|
+
installMode: RemoteInstallMode;
|
|
28
|
+
installRoot: string;
|
|
29
|
+
dataRoot: string;
|
|
30
|
+
probe: RemoteProbe;
|
|
31
|
+
previousVersion?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface ManagedCliInstallation {
|
|
34
|
+
version: string;
|
|
35
|
+
previousVersion?: string;
|
|
36
|
+
target: string;
|
|
37
|
+
revision: string;
|
|
38
|
+
}
|
|
39
|
+
export interface RemoteInstallationApi {
|
|
40
|
+
inspect(connectionId: string): Promise<ManagedCliInstallation | null>;
|
|
41
|
+
manage(connectionId: string, action: 'rollback' | 'stop' | 'uninstall', expectedRevision: string): Promise<{
|
|
42
|
+
action: string;
|
|
43
|
+
result: unknown;
|
|
44
|
+
}>;
|
|
45
|
+
prepare(connectionId: string): Promise<InstallationPlan>;
|
|
46
|
+
install(operationId: string, fingerprint: string): Promise<InstallationProgress>;
|
|
47
|
+
status(operationId: string): Promise<InstallationProgress>;
|
|
48
|
+
cancel(operationId: string): Promise<InstallationProgress>;
|
|
49
|
+
onProgress(listener: (progress: InstallationProgress) => void): () => void;
|
|
50
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import type { TaskRef, WorkspaceRef } from './execution-target.js';
|
|
2
|
+
import type { CreateLocalTaskRequest, LocalTask } from './local-task-api.js';
|
|
3
|
+
import type { LocalTaskStateCursor } from './local-task-projection.js';
|
|
4
|
+
export interface RemoteWorkspaceQuery {
|
|
5
|
+
includeArchived?: boolean;
|
|
6
|
+
pinnedOnly?: boolean;
|
|
7
|
+
query?: string;
|
|
8
|
+
limit?: number;
|
|
9
|
+
cursor?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface RemoteTaskPage {
|
|
12
|
+
items: LocalTask[];
|
|
13
|
+
total: number;
|
|
14
|
+
canonicalPath: string;
|
|
15
|
+
nextCursor?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface RemoteAgentIdentity {
|
|
18
|
+
runId: string;
|
|
19
|
+
sourceThreadId: string;
|
|
20
|
+
teamRunId?: string;
|
|
21
|
+
memberRunId?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface RemoteAgentEventPage {
|
|
24
|
+
status: 'available' | 'missing';
|
|
25
|
+
data: Uint8Array;
|
|
26
|
+
nextCursor?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface RemoteAgentMember {
|
|
29
|
+
identity: RemoteAgentIdentity;
|
|
30
|
+
kind: 'team' | 'sub_agent';
|
|
31
|
+
displayName: string;
|
|
32
|
+
status: string;
|
|
33
|
+
eventId: string;
|
|
34
|
+
updatedAt: string;
|
|
35
|
+
parentThreadId?: string;
|
|
36
|
+
resultEventId?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface RemoteAgentMemberPage {
|
|
39
|
+
items: RemoteAgentMember[];
|
|
40
|
+
total: number;
|
|
41
|
+
revision: string;
|
|
42
|
+
nextCursor?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface RemoteFileQuery {
|
|
45
|
+
path?: string;
|
|
46
|
+
worktreeId?: string;
|
|
47
|
+
cursor?: string;
|
|
48
|
+
limit?: number;
|
|
49
|
+
}
|
|
50
|
+
export interface RemoteFilePage {
|
|
51
|
+
entries: Array<{
|
|
52
|
+
name: string;
|
|
53
|
+
path: string;
|
|
54
|
+
nodeType: 'folder' | 'file' | 'link';
|
|
55
|
+
sizeBytes: number;
|
|
56
|
+
modifiedAt: string;
|
|
57
|
+
}>;
|
|
58
|
+
path: string;
|
|
59
|
+
revision: string;
|
|
60
|
+
nextCursor: string | null;
|
|
61
|
+
}
|
|
62
|
+
export interface RemoteTasksApi {
|
|
63
|
+
artifactPage(task: TaskRef, query: Omit<import('./local-task-api.js').ListLocalTaskArtifactsRequest, 'taskId'> & {
|
|
64
|
+
cursor?: string;
|
|
65
|
+
}): Promise<{
|
|
66
|
+
items: import('./local-task-api.js').LocalTaskArtifact[];
|
|
67
|
+
total: number;
|
|
68
|
+
nextCursor?: string;
|
|
69
|
+
}>;
|
|
70
|
+
creationStatus(connectionId: string, workspace: WorkspaceRef, operationId: string): Promise<{
|
|
71
|
+
state: 'not_found' | 'running' | 'completed' | 'failed' | 'interrupted';
|
|
72
|
+
error?: string;
|
|
73
|
+
}>;
|
|
74
|
+
abandonCreation(connectionId: string, workspace: WorkspaceRef, operationId: string, request: CreateLocalTaskRequest): ReturnType<RemoteTasksApi['creationStatus']>;
|
|
75
|
+
environment<K extends keyof import('./target-environments.js').TargetEnvironmentMethods>(connectionId: string, method: K, args: Parameters<import('./target-environments.js').TargetEnvironmentMethods[K]>): Promise<Awaited<ReturnType<import('./target-environments.js').TargetEnvironmentMethods[K]>>>;
|
|
76
|
+
prepareExpertSync(scope: import('./target-resources.js').TargetResourceScope, expertId: string): Promise<import('./target-resources.js').TargetExpertSyncPlan>;
|
|
77
|
+
syncExpert(planId: string, autoUpdates?: boolean): Promise<import('./my-expert-api.js').MyExpertPublishResult>;
|
|
78
|
+
openPortForward(task: TaskRef, port: number): Promise<{
|
|
79
|
+
id: string;
|
|
80
|
+
url: string;
|
|
81
|
+
targetPort: number;
|
|
82
|
+
}>;
|
|
83
|
+
closePortForward(task: TaskRef, id: string): Promise<void>;
|
|
84
|
+
prepareSkillSync(scope: import('./target-resources.js').TargetResourceScope, reference: string): Promise<import('./target-resources.js').TargetSkillSyncPlan>;
|
|
85
|
+
syncSkill(planId: string, folderName: string, autoUpdates?: boolean): Promise<import('./local-skill-api.js').LocalSkillDefinition>;
|
|
86
|
+
fileDirectory(task: TaskRef, query: RemoteFileQuery): Promise<RemoteFilePage>;
|
|
87
|
+
subscribeFiles(task: TaskRef, query: RemoteFileQuery): Promise<{
|
|
88
|
+
subscriptionId: string;
|
|
89
|
+
sequence: number;
|
|
90
|
+
snapshot: RemoteFilePage;
|
|
91
|
+
}>;
|
|
92
|
+
acknowledgeFiles(subscriptionId: string, sequence: number): Promise<void>;
|
|
93
|
+
unsubscribeFiles(subscriptionId: string): Promise<void>;
|
|
94
|
+
onFilesChanged(listener: (change: {
|
|
95
|
+
subscriptionId: string;
|
|
96
|
+
error?: {
|
|
97
|
+
code: string;
|
|
98
|
+
message: string;
|
|
99
|
+
};
|
|
100
|
+
}) => void): () => void;
|
|
101
|
+
agentEventPage(task: TaskRef, identity: RemoteAgentIdentity, cursor?: string): Promise<RemoteAgentEventPage>;
|
|
102
|
+
agentMembers(task: TaskRef, cursor?: string): Promise<RemoteAgentMemberPage>;
|
|
103
|
+
resources: import('./target-resources.js').TargetResourcesApi['invoke'];
|
|
104
|
+
list(connectionId: string, workspace: WorkspaceRef, query?: RemoteWorkspaceQuery): Promise<RemoteTaskPage>;
|
|
105
|
+
subscribeList(connectionId: string, workspace: WorkspaceRef, query?: RemoteWorkspaceQuery): Promise<{
|
|
106
|
+
subscriptionId: string;
|
|
107
|
+
page: RemoteTaskPage;
|
|
108
|
+
cursor: LocalTaskStateCursor;
|
|
109
|
+
}>;
|
|
110
|
+
acknowledgeList(subscriptionId: string, cursor: LocalTaskStateCursor): Promise<void>;
|
|
111
|
+
unsubscribeList(subscriptionId: string): Promise<void>;
|
|
112
|
+
onListChanged(listener: (change: {
|
|
113
|
+
subscriptionId: string;
|
|
114
|
+
workspace: WorkspaceRef;
|
|
115
|
+
}) => void): () => void;
|
|
116
|
+
create(connectionId: string, workspace: WorkspaceRef, request: CreateLocalTaskRequest, operationId: string): Promise<LocalTask>;
|
|
117
|
+
get(ref: TaskRef): Promise<LocalTask>;
|
|
118
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export interface CompactionPolicy {
|
|
2
|
+
/** Fraction of the context window; still bounded by the model's input limit. */
|
|
3
|
+
triggerRatio?: number;
|
|
4
|
+
triggerTokens?: number;
|
|
5
|
+
instructions?: string;
|
|
6
|
+
/** Prompt target, not an enforced truncation of the model's summary. */
|
|
7
|
+
summaryTargetTokens?: number;
|
|
8
|
+
/** Maximum characters in the structured task handoff, independent of native history retention. */
|
|
9
|
+
handoffCharacters?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface GenerationOptions {
|
|
12
|
+
temperature?: number;
|
|
13
|
+
topP?: number;
|
|
14
|
+
maxOutputTokens?: number;
|
|
15
|
+
responseFormat?: {
|
|
16
|
+
name: string;
|
|
17
|
+
schema: Record<string, unknown>;
|
|
18
|
+
strict?: boolean;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export type GenerationCapabilities = Partial<Record<keyof GenerationOptions, boolean>>;
|
|
22
|
+
export declare function validateGenerationCapabilities(value: unknown): asserts value is GenerationCapabilities;
|
|
23
|
+
export declare function supportedGeneration(options: GenerationOptions | undefined, capabilities: GenerationCapabilities | undefined): GenerationOptions | undefined;
|
|
24
|
+
export interface RuntimeTuning {
|
|
25
|
+
compaction?: CompactionPolicy;
|
|
26
|
+
generation?: GenerationOptions;
|
|
27
|
+
}
|
|
28
|
+
export interface AppliedRuntimeTuning {
|
|
29
|
+
requested: RuntimeTuning;
|
|
30
|
+
effectiveGeneration?: GenerationOptions;
|
|
31
|
+
thresholdTokens?: number;
|
|
32
|
+
handoffCharacters: number;
|
|
33
|
+
summaryBudget: 'model_target';
|
|
34
|
+
nativeHistoryRetention: 'runtime_default';
|
|
35
|
+
}
|
|
36
|
+
export declare function appliedRuntimeTuning(requested: RuntimeTuning | undefined, thresholdTokens: number | undefined, maxOutputTokens?: number): AppliedRuntimeTuning;
|
|
37
|
+
export interface RuntimeTuningState {
|
|
38
|
+
configured?: RuntimeTuning;
|
|
39
|
+
applied?: AppliedRuntimeTuning;
|
|
40
|
+
model?: string;
|
|
41
|
+
updatedAt?: string;
|
|
42
|
+
}
|
|
43
|
+
export declare function parseRuntimeTuning(value: unknown): RuntimeTuning;
|
|
44
|
+
export declare function compactionPrompt(policy?: CompactionPolicy): string | undefined;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export type SceneCaseCategoryCode = 'WORKING' | 'CODING' | 'DESIGN';
|
|
2
|
+
export type SceneCaseBindingType = 'LOCAL_SKILL' | 'INTERNAL_TOOL' | 'EXPERT' | 'EXPERT_TEAM' | 'EXTERNAL_SERVICE';
|
|
3
|
+
export interface SceneCaseCategory {
|
|
4
|
+
code: SceneCaseCategoryCode;
|
|
5
|
+
name: string;
|
|
6
|
+
sortNo: number;
|
|
7
|
+
}
|
|
8
|
+
export interface SceneCasePrompt {
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
content: string;
|
|
12
|
+
sortNo: number;
|
|
13
|
+
}
|
|
14
|
+
export interface SceneCaseBinding {
|
|
15
|
+
id: string;
|
|
16
|
+
type: SceneCaseBindingType;
|
|
17
|
+
key: string;
|
|
18
|
+
name: string;
|
|
19
|
+
description: string | null;
|
|
20
|
+
required: boolean;
|
|
21
|
+
sortNo: number;
|
|
22
|
+
}
|
|
23
|
+
export interface SceneCase {
|
|
24
|
+
id: string;
|
|
25
|
+
code: string;
|
|
26
|
+
categoryCode: SceneCaseCategoryCode;
|
|
27
|
+
categoryName: string;
|
|
28
|
+
name: string;
|
|
29
|
+
summary: string;
|
|
30
|
+
iconUrl: string | null;
|
|
31
|
+
sortNo: number;
|
|
32
|
+
prompts: SceneCasePrompt[];
|
|
33
|
+
bindings: SceneCaseBinding[];
|
|
34
|
+
}
|
|
35
|
+
export interface SceneCaseListQuery {
|
|
36
|
+
categoryCode?: SceneCaseCategoryCode;
|
|
37
|
+
}
|
|
38
|
+
export interface SceneCaseApi {
|
|
39
|
+
listCategories: () => Promise<SceneCaseCategory[]>;
|
|
40
|
+
list: (query?: SceneCaseListQuery) => Promise<SceneCase[]>;
|
|
41
|
+
getDetail: (sceneCaseId: string) => Promise<SceneCase>;
|
|
42
|
+
}
|