@xpert-ai/plugin-sdk 3.23.0 → 3.25.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/_object_without_properties_loose.cjs.js +16 -0
- package/_object_without_properties_loose.esm.js +14 -0
- package/analytics-result.cjs.js +212 -0
- package/analytics-result.esm.js +201 -0
- package/analytics.cjs.default.js +1 -0
- package/analytics.cjs.js +17 -0
- package/analytics.cjs.mjs +2 -0
- package/analytics.d.ts +1 -0
- package/analytics.esm.js +2 -0
- package/artifact-document.cjs.default.js +1 -0
- package/artifact-document.cjs.js +581 -0
- package/artifact-document.cjs.mjs +2 -0
- package/artifact-document.d.ts +1 -0
- package/artifact-document.esm.js +563 -0
- package/data-workbench.cjs.js +23 -6
- package/data-workbench.esm.js +23 -6
- package/docs/README.md +8 -0
- package/docs/analytics.md +108 -0
- package/docs/artifact-documents.md +74 -0
- package/docs/artifact-drafts.md +24 -0
- package/docs/artifact-presentations.md +43 -0
- package/docs/json-encoded-schema.md +19 -0
- package/docs/mcp-client.md +63 -0
- package/docs/provider-credential-validation.md +34 -0
- package/docs/rest-client.md +24 -0
- package/docs/workspace-dataset-pipelines.md +120 -0
- package/docs/workspace-file-tools.md +66 -0
- package/index.cjs.js +555 -108
- package/index.esm.js +573 -172
- package/model-provider-toolset.cjs.js +1 -1
- package/model-provider-toolset.esm.js +1 -1
- package/model-provider.cjs.js +47 -1
- package/model-provider.esm.js +41 -2
- package/package.json +14 -2
- package/src/analytics.d.ts +3 -0
- package/src/artifact-document.d.ts +5 -0
- package/src/index.d.ts +2 -0
- package/src/lib/agent/handoff/agent-runtime-message.contract.d.ts +80 -80
- package/src/lib/agent/middleware/capabilities/assistant-task.d.ts +36 -1
- package/src/lib/agent/runtime/dispatch.d.ts +284 -284
- package/src/lib/agent/runtime/index.d.ts +1 -0
- package/src/lib/agent/runtime/pipeline-scope.d.ts +110 -0
- package/src/lib/agent/runtime/types.d.ts +4 -2
- package/src/lib/ai-model/ai-model-provider.interface.d.ts +3 -1
- package/src/lib/ai-model/utils/limits.d.ts +4 -2
- package/src/lib/artifact-document/dependencies.d.ts +101 -0
- package/src/lib/artifact-document/host.d.ts +30 -0
- package/src/lib/artifact-document/protocol.d.ts +60 -0
- package/src/lib/artifact-document/runtime.d.ts +4 -0
- package/src/lib/artifact-document/sha256.d.ts +2 -0
- package/src/lib/artifact-presentation/index.d.ts +35 -0
- package/src/lib/core/index.d.ts +1 -0
- package/src/lib/core/json-encoded-schema.d.ts +15 -0
- package/src/lib/data/analytics/analytics-payload.d.ts +3 -0
- package/src/lib/data/analytics/analytics-provider.d.ts +74 -0
- package/src/lib/data/analytics/analytics-result.d.ts +4 -0
- package/src/lib/data/analytics/analytics.registry.d.ts +10 -0
- package/src/lib/data/analytics/analytics.schema.d.ts +206 -0
- package/src/lib/data/analytics/index.d.ts +5 -0
- package/src/lib/data/datasource/index.d.ts +1 -0
- package/src/lib/data/datasource/types.d.ts +1 -1
- package/src/lib/data/datasource/workbench-adapter.d.ts +11 -1
- package/src/lib/data/datasource/workbench-sql.d.ts +12 -0
- package/src/lib/project-pipeline/adapters.d.ts +87 -0
- package/src/lib/project-pipeline/capability.d.ts +100 -0
- package/src/lib/project-pipeline/index.d.ts +5 -0
- package/src/lib/project-pipeline/projection.d.ts +71 -0
- package/src/lib/project-pipeline/registry.d.ts +509 -0
- package/src/lib/project-pipeline/runtime-registry.d.ts +45 -0
- package/src/lib/project-pipeline/scoped-registry.d.ts +10 -0
- package/src/lib/project-task/index.d.ts +6 -0
- package/src/lib/project-type/index.d.ts +17 -1
- package/src/lib/rag/types.d.ts +1 -1
- package/src/lib/runtime/capabilities/artifact-drafts.d.ts +29 -0
- package/src/lib/runtime/capabilities/artifacts.d.ts +12 -0
- package/src/lib/runtime/capabilities/index.d.ts +3 -0
- package/src/lib/runtime/capabilities/mcp-client-runtime.d.ts +41 -0
- package/src/lib/runtime/capabilities/rest-client-runtime.d.ts +34 -0
- package/src/lib/runtime/capabilities/sandbox-jobs.d.ts +36 -2
- package/src/lib/runtime/index.d.ts +2 -0
- package/src/lib/runtime/mutation-evidence.d.ts +7 -0
- package/src/lib/runtime/workspace-file-tools.d.ts +11 -0
- package/src/lib/sandbox/file-edits.d.ts +4 -0
- package/src/lib/sandbox/protocol.d.ts +7 -1
- package/src/lib/sandbox/runtime-provider.d.ts +4 -0
- package/src/lib/sandbox/sandbox.d.ts +2 -8
- package/src/lib/tool-provider/adapters.d.ts +1 -1
- package/src/lib/tool-provider/types.d.ts +2 -0
|
@@ -0,0 +1,509 @@
|
|
|
1
|
+
import { DiscoveryService, Reflector } from '@nestjs/core';
|
|
2
|
+
import { type ProjectPipelineContribution, type ProjectPipelineJsonValue } from '@xpert-ai/contracts';
|
|
3
|
+
import { BaseStrategyRegistry, type StrategySource } from '../strategy';
|
|
4
|
+
import type { ProjectAccessActor } from '../runtime/capabilities/project-access';
|
|
5
|
+
export { projectPipelineContributionSchema, type ProjectPipelineContribution } from '@xpert-ai/contracts';
|
|
6
|
+
export declare const PROJECT_PIPELINE_CONTRIBUTION = "PROJECT_PIPELINE_CONTRIBUTION";
|
|
7
|
+
export declare const ProjectPipelineContributor: (key: string) => <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
|
|
8
|
+
export declare class ProjectPipelineContributionRegistry extends BaseStrategyRegistry<ProjectPipelineContribution> {
|
|
9
|
+
private readonly parsedContributions;
|
|
10
|
+
constructor(discovery: DiscoveryService, reflector: Reflector);
|
|
11
|
+
upsert(instance: unknown): void;
|
|
12
|
+
register(key: string, contribution: ProjectPipelineContribution, source: StrategySource): {
|
|
13
|
+
key: string;
|
|
14
|
+
configurations: {
|
|
15
|
+
binding: {
|
|
16
|
+
templateRef: string;
|
|
17
|
+
roleBindings: Record<string, {
|
|
18
|
+
kind: "assistant" | "runtime_binding" | "human" | "service";
|
|
19
|
+
selectionKey: string;
|
|
20
|
+
requiredCapabilities?: string[] | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
parameters: Record<string, import("packages/contracts/dist/src/ai/project-pipeline/primitives.schema").ProjectPipelineJsonValue>;
|
|
23
|
+
executorBindings?: Record<string, {
|
|
24
|
+
roleKey: string;
|
|
25
|
+
kind: "assistant" | "runtime_binding" | "human" | "service";
|
|
26
|
+
selectionKey: string;
|
|
27
|
+
requiredCapabilities?: string[] | undefined;
|
|
28
|
+
workspaceId?: string | undefined;
|
|
29
|
+
}> | undefined;
|
|
30
|
+
providerConfiguration?: Record<string, import("packages/contracts/dist/src/ai/project-pipeline/primitives.schema").ProjectPipelineJsonValue> | undefined;
|
|
31
|
+
limits?: {
|
|
32
|
+
maxConcurrentExecutions: number;
|
|
33
|
+
maxTechnicalAttemptsPerNode: number;
|
|
34
|
+
runTimeoutMinutes: number;
|
|
35
|
+
nativeModelBudget?: {
|
|
36
|
+
maxCalls: number;
|
|
37
|
+
maxTokens: number;
|
|
38
|
+
reservationTokens: number;
|
|
39
|
+
} | undefined;
|
|
40
|
+
} | undefined;
|
|
41
|
+
triggers?: {
|
|
42
|
+
adapterRef: string;
|
|
43
|
+
events: string[];
|
|
44
|
+
}[] | undefined;
|
|
45
|
+
};
|
|
46
|
+
schemaVersion: 1;
|
|
47
|
+
template: {
|
|
48
|
+
key: string;
|
|
49
|
+
executionAuthority: "provider";
|
|
50
|
+
providerRef: string;
|
|
51
|
+
topology: {
|
|
52
|
+
source: "provider";
|
|
53
|
+
presentationAdapterRef: string;
|
|
54
|
+
};
|
|
55
|
+
version: string;
|
|
56
|
+
title: string;
|
|
57
|
+
subjectResolverRef: string;
|
|
58
|
+
roles: {
|
|
59
|
+
key: string;
|
|
60
|
+
allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
|
|
61
|
+
}[];
|
|
62
|
+
lanes: {
|
|
63
|
+
key: string;
|
|
64
|
+
roleKey: string;
|
|
65
|
+
label: string;
|
|
66
|
+
order: number;
|
|
67
|
+
}[];
|
|
68
|
+
stages: {
|
|
69
|
+
key: string;
|
|
70
|
+
label: string;
|
|
71
|
+
order: number;
|
|
72
|
+
icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
|
|
73
|
+
}[];
|
|
74
|
+
actionRefs?: string[] | undefined;
|
|
75
|
+
hostRequirements?: {
|
|
76
|
+
protocol: number;
|
|
77
|
+
features: Record<string, number>;
|
|
78
|
+
} | undefined;
|
|
79
|
+
presentation?: {
|
|
80
|
+
views: ("tasks" | "pipeline" | "agent_timeline")[];
|
|
81
|
+
nodeDetailRef?: string | undefined;
|
|
82
|
+
evidenceTypes?: string[] | undefined;
|
|
83
|
+
} | undefined;
|
|
84
|
+
metrics?: {
|
|
85
|
+
dimensionRefs: string[];
|
|
86
|
+
metricRefs: string[];
|
|
87
|
+
} | undefined;
|
|
88
|
+
} | {
|
|
89
|
+
key: string;
|
|
90
|
+
executionAuthority: "platform";
|
|
91
|
+
topology: {
|
|
92
|
+
source: "definition";
|
|
93
|
+
};
|
|
94
|
+
version: string;
|
|
95
|
+
title: string;
|
|
96
|
+
subjectResolverRef: string;
|
|
97
|
+
roles: {
|
|
98
|
+
key: string;
|
|
99
|
+
allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
|
|
100
|
+
}[];
|
|
101
|
+
lanes: {
|
|
102
|
+
key: string;
|
|
103
|
+
roleKey: string;
|
|
104
|
+
label: string;
|
|
105
|
+
order: number;
|
|
106
|
+
}[];
|
|
107
|
+
stages: {
|
|
108
|
+
key: string;
|
|
109
|
+
label: string;
|
|
110
|
+
order: number;
|
|
111
|
+
icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
|
|
112
|
+
}[];
|
|
113
|
+
nodes: ({
|
|
114
|
+
key: string;
|
|
115
|
+
kind: "work";
|
|
116
|
+
laneKey: string;
|
|
117
|
+
operationRef: string;
|
|
118
|
+
executorSlot: string;
|
|
119
|
+
completionRef: string;
|
|
120
|
+
stageKey: string;
|
|
121
|
+
label?: string | undefined;
|
|
122
|
+
resourceResolverRef?: string | undefined;
|
|
123
|
+
outputSchemaRef?: string | undefined;
|
|
124
|
+
inputBindings?: Record<string, {
|
|
125
|
+
from: "node_output";
|
|
126
|
+
nodeKey: string;
|
|
127
|
+
port: string;
|
|
128
|
+
} | {
|
|
129
|
+
from: "subject";
|
|
130
|
+
} | {
|
|
131
|
+
key: string;
|
|
132
|
+
from: "parameter";
|
|
133
|
+
} | {
|
|
134
|
+
from: "collection";
|
|
135
|
+
items: {
|
|
136
|
+
from: "node_output";
|
|
137
|
+
nodeKey: string;
|
|
138
|
+
port: string;
|
|
139
|
+
}[];
|
|
140
|
+
}> | undefined;
|
|
141
|
+
outputPorts?: Record<string, string> | undefined;
|
|
142
|
+
} | {
|
|
143
|
+
key: string;
|
|
144
|
+
kind: "fork";
|
|
145
|
+
stageKey: string;
|
|
146
|
+
label?: string | undefined;
|
|
147
|
+
inputBindings?: Record<string, {
|
|
148
|
+
from: "node_output";
|
|
149
|
+
nodeKey: string;
|
|
150
|
+
port: string;
|
|
151
|
+
} | {
|
|
152
|
+
from: "subject";
|
|
153
|
+
} | {
|
|
154
|
+
key: string;
|
|
155
|
+
from: "parameter";
|
|
156
|
+
} | {
|
|
157
|
+
from: "collection";
|
|
158
|
+
items: {
|
|
159
|
+
from: "node_output";
|
|
160
|
+
nodeKey: string;
|
|
161
|
+
port: string;
|
|
162
|
+
}[];
|
|
163
|
+
}> | undefined;
|
|
164
|
+
outputPorts?: Record<string, string> | undefined;
|
|
165
|
+
} | {
|
|
166
|
+
join: {
|
|
167
|
+
mode: "all_selected";
|
|
168
|
+
accept: "completed";
|
|
169
|
+
};
|
|
170
|
+
key: string;
|
|
171
|
+
kind: "join";
|
|
172
|
+
stageKey: string;
|
|
173
|
+
label?: string | undefined;
|
|
174
|
+
inputBindings?: Record<string, {
|
|
175
|
+
from: "node_output";
|
|
176
|
+
nodeKey: string;
|
|
177
|
+
port: string;
|
|
178
|
+
} | {
|
|
179
|
+
from: "subject";
|
|
180
|
+
} | {
|
|
181
|
+
key: string;
|
|
182
|
+
from: "parameter";
|
|
183
|
+
} | {
|
|
184
|
+
from: "collection";
|
|
185
|
+
items: {
|
|
186
|
+
from: "node_output";
|
|
187
|
+
nodeKey: string;
|
|
188
|
+
port: string;
|
|
189
|
+
}[];
|
|
190
|
+
}> | undefined;
|
|
191
|
+
outputPorts?: Record<string, string> | undefined;
|
|
192
|
+
} | {
|
|
193
|
+
key: string;
|
|
194
|
+
kind: "router";
|
|
195
|
+
stageKey: string;
|
|
196
|
+
policyRef: string;
|
|
197
|
+
outcomes: string[];
|
|
198
|
+
unmatched: "block";
|
|
199
|
+
label?: string | undefined;
|
|
200
|
+
inputBindings?: Record<string, {
|
|
201
|
+
from: "node_output";
|
|
202
|
+
nodeKey: string;
|
|
203
|
+
port: string;
|
|
204
|
+
} | {
|
|
205
|
+
from: "subject";
|
|
206
|
+
} | {
|
|
207
|
+
key: string;
|
|
208
|
+
from: "parameter";
|
|
209
|
+
} | {
|
|
210
|
+
from: "collection";
|
|
211
|
+
items: {
|
|
212
|
+
from: "node_output";
|
|
213
|
+
nodeKey: string;
|
|
214
|
+
port: string;
|
|
215
|
+
}[];
|
|
216
|
+
}> | undefined;
|
|
217
|
+
outputPorts?: Record<string, string> | undefined;
|
|
218
|
+
} | {
|
|
219
|
+
key: string;
|
|
220
|
+
kind: "human_gate";
|
|
221
|
+
laneKey: string;
|
|
222
|
+
stageKey: string;
|
|
223
|
+
policyRef: string;
|
|
224
|
+
outcomes: string[];
|
|
225
|
+
candidateRoleKey: string;
|
|
226
|
+
label?: string | undefined;
|
|
227
|
+
inputBindings?: Record<string, {
|
|
228
|
+
from: "node_output";
|
|
229
|
+
nodeKey: string;
|
|
230
|
+
port: string;
|
|
231
|
+
} | {
|
|
232
|
+
from: "subject";
|
|
233
|
+
} | {
|
|
234
|
+
key: string;
|
|
235
|
+
from: "parameter";
|
|
236
|
+
} | {
|
|
237
|
+
from: "collection";
|
|
238
|
+
items: {
|
|
239
|
+
from: "node_output";
|
|
240
|
+
nodeKey: string;
|
|
241
|
+
port: string;
|
|
242
|
+
}[];
|
|
243
|
+
}> | undefined;
|
|
244
|
+
outputPorts?: Record<string, string> | undefined;
|
|
245
|
+
outcomeLabels?: Record<string, string> | undefined;
|
|
246
|
+
} | {
|
|
247
|
+
key: string;
|
|
248
|
+
kind: "external_wait";
|
|
249
|
+
laneKey: string;
|
|
250
|
+
stageKey: string;
|
|
251
|
+
subscriptionRef: string;
|
|
252
|
+
label?: string | undefined;
|
|
253
|
+
inputBindings?: Record<string, {
|
|
254
|
+
from: "node_output";
|
|
255
|
+
nodeKey: string;
|
|
256
|
+
port: string;
|
|
257
|
+
} | {
|
|
258
|
+
from: "subject";
|
|
259
|
+
} | {
|
|
260
|
+
key: string;
|
|
261
|
+
from: "parameter";
|
|
262
|
+
} | {
|
|
263
|
+
from: "collection";
|
|
264
|
+
items: {
|
|
265
|
+
from: "node_output";
|
|
266
|
+
nodeKey: string;
|
|
267
|
+
port: string;
|
|
268
|
+
}[];
|
|
269
|
+
}> | undefined;
|
|
270
|
+
outputPorts?: Record<string, string> | undefined;
|
|
271
|
+
} | {
|
|
272
|
+
key: string;
|
|
273
|
+
outcome: string;
|
|
274
|
+
kind: "terminal";
|
|
275
|
+
stageKey: string;
|
|
276
|
+
label?: string | undefined;
|
|
277
|
+
inputBindings?: Record<string, {
|
|
278
|
+
from: "node_output";
|
|
279
|
+
nodeKey: string;
|
|
280
|
+
port: string;
|
|
281
|
+
} | {
|
|
282
|
+
from: "subject";
|
|
283
|
+
} | {
|
|
284
|
+
key: string;
|
|
285
|
+
from: "parameter";
|
|
286
|
+
} | {
|
|
287
|
+
from: "collection";
|
|
288
|
+
items: {
|
|
289
|
+
from: "node_output";
|
|
290
|
+
nodeKey: string;
|
|
291
|
+
port: string;
|
|
292
|
+
}[];
|
|
293
|
+
}> | undefined;
|
|
294
|
+
outputPorts?: Record<string, string> | undefined;
|
|
295
|
+
disposition?: "complete" | "await_new_subject" | undefined;
|
|
296
|
+
})[];
|
|
297
|
+
edges: {
|
|
298
|
+
from: string;
|
|
299
|
+
to: string;
|
|
300
|
+
outcome?: string | undefined;
|
|
301
|
+
}[];
|
|
302
|
+
roundPolicy: {
|
|
303
|
+
entryNodeKey: string;
|
|
304
|
+
maxRounds: number;
|
|
305
|
+
onRework: "await_new_subject_then_next_round";
|
|
306
|
+
onLimit: "attention";
|
|
307
|
+
newVersionWhileActive: "supersede_round";
|
|
308
|
+
terminalOutcomes: string[];
|
|
309
|
+
};
|
|
310
|
+
failurePolicy: {
|
|
311
|
+
requiredNodeFailure: "block_and_attention";
|
|
312
|
+
unknownExecution: "inspect_without_replay";
|
|
313
|
+
};
|
|
314
|
+
hostRequirements?: {
|
|
315
|
+
protocol: number;
|
|
316
|
+
features: Record<string, number>;
|
|
317
|
+
} | undefined;
|
|
318
|
+
presentation?: {
|
|
319
|
+
views: ("tasks" | "pipeline" | "agent_timeline")[];
|
|
320
|
+
nodeDetailRef?: string | undefined;
|
|
321
|
+
evidenceTypes?: string[] | undefined;
|
|
322
|
+
} | undefined;
|
|
323
|
+
metrics?: {
|
|
324
|
+
dimensionRefs: string[];
|
|
325
|
+
metricRefs: string[];
|
|
326
|
+
} | undefined;
|
|
327
|
+
};
|
|
328
|
+
}[];
|
|
329
|
+
descriptors: ({
|
|
330
|
+
kind: "schema";
|
|
331
|
+
ref: string;
|
|
332
|
+
} | {
|
|
333
|
+
kind: "resource";
|
|
334
|
+
ref: string;
|
|
335
|
+
} | {
|
|
336
|
+
kind: "subject";
|
|
337
|
+
outputSchemaRef: string;
|
|
338
|
+
ref: string;
|
|
339
|
+
} | {
|
|
340
|
+
kind: "operation";
|
|
341
|
+
requiredCapabilities: string[];
|
|
342
|
+
ref: string;
|
|
343
|
+
effects: "read_only" | "isolated_write" | "external_write";
|
|
344
|
+
idempotency: "read_only" | "keyed_receipt";
|
|
345
|
+
inputs: Record<string, {
|
|
346
|
+
schemaRef: string;
|
|
347
|
+
cardinality: "collection" | "one";
|
|
348
|
+
}>;
|
|
349
|
+
outputs: Record<string, string>;
|
|
350
|
+
retry?: "never" | "after_confirmed_failure" | undefined;
|
|
351
|
+
} | {
|
|
352
|
+
kind: "completion";
|
|
353
|
+
ref: string;
|
|
354
|
+
} | {
|
|
355
|
+
kind: "policy";
|
|
356
|
+
outcomes: string[];
|
|
357
|
+
ref: string;
|
|
358
|
+
} | {
|
|
359
|
+
kind: "projection";
|
|
360
|
+
ref: string;
|
|
361
|
+
} | {
|
|
362
|
+
kind: "presentation";
|
|
363
|
+
ref: string;
|
|
364
|
+
} | {
|
|
365
|
+
kind: "action";
|
|
366
|
+
ref: string;
|
|
367
|
+
} | {
|
|
368
|
+
kind: "metric";
|
|
369
|
+
ref: string;
|
|
370
|
+
} | {
|
|
371
|
+
kind: "dimension";
|
|
372
|
+
ref: string;
|
|
373
|
+
} | {
|
|
374
|
+
kind: "trigger";
|
|
375
|
+
ref: string;
|
|
376
|
+
} | {
|
|
377
|
+
kind: "subscription";
|
|
378
|
+
ref: string;
|
|
379
|
+
outputs: Record<string, string>;
|
|
380
|
+
})[];
|
|
381
|
+
forms?: {
|
|
382
|
+
templateRef: string;
|
|
383
|
+
parameters: ({
|
|
384
|
+
type: "boolean";
|
|
385
|
+
key: string;
|
|
386
|
+
label: {
|
|
387
|
+
en_US: string;
|
|
388
|
+
zh_Hans?: string | undefined;
|
|
389
|
+
};
|
|
390
|
+
description?: {
|
|
391
|
+
en_US: string;
|
|
392
|
+
zh_Hans?: string | undefined;
|
|
393
|
+
} | undefined;
|
|
394
|
+
} | {
|
|
395
|
+
type: "text";
|
|
396
|
+
key: string;
|
|
397
|
+
label: {
|
|
398
|
+
en_US: string;
|
|
399
|
+
zh_Hans?: string | undefined;
|
|
400
|
+
};
|
|
401
|
+
minLength: number;
|
|
402
|
+
maxLength: number;
|
|
403
|
+
description?: {
|
|
404
|
+
en_US: string;
|
|
405
|
+
zh_Hans?: string | undefined;
|
|
406
|
+
} | undefined;
|
|
407
|
+
} | {
|
|
408
|
+
type: "number";
|
|
409
|
+
integer: boolean;
|
|
410
|
+
key: string;
|
|
411
|
+
label: {
|
|
412
|
+
en_US: string;
|
|
413
|
+
zh_Hans?: string | undefined;
|
|
414
|
+
};
|
|
415
|
+
min: number;
|
|
416
|
+
max: number;
|
|
417
|
+
description?: {
|
|
418
|
+
en_US: string;
|
|
419
|
+
zh_Hans?: string | undefined;
|
|
420
|
+
} | undefined;
|
|
421
|
+
} | {
|
|
422
|
+
options: {
|
|
423
|
+
value: string;
|
|
424
|
+
label: {
|
|
425
|
+
en_US: string;
|
|
426
|
+
zh_Hans?: string | undefined;
|
|
427
|
+
};
|
|
428
|
+
}[];
|
|
429
|
+
type: "choice";
|
|
430
|
+
key: string;
|
|
431
|
+
label: {
|
|
432
|
+
en_US: string;
|
|
433
|
+
zh_Hans?: string | undefined;
|
|
434
|
+
};
|
|
435
|
+
description?: {
|
|
436
|
+
en_US: string;
|
|
437
|
+
zh_Hans?: string | undefined;
|
|
438
|
+
} | undefined;
|
|
439
|
+
} | {
|
|
440
|
+
options: {
|
|
441
|
+
value: string;
|
|
442
|
+
label: {
|
|
443
|
+
en_US: string;
|
|
444
|
+
zh_Hans?: string | undefined;
|
|
445
|
+
};
|
|
446
|
+
}[];
|
|
447
|
+
type: "multi_choice";
|
|
448
|
+
key: string;
|
|
449
|
+
label: {
|
|
450
|
+
en_US: string;
|
|
451
|
+
zh_Hans?: string | undefined;
|
|
452
|
+
};
|
|
453
|
+
minItems: number;
|
|
454
|
+
description?: {
|
|
455
|
+
en_US: string;
|
|
456
|
+
zh_Hans?: string | undefined;
|
|
457
|
+
} | undefined;
|
|
458
|
+
} | {
|
|
459
|
+
type: "string_list";
|
|
460
|
+
key: string;
|
|
461
|
+
label: {
|
|
462
|
+
en_US: string;
|
|
463
|
+
zh_Hans?: string | undefined;
|
|
464
|
+
};
|
|
465
|
+
maxItems: number;
|
|
466
|
+
itemMaxLength: number;
|
|
467
|
+
description?: {
|
|
468
|
+
en_US: string;
|
|
469
|
+
zh_Hans?: string | undefined;
|
|
470
|
+
} | undefined;
|
|
471
|
+
})[];
|
|
472
|
+
description: {
|
|
473
|
+
en_US: string;
|
|
474
|
+
zh_Hans?: string | undefined;
|
|
475
|
+
};
|
|
476
|
+
assistantSlots: {
|
|
477
|
+
label: {
|
|
478
|
+
en_US: string;
|
|
479
|
+
zh_Hans?: string | undefined;
|
|
480
|
+
};
|
|
481
|
+
slot: string;
|
|
482
|
+
description?: {
|
|
483
|
+
en_US: string;
|
|
484
|
+
zh_Hans?: string | undefined;
|
|
485
|
+
} | undefined;
|
|
486
|
+
}[];
|
|
487
|
+
nativeModelBudget?: {
|
|
488
|
+
maxCalls: number;
|
|
489
|
+
maxTokens: number;
|
|
490
|
+
reservationTokens: number;
|
|
491
|
+
} | undefined;
|
|
492
|
+
runtimeSlots?: {
|
|
493
|
+
label: {
|
|
494
|
+
en_US: string;
|
|
495
|
+
zh_Hans?: string | undefined;
|
|
496
|
+
};
|
|
497
|
+
slot: string;
|
|
498
|
+
description?: {
|
|
499
|
+
en_US: string;
|
|
500
|
+
zh_Hans?: string | undefined;
|
|
501
|
+
} | undefined;
|
|
502
|
+
}[] | undefined;
|
|
503
|
+
}[] | undefined;
|
|
504
|
+
};
|
|
505
|
+
private registerParsed;
|
|
506
|
+
assertCanRegister(key: string, contribution: ProjectPipelineContribution, source: StrategySource): void;
|
|
507
|
+
/** Explicit actor scope prevents a delegated call from inheriting an unrelated ambient tenant. */
|
|
508
|
+
listForActor(actor: ProjectAccessActor): ProjectPipelineContribution[];
|
|
509
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { DiscoveryService, Reflector } from '@nestjs/core';
|
|
2
|
+
import type { StrategySource } from '../strategy';
|
|
3
|
+
import type { ProjectAccessActor } from '../runtime/capabilities/project-access';
|
|
4
|
+
import type { ProjectPipelineSubjectResolver, ProjectPipelineEvidenceResolver, ProjectPipelineNodeHandler, ProjectPipelineCompletionEvaluator, ProjectPipelinePolicyEvaluator, ProjectPipelineValueSchema, ProjectPipelineAssistantOperation, ProjectPipelineResourceResolver, ProjectPipelineRuntimeOperation } from './adapters';
|
|
5
|
+
import { ProjectPipelineScopedRegistry } from './scoped-registry';
|
|
6
|
+
export type ProjectPipelineRuntimeAdapter = ({
|
|
7
|
+
kind: 'schema';
|
|
8
|
+
ref: string;
|
|
9
|
+
} & ProjectPipelineValueSchema) | ({
|
|
10
|
+
kind: 'resource';
|
|
11
|
+
ref: string;
|
|
12
|
+
} & ProjectPipelineResourceResolver) | ({
|
|
13
|
+
kind: 'subject';
|
|
14
|
+
ref: string;
|
|
15
|
+
} & ProjectPipelineSubjectResolver) | ({
|
|
16
|
+
kind: 'evidence';
|
|
17
|
+
ref: string;
|
|
18
|
+
} & ProjectPipelineEvidenceResolver) | ({
|
|
19
|
+
kind: 'operation';
|
|
20
|
+
ref: string;
|
|
21
|
+
} & ProjectPipelineNodeHandler) | ({
|
|
22
|
+
kind: 'assistant_operation';
|
|
23
|
+
ref: string;
|
|
24
|
+
} & ProjectPipelineAssistantOperation) | ({
|
|
25
|
+
kind: 'runtime_operation';
|
|
26
|
+
ref: string;
|
|
27
|
+
} & ProjectPipelineRuntimeOperation) | ({
|
|
28
|
+
kind: 'completion';
|
|
29
|
+
ref: string;
|
|
30
|
+
} & ProjectPipelineCompletionEvaluator) | ({
|
|
31
|
+
kind: 'policy';
|
|
32
|
+
ref: string;
|
|
33
|
+
} & ProjectPipelinePolicyEvaluator) | ({
|
|
34
|
+
kind: 'subscription';
|
|
35
|
+
ref: string;
|
|
36
|
+
} & ProjectPipelineNodeHandler);
|
|
37
|
+
export declare const PROJECT_PIPELINE_RUNTIME_ADAPTER = "PROJECT_PIPELINE_RUNTIME_ADAPTER";
|
|
38
|
+
export declare const ProjectPipelineRuntimeAdapterProvider: (kind: ProjectPipelineRuntimeAdapter["kind"], ref: string) => <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
|
|
39
|
+
export declare class ProjectPipelineRuntimeAdapterRegistry extends ProjectPipelineScopedRegistry<ProjectPipelineRuntimeAdapter> {
|
|
40
|
+
constructor(discovery: DiscoveryService, reflector: Reflector);
|
|
41
|
+
register(key: string, adapter: ProjectPipelineRuntimeAdapter, source: StrategySource): ProjectPipelineRuntimeAdapter;
|
|
42
|
+
resolve<K extends ProjectPipelineRuntimeAdapter['kind']>(kind: K, ref: string, actor: ProjectAccessActor): Extract<ProjectPipelineRuntimeAdapter, {
|
|
43
|
+
kind: K;
|
|
44
|
+
}>;
|
|
45
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseStrategyRegistry, type StrategySource } from '../strategy';
|
|
2
|
+
import type { ProjectAccessActor } from '../runtime/capabilities/project-access';
|
|
3
|
+
export declare function pipelineActorScopeKeys(actor: ProjectAccessActor): string[];
|
|
4
|
+
/** Public capabilities resolve from their explicit, authorized actor, never another ambient request. */
|
|
5
|
+
export declare abstract class ProjectPipelineScopedRegistry<T> extends BaseStrategyRegistry<T> {
|
|
6
|
+
assertCanRegister(key: string, instance: T, source: StrategySource): void;
|
|
7
|
+
upsert(instance: unknown): void;
|
|
8
|
+
listForActor(actor: ProjectAccessActor): T[];
|
|
9
|
+
getForActor(key: string, actor: ProjectAccessActor): T;
|
|
10
|
+
}
|
|
@@ -22,6 +22,7 @@ export interface ProjectTaskProjection {
|
|
|
22
22
|
executions: Array<{
|
|
23
23
|
key: string;
|
|
24
24
|
attempt: number;
|
|
25
|
+
invocationId?: string;
|
|
25
26
|
agentExecutionId?: string;
|
|
26
27
|
conversationId?: string;
|
|
27
28
|
threadId?: string;
|
|
@@ -59,7 +60,12 @@ export declare class ProjectTaskProviderRegistry extends BaseStrategyRegistry<IP
|
|
|
59
60
|
}
|
|
60
61
|
/** ORM-independent project task management; actor values come from trusted server context. */
|
|
61
62
|
export interface ProjectTasksApi {
|
|
63
|
+
/** Read the saved graph and current execution facts. Never invokes provider snapshot/linked callbacks. */
|
|
62
64
|
graph(context: ProjectTaskContext): Promise<ProjectTaskGraph>;
|
|
65
|
+
/** After committing domain changes, enqueue a durable coalesced refresh; does not wait for provider callbacks. */
|
|
66
|
+
refresh(context: ProjectTaskContext): Promise<{
|
|
67
|
+
status: 'queued';
|
|
68
|
+
}>;
|
|
63
69
|
change(context: ProjectTaskContext, input: ProjectTaskGraphChange): Promise<ProjectTaskGraph>;
|
|
64
70
|
resolveExecution(context: ProjectTaskContext, taskExecutionId: string): Promise<ProjectTaskExecutionTarget>;
|
|
65
71
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DiscoveryService, Reflector } from '@nestjs/core';
|
|
2
|
-
import type { XpertProjectTypeRef, ConversationResourceCard } from '@xpert-ai/contracts';
|
|
2
|
+
import type { XpertProjectTypeRef, ConversationResourceCard, XpertProjectViewSelection, ProjectPipelineProjectionNode } from '@xpert-ai/contracts';
|
|
3
3
|
import { BaseStrategyRegistry } from '../strategy';
|
|
4
4
|
export type { XpertProjectTypeRef, ConversationResourceCard };
|
|
5
5
|
export interface ProjectTypeContext extends XpertProjectTypeRef {
|
|
@@ -14,6 +14,20 @@ export interface ProjectTypeBinding {
|
|
|
14
14
|
xpertId?: string;
|
|
15
15
|
viewKey: string;
|
|
16
16
|
selectionId?: string;
|
|
17
|
+
parameters?: XpertProjectViewSelection['parameters'];
|
|
18
|
+
}
|
|
19
|
+
/** Host-validated current node; plugins still recheck their domain link and target resource. */
|
|
20
|
+
export interface ProjectTypePipelineNode {
|
|
21
|
+
instanceId: string;
|
|
22
|
+
/** Host-validated return focus. Optional for older hosts. */
|
|
23
|
+
returnFocus?: {
|
|
24
|
+
instanceId: string;
|
|
25
|
+
roundId: string;
|
|
26
|
+
nodeId: string;
|
|
27
|
+
};
|
|
28
|
+
ownerRef: string;
|
|
29
|
+
sourceKey: string;
|
|
30
|
+
node: ProjectPipelineProjectionNode;
|
|
17
31
|
}
|
|
18
32
|
/**
|
|
19
33
|
* ORM-independent write access to the host's current creation transaction.
|
|
@@ -51,6 +65,8 @@ export interface IProjectTypeProvider {
|
|
|
51
65
|
}>;
|
|
52
66
|
/** Opens the application's governed creation workflow. */
|
|
53
67
|
createEntry(context: ProjectTypeContext): Promise<ProjectTypeBinding>;
|
|
68
|
+
/** Read-only focus within this Project's governed Assistant; cannot change Assistant or Project identity. */
|
|
69
|
+
resolveNodeEntry?(context: ProjectTypeContext, projectId: string, target: ProjectTypePipelineNode): Promise<XpertProjectViewSelection>;
|
|
54
70
|
/**
|
|
55
71
|
* Optional opt-in to first-send creation. Persist the business entity and its
|
|
56
72
|
* link to input.projectId atomically using input.transaction, then return its entry
|
package/src/lib/rag/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DocumentInterface } from '@langchain/core/documents';
|
|
2
2
|
import { IDocChunkMetadata } from '@xpert-ai/contracts';
|
|
3
|
-
export { TDocumentAsset } from '@xpert-ai/contracts';
|
|
3
|
+
export type { TDocumentAsset } from '@xpert-ai/contracts';
|
|
4
4
|
export interface ChunkMetadata extends IDocChunkMetadata {
|
|
5
5
|
startOffset?: number;
|
|
6
6
|
endOffset?: number;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ArtifactVersionInput, ArtifactVersionRecord } from './artifacts';
|
|
2
|
+
/** Mutable working copy. Revision numbers are never published version numbers. */
|
|
3
|
+
export type ArtifactDraftRecord = ArtifactVersionInput & {
|
|
4
|
+
id: string;
|
|
5
|
+
artifactId: string;
|
|
6
|
+
revision: number;
|
|
7
|
+
baseVersionId: string | null;
|
|
8
|
+
publishedRevision: number | null;
|
|
9
|
+
publishedVersionId: string | null;
|
|
10
|
+
updatedAt?: string | Date;
|
|
11
|
+
};
|
|
12
|
+
export type SaveArtifactDraftInput = ArtifactVersionInput & {
|
|
13
|
+
artifactId: string;
|
|
14
|
+
expectedRevision: number;
|
|
15
|
+
expectedCurrentVersionId: string | null;
|
|
16
|
+
};
|
|
17
|
+
export type PublishArtifactDraftInput = {
|
|
18
|
+
artifactId: string;
|
|
19
|
+
expectedRevision: number;
|
|
20
|
+
expectedCurrentVersionId: string | null;
|
|
21
|
+
};
|
|
22
|
+
export interface ArtifactDraftsApi {
|
|
23
|
+
list(artifactIds: string[]): Promise<ArtifactDraftRecord[]>;
|
|
24
|
+
get(artifactId: string): Promise<ArtifactDraftRecord | null>;
|
|
25
|
+
save(input: SaveArtifactDraftInput): Promise<ArtifactDraftRecord>;
|
|
26
|
+
/** Trusted application action only; never expose this operation as an Agent tool. */
|
|
27
|
+
publish(input: PublishArtifactDraftInput): Promise<ArtifactVersionRecord>;
|
|
28
|
+
}
|
|
29
|
+
export declare const ArtifactDraftsRuntimeCapability: import("../../core/runtime-capability").RuntimeCapabilityKey<ArtifactDraftsApi>;
|