@xpert-ai/contracts 3.35.0 → 3.37.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.
Files changed (105) hide show
  1. package/context-event.cjs.default.js +1 -0
  2. package/context-event.cjs.js +26 -0
  3. package/context-event.cjs.mjs +2 -0
  4. package/context-event.d.ts +1 -0
  5. package/context-event.esm.js +24 -0
  6. package/index.cjs.default.js +1 -0
  7. package/index.cjs.js +1165 -805
  8. package/index.cjs.mjs +2 -0
  9. package/index.esm.js +1140 -801
  10. package/package.json +18 -2
  11. package/src/agent-plugin.d.ts +4 -29
  12. package/src/ai/agent-output-delivery.model.d.ts +22 -1
  13. package/src/ai/agent-runtime.model.d.ts +4 -4
  14. package/src/ai/assistant-capability.model.d.ts +0 -1
  15. package/src/ai/assistant-template-manifest.model.d.ts +272 -308
  16. package/src/ai/assistant-template-overview.model.d.ts +0 -4
  17. package/src/ai/assistant-template.model.d.ts +0 -4
  18. package/src/ai/bosi.model.d.ts +1 -1
  19. package/src/ai/chat-activity.model.d.ts +13 -0
  20. package/src/ai/chat-message.model.d.ts +0 -11
  21. package/src/ai/chat.model.d.ts +3 -0
  22. package/src/ai/cli-execution.model.d.ts +88 -0
  23. package/src/ai/conversation-trail.model.d.ts +274 -274
  24. package/src/ai/copilot-store.model.d.ts +0 -13
  25. package/src/ai/evolution/entities.d.ts +164 -0
  26. package/src/ai/evolution/evaluation.d.ts +7 -0
  27. package/src/ai/evolution/execution-review.d.ts +68 -0
  28. package/src/ai/evolution/index.d.ts +2 -0
  29. package/src/ai/evolution/provider.d.ts +1 -0
  30. package/src/ai/evolution/target.d.ts +5 -0
  31. package/src/ai/execution-activity.model.d.ts +362 -362
  32. package/src/ai/execution-control-evidence.schema.d.ts +26 -26
  33. package/src/ai/execution-observability.model.d.ts +160 -160
  34. package/src/ai/execution-source.model.d.ts +45 -0
  35. package/src/ai/index.d.ts +2 -0
  36. package/src/ai/middleware.model.d.ts +1 -0
  37. package/src/ai/model-execution.model.d.ts +5 -108
  38. package/src/ai/model-replacement.model.d.ts +12 -12
  39. package/src/ai/project-configuration-view.model.d.ts +1 -0
  40. package/src/ai/project-pipeline/analytics.d.ts +288 -288
  41. package/src/ai/project-pipeline/budget.schema.d.ts +4 -4
  42. package/src/ai/project-pipeline/commands.schema.d.ts +519 -476
  43. package/src/ai/project-pipeline/configuration-declaration.schema.d.ts +3815 -0
  44. package/src/ai/project-pipeline/configuration-form.d.ts +1903 -1759
  45. package/src/ai/project-pipeline/configuration.schema.d.ts +425 -388
  46. package/src/ai/project-pipeline/contribution.schema.d.ts +764 -612
  47. package/src/ai/project-pipeline/definition.schema.d.ts +382 -338
  48. package/src/ai/project-pipeline/execution-statistics.d.ts +30 -30
  49. package/src/ai/project-pipeline/graph.model.d.ts +7 -2
  50. package/src/ai/project-pipeline/human-wait-statistics.d.ts +2 -2
  51. package/src/ai/project-pipeline/index.d.ts +1 -0
  52. package/src/ai/project-pipeline/model-usage-statistics.d.ts +6 -6
  53. package/src/ai/project-pipeline/node.schema.d.ts +57 -44
  54. package/src/ai/project-pipeline/operation.schema.d.ts +378 -378
  55. package/src/ai/project-pipeline/plugin-deployment.schema.d.ts +6 -6
  56. package/src/ai/project-pipeline/portfolio.schema.d.ts +684 -684
  57. package/src/ai/project-pipeline/primitives.schema.d.ts +4 -4
  58. package/src/ai/project-pipeline/projection.schema.d.ts +674 -637
  59. package/src/ai/project-pipeline/provider-actions.schema.d.ts +120 -120
  60. package/src/ai/project-pipeline/queue-statistics.d.ts +34 -34
  61. package/src/ai/project-pipeline/runtime.schema.d.ts +89 -89
  62. package/src/ai/project-pipeline/statistics.d.ts +142 -142
  63. package/src/ai/project-task-runtime.model.d.ts +265 -789
  64. package/src/ai/sandbox-execution-control.schema.d.ts +6 -6
  65. package/src/ai/template-installation.model.d.ts +13 -13
  66. package/src/ai/template-lifecycle.model.d.ts +4 -4
  67. package/src/ai/xpert-agent-execution.model.d.ts +33 -0
  68. package/src/ai/xpert-project.model.d.ts +2 -1
  69. package/src/ai/xpert-tool.model.d.ts +12 -0
  70. package/src/ai/xpert.model.d.ts +0 -34
  71. package/src/ai/xpert.utils.d.ts +0 -1
  72. package/src/always-on/agent-event.model.d.ts +121 -0
  73. package/src/always-on/agent-event.schema.d.ts +139 -0
  74. package/src/always-on/agent-output-reference.schema.d.ts +27 -0
  75. package/src/always-on/agent-output.model.d.ts +411 -0
  76. package/src/always-on/human-decision.model.d.ts +204 -0
  77. package/src/always-on/index.d.ts +3 -0
  78. package/src/always-on/output-workbench.schema.d.ts +154 -0
  79. package/src/analytics/analysis-evidence.model.d.ts +29 -0
  80. package/src/analytics/analytics-certification.model.d.ts +17 -0
  81. package/src/{analytics-definition.model.d.ts → analytics/analytics-definition.model.d.ts} +1 -1
  82. package/src/{analytics-diagnostic.d.ts → analytics/analytics-diagnostic.d.ts} +8 -8
  83. package/src/{analytics-query.model.d.ts → analytics/analytics-query.model.d.ts} +9 -1
  84. package/src/analytics/index.d.ts +7 -0
  85. package/src/{resource-analysis.model.d.ts → analytics/resource-analysis.model.d.ts} +6 -1
  86. package/src/app-platform.d.ts +14 -14
  87. package/src/{artifact-group-reference.model.d.ts → artifacts/artifact-group-reference.model.d.ts} +1 -1
  88. package/src/{artifact-presentation.model.d.ts → artifacts/artifact-presentation.model.d.ts} +1 -1
  89. package/src/{artifact-use-grant-command.d.ts → artifacts/artifact-use-grant-command.d.ts} +1 -1
  90. package/src/{artifact-use-grant.model.d.ts → artifacts/artifact-use-grant.model.d.ts} +2 -2
  91. package/src/{artifact.model.d.ts → artifacts/artifact.model.d.ts} +4 -2
  92. package/src/artifacts/index.d.ts +5 -0
  93. package/src/collaboration.model.d.ts +31 -11
  94. package/src/{content-document.model.d.ts → content/content-document.model.d.ts} +2 -0
  95. package/src/{content-resource.model.d.ts → content/content-resource.model.d.ts} +7 -3
  96. package/src/content/content-transfer.model.d.ts +21 -0
  97. package/src/content/index.d.ts +4 -0
  98. package/src/execution-control-admission.schema.d.ts +2 -2
  99. package/src/icon-definition.schema.d.ts +6 -10
  100. package/src/index.d.ts +5 -14
  101. package/src/secret-token.model.d.ts +4 -4
  102. package/src/user-notification.schema.d.ts +1300 -471
  103. package/src/view-extension/client-commands.d.ts +24 -0
  104. /package/src/{analytics-source.model.d.ts → analytics/analytics-source.model.d.ts} +0 -0
  105. /package/src/{content-reference.model.d.ts → content/content-reference.model.d.ts} +0 -0
@@ -0,0 +1,411 @@
1
+ import { type OutputWorkbench, type OutputWorkbenchTarget } from './output-workbench.schema';
2
+ export type { OutputWorkbench, OutputWorkbenchTarget } from './output-workbench.schema';
3
+ import { agentOutputReferenceSchema } from './agent-output-reference.schema';
4
+ import { type HumanDecision } from './human-decision.model';
5
+ import { z } from 'zod/v3';
6
+ import { type OpenConversationAction } from '../user-notification.schema';
7
+ /** HTTP Accept profile for notification clients that can display agent outputs in list and sync responses. */
8
+ export declare const AGENT_OUTPUT_ACCEPT = "application/json; profile=\"xpert-agent-output-v1\"";
9
+ /**
10
+ * A labeled value the source has cleared for this recipient. Notification details and private
11
+ * decision cards share these display fields, for example a supplier's proposed delivery date.
12
+ */
13
+ export type AgentOutputField = {
14
+ label: {
15
+ en_US: string;
16
+ zh_Hans: string;
17
+ };
18
+ value: string;
19
+ };
20
+ /**
21
+ * One readable result in an in-app notification, which may group several results. The id
22
+ * identifies the delivery member. The host adds a conversation action when navigation is authorized.
23
+ */
24
+ export interface AgentOutputItem {
25
+ id: string;
26
+ title: string;
27
+ action: OpenConversationAction | null;
28
+ fields?: AgentOutputField[];
29
+ workbench?: OutputWorkbenchTarget;
30
+ }
31
+ /** Validates the local delivery window against its time zone, including windows that span midnight. */
32
+ export declare const outputQuietHoursSchema: z.ZodEffects<z.ZodObject<{
33
+ zone: z.ZodEffects<z.ZodString, string, string>;
34
+ start: z.ZodString;
35
+ end: z.ZodString;
36
+ }, "strict", z.ZodTypeAny, {
37
+ start: string;
38
+ zone: string;
39
+ end: string;
40
+ }, {
41
+ start: string;
42
+ zone: string;
43
+ end: string;
44
+ }>, {
45
+ start: string;
46
+ zone: string;
47
+ end: string;
48
+ }, {
49
+ start: string;
50
+ zone: string;
51
+ end: string;
52
+ }>;
53
+ /**
54
+ * A recipient's daily quiet period in local time. Outputs arriving during the period can
55
+ * be grouped for delivery when it ends. An end before the start falls on the following day.
56
+ */
57
+ export type OutputQuietHours = {
58
+ zone: string;
59
+ start: string;
60
+ end: string;
61
+ };
62
+ /** Validates per-channel settings. Enabling private Lark delivery requires a selected integration. */
63
+ export declare const outputPreferenceSchema: z.ZodEffects<z.ZodObject<{
64
+ kind: z.ZodString;
65
+ channel: z.ZodEnum<["in_app", "lark"]>;
66
+ enabled: z.ZodBoolean;
67
+ integrationId: z.ZodNullable<z.ZodString>;
68
+ quiet: z.ZodNullable<z.ZodEffects<z.ZodObject<{
69
+ zone: z.ZodEffects<z.ZodString, string, string>;
70
+ start: z.ZodString;
71
+ end: z.ZodString;
72
+ }, "strict", z.ZodTypeAny, {
73
+ start: string;
74
+ zone: string;
75
+ end: string;
76
+ }, {
77
+ start: string;
78
+ zone: string;
79
+ end: string;
80
+ }>, {
81
+ start: string;
82
+ zone: string;
83
+ end: string;
84
+ }, {
85
+ start: string;
86
+ zone: string;
87
+ end: string;
88
+ }>>;
89
+ }, "strict", z.ZodTypeAny, {
90
+ kind: string;
91
+ channel: "in_app" | "lark";
92
+ enabled: boolean;
93
+ integrationId: string | null;
94
+ quiet: {
95
+ start: string;
96
+ zone: string;
97
+ end: string;
98
+ } | null;
99
+ }, {
100
+ kind: string;
101
+ channel: "in_app" | "lark";
102
+ enabled: boolean;
103
+ integrationId: string | null;
104
+ quiet: {
105
+ start: string;
106
+ zone: string;
107
+ end: string;
108
+ } | null;
109
+ }>, {
110
+ kind: string;
111
+ channel: "in_app" | "lark";
112
+ enabled: boolean;
113
+ integrationId: string | null;
114
+ quiet: {
115
+ start: string;
116
+ zone: string;
117
+ end: string;
118
+ } | null;
119
+ }, {
120
+ kind: string;
121
+ channel: "in_app" | "lark";
122
+ enabled: boolean;
123
+ integrationId: string | null;
124
+ quiet: {
125
+ start: string;
126
+ zone: string;
127
+ end: string;
128
+ } | null;
129
+ }>;
130
+ /**
131
+ * A recipient's delivery policy for one output kind and channel in the current organization.
132
+ * The recipient chooses the channel and quiet period. The source still authorizes each result.
133
+ */
134
+ export type OutputPreference = {
135
+ kind: string;
136
+ channel: 'in_app' | 'lark';
137
+ enabled: boolean;
138
+ integrationId: string | null;
139
+ quiet: OutputQuietHours | null;
140
+ };
141
+ export { agentOutputReferenceSchema };
142
+ /**
143
+ * Identifies a committed result for one recipient, for example a published delivery reminder.
144
+ * The source reuses this reference across handoff retries with the same business revision and
145
+ * publication time. The host assigns a message ID when it accepts the result.
146
+ */
147
+ export type AgentOutputReference = Required<z.output<typeof agentOutputReferenceSchema>>;
148
+ /** Validates the source's current visibility outcome and the content it permits the recipient to see. */
149
+ export declare const agentOutputPresentationSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
150
+ status: z.ZodLiteral<"visible">;
151
+ title: z.ZodString;
152
+ decision: z.ZodOptional<z.ZodObject<{
153
+ type: z.ZodLiteral<"human_decision">;
154
+ schemaVersion: z.ZodLiteral<1>;
155
+ requestVersion: z.ZodNumber;
156
+ choices: z.ZodEffects<z.ZodArray<z.ZodObject<{
157
+ key: z.ZodString;
158
+ label: z.ZodObject<{
159
+ en_US: z.ZodString;
160
+ zh_Hans: z.ZodString;
161
+ }, "strict", z.ZodTypeAny, {
162
+ en_US: string;
163
+ zh_Hans: string;
164
+ }, {
165
+ en_US: string;
166
+ zh_Hans: string;
167
+ }>;
168
+ replyCommand: z.ZodOptional<z.ZodString>;
169
+ }, "strict", z.ZodTypeAny, {
170
+ key: string;
171
+ label: {
172
+ en_US: string;
173
+ zh_Hans: string;
174
+ };
175
+ replyCommand?: string | undefined;
176
+ }, {
177
+ key: string;
178
+ label: {
179
+ en_US: string;
180
+ zh_Hans: string;
181
+ };
182
+ replyCommand?: string | undefined;
183
+ }>, "many">, {
184
+ key: string;
185
+ label: {
186
+ en_US: string;
187
+ zh_Hans: string;
188
+ };
189
+ replyCommand?: string | undefined;
190
+ }[], {
191
+ key: string;
192
+ label: {
193
+ en_US: string;
194
+ zh_Hans: string;
195
+ };
196
+ replyCommand?: string | undefined;
197
+ }[]>;
198
+ }, "strict", z.ZodTypeAny, {
199
+ type: "human_decision";
200
+ schemaVersion: 1;
201
+ requestVersion: number;
202
+ choices: {
203
+ key: string;
204
+ label: {
205
+ en_US: string;
206
+ zh_Hans: string;
207
+ };
208
+ replyCommand?: string | undefined;
209
+ }[];
210
+ }, {
211
+ type: "human_decision";
212
+ schemaVersion: 1;
213
+ requestVersion: number;
214
+ choices: {
215
+ key: string;
216
+ label: {
217
+ en_US: string;
218
+ zh_Hans: string;
219
+ };
220
+ replyCommand?: string | undefined;
221
+ }[];
222
+ }>>;
223
+ workbench: z.ZodOptional<z.ZodObject<{
224
+ state: z.ZodEnum<["pending", "handled"]>;
225
+ title: z.ZodObject<{
226
+ en_US: z.ZodString;
227
+ zh_Hans: z.ZodString;
228
+ }, "strict", z.ZodTypeAny, {
229
+ en_US: string;
230
+ zh_Hans: string;
231
+ }, {
232
+ en_US: string;
233
+ zh_Hans: string;
234
+ }>;
235
+ openLabel: z.ZodObject<{
236
+ en_US: z.ZodString;
237
+ zh_Hans: z.ZodString;
238
+ }, "strict", z.ZodTypeAny, {
239
+ en_US: string;
240
+ zh_Hans: string;
241
+ }, {
242
+ en_US: string;
243
+ zh_Hans: string;
244
+ }>;
245
+ viewKey: z.ZodString;
246
+ selectionId: z.ZodString;
247
+ }, "strict", z.ZodTypeAny, {
248
+ state: "handled" | "pending";
249
+ title: {
250
+ en_US: string;
251
+ zh_Hans: string;
252
+ };
253
+ openLabel: {
254
+ en_US: string;
255
+ zh_Hans: string;
256
+ };
257
+ viewKey: string;
258
+ selectionId: string;
259
+ }, {
260
+ state: "handled" | "pending";
261
+ title: {
262
+ en_US: string;
263
+ zh_Hans: string;
264
+ };
265
+ openLabel: {
266
+ en_US: string;
267
+ zh_Hans: string;
268
+ };
269
+ viewKey: string;
270
+ selectionId: string;
271
+ }>>;
272
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
273
+ label: z.ZodObject<{
274
+ en_US: z.ZodString;
275
+ zh_Hans: z.ZodString;
276
+ }, "strict", z.ZodTypeAny, {
277
+ en_US: string;
278
+ zh_Hans: string;
279
+ }, {
280
+ en_US: string;
281
+ zh_Hans: string;
282
+ }>;
283
+ value: z.ZodString;
284
+ }, "strict", z.ZodTypeAny, {
285
+ value: string;
286
+ label: {
287
+ en_US: string;
288
+ zh_Hans: string;
289
+ };
290
+ }, {
291
+ value: string;
292
+ label: {
293
+ en_US: string;
294
+ zh_Hans: string;
295
+ };
296
+ }>, "many">>;
297
+ conversation: z.ZodCatch<z.ZodOptional<z.ZodObject<{
298
+ conversationId: z.ZodString;
299
+ threadId: z.ZodOptional<z.ZodString>;
300
+ }, "strict", z.ZodTypeAny, {
301
+ conversationId: string;
302
+ threadId?: string | undefined;
303
+ }, {
304
+ conversationId: string;
305
+ threadId?: string | undefined;
306
+ }>>>;
307
+ }, "strict", z.ZodTypeAny, {
308
+ status: "visible";
309
+ title: string;
310
+ fields?: {
311
+ value: string;
312
+ label: {
313
+ en_US: string;
314
+ zh_Hans: string;
315
+ };
316
+ }[] | undefined;
317
+ workbench?: {
318
+ state: "handled" | "pending";
319
+ title: {
320
+ en_US: string;
321
+ zh_Hans: string;
322
+ };
323
+ openLabel: {
324
+ en_US: string;
325
+ zh_Hans: string;
326
+ };
327
+ viewKey: string;
328
+ selectionId: string;
329
+ } | undefined;
330
+ decision?: {
331
+ type: "human_decision";
332
+ schemaVersion: 1;
333
+ requestVersion: number;
334
+ choices: {
335
+ key: string;
336
+ label: {
337
+ en_US: string;
338
+ zh_Hans: string;
339
+ };
340
+ replyCommand?: string | undefined;
341
+ }[];
342
+ } | undefined;
343
+ conversation?: {
344
+ conversationId: string;
345
+ threadId?: string | undefined;
346
+ } | undefined;
347
+ }, {
348
+ status: "visible";
349
+ title: string;
350
+ fields?: {
351
+ value: string;
352
+ label: {
353
+ en_US: string;
354
+ zh_Hans: string;
355
+ };
356
+ }[] | undefined;
357
+ workbench?: {
358
+ state: "handled" | "pending";
359
+ title: {
360
+ en_US: string;
361
+ zh_Hans: string;
362
+ };
363
+ openLabel: {
364
+ en_US: string;
365
+ zh_Hans: string;
366
+ };
367
+ viewKey: string;
368
+ selectionId: string;
369
+ } | undefined;
370
+ decision?: {
371
+ type: "human_decision";
372
+ schemaVersion: 1;
373
+ requestVersion: number;
374
+ choices: {
375
+ key: string;
376
+ label: {
377
+ en_US: string;
378
+ zh_Hans: string;
379
+ };
380
+ replyCommand?: string | undefined;
381
+ }[];
382
+ } | undefined;
383
+ conversation?: unknown;
384
+ }>, z.ZodObject<{
385
+ status: z.ZodEnum<["superseded", "forbidden", "unavailable"]>;
386
+ }, "strict", z.ZodTypeAny, {
387
+ status: "superseded" | "forbidden" | "unavailable";
388
+ }, {
389
+ status: "superseded" | "forbidden" | "unavailable";
390
+ }>]>;
391
+ /**
392
+ * The source resolves the result for its recipient at dispatch and again on read.
393
+ *
394
+ * - `visible` — The source provides content for the recipient and may offer a human decision.
395
+ * - `superseded` — The result is no longer current and is omitted.
396
+ * - `forbidden` — The recipient lacks access to the result and it is omitted.
397
+ * - `unavailable` — The source cannot resolve the result yet. Dispatch may retry, and the current read omits it.
398
+ */
399
+ export type AgentOutputPresentation = {
400
+ status: 'visible';
401
+ title: string;
402
+ workbench?: OutputWorkbench;
403
+ decision?: HumanDecision;
404
+ fields?: AgentOutputField[];
405
+ conversation?: {
406
+ conversationId: string;
407
+ threadId?: string;
408
+ };
409
+ } | {
410
+ status: 'superseded' | 'forbidden' | 'unavailable';
411
+ };
@@ -0,0 +1,204 @@
1
+ import type { AgentOutputField } from './agent-output.model';
2
+ import { z } from 'zod/v3';
3
+ /** Validates the choices a source offers. Choice keys and direct-reply commands must each be unambiguous. */
4
+ export declare const humanDecisionSchema: z.ZodObject<{
5
+ type: z.ZodLiteral<"human_decision">;
6
+ schemaVersion: z.ZodLiteral<1>;
7
+ requestVersion: z.ZodNumber;
8
+ choices: z.ZodEffects<z.ZodArray<z.ZodObject<{
9
+ key: z.ZodString;
10
+ label: z.ZodObject<{
11
+ en_US: z.ZodString;
12
+ zh_Hans: z.ZodString;
13
+ }, "strict", z.ZodTypeAny, {
14
+ en_US: string;
15
+ zh_Hans: string;
16
+ }, {
17
+ en_US: string;
18
+ zh_Hans: string;
19
+ }>;
20
+ replyCommand: z.ZodOptional<z.ZodString>;
21
+ }, "strict", z.ZodTypeAny, {
22
+ key: string;
23
+ label: {
24
+ en_US: string;
25
+ zh_Hans: string;
26
+ };
27
+ replyCommand?: string | undefined;
28
+ }, {
29
+ key: string;
30
+ label: {
31
+ en_US: string;
32
+ zh_Hans: string;
33
+ };
34
+ replyCommand?: string | undefined;
35
+ }>, "many">, {
36
+ key: string;
37
+ label: {
38
+ en_US: string;
39
+ zh_Hans: string;
40
+ };
41
+ replyCommand?: string | undefined;
42
+ }[], {
43
+ key: string;
44
+ label: {
45
+ en_US: string;
46
+ zh_Hans: string;
47
+ };
48
+ replyCommand?: string | undefined;
49
+ }[]>;
50
+ }, "strict", z.ZodTypeAny, {
51
+ type: "human_decision";
52
+ schemaVersion: 1;
53
+ requestVersion: number;
54
+ choices: {
55
+ key: string;
56
+ label: {
57
+ en_US: string;
58
+ zh_Hans: string;
59
+ };
60
+ replyCommand?: string | undefined;
61
+ }[];
62
+ }, {
63
+ type: "human_decision";
64
+ schemaVersion: 1;
65
+ requestVersion: number;
66
+ choices: {
67
+ key: string;
68
+ label: {
69
+ en_US: string;
70
+ zh_Hans: string;
71
+ };
72
+ replyCommand?: string | undefined;
73
+ }[];
74
+ }>;
75
+ /**
76
+ * A request for an authorized person to choose a business outcome. The source defines the choices
77
+ * and their effects. Buttons submit a stable choice key. A quoted reply must match a declared
78
+ * replyCommand. The enclosing output reference identifies the request and business revision.
79
+ */
80
+ export type HumanDecision = z.output<typeof humanDecisionSchema>;
81
+ /** Validates the submission shared by workbench actions and verified private-channel replies. */
82
+ export declare const humanDecisionInputSchema: z.ZodObject<{
83
+ schemaVersion: z.ZodLiteral<1>;
84
+ requestId: z.ZodString;
85
+ sourceRevision: z.ZodString;
86
+ requestVersion: z.ZodNumber;
87
+ choice: z.ZodString;
88
+ commandId: z.ZodString;
89
+ }, "strict", z.ZodTypeAny, {
90
+ schemaVersion: 1;
91
+ requestVersion: number;
92
+ requestId: string;
93
+ sourceRevision: string;
94
+ choice: string;
95
+ commandId: string;
96
+ }, {
97
+ schemaVersion: 1;
98
+ requestVersion: number;
99
+ requestId: string;
100
+ sourceRevision: string;
101
+ choice: string;
102
+ commandId: string;
103
+ }>;
104
+ /**
105
+ * One choice for the request and business revision the person saw. requestVersion identifies
106
+ * the state of the decision request. sourceRevision identifies the underlying business terms.
107
+ * Retries reuse commandId. The source arbitrates competing submissions under the authenticated actor.
108
+ */
109
+ export type HumanDecisionInput = z.output<typeof humanDecisionInputSchema>;
110
+ /** Outcomes the workbench and channels can report after a submission is evaluated. */
111
+ export declare const humanDecisionStatusSchema: z.ZodEnum<["recorded", "already_recorded", "conflicting_choice", "stale", "closed", "forbidden"]>;
112
+ /**
113
+ * Outcome of submitting a choice for a decision request.
114
+ *
115
+ * - `recorded` — The source committed the choice.
116
+ * - `already_recorded` — The source previously committed the same choice for this request.
117
+ * - `conflicting_choice` — The choice conflicts with a recorded decision, or the command ID was reused with different input.
118
+ * - `stale` — The submitted version is out of date. Review the current request before choosing again.
119
+ * - `closed` — The request no longer accepts choices.
120
+ * - `forbidden` — The submission could not be authorized.
121
+ */
122
+ export type HumanDecisionStatus = z.infer<typeof humanDecisionStatusSchema>;
123
+ /** Submission outcomes that can replace the actionable controls on the original private card. */
124
+ export declare const privateDecisionFeedbackStatusSchema: z.ZodEnum<["recorded", "already_recorded", "stale", "closed"]>;
125
+ /** A visible outcome for the original recipient. Conflicts and unauthorized attempts leave the card untouched. */
126
+ export type PrivateDecisionFeedbackStatus = z.infer<typeof privateDecisionFeedbackStatusSchema>;
127
+ /**
128
+ * Result returned to the caller after submitting a choice. When present, decisionId identifies the source's durable
129
+ * business decision. Concurrent submissions from different channels can return the same ID.
130
+ */
131
+ export type HumanDecisionResult = {
132
+ status: HumanDecisionStatus;
133
+ decisionId?: string;
134
+ };
135
+ /** Accepts a button callback or a reply quoting a specific message, together with its sender and chat. */
136
+ export declare const privateDecisionReplySchema: z.ZodObject<{
137
+ parentId: z.ZodString;
138
+ chatId: z.ZodString;
139
+ openId: z.ZodString;
140
+ unionId: z.ZodOptional<z.ZodString>;
141
+ input: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
142
+ type: z.ZodLiteral<"button">;
143
+ interactionId: z.ZodString;
144
+ choice: z.ZodString;
145
+ }, "strict", z.ZodTypeAny, {
146
+ type: "button";
147
+ choice: string;
148
+ interactionId: string;
149
+ }, {
150
+ type: "button";
151
+ choice: string;
152
+ interactionId: string;
153
+ }>, z.ZodObject<{
154
+ type: z.ZodLiteral<"quoted_text">;
155
+ text: z.ZodString;
156
+ }, "strict", z.ZodTypeAny, {
157
+ type: "quoted_text";
158
+ text: string;
159
+ }, {
160
+ type: "quoted_text";
161
+ text: string;
162
+ }>]>;
163
+ }, "strict", z.ZodTypeAny, {
164
+ parentId: string;
165
+ chatId: string;
166
+ openId: string;
167
+ input: {
168
+ type: "button";
169
+ choice: string;
170
+ interactionId: string;
171
+ } | {
172
+ type: "quoted_text";
173
+ text: string;
174
+ };
175
+ unionId?: string | undefined;
176
+ }, {
177
+ parentId: string;
178
+ chatId: string;
179
+ openId: string;
180
+ input: {
181
+ type: "button";
182
+ choice: string;
183
+ interactionId: string;
184
+ } | {
185
+ type: "quoted_text";
186
+ text: string;
187
+ };
188
+ unionId?: string | undefined;
189
+ }>;
190
+ /**
191
+ * Channel evidence for a button click or a direct reply quoting the original card.
192
+ * The host matches `parentId` and `chatId` to the delivery and checks the sender's current identity
193
+ * binding before translating the button key or declared reply command into a decision input.
194
+ */
195
+ export type PrivateDecisionReply = z.output<typeof privateDecisionReplySchema>;
196
+ /**
197
+ * A single recipient's decision as delivered to a private chat. The channel renders the
198
+ * authorized fields and choices, using the host's delivery attempt ID to correlate button replies.
199
+ */
200
+ export interface PrivateDecisionCard {
201
+ title: string;
202
+ fields: AgentOutputField[];
203
+ decision: HumanDecision;
204
+ }
@@ -0,0 +1,3 @@
1
+ export * from './agent-event.model';
2
+ export * from './agent-output.model';
3
+ export * from './human-decision.model';