@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,492 @@
1
+ import type { BuiltinSelection, BuiltinSnapshot, CapabilityDescriptor } from '../../shared/agent-capabilities.js';
2
+ import type { AuthSession, AuthPasswordChangeRequired } from '../../shared/desktop-api.js';
3
+ import type { CredentialProvider, ManagedAuthentication } from '../../shared/managed-authorization.js';
4
+ export type { TeamState, TeamMemberState, TeamTaskState, TeamCommand, TeamCommandResult } from '../../shared/team-control.js';
5
+ export type { ManagedAuthentication, ManagedPrincipal, ManagedCredential, ManagedCredentialRequest, CredentialProvider, CredentialReason, ManagedAuthorizationEvent } from '../../shared/managed-authorization.js';
6
+ export type { BuiltinSelection, BuiltinSnapshot, CapabilityDescriptor, ToolCategory, SkillCategory } from '../../shared/agent-capabilities.js';
7
+ export type { AuthSession, PlatformUser, TenantSummary, LoginContext, AuthRequiredPasswordChangeRequest, AuthSwitchSubjectRequest } from '../../shared/desktop-api.js';
8
+ export type { AvailableChatModel } from '../../shared/cloud-assistant-api.js';
9
+ export type { AccountContextSummary, AccountContextQuery } from '../../shared/account-context-api.js';
10
+ export type { PersonalUsageStatistics } from '../../shared/usage-statistics-api.js';
11
+ export type { EnterpriseKnowledgeBase, EnterpriseKnowledgeSearchQuery, EnterpriseKnowledgeSearchResult, EnterpriseKnowledgeDocument, EnterpriseKnowledgeTreeResult } from '../../shared/enterprise-knowledge-api.js';
12
+ export type { SkillMarketItem, SkillMarketDetail, SkillMarketSearchQuery, SkillMarketSearchResult } from '../../shared/skill-market-api.js';
13
+ export type { PluginMarketItem, PluginMarketDetail, PluginMarketListQuery, PluginMarketListResult } from '../../shared/plugin-market-api.js';
14
+ export type { PluginAuthorizationStatus, PluginAuthorizationDefinition, PluginAuthorizationSaveRequest } from '../../shared/plugin-market-api.js';
15
+ export type { LocalPluginInstallation } from '../../shared/local-plugin-api.js';
16
+ export type { SkillVersionSelection, SkillVersionUpdate } from '../../core/skills/skill-versions.js';
17
+ export interface SkillVersionInfo {
18
+ binding: import('../../core/skills/skill-bindings.js').SkillBinding;
19
+ current: import('../../shared/local-task-api.js').LocalTaskSkillReference;
20
+ }
21
+ export type SkillVersionUpdateResult = Awaited<ReturnType<typeof import('../../core/skills/skill-versions.js').updateSkillVersion>>;
22
+ export interface PluginUpdateResult {
23
+ changed: boolean;
24
+ before: {
25
+ recordId: string;
26
+ version?: string | null;
27
+ };
28
+ installation: import('../../shared/local-plugin-api.js').LocalPluginInstallation;
29
+ }
30
+ export interface ExternalModel {
31
+ generationCapabilities?: import('../../shared/runtime-tuning.js').GenerationCapabilities;
32
+ id: string;
33
+ endpoint: string;
34
+ model: string;
35
+ protocol: 'chat_completions' | 'responses';
36
+ apiKey?: string;
37
+ contextWindow: number;
38
+ maxOutputTokens?: number;
39
+ functionCalling: boolean;
40
+ imageInput?: boolean;
41
+ reasoning?: boolean;
42
+ }
43
+ export interface RuntimeOptions {
44
+ /** Omit to use the matching runtime installed with this npm package. */
45
+ directory?: string;
46
+ dataDirectory: string;
47
+ /** Optional storage bases. Each uses the same app/principal partition as dataDirectory. */
48
+ workspaceDirectory?: string;
49
+ cacheDirectory?: string;
50
+ temporaryDirectory?: string;
51
+ nodeExecutable?: string;
52
+ tools?: Partial<Record<'node' | 'python' | 'git' | 'bash' | 'npm', string>>;
53
+ chromiumExecutable?: string;
54
+ /** Override only for a runtime built and signed by your own organization. */
55
+ trustedPublicKey?: string;
56
+ }
57
+ /** Attach to an already running CLI; never starts, installs or stops that service. */
58
+ export interface CliConnectionOptions {
59
+ dataDirectory: string;
60
+ appId: string;
61
+ userScope: string;
62
+ appName?: string;
63
+ builtins?: BuiltinSelection;
64
+ }
65
+ export interface NetworkOptions {
66
+ proxyMode: 'off' | 'system' | 'custom';
67
+ proxyUrl: string;
68
+ caFile: string;
69
+ noProxy: string;
70
+ }
71
+ interface CommonOptions {
72
+ authorization?: {
73
+ required: boolean;
74
+ };
75
+ memory?: import('../../shared/memory-customization.js').MemoryConfiguration;
76
+ /** Explicit host declarations, keyed by platform model code. Unlisted parameters are rejected. */
77
+ generationCapabilities?: Record<string, import('../../shared/runtime-tuning.js').GenerationCapabilities>;
78
+ appId: string;
79
+ userScope: string;
80
+ appName?: string;
81
+ runtime: RuntimeOptions;
82
+ builtins?: BuiltinSelection;
83
+ network?: NetworkOptions;
84
+ communication?: import('./communication.js').CommunicationOptions;
85
+ }
86
+ export type ClientOptions = CommonOptions & ({
87
+ mode: 'platform';
88
+ platformBaseUrl: string;
89
+ environment?: 'dev' | 'prod';
90
+ /** Omit for SDK-managed interactive login. Managed mode never stores platform credentials. */
91
+ authentication?: ManagedAuthentication;
92
+ } | {
93
+ mode: 'standalone';
94
+ models: ExternalModel[];
95
+ });
96
+ export type ResolvedClientOptions = ClientOptions & {
97
+ runtime: RuntimeOptions & {
98
+ directory: string;
99
+ };
100
+ };
101
+ export interface ClientServices {
102
+ credentials?: CredentialProvider;
103
+ diagnostics?: import('./diagnostics.js').DiagnosticSink;
104
+ memoryStore?: import('../../shared/memory-customization.js').MemoryStoreAdapter;
105
+ authorize?: import('./authorization.js').SessionAuthorizer;
106
+ }
107
+ export interface ToolContext {
108
+ files?: {
109
+ resolve(path: string, access: 'read' | 'write'): Promise<import('./file-storage.js').FileReference>;
110
+ };
111
+ signal: AbortSignal;
112
+ callId: string;
113
+ /** Present on calls dispatched by the SDK execution engine; not model arguments. */
114
+ execution?: Readonly<import('../../shared/execution-context.js').ExecutionBinding & {
115
+ invocationId: string;
116
+ }>;
117
+ }
118
+ export interface BusinessTool {
119
+ name: string;
120
+ description: string;
121
+ inputSchema: Record<string, unknown>;
122
+ readOnly: boolean;
123
+ execute(input: Record<string, unknown>, context: ToolContext): unknown | Promise<unknown>;
124
+ }
125
+ export interface McpServer {
126
+ id: string;
127
+ name: string;
128
+ transport: 'HTTP' | 'STDIO';
129
+ url?: string;
130
+ bearerToken?: string;
131
+ command?: string;
132
+ args?: string[];
133
+ env?: Record<string, string>;
134
+ tools?: string[];
135
+ defaultToolsApproval?: 'auto' | 'prompt';
136
+ toolApprovals?: Record<string, 'auto' | 'prompt'>;
137
+ }
138
+ export interface ExecutionDefaults {
139
+ runtimeTuning?: import('../../shared/runtime-tuning.js').RuntimeTuning;
140
+ model: string;
141
+ mode?: 'agent' | 'plan' | 'chat';
142
+ permissionMode?: 'ask_dangerous' | 'allow_all';
143
+ thinkingEnabled?: boolean;
144
+ reasoningEffort?: import('../../shared/model-selection.js').ModelReasoningEffort;
145
+ /** Requested window; the shared model policy validates it against the model capacity. */
146
+ contextWindow?: number;
147
+ }
148
+ export interface AgentDefinition extends ExecutionDefaults {
149
+ jsHooks?: Partial<Record<'beforeTool' | 'afterTool', {
150
+ matcher?: string;
151
+ timeoutMs?: number;
152
+ execute(event: Readonly<import('../../shared/js-agent-hooks.js').ToolLifecycleEvent>, context: {
153
+ signal: AbortSignal;
154
+ }): void | import('../../shared/js-agent-hooks.js').ToolHookDecision | Promise<void | import('../../shared/js-agent-hooks.js').ToolHookDecision>;
155
+ }>>;
156
+ /** Serializable lifecycle policy returned by session configuration. */
157
+ jsHookDefinitions?: import('../../shared/js-agent-hooks.js').JsHookDefinition[];
158
+ team?: import('../../shared/agent-team.js').AgentTeamDefinition;
159
+ id: string;
160
+ version: string;
161
+ name: string;
162
+ instructions: string;
163
+ rules?: import('../../shared/session-policy.js').ApplicationRule[];
164
+ profile?: import('../../shared/execution-profile.js').ExecutionProfile;
165
+ hooks?: import('../../shared/agent-hooks.js').AgentCommandHook[];
166
+ builtins?: BuiltinSelection;
167
+ tools?: BusinessTool[];
168
+ /** Stable logical identity, independent of the callback URL and secret. */
169
+ toolProviderId?: string;
170
+ mcpServers?: McpServer[];
171
+ skills?: import('../../shared/local-task-api.js').LocalTaskSkillReference[];
172
+ plugins?: import('../../shared/local-task-api.js').LocalTaskPluginReference[];
173
+ }
174
+ export type { LocalSkillDefinition } from '../../shared/local-skill-api.js';
175
+ export type { ExecutionProfile } from '../../shared/execution-profile.js';
176
+ export type { AgentCommandHook } from '../../shared/agent-hooks.js';
177
+ export type { AgentTeamDefinition, AgentTeamMember } from '../../shared/agent-team.js';
178
+ export type { TaskPathPolicy } from '../../shared/task-path-policy.js';
179
+ export type { TaskOperationReference, TaskOperationSnapshot } from '../../shared/task-operation.js';
180
+ export type { ExecutionContext, ExecutionBinding } from '../../shared/execution-context.js';
181
+ export type { SessionScopePolicy, SessionMemoryPolicy, RunMemoryPolicy, ApplicationRule } from '../../shared/session-policy.js';
182
+ export interface SessionCreateOptions {
183
+ name?: string;
184
+ workspacePath?: string;
185
+ creationId?: string;
186
+ policy?: import('../../shared/session-policy.js').SessionScopePolicy;
187
+ }
188
+ export type { ArtifactEvidence, ArtifactVerification } from '../../shared/artifact-evidence.js';
189
+ export interface ArtifactQuery {
190
+ runId?: string;
191
+ query?: string;
192
+ type?: import('../../shared/local-task-api.js').LocalTaskArtifactType;
193
+ limit?: number;
194
+ }
195
+ export type SessionArtifact = import('../../shared/local-task-api.js').LocalTaskArtifact & {
196
+ /** Latest observed reference, or workspace-only when no execution evidence exists. */
197
+ source: {
198
+ kind: 'execution' | 'workspace';
199
+ eventId?: string;
200
+ runId?: string;
201
+ threadId?: string;
202
+ tool?: string;
203
+ at?: string;
204
+ };
205
+ evidence: import('../../shared/artifact-evidence.js').ArtifactEvidence[];
206
+ operations: import('../../shared/task-operation.js').TaskOperationReference[];
207
+ };
208
+ export interface SessionInfo {
209
+ id: string;
210
+ name: string;
211
+ workspacePath: string;
212
+ status: string;
213
+ metadataRevision: string;
214
+ createdAt: string;
215
+ updatedAt: string;
216
+ archivedAt?: string;
217
+ }
218
+ export interface SessionConfiguration {
219
+ revision: number;
220
+ agent: Omit<AgentDefinition, 'tools' | 'mcpServers' | 'jsHooks'>;
221
+ builtins: BuiltinSnapshot;
222
+ defaults: ExecutionDefaults;
223
+ policy?: import('../../shared/session-policy.js').SessionScopePolicy;
224
+ parent?: {
225
+ sessionId: string;
226
+ memberId: string;
227
+ configurationRevision: number;
228
+ };
229
+ }
230
+ export interface SessionAgentUpdate {
231
+ agentId: string;
232
+ agentVersion: string;
233
+ expectedRevision: number;
234
+ }
235
+ export interface ProviderStatus {
236
+ agentId: string;
237
+ agentVersion: string;
238
+ /** Registration status only; does not assert that an external MCP server is reachable. */
239
+ status: 'registered' | 'unregistered';
240
+ providers: Array<{
241
+ id: string;
242
+ name: string;
243
+ }>;
244
+ ownedByCaller: boolean;
245
+ }
246
+ export interface ConfigurationUpdate {
247
+ authorization?: {
248
+ required: boolean;
249
+ };
250
+ memory?: import('../../shared/memory-customization.js').MemoryConfiguration;
251
+ generationCapabilities?: Record<string, import('../../shared/runtime-tuning.js').GenerationCapabilities>;
252
+ communication?: import('./communication.js').CommunicationOptions;
253
+ runtime?: RuntimeOptions;
254
+ builtins?: BuiltinSelection;
255
+ network?: NetworkOptions;
256
+ platformBaseUrl?: string;
257
+ models?: ExternalModel[];
258
+ }
259
+ export interface ClientConfiguration {
260
+ authorization?: {
261
+ required: boolean;
262
+ };
263
+ memory?: import('../../shared/memory-customization.js').MemoryConfiguration;
264
+ generationCapabilities?: Record<string, import('../../shared/runtime-tuning.js').GenerationCapabilities>;
265
+ communication?: import('./communication.js').CommunicationOptions;
266
+ mode: ClientOptions['mode'];
267
+ appId: string;
268
+ userScope: string;
269
+ appName: string;
270
+ runtime: RuntimeOptions;
271
+ paths: {
272
+ contextDirectory: string;
273
+ resourcesDirectory: string;
274
+ tasksDirectory: string;
275
+ workspacesDirectory: string;
276
+ temporaryDirectory: string;
277
+ cacheDirectory: string;
278
+ };
279
+ builtins: BuiltinSnapshot;
280
+ network: NetworkOptions;
281
+ platformBaseUrl?: string;
282
+ models?: Array<Omit<ExternalModel, 'apiKey'> & {
283
+ apiKeyConfigured: boolean;
284
+ }>;
285
+ authentication?: ManagedAuthentication;
286
+ }
287
+ export type DependencyStatus = import('../../core/host/runtime-dependencies.js').ResolvedRuntimeDependencies;
288
+ export type LocalPreferences = import('../../cli/daemon/preferences.js').Preferences;
289
+ export type LocalPreferenceDomain = import('../../cli/daemon/preferences.js').PreferenceDomain | 'securityPolicy';
290
+ export type { ComputerUseSettings } from '../../shared/computer-use-api.js';
291
+ export type { NativeSettings, NativeCapabilityStatus } from './native-status.js';
292
+ export type { MemoryView, MemoryEditRequest } from '../../shared/local-memory.js';
293
+ export interface TaskEvent {
294
+ schemaVersion: 1;
295
+ /** Save after processing this event to resume without skipping the rest of its page. */
296
+ cursor: string;
297
+ sessionId: string;
298
+ id: string;
299
+ type: import('../../shared/local-task-api.js').LocalTaskEventType;
300
+ runId: string;
301
+ /** Sequence within this cursor stream; use the event ID for deduplication. */
302
+ sequence: number;
303
+ runtimeSequence?: number;
304
+ /** Original engine event kind; payload retains its full structured fields. */
305
+ runtimeType?: string;
306
+ threadId?: string;
307
+ turnId?: string;
308
+ itemId?: string;
309
+ requestId?: string;
310
+ rootThreadId?: string;
311
+ sourceThreadId?: string;
312
+ parentThreadId?: string;
313
+ /** Host-supplied business ownership; separate from local task/member/thread identifiers. */
314
+ context?: import('../../shared/execution-context.js').ExecutionContext;
315
+ payload: Record<string, unknown>;
316
+ createdAt?: string;
317
+ }
318
+ /** Includes session-level events without a run and late updates after a run completes. */
319
+ export type SessionEvent = Omit<TaskEvent, 'runId'> & {
320
+ runId?: string;
321
+ };
322
+ export interface SessionEventPage {
323
+ events: SessionEvent[];
324
+ cursor: string;
325
+ }
326
+ export interface EventObservationOptions {
327
+ cursor?: string;
328
+ signal?: AbortSignal;
329
+ }
330
+ export interface SessionMemoryApi {
331
+ get(request: import('../../shared/local-memory.js').MemoryContextRequest & {
332
+ sessionId: string;
333
+ }): Promise<import('../../shared/local-memory.js').MemoryView>;
334
+ edit(request: import('../../shared/local-memory.js').MemoryEditRequest & {
335
+ sessionId: string;
336
+ }): Promise<import('../../shared/local-memory.js').MemoryView>;
337
+ reset(request: {
338
+ sessionId: string;
339
+ }): Promise<import('../../shared/local-memory.js').MemoryView>;
340
+ setEnabled(request: {
341
+ sessionId: string;
342
+ enabled: boolean;
343
+ }): Promise<import('../../shared/local-memory.js').MemoryView>;
344
+ }
345
+ export interface TaskInteraction {
346
+ id: string;
347
+ kind: string;
348
+ requestId: string;
349
+ runId: string;
350
+ status: string;
351
+ payload: Record<string, unknown>;
352
+ }
353
+ /** Same history contract consumed by the desktop renderer, including references, reasoning and usage. */
354
+ export type TaskMessage = import('../../shared/local-task-api.js').LocalTaskMessage;
355
+ export interface HistoryQuery {
356
+ text?: string;
357
+ around?: string;
358
+ cursor?: string;
359
+ limit?: number;
360
+ }
361
+ export interface HistoryPage {
362
+ items: TaskMessage[];
363
+ historyVersion: string;
364
+ hasMore: boolean;
365
+ nextCursor?: string;
366
+ }
367
+ export interface RunQuery {
368
+ cursor?: string;
369
+ limit?: number;
370
+ }
371
+ export interface RunRecord {
372
+ runId: string;
373
+ status: RunState['status'];
374
+ messageCount: number;
375
+ /** Journal timestamps; these do not claim the time a model request began. */
376
+ firstMessageAt?: string;
377
+ queuedAt?: string;
378
+ finishedAt?: string;
379
+ context?: import('../../shared/execution-context.js').ExecutionContext;
380
+ }
381
+ export interface RunPage {
382
+ items: RunRecord[];
383
+ revision: string;
384
+ hasMore: boolean;
385
+ nextCursor?: string;
386
+ }
387
+ export interface RunState {
388
+ status: 'queued' | 'running' | 'waiting' | 'completed' | 'failed' | 'cancelled' | 'interrupted';
389
+ runId: string;
390
+ interactions: TaskInteraction[];
391
+ messages: TaskMessage[];
392
+ }
393
+ export interface AuthTokens {
394
+ accessToken: string;
395
+ refreshToken: string;
396
+ accessTokenExpiresAt: string;
397
+ platformBaseUrl: string;
398
+ }
399
+ export type CredentialStoreOptions = {
400
+ kind: 'session' | 'system';
401
+ } | {
402
+ kind: 'vault';
403
+ secret: string;
404
+ };
405
+ export type LoginRequest = {
406
+ loginType: 'USERNAME' | 'PHONE';
407
+ account: string;
408
+ password: string;
409
+ countryCode?: string;
410
+ credentialStore?: CredentialStoreOptions;
411
+ };
412
+ export type LoginResult = {
413
+ status: 'authenticated';
414
+ tokens: AuthTokens;
415
+ session: AuthSession;
416
+ } | {
417
+ status: 'challenge';
418
+ challenge: AuthPasswordChangeRequired;
419
+ };
420
+ export interface AuthStatus {
421
+ session: AuthSession | null;
422
+ credentialStore: {
423
+ kind: 'session' | 'vault' | 'system' | 'managed';
424
+ configured: boolean;
425
+ locked: boolean;
426
+ };
427
+ restoration: {
428
+ state: 'ready' | 'restoring';
429
+ } | {
430
+ state: 'failed';
431
+ code: string;
432
+ message: string;
433
+ };
434
+ }
435
+ export interface BrowserLoginOptions {
436
+ requestId?: string;
437
+ credentialStore?: CredentialStoreOptions;
438
+ }
439
+ export interface BrowserLoginStatus {
440
+ id: string;
441
+ state: 'starting' | 'waiting' | 'completed' | 'cancelled' | 'failed';
442
+ authorizationUrl?: string;
443
+ session?: AuthSession;
444
+ error?: {
445
+ code: string;
446
+ message: string;
447
+ exitCode: number;
448
+ };
449
+ }
450
+ export interface SendOptions extends Partial<ExecutionDefaults> {
451
+ /** Narrow this run's long-term memory access within the session grant. */
452
+ memory?: import('../../shared/session-policy.js').RunMemoryPolicy;
453
+ /** Trusted host metadata. Immutable for this run, including queued dispatch and continuations. */
454
+ context?: import('../../shared/execution-context.js').ExecutionContext;
455
+ /** Default is background. Foreground is cancelled if the submitting process exits unexpectedly. */
456
+ execution?: 'foreground' | 'background';
457
+ /** 0 for unlimited; otherwise 1000..604800000 ms. */
458
+ timeoutMs?: number;
459
+ commandId?: string;
460
+ attachments?: Array<{
461
+ path: string;
462
+ }>;
463
+ attachmentIds?: string[];
464
+ references?: import('../../shared/local-task-api.js').LocalTaskFileReference[];
465
+ richContent?: import('../../shared/local-task-api.js').LocalTaskRichContent;
466
+ skills?: import('../../shared/local-task-api.js').LocalTaskSkillReference[];
467
+ plugins?: import('../../shared/local-task-api.js').LocalTaskPluginReference[];
468
+ }
469
+ export interface QueueSnapshot {
470
+ messages: import('../../shared/local-task-api.js').LocalTaskPendingMessage[];
471
+ queueVersion: string;
472
+ activeRunId: string | null;
473
+ historyVersion: string;
474
+ }
475
+ export type CommandReceipt = import('../../shared/local-task-command.js').LocalTaskCommandRecord | null;
476
+ export interface CapabilityQuery {
477
+ kind?: 'tool' | 'skill';
478
+ category?: string;
479
+ enabled?: boolean;
480
+ available?: boolean;
481
+ source?: CapabilityDescriptor['source'];
482
+ }
483
+ export interface EffectiveCapability extends CapabilityDescriptor {
484
+ enabled: boolean;
485
+ available: boolean;
486
+ reason?: string;
487
+ operations?: Array<{
488
+ id: string;
489
+ available: boolean;
490
+ reason?: string;
491
+ }>;
492
+ }
@@ -0,0 +1,47 @@
1
+ export interface AccountCreditSourceBalance {
2
+ sourceType: string | null;
3
+ initialPoints: number | null;
4
+ remainingPoints: number | null;
5
+ frozenPoints: number | null;
6
+ nearestExpiresAt: string | null;
7
+ }
8
+ export interface AccountContextSummary {
9
+ availableBalance: number | null;
10
+ planName: string | null;
11
+ planId?: string | null;
12
+ totalBalance?: number | null;
13
+ planLevel?: string | null;
14
+ planStatus?: string | null;
15
+ subscriptionId?: string | null;
16
+ subscriptionPlanId?: string | null;
17
+ subscriptionStatus?: string | null;
18
+ subscriptionValidFrom?: string | null;
19
+ subscriptionValidTo?: string | null;
20
+ subscriptionRemainingDays?: number | null;
21
+ sourceBalances?: AccountCreditSourceBalance[];
22
+ }
23
+ export type AccountReferralActivityStatus = 'TECHNICAL_DISABLED' | 'DISABLED' | 'UNPUBLISHED' | 'SCHEDULED' | 'ACTIVE' | 'ENDED';
24
+ export interface AccountReferralCampaign {
25
+ technicalEnabled: boolean;
26
+ rewardEnabled: boolean;
27
+ activityStatus: AccountReferralActivityStatus;
28
+ registerRewardPoints: number | null;
29
+ }
30
+ export interface AccountPlanPurchase {
31
+ id: string;
32
+ planId: string;
33
+ planName: string;
34
+ subscriptionId: string | null;
35
+ purchasedAt: string;
36
+ expiresAt: string | null;
37
+ pointsGranted: number | null;
38
+ pointsRemaining: number | null;
39
+ }
40
+ export interface AccountContextQuery {
41
+ subjectName?: string;
42
+ }
43
+ export interface AccountContextApi {
44
+ getSummary: (query?: AccountContextQuery) => Promise<AccountContextSummary>;
45
+ getReferralCampaign: () => Promise<AccountReferralCampaign>;
46
+ listPlanPurchases: () => Promise<AccountPlanPurchase[]>;
47
+ }
@@ -0,0 +1,50 @@
1
+ export interface ActionCenterSummary {
2
+ todoPendingCount: number;
3
+ messageUnreadCount: number;
4
+ announcementUnreadCount: number;
5
+ }
6
+ export interface ActionCenterTarget {
7
+ targetType: string | null;
8
+ targetRoute: string | null;
9
+ targetUrl: string | null;
10
+ openMode: string | null;
11
+ }
12
+ export interface ActionCenterMessage {
13
+ id: string;
14
+ sourceAppId: string | null;
15
+ sourceModule: string | null;
16
+ category: string | null;
17
+ level: string | null;
18
+ title: string;
19
+ content: string | null;
20
+ readStatus: string;
21
+ publishedAt: string | null;
22
+ createdAt: string | null;
23
+ target: ActionCenterTarget | null;
24
+ businessType?: string | null;
25
+ businessId?: string | null;
26
+ status?: string | null;
27
+ payload?: Record<string, unknown> | null;
28
+ }
29
+ export interface ActionCenterMessageQuery {
30
+ page: number;
31
+ pageSize: number;
32
+ readStatus?: 'unread';
33
+ }
34
+ export interface ActionCenterMessagePage {
35
+ list: ActionCenterMessage[];
36
+ page: number;
37
+ pageSize: number;
38
+ total: number;
39
+ }
40
+ export interface ActionCenterNavigation {
41
+ url: string;
42
+ openMode: string | null;
43
+ }
44
+ export interface ActionCenterApi {
45
+ getSummary: () => Promise<ActionCenterSummary>;
46
+ listMessages: (query: ActionCenterMessageQuery) => Promise<ActionCenterMessagePage>;
47
+ markMessageRead: (messageId: string) => Promise<void>;
48
+ markAllMessagesRead: () => Promise<void>;
49
+ openMessageTarget: (messageId: string) => Promise<void>;
50
+ }
@@ -0,0 +1,42 @@
1
+ /** Public capability IDs are independent of transport names and permissions. */
2
+ export declare const TOOL_CATEGORIES: readonly ["workspace", "process", "repository", "web", "documents", "data", "media", "knowledge", "memory", "task-coordination", "automation", "computer", "extensions"];
3
+ export declare const SKILL_CATEGORIES: readonly ["development", "documents", "data-research", "design", "media", "business", "automation", "agent-building"];
4
+ export type ToolCategory = typeof TOOL_CATEGORIES[number];
5
+ export type SkillCategory = typeof SKILL_CATEGORIES[number];
6
+ export type AgentRuntimeMode = 'platform' | 'standalone';
7
+ export interface CapabilitySelection<Category extends string = string> {
8
+ categories?: readonly Category[];
9
+ include?: readonly string[];
10
+ exclude?: readonly string[];
11
+ }
12
+ export interface BuiltinSelection {
13
+ /** AIOS-provided tools only; false leaves them unregistered. Engine tools are unchanged. */
14
+ tools?: boolean | CapabilitySelection<ToolCategory>;
15
+ /** AIOS-provided skills only; false skips materialization, discovery and injection. */
16
+ skills?: boolean | CapabilitySelection<SkillCategory>;
17
+ }
18
+ export interface CapabilityDescriptor<Category extends string = string> {
19
+ id: string;
20
+ kind: 'tool' | 'skill';
21
+ category: Category;
22
+ source: 'builtin' | 'platform' | 'application' | 'local';
23
+ integration: 'dynamic' | 'mcp' | 'skill';
24
+ requiresPlatform: boolean;
25
+ dependencies: readonly string[];
26
+ tags: readonly string[];
27
+ supported: boolean;
28
+ unavailableReason?: string;
29
+ }
30
+ export interface BuiltinSnapshot {
31
+ catalogVersion: 1;
32
+ mode: AgentRuntimeMode;
33
+ tools: string[];
34
+ skills: string[];
35
+ }
36
+ /** A saved list is the ceiling. New catalog members never expand an old task. */
37
+ export declare function selectCapabilities<C extends string>(selection: boolean | CapabilitySelection<C>, catalog: readonly CapabilityDescriptor<C>[], categories: readonly C[], mode: AgentRuntimeMode, parent?: readonly string[]): string[];
38
+ export declare function resolveBuiltinSnapshot(mode: AgentRuntimeMode, selection: BuiltinSelection, catalog: readonly CapabilityDescriptor[], parent?: BuiltinSnapshot): BuiltinSnapshot;
39
+ export declare const BUILTIN_SKILL_GROUPS: Readonly<Record<SkillCategory, readonly string[]>>;
40
+ /** Prefix families come from named registries; arbitrary extension tools never enter here. */
41
+ export declare function describeBuiltinTool(name: string, integration: CapabilityDescriptor['integration']): CapabilityDescriptor<ToolCategory>;
42
+ export declare const BUILTIN_SKILL_CATALOG: CapabilityDescriptor<SkillCategory>[];
@@ -0,0 +1,10 @@
1
+ /** Host-owned lifecycle commands. They receive one JSON event on stdin and return hook JSON on stdout. */
2
+ export interface AgentCommandHook {
3
+ event: 'UserPromptSubmit' | 'PreToolUse' | 'PostToolUse' | 'PreCompact' | 'PostCompact' | 'SessionStart' | 'SessionEnd' | 'SubagentStart' | 'SubagentStop' | 'Stop' | 'Interrupt';
4
+ command: string;
5
+ commandWindows?: string;
6
+ matcher?: string;
7
+ /** Hook execution limit only; this does not impose a task deadline. */
8
+ timeoutSeconds: number;
9
+ }
10
+ export declare function parseAgentHooks(value: unknown): AgentCommandHook[];
@@ -0,0 +1,17 @@
1
+ import { type TaskPathPolicy } from './task-path-policy.js';
2
+ import { type ModelReasoningEffort } from './model-selection.js';
3
+ export interface AgentTeamMember {
4
+ id: string;
5
+ name: string;
6
+ instructions: string;
7
+ model?: string;
8
+ reasoningEffort?: ModelReasoningEffort;
9
+ /** AIOS tool names, intersected with the parent selection. Native tools remain constrained by the filesystem policy. */
10
+ tools?: string[];
11
+ paths?: TaskPathPolicy;
12
+ }
13
+ export interface AgentTeamDefinition {
14
+ members: AgentTeamMember[];
15
+ workflow?: string;
16
+ }
17
+ export declare function parseAgentTeam(value: unknown): AgentTeamDefinition;
@@ -0,0 +1,18 @@
1
+ export interface ArtifactVerification {
2
+ tool: string;
3
+ at: string;
4
+ fileVersion?: string;
5
+ origin?: 'tool_reported' | 'file_registration';
6
+ action?: string;
7
+ coverage?: Record<string, unknown>;
8
+ }
9
+ /** Evidence concerns only the reported checks, never a platform business verdict. */
10
+ export interface ArtifactEvidence {
11
+ path: string;
12
+ threadId: string;
13
+ reportedVerified: boolean;
14
+ validity: 'current' | 'stale' | 'unversioned';
15
+ verification: ArtifactVerification;
16
+ previousVerification?: ArtifactVerification;
17
+ invalidation?: string;
18
+ }