@xpert-ai/contracts 3.33.1 → 3.34.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/index.cjs.js +79 -61
- package/index.esm.js +75 -62
- package/package.json +2 -2
- package/src/ai/ai.model.d.ts +1 -1
- package/src/ai/chat-group-entity.model.d.ts +1 -1
- package/src/ai/chat-group.model.d.ts +116 -3
- package/src/ai/evolution/baseline.d.ts +12 -0
- package/src/ai/evolution/candidate.d.ts +20 -0
- package/src/ai/evolution/capability-version.d.ts +12 -0
- package/src/ai/evolution/change.d.ts +40 -2
- package/src/ai/evolution/evaluation.d.ts +26 -0
- package/src/ai/evolution/example.d.ts +5 -0
- package/src/ai/evolution/experience.d.ts +3 -0
- package/src/ai/evolution/governance.d.ts +29 -3
- package/src/ai/evolution/index.d.ts +1 -0
- package/src/ai/evolution/learning-event.d.ts +13 -0
- package/src/ai/evolution/learning-review.d.ts +61 -0
- package/src/ai/evolution/persistence.d.ts +7 -2
- package/src/ai/evolution/provider.d.ts +38 -0
- package/src/ai/evolution/release.d.ts +24 -6
- package/src/ai/evolution/runtime.d.ts +19 -0
- package/src/ai/evolution/strategy.d.ts +10 -0
- package/src/ai/evolution/target.d.ts +34 -6
- package/src/ai/execution-control-evidence.schema.d.ts +42 -0
- package/src/ai/index.d.ts +2 -0
- package/src/ai/project-pipeline/analytics.d.ts +5 -33
- package/src/ai/project-pipeline/model-usage-statistics.d.ts +4 -24
- package/src/ai/project-pipeline/operation.schema.d.ts +330 -0
- package/src/ai/project-pipeline/portfolio.schema.d.ts +14 -86
- package/src/ai/project-pipeline/statistics.d.ts +5 -33
- package/src/ai/xpert-agent-execution.model.d.ts +16 -2
- package/src/ai/xpert.model.d.ts +2 -0
- package/src/app-platform.d.ts +36 -36
- package/src/artifact-group-reference.model.d.ts +71 -0
- package/src/artifact-use-grant-command.d.ts +54 -0
- package/src/artifact-use-grant.model.d.ts +62 -0
- package/src/content-resource.model.d.ts +3 -0
- package/src/conversation-resource.model.d.ts +63 -0
- package/src/desktop-shell.model.d.ts +13 -1
- package/src/icon-definition.schema.d.ts +24 -0
- package/src/index.d.ts +6 -0
- package/src/resource-analysis.model.d.ts +140 -0
- package/src/runtime-control.d.ts +6 -0
- package/src/types.d.ts +1 -2
- package/src/user.model.d.ts +11 -0
- package/src/view-extension/client-commands.d.ts +176 -0
- package/src/view-extension/index.d.ts +1 -0
- package/src/view-extension/model.d.ts +2 -158
- package/src/view-extension/workbench-open.d.ts +17 -2
|
@@ -40,6 +40,16 @@ export type TXpertAgentExecutionCheckpoint = {
|
|
|
40
40
|
metadata?: Record<string, unknown> | null;
|
|
41
41
|
isCurrent?: boolean;
|
|
42
42
|
};
|
|
43
|
+
/** Priced model usage for one execution, in each provider's reported currency. */
|
|
44
|
+
export type ExecutionUsageSummary = {
|
|
45
|
+
costs: Array<{
|
|
46
|
+
currency: string;
|
|
47
|
+
amount: number;
|
|
48
|
+
tokens: number;
|
|
49
|
+
}>;
|
|
50
|
+
/** Most recent positive prompt measurement for the context-window indicator. */
|
|
51
|
+
lastInputTokens: number;
|
|
52
|
+
};
|
|
43
53
|
/**
|
|
44
54
|
* Corresponds to the run in the [Agent Protocol](https://github.com/langchain-ai/agent-protocol).
|
|
45
55
|
*/
|
|
@@ -57,8 +67,12 @@ export type TXpertAgentExecution = TXpertExecution & {
|
|
|
57
67
|
* Latency of response from provider (s)
|
|
58
68
|
*/
|
|
59
69
|
responseLatency?: number;
|
|
60
|
-
|
|
61
|
-
|
|
70
|
+
/** Posted point debits for this execution alone. Absent until a linked debit is recorded. */
|
|
71
|
+
chargedPoints?: number | null;
|
|
72
|
+
usageSummary?: ExecutionUsageSummary | null;
|
|
73
|
+
/** Available when the priced calls have a single currency. */
|
|
74
|
+
totalPrice?: number | null;
|
|
75
|
+
currency?: string | null;
|
|
62
76
|
inputTokens?: number;
|
|
63
77
|
inputUnitPrice?: number;
|
|
64
78
|
inputPriceUnit?: number;
|
package/src/ai/xpert.model.d.ts
CHANGED
|
@@ -307,6 +307,8 @@ export type TXpertTemplateSyncResult = {
|
|
|
307
307
|
releaseNotes?: string;
|
|
308
308
|
};
|
|
309
309
|
export type TXpertDataXpertOptions = {
|
|
310
|
+
/** Keep a group-restricted publication closed if its last assigned group is deleted. */
|
|
311
|
+
requireUserGroup?: boolean;
|
|
310
312
|
managedBy?: string;
|
|
311
313
|
templateKey?: string;
|
|
312
314
|
requiredPlugin?: string;
|
package/src/app-platform.d.ts
CHANGED
|
@@ -217,15 +217,6 @@ export declare const appPlatformDefinitionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
217
217
|
appName: string;
|
|
218
218
|
};
|
|
219
219
|
}[];
|
|
220
|
-
branding?: {
|
|
221
|
-
name?: string;
|
|
222
|
-
description?: string;
|
|
223
|
-
logo?: string;
|
|
224
|
-
};
|
|
225
|
-
registration?: {
|
|
226
|
-
organization?: "per-account";
|
|
227
|
-
role?: "APP_USER";
|
|
228
|
-
};
|
|
229
220
|
bindings?: {
|
|
230
221
|
type?: "knowledgebase";
|
|
231
222
|
from?: {
|
|
@@ -237,6 +228,15 @@ export declare const appPlatformDefinitionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
237
228
|
app?: string;
|
|
238
229
|
};
|
|
239
230
|
}[];
|
|
231
|
+
branding?: {
|
|
232
|
+
name?: string;
|
|
233
|
+
description?: string;
|
|
234
|
+
logo?: string;
|
|
235
|
+
};
|
|
236
|
+
registration?: {
|
|
237
|
+
organization?: "per-account";
|
|
238
|
+
role?: "APP_USER";
|
|
239
|
+
};
|
|
240
240
|
experience?: {
|
|
241
241
|
navigation?: string[];
|
|
242
242
|
home?: string;
|
|
@@ -259,15 +259,6 @@ export declare const appPlatformDefinitionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
259
259
|
configurationRef?: string;
|
|
260
260
|
dependsOn?: string[];
|
|
261
261
|
}[];
|
|
262
|
-
branding?: {
|
|
263
|
-
name?: string;
|
|
264
|
-
description?: string;
|
|
265
|
-
logo?: string;
|
|
266
|
-
};
|
|
267
|
-
registration?: {
|
|
268
|
-
organization?: "per-account";
|
|
269
|
-
role?: "APP_USER";
|
|
270
|
-
};
|
|
271
262
|
bindings?: {
|
|
272
263
|
type?: "knowledgebase";
|
|
273
264
|
from?: {
|
|
@@ -279,6 +270,15 @@ export declare const appPlatformDefinitionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
279
270
|
app?: string;
|
|
280
271
|
};
|
|
281
272
|
}[];
|
|
273
|
+
branding?: {
|
|
274
|
+
name?: string;
|
|
275
|
+
description?: string;
|
|
276
|
+
logo?: string;
|
|
277
|
+
};
|
|
278
|
+
registration?: {
|
|
279
|
+
organization?: "per-account";
|
|
280
|
+
role?: "APP_USER";
|
|
281
|
+
};
|
|
282
282
|
experience?: {
|
|
283
283
|
navigation?: string[];
|
|
284
284
|
home?: string;
|
|
@@ -301,15 +301,6 @@ export declare const appPlatformDefinitionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
301
301
|
appName: string;
|
|
302
302
|
};
|
|
303
303
|
}[];
|
|
304
|
-
branding?: {
|
|
305
|
-
name?: string;
|
|
306
|
-
description?: string;
|
|
307
|
-
logo?: string;
|
|
308
|
-
};
|
|
309
|
-
registration?: {
|
|
310
|
-
organization?: "per-account";
|
|
311
|
-
role?: "APP_USER";
|
|
312
|
-
};
|
|
313
304
|
bindings?: {
|
|
314
305
|
type?: "knowledgebase";
|
|
315
306
|
from?: {
|
|
@@ -321,6 +312,15 @@ export declare const appPlatformDefinitionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
321
312
|
app?: string;
|
|
322
313
|
};
|
|
323
314
|
}[];
|
|
315
|
+
branding?: {
|
|
316
|
+
name?: string;
|
|
317
|
+
description?: string;
|
|
318
|
+
logo?: string;
|
|
319
|
+
};
|
|
320
|
+
registration?: {
|
|
321
|
+
organization?: "per-account";
|
|
322
|
+
role?: "APP_USER";
|
|
323
|
+
};
|
|
324
324
|
experience?: {
|
|
325
325
|
navigation?: string[];
|
|
326
326
|
home?: string;
|
|
@@ -343,15 +343,6 @@ export declare const appPlatformDefinitionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
343
343
|
configurationRef?: string;
|
|
344
344
|
dependsOn?: string[];
|
|
345
345
|
}[];
|
|
346
|
-
branding?: {
|
|
347
|
-
name?: string;
|
|
348
|
-
description?: string;
|
|
349
|
-
logo?: string;
|
|
350
|
-
};
|
|
351
|
-
registration?: {
|
|
352
|
-
organization?: "per-account";
|
|
353
|
-
role?: "APP_USER";
|
|
354
|
-
};
|
|
355
346
|
bindings?: {
|
|
356
347
|
type?: "knowledgebase";
|
|
357
348
|
from?: {
|
|
@@ -363,6 +354,15 @@ export declare const appPlatformDefinitionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
363
354
|
app?: string;
|
|
364
355
|
};
|
|
365
356
|
}[];
|
|
357
|
+
branding?: {
|
|
358
|
+
name?: string;
|
|
359
|
+
description?: string;
|
|
360
|
+
logo?: string;
|
|
361
|
+
};
|
|
362
|
+
registration?: {
|
|
363
|
+
organization?: "per-account";
|
|
364
|
+
role?: "APP_USER";
|
|
365
|
+
};
|
|
366
366
|
experience?: {
|
|
367
367
|
navigation?: string[];
|
|
368
368
|
home?: string;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { ArtifactLibraryView } from './artifact-presentation.model';
|
|
2
|
+
import type { IArtifactUseGrant } from './artifact-use-grant.model';
|
|
3
|
+
import type { ResourceAnalysisPolicy } from './resource-analysis.model';
|
|
4
|
+
/**
|
|
5
|
+
* Client-safe grant projection used by source-management and group acceptance APIs.
|
|
6
|
+
* Contains no source file handles or credentials. It is display/concurrency metadata, not an access token.
|
|
7
|
+
*/
|
|
8
|
+
export interface ArtifactUseGrantSummary {
|
|
9
|
+
/** Grant ID, distinct from the accepted group's reference ID. */
|
|
10
|
+
id: string;
|
|
11
|
+
/** Original source Artifact; never a copied Artifact in the receiving Project. */
|
|
12
|
+
artifactId: string;
|
|
13
|
+
/** Pinned published version ID; use this, not a latest-version lookup, when resolving content. */
|
|
14
|
+
versionId: string;
|
|
15
|
+
/** Project retaining source ownership and authoring permissions. */
|
|
16
|
+
ownerProjectId: string;
|
|
17
|
+
/** Receiving group's Project captured when the offer was issued. */
|
|
18
|
+
targetProjectId: string;
|
|
19
|
+
/** Receiving group; Project membership alone does not allow use of this grant. */
|
|
20
|
+
targetGroupId: string;
|
|
21
|
+
/** Read-only resource use; does not itself authorize querying upstream data. */
|
|
22
|
+
permission: 'read';
|
|
23
|
+
/** Proposed scope on an offer, accepted scope on an active grant; absent/null remains view-only. */
|
|
24
|
+
analysis?: ResourceAnalysisPolicy | null;
|
|
25
|
+
/** Lifecycle state; consumers must also consider expiry and let the server reauthorize each operation. */
|
|
26
|
+
status: IArtifactUseGrant['status'];
|
|
27
|
+
/** Grant concurrency token for accept/revoke operations; do not substitute a reference revision. */
|
|
28
|
+
revision: number;
|
|
29
|
+
/** ISO 8601 access deadline serialized by the host. */
|
|
30
|
+
expiresAt: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Accepted, group-scoped placement of a source Artifact's fixed published version.
|
|
34
|
+
* This is not an ordinary Project catalog entry: viewers must belong to groupId and satisfy the live grant.
|
|
35
|
+
* Keep ownerProjectId and runtimeProjectId separate when resolving data, navigation and authorization.
|
|
36
|
+
*/
|
|
37
|
+
export interface ArtifactGroupReference {
|
|
38
|
+
/** Group reference ID used by group view/query/removal endpoints and resource navigation. */
|
|
39
|
+
id: string;
|
|
40
|
+
/** Backing grant ID; acceptance creates the placement without transferring ownership. */
|
|
41
|
+
grantId: string;
|
|
42
|
+
/** Source Artifact identity. */
|
|
43
|
+
artifactId: string;
|
|
44
|
+
/** Fixed published version identity; unrelated to a working draft revision. */
|
|
45
|
+
versionId: string;
|
|
46
|
+
/** Source authoring Project; never switch the group conversation into this Project to view the resource. */
|
|
47
|
+
ownerProjectId: string;
|
|
48
|
+
/** Group's usage Project, which must still match the Project captured by the backing grant. */
|
|
49
|
+
runtimeProjectId: string;
|
|
50
|
+
/** Audience owning this placement; another group in the same Project has no implied access. */
|
|
51
|
+
groupId: string;
|
|
52
|
+
/** Display title stored with the placement; not an identifier or a permission discriminator. */
|
|
53
|
+
title: string;
|
|
54
|
+
/** Reference concurrency token for removal; independent of the backing grant's revision. */
|
|
55
|
+
revision: number;
|
|
56
|
+
/** Human-readable version sequence; use versionId for identity. */
|
|
57
|
+
versionNumber: number;
|
|
58
|
+
/** Backing grant's ISO 8601 deadline; a previously fetched reference may expire or be revoked. */
|
|
59
|
+
expiresAt: string;
|
|
60
|
+
/** No source editing through this reference; permitted analysis is described separately. */
|
|
61
|
+
readOnly: true;
|
|
62
|
+
/** Effective, explicitly accepted analysis scope; absent/null means view-only. */
|
|
63
|
+
analysis?: ResourceAnalysisPolicy | null;
|
|
64
|
+
/** Authenticated library-view URL, not a public share link or a bypass for group authorization. */
|
|
65
|
+
url: string;
|
|
66
|
+
}
|
|
67
|
+
/** Authorized library-view payload plus the group placement needed for subsequent scoped requests. */
|
|
68
|
+
export interface ArtifactGroupReferenceView extends ArtifactLibraryView {
|
|
69
|
+
/** Revalidated placement corresponding to this view's fixed content version. */
|
|
70
|
+
reference: ArtifactGroupReference;
|
|
71
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Authoring View -> signed-in host command for source grant management.
|
|
3
|
+
* The host verifies the declared View, Assistant and source Project before forwarding the action.
|
|
4
|
+
* Embedded/group credentials never become source-management authority and no login token is returned to the View.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ARTIFACT_USE_GRANT_MANAGE_COMMAND = "artifact.use-grants.manage";
|
|
7
|
+
/** Allowlisted authoring actions; adding one also requires host dispatch and provider-side input validation. */
|
|
8
|
+
export type ArtifactUseGrantAuthoringAction =
|
|
9
|
+
/** Paginated receiving-group candidates; input uses artifactId and optional offset/limit. */
|
|
10
|
+
'group-grant-targets'
|
|
11
|
+
/** Paginated grants issued for the source Artifact; uses the same pagination input. */
|
|
12
|
+
| 'group-grants'
|
|
13
|
+
/** Offer a fixed version to a group; input uses versionId, targetGroupId, days and optional analysis. */
|
|
14
|
+
| 'group-grant-offer'
|
|
15
|
+
/** Close an existing source grant using grantId and its latest expectedRevision. */
|
|
16
|
+
| 'group-grant-revoke'
|
|
17
|
+
/** Inspect shareable dataset metadata for versionId without querying business rows. */
|
|
18
|
+
| 'group-grant-analysis-options';
|
|
19
|
+
/**
|
|
20
|
+
* Credential-free host command payload. Actor and Project scope come from trusted host context.
|
|
21
|
+
* The actionKey and input unions are not correlated by TypeScript; adapters must validate their combination.
|
|
22
|
+
* This View adapter uses a duration in days; the runtime grant API receives an absolute expiresAt timestamp.
|
|
23
|
+
*/
|
|
24
|
+
export type ArtifactUseGrantAuthoringRequest = {
|
|
25
|
+
/** Selects the operation and the corresponding input shape documented above. */
|
|
26
|
+
actionKey: ArtifactUseGrantAuthoringAction;
|
|
27
|
+
/** Source identity is always required; fields from another action must be rejected at the adapter boundary. */
|
|
28
|
+
input: {
|
|
29
|
+
artifactId: string;
|
|
30
|
+
} &
|
|
31
|
+
/** Zero-based pagination; omitted values use the authoring adapter's defaults. */
|
|
32
|
+
({
|
|
33
|
+
offset?: number;
|
|
34
|
+
limit?: number;
|
|
35
|
+
} | {
|
|
36
|
+
/** Published version of artifactId; drafts cannot be offered. */
|
|
37
|
+
versionId: string;
|
|
38
|
+
/** Receiving group; its current Project is resolved by the server. */
|
|
39
|
+
targetGroupId: string;
|
|
40
|
+
/** Whole-day duration, validated by the authoring adapter before computing expiresAt. */
|
|
41
|
+
days: number;
|
|
42
|
+
/** Explicit proposed analysis scope; omission offers view-only use. */
|
|
43
|
+
analysis?: import('./resource-analysis.model').ResourceAnalysisPolicy;
|
|
44
|
+
}
|
|
45
|
+
/** Published version whose datasets and sharing eligibility should be described. */
|
|
46
|
+
| {
|
|
47
|
+
versionId: string;
|
|
48
|
+
}
|
|
49
|
+
/** Latest grant revision is required to prevent revoking a concurrently changed grant. */
|
|
50
|
+
| {
|
|
51
|
+
grantId: string;
|
|
52
|
+
expectedRevision: number;
|
|
53
|
+
});
|
|
54
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
|
|
2
|
+
import type { ResourceAnalysisPolicy } from './resource-analysis.model';
|
|
3
|
+
/**
|
|
4
|
+
* Persisted consent to use one published Artifact version in another group's Project in the same organization.
|
|
5
|
+
* The source manager offers it; the receiving group owner accepts it. Every use rechecks current access.
|
|
6
|
+
* This does not confer source Project membership, source credentials, draft/edit rights or onward sharing.
|
|
7
|
+
* Dates are persistence values; clients consume the serialized ArtifactUseGrantSummary instead.
|
|
8
|
+
*/
|
|
9
|
+
export interface IArtifactUseGrant extends IBasePerTenantAndOrganizationEntityModel {
|
|
10
|
+
/** Source Artifact identity; ownership stays with ownerProjectId. */
|
|
11
|
+
artifactId: string;
|
|
12
|
+
/** Immutable published version ID; publishing a newer version does not update this grant. */
|
|
13
|
+
versionId: string;
|
|
14
|
+
/** Source authoring Project, resolved by the host from the Artifact. */
|
|
15
|
+
ownerProjectId: string;
|
|
16
|
+
/** Receiving group's Project at issuance; changing the group's binding invalidates access through this grant. */
|
|
17
|
+
targetProjectId: string;
|
|
18
|
+
/** Only this group receives the grant, even if other groups use the same target Project. */
|
|
19
|
+
targetGroupId: string;
|
|
20
|
+
/** Base resource-view permission; data analysis requires the separate analysis policy. */
|
|
21
|
+
permission: 'read';
|
|
22
|
+
/**
|
|
23
|
+
* Proposed analysis scope while offered; effective scope once explicitly accepted by the group owner.
|
|
24
|
+
* Omitted/null means view-only. Accepting without analysis consent clears it; source data ACLs still apply.
|
|
25
|
+
*/
|
|
26
|
+
analysis?: ResourceAnalysisPolicy | null;
|
|
27
|
+
/**
|
|
28
|
+
* offered awaits acceptance; active is accepted; revoked is closed by the source; removed is closed by the group.
|
|
29
|
+
* Expiry is checked separately via expiresAt, so active alone never proves that access is currently allowed.
|
|
30
|
+
*/
|
|
31
|
+
status: 'offered' | 'active' | 'revoked' | 'removed';
|
|
32
|
+
/** Optimistic concurrency revision; pass the latest value as expectedRevision when changing this grant. */
|
|
33
|
+
revision: number;
|
|
34
|
+
/** Human account that issued the offer, not an Assistant or plugin installation owner. */
|
|
35
|
+
issuedById: string;
|
|
36
|
+
/** Accepting human account; absent until acceptance. Retained after subsequent closure. */
|
|
37
|
+
acceptedById?: string | null;
|
|
38
|
+
/** Time of group-owner acceptance; absent for an offer that was never accepted. */
|
|
39
|
+
acceptedAt?: Date | null;
|
|
40
|
+
/** Human account that revoked or removed the grant; absent while it remains open. */
|
|
41
|
+
closedById?: string | null;
|
|
42
|
+
/** Explicit closure time; reaching expiresAt alone does not populate this field. */
|
|
43
|
+
closedAt?: Date | null;
|
|
44
|
+
/** Exclusive access deadline, checked at use time without requiring an expiry background job. */
|
|
45
|
+
expiresAt: Date;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Lifecycle and access audit events. Reference placement/removal are distinct from the grant state transition.
|
|
49
|
+
* Extend producers and audit consumers together; an access event records a check, not a reusable authorization.
|
|
50
|
+
*/
|
|
51
|
+
export type ArtifactUseGrantEvent = 'offered' | 'accepted' | 'revoked' | 'removed' | 'access' | 'denied' | 'reference_attached' | 'reference_removed';
|
|
52
|
+
/** Audit projection for one grant operation; never store credentials, query results or Artifact content here. */
|
|
53
|
+
export interface IArtifactUseGrantAudit extends IBasePerTenantAndOrganizationEntityModel {
|
|
54
|
+
/** Grant whose lifecycle or access was checked. */
|
|
55
|
+
grantId: string;
|
|
56
|
+
/** Authenticated human account responsible for this operation. */
|
|
57
|
+
actorId: string;
|
|
58
|
+
/** Operation/outcome; see ArtifactUseGrantEvent for lifecycle versus reference events. */
|
|
59
|
+
event: ArtifactUseGrantEvent;
|
|
60
|
+
/** Grant revision observed or produced by this event, not the reference revision. */
|
|
61
|
+
revision: number;
|
|
62
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { I18nObject } from './i18n.model';
|
|
2
2
|
import type { ArtifactTypeDescriptor } from './artifact.model';
|
|
3
|
+
import type { IconDefinition } from './types';
|
|
3
4
|
export type ContentAction = 'rename' | 'move' | 'trash' | 'restore' | 'duplicate';
|
|
4
5
|
export type ContentSourceLocation = {
|
|
5
6
|
kind: 'file';
|
|
@@ -31,6 +32,8 @@ export interface ContentTypeImplementation {
|
|
|
31
32
|
creatable?: boolean;
|
|
32
33
|
typeId: string;
|
|
33
34
|
title: I18nObject;
|
|
35
|
+
/** Provider-declared type icon reused by resource cards; omit to use the host's generic fallback. */
|
|
36
|
+
icon?: IconDefinition;
|
|
34
37
|
implementationKey: string;
|
|
35
38
|
implementationTitle: I18nObject;
|
|
36
39
|
/** Optional provider-owned creation presets. IDs are validated again on the server. */
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/** A resource locator within an authorized conversation, never an access token or source Project override. */
|
|
2
|
+
export type ConversationResourceTarget =
|
|
3
|
+
/** Project content catalog ID, resolved only in the current usage Project. */
|
|
4
|
+
{
|
|
5
|
+
kind: 'project-content';
|
|
6
|
+
id: string;
|
|
7
|
+
}
|
|
8
|
+
/** Accepted group reference ID, never the source Artifact or publication ID. */
|
|
9
|
+
| {
|
|
10
|
+
kind: 'group-reference';
|
|
11
|
+
id: string;
|
|
12
|
+
};
|
|
13
|
+
/** Safe discovery metadata shared by Assistant tools and Workbench pickers. No content, query data or credentials. */
|
|
14
|
+
export interface ConversationResourceItem {
|
|
15
|
+
/** Stable locator. Identical source Artifacts in different grants/versions remain distinct references. */
|
|
16
|
+
resource: ConversationResourceTarget;
|
|
17
|
+
/** Display title, not an identity or a permission check. */
|
|
18
|
+
title: string;
|
|
19
|
+
/** Provider-declared semantic type, also used by the Project content catalog. Never inferred from a title. */
|
|
20
|
+
typeId?: string;
|
|
21
|
+
/** Current usage Project; this does not grant membership in a shared resource's authoring Project. */
|
|
22
|
+
projectId: string;
|
|
23
|
+
/** Source identity for authorized Project navigation only; absent for group references. */
|
|
24
|
+
contentSource?: {
|
|
25
|
+
providerKey: string;
|
|
26
|
+
resourceId: string;
|
|
27
|
+
};
|
|
28
|
+
/** Fixed publication metadata for shared references; never resolves to the latest source version. */
|
|
29
|
+
publication?: {
|
|
30
|
+
versionId: string;
|
|
31
|
+
versionNumber: number;
|
|
32
|
+
expiresAt: string;
|
|
33
|
+
};
|
|
34
|
+
/** Effective discovery hints. Opening, editing and analysis still reauthorize at their own boundaries. */
|
|
35
|
+
access: {
|
|
36
|
+
canOpen: boolean;
|
|
37
|
+
canEdit: boolean;
|
|
38
|
+
/** Explicitly accepted Agent analysis scope. Project navigation alone declares no analysis permission. */
|
|
39
|
+
analysis: 'none' | 'bindings' | 'explore';
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/** Query within the host's current conversation. Changing filters starts a new pagination sequence. */
|
|
43
|
+
export interface ConversationResourceQuery {
|
|
44
|
+
/** Omit or leave empty to enumerate resources, rather than searching for a guessed title. */
|
|
45
|
+
search?: string;
|
|
46
|
+
/** Exact semantic content type declared by the provider; omitted means all supported types. */
|
|
47
|
+
typeId?: string;
|
|
48
|
+
/** Shared references are available only in their exact group conversation. */
|
|
49
|
+
origin?: 'all' | 'project' | 'shared';
|
|
50
|
+
/** Opaque server continuation; clients must not construct or reuse it with different filters/scopes. */
|
|
51
|
+
cursor?: string;
|
|
52
|
+
/** Maximum items per page, from 1 to 100; defaults to 20. */
|
|
53
|
+
limit?: number;
|
|
54
|
+
}
|
|
55
|
+
export interface ConversationResourcePage {
|
|
56
|
+
items: ConversationResourceItem[];
|
|
57
|
+
/** Null means this query is exhausted; an empty page with a cursor is not an empty directory. */
|
|
58
|
+
nextCursor: string | null;
|
|
59
|
+
/** Indicates that the authorized conversation has a group audience, even when no shares match. */
|
|
60
|
+
sharedAvailable: boolean;
|
|
61
|
+
}
|
|
62
|
+
/** Opens a discovered resource through its native authorization adapter in the current Workbench scope. */
|
|
63
|
+
export declare const WORKBENCH_RESOURCE_OPEN_COMMAND = "workbench.resource.open";
|
|
@@ -5,9 +5,10 @@ export interface ShellExecutionEvidence {
|
|
|
5
5
|
state: 'exited' | 'not_started';
|
|
6
6
|
coverage: 'descendants';
|
|
7
7
|
}
|
|
8
|
+
export type ShellPlatform = 'darwin' | 'win32';
|
|
8
9
|
export interface ShellSettings {
|
|
9
10
|
name: string;
|
|
10
|
-
shell: '/bin/zsh' | '/bin/bash';
|
|
11
|
+
shell: '/bin/zsh' | '/bin/bash' | 'powershell.exe';
|
|
11
12
|
cwd: string;
|
|
12
13
|
path: string;
|
|
13
14
|
}
|
|
@@ -17,7 +18,18 @@ export interface ShellExecInput {
|
|
|
17
18
|
cwd?: string;
|
|
18
19
|
timeout_sec?: number;
|
|
19
20
|
}
|
|
21
|
+
export type ShellComputerInfo = {
|
|
22
|
+
available: false;
|
|
23
|
+
} | {
|
|
24
|
+
available: true;
|
|
25
|
+
platform: ShellPlatform;
|
|
26
|
+
name: string;
|
|
27
|
+
shell: ShellSettings['shell'];
|
|
28
|
+
cwd: string;
|
|
29
|
+
};
|
|
20
30
|
export type ShellInput = ShellExecInput | {
|
|
31
|
+
action: 'info';
|
|
32
|
+
} | {
|
|
21
33
|
action: 'status';
|
|
22
34
|
operationId: string;
|
|
23
35
|
cursor?: number;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod/v3';
|
|
2
|
+
/** Public presentation metadata only. Renderers retain their own sandbox and URL policies. */
|
|
3
|
+
export declare const iconDefinitionSchema: z.ZodObject<{
|
|
4
|
+
type: z.ZodEnum<["image", "svg", "font", "emoji", "lottie"]>;
|
|
5
|
+
value: z.ZodString;
|
|
6
|
+
color: z.ZodOptional<z.ZodString>;
|
|
7
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
9
|
+
style: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
value?: string;
|
|
12
|
+
type?: "image" | "svg" | "font" | "emoji" | "lottie";
|
|
13
|
+
size?: number;
|
|
14
|
+
color?: string;
|
|
15
|
+
alt?: string;
|
|
16
|
+
style?: Record<string, string>;
|
|
17
|
+
}, {
|
|
18
|
+
value?: string;
|
|
19
|
+
type?: "image" | "svg" | "font" | "emoji" | "lottie";
|
|
20
|
+
size?: number;
|
|
21
|
+
color?: string;
|
|
22
|
+
alt?: string;
|
|
23
|
+
style?: Record<string, string>;
|
|
24
|
+
}>;
|
package/src/index.d.ts
CHANGED
|
@@ -65,6 +65,10 @@ export * from './agent/index';
|
|
|
65
65
|
export * from './api-key.model';
|
|
66
66
|
export * from './personal-api-key.model';
|
|
67
67
|
export * from './artifact.model';
|
|
68
|
+
export * from './artifact-use-grant.model';
|
|
69
|
+
export * from './artifact-use-grant-command';
|
|
70
|
+
export * from './artifact-group-reference.model';
|
|
71
|
+
export * from './resource-analysis.model';
|
|
68
72
|
export * from './business-area.model';
|
|
69
73
|
export * from './collaboration.model';
|
|
70
74
|
export * from './schedule';
|
|
@@ -96,3 +100,5 @@ export * from './ai/mcp-operation.model';
|
|
|
96
100
|
export * from './ai/mcp-task.schema';
|
|
97
101
|
export * from './user-notification.schema';
|
|
98
102
|
export * from './business-area-access.model';
|
|
103
|
+
export * from './conversation-resource.model';
|
|
104
|
+
export { iconDefinitionSchema } from './icon-definition.schema';
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import type { AnalyticalDataset, AnalyticsField, AnalyticsParameter, AnalyticsValue } from './analytics-query.model';
|
|
2
|
+
/**
|
|
3
|
+
* Explicit consent to disclose bounded query results to every member of the receiving group.
|
|
4
|
+
* The source manager proposes this scope and the group owner independently accepts it.
|
|
5
|
+
* Each query still uses the requesting human's upstream data permissions, never the source author's credentials.
|
|
6
|
+
* Omit the policy entirely for view-only access; an empty dataset list is not a wildcard grant.
|
|
7
|
+
*/
|
|
8
|
+
export interface ResourceAnalysisPolicy {
|
|
9
|
+
/**
|
|
10
|
+
* bindings permits declared parameter values and field projection over published binding results.
|
|
11
|
+
* explore additionally permits query filters, grouping, aggregation and sorting within the same approved datasets.
|
|
12
|
+
* Neither mode permits arbitrary SQL, new tables/models, source browsing or writes.
|
|
13
|
+
*/
|
|
14
|
+
mode: 'bindings' | 'explore';
|
|
15
|
+
/** Nonempty allowlist of datasets in the pinned published resource; keys must be unique. */
|
|
16
|
+
datasets: Array<{
|
|
17
|
+
/** Published AnalyticsBinding.id, matching the provider's dataset key; not a label or output datasetId. */
|
|
18
|
+
key: string;
|
|
19
|
+
/** Nonempty, unique AnalyticsField.id allowlist used by projection, filters and aggregation. */
|
|
20
|
+
fields: string[];
|
|
21
|
+
/** Immutable AND predicates on allowed fields, applied before aggregation and disclosure to the Agent. */
|
|
22
|
+
filters: ResourceAnalysisFilter[];
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* Allows returning dataset rows without further aggregation. These may already be aggregated by the binding.
|
|
26
|
+
* false requires an aggregate query; bindings mode therefore requires true.
|
|
27
|
+
*/
|
|
28
|
+
allowDetails: boolean;
|
|
29
|
+
/** Maximum output rows per query (1–100), after filtering/aggregation; not a source-scan or per-turn budget. */
|
|
30
|
+
maxRows: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* One typed predicate on a declared dataset field. Predicate arrays combine with AND; in matches any listed value.
|
|
34
|
+
* Uses AnalyticsValue wire types: int64/decimal values are exact strings, not floating-point numbers.
|
|
35
|
+
* Null participates in eq/ne/in comparisons; ordered comparisons with null do not match.
|
|
36
|
+
*/
|
|
37
|
+
export interface ResourceAnalysisFilter {
|
|
38
|
+
/** AnalyticsField.id within the approved field allowlist, never a SQL expression. */
|
|
39
|
+
field: string;
|
|
40
|
+
/** Closed comparison vocabulary; additions require matching schema and execution support. */
|
|
41
|
+
operator: 'eq' | 'ne' | 'in' | 'gt' | 'gte' | 'lt' | 'lte';
|
|
42
|
+
/** Exactly one scalar except for in, which accepts a nonempty list; values must match the field's logical type. */
|
|
43
|
+
values: AnalyticsValue[];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Normalized request for resource_query, scoped externally by the accepted group reference ID.
|
|
47
|
+
* Read ResourceAnalysisDescription first; keys and fields must come from that authorized description.
|
|
48
|
+
* The shared schema supplies empty collections for omitted wire fields. The server then validates the live policy.
|
|
49
|
+
* Extend schema, authorization checks and execution together when adding a query operation.
|
|
50
|
+
*/
|
|
51
|
+
export interface ResourceAnalysisQuery {
|
|
52
|
+
/** Approved published binding key, matching ResourceAnalysisDataset.key. */
|
|
53
|
+
datasetKey: string;
|
|
54
|
+
/** Declared parameter values keyed by AnalyticsParameter.controlId; source identities/payloads cannot be supplied. */
|
|
55
|
+
controls: Record<string, AnalyticsValue>;
|
|
56
|
+
/** Detail projection; [] selects all approved fields. Aggregate output instead consists of groupBy and aggregate keys. */
|
|
57
|
+
select: string[];
|
|
58
|
+
/** Additional AND predicates in explore mode; cannot replace or relax the policy's fixed filters. */
|
|
59
|
+
filters: ResourceAnalysisFilter[];
|
|
60
|
+
/** Approved field IDs for grouping; requires at least one aggregate. [] aggregates the whole filtered dataset. */
|
|
61
|
+
groupBy: string[];
|
|
62
|
+
/** Explore-only aggregates; incomplete/truncated input is rejected rather than reported as an exact aggregate. */
|
|
63
|
+
aggregates: Array<{
|
|
64
|
+
/** Omit for count (row count); sum/min/max require an approved numeric field. */
|
|
65
|
+
field?: string;
|
|
66
|
+
/** New output field ID, unique among aggregate/grouping keys and distinct from existing dataset field IDs. */
|
|
67
|
+
key: string;
|
|
68
|
+
/** Supported aggregate vocabulary; count counts rows, while numeric aggregates ignore null values. */
|
|
69
|
+
operation: 'count' | 'sum' | 'min' | 'max';
|
|
70
|
+
}>;
|
|
71
|
+
/** Explore-only sort, evaluated after projection/aggregation and before the output row limit. */
|
|
72
|
+
orderBy: Array<{
|
|
73
|
+
/** Output field ID: a projected field, grouping field or aggregate key. */
|
|
74
|
+
field: string;
|
|
75
|
+
/** Ordered entries are applied in sequence, allowing deterministic multi-column sorting. */
|
|
76
|
+
direction: 'asc' | 'desc';
|
|
77
|
+
}>;
|
|
78
|
+
/** Omission uses the grant's maxRows; explicit limits must be positive and may not exceed that budget. */
|
|
79
|
+
limit?: number;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Public metadata for one analyzable dataset in a fixed resource version, without rows or native query declarations.
|
|
83
|
+
* Authoring inspection can describe the resource's fields; group inspection exposes only the accepted field scope.
|
|
84
|
+
*/
|
|
85
|
+
export interface ResourceAnalysisDataset {
|
|
86
|
+
/** Stable key within this published resource, equal to its AnalyticsBinding.id; do not derive it from title. */
|
|
87
|
+
key: string;
|
|
88
|
+
/** Display text only; it need not be unique and cannot be used for authorization or query routing. */
|
|
89
|
+
title: string;
|
|
90
|
+
/** Typed dataset fields; use their IDs and logical types when constructing queries. */
|
|
91
|
+
fields: AnalyticsField[];
|
|
92
|
+
/** Declared control inputs; group descriptions may omit defaults and allowed-value lists to avoid disclosure. */
|
|
93
|
+
parameters: AnalyticsParameter[];
|
|
94
|
+
/**
|
|
95
|
+
* Authoring-only eligibility hint for the inspecting actor. Missing means unchecked; false may include unavailable support.
|
|
96
|
+
* This is not permission for a recipient to query; issuing and using the grant both revalidate their own authority.
|
|
97
|
+
*/
|
|
98
|
+
canShare?: boolean;
|
|
99
|
+
}
|
|
100
|
+
/** resource_describe response for a currently authorized group reference; contains no business rows or credentials. */
|
|
101
|
+
export interface ResourceAnalysisDescription {
|
|
102
|
+
/** Accepted reference ID to use for the subsequent query; not the source Artifact or grant ID. */
|
|
103
|
+
referenceId: string;
|
|
104
|
+
/** Resource title for display/citation only. */
|
|
105
|
+
title: string;
|
|
106
|
+
/** Pinned published version's display sequence, not a mutable latest-version pointer. */
|
|
107
|
+
versionNumber: number;
|
|
108
|
+
/** Effective, explicitly accepted scope; clients must not widen it when constructing requests. */
|
|
109
|
+
policy: ResourceAnalysisPolicy;
|
|
110
|
+
/** Only approved datasets and fields; absence of another dataset must not trigger source-catalog discovery. */
|
|
111
|
+
datasets: ResourceAnalysisDataset[];
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Authorized query output and provenance for group-visible answers.
|
|
115
|
+
* Consumers must inspect dataset.completeness and freshness before claiming totals or current source state.
|
|
116
|
+
* Evidence identifies an executed result; it is not a reusable authorization or a complete replayable query.
|
|
117
|
+
*/
|
|
118
|
+
export interface ResourceAnalysisResult {
|
|
119
|
+
/** Result after policy projection, fixed/request filters, permitted analysis and the output row limit. */
|
|
120
|
+
dataset: AnalyticalDataset;
|
|
121
|
+
/** Host-produced provenance for citations and traceability, without source credentials or native query payloads. */
|
|
122
|
+
evidence: {
|
|
123
|
+
/** Accepted group reference used for this execution. */
|
|
124
|
+
referenceId: string;
|
|
125
|
+
/** Original source Artifact that supplied the fixed resource definition. */
|
|
126
|
+
artifactId: string;
|
|
127
|
+
/** Published version actually queried; never substitute the resource's current latest version. */
|
|
128
|
+
versionId: string;
|
|
129
|
+
/** Audience authorized to receive this result; not permission to forward it to another group. */
|
|
130
|
+
groupId: string;
|
|
131
|
+
/** Approved published binding key that was queried. */
|
|
132
|
+
datasetKey: string;
|
|
133
|
+
/** Dataset freshness.executedAt as an ISO 8601 timestamp, not the time the chat answer was rendered. */
|
|
134
|
+
queriedAt: string;
|
|
135
|
+
/** Control values supplied in the request; provider defaults may not be expanded into this map. */
|
|
136
|
+
controls: Record<string, AnalyticsValue>;
|
|
137
|
+
/** Combined fixed grant restrictions and request predicates, with AND semantics. */
|
|
138
|
+
filters: ResourceAnalysisFilter[];
|
|
139
|
+
};
|
|
140
|
+
}
|
package/src/runtime-control.d.ts
CHANGED
|
@@ -8,6 +8,12 @@ export interface IRuntimeStreamInterruption {
|
|
|
8
8
|
/** Process-supervisor execution modes; neither implies Pod/deployment orchestration. */
|
|
9
9
|
export type RuntimeRestartMode = 'self-signal' | 'rolling-self-signal';
|
|
10
10
|
export type RuntimeRestartStatus = 'in_progress' | 'completed' | 'failed' | 'awaiting_restart';
|
|
11
|
+
/** Host-attested rejection before a plugin module enters the Nest container. */
|
|
12
|
+
export interface IRuntimePluginFailureIsolation {
|
|
13
|
+
stage: 'provider-preflight';
|
|
14
|
+
version: string;
|
|
15
|
+
runtimeRevision?: string;
|
|
16
|
+
}
|
|
11
17
|
export interface IRuntimePluginRequirement {
|
|
12
18
|
scopeKey: string;
|
|
13
19
|
pluginName: string;
|