@xpert-ai/plugin-sdk 3.26.2 → 3.28.0
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/artifact-document.cjs.js +55 -16
- package/artifact-document.esm.js +53 -17
- package/collaboration-client.cjs.js +31 -5
- package/collaboration-client.esm.js +31 -5
- package/data-workbench.cjs.js +4 -2
- package/data-workbench.esm.js +4 -2
- package/docs/artifact-documents.md +8 -2
- package/docs/en/runtime-capabilities.md +103 -0
- package/index.cjs.js +479 -70
- package/index.esm.js +461 -73
- package/model-provider.cjs.js +17 -1
- package/model-provider.esm.js +15 -2
- package/package.json +2 -2
- package/src/artifact-document.d.ts +1 -0
- package/src/index.d.ts +2 -0
- package/src/lib/agent/handoff/types.d.ts +5 -0
- package/src/lib/agent/middleware/capabilities/assistant-task.d.ts +6 -1
- package/src/lib/agent/middleware/runtime.d.ts +2 -0
- package/src/lib/agent/runtime/capability.d.ts +4 -0
- package/src/lib/agent/runtime/cli-model-profile.d.ts +1 -1
- package/src/lib/agent/runtime/execution-runner.d.ts +11 -0
- package/src/lib/agent/runtime/index.d.ts +2 -0
- package/src/lib/agent/runtime/managed.d.ts +94 -0
- package/src/lib/agent/runtime/process-supervisor.d.ts +1 -0
- package/src/lib/agent/runtime/strategy.d.ts +14 -0
- package/src/lib/agent/runtime/types.d.ts +30 -1
- package/src/lib/ai-model/native-model.d.ts +5 -1
- package/src/lib/artifact-document/host.d.ts +3 -0
- package/src/lib/artifact-document/network.d.ts +21 -0
- package/src/lib/artifact-document/runtime.d.ts +2 -1
- package/src/lib/assistant-capability/index.d.ts +3 -0
- package/src/lib/assistant-capability/middleware.d.ts +10 -0
- package/src/lib/collaboration/types.d.ts +12 -1
- package/src/lib/connector/document-source.d.ts +31 -0
- package/src/lib/connector/documents.d.ts +38 -0
- package/src/lib/connector/index.d.ts +1 -0
- package/src/lib/connector/strategy.interface.d.ts +3 -0
- package/src/lib/content-resource/catalog.d.ts +88 -0
- package/src/lib/content-resource/document.d.ts +142 -0
- package/src/lib/content-resource/editor-compatibility.d.ts +3 -0
- package/src/lib/content-resource/editor.d.ts +105 -0
- package/src/lib/content-resource/index.d.ts +94 -0
- package/src/lib/content-resource/reference.d.ts +38 -0
- package/src/lib/data/datasource/workbench-adapter.d.ts +5 -3
- package/src/lib/data/datasource/workbench-sql.d.ts +0 -4
- package/src/lib/execution-control/context.d.ts +7 -0
- package/src/lib/execution-control/index.d.ts +2 -0
- package/src/lib/managed-queue/index.d.ts +12 -0
- package/src/lib/project-pipeline/contribution-failure.d.ts +17 -0
- package/src/lib/project-pipeline/registry.d.ts +16 -1
- package/src/lib/runtime/actor.d.ts +10 -0
- package/src/lib/runtime/capabilities/artifact-drafts.d.ts +10 -1
- package/src/lib/runtime/capabilities/artifacts.d.ts +5 -0
- package/src/lib/runtime/capabilities/assistant-middleware-access.d.ts +28 -0
- package/src/lib/runtime/capabilities/index.d.ts +4 -0
- package/src/lib/runtime/capabilities/mcp-client-runtime.d.ts +2 -0
- package/src/lib/runtime/capabilities/project-access.d.ts +10 -7
- package/src/lib/runtime/capabilities/project-files.d.ts +40 -0
- package/src/lib/runtime/capabilities/project-knowledge.d.ts +14 -0
- package/src/lib/runtime/capabilities/project-provisioning.d.ts +6 -0
- package/src/lib/runtime/capabilities/sandbox-jobs.d.ts +12 -3
- package/src/lib/runtime/capabilities/workspace-files.d.ts +2 -0
- package/src/lib/sandbox/file-edit-command.d.ts +2 -0
- package/src/lib/sandbox/file-edit-diff.d.ts +1 -0
- package/src/lib/sandbox/protocol.d.ts +13 -1
- package/src/lib/sandbox/runtime-provider.d.ts +12 -0
- package/src/lib/view-extension/middleware-runtime.d.ts +2 -3
package/model-provider.cjs.js
CHANGED
|
@@ -225,7 +225,8 @@ const WorkspaceFilesRuntimeCapability = createRuntimeCapability('platform.worksp
|
|
|
225
225
|
'EXPORT_MEDIA_FAILED',
|
|
226
226
|
'EXPORT_INPUT_INVALID',
|
|
227
227
|
'EXPORT_OUTPUT_INVALID',
|
|
228
|
-
'SANDBOX_CANCELLED'
|
|
228
|
+
'SANDBOX_CANCELLED',
|
|
229
|
+
'SANDBOX_CONTROL_UNCONFIRMED'
|
|
229
230
|
];
|
|
230
231
|
/** Line prefix used by trusted Actions to report structured, provider-neutral progress. */ const SANDBOX_JOB_PROGRESS_PREFIX = 'XPERT_SANDBOX_PROGRESS ';
|
|
231
232
|
/**
|
|
@@ -264,10 +265,22 @@ const ProjectAccessRuntimeCapability = createRuntimeCapability('platform.project
|
|
|
264
265
|
description: 'Resolve human Project membership for platform and plugin operations.'
|
|
265
266
|
});
|
|
266
267
|
|
|
268
|
+
const ProjectFilesRuntimeCapability = createRuntimeCapability('platform.project.files', {
|
|
269
|
+
description: 'Authorized Project file tree and conflict-aware atomic file writes.'
|
|
270
|
+
});
|
|
271
|
+
|
|
267
272
|
const ToolImagesRuntimeCapability = createRuntimeCapability('platform.tool-images', {
|
|
268
273
|
description: 'Save scoped immutable tool images and materialize verified pixels for one model request.'
|
|
269
274
|
});
|
|
270
275
|
|
|
276
|
+
const AssistantMiddlewareAccessRuntimeCapability = createRuntimeCapability('platform.assistant.middleware-access', {
|
|
277
|
+
description: 'Authorize a published Assistant and its exact connected middleware feature for a trusted actor.'
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
const ProjectKnowledgeRuntimeCapability = createRuntimeCapability('platform.project.knowledge', {
|
|
281
|
+
description: 'Provision and bind the Project-owned built-in knowledge library.'
|
|
282
|
+
});
|
|
283
|
+
|
|
271
284
|
const McpClientRuntimeCapability = createRuntimeCapability('platform.mcp.client', {
|
|
272
285
|
description: 'Governed MCP client access using existing connections and viewer credentials; read-only tools initially.'
|
|
273
286
|
});
|
|
@@ -414,6 +427,7 @@ exports.ActorTokenRuntimeCapability = ActorTokenRuntimeCapability;
|
|
|
414
427
|
exports.ActorTokenRuntimeFactoryCapability = ActorTokenRuntimeFactoryCapability;
|
|
415
428
|
exports.ArtifactDraftsRuntimeCapability = ArtifactDraftsRuntimeCapability;
|
|
416
429
|
exports.ArtifactsRuntimeCapability = ArtifactsRuntimeCapability;
|
|
430
|
+
exports.AssistantMiddlewareAccessRuntimeCapability = AssistantMiddlewareAccessRuntimeCapability;
|
|
417
431
|
exports.BaseTool = BaseTool;
|
|
418
432
|
exports.BaseToolset = BaseToolset;
|
|
419
433
|
exports.BuiltinToolset = BuiltinToolset;
|
|
@@ -421,6 +435,8 @@ exports.DefaultRuntimeCapabilityRegistry = DefaultRuntimeCapabilityRegistry;
|
|
|
421
435
|
exports.McpClientRuntimeCapability = McpClientRuntimeCapability;
|
|
422
436
|
exports.ModelProviderBuiltinToolset = ModelProviderBuiltinToolset;
|
|
423
437
|
exports.ProjectAccessRuntimeCapability = ProjectAccessRuntimeCapability;
|
|
438
|
+
exports.ProjectFilesRuntimeCapability = ProjectFilesRuntimeCapability;
|
|
439
|
+
exports.ProjectKnowledgeRuntimeCapability = ProjectKnowledgeRuntimeCapability;
|
|
424
440
|
exports.ProjectProvisioningRuntimeCapability = ProjectProvisioningRuntimeCapability;
|
|
425
441
|
exports.RUNTIME_CAPABILITY_PROVIDER = RUNTIME_CAPABILITY_PROVIDER;
|
|
426
442
|
exports.RestClientRuntimeCapability = RestClientRuntimeCapability;
|
package/model-provider.esm.js
CHANGED
|
@@ -223,7 +223,8 @@ const WorkspaceFilesRuntimeCapability = createRuntimeCapability('platform.worksp
|
|
|
223
223
|
'EXPORT_MEDIA_FAILED',
|
|
224
224
|
'EXPORT_INPUT_INVALID',
|
|
225
225
|
'EXPORT_OUTPUT_INVALID',
|
|
226
|
-
'SANDBOX_CANCELLED'
|
|
226
|
+
'SANDBOX_CANCELLED',
|
|
227
|
+
'SANDBOX_CONTROL_UNCONFIRMED'
|
|
227
228
|
];
|
|
228
229
|
/** Line prefix used by trusted Actions to report structured, provider-neutral progress. */ const SANDBOX_JOB_PROGRESS_PREFIX = 'XPERT_SANDBOX_PROGRESS ';
|
|
229
230
|
/**
|
|
@@ -262,10 +263,22 @@ const ProjectAccessRuntimeCapability = createRuntimeCapability('platform.project
|
|
|
262
263
|
description: 'Resolve human Project membership for platform and plugin operations.'
|
|
263
264
|
});
|
|
264
265
|
|
|
266
|
+
const ProjectFilesRuntimeCapability = createRuntimeCapability('platform.project.files', {
|
|
267
|
+
description: 'Authorized Project file tree and conflict-aware atomic file writes.'
|
|
268
|
+
});
|
|
269
|
+
|
|
265
270
|
const ToolImagesRuntimeCapability = createRuntimeCapability('platform.tool-images', {
|
|
266
271
|
description: 'Save scoped immutable tool images and materialize verified pixels for one model request.'
|
|
267
272
|
});
|
|
268
273
|
|
|
274
|
+
const AssistantMiddlewareAccessRuntimeCapability = createRuntimeCapability('platform.assistant.middleware-access', {
|
|
275
|
+
description: 'Authorize a published Assistant and its exact connected middleware feature for a trusted actor.'
|
|
276
|
+
});
|
|
277
|
+
|
|
278
|
+
const ProjectKnowledgeRuntimeCapability = createRuntimeCapability('platform.project.knowledge', {
|
|
279
|
+
description: 'Provision and bind the Project-owned built-in knowledge library.'
|
|
280
|
+
});
|
|
281
|
+
|
|
269
282
|
const McpClientRuntimeCapability = createRuntimeCapability('platform.mcp.client', {
|
|
270
283
|
description: 'Governed MCP client access using existing connections and viewer credentials; read-only tools initially.'
|
|
271
284
|
});
|
|
@@ -408,4 +421,4 @@ function normalizeWorkspaceScope(scope) {
|
|
|
408
421
|
} : {});
|
|
409
422
|
}
|
|
410
423
|
|
|
411
|
-
export { ActorTokenRuntimeCapability as A, BuiltinToolset as B, DefaultRuntimeCapabilityRegistry as D, ModelProviderBuiltinToolset as M, ProjectAccessRuntimeCapability as P, RUNTIME_CAPABILITY_PROVIDER as R, SANDBOX_JOB_ERROR_CODES as S, ToolImagesRuntimeCapability as T, WorkspaceFilesRuntimeCapability as W, XPERT_RUNTIME_CAPABILITIES_TOKEN as X, ActorTokenRuntimeFactoryCapability as a, ArtifactDraftsRuntimeCapability as b, createRuntimeCapability as c, ArtifactsRuntimeCapability as d,
|
|
424
|
+
export { ActorTokenRuntimeCapability as A, BuiltinToolset as B, DefaultRuntimeCapabilityRegistry as D, ModelProviderBuiltinToolset as M, ProjectAccessRuntimeCapability as P, RUNTIME_CAPABILITY_PROVIDER as R, SANDBOX_JOB_ERROR_CODES as S, ToolImagesRuntimeCapability as T, WorkspaceFilesRuntimeCapability as W, XPERT_RUNTIME_CAPABILITIES_TOKEN as X, ActorTokenRuntimeFactoryCapability as a, ArtifactDraftsRuntimeCapability as b, createRuntimeCapability as c, ArtifactsRuntimeCapability as d, AssistantMiddlewareAccessRuntimeCapability as e, BaseTool as f, BaseToolset as g, McpClientRuntimeCapability as h, ProjectFilesRuntimeCapability as i, ProjectKnowledgeRuntimeCapability as j, ProjectProvisioningRuntimeCapability as k, RestClientRuntimeCapability as l, RuntimeCapabilityProvider as m, SANDBOX_JOB_INVOCATION_PREFIX as n, SANDBOX_JOB_PROGRESS_PREFIX as o, SandboxJobRuntimeError as p, SandboxJobsRuntimeCapability as q, WORKSPACE_FILES_SOURCE as r, isSandboxJobRuntimeError as s, workspaceFileMutationPath as t, workspaceRelativeFilePathSchema as u, workspaceFileMutationMetadata as w };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xpert-ai/plugin-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.28.0",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"@langchain/openai": "0.6.9",
|
|
77
|
-
"@xpert-ai/contracts": "3.
|
|
77
|
+
"@xpert-ai/contracts": "3.28.0",
|
|
78
78
|
"express": "^4.22.1",
|
|
79
79
|
"js-tiktoken": "^1.0.21"
|
|
80
80
|
},
|
package/src/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export * from './lib/managed-queue/index';
|
|
|
28
28
|
export * from './lib/view-extension/index';
|
|
29
29
|
export * from './lib/artifact-presentation/index';
|
|
30
30
|
export * from './lib/collaboration/index';
|
|
31
|
+
export * from './lib/content-resource/index';
|
|
31
32
|
export * from './lib/evolution/index';
|
|
32
33
|
export * from './lib/mcp/index';
|
|
33
34
|
export * from './lib/tool-provider/index';
|
|
@@ -35,3 +36,4 @@ export * from './lib/project-type/index';
|
|
|
35
36
|
export * from './lib/project-task/index';
|
|
36
37
|
export * from './lib/project-pipeline';
|
|
37
38
|
export * from './lib/agent-plugin/import-default-agent-plugins.command';
|
|
39
|
+
export * from './lib/execution-control';
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* - Two-gate lane/session permit logic has been removed.
|
|
6
6
|
* - Lane is now an execution tag for observability and soft policy only.
|
|
7
7
|
*/
|
|
8
|
+
import type { TaskControlRef, TaskControlContext, TaskControlPolicy } from '../../execution-control';
|
|
8
9
|
export type LaneName = 'main' | 'subagent' | 'cron' | 'nested';
|
|
9
10
|
export type RunSource = 'chat' | 'xpert' | 'lark' | 'analytics' | 'api';
|
|
10
11
|
export interface RunMetadata {
|
|
@@ -51,6 +52,9 @@ export declare const DEFAULT_EXECUTION_CONFIG: ExecutionConfig;
|
|
|
51
52
|
* Using `type` with a string allows plugins to dynamically expand at runtime without needing to modify the core type definition.
|
|
52
53
|
*/
|
|
53
54
|
export interface HandoffMessage<TPayload extends Record<string, unknown> = Record<string, unknown>> {
|
|
55
|
+
/** Host-issued control identity; serialized separately from business payload. */
|
|
56
|
+
control?: TaskControlRef;
|
|
57
|
+
controlPolicy?: TaskControlPolicy;
|
|
54
58
|
id: string;
|
|
55
59
|
/**
|
|
56
60
|
* Message type, used for processor resolution.
|
|
@@ -91,6 +95,7 @@ export interface ProcessorPolicy {
|
|
|
91
95
|
idleTimeoutMs?: number;
|
|
92
96
|
}
|
|
93
97
|
export interface ProcessContext {
|
|
98
|
+
control?: TaskControlContext;
|
|
94
99
|
runId: string;
|
|
95
100
|
traceId: string;
|
|
96
101
|
abortSignal: AbortSignal;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TaskControlPolicy } from '../../../execution-control';
|
|
2
|
+
import type { JSONValue, TAvatar, ProjectPipelineNativeSource, ExecutionControlEvidence } from '@xpert-ai/contracts';
|
|
2
3
|
/** Task lifecycle snapshot. interrupted means paused; unknown does not confirm failure. */
|
|
3
4
|
export type AgentMiddlewareAssistantTaskStatus = 'queued' | 'running' | 'succeeded' | 'failed' | 'interrupted' | 'unknown';
|
|
4
5
|
/** Existing platform file reference; access remains subject to host authorization. */
|
|
@@ -115,6 +116,8 @@ export type AgentMiddlewareCorrelatedExecution = {
|
|
|
115
116
|
};
|
|
116
117
|
/** Start an asynchronous task on the current Assistant or a resolved external Assistant. */
|
|
117
118
|
export type AgentMiddlewareAssistantTaskInput = {
|
|
119
|
+
/** Trusted host lifecycle selection; background mode alone never selects independence. */
|
|
120
|
+
controlPolicy?: TaskControlPolicy;
|
|
118
121
|
/** Current/requesting Assistant ID; must match target.requesterXpertId when target is supplied. */
|
|
119
122
|
xpertId: string;
|
|
120
123
|
/** Fail before dispatch if the accessible published executor changed after the caller prepared its intent. */
|
|
@@ -145,6 +148,8 @@ export type AgentMiddlewareAssistantTaskInput = {
|
|
|
145
148
|
/** Task receipt, not necessarily a completed result. Use status and execution identifiers to follow progress. */
|
|
146
149
|
export type AgentMiddlewareAssistantTaskResult = {
|
|
147
150
|
status: AgentMiddlewareAssistantTaskStatus;
|
|
151
|
+
/** Actual execution evidence, independent of legacy business status and cancellation acknowledgements. */
|
|
152
|
+
control?: ExecutionControlEvidence;
|
|
148
153
|
taskId?: string;
|
|
149
154
|
executionId?: string;
|
|
150
155
|
conversationId?: string;
|
|
@@ -136,6 +136,8 @@ export type AgentMiddlewareEvent = {
|
|
|
136
136
|
[key: string]: unknown;
|
|
137
137
|
};
|
|
138
138
|
export interface AgentMiddlewareRuntimeApi {
|
|
139
|
+
/** Resolve the current scope's authorized primary chat model without exposing provider credentials. */
|
|
140
|
+
getDefaultChatModel?(): Promise<ICopilotModel>;
|
|
139
141
|
createModelClient<T = AgentMiddlewareModelClient>(copilotModel: ICopilotModel, options: AgentMiddlewareCreateModelClientOptions): Promise<T>;
|
|
140
142
|
/** Resolve an enabled model provider connection in the current tenant and organization scope. */
|
|
141
143
|
getModelProvider?(provider: string): Promise<AgentMiddlewareModelProviderConnection>;
|
|
@@ -4,6 +4,10 @@ import type { TaskWaitRequest, TaskWaitResult } from './task-wait';
|
|
|
4
4
|
import type { ConversationResourceCard } from '@xpert-ai/contracts';
|
|
5
5
|
/** Invocation API bound to one authorized caller/execution. Each operation revalidates access. */
|
|
6
6
|
export interface AgentInvocationApi {
|
|
7
|
+
/** Discover inherited runtime presets without creating bindings or starting processes. */
|
|
8
|
+
listManaged?(): Promise<import('./managed').ManagedAgentRuntimeOption[]>;
|
|
9
|
+
/** Resolve an installed preset using the captured caller's current permissions. */
|
|
10
|
+
resolveManaged?(selection: import('./managed').ManagedAgentRuntimeSelection): Promise<AgentTarget>;
|
|
7
11
|
/** Create a host-owned presentation receipt after a successful dispatch, without inspecting the runtime. */
|
|
8
12
|
getResourceCard?(invocationId: string): Promise<ConversationResourceCard | null>;
|
|
9
13
|
/** Resolve a binding to a pinned target. Optional on hosts with pre-resolved native targets. */
|
|
@@ -13,7 +13,7 @@ export interface CliModelConfigurationInput {
|
|
|
13
13
|
directory: string;
|
|
14
14
|
gatewayBaseUrl: string;
|
|
15
15
|
defaultModelId?: string;
|
|
16
|
-
models: Array<Pick<ModelExecutionModel, 'id' | 'protocols' | 'contextWindow' | 'outputTokenLimit'>>;
|
|
16
|
+
models: Array<Pick<ModelExecutionModel, 'id' | 'protocols' | 'contextWindow' | 'outputTokenLimit' | 'parameters'>>;
|
|
17
17
|
/** @deprecated Legacy input only. Use the selected model's catalog metadata. */
|
|
18
18
|
limits?: Partial<ModelExecutionLimits> & {
|
|
19
19
|
maxOutputTokens?: number;
|
|
@@ -9,6 +9,8 @@ export type AgentRunnerEnvironment = Extract<ModelExecutionEnvironment, {
|
|
|
9
9
|
interface AgentRunnerReceiptBase {
|
|
10
10
|
/** Owning platform invocation; never a caller-selected process launch key. */
|
|
11
11
|
invocationId: string;
|
|
12
|
+
/** Set only by hosts using the owned-descendant supervisor. Historical receipts remain unconfirmed. */
|
|
13
|
+
supervision?: 1;
|
|
12
14
|
/** Bound environment instance; replacing the instance invalidates this receipt. */
|
|
13
15
|
environment: AgentRunnerEnvironment;
|
|
14
16
|
/** Opaque host process reference, not necessarily an operating-system PID. */
|
|
@@ -32,6 +34,13 @@ export type AgentRunnerReceipt = AgentRunnerReceiptBase & ({
|
|
|
32
34
|
version: 2;
|
|
33
35
|
executionDirectory: string;
|
|
34
36
|
});
|
|
37
|
+
export interface AgentRunnerExitEvidence {
|
|
38
|
+
version: 1;
|
|
39
|
+
coverage: 'descendants';
|
|
40
|
+
invocationId: string;
|
|
41
|
+
environment: AgentRunnerEnvironment;
|
|
42
|
+
processId: string;
|
|
43
|
+
}
|
|
35
44
|
/** Per-scope host capability. Methods recheck the persisted invocation and receipt before side effects. */
|
|
36
45
|
export interface AgentExecutionRunner {
|
|
37
46
|
/** Resolve the already persisted Invocation/Binding. Checkpoint before sending launch input. */
|
|
@@ -40,6 +49,7 @@ export interface AgentExecutionRunner {
|
|
|
40
49
|
inspect(receipt: AgentRunnerReceipt): Promise<{
|
|
41
50
|
state: 'running' | 'exited' | 'unknown';
|
|
42
51
|
exitCode?: number;
|
|
52
|
+
completion?: AgentRunnerExitEvidence;
|
|
43
53
|
}>;
|
|
44
54
|
/** Relative HTTP request over the approved local service transport; no caller-supplied URL or headers. */
|
|
45
55
|
request(receipt: AgentRunnerReceipt, request: {
|
|
@@ -55,6 +65,7 @@ export interface AgentExecutionRunner {
|
|
|
55
65
|
/** Revoke model access and request process termination. Only exited confirms termination. */
|
|
56
66
|
stop(receipt: AgentRunnerReceipt): Promise<{
|
|
57
67
|
state: 'exited' | 'stopping' | 'unknown';
|
|
68
|
+
completion?: AgentRunnerExitEvidence;
|
|
58
69
|
}>;
|
|
59
70
|
}
|
|
60
71
|
export declare const AgentExecutionRunnerCapability: import("../../core/runtime-capability").RuntimeCapabilityKey<AgentExecutionRunner>;
|
|
@@ -6,6 +6,8 @@ export * from './cli-model-profile';
|
|
|
6
6
|
export * from './task-wait';
|
|
7
7
|
export * from './results';
|
|
8
8
|
export * from './execution-runner';
|
|
9
|
+
export * from './process-supervisor';
|
|
9
10
|
export * from './dispatch';
|
|
10
11
|
export * from './activity';
|
|
12
|
+
export * from './managed';
|
|
11
13
|
export * from './pipeline-scope';
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { z } from 'zod/v3';
|
|
2
|
+
/** Adapter declarations are discoverability metadata, never an execution grant. */
|
|
3
|
+
export interface ManagedAgentRuntimeProfile {
|
|
4
|
+
reference: string;
|
|
5
|
+
version: string;
|
|
6
|
+
title: string;
|
|
7
|
+
toolName: string;
|
|
8
|
+
description: string;
|
|
9
|
+
environment: 'computer' | 'process' | 'sdk' | 'service';
|
|
10
|
+
}
|
|
11
|
+
export interface ManagedAgentRuntimeSelection {
|
|
12
|
+
provider: string;
|
|
13
|
+
reference: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ManagedAgentRuntimeOption extends ManagedAgentRuntimeSelection {
|
|
16
|
+
title: string;
|
|
17
|
+
toolName: string;
|
|
18
|
+
description: string;
|
|
19
|
+
}
|
|
20
|
+
/** Persisted host ownership marker. Only built-in presets are supported. */
|
|
21
|
+
export declare const managedAgentRuntimeSchema: z.ZodObject<{
|
|
22
|
+
type: z.ZodLiteral<"builtin">;
|
|
23
|
+
version: z.ZodString;
|
|
24
|
+
}, "strict", z.ZodTypeAny, {
|
|
25
|
+
type?: "builtin";
|
|
26
|
+
version?: string;
|
|
27
|
+
}, {
|
|
28
|
+
type?: "builtin";
|
|
29
|
+
version?: string;
|
|
30
|
+
}>;
|
|
31
|
+
/** Launch settings supplied by the installed strategy, never by tool input or host provider lists. */
|
|
32
|
+
export declare const agentRuntimeDeploymentSpecSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
33
|
+
type: z.ZodLiteral<"process">;
|
|
34
|
+
command: z.ZodEffects<z.ZodString, string, string>;
|
|
35
|
+
args: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
|
|
36
|
+
environment: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
37
|
+
model: z.ZodOptional<z.ZodString>;
|
|
38
|
+
timeoutMs: z.ZodNumber;
|
|
39
|
+
}, "strict", z.ZodTypeAny, {
|
|
40
|
+
type?: "process";
|
|
41
|
+
command?: string;
|
|
42
|
+
timeoutMs?: number;
|
|
43
|
+
model?: string;
|
|
44
|
+
args?: string[];
|
|
45
|
+
environment?: Record<string, string>;
|
|
46
|
+
}, {
|
|
47
|
+
type?: "process";
|
|
48
|
+
command?: string;
|
|
49
|
+
timeoutMs?: number;
|
|
50
|
+
model?: string;
|
|
51
|
+
args?: string[];
|
|
52
|
+
environment?: Record<string, string>;
|
|
53
|
+
}>, z.ZodObject<{
|
|
54
|
+
type: z.ZodLiteral<"sdk">;
|
|
55
|
+
environment: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
56
|
+
model: z.ZodOptional<z.ZodString>;
|
|
57
|
+
timeoutMs: z.ZodNumber;
|
|
58
|
+
}, "strict", z.ZodTypeAny, {
|
|
59
|
+
type?: "sdk";
|
|
60
|
+
timeoutMs?: number;
|
|
61
|
+
model?: string;
|
|
62
|
+
environment?: Record<string, string>;
|
|
63
|
+
}, {
|
|
64
|
+
type?: "sdk";
|
|
65
|
+
timeoutMs?: number;
|
|
66
|
+
model?: string;
|
|
67
|
+
environment?: Record<string, string>;
|
|
68
|
+
}>, z.ZodObject<{
|
|
69
|
+
type: z.ZodLiteral<"service">;
|
|
70
|
+
serverUrl: z.ZodEffects<z.ZodString, string, string>;
|
|
71
|
+
authorization: z.ZodOptional<z.ZodString>;
|
|
72
|
+
timeoutMs: z.ZodNumber;
|
|
73
|
+
}, "strict", z.ZodTypeAny, {
|
|
74
|
+
type?: "service";
|
|
75
|
+
timeoutMs?: number;
|
|
76
|
+
authorization?: string;
|
|
77
|
+
serverUrl?: string;
|
|
78
|
+
}, {
|
|
79
|
+
type?: "service";
|
|
80
|
+
timeoutMs?: number;
|
|
81
|
+
authorization?: string;
|
|
82
|
+
serverUrl?: string;
|
|
83
|
+
}>]>;
|
|
84
|
+
export type AgentRuntimeDeploymentSpec = z.infer<typeof agentRuntimeDeploymentSpecSchema>;
|
|
85
|
+
/** Ephemeral launch settings scoped by the host. Only the fingerprint enters persisted targets. */
|
|
86
|
+
export type AgentRuntimeDeployment = AgentRuntimeDeploymentSpec & {
|
|
87
|
+
provider: string;
|
|
88
|
+
revision: string;
|
|
89
|
+
workspaceRoot: string;
|
|
90
|
+
};
|
|
91
|
+
/** Used by SDK/process/service adapters. The host pins the target and rechecks access; no caller-selected scope. */
|
|
92
|
+
export declare const AgentRuntimeDeploymentCapability: import("../../core/runtime-capability").RuntimeCapabilityKey<{
|
|
93
|
+
resolve(): Promise<AgentRuntimeDeployment>;
|
|
94
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AGENT_PROCESS_SUPERVISOR: string;
|
|
@@ -5,6 +5,13 @@ import type { AgentActivityRecorder } from './activity';
|
|
|
5
5
|
import type { AgentInvocationInput, AgentInvocationScope, AgentJson, AgentRuntimeCapabilities, AgentRuntimeHandle, AgentRuntimeObservation, AgentTarget } from './types';
|
|
6
6
|
/** Trusted per-operation host context, independent of graph and provider transport details. */
|
|
7
7
|
export interface AgentRuntimeContext {
|
|
8
|
+
/** Original host-assigned attempt; include it in version 2 completion evidence. */
|
|
9
|
+
settlement?: {
|
|
10
|
+
status: 'succeeded' | 'failed' | 'cancelled';
|
|
11
|
+
result?: AgentRuntimeObservation['result'];
|
|
12
|
+
error?: string;
|
|
13
|
+
};
|
|
14
|
+
executionTarget?: import('@xpert-ai/contracts').ExecutionRuntimeTarget;
|
|
8
15
|
/** Durable host invocation ID used to correlate provider receipts. */
|
|
9
16
|
invocationId: string;
|
|
10
17
|
scope: Readonly<AgentInvocationScope>;
|
|
@@ -30,6 +37,13 @@ export interface AgentRuntimeStart {
|
|
|
30
37
|
* keep per-invocation state isolated. The host owns authorization and persistence.
|
|
31
38
|
*/
|
|
32
39
|
export interface IAgentRuntimeStrategy {
|
|
40
|
+
/** Built-in transport presets. Declared by installed code; the host still enforces caller access. */
|
|
41
|
+
readonly managedProfiles?: readonly import('./managed').ManagedAgentRuntimeProfile[];
|
|
42
|
+
/** Read-only resolution from this strategy's dependencies/connections; never launch or grant access here.
|
|
43
|
+
* Return undefined when unavailable. The host supplies an already authorized, immutable caller scope.
|
|
44
|
+
* Keep settings stable for a given deployment; changing them invalidates existing bindings.
|
|
45
|
+
*/
|
|
46
|
+
resolveManagedDeployment?(reference: string, scope: Readonly<AgentInvocationScope>): Promise<import('./managed').AgentRuntimeDeploymentSpec | undefined>;
|
|
33
47
|
/** Support flags must agree with the optional methods implemented below. */
|
|
34
48
|
readonly capabilities: AgentRuntimeCapabilities;
|
|
35
49
|
/** Launch or recover approved work; checkpoint the handle as soon as it is known. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentInvocationStatus, AgentRuntimeProgress, ModelExecutionEnvironment, ExecutionActivityCapabilities, ProjectPipelineWorkContext } from '@xpert-ai/contracts';
|
|
1
|
+
import type { ExecutionControlEvidence, AgentInvocationStatus, AgentRuntimeProgress, ModelExecutionEnvironment, ExecutionActivityCapabilities, ProjectPipelineWorkContext } from '@xpert-ai/contracts';
|
|
2
2
|
export type { AgentInvocationStatus, AgentRuntimeProgress } from '@xpert-ai/contracts';
|
|
3
3
|
import type { AgentInvocationDispatchContext } from './dispatch';
|
|
4
4
|
import type { AgentRunnerReceipt } from './execution-runner';
|
|
@@ -43,6 +43,12 @@ export interface AgentTarget {
|
|
|
43
43
|
}
|
|
44
44
|
/** Provider support flags; they do not grant caller permissions. */
|
|
45
45
|
export interface AgentRuntimeCapabilities {
|
|
46
|
+
/** Explicitly allow repeat delivery of the same cancellation after an ambiguous response. */
|
|
47
|
+
idempotentCancellation?: boolean;
|
|
48
|
+
/** Versioned proof of original operation completion, including its owned work. Omitted is unsupported. */
|
|
49
|
+
completionEvidence?: 1 | 2;
|
|
50
|
+
/** Process-local adapters must be controlled on the host boot that admitted the execution. */
|
|
51
|
+
hostAffinity?: 1;
|
|
46
52
|
activity?: ExecutionActivityCapabilities;
|
|
47
53
|
/** Explicit adapter compatibility; does not install tools or grant model/environment access. */
|
|
48
54
|
executionTools?: Array<{
|
|
@@ -116,6 +122,8 @@ export interface AgentInteraction {
|
|
|
116
122
|
* The host manages identity, revisions and persistence.
|
|
117
123
|
*/
|
|
118
124
|
export interface AgentRuntimeObservation {
|
|
125
|
+
/** Distinct from request acceptance. The host validates source, capability and exact operation identity. */
|
|
126
|
+
controlEvidence?: ExecutionControlEvidence;
|
|
119
127
|
/** succeeded requires a result, even for structured-only output. */
|
|
120
128
|
status: AgentInvocationStatus;
|
|
121
129
|
handle?: AgentRuntimeHandle;
|
|
@@ -140,6 +148,27 @@ export interface AgentInvocationRequest {
|
|
|
140
148
|
}
|
|
141
149
|
/** Host-owned invocation snapshot; not an update DTO. */
|
|
142
150
|
export interface AgentInvocation extends AgentRuntimeObservation {
|
|
151
|
+
/** Persisted business outcome awaiting independent process completion evidence. */
|
|
152
|
+
reportedOutcome?: 'succeeded' | 'failed' | 'cancelled';
|
|
153
|
+
/** Pinned at admission; plugins cannot replace the original host or execution generation. */
|
|
154
|
+
executionTarget?: import('@xpert-ai/contracts').ExecutionRuntimeTarget;
|
|
155
|
+
completionEvidence?: 1 | 2;
|
|
156
|
+
/** Host-only durable response delivery. An ambiguous claimed response is never resent. */
|
|
157
|
+
hostResponse?: {
|
|
158
|
+
interactionId: string;
|
|
159
|
+
response: AgentJson;
|
|
160
|
+
claimed: boolean;
|
|
161
|
+
};
|
|
162
|
+
/** Host-assigned control adapter, independent of provider names or task labels. */
|
|
163
|
+
controlAdapter?: 'native-assistant-task' | 'native-graph';
|
|
164
|
+
/** Host control survives a missing handle and cannot be cleared by provider progress. */
|
|
165
|
+
control?: {
|
|
166
|
+
intent: 'terminated';
|
|
167
|
+
requestedAt: string;
|
|
168
|
+
deliveryToken?: string;
|
|
169
|
+
deliveryUntil?: string;
|
|
170
|
+
attempted?: boolean;
|
|
171
|
+
};
|
|
143
172
|
/** Pinned presentation contract remains readable after the runtime plugin is removed. */
|
|
144
173
|
activity?: ExecutionActivityCapabilities;
|
|
145
174
|
/** Host startup fence; intermediate receipts are not inspected until start returns or this deadline expires. */
|
|
@@ -12,7 +12,11 @@ export interface NativeModelClient {
|
|
|
12
12
|
generate(body: NativeModelBody, headers: Readonly<Record<string, string>>, signal: AbortSignal): Promise<Response>;
|
|
13
13
|
priceUsage(usage: TTokenUsage, context?: LLMPriceContext): ILLMUsage;
|
|
14
14
|
}
|
|
15
|
-
export type NativeModelClientFactory = (protocol: NativeModelProtocol, model: ICopilotModel
|
|
15
|
+
export type NativeModelClientFactory = (protocol: NativeModelProtocol, model: ICopilotModel,
|
|
16
|
+
/** Host-resolved custom model settings, including credentials; never serialized into a grant. */
|
|
17
|
+
options?: {
|
|
18
|
+
modelProperties?: Record<string, unknown>;
|
|
19
|
+
}) => Promise<NativeModelClient>;
|
|
16
20
|
/** A single fetch is one billable attempt. No SDK retries or redirects to another credential origin. */
|
|
17
21
|
export declare function nativeModelTransport(input: {
|
|
18
22
|
protocol: NativeModelProtocol;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { type ArtifactDocumentContext, type ArtifactDocumentQuery } from './protocol';
|
|
2
2
|
import type { ArtifactDocumentDependencyAsset } from './dependencies';
|
|
3
|
+
import type { ArtifactDocumentNetworkPolicy } from './network';
|
|
3
4
|
/** Trusted integration callbacks. T is the plugin's cloneable result shape, independent of any chart library. */
|
|
4
5
|
export interface ArtifactDocumentHostOptions<T> {
|
|
5
6
|
/** Complete untrusted HTML; scripts run only inside the isolated frame. */
|
|
6
7
|
html: string;
|
|
7
8
|
/** Exact packaged bytes pinned to this Artifact version, never URLs or library names from the document. */
|
|
8
9
|
dependencies?: ArtifactDocumentDependencyAsset[];
|
|
10
|
+
/** Optional trusted HTTPS resource allowlist. Omit to keep all external resources blocked. */
|
|
11
|
+
networkPolicy?: ArtifactDocumentNetworkPolicy;
|
|
9
12
|
/** Public binding IDs and presentation defaults for this document generation. */
|
|
10
13
|
context: ArtifactDocumentContext;
|
|
11
14
|
/** Resolve against saved Bindings on the server with the current user's access; never execute a query definition from HTML. */
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod/v3';
|
|
2
|
+
export declare const artifactDocumentNetworkPolicy: z.ZodObject<{
|
|
3
|
+
scripts: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
|
|
4
|
+
styles: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
|
|
5
|
+
fonts: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
|
|
6
|
+
images: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
|
|
7
|
+
}, "strict", z.ZodTypeAny, {
|
|
8
|
+
scripts?: string[];
|
|
9
|
+
styles?: string[];
|
|
10
|
+
fonts?: string[];
|
|
11
|
+
images?: string[];
|
|
12
|
+
}, {
|
|
13
|
+
scripts?: string[];
|
|
14
|
+
styles?: string[];
|
|
15
|
+
fonts?: string[];
|
|
16
|
+
images?: string[];
|
|
17
|
+
}>;
|
|
18
|
+
export type ArtifactDocumentNetworkPolicy = z.output<typeof artifactDocumentNetworkPolicy>;
|
|
19
|
+
export declare function artifactDocumentCsp(input?: ArtifactDocumentNetworkPolicy): string;
|
|
20
|
+
/** For preview browser routing; CSP remains the enforcement in the displayed frame. */
|
|
21
|
+
export declare function isArtifactDocumentResourceAllowed(policy: ArtifactDocumentNetworkPolicy, resourceType: string, value: string): boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ArtifactDocumentDependencyAsset } from './dependencies';
|
|
2
|
+
import { type ArtifactDocumentNetworkPolicy } from './network';
|
|
2
3
|
export declare const ARTIFACT_DOCUMENT_CSP: string;
|
|
3
4
|
/** Host-owned prefix precedes all authored markup, including malformed/duplicate heads. */
|
|
4
|
-
export declare function renderArtifactDocument(html: string, sessionId: string, dependencies?: ArtifactDocumentDependencyAsset[]): string;
|
|
5
|
+
export declare function renderArtifactDocument(html: string, sessionId: string, dependencies?: ArtifactDocumentDependencyAsset[], networkPolicy?: ArtifactDocumentNetworkPolicy): string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DiscoveryService, Reflector } from '@nestjs/core';
|
|
2
2
|
import type { I18nObject, LanguagesEnum, ModelFeature, TXpertTeamDraft, TXpertTemplate } from '@xpert-ai/contracts';
|
|
3
3
|
import { BaseStrategyRegistry } from '../strategy';
|
|
4
|
+
export { applyAssistantMiddleware, hasAssistantMiddleware } from './middleware';
|
|
4
5
|
export interface AssistantCapabilityContext {
|
|
5
6
|
template: TXpertTemplate;
|
|
6
7
|
draft: TXpertTeamDraft;
|
|
@@ -21,6 +22,8 @@ export interface IAssistantCapabilityProvider {
|
|
|
21
22
|
readonly requiredModelFeatures?: ModelFeature[];
|
|
22
23
|
/** Explicitly opt into the blank Assistant creation flow. */
|
|
23
24
|
readonly availableForBlankAssistant?: boolean;
|
|
25
|
+
/** Opt into a simple creation switch; no additional capability-specific configuration is needed. */
|
|
26
|
+
readonly supportsQuickCreation?: boolean;
|
|
24
27
|
/** Distribution extensions to specific templates, without changing their portable source. */
|
|
25
28
|
readonly templates?: {
|
|
26
29
|
templateId: string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type TXpertTeamDraft } from '@xpert-ai/contracts';
|
|
2
|
+
export declare function hasAssistantMiddleware(draft: TXpertTeamDraft, provider: string): boolean;
|
|
3
|
+
/** Compose only the draft graph. The platform records the contribution for safe removal.
|
|
4
|
+
* No Project, permission, external resource or implicit replacement is created here. */
|
|
5
|
+
export declare function applyAssistantMiddleware(draft: TXpertTeamDraft, input: {
|
|
6
|
+
provider: string;
|
|
7
|
+
key: string;
|
|
8
|
+
title: string;
|
|
9
|
+
instructions: string;
|
|
10
|
+
}): void;
|
|
@@ -144,7 +144,14 @@ export interface CollaborationApi {
|
|
|
144
144
|
/** Remove an Agent/system collaborator before its TTL expires. */
|
|
145
145
|
removeVirtualPresence(input: RemoveVirtualPresenceInput): Promise<void>;
|
|
146
146
|
/** Stop normal editing while retaining the document. */
|
|
147
|
-
archiveDocument(input: GetCollaborationDocumentInput
|
|
147
|
+
archiveDocument(input: GetCollaborationDocumentInput & {
|
|
148
|
+
expectedSequence?: number;
|
|
149
|
+
}): Promise<CollaborationDocumentRecord>;
|
|
150
|
+
/** Reopen an archived document after the provider's current manage authorization.
|
|
151
|
+
* State and sequence are retained; this cannot resurrect a deleted document. */
|
|
152
|
+
restoreDocument(input: GetCollaborationDocumentInput & {
|
|
153
|
+
expectedSequence?: number;
|
|
154
|
+
}): Promise<CollaborationDocumentRecord>;
|
|
148
155
|
/** Soft-delete the platform document and notify its provider. */
|
|
149
156
|
deleteDocument(input: GetCollaborationDocumentInput): Promise<CollaborationDocumentRecord>;
|
|
150
157
|
}
|
|
@@ -181,6 +188,10 @@ export type CollaborationMaterializationEvent = CollaborationProviderContext & {
|
|
|
181
188
|
export interface ICollaborationDocumentProvider {
|
|
182
189
|
/** Authorize the exact resource and requested operation in the supplied platform scope. */
|
|
183
190
|
authorize(context: CollaborationProviderContext): Promise<boolean> | boolean;
|
|
191
|
+
/** Validate the merged state before commit, including updates received through WebSockets. */
|
|
192
|
+
validateDocument?(context: CollaborationProviderContext & {
|
|
193
|
+
stateBase64: string;
|
|
194
|
+
}): Promise<void> | void;
|
|
184
195
|
/** Return an idempotent initial snapshot without creating a business version. */
|
|
185
196
|
initializeDocument(context: CollaborationProviderContext): Promise<CollaborationDocumentInitialization> | CollaborationDocumentInitialization;
|
|
186
197
|
/** Project platform state into plugin query/export entities. The method must be idempotent. */
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ConnectorRuntimeCredentialV2 } from './strategy.interface';
|
|
2
|
+
export interface ConnectorDocumentEntry {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
/** A validated public document URL, never a signed file URL. */
|
|
6
|
+
url: string | null;
|
|
7
|
+
type: 'document';
|
|
8
|
+
}
|
|
9
|
+
export interface ConnectorDocumentSnapshot extends ConnectorDocumentEntry {
|
|
10
|
+
revision: string;
|
|
11
|
+
/** Hash of the imported representation. Detects changes even if the provider revision is coarse. */
|
|
12
|
+
contentHash: string;
|
|
13
|
+
format: 'text/plain';
|
|
14
|
+
content: string;
|
|
15
|
+
warnings: string[];
|
|
16
|
+
}
|
|
17
|
+
export interface ConnectorDocumentQuery {
|
|
18
|
+
query: string;
|
|
19
|
+
cursor?: string;
|
|
20
|
+
pageSize: number;
|
|
21
|
+
}
|
|
22
|
+
/** Optional native connector hook. Credentials stay server-side; document access uses the same identity
|
|
23
|
+
* as the connection. Start with explicit representations; never label plain text as a lossless rich document.
|
|
24
|
+
*/
|
|
25
|
+
export interface ConnectorDocumentSource {
|
|
26
|
+
search(credential: ConnectorRuntimeCredentialV2, query: ConnectorDocumentQuery): Promise<{
|
|
27
|
+
items: ConnectorDocumentEntry[];
|
|
28
|
+
nextCursor: string | null;
|
|
29
|
+
}>;
|
|
30
|
+
read(credential: ConnectorRuntimeCredentialV2, locator: string): Promise<ConnectorDocumentSnapshot>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { I18nText } from '@xpert-ai/contracts';
|
|
2
|
+
import type { OrganizationRuntimeActor } from '../runtime/actor';
|
|
3
|
+
import type { ConnectorScope } from './strategy.interface';
|
|
4
|
+
export type * from './document-source';
|
|
5
|
+
import type { ConnectorDocumentEntry, ConnectorDocumentQuery, ConnectorDocumentSnapshot } from './document-source';
|
|
6
|
+
export interface ConnectorDocumentContext {
|
|
7
|
+
actor: OrganizationRuntimeActor;
|
|
8
|
+
assistantId: string;
|
|
9
|
+
projectId: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ConnectorDocumentConnection {
|
|
12
|
+
bindingId: string;
|
|
13
|
+
provider: string;
|
|
14
|
+
label: I18nText;
|
|
15
|
+
scope: ConnectorScope;
|
|
16
|
+
status: string;
|
|
17
|
+
available: boolean;
|
|
18
|
+
managementUrl: string;
|
|
19
|
+
}
|
|
20
|
+
/** Interactive, authenticated host API. The host lists permissible bindings itself; a client ID is
|
|
21
|
+
* never a grant. This API does not grant arbitrary connectors to model/tool executions.
|
|
22
|
+
*/
|
|
23
|
+
export interface ConnectorDocumentsApi {
|
|
24
|
+
sources(context: ConnectorDocumentContext): Promise<{
|
|
25
|
+
items: ConnectorDocumentConnection[];
|
|
26
|
+
}>;
|
|
27
|
+
search(input: ConnectorDocumentContext & ConnectorDocumentQuery & {
|
|
28
|
+
bindingId: string;
|
|
29
|
+
}): Promise<{
|
|
30
|
+
items: ConnectorDocumentEntry[];
|
|
31
|
+
nextCursor: string | null;
|
|
32
|
+
}>;
|
|
33
|
+
read(input: ConnectorDocumentContext & {
|
|
34
|
+
bindingId: string;
|
|
35
|
+
locator: string;
|
|
36
|
+
}): Promise<ConnectorDocumentSnapshot>;
|
|
37
|
+
}
|
|
38
|
+
export declare const ConnectorDocumentsRuntimeCapability: import("../core/runtime-capability").RuntimeCapabilityKey<ConnectorDocumentsApi>;
|