@xpert-ai/contracts 3.33.1 → 3.35.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 +545 -168
- package/index.esm.js +517 -169
- 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/conversation-trail.model.d.ts +2 -2
- 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 +46 -4
- package/src/ai/index.d.ts +4 -0
- package/src/ai/model-execution.model.d.ts +2 -0
- package/src/ai/project-configuration-view.model.d.ts +77 -0
- package/src/ai/project-pipeline/analytics.d.ts +5 -33
- package/src/ai/project-pipeline/budget.schema.d.ts +38 -0
- package/src/ai/project-pipeline/commands.schema.d.ts +10 -10
- package/src/ai/project-pipeline/configuration-form.d.ts +2 -2
- package/src/ai/project-pipeline/index.d.ts +1 -0
- package/src/ai/project-pipeline/model-usage-statistics.d.ts +6 -26
- package/src/ai/project-pipeline/operation.schema.d.ts +370 -40
- package/src/ai/project-pipeline/plugin-deployment.schema.d.ts +152 -0
- package/src/ai/project-pipeline/portfolio.schema.d.ts +14 -86
- package/src/ai/project-pipeline/provider-actions.schema.d.ts +12 -12
- package/src/ai/project-pipeline/runtime.schema.d.ts +2 -2
- package/src/ai/project-pipeline/statistics.d.ts +5 -33
- package/src/ai/project-task-runtime.model.d.ts +1329 -78
- package/src/ai/project-type-configuration.model.d.ts +48 -0
- package/src/ai/xpert-agent-execution.model.d.ts +16 -2
- package/src/ai/xpert-project-type.model.d.ts +3 -0
- package/src/ai/xpert-project.model.d.ts +3 -1
- package/src/ai/xpert-task.model.d.ts +16 -0
- 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/plugin-management.d.ts +13 -0
- package/src/plugin.d.ts +2 -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-notification.schema.d.ts +29 -0
- package/src/user.model.d.ts +11 -0
- package/src/view-extension/client-commands.d.ts +176 -0
- package/src/view-extension/context-event.d.ts +66 -0
- package/src/view-extension/index.d.ts +2 -0
- package/src/view-extension/model.d.ts +2 -158
- package/src/view-extension/workbench-open.d.ts +17 -2
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod/v3';
|
|
2
|
+
import type { JsonSchemaObjectType } from './types';
|
|
3
|
+
import type { XpertProjectTypeRef } from './xpert-project-type.model';
|
|
4
|
+
export type ProjectConfigurationValue = string | number | boolean | null | ProjectConfigurationValue[] | {
|
|
5
|
+
[key: string]: ProjectConfigurationValue;
|
|
6
|
+
};
|
|
7
|
+
export type ProjectConfigurationValues = {
|
|
8
|
+
[key: string]: ProjectConfigurationValue;
|
|
9
|
+
};
|
|
10
|
+
export declare const projectConfigurationValuesSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodType<ProjectConfigurationValue, z.ZodTypeDef, ProjectConfigurationValue>>, Record<string, ProjectConfigurationValue>, Record<string, ProjectConfigurationValue>>;
|
|
11
|
+
export declare const projectConfigurationUpdateSchema: z.ZodObject<{
|
|
12
|
+
revision: z.ZodNumber;
|
|
13
|
+
values: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodType<ProjectConfigurationValue, z.ZodTypeDef, ProjectConfigurationValue>>, Record<string, ProjectConfigurationValue>, Record<string, ProjectConfigurationValue>>;
|
|
14
|
+
}, "strict", z.ZodTypeAny, {
|
|
15
|
+
values?: Record<string, ProjectConfigurationValue>;
|
|
16
|
+
revision?: number;
|
|
17
|
+
}, {
|
|
18
|
+
values?: Record<string, ProjectConfigurationValue>;
|
|
19
|
+
revision?: number;
|
|
20
|
+
}>;
|
|
21
|
+
export type ProjectConfigurationUpdate = z.output<typeof projectConfigurationUpdateSchema>;
|
|
22
|
+
/** Non-secret, type-defined settings. JSON Schema defaults are applied by the host. */
|
|
23
|
+
export interface XpertProjectTypeConfigurationDefinition {
|
|
24
|
+
schema: JsonSchemaObjectType;
|
|
25
|
+
}
|
|
26
|
+
export interface ProjectTaskDurationConfiguration {
|
|
27
|
+
projectType: XpertProjectTypeRef;
|
|
28
|
+
configurationRevision: number;
|
|
29
|
+
/** Absent preserves the tenant's default duration. */
|
|
30
|
+
maxDurationSeconds?: number;
|
|
31
|
+
}
|
|
32
|
+
export interface XpertProjectConfigurationView {
|
|
33
|
+
projectType: XpertProjectTypeRef;
|
|
34
|
+
revision: number;
|
|
35
|
+
schema?: JsonSchemaObjectType;
|
|
36
|
+
values: ProjectConfigurationValues;
|
|
37
|
+
effectiveValues: ProjectConfigurationValues;
|
|
38
|
+
canEdit: boolean;
|
|
39
|
+
taskExecution: {
|
|
40
|
+
configuredMaxDurationSeconds?: number;
|
|
41
|
+
defaultDurationSeconds: number;
|
|
42
|
+
tenantMaxDurationSeconds: number;
|
|
43
|
+
effectiveMaxDurationSeconds: number;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/** Reserved host setting; custom type settings remain uninterpreted by the runtime. */
|
|
47
|
+
export declare const projectTaskDurationSchema: z.ZodNumber;
|
|
48
|
+
export declare function projectTaskConfigurationSchema(defaultSeconds?: number): JsonSchemaObjectType;
|
|
@@ -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;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { I18nObject, IconDefinition } from '../types';
|
|
2
|
+
import type { XpertProjectTypeConfigurationDefinition } from './project-type-configuration.model';
|
|
2
3
|
import type { XpertViewScalar } from '../view-extension/model';
|
|
3
4
|
export interface XpertProjectViewSelection {
|
|
4
5
|
viewKey: string;
|
|
@@ -23,6 +24,7 @@ export interface XpertProjectTypeDefinition {
|
|
|
23
24
|
icon?: IconDefinition;
|
|
24
25
|
/** Entity-backed applications enforce this policy in their business preparation/claim services. */
|
|
25
26
|
taskConcurrency?: XpertProjectTaskConcurrency;
|
|
27
|
+
configuration?: XpertProjectTypeConfigurationDefinition;
|
|
26
28
|
/** Entity types delegate creation and lifecycle to their registered provider. */
|
|
27
29
|
binding: {
|
|
28
30
|
kind: 'project';
|
|
@@ -37,6 +39,7 @@ export interface XpertProjectTypeSummary extends XpertProjectTypeRef {
|
|
|
37
39
|
icon?: IconDefinition;
|
|
38
40
|
binding: XpertProjectTypeDefinition['binding'];
|
|
39
41
|
taskConcurrency?: XpertProjectTaskConcurrency;
|
|
42
|
+
configuration?: XpertProjectTypeConfigurationDefinition;
|
|
40
43
|
available: boolean;
|
|
41
44
|
}
|
|
42
45
|
export interface XpertProjectClassification {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AgentInvocationStatus } from './agent-runtime.model';
|
|
2
|
-
import type { ProjectTaskDecision, ProjectTaskExecutionPurpose, ProjectTaskSpecificationSnapshot } from './project-task-runtime.model';
|
|
2
|
+
import type { ProjectTaskDecision, ProjectTaskReviewSubject, ProjectTaskExecutionPurpose, ProjectTaskSpecificationSnapshot } from './project-task-runtime.model';
|
|
3
3
|
import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
|
|
4
4
|
import { IPagination } from '../core.model';
|
|
5
5
|
import { IIntegration } from '../integration.model';
|
|
@@ -221,6 +221,7 @@ export interface IBasePerXpertProjectEntityModel extends IBasePerTenantAndOrgani
|
|
|
221
221
|
project?: IXpertProject;
|
|
222
222
|
}
|
|
223
223
|
export interface IXpertProjectTask extends IBasePerXpertProjectEntityModel {
|
|
224
|
+
reviewSubject?: ProjectTaskReviewSubject | null;
|
|
224
225
|
controlKind?: 'ordinary' | 'provider' | 'pipeline';
|
|
225
226
|
pipelineInstanceId?: string | null;
|
|
226
227
|
pipelineDisposition?: 'active' | 'removed' | 'excluded' | 'superseded' | null;
|
|
@@ -272,6 +273,7 @@ export interface IXpertProjectTaskConversation extends IBasePerXpertProjectEntit
|
|
|
272
273
|
sourceExecutionId?: string;
|
|
273
274
|
}
|
|
274
275
|
export interface IXpertProjectTaskExecution extends IBasePerXpertProjectEntityModel {
|
|
276
|
+
reviewVerdict?: 'pass' | 'changes_required' | 'indeterminate' | null;
|
|
275
277
|
/** Runtime-owned attempt. Distinct from a native Agent execution ID. */
|
|
276
278
|
invocationId?: string | null;
|
|
277
279
|
invocationStatus?: AgentInvocationStatus | null;
|
|
@@ -26,7 +26,23 @@ export type TXpertTaskScheduleRuntimeState = {
|
|
|
26
26
|
*/
|
|
27
27
|
export interface IXpertTask extends IBasePerTenantAndOrganizationEntityModel, XpertTaskType {
|
|
28
28
|
}
|
|
29
|
+
export type ConversationScheduleMonitor = {
|
|
30
|
+
source: 'menu' | 'agent';
|
|
31
|
+
intervalMinutes: number;
|
|
32
|
+
anchorAt?: string;
|
|
33
|
+
observationRevision?: string;
|
|
34
|
+
notify: 'new-differences';
|
|
35
|
+
} & ({
|
|
36
|
+
target?: 'conversation';
|
|
37
|
+
conversationId: string;
|
|
38
|
+
threadId: string;
|
|
39
|
+
} | {
|
|
40
|
+
target: 'new_chat';
|
|
41
|
+
conversationId?: never;
|
|
42
|
+
threadId?: never;
|
|
43
|
+
});
|
|
29
44
|
export type XpertTaskType = {
|
|
45
|
+
monitor?: ConversationScheduleMonitor | null;
|
|
30
46
|
name?: string;
|
|
31
47
|
schedule?: string;
|
|
32
48
|
options?: TScheduleOptions;
|
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';
|
|
@@ -47,6 +47,19 @@ export interface IPluginUpdateResult extends IPluginInstallResult {
|
|
|
47
47
|
updated: boolean;
|
|
48
48
|
previousVersion?: string;
|
|
49
49
|
}
|
|
50
|
+
/** Installed archive identity and the current process's loaded state; not fleet or business acceptance. */
|
|
51
|
+
export interface IPluginArchiveDeploymentStatus {
|
|
52
|
+
packageName: string;
|
|
53
|
+
expectedVersion: string;
|
|
54
|
+
expectedSha256: string;
|
|
55
|
+
installed: boolean;
|
|
56
|
+
loaded: boolean;
|
|
57
|
+
installedVersion?: string;
|
|
58
|
+
loadedVersion?: string;
|
|
59
|
+
scopeKey?: string;
|
|
60
|
+
runtimeRevision?: string;
|
|
61
|
+
restartRequired: boolean;
|
|
62
|
+
}
|
|
50
63
|
export interface IPluginUninstallResult {
|
|
51
64
|
success: boolean;
|
|
52
65
|
/**
|
package/src/plugin.d.ts
CHANGED
|
@@ -278,6 +278,8 @@ export interface PluginSourceConfig extends PluginCodeSourceConfig {
|
|
|
278
278
|
/** Written by the archive upload endpoint; retained for legacy installation provenance. */
|
|
279
279
|
uploadFileName?: string;
|
|
280
280
|
uploadInstalledAt?: string;
|
|
281
|
+
/** Host-computed SHA-256 of the installed archive; never accepted from client sourceConfig. */
|
|
282
|
+
archiveSha256?: string;
|
|
281
283
|
/** Host-owned immutable installation directory; never supplied as an authorization grant. */
|
|
282
284
|
runtimeName?: string;
|
|
283
285
|
immutableRuntime?: boolean;
|