@xpert-ai/contracts 3.26.1 → 3.27.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xpert-ai/contracts",
3
- "version": "3.26.1",
3
+ "version": "3.27.0",
4
4
  "license": "AGPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "@octokit/types": "13.10.0",
23
23
  "@types/json-schema": "^7.0.15",
24
- "@xpert-ai/chatkit-types": "~0.17.0",
24
+ "@xpert-ai/chatkit-types": "~0.19.0",
25
25
  "zod-to-json-schema": "^3.25.2"
26
26
  },
27
27
  "peerDependencies": {
@@ -247,3 +247,5 @@ export interface InstalledAgentPlugin extends Omit<WorkspaceAgentPlugin, 'status
247
247
  scope: 'tenant' | 'organization';
248
248
  status: 'available' | 'configuration_required' | 'disabled';
249
249
  }
250
+ /** Storage faults are distinct from dependency compatibility and installation snapshot changes. */
251
+ export type AgentPluginStorageErrorCode = 'AGENT_PLUGIN_STORAGE_MISSING' | 'AGENT_PLUGIN_STORAGE_UNREADABLE' | 'AGENT_PLUGIN_STORAGE_CORRUPT';
@@ -0,0 +1,32 @@
1
+ import type { TChatCheckpointReference } from './chat.model';
2
+ /** Server-owned boundaries. An input retry may repeat completed actions; latest is not an automatic resume grant. */
3
+ export type TChatExecutionRecovery = {
4
+ version: 1;
5
+ graphRevision: string;
6
+ input?: TChatCheckpointReference;
7
+ latest: TChatCheckpointReference;
8
+ };
9
+ export type TChatRecoveryErrorCode = 'conversation_graph_changed' | 'conversation_recovery_unavailable' | 'conversation_branch_selection_changed';
10
+ export type TChatRecoveryError = {
11
+ code: TChatRecoveryErrorCode;
12
+ message: string;
13
+ };
14
+ export type TMessageEditAdmission = {
15
+ version: 1;
16
+ state: 'pending' | 'admitted';
17
+ workingThreadId: string;
18
+ workingThreadRevision: number;
19
+ };
20
+ /** Internal diagnostic result. ChatKit receives only TChatThreadCapabilities. */
21
+ export type TChatThreadRecovery = {
22
+ threadId: string;
23
+ executionId?: string;
24
+ canRetry: boolean;
25
+ reason?: TChatRecoveryErrorCode;
26
+ originalError?: string;
27
+ sourceThreadId?: string;
28
+ };
29
+ /** Chat clients consume availability only; diagnostic details stay server-side. */
30
+ export type TChatThreadCapabilities = {
31
+ canRetry: boolean;
32
+ };
@@ -133,6 +133,8 @@ export declare const ChatThreadPurpose: {
133
133
  export type TChatThreadPurpose = (typeof ChatThreadPurpose)[keyof typeof ChatThreadPurpose];
134
134
  /** Machine-readable keys stored in `ChatConversationThread.metadata`. */
135
135
  export type TChatThreadMetadata = {
136
+ /** Server-owned admission for historical-message edits. */
137
+ editAdmission?: import('./chat-recovery.model').TMessageEditAdmission;
136
138
  /** User-editable branch label, independent of the conversation title. */
137
139
  title?: string;
138
140
  primary?: boolean;
@@ -178,6 +180,8 @@ export type TSensitiveOperation = {
178
180
  * Corresponds to the thread in the [Agent Protocol](https://github.com/langchain-ai/agent-protocol).
179
181
  */
180
182
  export interface IChatConversation extends IBasePerTenantAndOrganizationEntityModel {
183
+ /** Optimistic concurrency token for the persisted working-thread selection. */
184
+ workingThreadRevision?: number;
181
185
  /**
182
186
  * `private`: ordinary chat; `group`: shared public transcript; `group_assistant_runtime`:
183
187
  * one member Assistant's isolated execution history. Optional for legacy DTOs (treated as private).
package/src/ai/index.d.ts CHANGED
@@ -21,6 +21,7 @@ export { createResourceCardContent, isResourceCardContent, parseResourceCard, pa
21
21
  export type { ConversationResourceCard, ResourceCardImage, ResourceCardOpenTarget, ResourceCardScalar, TMessageContentResourceCard } from './resource-card';
22
22
  export * from './thread-goal.model';
23
23
  export * from './chat.model';
24
+ export * from './chat-recovery.model';
24
25
  export * from './chat-message.model';
25
26
  export * from './chat-task-summary.model';
26
27
  export * from './chat-message-feedback.model';
@@ -120,3 +121,4 @@ export * from './assistant-template-setup.model';
120
121
  export * from './template-activity.model';
121
122
  export * from './template-lifecycle.model';
122
123
  export * from './assistant-template-overview.model';
124
+ export * from './run-display-snapshot.model';
@@ -30,6 +30,22 @@ export declare const projectPipelineConfigureSchema: z.ZodObject<{
30
30
  key: z.ZodEffects<z.ZodString, string, string>;
31
31
  version: z.ZodString;
32
32
  title: z.ZodString;
33
+ projectTypes: z.ZodEffects<z.ZodArray<z.ZodObject<{
34
+ applicationKey: z.ZodString;
35
+ projectTypeKey: z.ZodString;
36
+ }, "strict", z.ZodTypeAny, {
37
+ applicationKey: string;
38
+ projectTypeKey: string;
39
+ }, {
40
+ applicationKey: string;
41
+ projectTypeKey: string;
42
+ }>, "many">, {
43
+ applicationKey: string;
44
+ projectTypeKey: string;
45
+ }[], {
46
+ applicationKey: string;
47
+ projectTypeKey: string;
48
+ }[]>;
33
49
  subjectResolverRef: z.ZodString;
34
50
  roles: z.ZodArray<z.ZodObject<{
35
51
  key: z.ZodEffects<z.ZodString, string, string>;
@@ -106,6 +122,10 @@ export declare const projectPipelineConfigureSchema: z.ZodObject<{
106
122
  };
107
123
  version: string;
108
124
  title: string;
125
+ projectTypes: {
126
+ applicationKey: string;
127
+ projectTypeKey: string;
128
+ }[];
109
129
  subjectResolverRef: string;
110
130
  roles: {
111
131
  key: string;
@@ -147,6 +167,10 @@ export declare const projectPipelineConfigureSchema: z.ZodObject<{
147
167
  };
148
168
  version: string;
149
169
  title: string;
170
+ projectTypes: {
171
+ applicationKey: string;
172
+ projectTypeKey: string;
173
+ }[];
150
174
  subjectResolverRef: string;
151
175
  roles: {
152
176
  key: string;
@@ -1081,6 +1105,22 @@ export declare const projectPipelineConfigureSchema: z.ZodObject<{
1081
1105
  key: z.ZodEffects<z.ZodString, string, string>;
1082
1106
  version: z.ZodString;
1083
1107
  title: z.ZodString;
1108
+ projectTypes: z.ZodEffects<z.ZodArray<z.ZodObject<{
1109
+ applicationKey: z.ZodString;
1110
+ projectTypeKey: z.ZodString;
1111
+ }, "strict", z.ZodTypeAny, {
1112
+ applicationKey: string;
1113
+ projectTypeKey: string;
1114
+ }, {
1115
+ applicationKey: string;
1116
+ projectTypeKey: string;
1117
+ }>, "many">, {
1118
+ applicationKey: string;
1119
+ projectTypeKey: string;
1120
+ }[], {
1121
+ applicationKey: string;
1122
+ projectTypeKey: string;
1123
+ }[]>;
1084
1124
  subjectResolverRef: z.ZodString;
1085
1125
  roles: z.ZodArray<z.ZodObject<{
1086
1126
  key: z.ZodEffects<z.ZodString, string, string>;
@@ -1155,6 +1195,10 @@ export declare const projectPipelineConfigureSchema: z.ZodObject<{
1155
1195
  };
1156
1196
  version: string;
1157
1197
  title: string;
1198
+ projectTypes: {
1199
+ applicationKey: string;
1200
+ projectTypeKey: string;
1201
+ }[];
1158
1202
  subjectResolverRef: string;
1159
1203
  roles: {
1160
1204
  key: string;
@@ -1394,6 +1438,10 @@ export declare const projectPipelineConfigureSchema: z.ZodObject<{
1394
1438
  };
1395
1439
  version: string;
1396
1440
  title: string;
1441
+ projectTypes: {
1442
+ applicationKey: string;
1443
+ projectTypeKey: string;
1444
+ }[];
1397
1445
  subjectResolverRef: string;
1398
1446
  roles: {
1399
1447
  key: string;
@@ -1635,6 +1683,10 @@ export declare const projectPipelineConfigureSchema: z.ZodObject<{
1635
1683
  };
1636
1684
  version: string;
1637
1685
  title: string;
1686
+ projectTypes: {
1687
+ applicationKey: string;
1688
+ projectTypeKey: string;
1689
+ }[];
1638
1690
  subjectResolverRef: string;
1639
1691
  roles: {
1640
1692
  key: string;
@@ -1674,6 +1726,10 @@ export declare const projectPipelineConfigureSchema: z.ZodObject<{
1674
1726
  };
1675
1727
  version: string;
1676
1728
  title: string;
1729
+ projectTypes: {
1730
+ applicationKey: string;
1731
+ projectTypeKey: string;
1732
+ }[];
1677
1733
  subjectResolverRef: string;
1678
1734
  roles: {
1679
1735
  key: string;
@@ -1915,6 +1971,10 @@ export declare const projectPipelineConfigureSchema: z.ZodObject<{
1915
1971
  };
1916
1972
  version: string;
1917
1973
  title: string;
1974
+ projectTypes: {
1975
+ applicationKey: string;
1976
+ projectTypeKey: string;
1977
+ }[];
1918
1978
  subjectResolverRef: string;
1919
1979
  roles: {
1920
1980
  key: string;
@@ -1954,6 +2014,10 @@ export declare const projectPipelineConfigureSchema: z.ZodObject<{
1954
2014
  };
1955
2015
  version: string;
1956
2016
  title: string;
2017
+ projectTypes: {
2018
+ applicationKey: string;
2019
+ projectTypeKey: string;
2020
+ }[];
1957
2021
  subjectResolverRef: string;
1958
2022
  roles: {
1959
2023
  key: string;
@@ -2393,6 +2457,10 @@ export declare const projectPipelineConfigureSchema: z.ZodObject<{
2393
2457
  };
2394
2458
  version: string;
2395
2459
  title: string;
2460
+ projectTypes: {
2461
+ applicationKey: string;
2462
+ projectTypeKey: string;
2463
+ }[];
2396
2464
  subjectResolverRef: string;
2397
2465
  roles: {
2398
2466
  key: string;
@@ -2432,6 +2500,10 @@ export declare const projectPipelineConfigureSchema: z.ZodObject<{
2432
2500
  };
2433
2501
  version: string;
2434
2502
  title: string;
2503
+ projectTypes: {
2504
+ applicationKey: string;
2505
+ projectTypeKey: string;
2506
+ }[];
2435
2507
  subjectResolverRef: string;
2436
2508
  roles: {
2437
2509
  key: string;
@@ -2707,6 +2779,10 @@ export declare const projectPipelineConfigureSchema: z.ZodObject<{
2707
2779
  };
2708
2780
  version: string;
2709
2781
  title: string;
2782
+ projectTypes: {
2783
+ applicationKey: string;
2784
+ projectTypeKey: string;
2785
+ }[];
2710
2786
  subjectResolverRef: string;
2711
2787
  roles: {
2712
2788
  key: string;
@@ -2746,6 +2822,10 @@ export declare const projectPipelineConfigureSchema: z.ZodObject<{
2746
2822
  };
2747
2823
  version: string;
2748
2824
  title: string;
2825
+ projectTypes: {
2826
+ applicationKey: string;
2827
+ projectTypeKey: string;
2828
+ }[];
2749
2829
  subjectResolverRef: string;
2750
2830
  roles: {
2751
2831
  key: string;
@@ -3021,6 +3101,10 @@ export declare const projectPipelineConfigureSchema: z.ZodObject<{
3021
3101
  };
3022
3102
  version: string;
3023
3103
  title: string;
3104
+ projectTypes: {
3105
+ applicationKey: string;
3106
+ projectTypeKey: string;
3107
+ }[];
3024
3108
  subjectResolverRef: string;
3025
3109
  roles: {
3026
3110
  key: string;
@@ -3060,6 +3144,10 @@ export declare const projectPipelineConfigureSchema: z.ZodObject<{
3060
3144
  };
3061
3145
  version: string;
3062
3146
  title: string;
3147
+ projectTypes: {
3148
+ applicationKey: string;
3149
+ projectTypeKey: string;
3150
+ }[];
3063
3151
  subjectResolverRef: string;
3064
3152
  roles: {
3065
3153
  key: string;
@@ -3335,6 +3423,10 @@ export declare const projectPipelineConfigureSchema: z.ZodObject<{
3335
3423
  };
3336
3424
  version: string;
3337
3425
  title: string;
3426
+ projectTypes: {
3427
+ applicationKey: string;
3428
+ projectTypeKey: string;
3429
+ }[];
3338
3430
  subjectResolverRef: string;
3339
3431
  roles: {
3340
3432
  key: string;
@@ -3374,6 +3466,10 @@ export declare const projectPipelineConfigureSchema: z.ZodObject<{
3374
3466
  };
3375
3467
  version: string;
3376
3468
  title: string;
3469
+ projectTypes: {
3470
+ applicationKey: string;
3471
+ projectTypeKey: string;
3472
+ }[];
3377
3473
  subjectResolverRef: string;
3378
3474
  roles: {
3379
3475
  key: string;
@@ -3652,6 +3748,10 @@ export declare const projectPipelineConfigureSchema: z.ZodObject<{
3652
3748
  };
3653
3749
  version: string;
3654
3750
  title: string;
3751
+ projectTypes: {
3752
+ applicationKey: string;
3753
+ projectTypeKey: string;
3754
+ }[];
3655
3755
  subjectResolverRef: string;
3656
3756
  roles: {
3657
3757
  key: string;
@@ -3691,6 +3791,10 @@ export declare const projectPipelineConfigureSchema: z.ZodObject<{
3691
3791
  };
3692
3792
  version: string;
3693
3793
  title: string;
3794
+ projectTypes: {
3795
+ applicationKey: string;
3796
+ projectTypeKey: string;
3797
+ }[];
3694
3798
  subjectResolverRef: string;
3695
3799
  roles: {
3696
3800
  key: string;
@@ -3969,6 +4073,10 @@ export declare const projectPipelineConfigureSchema: z.ZodObject<{
3969
4073
  };
3970
4074
  version: string;
3971
4075
  title: string;
4076
+ projectTypes: {
4077
+ applicationKey: string;
4078
+ projectTypeKey: string;
4079
+ }[];
3972
4080
  subjectResolverRef: string;
3973
4081
  roles: {
3974
4082
  key: string;
@@ -4008,6 +4116,10 @@ export declare const projectPipelineConfigureSchema: z.ZodObject<{
4008
4116
  };
4009
4117
  version: string;
4010
4118
  title: string;
4119
+ projectTypes: {
4120
+ applicationKey: string;
4121
+ projectTypeKey: string;
4122
+ }[];
4011
4123
  subjectResolverRef: string;
4012
4124
  roles: {
4013
4125
  key: string;