@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,165 @@
|
|
|
1
|
+
export declare const MEMORY_GROUPS: readonly ["工作背景", "个人背景", "当前关注", "近期动态"];
|
|
2
|
+
export type MemoryGroup = typeof MEMORY_GROUPS[number];
|
|
3
|
+
export type MemoryKind = 'instruction' | 'fact' | 'preference' | 'decision' | 'task';
|
|
4
|
+
/** Long-term memory belongs to one account, independent of enterprise or personal mode. */
|
|
5
|
+
export interface MemoryScope {
|
|
6
|
+
environment: 'dev' | 'prod';
|
|
7
|
+
userId: string; /** Host-authorized namespace; absent for existing desktop/CLI account memory. */
|
|
8
|
+
namespace?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface MemorySource {
|
|
11
|
+
kind: 'user_edit' | 'user_import' | 'conversation';
|
|
12
|
+
taskId?: string;
|
|
13
|
+
messageId?: string;
|
|
14
|
+
generation?: string;
|
|
15
|
+
role?: string;
|
|
16
|
+
occurredAt: string | null;
|
|
17
|
+
}
|
|
18
|
+
export interface MemoryResource {
|
|
19
|
+
id: string;
|
|
20
|
+
kind: 'file' | 'skill';
|
|
21
|
+
name: string;
|
|
22
|
+
path: string;
|
|
23
|
+
version: string;
|
|
24
|
+
}
|
|
25
|
+
export interface MemoryApplicability {
|
|
26
|
+
platforms?: Array<'win32' | 'darwin' | 'linux'>;
|
|
27
|
+
resources?: MemoryResource[];
|
|
28
|
+
}
|
|
29
|
+
export interface MemoryLifecycle {
|
|
30
|
+
state: 'ongoing' | 'completed';
|
|
31
|
+
expiresAt?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface MemoryRecallContext {
|
|
34
|
+
platform: string;
|
|
35
|
+
projectId?: string;
|
|
36
|
+
permissionVersion: string;
|
|
37
|
+
}
|
|
38
|
+
export interface MemoryRecord {
|
|
39
|
+
/** subject names the entity or topic; content describes it. Present both to users and consumers. */
|
|
40
|
+
id: string;
|
|
41
|
+
revision: number;
|
|
42
|
+
kind: MemoryKind;
|
|
43
|
+
group: MemoryGroup;
|
|
44
|
+
subject: string;
|
|
45
|
+
content: string;
|
|
46
|
+
originalInstruction?: string;
|
|
47
|
+
occurredAt: string | null;
|
|
48
|
+
status: 'active' | 'candidate' | 'conflicted' | 'superseded' | 'invalidated';
|
|
49
|
+
sources: MemorySource[];
|
|
50
|
+
updatedAt: string;
|
|
51
|
+
conflictsWith?: string[];
|
|
52
|
+
createdAt?: string;
|
|
53
|
+
manualUpdatedAt?: string;
|
|
54
|
+
contentDigest?: string;
|
|
55
|
+
applicability?: MemoryApplicability;
|
|
56
|
+
lifecycle?: MemoryLifecycle;
|
|
57
|
+
invalidationReason?: 'source_changed' | 'resource_changed' | 'expired' | 'unsupported_evidence' | 'unresolved_conflict';
|
|
58
|
+
previous?: {
|
|
59
|
+
revision: number;
|
|
60
|
+
content: string;
|
|
61
|
+
updatedAt: string;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export interface MemoryState {
|
|
65
|
+
organizationVersion?: 2;
|
|
66
|
+
version: 1;
|
|
67
|
+
epoch: string;
|
|
68
|
+
revision: number;
|
|
69
|
+
enabled: boolean;
|
|
70
|
+
resetAt: string;
|
|
71
|
+
updatedAt?: string;
|
|
72
|
+
operation?: MemoryOperation;
|
|
73
|
+
cursors: Record<string, string>;
|
|
74
|
+
revoked?: string[];
|
|
75
|
+
deletedSubjects?: Record<string, string>;
|
|
76
|
+
collectionAfter?: string;
|
|
77
|
+
cleanupEpochs?: string[];
|
|
78
|
+
completedOperations?: string[];
|
|
79
|
+
quarantined?: string[];
|
|
80
|
+
}
|
|
81
|
+
export interface MemoryOperation {
|
|
82
|
+
id: string;
|
|
83
|
+
status: 'running' | 'completed' | 'failed' | 'cancelled';
|
|
84
|
+
mode?: 'edit' | 'import' | 'extract';
|
|
85
|
+
error?: string;
|
|
86
|
+
clarification?: string;
|
|
87
|
+
}
|
|
88
|
+
export interface MemoryView {
|
|
89
|
+
scope: MemoryScope;
|
|
90
|
+
enabled: boolean;
|
|
91
|
+
revision: number;
|
|
92
|
+
updatedAt?: string;
|
|
93
|
+
groups: Array<{
|
|
94
|
+
title: MemoryGroup;
|
|
95
|
+
items: MemoryRecord[];
|
|
96
|
+
}>;
|
|
97
|
+
total: number;
|
|
98
|
+
operation?: MemoryOperation;
|
|
99
|
+
storageNotice?: string;
|
|
100
|
+
page?: number;
|
|
101
|
+
hasMore?: boolean;
|
|
102
|
+
}
|
|
103
|
+
export interface MemoryChange {
|
|
104
|
+
action: 'add' | 'merge' | 'replace' | 'remove' | 'no_change';
|
|
105
|
+
id?: string;
|
|
106
|
+
revision?: number;
|
|
107
|
+
kind?: MemoryKind;
|
|
108
|
+
group?: MemoryGroup;
|
|
109
|
+
subject?: string;
|
|
110
|
+
content?: string;
|
|
111
|
+
originalInstruction?: string;
|
|
112
|
+
occurredAt?: string | null;
|
|
113
|
+
sourceIds?: string[];
|
|
114
|
+
applicability?: Omit<MemoryApplicability, 'resources'>;
|
|
115
|
+
resourceIds?: string[];
|
|
116
|
+
lifecycle?: MemoryLifecycle;
|
|
117
|
+
}
|
|
118
|
+
export interface MemoryProposal {
|
|
119
|
+
changes: MemoryChange[];
|
|
120
|
+
clarification?: string;
|
|
121
|
+
}
|
|
122
|
+
export interface MemorySearchHit {
|
|
123
|
+
id: string;
|
|
124
|
+
subject: string;
|
|
125
|
+
content: string;
|
|
126
|
+
kind: MemoryKind;
|
|
127
|
+
group: MemoryGroup;
|
|
128
|
+
sources: MemorySource[];
|
|
129
|
+
lifecycle?: MemoryLifecycle;
|
|
130
|
+
occurredAt?: string | null;
|
|
131
|
+
}
|
|
132
|
+
export interface HistoryHit {
|
|
133
|
+
id: string;
|
|
134
|
+
taskId: string;
|
|
135
|
+
recordId: string;
|
|
136
|
+
role: string;
|
|
137
|
+
occurredAt: string;
|
|
138
|
+
content: string;
|
|
139
|
+
generation: string;
|
|
140
|
+
truncated: boolean;
|
|
141
|
+
}
|
|
142
|
+
export interface MemoryContextRequest {
|
|
143
|
+
page?: number; /** SDK management calls select an explicitly authorized session. */
|
|
144
|
+
sessionId?: string;
|
|
145
|
+
}
|
|
146
|
+
export interface MemoryEditRequest extends MemoryContextRequest {
|
|
147
|
+
text: string;
|
|
148
|
+
mode: 'edit' | 'import';
|
|
149
|
+
operationId: string;
|
|
150
|
+
}
|
|
151
|
+
export interface LocalMemoryApi {
|
|
152
|
+
get(request?: MemoryContextRequest): Promise<MemoryView>;
|
|
153
|
+
setEnabled(request: MemoryContextRequest & {
|
|
154
|
+
enabled: boolean;
|
|
155
|
+
}): Promise<MemoryView>;
|
|
156
|
+
edit(request: MemoryEditRequest): Promise<MemoryView>;
|
|
157
|
+
reset(request: MemoryContextRequest): Promise<MemoryView>;
|
|
158
|
+
}
|
|
159
|
+
export declare function sameMemoryIdentity(a: MemoryScope, b: MemoryScope): boolean;
|
|
160
|
+
/** A bounded deterministic lexical vocabulary, including Chinese words without a vector service. */
|
|
161
|
+
export declare function memoryTerms(text: string): string[];
|
|
162
|
+
export declare function memorySearchExpression(text: string): string;
|
|
163
|
+
export declare function memoryInput(value: unknown, limit?: number): string;
|
|
164
|
+
/** Credential-bearing lines never enter the persistent memory pipeline. */
|
|
165
|
+
export declare function redactMemorySecrets(text: string): string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { LocalTaskPluginReference } from './local-task-api.js';
|
|
2
|
+
import type { PluginMarketDetail } from './plugin-market-api.js';
|
|
3
|
+
export type LocalPluginSource = 'PLATFORM' | 'ENTERPRISE';
|
|
4
|
+
export interface LocalPluginInstallation {
|
|
5
|
+
plugin: PluginMarketDetail;
|
|
6
|
+
runtime: LocalTaskPluginReference;
|
|
7
|
+
source: LocalPluginSource;
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
installedAt: string;
|
|
10
|
+
updatedAt: string;
|
|
11
|
+
}
|
|
12
|
+
export interface InstallLocalPluginRequest {
|
|
13
|
+
plugin: PluginMarketDetail;
|
|
14
|
+
source: LocalPluginSource;
|
|
15
|
+
}
|
|
16
|
+
export interface SetLocalPluginEnabledRequest {
|
|
17
|
+
pluginId: string;
|
|
18
|
+
enabled: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface LocalPluginApi {
|
|
21
|
+
list: () => Promise<LocalPluginInstallation[]>;
|
|
22
|
+
refresh: () => Promise<LocalPluginInstallation[]>;
|
|
23
|
+
install: (request: InstallLocalPluginRequest) => Promise<LocalPluginInstallation>;
|
|
24
|
+
setEnabled: (request: SetLocalPluginEnabledRequest) => Promise<LocalPluginInstallation>;
|
|
25
|
+
remove: (pluginId: string) => Promise<void>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type LocalRuntimeStatus = 'unavailable' | 'stopped' | 'starting' | 'ready' | 'stopping' | 'failed';
|
|
2
|
+
export interface LocalRuntimeExecutionLease {
|
|
3
|
+
taskId: string;
|
|
4
|
+
runId: string;
|
|
5
|
+
acquiredAt: string;
|
|
6
|
+
}
|
|
7
|
+
export interface LocalRuntimeTaskState {
|
|
8
|
+
resourceConfiguration?: import('./task-resource-manifest.js').TaskResourceManifest['configuration'];
|
|
9
|
+
status: LocalRuntimeStatus;
|
|
10
|
+
taskId: string;
|
|
11
|
+
startedAt?: string;
|
|
12
|
+
stoppedAt?: string;
|
|
13
|
+
lastError?: string;
|
|
14
|
+
executionLease?: LocalRuntimeExecutionLease;
|
|
15
|
+
}
|
|
16
|
+
export interface LocalRuntimeState {
|
|
17
|
+
status: LocalRuntimeStatus;
|
|
18
|
+
taskId?: string;
|
|
19
|
+
startedAt?: string;
|
|
20
|
+
stoppedAt?: string;
|
|
21
|
+
lastError?: string;
|
|
22
|
+
executionLease?: LocalRuntimeExecutionLease;
|
|
23
|
+
taskStates?: LocalRuntimeTaskState[];
|
|
24
|
+
executionLeases?: LocalRuntimeExecutionLease[];
|
|
25
|
+
}
|
|
26
|
+
export interface LocalRuntimeApi {
|
|
27
|
+
getState: () => Promise<LocalRuntimeState>;
|
|
28
|
+
start: (taskId: string) => Promise<LocalRuntimeState>;
|
|
29
|
+
stop: (taskId: string) => Promise<LocalRuntimeState>;
|
|
30
|
+
restart: (taskId: string) => Promise<LocalRuntimeState>;
|
|
31
|
+
onStateChanged: (listener: (state: LocalRuntimeState) => void) => () => void;
|
|
32
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { LocalTaskSkillReference } from './local-task-api.js';
|
|
2
|
+
import type { PersonalSkillUploadResult } from './skill-upload.js';
|
|
3
|
+
export type LocalSkillImportKind = 'FILE' | 'DIRECTORY';
|
|
4
|
+
export interface LocalSkillDefinition {
|
|
5
|
+
/** Opaque installation/profile identity; never a portable same-name reference. */
|
|
6
|
+
executionScope?: string;
|
|
7
|
+
/** 新版本地技能的稳定身份,等于安装目录名称。 */
|
|
8
|
+
folderName: string;
|
|
9
|
+
/**
|
|
10
|
+
* UI 和既有项目配置使用的本地引用。新版等于 folderName;旧版保持原有
|
|
11
|
+
* local:<digest> 值,读取旧数据时不会改写磁盘内容。
|
|
12
|
+
*/
|
|
13
|
+
reference: string;
|
|
14
|
+
legacySkillId?: string;
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
version?: string;
|
|
18
|
+
packagePath: string;
|
|
19
|
+
skillPath: string;
|
|
20
|
+
installedAt: string;
|
|
21
|
+
updatedAt: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ImportLocalSkillsRequest {
|
|
24
|
+
kind: LocalSkillImportKind;
|
|
25
|
+
}
|
|
26
|
+
export interface ImportLocalSkillsResult {
|
|
27
|
+
canceled: boolean;
|
|
28
|
+
skills: LocalSkillDefinition[];
|
|
29
|
+
}
|
|
30
|
+
export interface LocalSkillContent {
|
|
31
|
+
skill: LocalSkillDefinition;
|
|
32
|
+
content: string;
|
|
33
|
+
}
|
|
34
|
+
export interface LocalSkillApi {
|
|
35
|
+
list: () => Promise<LocalSkillDefinition[]>;
|
|
36
|
+
getContent: (reference: string) => Promise<LocalSkillContent>;
|
|
37
|
+
openDirectory: (reference: string) => Promise<void>;
|
|
38
|
+
importFromDialog: (request: ImportLocalSkillsRequest) => Promise<ImportLocalSkillsResult>;
|
|
39
|
+
remove: (reference: string) => Promise<void>;
|
|
40
|
+
uploadToPersonal: (reference: string) => Promise<PersonalSkillUploadResult>;
|
|
41
|
+
prepareForLocalTask: (reference: string) => Promise<LocalTaskSkillReference>;
|
|
42
|
+
}
|