@xpert-ai/contracts 3.34.0 → 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.
@@ -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;
@@ -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;
@@ -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;
@@ -310,6 +310,29 @@ export declare const notificationSourceSchema: z.ZodObject<{
310
310
  taskId?: string;
311
311
  assistantId?: string;
312
312
  }>;
313
+ export declare const scheduledNotificationOriginSchema: z.ZodObject<{
314
+ type: z.ZodLiteral<"scheduled_task">;
315
+ taskId: z.ZodString;
316
+ executionId: z.ZodString;
317
+ assistantId: z.ZodString;
318
+ conversationId: z.ZodString;
319
+ } & {
320
+ threadId: z.ZodOptional<z.ZodString>;
321
+ }, "strict", z.ZodTypeAny, {
322
+ type?: "scheduled_task";
323
+ conversationId?: string;
324
+ executionId?: string;
325
+ taskId?: string;
326
+ threadId?: string;
327
+ assistantId?: string;
328
+ }, {
329
+ type?: "scheduled_task";
330
+ conversationId?: string;
331
+ executionId?: string;
332
+ taskId?: string;
333
+ threadId?: string;
334
+ assistantId?: string;
335
+ }>;
313
336
  export declare const userNotificationSchema: z.ZodObject<{
314
337
  id: z.ZodString;
315
338
  kind: z.ZodLiteral<"agent.completed">;
@@ -670,17 +693,21 @@ export declare const notificationOutboxPayloadSchema: z.ZodDiscriminatedUnion<"t
670
693
  executionId: z.ZodString;
671
694
  assistantId: z.ZodString;
672
695
  conversationId: z.ZodString;
696
+ } & {
697
+ threadId: z.ZodOptional<z.ZodString>;
673
698
  }, "strict", z.ZodTypeAny, {
674
699
  type?: "scheduled_task";
675
700
  conversationId?: string;
676
701
  executionId?: string;
677
702
  taskId?: string;
703
+ threadId?: string;
678
704
  assistantId?: string;
679
705
  }, {
680
706
  type?: "scheduled_task";
681
707
  conversationId?: string;
682
708
  executionId?: string;
683
709
  taskId?: string;
710
+ threadId?: string;
684
711
  assistantId?: string;
685
712
  }>;
686
713
  }, "strict", z.ZodTypeAny, {
@@ -690,6 +717,7 @@ export declare const notificationOutboxPayloadSchema: z.ZodDiscriminatedUnion<"t
690
717
  conversationId?: string;
691
718
  executionId?: string;
692
719
  taskId?: string;
720
+ threadId?: string;
693
721
  assistantId?: string;
694
722
  };
695
723
  }, {
@@ -699,6 +727,7 @@ export declare const notificationOutboxPayloadSchema: z.ZodDiscriminatedUnion<"t
699
727
  conversationId?: string;
700
728
  executionId?: string;
701
729
  taskId?: string;
730
+ threadId?: string;
702
731
  assistantId?: string;
703
732
  };
704
733
  }>]>;
@@ -0,0 +1,66 @@
1
+ import { z } from 'zod/v3';
2
+ /** Context revision and runtime scope delivered by an authorized Remote View host. */
3
+ export declare const viewContextEventSchema: z.ZodEffects<z.ZodObject<{
4
+ type: z.ZodLiteral<"view.context.changed">;
5
+ data: z.ZodObject<{
6
+ revision: z.ZodNumber;
7
+ runtimeScope: z.ZodObject<{
8
+ projectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
+ conversationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ conversationId?: string;
12
+ projectId?: string;
13
+ }, {
14
+ conversationId?: string;
15
+ projectId?: string;
16
+ }>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ revision?: number;
19
+ runtimeScope?: {
20
+ conversationId?: string;
21
+ projectId?: string;
22
+ };
23
+ }, {
24
+ revision?: number;
25
+ runtimeScope?: {
26
+ conversationId?: string;
27
+ projectId?: string;
28
+ };
29
+ }>;
30
+ }, "strip", z.ZodTypeAny, {
31
+ type?: "view.context.changed";
32
+ data?: {
33
+ revision?: number;
34
+ runtimeScope?: {
35
+ conversationId?: string;
36
+ projectId?: string;
37
+ };
38
+ };
39
+ }, {
40
+ type?: "view.context.changed";
41
+ data?: {
42
+ revision?: number;
43
+ runtimeScope?: {
44
+ conversationId?: string;
45
+ projectId?: string;
46
+ };
47
+ };
48
+ }>, {
49
+ type: "view.context.changed";
50
+ data: {
51
+ revision: number;
52
+ runtimeScope: {
53
+ conversationId?: string;
54
+ projectId?: string;
55
+ };
56
+ };
57
+ }, {
58
+ type?: "view.context.changed";
59
+ data?: {
60
+ revision?: number;
61
+ runtimeScope?: {
62
+ conversationId?: string;
63
+ projectId?: string;
64
+ };
65
+ };
66
+ }>;
@@ -4,3 +4,4 @@ export * from './assistant-profile';
4
4
  export * from './workbench';
5
5
  export * from './workbench-open';
6
6
  export * from './workspace-connector';
7
+ export * from './context-event';