@xpert-ai/plugin-sdk 3.26.0 → 3.26.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/analytics-result.cjs.js +42 -10
- package/analytics-result.esm.js +38 -11
- package/analytics.cjs.js +5 -0
- package/analytics.esm.js +1 -1
- package/docs/en/PERMISSIONS.md +24 -0
- package/docs/en/view-extension-protocol.md +39 -0
- package/index.cjs.js +36 -1
- package/index.esm.js +30 -3
- package/model-provider.cjs.js +3 -0
- package/model-provider.esm.js +3 -0
- package/package.json +2 -2
- package/src/lib/agent/middleware/strategy.interface.d.ts +5 -0
- package/src/lib/agent/runtime/cli-model-profile.d.ts +1 -1
- package/src/lib/artifact-document/dependencies.d.ts +3 -3
- package/src/lib/core/permissions/general.d.ts +3 -0
- package/src/lib/data/analytics/analytics-authoring.d.ts +78 -0
- package/src/lib/data/analytics/analytics-provider.d.ts +20 -2
- package/src/lib/data/analytics/analytics-source.commands.d.ts +18 -0
- package/src/lib/data/analytics/analytics.schema.d.ts +22 -7
- package/src/lib/data/analytics/index.d.ts +2 -0
- package/src/lib/integration/strategy.interface.d.ts +2 -0
- package/src/lib/project-pipeline/adapters.d.ts +5 -1
- package/src/lib/project-pipeline/registry.d.ts +8 -0
- package/src/lib/runtime/capabilities/sandbox-jobs.d.ts +1 -1
package/analytics-result.cjs.js
CHANGED
|
@@ -17,6 +17,22 @@ const json = v3.z.lazy(()=>v3.z.union([
|
|
|
17
17
|
v3.z.array(json).max(1000),
|
|
18
18
|
v3.z.record(json)
|
|
19
19
|
]));
|
|
20
|
+
const analyticsSourceRefSchema = v3.z.discriminatedUnion('kind', [
|
|
21
|
+
v3.z.object({
|
|
22
|
+
kind: v3.z.literal('data-source'),
|
|
23
|
+
dataSourceId: v3.z.string().uuid()
|
|
24
|
+
}).strict(),
|
|
25
|
+
v3.z.object({
|
|
26
|
+
kind: v3.z.literal('definition'),
|
|
27
|
+
definitionId: v3.z.string().uuid(),
|
|
28
|
+
versionId: v3.z.string().uuid()
|
|
29
|
+
}).strict(),
|
|
30
|
+
v3.z.object({
|
|
31
|
+
kind: v3.z.literal('artifact'),
|
|
32
|
+
artifactId: v3.z.string().uuid(),
|
|
33
|
+
versionId: v3.z.string().uuid()
|
|
34
|
+
}).strict()
|
|
35
|
+
]);
|
|
20
36
|
const analyticsOptionsSchema = v3.z.record(json);
|
|
21
37
|
const analyticsFieldSchema = v3.z.object({
|
|
22
38
|
id: key,
|
|
@@ -55,9 +71,8 @@ const analyticsParameterSchema = v3.z.object({
|
|
|
55
71
|
allowedValues: v3.z.array(value).max(200).optional()
|
|
56
72
|
}).strict();
|
|
57
73
|
const analyticsBindingObjectSchema = v3.z.object({
|
|
58
|
-
schemaVersion: v3.z.literal(1),
|
|
59
74
|
id: key,
|
|
60
|
-
|
|
75
|
+
source: analyticsSourceRefSchema,
|
|
61
76
|
providerId: v3.z.string().min(1).max(160),
|
|
62
77
|
operation: key,
|
|
63
78
|
contractVersion: v3.z.number().int().positive(),
|
|
@@ -69,7 +84,7 @@ const analyticsBindingObjectSchema = v3.z.object({
|
|
|
69
84
|
grain: v3.z.array(key).max(20)
|
|
70
85
|
}).strict()
|
|
71
86
|
}).strict();
|
|
72
|
-
|
|
87
|
+
function validateAnalyticsBinding(binding, ctx) {
|
|
73
88
|
const fields = binding.output.fields.map((field)=>field.id);
|
|
74
89
|
const names = binding.parameters.map((parameter)=>parameter.name);
|
|
75
90
|
if (new Set(fields).size !== fields.length || new Set(names).size !== names.length) ctx.addIssue({
|
|
@@ -84,18 +99,20 @@ const analyticsBindingSchema = analyticsBindingObjectSchema.superRefine((binding
|
|
|
84
99
|
code: 'custom',
|
|
85
100
|
message: 'Query payload exceeds limit'
|
|
86
101
|
});
|
|
87
|
-
}
|
|
102
|
+
}
|
|
103
|
+
const analyticsBindingSchema = analyticsBindingObjectSchema.superRefine(validateAnalyticsBinding);
|
|
104
|
+
const analyticsControlsSchema = v3.z.record(key, value).default({});
|
|
88
105
|
const analyticsQueryRequestSchema = v3.z.object({
|
|
89
106
|
binding: analyticsBindingSchema,
|
|
90
|
-
controls:
|
|
107
|
+
controls: analyticsControlsSchema
|
|
91
108
|
}).strict();
|
|
92
|
-
const
|
|
93
|
-
|
|
109
|
+
const analyticsDiscoveryRequestObjectSchema = v3.z.object({
|
|
110
|
+
source: analyticsSourceRefSchema,
|
|
94
111
|
providerId: v3.z.string().min(1).max(160),
|
|
95
112
|
request: json.default({})
|
|
96
|
-
}).strict()
|
|
113
|
+
}).strict();
|
|
114
|
+
const analyticsDiscoveryRequestSchema = analyticsDiscoveryRequestObjectSchema.refine((value)=>new TextEncoder().encode(JSON.stringify(value)).byteLength <= 16000, 'Discovery request exceeds limit');
|
|
97
115
|
const analyticsDiscoveryResultSchema = v3.z.object({
|
|
98
|
-
schemaVersion: v3.z.literal(1),
|
|
99
116
|
items: v3.z.array(v3.z.object({
|
|
100
117
|
id: v3.z.string().min(1).max(512),
|
|
101
118
|
name: v3.z.string().min(1).max(512),
|
|
@@ -115,6 +132,16 @@ const analyticsDiscoveryResultSchema = v3.z.object({
|
|
|
115
132
|
instructions: v3.z.string().max(8000)
|
|
116
133
|
}).strict()
|
|
117
134
|
}).strict().refine((value)=>new TextEncoder().encode(JSON.stringify(value)).byteLength <= 128000, 'Discovery response exceeds limit');
|
|
135
|
+
/** Stable identity for source selection and scoped discovery receipts. */ function analyticsSourceKey(source) {
|
|
136
|
+
switch(source.kind){
|
|
137
|
+
case 'data-source':
|
|
138
|
+
return `data-source/${source.dataSourceId}`;
|
|
139
|
+
case 'definition':
|
|
140
|
+
return `definition/${source.definitionId}/${source.versionId}`;
|
|
141
|
+
case 'artifact':
|
|
142
|
+
return `artifact/${source.artifactId}/${source.versionId}`;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
118
145
|
|
|
119
146
|
function resolveAnalyticsParameters(binding, controls) {
|
|
120
147
|
const allowed = new Set(binding.parameters.map((parameter)=>parameter.controlId));
|
|
@@ -156,7 +183,7 @@ function normalizeAnalyticsResult(binding, result, executionId, maxRows) {
|
|
|
156
183
|
if (!Number.isFinite(Date.parse(result.sourceFetchedAt))) throw new Error('ANALYTICS_FRESHNESS_INVALID');
|
|
157
184
|
if (binding.output.grain.length && new Set(rows.map((row)=>JSON.stringify(binding.output.grain.map((key)=>row[key])))).size !== rows.length) throw new Error('ANALYTICS_GRAIN_MISMATCH');
|
|
158
185
|
return {
|
|
159
|
-
schema: 'xpert.analytics.dataset
|
|
186
|
+
schema: 'xpert.analytics.dataset',
|
|
160
187
|
datasetId: binding.output.datasetId,
|
|
161
188
|
fields,
|
|
162
189
|
rows,
|
|
@@ -202,11 +229,16 @@ function validCell(field, cell) {
|
|
|
202
229
|
|
|
203
230
|
exports.analyticsBindingObjectSchema = analyticsBindingObjectSchema;
|
|
204
231
|
exports.analyticsBindingSchema = analyticsBindingSchema;
|
|
232
|
+
exports.analyticsControlsSchema = analyticsControlsSchema;
|
|
233
|
+
exports.analyticsDiscoveryRequestObjectSchema = analyticsDiscoveryRequestObjectSchema;
|
|
205
234
|
exports.analyticsDiscoveryRequestSchema = analyticsDiscoveryRequestSchema;
|
|
206
235
|
exports.analyticsDiscoveryResultSchema = analyticsDiscoveryResultSchema;
|
|
207
236
|
exports.analyticsFieldSchema = analyticsFieldSchema;
|
|
208
237
|
exports.analyticsOptionsSchema = analyticsOptionsSchema;
|
|
209
238
|
exports.analyticsParameterSchema = analyticsParameterSchema;
|
|
210
239
|
exports.analyticsQueryRequestSchema = analyticsQueryRequestSchema;
|
|
240
|
+
exports.analyticsSourceKey = analyticsSourceKey;
|
|
241
|
+
exports.analyticsSourceRefSchema = analyticsSourceRefSchema;
|
|
211
242
|
exports.normalizeAnalyticsResult = normalizeAnalyticsResult;
|
|
212
243
|
exports.resolveAnalyticsParameters = resolveAnalyticsParameters;
|
|
244
|
+
exports.validateAnalyticsBinding = validateAnalyticsBinding;
|
package/analytics-result.esm.js
CHANGED
|
@@ -15,6 +15,22 @@ const json = z.lazy(()=>z.union([
|
|
|
15
15
|
z.array(json).max(1000),
|
|
16
16
|
z.record(json)
|
|
17
17
|
]));
|
|
18
|
+
const analyticsSourceRefSchema = z.discriminatedUnion('kind', [
|
|
19
|
+
z.object({
|
|
20
|
+
kind: z.literal('data-source'),
|
|
21
|
+
dataSourceId: z.string().uuid()
|
|
22
|
+
}).strict(),
|
|
23
|
+
z.object({
|
|
24
|
+
kind: z.literal('definition'),
|
|
25
|
+
definitionId: z.string().uuid(),
|
|
26
|
+
versionId: z.string().uuid()
|
|
27
|
+
}).strict(),
|
|
28
|
+
z.object({
|
|
29
|
+
kind: z.literal('artifact'),
|
|
30
|
+
artifactId: z.string().uuid(),
|
|
31
|
+
versionId: z.string().uuid()
|
|
32
|
+
}).strict()
|
|
33
|
+
]);
|
|
18
34
|
const analyticsOptionsSchema = z.record(json);
|
|
19
35
|
const analyticsFieldSchema = z.object({
|
|
20
36
|
id: key,
|
|
@@ -53,9 +69,8 @@ const analyticsParameterSchema = z.object({
|
|
|
53
69
|
allowedValues: z.array(value).max(200).optional()
|
|
54
70
|
}).strict();
|
|
55
71
|
const analyticsBindingObjectSchema = z.object({
|
|
56
|
-
schemaVersion: z.literal(1),
|
|
57
72
|
id: key,
|
|
58
|
-
|
|
73
|
+
source: analyticsSourceRefSchema,
|
|
59
74
|
providerId: z.string().min(1).max(160),
|
|
60
75
|
operation: key,
|
|
61
76
|
contractVersion: z.number().int().positive(),
|
|
@@ -67,7 +82,7 @@ const analyticsBindingObjectSchema = z.object({
|
|
|
67
82
|
grain: z.array(key).max(20)
|
|
68
83
|
}).strict()
|
|
69
84
|
}).strict();
|
|
70
|
-
|
|
85
|
+
function validateAnalyticsBinding(binding, ctx) {
|
|
71
86
|
const fields = binding.output.fields.map((field)=>field.id);
|
|
72
87
|
const names = binding.parameters.map((parameter)=>parameter.name);
|
|
73
88
|
if (new Set(fields).size !== fields.length || new Set(names).size !== names.length) ctx.addIssue({
|
|
@@ -82,18 +97,20 @@ const analyticsBindingSchema = analyticsBindingObjectSchema.superRefine((binding
|
|
|
82
97
|
code: 'custom',
|
|
83
98
|
message: 'Query payload exceeds limit'
|
|
84
99
|
});
|
|
85
|
-
}
|
|
100
|
+
}
|
|
101
|
+
const analyticsBindingSchema = analyticsBindingObjectSchema.superRefine(validateAnalyticsBinding);
|
|
102
|
+
const analyticsControlsSchema = z.record(key, value).default({});
|
|
86
103
|
const analyticsQueryRequestSchema = z.object({
|
|
87
104
|
binding: analyticsBindingSchema,
|
|
88
|
-
controls:
|
|
105
|
+
controls: analyticsControlsSchema
|
|
89
106
|
}).strict();
|
|
90
|
-
const
|
|
91
|
-
|
|
107
|
+
const analyticsDiscoveryRequestObjectSchema = z.object({
|
|
108
|
+
source: analyticsSourceRefSchema,
|
|
92
109
|
providerId: z.string().min(1).max(160),
|
|
93
110
|
request: json.default({})
|
|
94
|
-
}).strict()
|
|
111
|
+
}).strict();
|
|
112
|
+
const analyticsDiscoveryRequestSchema = analyticsDiscoveryRequestObjectSchema.refine((value)=>new TextEncoder().encode(JSON.stringify(value)).byteLength <= 16000, 'Discovery request exceeds limit');
|
|
95
113
|
const analyticsDiscoveryResultSchema = z.object({
|
|
96
|
-
schemaVersion: z.literal(1),
|
|
97
114
|
items: z.array(z.object({
|
|
98
115
|
id: z.string().min(1).max(512),
|
|
99
116
|
name: z.string().min(1).max(512),
|
|
@@ -113,6 +130,16 @@ const analyticsDiscoveryResultSchema = z.object({
|
|
|
113
130
|
instructions: z.string().max(8000)
|
|
114
131
|
}).strict()
|
|
115
132
|
}).strict().refine((value)=>new TextEncoder().encode(JSON.stringify(value)).byteLength <= 128000, 'Discovery response exceeds limit');
|
|
133
|
+
/** Stable identity for source selection and scoped discovery receipts. */ function analyticsSourceKey(source) {
|
|
134
|
+
switch(source.kind){
|
|
135
|
+
case 'data-source':
|
|
136
|
+
return `data-source/${source.dataSourceId}`;
|
|
137
|
+
case 'definition':
|
|
138
|
+
return `definition/${source.definitionId}/${source.versionId}`;
|
|
139
|
+
case 'artifact':
|
|
140
|
+
return `artifact/${source.artifactId}/${source.versionId}`;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
116
143
|
|
|
117
144
|
function resolveAnalyticsParameters(binding, controls) {
|
|
118
145
|
const allowed = new Set(binding.parameters.map((parameter)=>parameter.controlId));
|
|
@@ -154,7 +181,7 @@ function normalizeAnalyticsResult(binding, result, executionId, maxRows) {
|
|
|
154
181
|
if (!Number.isFinite(Date.parse(result.sourceFetchedAt))) throw new Error('ANALYTICS_FRESHNESS_INVALID');
|
|
155
182
|
if (binding.output.grain.length && new Set(rows.map((row)=>JSON.stringify(binding.output.grain.map((key)=>row[key])))).size !== rows.length) throw new Error('ANALYTICS_GRAIN_MISMATCH');
|
|
156
183
|
return {
|
|
157
|
-
schema: 'xpert.analytics.dataset
|
|
184
|
+
schema: 'xpert.analytics.dataset',
|
|
158
185
|
datasetId: binding.output.datasetId,
|
|
159
186
|
fields,
|
|
160
187
|
rows,
|
|
@@ -198,4 +225,4 @@ function validCell(field, cell) {
|
|
|
198
225
|
}
|
|
199
226
|
}
|
|
200
227
|
|
|
201
|
-
export { analyticsBindingObjectSchema as a, analyticsBindingSchema as b,
|
|
228
|
+
export { analyticsBindingObjectSchema as a, analyticsBindingSchema as b, analyticsControlsSchema as c, analyticsDiscoveryRequestObjectSchema as d, analyticsDiscoveryRequestSchema as e, analyticsDiscoveryResultSchema as f, analyticsFieldSchema as g, analyticsOptionsSchema as h, analyticsParameterSchema as i, analyticsQueryRequestSchema as j, analyticsSourceKey as k, analyticsSourceRefSchema as l, normalizeAnalyticsResult as n, resolveAnalyticsParameters as r, validateAnalyticsBinding as v };
|
package/analytics.cjs.js
CHANGED
|
@@ -7,11 +7,16 @@ require('zod/v3');
|
|
|
7
7
|
|
|
8
8
|
exports.analyticsBindingObjectSchema = analyticsResult.analyticsBindingObjectSchema;
|
|
9
9
|
exports.analyticsBindingSchema = analyticsResult.analyticsBindingSchema;
|
|
10
|
+
exports.analyticsControlsSchema = analyticsResult.analyticsControlsSchema;
|
|
11
|
+
exports.analyticsDiscoveryRequestObjectSchema = analyticsResult.analyticsDiscoveryRequestObjectSchema;
|
|
10
12
|
exports.analyticsDiscoveryRequestSchema = analyticsResult.analyticsDiscoveryRequestSchema;
|
|
11
13
|
exports.analyticsDiscoveryResultSchema = analyticsResult.analyticsDiscoveryResultSchema;
|
|
12
14
|
exports.analyticsFieldSchema = analyticsResult.analyticsFieldSchema;
|
|
13
15
|
exports.analyticsOptionsSchema = analyticsResult.analyticsOptionsSchema;
|
|
14
16
|
exports.analyticsParameterSchema = analyticsResult.analyticsParameterSchema;
|
|
15
17
|
exports.analyticsQueryRequestSchema = analyticsResult.analyticsQueryRequestSchema;
|
|
18
|
+
exports.analyticsSourceKey = analyticsResult.analyticsSourceKey;
|
|
19
|
+
exports.analyticsSourceRefSchema = analyticsResult.analyticsSourceRefSchema;
|
|
16
20
|
exports.normalizeAnalyticsResult = analyticsResult.normalizeAnalyticsResult;
|
|
17
21
|
exports.resolveAnalyticsParameters = analyticsResult.resolveAnalyticsParameters;
|
|
22
|
+
exports.validateAnalyticsBinding = analyticsResult.validateAnalyticsBinding;
|
package/analytics.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { a as analyticsBindingObjectSchema, b as analyticsBindingSchema, c as
|
|
1
|
+
export { a as analyticsBindingObjectSchema, b as analyticsBindingSchema, c as analyticsControlsSchema, d as analyticsDiscoveryRequestObjectSchema, e as analyticsDiscoveryRequestSchema, f as analyticsDiscoveryResultSchema, g as analyticsFieldSchema, h as analyticsOptionsSchema, i as analyticsParameterSchema, j as analyticsQueryRequestSchema, k as analyticsSourceKey, l as analyticsSourceRefSchema, n as normalizeAnalyticsResult, r as resolveAnalyticsParameters, v as validateAnalyticsBinding } from './analytics-result.esm.js';
|
|
2
2
|
import 'zod/v3';
|
package/docs/en/PERMISSIONS.md
CHANGED
|
@@ -171,3 +171,27 @@ console.log(result[0].docs[0].pageContent)
|
|
|
171
171
|
The plugin declares its permission requirements and provider/model configuration; the host supplies the appropriate client without requiring plugin-specific OpenAI initialization logic.
|
|
172
172
|
|
|
173
173
|
A shared permission-request interface, such as `ILLMPermissionRequest`, can give OCR, vision-model and embedding plugins a common way to declare dependencies.
|
|
174
|
+
|
|
175
|
+
## Integration configuration reads
|
|
176
|
+
|
|
177
|
+
Resolve `INTEGRATION_PERMISSION_SERVICE_TOKEN` through `PluginContext.resolve()` and
|
|
178
|
+
call `readConfiguration(integrationId)` for a plugin configuration reference. The
|
|
179
|
+
host binds this method to the installed plugin scope, independently of HTTP request
|
|
180
|
+
headers and later mutations to the plugin context.
|
|
181
|
+
|
|
182
|
+
- System plugins can read tenant-level integrations in the Default tenant.
|
|
183
|
+
- Tenant plugins can read tenant-level integrations in their owning tenant.
|
|
184
|
+
- Organization plugins can read integrations in their own organization or inherited
|
|
185
|
+
tenant-level integrations, within the same tenant.
|
|
186
|
+
- The declared `integration.service`, `operations` and optional ID `scope` constrain
|
|
187
|
+
this read. An explicit `service: '*'` permits any provider in the allowed scope.
|
|
188
|
+
- Missing scope, disallowed references and deleted integrations return `null`.
|
|
189
|
+
|
|
190
|
+
The method is optional for source compatibility with existing capability mocks and
|
|
191
|
+
older hosts. Plugins that require it must detect its absence and report unavailable;
|
|
192
|
+
do not fall back to the legacy runtime lookup for configuration references.
|
|
193
|
+
|
|
194
|
+
`read(id, options)`, `readForConnector`, listing and webhook credential methods retain
|
|
195
|
+
their existing contracts. Runtime integrations such as multi-tenant callback handlers
|
|
196
|
+
continue to enforce their existing signature and actor authorization. This addition
|
|
197
|
+
does not change those callback APIs or require existing plugins to adopt a new method.
|
|
@@ -319,6 +319,45 @@ Rules:
|
|
|
319
319
|
- If the command handler is missing or unavailable, the host should return a structured unsupported result so the remote component can fall back to a backend action.
|
|
320
320
|
- Provider code must continue to work without client commands; they are an optional host enhancement.
|
|
321
321
|
|
|
322
|
+
### Workspace Connector authorization
|
|
323
|
+
|
|
324
|
+
Declare `workspace.connector.connect` in `manifest.clientCommands` to open the
|
|
325
|
+
host-owned connection dialog for the current Assistant's workspace. Import
|
|
326
|
+
`WorkspaceConnectorConnectPayload` and `workspaceConnectorConnectPayloadSchema`
|
|
327
|
+
from `@xpert-ai/contracts` for its payload contract:
|
|
328
|
+
|
|
329
|
+
```ts
|
|
330
|
+
const payload: WorkspaceConnectorConnectPayload = {
|
|
331
|
+
provider: 'example',
|
|
332
|
+
authMethodId: 'app-oauth',
|
|
333
|
+
integrationId: '00000000-0000-4000-8000-000000000001'
|
|
334
|
+
}
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
`provider` is required. `authMethodId` optionally restricts authorization to one
|
|
338
|
+
non-deprecated method declared by that Connector. `integrationId` optionally pins
|
|
339
|
+
an existing system integration and requires `authMethodId`. The selected method
|
|
340
|
+
must declare `appCredentials.integration` for OAuth or `credentials.integration`
|
|
341
|
+
for API key authorization. A provider-only request keeps the normal Connector
|
|
342
|
+
method selection flow.
|
|
343
|
+
|
|
344
|
+
The host resolves the workspace from the active Assistant, checks management
|
|
345
|
+
permission, and verifies the integration against the selected method's authorized
|
|
346
|
+
integration options. It pins both constraints in the dialog and refuses to replace
|
|
347
|
+
an active or pending shared connection that uses another method or integration.
|
|
348
|
+
The dialog rechecks the binding when loading. The plugin supplies its provider's
|
|
349
|
+
policy; the host applies these generic declared capabilities without provider-name
|
|
350
|
+
branches. Credentials, workspace IDs and tenant IDs must not be supplied in the
|
|
351
|
+
payload.
|
|
352
|
+
|
|
353
|
+
The command returns `{ success: true, data: { status: 'connected' | 'cancelled' } }`
|
|
354
|
+
or a failure with a generic `code`, including
|
|
355
|
+
`connector_auth_method_unavailable`, `connector_integration_unsupported`,
|
|
356
|
+
`connector_integration_unavailable`, and `connector_connection_mismatch`.
|
|
357
|
+
Plugins may translate those codes into provider-specific guidance. Host context,
|
|
358
|
+
management-permission and legacy personal-binding migration checks still apply;
|
|
359
|
+
a client command never grants access on its own.
|
|
360
|
+
|
|
322
361
|
## File Action Rules
|
|
323
362
|
|
|
324
363
|
File actions use multipart transport end to end.
|
package/index.cjs.js
CHANGED
|
@@ -1881,7 +1881,7 @@ exports.DBTableDataAction = void 0;
|
|
|
1881
1881
|
DBTableDataAction["BULK_INSERT"] = "bulkInsert";
|
|
1882
1882
|
})(exports.DBTableDataAction || (exports.DBTableDataAction = {}));
|
|
1883
1883
|
|
|
1884
|
-
const AnalyticsRuntimeCapability = modelProvider.createRuntimeCapability('platform.
|
|
1884
|
+
const AnalyticsRuntimeCapability = modelProvider.createRuntimeCapability('platform.analytics', {
|
|
1885
1885
|
description: 'Execute scoped read-only provider queries and validate their dataset contracts.'
|
|
1886
1886
|
});
|
|
1887
1887
|
|
|
@@ -1928,6 +1928,33 @@ exports.AnalyticsProviderRegistry = __decorate([
|
|
|
1928
1928
|
}
|
|
1929
1929
|
}
|
|
1930
1930
|
|
|
1931
|
+
/** Host resource owners enumerate sources using the current viewer's ACLs. */ class ListAnalyticsSourcesCommand extends cqrs.Command {
|
|
1932
|
+
constructor(actor, kind){
|
|
1933
|
+
super();
|
|
1934
|
+
this.actor = actor;
|
|
1935
|
+
this.kind = kind;
|
|
1936
|
+
}
|
|
1937
|
+
}
|
|
1938
|
+
ListAnalyticsSourcesCommand.type = '[Analytics] List native sources';
|
|
1939
|
+
/** Authorize an exact immutable version; the owner also supplies the post-execution ACL/integrity recheck. */ class ResolveAnalyticsSourceCommand extends cqrs.Command {
|
|
1940
|
+
constructor(actor, source){
|
|
1941
|
+
super();
|
|
1942
|
+
this.actor = actor;
|
|
1943
|
+
this.source = source;
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
ResolveAnalyticsSourceCommand.type = '[Analytics] Resolve native source';
|
|
1947
|
+
Reflect.defineMetadata('__command__', {
|
|
1948
|
+
id: ListAnalyticsSourcesCommand.type
|
|
1949
|
+
}, ListAnalyticsSourcesCommand);
|
|
1950
|
+
Reflect.defineMetadata('__command__', {
|
|
1951
|
+
id: ResolveAnalyticsSourceCommand.type
|
|
1952
|
+
}, ResolveAnalyticsSourceCommand);
|
|
1953
|
+
|
|
1954
|
+
/** Separate from the read-only analytics query capability. No HTTP or model-supplied actor scope. */ const AnalyticsDefinitionAuthoringCapability = modelProvider.createRuntimeCapability('platform.analytics.definitions', {
|
|
1955
|
+
description: 'Discover authorized inputs and register immutable Agent-generated analytics definitions.'
|
|
1956
|
+
});
|
|
1957
|
+
|
|
1931
1958
|
const AI_MODEL_PROVIDER = 'AI_MODEL_PROVIDER';
|
|
1932
1959
|
function AIModelProviderStrategy(provider) {
|
|
1933
1960
|
var _err_stack;
|
|
@@ -10760,14 +10787,19 @@ exports.requireReadStatement = dataWorkbench.requireReadStatement;
|
|
|
10760
10787
|
exports.splitWorkbenchSql = dataWorkbench.splitWorkbenchSql;
|
|
10761
10788
|
exports.analyticsBindingObjectSchema = analyticsResult.analyticsBindingObjectSchema;
|
|
10762
10789
|
exports.analyticsBindingSchema = analyticsResult.analyticsBindingSchema;
|
|
10790
|
+
exports.analyticsControlsSchema = analyticsResult.analyticsControlsSchema;
|
|
10791
|
+
exports.analyticsDiscoveryRequestObjectSchema = analyticsResult.analyticsDiscoveryRequestObjectSchema;
|
|
10763
10792
|
exports.analyticsDiscoveryRequestSchema = analyticsResult.analyticsDiscoveryRequestSchema;
|
|
10764
10793
|
exports.analyticsDiscoveryResultSchema = analyticsResult.analyticsDiscoveryResultSchema;
|
|
10765
10794
|
exports.analyticsFieldSchema = analyticsResult.analyticsFieldSchema;
|
|
10766
10795
|
exports.analyticsOptionsSchema = analyticsResult.analyticsOptionsSchema;
|
|
10767
10796
|
exports.analyticsParameterSchema = analyticsResult.analyticsParameterSchema;
|
|
10768
10797
|
exports.analyticsQueryRequestSchema = analyticsResult.analyticsQueryRequestSchema;
|
|
10798
|
+
exports.analyticsSourceKey = analyticsResult.analyticsSourceKey;
|
|
10799
|
+
exports.analyticsSourceRefSchema = analyticsResult.analyticsSourceRefSchema;
|
|
10769
10800
|
exports.normalizeAnalyticsResult = analyticsResult.normalizeAnalyticsResult;
|
|
10770
10801
|
exports.resolveAnalyticsParameters = analyticsResult.resolveAnalyticsParameters;
|
|
10802
|
+
exports.validateAnalyticsBinding = analyticsResult.validateAnalyticsBinding;
|
|
10771
10803
|
exports.ModelProviderHttpClient = modelProviderHttpClient.ModelProviderHttpClient;
|
|
10772
10804
|
exports.ModelProviderHttpError = modelProviderHttpClient.ModelProviderHttpError;
|
|
10773
10805
|
exports.AGENT_TASK_RESULTS_FEATURE = results.AGENT_TASK_RESULTS_FEATURE;
|
|
@@ -10804,6 +10836,7 @@ exports.AgentMiddlewareStrategy = AgentMiddlewareStrategy;
|
|
|
10804
10836
|
exports.AgentRuntimeFactoryCapability = AgentRuntimeFactoryCapability;
|
|
10805
10837
|
exports.AgentRuntimeStrategy = AgentRuntimeStrategy;
|
|
10806
10838
|
exports.AiModelNotFoundException = AiModelNotFoundException;
|
|
10839
|
+
exports.AnalyticsDefinitionAuthoringCapability = AnalyticsDefinitionAuthoringCapability;
|
|
10807
10840
|
exports.AnalyticsProvider = AnalyticsProvider;
|
|
10808
10841
|
exports.AnalyticsRuntimeCapability = AnalyticsRuntimeCapability;
|
|
10809
10842
|
exports.ArtifactPresentationProvider = ArtifactPresentationProvider;
|
|
@@ -10890,6 +10923,7 @@ exports.KnowledgebaseProvisioningRuntimeCapability = KnowledgebaseProvisioningRu
|
|
|
10890
10923
|
exports.KnowledgebaseRuntimeCapability = KnowledgebaseRuntimeCapability;
|
|
10891
10924
|
exports.LLMUsage = LLMUsage;
|
|
10892
10925
|
exports.LargeLanguageModel = LargeLanguageModel;
|
|
10926
|
+
exports.ListAnalyticsSourcesCommand = ListAnalyticsSourcesCommand;
|
|
10893
10927
|
exports.MANAGED_CONNECTION_REGISTRY_TOKEN = MANAGED_CONNECTION_REGISTRY_TOKEN;
|
|
10894
10928
|
exports.MANAGED_QUEUE_HANDLER_REGISTRY_TOKEN = MANAGED_QUEUE_HANDLER_REGISTRY_TOKEN;
|
|
10895
10929
|
exports.MANAGED_QUEUE_SERVICE_TOKEN = MANAGED_QUEUE_SERVICE_TOKEN;
|
|
@@ -10940,6 +10974,7 @@ exports.RETRIEVER_STRATEGY = RETRIEVER_STRATEGY;
|
|
|
10940
10974
|
exports.RequestContext = RequestContext;
|
|
10941
10975
|
exports.RequirePermissionOperation = RequirePermissionOperation;
|
|
10942
10976
|
exports.RerankModel = RerankModel;
|
|
10977
|
+
exports.ResolveAnalyticsSourceCommand = ResolveAnalyticsSourceCommand;
|
|
10943
10978
|
exports.ResolveConnectorIntegrationQuery = ResolveConnectorIntegrationQuery;
|
|
10944
10979
|
exports.ResourceCardProvider = ResourceCardProvider;
|
|
10945
10980
|
exports.RetrieverStrategy = RetrieverStrategy;
|
package/index.esm.js
CHANGED
|
@@ -29,7 +29,7 @@ import Ajv from 'ajv';
|
|
|
29
29
|
import schemaDraft04 from 'ajv/dist/refs/json-schema-draft-06.json';
|
|
30
30
|
import * as _axios from 'axios';
|
|
31
31
|
export { DataSourceRuntimeCapability, SqlDatabaseWorkbenchAdapter, quoteDatabaseIdentifier, requireReadStatement, splitWorkbenchSql } from './data-workbench.esm.js';
|
|
32
|
-
export { a as analyticsBindingObjectSchema, b as analyticsBindingSchema, c as
|
|
32
|
+
export { a as analyticsBindingObjectSchema, b as analyticsBindingSchema, c as analyticsControlsSchema, d as analyticsDiscoveryRequestObjectSchema, e as analyticsDiscoveryRequestSchema, f as analyticsDiscoveryResultSchema, g as analyticsFieldSchema, h as analyticsOptionsSchema, i as analyticsParameterSchema, j as analyticsQueryRequestSchema, k as analyticsSourceKey, l as analyticsSourceRefSchema, n as normalizeAnalyticsResult, r as resolveAnalyticsParameters, v as validateAnalyticsBinding } from './analytics-result.esm.js';
|
|
33
33
|
import { BaseCallbackHandler } from '@langchain/core/callbacks/base';
|
|
34
34
|
import { ChatGenerationChunk } from '@langchain/core/outputs';
|
|
35
35
|
import { isBaseMessage, isAIMessage, isAIMessageChunk, AIMessage } from '@langchain/core/messages';
|
|
@@ -1863,7 +1863,7 @@ var DBTableDataAction;
|
|
|
1863
1863
|
DBTableDataAction["BULK_INSERT"] = "bulkInsert";
|
|
1864
1864
|
})(DBTableDataAction || (DBTableDataAction = {}));
|
|
1865
1865
|
|
|
1866
|
-
const AnalyticsRuntimeCapability = createRuntimeCapability('platform.
|
|
1866
|
+
const AnalyticsRuntimeCapability = createRuntimeCapability('platform.analytics', {
|
|
1867
1867
|
description: 'Execute scoped read-only provider queries and validate their dataset contracts.'
|
|
1868
1868
|
});
|
|
1869
1869
|
|
|
@@ -1910,6 +1910,33 @@ AnalyticsProviderRegistry = __decorate([
|
|
|
1910
1910
|
}
|
|
1911
1911
|
}
|
|
1912
1912
|
|
|
1913
|
+
/** Host resource owners enumerate sources using the current viewer's ACLs. */ class ListAnalyticsSourcesCommand extends Command {
|
|
1914
|
+
constructor(actor, kind){
|
|
1915
|
+
super();
|
|
1916
|
+
this.actor = actor;
|
|
1917
|
+
this.kind = kind;
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
ListAnalyticsSourcesCommand.type = '[Analytics] List native sources';
|
|
1921
|
+
/** Authorize an exact immutable version; the owner also supplies the post-execution ACL/integrity recheck. */ class ResolveAnalyticsSourceCommand extends Command {
|
|
1922
|
+
constructor(actor, source){
|
|
1923
|
+
super();
|
|
1924
|
+
this.actor = actor;
|
|
1925
|
+
this.source = source;
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
ResolveAnalyticsSourceCommand.type = '[Analytics] Resolve native source';
|
|
1929
|
+
Reflect.defineMetadata('__command__', {
|
|
1930
|
+
id: ListAnalyticsSourcesCommand.type
|
|
1931
|
+
}, ListAnalyticsSourcesCommand);
|
|
1932
|
+
Reflect.defineMetadata('__command__', {
|
|
1933
|
+
id: ResolveAnalyticsSourceCommand.type
|
|
1934
|
+
}, ResolveAnalyticsSourceCommand);
|
|
1935
|
+
|
|
1936
|
+
/** Separate from the read-only analytics query capability. No HTTP or model-supplied actor scope. */ const AnalyticsDefinitionAuthoringCapability = createRuntimeCapability('platform.analytics.definitions', {
|
|
1937
|
+
description: 'Discover authorized inputs and register immutable Agent-generated analytics definitions.'
|
|
1938
|
+
});
|
|
1939
|
+
|
|
1913
1940
|
const AI_MODEL_PROVIDER = 'AI_MODEL_PROVIDER';
|
|
1914
1941
|
function AIModelProviderStrategy(provider) {
|
|
1915
1942
|
var _err_stack;
|
|
@@ -10669,4 +10696,4 @@ Reflect.defineMetadata('__command__', {
|
|
|
10669
10696
|
id: ImportDefaultAgentPluginsCommand.type
|
|
10670
10697
|
}, ImportDefaultAgentPluginsCommand);
|
|
10671
10698
|
|
|
10672
|
-
export { ACCOUNT_BINDING_PERMISSION_SERVICE_TOKEN, AGENT_CHAT_DISPATCH_ERROR_STEER_TARGET_NOT_RUNNING, AGENT_CHAT_DISPATCH_MESSAGE_TYPE, AGENT_MIDDLEWARE_STRATEGY, AGENT_RUNTIME_EVENT_MESSAGE_TYPE, AGENT_RUNTIME_STRATEGY, AIModel, AIModelProviderNotFoundException, AIModelProviderRegistry, AIModelProviderStrategy, AI_MODEL_PROVIDER, ANALYTICS_PROVIDER, ARTIFACT_PRESENTATION_PROVIDER, ASSISTANT_CAPABILITY_PROVIDER, AdapterDataSourceStrategy, AgentExecutionRunnerCapability, AgentExecutionRunnerFactoryCapability, AgentInvocationRuntimeCapability, AgentMiddlewareRegistry, AgentMiddlewareStrategy, AgentRuntimeFactoryCapability, AgentRuntimeRegistry, AgentRuntimeStrategy, AiModelNotFoundException, AnalyticsProvider, AnalyticsProviderRegistry, AnalyticsRuntimeCapability, ArtifactPresentationProvider, ArtifactPresentationRegistry, AssistantCapabilityProvider, AssistantCapabilityProviderRegistry, AssistantTaskRuntimeCapability, BOUND_IDENTITY_LOGIN_PERMISSION_SERVICE_TOKEN, BUILTIN_GLOBAL_SCOPE, BaseHTTPQueryRunner, BaseQueryRunner, BaseSQLQueryRunner, BaseSandbox, BaseStrategyRegistry, BuiltinToolset, CHAT_CHANNEL, CHAT_CHANNEL_TEXT_LIMITS, CLI_MODEL_TOKEN_REFERENCE, COLLABORATION_DOCUMENT_PROVIDER, CONNECTION_COMMAND_ROUTER_TOKEN, CONNECTOR_STRATEGY, CancelConversationCommand, ChatChannel, ChatChannelRegistry, ChatOAICompatReasoningModel, CliModelProfilesCapability, CollaborationDocumentProvider, CollaborationDocumentProviderRegistry, CollaborationRuntimeCapability, CommonParameterRules, ConnectorRuntimeCapability, ConnectorRuntimeFactoryCapability, ConnectorStrategyKey, ConnectorStrategyRegistry, CreateModelClientCommand, CredentialsValidateFailedError, DATASOURCE_STRATEGY, DBCreateTableMode, DBProtocolEnum, DBSyntaxEnum, DBTableAction, DBTableDataAction, DEFAULT_EXECUTION_CONFIG, DEFAULT_SANDBOX_EXECUTION_MAX_OUTPUT_BYTES, DEFAULT_SANDBOX_FILE_OPERATION_EXECUTION_OPTIONS, DEFAULT_SANDBOX_FILE_OPERATION_TIMEOUT_MS, DEFAULT_SANDBOX_FILE_OPERATION_TIMEOUT_SEC, DEFAULT_SANDBOX_FILE_SEARCH_EXECUTION_OPTIONS, DEFAULT_SANDBOX_FILE_SEARCH_TIMEOUT_MS, DEFAULT_SANDBOX_FILE_SEARCH_TIMEOUT_SEC, DEFAULT_SANDBOX_SHELL_EXECUTION_OPTIONS, DEFAULT_SANDBOX_SHELL_TIMEOUT_MS, DEFAULT_SANDBOX_SHELL_TIMEOUT_SEC, DOCUMENT_SOURCE_STRATEGY, DOCUMENT_TRANSFORMER_STRATEGY, DataSourceStrategy, DataSourceStrategyRegistry, DecoratedAgentMiddlewareStrategy, DecoratedToolsetStrategy, DocumentSourceRegistry, DocumentSourceStrategy, DocumentTransformerRegistry, DocumentTransformerStrategy, EVOLUTION_RUNTIME_SERVICE_TOKEN, EVOLUTION_TARGET_PROVIDER, EvolutionBaselineRuntimeCapability, EvolutionChangeRuntimeCapability, EvolutionRuntimeCapability, EvolutionTargetProviderRegistry, EvolutionTargetProviderStrategy, FILE_STORAGE_PROVIDER, FILE_UPLOAD_TARGET_STRATEGY, FileRuntimeCapability, FileStorageProvider, FileStorageProviderRegistry, FileUploadTargetRegistry, FileUploadTargetStrategy, GLOBAL_ORGANIZATION_SCOPE, HANDOFF_PERMISSION_SERVICE_TOKEN, HANDOFF_PROCESSOR_STRATEGY, HANDOFF_QUEUE_SERVICE_TOKEN, HandoffProcessorRegistry, HandoffProcessorStrategy, IMAGE_UNDERSTANDING_STRATEGY, INTEGRATION_PERMISSION_SERVICE_TOKEN, INTEGRATION_STRATEGY, ImageGenerationModel, ImageUnderstandingRegistry, ImageUnderstandingStrategy, ImportDefaultAgentPluginsCommand, IntegrationStrategyKey, IntegrationStrategyRegistry, JUMP_TO_TARGETS, JsonSchemaValidator, KEYWORD_ANALYZER_STRATEGY, KNOWLEDGE_STRATEGY, KeywordAnalyzerRegistry, KeywordAnalyzerStrategy, KnowledgeDocumentVisualAssetsRuntimeCapability, KnowledgeDocumentVisualAssetsRuntimeFactoryCapability, KnowledgeGraphRuntimeCapability, KnowledgeStrategyKey, KnowledgeStrategyRegistry, KnowledgebaseDocumentsRuntimeCapability, KnowledgebaseProvisioningRuntimeCapability, KnowledgebaseRuntimeCapability, LLMUsage, LargeLanguageModel, MANAGED_CONNECTION_REGISTRY_TOKEN, MANAGED_QUEUE_HANDLER_REGISTRY_TOKEN, MANAGED_QUEUE_SERVICE_TOKEN, MCP_CAPABILITY_CHANGE_EVENT_TYPES, MODEL_OUTPUT_VALIDATION_ERROR_CODE, ModelExecutionEnvironmentCapability, ModelOutputValidationError, ModelProvider, ORGANIZATION_METADATA_KEY, OpenAICompatibleReranker, PERMISSION_OPERATION_METADATA_KEY, PLUGIN_CONFIG_RESOLVER_TOKEN, PLUGIN_JOB_PROCESSOR_METADATA, PLUGIN_METADATA, PLUGIN_METADATA_KEY, PLUGIN_VERSION_METADATA_KEY, PLUGIN_WEBHOOK_AUTH_METADATA_KEY, PLUGIN_WEBHOOK_AUTH_SERVICE_TOKEN, PROJECT_PIPELINE_CONTRIBUTION, PROJECT_PIPELINE_PROJECTION_PROVIDER, PROJECT_PIPELINE_RUNTIME_ADAPTER, PROJECT_TASK_PROVIDER, PROJECT_TYPE_PROVIDER, PROVIDE_AI_MODEL_LLM, PROVIDE_AI_MODEL_MODERATION, PROVIDE_AI_MODEL_RERANK, PROVIDE_AI_MODEL_SPEECH2TEXT, PROVIDE_AI_MODEL_TEXT_EMBEDDING, PROVIDE_AI_MODEL_TTS, PluginJobProcessor, PluginWebhookAuth, PluginWebhookAuthGuard, ProjectPipelineAnalyticsRuntimeCapability, ProjectPipelineCatalogRuntimeCapability, ProjectPipelineCommandsRuntimeCapability, ProjectPipelineConfigurationRuntimeCapability, ProjectPipelineContributionRegistry, ProjectPipelineContributor, ProjectPipelineEvidenceRuntimeCapability, ProjectPipelinePortfolioRuntimeCapability, ProjectPipelineProjectionProvider, ProjectPipelineProjectionProviderRegistry, ProjectPipelineProviderActionsRuntimeCapability, ProjectPipelineRuntimeAdapterProvider, ProjectPipelineRuntimeAdapterRegistry, ProjectPipelinesRuntimeCapability, ProjectTaskProvider, ProjectTaskProviderRegistry, ProjectTasksRuntimeCapability, ProjectTypeProvider, ProjectTypeProviderRegistry, RESOURCE_CARD_EVENT, RESOURCE_CARD_PROVIDER, RETRIEVER_STRATEGY, RequestContext, RequestContextMiddleware, RequirePermissionOperation, RerankModel, ResolveConnectorIntegrationQuery, ResourceCardProvider, ResourceCardProviderRegistry, RetrieverRegistry, RetrieverStrategy, SANDBOX_PROVIDER, SANDBOX_RUNTIME_PROVIDER, SANDBOX_SHELL_TIMEOUT_LIMITS_SEC, SANDBOX_WORKSPACE_MAPPER, SKILL_SOURCE_PROVIDER, SPEECH_TO_TEXT_PERMISSION_SERVICE_TOKEN, SPEECH_TO_TEXT_SERVICE_TOKEN, SSOProviderRegistry, SSOProviderStrategyKey, SSO_BINDING_PERMISSION_SERVICE_TOKEN, SSO_PROVIDER, STRATEGY_META_KEY, SYSTEM_GLOBAL_SCOPE, SandboxProviderRegistry, SandboxProviderStrategy, SandboxRuntimeProviderRegistry, SandboxRuntimeProviderStrategy, SandboxWorkspaceMapperRegistry, SandboxWorkspaceMapperStrategy, ShellModelExecutionSourceCapability, SkillSourceProviderRegistry, SkillSourceProviderStrategy, Speech2TextChatModel, SpeechToTextModel, StrategyBus, TENANT_GLOBAL_SCOPE_PREFIX, TENANT_GLOBAL_SCOPE_SUFFIX, TEXT_SPLITTER_STRATEGY, TOOLSET_STRATEGY, TextEmbeddingModelManager, TextSplitterRegistry, TextSplitterStrategy, TextToSpeechModel, ToolsetRegistry, ToolsetStrategy, USER_PERMISSION_SERVICE_TOKEN, VECTOR_STORE_STRATEGY, VIDEO_GENERATION_PERMISSION_SERVICE_TOKEN, VIDEO_GENERATION_SERVICE_TOKEN, VIDEO_GENERATOR_FAMILIES, VIEW_EXTENSION_CACHE_SERVICE_TOKEN, VIEW_EXTENSION_PROVIDER, VectorStoreRegistry, VectorStoreStrategy, VideoGenerationModel, ViewExtensionProvider, ViewExtensionProviderRegistry, ViewMiddlewareRuntimeCapability, WORKFLOW_NODE_STRATEGY, WORKFLOW_TRIGGER_STRATEGY, WorkflowNodeRegistry, WorkflowNodeStrategy, WorkflowTriggerRegistry, WorkflowTriggerStrategy, WorkspaceFilesRuntimeCapability, WrapWorkflowNodeExecutionCommand, XPERT_AGENT_MIDDLEWARE_RUNTIME_TOKEN, XPERT_TOOL_METHOD_METADATA, XPERT_TOOL_PROVIDER, XPERT_TOOL_PROVIDER_METADATA, XPERT_TOOL_RESULT_FORMAT_VERSION, XpFileSystem, XpertPrompt, XpertResource, XpertResourceTemplate, XpertServerPlugin, XpertTool, XpertToolProvider, XpertToolProviderCoordinator, XpertToolProviderRegistry, agentInvocationDispatchContextSchema, agentRuntimeConsumptionStateSchema, agentRuntimeDeliveryStateSchema, agentRuntimeEventMessageId, agentRuntimeEventSchema, agentRuntimeReplyTargetSchema, agentRuntimeResultClaimSchema, agentRuntimeResultConsumptionKey, als, appendSandboxMessage, applyModelConfiguration, applyModelContextSize, artifactPresentationKey, assertConnectorDefinition, buildSandboxTimeoutMessage, calcTokenUsage, calculateLLMUsagePrice, calculateModelPrice, calculateModelUsageCharge, chunkText, countTextTokens, countTokensSafe, createI18nInstance, createMutationEvidence, createPluginLogger, createRuntimeCapability, defineAgentMessageType, defineChannelMessageType, defineMcpApp, defineMcpCapabilities, defineMcpPrompt, defineMcpResource, defineMcpResourceTemplate, defineXpertTool, derivePluginArtifactNamespace, describeXpertToolProvider, discoverOpenAIModels, downloadRemoteFile, emitResourceCard, formatSandboxTimeout, getDefaultTenantId, getErrorMessage, getModelContextSize, getPermissionOperationMetadata, getPositionList, getPositionMap, getRequestContext, getRequiredPermissionOperation, getTenantGlobalScopeKey, getXpertToolMethod, isAgentInvocationTerminal, isDevelopmentSandboxRuntimeEnvironment, isModelOutputValidationError, isModelUsagePricingConfig, isPluginArtifactNamespace, isRemoteFile, isSandboxBackend, isSandboxManagedServiceAdapter, isSandboxServiceProxyAdapter, isSandboxTerminalAdapter, isStrategyInstance, isStructuredMessageType, isTenantGlobalScopeKey, jsonEncodedSchema, knowledgebaseActions, loadYamlFile, mergeCredentials, mergeModelRequirements, mergeParentChildChunks, nativeModelTransport, normalizeContextSize, normalizeTokenUsage, pluginArtifactTableName, prepareToolResult, processAsyncAIGCManagedJob, projectPipelineInvocationScopeSchema, renderRemoteModuleIframeHtml, renderRemoteReactIframeHtml, renderRemoteVueIframeHtml, resolveModelUsagePricingSnapshot, resolveSandboxBackend, resolveSandboxExecutionOptions, resolveSandboxManagedServiceAdapter, resolveSandboxServiceProxyAdapter, resolveSandboxTerminalAdapter, resolveStrategyMetadataTarget, resolveTenantGlobalScopeKey, resolveTokenUsage, resolveTokenUsageCandidates, resolveXpertMcpExtensions, runWithRequestContext, runtimeToolProviderComponent, secondsToMilliseconds, setDefaultTenantId, sumTokenUsage, taskWaitReason, textTokenBoundaries, validateAnalyticsPayload };
|
|
10699
|
+
export { ACCOUNT_BINDING_PERMISSION_SERVICE_TOKEN, AGENT_CHAT_DISPATCH_ERROR_STEER_TARGET_NOT_RUNNING, AGENT_CHAT_DISPATCH_MESSAGE_TYPE, AGENT_MIDDLEWARE_STRATEGY, AGENT_RUNTIME_EVENT_MESSAGE_TYPE, AGENT_RUNTIME_STRATEGY, AIModel, AIModelProviderNotFoundException, AIModelProviderRegistry, AIModelProviderStrategy, AI_MODEL_PROVIDER, ANALYTICS_PROVIDER, ARTIFACT_PRESENTATION_PROVIDER, ASSISTANT_CAPABILITY_PROVIDER, AdapterDataSourceStrategy, AgentExecutionRunnerCapability, AgentExecutionRunnerFactoryCapability, AgentInvocationRuntimeCapability, AgentMiddlewareRegistry, AgentMiddlewareStrategy, AgentRuntimeFactoryCapability, AgentRuntimeRegistry, AgentRuntimeStrategy, AiModelNotFoundException, AnalyticsDefinitionAuthoringCapability, AnalyticsProvider, AnalyticsProviderRegistry, AnalyticsRuntimeCapability, ArtifactPresentationProvider, ArtifactPresentationRegistry, AssistantCapabilityProvider, AssistantCapabilityProviderRegistry, AssistantTaskRuntimeCapability, BOUND_IDENTITY_LOGIN_PERMISSION_SERVICE_TOKEN, BUILTIN_GLOBAL_SCOPE, BaseHTTPQueryRunner, BaseQueryRunner, BaseSQLQueryRunner, BaseSandbox, BaseStrategyRegistry, BuiltinToolset, CHAT_CHANNEL, CHAT_CHANNEL_TEXT_LIMITS, CLI_MODEL_TOKEN_REFERENCE, COLLABORATION_DOCUMENT_PROVIDER, CONNECTION_COMMAND_ROUTER_TOKEN, CONNECTOR_STRATEGY, CancelConversationCommand, ChatChannel, ChatChannelRegistry, ChatOAICompatReasoningModel, CliModelProfilesCapability, CollaborationDocumentProvider, CollaborationDocumentProviderRegistry, CollaborationRuntimeCapability, CommonParameterRules, ConnectorRuntimeCapability, ConnectorRuntimeFactoryCapability, ConnectorStrategyKey, ConnectorStrategyRegistry, CreateModelClientCommand, CredentialsValidateFailedError, DATASOURCE_STRATEGY, DBCreateTableMode, DBProtocolEnum, DBSyntaxEnum, DBTableAction, DBTableDataAction, DEFAULT_EXECUTION_CONFIG, DEFAULT_SANDBOX_EXECUTION_MAX_OUTPUT_BYTES, DEFAULT_SANDBOX_FILE_OPERATION_EXECUTION_OPTIONS, DEFAULT_SANDBOX_FILE_OPERATION_TIMEOUT_MS, DEFAULT_SANDBOX_FILE_OPERATION_TIMEOUT_SEC, DEFAULT_SANDBOX_FILE_SEARCH_EXECUTION_OPTIONS, DEFAULT_SANDBOX_FILE_SEARCH_TIMEOUT_MS, DEFAULT_SANDBOX_FILE_SEARCH_TIMEOUT_SEC, DEFAULT_SANDBOX_SHELL_EXECUTION_OPTIONS, DEFAULT_SANDBOX_SHELL_TIMEOUT_MS, DEFAULT_SANDBOX_SHELL_TIMEOUT_SEC, DOCUMENT_SOURCE_STRATEGY, DOCUMENT_TRANSFORMER_STRATEGY, DataSourceStrategy, DataSourceStrategyRegistry, DecoratedAgentMiddlewareStrategy, DecoratedToolsetStrategy, DocumentSourceRegistry, DocumentSourceStrategy, DocumentTransformerRegistry, DocumentTransformerStrategy, EVOLUTION_RUNTIME_SERVICE_TOKEN, EVOLUTION_TARGET_PROVIDER, EvolutionBaselineRuntimeCapability, EvolutionChangeRuntimeCapability, EvolutionRuntimeCapability, EvolutionTargetProviderRegistry, EvolutionTargetProviderStrategy, FILE_STORAGE_PROVIDER, FILE_UPLOAD_TARGET_STRATEGY, FileRuntimeCapability, FileStorageProvider, FileStorageProviderRegistry, FileUploadTargetRegistry, FileUploadTargetStrategy, GLOBAL_ORGANIZATION_SCOPE, HANDOFF_PERMISSION_SERVICE_TOKEN, HANDOFF_PROCESSOR_STRATEGY, HANDOFF_QUEUE_SERVICE_TOKEN, HandoffProcessorRegistry, HandoffProcessorStrategy, IMAGE_UNDERSTANDING_STRATEGY, INTEGRATION_PERMISSION_SERVICE_TOKEN, INTEGRATION_STRATEGY, ImageGenerationModel, ImageUnderstandingRegistry, ImageUnderstandingStrategy, ImportDefaultAgentPluginsCommand, IntegrationStrategyKey, IntegrationStrategyRegistry, JUMP_TO_TARGETS, JsonSchemaValidator, KEYWORD_ANALYZER_STRATEGY, KNOWLEDGE_STRATEGY, KeywordAnalyzerRegistry, KeywordAnalyzerStrategy, KnowledgeDocumentVisualAssetsRuntimeCapability, KnowledgeDocumentVisualAssetsRuntimeFactoryCapability, KnowledgeGraphRuntimeCapability, KnowledgeStrategyKey, KnowledgeStrategyRegistry, KnowledgebaseDocumentsRuntimeCapability, KnowledgebaseProvisioningRuntimeCapability, KnowledgebaseRuntimeCapability, LLMUsage, LargeLanguageModel, ListAnalyticsSourcesCommand, MANAGED_CONNECTION_REGISTRY_TOKEN, MANAGED_QUEUE_HANDLER_REGISTRY_TOKEN, MANAGED_QUEUE_SERVICE_TOKEN, MCP_CAPABILITY_CHANGE_EVENT_TYPES, MODEL_OUTPUT_VALIDATION_ERROR_CODE, ModelExecutionEnvironmentCapability, ModelOutputValidationError, ModelProvider, ORGANIZATION_METADATA_KEY, OpenAICompatibleReranker, PERMISSION_OPERATION_METADATA_KEY, PLUGIN_CONFIG_RESOLVER_TOKEN, PLUGIN_JOB_PROCESSOR_METADATA, PLUGIN_METADATA, PLUGIN_METADATA_KEY, PLUGIN_VERSION_METADATA_KEY, PLUGIN_WEBHOOK_AUTH_METADATA_KEY, PLUGIN_WEBHOOK_AUTH_SERVICE_TOKEN, PROJECT_PIPELINE_CONTRIBUTION, PROJECT_PIPELINE_PROJECTION_PROVIDER, PROJECT_PIPELINE_RUNTIME_ADAPTER, PROJECT_TASK_PROVIDER, PROJECT_TYPE_PROVIDER, PROVIDE_AI_MODEL_LLM, PROVIDE_AI_MODEL_MODERATION, PROVIDE_AI_MODEL_RERANK, PROVIDE_AI_MODEL_SPEECH2TEXT, PROVIDE_AI_MODEL_TEXT_EMBEDDING, PROVIDE_AI_MODEL_TTS, PluginJobProcessor, PluginWebhookAuth, PluginWebhookAuthGuard, ProjectPipelineAnalyticsRuntimeCapability, ProjectPipelineCatalogRuntimeCapability, ProjectPipelineCommandsRuntimeCapability, ProjectPipelineConfigurationRuntimeCapability, ProjectPipelineContributionRegistry, ProjectPipelineContributor, ProjectPipelineEvidenceRuntimeCapability, ProjectPipelinePortfolioRuntimeCapability, ProjectPipelineProjectionProvider, ProjectPipelineProjectionProviderRegistry, ProjectPipelineProviderActionsRuntimeCapability, ProjectPipelineRuntimeAdapterProvider, ProjectPipelineRuntimeAdapterRegistry, ProjectPipelinesRuntimeCapability, ProjectTaskProvider, ProjectTaskProviderRegistry, ProjectTasksRuntimeCapability, ProjectTypeProvider, ProjectTypeProviderRegistry, RESOURCE_CARD_EVENT, RESOURCE_CARD_PROVIDER, RETRIEVER_STRATEGY, RequestContext, RequestContextMiddleware, RequirePermissionOperation, RerankModel, ResolveAnalyticsSourceCommand, ResolveConnectorIntegrationQuery, ResourceCardProvider, ResourceCardProviderRegistry, RetrieverRegistry, RetrieverStrategy, SANDBOX_PROVIDER, SANDBOX_RUNTIME_PROVIDER, SANDBOX_SHELL_TIMEOUT_LIMITS_SEC, SANDBOX_WORKSPACE_MAPPER, SKILL_SOURCE_PROVIDER, SPEECH_TO_TEXT_PERMISSION_SERVICE_TOKEN, SPEECH_TO_TEXT_SERVICE_TOKEN, SSOProviderRegistry, SSOProviderStrategyKey, SSO_BINDING_PERMISSION_SERVICE_TOKEN, SSO_PROVIDER, STRATEGY_META_KEY, SYSTEM_GLOBAL_SCOPE, SandboxProviderRegistry, SandboxProviderStrategy, SandboxRuntimeProviderRegistry, SandboxRuntimeProviderStrategy, SandboxWorkspaceMapperRegistry, SandboxWorkspaceMapperStrategy, ShellModelExecutionSourceCapability, SkillSourceProviderRegistry, SkillSourceProviderStrategy, Speech2TextChatModel, SpeechToTextModel, StrategyBus, TENANT_GLOBAL_SCOPE_PREFIX, TENANT_GLOBAL_SCOPE_SUFFIX, TEXT_SPLITTER_STRATEGY, TOOLSET_STRATEGY, TextEmbeddingModelManager, TextSplitterRegistry, TextSplitterStrategy, TextToSpeechModel, ToolsetRegistry, ToolsetStrategy, USER_PERMISSION_SERVICE_TOKEN, VECTOR_STORE_STRATEGY, VIDEO_GENERATION_PERMISSION_SERVICE_TOKEN, VIDEO_GENERATION_SERVICE_TOKEN, VIDEO_GENERATOR_FAMILIES, VIEW_EXTENSION_CACHE_SERVICE_TOKEN, VIEW_EXTENSION_PROVIDER, VectorStoreRegistry, VectorStoreStrategy, VideoGenerationModel, ViewExtensionProvider, ViewExtensionProviderRegistry, ViewMiddlewareRuntimeCapability, WORKFLOW_NODE_STRATEGY, WORKFLOW_TRIGGER_STRATEGY, WorkflowNodeRegistry, WorkflowNodeStrategy, WorkflowTriggerRegistry, WorkflowTriggerStrategy, WorkspaceFilesRuntimeCapability, WrapWorkflowNodeExecutionCommand, XPERT_AGENT_MIDDLEWARE_RUNTIME_TOKEN, XPERT_TOOL_METHOD_METADATA, XPERT_TOOL_PROVIDER, XPERT_TOOL_PROVIDER_METADATA, XPERT_TOOL_RESULT_FORMAT_VERSION, XpFileSystem, XpertPrompt, XpertResource, XpertResourceTemplate, XpertServerPlugin, XpertTool, XpertToolProvider, XpertToolProviderCoordinator, XpertToolProviderRegistry, agentInvocationDispatchContextSchema, agentRuntimeConsumptionStateSchema, agentRuntimeDeliveryStateSchema, agentRuntimeEventMessageId, agentRuntimeEventSchema, agentRuntimeReplyTargetSchema, agentRuntimeResultClaimSchema, agentRuntimeResultConsumptionKey, als, appendSandboxMessage, applyModelConfiguration, applyModelContextSize, artifactPresentationKey, assertConnectorDefinition, buildSandboxTimeoutMessage, calcTokenUsage, calculateLLMUsagePrice, calculateModelPrice, calculateModelUsageCharge, chunkText, countTextTokens, countTokensSafe, createI18nInstance, createMutationEvidence, createPluginLogger, createRuntimeCapability, defineAgentMessageType, defineChannelMessageType, defineMcpApp, defineMcpCapabilities, defineMcpPrompt, defineMcpResource, defineMcpResourceTemplate, defineXpertTool, derivePluginArtifactNamespace, describeXpertToolProvider, discoverOpenAIModels, downloadRemoteFile, emitResourceCard, formatSandboxTimeout, getDefaultTenantId, getErrorMessage, getModelContextSize, getPermissionOperationMetadata, getPositionList, getPositionMap, getRequestContext, getRequiredPermissionOperation, getTenantGlobalScopeKey, getXpertToolMethod, isAgentInvocationTerminal, isDevelopmentSandboxRuntimeEnvironment, isModelOutputValidationError, isModelUsagePricingConfig, isPluginArtifactNamespace, isRemoteFile, isSandboxBackend, isSandboxManagedServiceAdapter, isSandboxServiceProxyAdapter, isSandboxTerminalAdapter, isStrategyInstance, isStructuredMessageType, isTenantGlobalScopeKey, jsonEncodedSchema, knowledgebaseActions, loadYamlFile, mergeCredentials, mergeModelRequirements, mergeParentChildChunks, nativeModelTransport, normalizeContextSize, normalizeTokenUsage, pluginArtifactTableName, prepareToolResult, processAsyncAIGCManagedJob, projectPipelineInvocationScopeSchema, renderRemoteModuleIframeHtml, renderRemoteReactIframeHtml, renderRemoteVueIframeHtml, resolveModelUsagePricingSnapshot, resolveSandboxBackend, resolveSandboxExecutionOptions, resolveSandboxManagedServiceAdapter, resolveSandboxServiceProxyAdapter, resolveSandboxTerminalAdapter, resolveStrategyMetadataTarget, resolveTenantGlobalScopeKey, resolveTokenUsage, resolveTokenUsageCandidates, resolveXpertMcpExtensions, runWithRequestContext, runtimeToolProviderComponent, secondsToMilliseconds, setDefaultTenantId, sumTokenUsage, taskWaitReason, textTokenBoundaries, validateAnalyticsPayload };
|
package/model-provider.cjs.js
CHANGED
|
@@ -215,6 +215,9 @@ const WorkspaceFilesRuntimeCapability = createRuntimeCapability('platform.worksp
|
|
|
215
215
|
'SANDBOX_VERSION_MISMATCH',
|
|
216
216
|
'SANDBOX_CAPACITY_UNAVAILABLE',
|
|
217
217
|
'SANDBOX_START_FAILED',
|
|
218
|
+
'SANDBOX_DEPENDENCY_MISSING',
|
|
219
|
+
'EXPORT_CONVERSION_FAILED',
|
|
220
|
+
'EXPORT_TEXT_EXTRACTION_FAILED',
|
|
218
221
|
'SANDBOX_INVOCATION_FAILED',
|
|
219
222
|
'BROWSER_LAUNCH_FAILED',
|
|
220
223
|
'EXPORT_TIMEOUT',
|
package/model-provider.esm.js
CHANGED
|
@@ -213,6 +213,9 @@ const WorkspaceFilesRuntimeCapability = createRuntimeCapability('platform.worksp
|
|
|
213
213
|
'SANDBOX_VERSION_MISMATCH',
|
|
214
214
|
'SANDBOX_CAPACITY_UNAVAILABLE',
|
|
215
215
|
'SANDBOX_START_FAILED',
|
|
216
|
+
'SANDBOX_DEPENDENCY_MISSING',
|
|
217
|
+
'EXPORT_CONVERSION_FAILED',
|
|
218
|
+
'EXPORT_TEXT_EXTRACTION_FAILED',
|
|
216
219
|
'SANDBOX_INVOCATION_FAILED',
|
|
217
220
|
'BROWSER_LAUNCH_FAILED',
|
|
218
221
|
'EXPORT_TIMEOUT',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xpert-ai/plugin-sdk",
|
|
3
|
-
"version": "3.26.
|
|
3
|
+
"version": "3.26.2",
|
|
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.26.
|
|
77
|
+
"@xpert-ai/contracts": "3.26.2",
|
|
78
78
|
"express": "^4.22.1",
|
|
79
79
|
"js-tiktoken": "^1.0.21"
|
|
80
80
|
},
|
|
@@ -31,5 +31,10 @@ export interface IAgentMiddlewareStrategy<T = unknown> {
|
|
|
31
31
|
meta: TAgentMiddlewareMeta;
|
|
32
32
|
/** Static Tool names exposed by this Middleware, for capability summaries without creating a runtime instance. */
|
|
33
33
|
getToolNames?(options: T): readonly string[];
|
|
34
|
+
/**
|
|
35
|
+
* The host defaults omitted options to {} in preview and runtime, including context.node.options.
|
|
36
|
+
* Explicit values (including null) remain subject to provider validation.
|
|
37
|
+
* Providers with optional configuration should also handle omission from legacy hosts.
|
|
38
|
+
*/
|
|
34
39
|
createMiddleware(options: T, context: IAgentMiddlewareContext): PromiseOrValue<AgentMiddleware>;
|
|
35
40
|
}
|
|
@@ -19,7 +19,7 @@ export interface CliModelConfigurationInput {
|
|
|
19
19
|
maxOutputTokens?: number;
|
|
20
20
|
};
|
|
21
21
|
managed: boolean;
|
|
22
|
-
/** Host-resolved
|
|
22
|
+
/** Host-resolved CLI approval policy; omitted preserves the profile's default behavior. */
|
|
23
23
|
permissionMode?: CliPermissionMode;
|
|
24
24
|
}
|
|
25
25
|
/** Installed trusted code; neither an executable path nor a model permission comes from this adapter. */
|
|
@@ -76,24 +76,24 @@ export declare const artifactDocumentDependencyAssets: z.ZodArray<z.ZodEffects<z
|
|
|
76
76
|
}, "strict", z.ZodTypeAny, {
|
|
77
77
|
id?: string;
|
|
78
78
|
version?: string;
|
|
79
|
+
source?: string;
|
|
79
80
|
format?: "classic-script";
|
|
80
81
|
global?: string;
|
|
81
82
|
sha256?: string;
|
|
82
|
-
source?: string;
|
|
83
83
|
}, {
|
|
84
84
|
id?: string;
|
|
85
85
|
version?: string;
|
|
86
|
+
source?: string;
|
|
86
87
|
format?: "classic-script";
|
|
87
88
|
global?: string;
|
|
88
89
|
sha256?: string;
|
|
89
|
-
source?: string;
|
|
90
90
|
}>, ArtifactDocumentDependencyAsset, {
|
|
91
91
|
id?: string;
|
|
92
92
|
version?: string;
|
|
93
|
+
source?: string;
|
|
93
94
|
format?: "classic-script";
|
|
94
95
|
global?: string;
|
|
95
96
|
sha256?: string;
|
|
96
|
-
source?: string;
|
|
97
97
|
}>, "many">;
|
|
98
98
|
/** Browser/server identical verification. Integrity is not authorization: the caller owns library admission. */
|
|
99
99
|
export declare function verifyArtifactDocumentDependencies(input: unknown, expected?: ArtifactDocumentDependencyLock[]): ArtifactDocumentDependencyAsset[];
|
|
@@ -68,11 +68,14 @@ export declare const INTEGRATION_PERMISSION_SERVICE_TOKEN = "XPERT_PLUGIN_INTEGR
|
|
|
68
68
|
* Read-only integration permission service exposed to plugins.
|
|
69
69
|
*/
|
|
70
70
|
export interface IntegrationPermissionService {
|
|
71
|
+
/** Read plugin configuration in its host-bound scope; system plugins use the Default tenant. */
|
|
72
|
+
readConfiguration?(id: string): Promise<IIntegration | null>;
|
|
71
73
|
/** Exact lookup for a connector whose actor and persisted scope have been authorized by the host. */
|
|
72
74
|
readForConnector?(id: string, provider: string, scope: {
|
|
73
75
|
tenantId: string;
|
|
74
76
|
organizationId: string | null;
|
|
75
77
|
}): Promise<IIntegration | null>;
|
|
78
|
+
/** Legacy runtime lookup for integrations with their own callback/actor authorization. */
|
|
76
79
|
read<TIntegration = IIntegration>(id: string, options?: Record<string, any>): Promise<TIntegration | null>;
|
|
77
80
|
findAll<TIntegration = IIntegration>(options?: Record<string, any>): Promise<IPagination<TIntegration>>;
|
|
78
81
|
findAllWithInheritance?<TIntegration = IIntegration>(options?: Record<string, any>): Promise<IPagination<TIntegration>>;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { AnalyticsVersionedSourceRef, JSONValue } from '@xpert-ai/contracts';
|
|
2
|
+
import type { DataSourceActor } from '../datasource/workbench';
|
|
3
|
+
import type { WorkspaceFilesApi } from '../../runtime/capabilities/workspace-files';
|
|
4
|
+
/** Captured by host middleware, never accepted from model arguments. */
|
|
5
|
+
export interface AnalyticsAuthoringScope {
|
|
6
|
+
actor: DataSourceActor;
|
|
7
|
+
workspaceId: string;
|
|
8
|
+
xpertId: string;
|
|
9
|
+
files: Pick<WorkspaceFilesApi, 'resolveRuntimeReference' | 'resolveFile' | 'readBuffer'>;
|
|
10
|
+
}
|
|
11
|
+
export type AnalyticsAuthoringConnection = {
|
|
12
|
+
kind: 'workspace-files';
|
|
13
|
+
} | {
|
|
14
|
+
kind: 'rest-toolset';
|
|
15
|
+
toolsetId: string;
|
|
16
|
+
} | {
|
|
17
|
+
kind: 'mcp-toolset';
|
|
18
|
+
toolsetId: string;
|
|
19
|
+
serverName: string;
|
|
20
|
+
} | {
|
|
21
|
+
kind: 'integration';
|
|
22
|
+
integrationId: string;
|
|
23
|
+
};
|
|
24
|
+
export interface AnalyticsAuthoringContext extends AnalyticsAuthoringScope {
|
|
25
|
+
connection: AnalyticsAuthoringConnection;
|
|
26
|
+
signal: AbortSignal;
|
|
27
|
+
deadlineAt: number;
|
|
28
|
+
}
|
|
29
|
+
/** Plugins own business mappings; the host owns identities, ACLs and persistence. */
|
|
30
|
+
export interface AnalyticsDefinitionAuthoring {
|
|
31
|
+
integrationProvider?: string;
|
|
32
|
+
inspectSchema: Record<string, JSONValue>;
|
|
33
|
+
definitionSchema: Record<string, JSONValue>;
|
|
34
|
+
instructions: string;
|
|
35
|
+
inspect(input: Record<string, JSONValue>, context: AnalyticsAuthoringContext): Promise<JSONValue>;
|
|
36
|
+
prepare(input: Record<string, JSONValue>, context: AnalyticsAuthoringContext): Promise<Record<string, JSONValue>>;
|
|
37
|
+
}
|
|
38
|
+
export interface AnalyticsAuthoringCandidate {
|
|
39
|
+
providerId: string;
|
|
40
|
+
connectionKey: string;
|
|
41
|
+
name: string;
|
|
42
|
+
}
|
|
43
|
+
export interface AnalyticsAuthoringSelection {
|
|
44
|
+
providerId: string;
|
|
45
|
+
connectionKey: string;
|
|
46
|
+
}
|
|
47
|
+
export interface AnalyticsDefinitionRegistration extends AnalyticsAuthoringSelection {
|
|
48
|
+
/** Stable per intended definition. Reusing a key with changed content rejects. */
|
|
49
|
+
requestId: string;
|
|
50
|
+
name: string;
|
|
51
|
+
definition: Record<string, JSONValue>;
|
|
52
|
+
}
|
|
53
|
+
export interface AnalyticsDefinitionReceipt {
|
|
54
|
+
source: Extract<AnalyticsVersionedSourceRef, {
|
|
55
|
+
kind: 'definition';
|
|
56
|
+
}>;
|
|
57
|
+
providerId: string;
|
|
58
|
+
name: string;
|
|
59
|
+
discoveryRequest: {
|
|
60
|
+
source: Extract<AnalyticsVersionedSourceRef, {
|
|
61
|
+
kind: 'definition';
|
|
62
|
+
}>;
|
|
63
|
+
providerId: string;
|
|
64
|
+
request: Record<string, JSONValue>;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
export interface AnalyticsDefinitionAuthoringApi {
|
|
68
|
+
catalog(scope: AnalyticsAuthoringScope): Promise<AnalyticsAuthoringCandidate[]>;
|
|
69
|
+
inspect(scope: AnalyticsAuthoringScope, selection: AnalyticsAuthoringSelection, input: Record<string, JSONValue>): Promise<{
|
|
70
|
+
inspectSchema: Record<string, JSONValue>;
|
|
71
|
+
definitionSchema: Record<string, JSONValue>;
|
|
72
|
+
instructions: string;
|
|
73
|
+
metadata: JSONValue;
|
|
74
|
+
}>;
|
|
75
|
+
register(scope: AnalyticsAuthoringScope, input: AnalyticsDefinitionRegistration): Promise<AnalyticsDefinitionReceipt>;
|
|
76
|
+
}
|
|
77
|
+
/** Separate from the read-only analytics query capability. No HTTP or model-supplied actor scope. */
|
|
78
|
+
export declare const AnalyticsDefinitionAuthoringCapability: import("../../core/runtime-capability").RuntimeCapabilityKey<AnalyticsDefinitionAuthoringApi>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AnalyticsDefinitionAuthoring } from './analytics-authoring';
|
|
2
|
+
import type { AnalyticsSourceRef, AnalyticsConfigurationEntry, AnalyticsBinding, AnalyticsProviderDescriptor, AnalyticsQueryRequest, AnalyticsSourceSummary, AnalyticalDataset, AnalyticsValue, JSONValue, AnalyticsDiscoveryRequest, AnalyticsDiscoveryResult } from '@xpert-ai/contracts';
|
|
2
3
|
import type { DataSourceActor } from '../datasource/workbench';
|
|
3
4
|
/** Host-created execution scope. Providers must not accept replacements from payload or controls. */
|
|
4
5
|
export interface AnalyticsProviderContext {
|
|
5
6
|
/** Current authenticated actor, not the source owner or Assistant creator. */
|
|
6
7
|
actor: DataSourceActor;
|
|
7
|
-
|
|
8
|
+
source: AnalyticsSourceRef;
|
|
8
9
|
/** Server-only source options; treat as sensitive and never copy into bindings or datasets. */
|
|
9
10
|
options: Record<string, JSONValue>;
|
|
10
11
|
/** Forward to source I/O and stop work on cancellation; a host timeout alone cannot stop ignored I/O. */
|
|
@@ -49,6 +50,10 @@ export interface AnalyticsProviderResult {
|
|
|
49
50
|
*/
|
|
50
51
|
export interface AnalyticsQueryProvider {
|
|
51
52
|
readonly descriptor: AnalyticsProviderDescriptor;
|
|
53
|
+
readonly configuration?: AnalyticsConfigurationEntry;
|
|
54
|
+
readonly authoring?: AnalyticsDefinitionAuthoring;
|
|
55
|
+
/** Validate and normalize immutable configuration at publication. */
|
|
56
|
+
validateConfiguration?(options: Record<string, JSONValue>, actor: DataSourceActor): Promise<Record<string, JSONValue>> | Record<string, JSONValue>;
|
|
52
57
|
/** Optional read-only metadata discovery; apply the same scope, cancellation and deadline as queries. */
|
|
53
58
|
discover?(request: JSONValue, context: AnalyticsProviderContext): Promise<AnalyticsDiscoveryResult>;
|
|
54
59
|
/** Parameters are resolved by name; binding.payload remains opaque to the host and needs provider validation. */
|
|
@@ -72,3 +77,16 @@ export interface AnalyticsRuntimeApi {
|
|
|
72
77
|
query(actor: DataSourceActor, request: AnalyticsQueryRequest, execution?: AnalyticsQueryExecution): Promise<AnalyticalDataset>;
|
|
73
78
|
}
|
|
74
79
|
export declare const AnalyticsRuntimeCapability: import("../../core/runtime-capability").RuntimeCapabilityKey<AnalyticsRuntimeApi>;
|
|
80
|
+
/** Trusted host resource adapter; plugins never provide resource ACLs. */
|
|
81
|
+
export interface AnalyticsSourceResolver {
|
|
82
|
+
readonly kind: AnalyticsSourceRef['kind'];
|
|
83
|
+
list(actor: DataSourceActor): Promise<AnalyticsSourceSummary[]>;
|
|
84
|
+
resolve(actor: DataSourceActor, source: AnalyticsSourceRef): Promise<AnalyticsResolvedSource>;
|
|
85
|
+
}
|
|
86
|
+
export interface AnalyticsResolvedSource {
|
|
87
|
+
source: AnalyticsSourceRef;
|
|
88
|
+
/** Resource-owned provider identities, not caller-supplied routing. */
|
|
89
|
+
providerIds: string[];
|
|
90
|
+
options: Record<string, JSONValue>;
|
|
91
|
+
revalidate(): Promise<void>;
|
|
92
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Command } from '@nestjs/cqrs';
|
|
2
|
+
import type { AnalyticsSourceSummary, AnalyticsSourceRef } from '@xpert-ai/contracts';
|
|
3
|
+
import type { DataSourceActor } from '../datasource/workbench';
|
|
4
|
+
import type { AnalyticsResolvedSource } from './analytics-provider';
|
|
5
|
+
/** Host resource owners enumerate sources using the current viewer's ACLs. */
|
|
6
|
+
export declare class ListAnalyticsSourcesCommand extends Command<AnalyticsSourceSummary[]> {
|
|
7
|
+
readonly actor: DataSourceActor;
|
|
8
|
+
readonly kind: AnalyticsSourceRef['kind'];
|
|
9
|
+
static readonly type = "[Analytics] List native sources";
|
|
10
|
+
constructor(actor: DataSourceActor, kind: AnalyticsSourceRef['kind']);
|
|
11
|
+
}
|
|
12
|
+
/** Authorize an exact immutable version; the owner also supplies the post-execution ACL/integrity recheck. */
|
|
13
|
+
export declare class ResolveAnalyticsSourceCommand extends Command<AnalyticsResolvedSource> {
|
|
14
|
+
readonly actor: DataSourceActor;
|
|
15
|
+
readonly source: AnalyticsSourceRef;
|
|
16
|
+
static readonly type = "[Analytics] Resolve native source";
|
|
17
|
+
constructor(actor: DataSourceActor, source: AnalyticsSourceRef);
|
|
18
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod/v3';
|
|
2
|
-
import type { AnalyticsBinding, AnalyticsQueryRequest, AnalyticsDiscoveryRequest, AnalyticsDiscoveryResult, JSONValue } from '@xpert-ai/contracts';
|
|
2
|
+
import type { AnalyticsSourceRef, AnalyticsBinding, AnalyticsQueryRequest, AnalyticsDiscoveryRequest, AnalyticsDiscoveryResult, JSONValue } from '@xpert-ai/contracts';
|
|
3
|
+
export declare const analyticsSourceRefSchema: z.ZodType<AnalyticsSourceRef>;
|
|
3
4
|
export declare const analyticsOptionsSchema: z.ZodRecord<z.ZodString, z.ZodType<JSONValue, z.ZodTypeDef, JSONValue>>;
|
|
4
5
|
export declare const analyticsFieldSchema: z.ZodObject<{
|
|
5
6
|
id: z.ZodString;
|
|
@@ -52,9 +53,8 @@ export declare const analyticsParameterSchema: z.ZodObject<{
|
|
|
52
53
|
allowedValues?: (string | number | boolean)[];
|
|
53
54
|
}>;
|
|
54
55
|
export declare const analyticsBindingObjectSchema: z.ZodObject<{
|
|
55
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
56
56
|
id: z.ZodString;
|
|
57
|
-
|
|
57
|
+
source: z.ZodType<AnalyticsSourceRef, z.ZodTypeDef, AnalyticsSourceRef>;
|
|
58
58
|
providerId: z.ZodString;
|
|
59
59
|
operation: z.ZodString;
|
|
60
60
|
contractVersion: z.ZodNumber;
|
|
@@ -141,8 +141,7 @@ export declare const analyticsBindingObjectSchema: z.ZodObject<{
|
|
|
141
141
|
}>;
|
|
142
142
|
}, "strict", z.ZodTypeAny, {
|
|
143
143
|
id?: string;
|
|
144
|
-
|
|
145
|
-
dataSourceId?: string;
|
|
144
|
+
source?: AnalyticsSourceRef;
|
|
146
145
|
providerId?: string;
|
|
147
146
|
operation?: string;
|
|
148
147
|
contractVersion?: number;
|
|
@@ -171,8 +170,7 @@ export declare const analyticsBindingObjectSchema: z.ZodObject<{
|
|
|
171
170
|
};
|
|
172
171
|
}, {
|
|
173
172
|
id?: string;
|
|
174
|
-
|
|
175
|
-
dataSourceId?: string;
|
|
173
|
+
source?: AnalyticsSourceRef;
|
|
176
174
|
providerId?: string;
|
|
177
175
|
operation?: string;
|
|
178
176
|
contractVersion?: number;
|
|
@@ -200,7 +198,24 @@ export declare const analyticsBindingObjectSchema: z.ZodObject<{
|
|
|
200
198
|
grain?: string[];
|
|
201
199
|
};
|
|
202
200
|
}>;
|
|
201
|
+
export declare function validateAnalyticsBinding(binding: Pick<z.output<typeof analyticsBindingObjectSchema>, 'output' | 'parameters' | 'payload'>, ctx: z.RefinementCtx): void;
|
|
203
202
|
export declare const analyticsBindingSchema: z.ZodType<AnalyticsBinding>;
|
|
203
|
+
export declare const analyticsControlsSchema: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
204
204
|
export declare const analyticsQueryRequestSchema: z.ZodType<AnalyticsQueryRequest, z.ZodTypeDef, unknown>;
|
|
205
|
+
export declare const analyticsDiscoveryRequestObjectSchema: z.ZodObject<{
|
|
206
|
+
source: z.ZodType<AnalyticsSourceRef, z.ZodTypeDef, AnalyticsSourceRef>;
|
|
207
|
+
providerId: z.ZodString;
|
|
208
|
+
request: z.ZodDefault<z.ZodType<JSONValue, z.ZodTypeDef, JSONValue>>;
|
|
209
|
+
}, "strict", z.ZodTypeAny, {
|
|
210
|
+
source?: AnalyticsSourceRef;
|
|
211
|
+
providerId?: string;
|
|
212
|
+
request?: JSONValue;
|
|
213
|
+
}, {
|
|
214
|
+
source?: AnalyticsSourceRef;
|
|
215
|
+
providerId?: string;
|
|
216
|
+
request?: JSONValue;
|
|
217
|
+
}>;
|
|
205
218
|
export declare const analyticsDiscoveryRequestSchema: z.ZodType<AnalyticsDiscoveryRequest, z.ZodTypeDef, unknown>;
|
|
206
219
|
export declare const analyticsDiscoveryResultSchema: z.ZodType<AnalyticsDiscoveryResult>;
|
|
220
|
+
/** Stable identity for source selection and scoped discovery receipts. */
|
|
221
|
+
export declare function analyticsSourceKey(source: AnalyticsSourceRef): string;
|
|
@@ -37,6 +37,8 @@ export interface IntegrationStrategy<T = unknown> {
|
|
|
37
37
|
execute(integration: IIntegration<T>, payload: TIntegrationStrategyParams): Promise<any>;
|
|
38
38
|
onUpdate?(previous: IIntegration<T>, current: IIntegration<any>): Promise<void> | void;
|
|
39
39
|
onDelete?(integration: IIntegration<T>): Promise<void> | void;
|
|
40
|
+
/** Normalize a configuration write; previous options are supplied only for the same provider. */
|
|
41
|
+
prepareConfig?(config: T, previous?: T): Promise<T> | T;
|
|
40
42
|
validateConfig?(config: T, integration?: IIntegration<T>): Promise<void | IntegrationTestResult>;
|
|
41
43
|
getIdentityBootstrap?(integration: IIntegration<T>): Promise<IntegrationIdentityBootstrap>;
|
|
42
44
|
exchangeIdentity?(integration: IIntegration<T>, grant: IntegrationIdentityGrant): Promise<IntegrationExternalIdentity>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ProjectPipelineEvidenceRef, ProjectPipelineJsonValue, ProjectPipelineSubjectVersion, ProjectPipelineWorkContext, ProjectPipelineOperationInput, ProjectPipelineOperationReceipt, ProjectPipelineCompletionReceipt, ProjectPipelinePolicyReceipt, ProjectPipelineAssistantInput, ProjectPipelineResourceClaim, ProjectPipelineResourceReservation, ProjectPipelineRuntimeInput } from '@xpert-ai/contracts';
|
|
1
|
+
import type { ProjectPipelineEvidenceRef, ProjectPipelineJsonValue, ProjectPipelineSubjectVersion, ProjectPipelineWorkContext, ProjectPipelineOperationInput, ProjectPipelineOperationReceipt, ProjectPipelineCompletionReceipt, ProjectPipelinePolicyReceipt, ProjectPipelineAssistantInput, ProjectPipelineResourceClaim, ProjectPipelineResourceReservation, ProjectPipelineRuntimeInput, XpertProjectViewSelection } from '@xpert-ai/contracts';
|
|
2
2
|
import type { ProjectPipelineContext } from './capability';
|
|
3
3
|
import type { AgentInvocationResult } from '../agent/runtime/types';
|
|
4
4
|
export type { ProjectPipelineOperationReceipt } from '@xpert-ai/contracts';
|
|
@@ -6,6 +6,10 @@ export type { ProjectPipelineOperationReceipt } from '@xpert-ai/contracts';
|
|
|
6
6
|
export interface ProjectPipelineSubjectResolver {
|
|
7
7
|
resolve(context: ProjectPipelineContext, objectKey: string): Promise<ProjectPipelineSubjectVersion>;
|
|
8
8
|
checkCurrent(context: ProjectPipelineContext, version: ProjectPipelineSubjectVersion): Promise<boolean>;
|
|
9
|
+
/** Read-only business entry for a saved subject. Reauthorize its Project and actor; never return a URL. */
|
|
10
|
+
resolveEntry?(context: ProjectPipelineContext, objectKey: string): Promise<XpertProjectViewSelection & {
|
|
11
|
+
xpertId: string;
|
|
12
|
+
}>;
|
|
9
13
|
}
|
|
10
14
|
export interface ProjectPipelineEvidenceResolver {
|
|
11
15
|
/** Reauthorize exact object and version; a stored reference is not a bearer credential. */
|
|
@@ -54,6 +54,10 @@ export declare class ProjectPipelineContributionRegistry extends BaseStrategyReg
|
|
|
54
54
|
};
|
|
55
55
|
version: string;
|
|
56
56
|
title: string;
|
|
57
|
+
projectTypes: {
|
|
58
|
+
applicationKey: string;
|
|
59
|
+
projectTypeKey: string;
|
|
60
|
+
}[];
|
|
57
61
|
subjectResolverRef: string;
|
|
58
62
|
roles: {
|
|
59
63
|
key: string;
|
|
@@ -93,6 +97,10 @@ export declare class ProjectPipelineContributionRegistry extends BaseStrategyReg
|
|
|
93
97
|
};
|
|
94
98
|
version: string;
|
|
95
99
|
title: string;
|
|
100
|
+
projectTypes: {
|
|
101
|
+
applicationKey: string;
|
|
102
|
+
projectTypeKey: string;
|
|
103
|
+
}[];
|
|
96
104
|
subjectResolverRef: string;
|
|
97
105
|
roles: {
|
|
98
106
|
key: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { JSONValue } from '@xpert-ai/contracts';
|
|
2
2
|
import type { WorkspaceFileScope, WorkspacePortableFileReference } from './workspace-files';
|
|
3
3
|
/** Stable machine-readable failures emitted by the Sandbox Jobs capability. */
|
|
4
|
-
export declare const SANDBOX_JOB_ERROR_CODES: readonly ["SANDBOX_ACTION_UNAVAILABLE", "SANDBOX_ACTION_INVALID", "SANDBOX_PROFILE_UNAVAILABLE", "SANDBOX_RUNTIME_UNAVAILABLE", "SANDBOX_VERSION_MISMATCH", "SANDBOX_CAPACITY_UNAVAILABLE", "SANDBOX_START_FAILED", "SANDBOX_INVOCATION_FAILED", "BROWSER_LAUNCH_FAILED", "EXPORT_TIMEOUT", "EXPORT_OOM", "EXPORT_MEDIA_FAILED", "EXPORT_INPUT_INVALID", "EXPORT_OUTPUT_INVALID", "SANDBOX_CANCELLED"];
|
|
4
|
+
export declare const SANDBOX_JOB_ERROR_CODES: readonly ["SANDBOX_ACTION_UNAVAILABLE", "SANDBOX_ACTION_INVALID", "SANDBOX_PROFILE_UNAVAILABLE", "SANDBOX_RUNTIME_UNAVAILABLE", "SANDBOX_VERSION_MISMATCH", "SANDBOX_CAPACITY_UNAVAILABLE", "SANDBOX_START_FAILED", "SANDBOX_DEPENDENCY_MISSING", "EXPORT_CONVERSION_FAILED", "EXPORT_TEXT_EXTRACTION_FAILED", "SANDBOX_INVOCATION_FAILED", "BROWSER_LAUNCH_FAILED", "EXPORT_TIMEOUT", "EXPORT_OOM", "EXPORT_MEDIA_FAILED", "EXPORT_INPUT_INVALID", "EXPORT_OUTPUT_INVALID", "SANDBOX_CANCELLED"];
|
|
5
5
|
export type SandboxJobErrorCode = (typeof SANDBOX_JOB_ERROR_CODES)[number];
|
|
6
6
|
/** Persisted lifecycle states for a generic isolated background execution. */
|
|
7
7
|
export type SandboxJobStatus = 'waiting' | 'starting' | 'running' | 'succeeded' | 'failed' | 'cancelled' | 'lost';
|