@xpert-ai/contracts 3.34.0 → 3.36.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 (106) 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 +670 -319
  8. package/index.cjs.mjs +2 -0
  9. package/index.esm.js +637 -318
  10. package/package.json +18 -2
  11. package/src/agent-event.model.d.ts +88 -0
  12. package/src/agent-event.schema.d.ts +120 -0
  13. package/src/agent-plugin.d.ts +4 -29
  14. package/src/ai/agent-output-delivery.model.d.ts +22 -1
  15. package/src/ai/agent-runtime.model.d.ts +4 -4
  16. package/src/ai/assistant-capability.model.d.ts +0 -1
  17. package/src/ai/assistant-template-manifest.model.d.ts +316 -352
  18. package/src/ai/assistant-template-overview.model.d.ts +0 -4
  19. package/src/ai/assistant-template-setup.model.d.ts +8 -8
  20. package/src/ai/assistant-template.model.d.ts +0 -4
  21. package/src/ai/bosi.model.d.ts +1 -1
  22. package/src/ai/chat-activity.model.d.ts +8 -0
  23. package/src/ai/chat-message.model.d.ts +0 -11
  24. package/src/ai/chat.model.d.ts +1 -0
  25. package/src/ai/cli-execution.model.d.ts +88 -0
  26. package/src/ai/conversation-trail.model.d.ts +274 -274
  27. package/src/ai/copilot-store.model.d.ts +0 -13
  28. package/src/ai/evolution/entities.d.ts +164 -0
  29. package/src/ai/evolution/evaluation.d.ts +7 -0
  30. package/src/ai/evolution/execution-review.d.ts +68 -0
  31. package/src/ai/evolution/index.d.ts +2 -0
  32. package/src/ai/evolution/provider.d.ts +1 -0
  33. package/src/ai/evolution/target.d.ts +5 -0
  34. package/src/ai/execution-activity.model.d.ts +362 -362
  35. package/src/ai/execution-control-evidence.schema.d.ts +22 -22
  36. package/src/ai/execution-observability.model.d.ts +196 -196
  37. package/src/ai/execution-source.model.d.ts +45 -0
  38. package/src/ai/index.d.ts +4 -0
  39. package/src/ai/mcp-execution-control.schema.d.ts +2 -2
  40. package/src/ai/middleware.model.d.ts +1 -0
  41. package/src/ai/model-execution.model.d.ts +7 -108
  42. package/src/ai/model-replacement.model.d.ts +18 -18
  43. package/src/ai/project-configuration-view.model.d.ts +78 -0
  44. package/src/ai/project-pipeline/analytics.d.ts +192 -192
  45. package/src/ai/project-pipeline/budget.schema.d.ts +38 -0
  46. package/src/ai/project-pipeline/commands.schema.d.ts +543 -500
  47. package/src/ai/project-pipeline/configuration-form.d.ts +1980 -1836
  48. package/src/ai/project-pipeline/configuration.schema.d.ts +450 -413
  49. package/src/ai/project-pipeline/contribution.schema.d.ts +688 -639
  50. package/src/ai/project-pipeline/definition.schema.d.ts +400 -356
  51. package/src/ai/project-pipeline/execution-statistics.d.ts +18 -18
  52. package/src/ai/project-pipeline/graph.model.d.ts +5 -0
  53. package/src/ai/project-pipeline/human-wait-statistics.d.ts +2 -2
  54. package/src/ai/project-pipeline/index.d.ts +1 -0
  55. package/src/ai/project-pipeline/model-usage-statistics.d.ts +6 -6
  56. package/src/ai/project-pipeline/node.schema.d.ts +57 -44
  57. package/src/ai/project-pipeline/operation.schema.d.ts +338 -338
  58. package/src/ai/project-pipeline/plugin-deployment.schema.d.ts +152 -0
  59. package/src/ai/project-pipeline/portfolio.schema.d.ts +468 -468
  60. package/src/ai/project-pipeline/primitives.schema.d.ts +6 -6
  61. package/src/ai/project-pipeline/projection.schema.d.ts +609 -572
  62. package/src/ai/project-pipeline/provider-actions.schema.d.ts +112 -112
  63. package/src/ai/project-pipeline/queue-statistics.d.ts +10 -10
  64. package/src/ai/project-pipeline/runtime.schema.d.ts +62 -62
  65. package/src/ai/project-pipeline/statistics.d.ts +100 -100
  66. package/src/ai/project-task-runtime.model.d.ts +969 -242
  67. package/src/ai/project-type-configuration.model.d.ts +48 -0
  68. package/src/ai/sandbox-execution-control.schema.d.ts +6 -6
  69. package/src/ai/template-installation.model.d.ts +18 -18
  70. package/src/ai/template-lifecycle.model.d.ts +6 -6
  71. package/src/ai/thread-control-view.schema.d.ts +4 -4
  72. package/src/ai/xpert-agent-execution.model.d.ts +4 -0
  73. package/src/ai/xpert-project-type.model.d.ts +3 -0
  74. package/src/ai/xpert-project.model.d.ts +4 -1
  75. package/src/ai/xpert-task.model.d.ts +16 -0
  76. package/src/ai/xpert.model.d.ts +0 -34
  77. package/src/ai/xpert.utils.d.ts +0 -1
  78. package/src/analytics/analysis-evidence.model.d.ts +29 -0
  79. package/src/analytics/analytics-certification.model.d.ts +17 -0
  80. package/src/{analytics-definition.model.d.ts → analytics/analytics-definition.model.d.ts} +1 -1
  81. package/src/{analytics-diagnostic.d.ts → analytics/analytics-diagnostic.d.ts} +8 -8
  82. package/src/{analytics-query.model.d.ts → analytics/analytics-query.model.d.ts} +9 -1
  83. package/src/analytics/index.d.ts +7 -0
  84. package/src/{resource-analysis.model.d.ts → analytics/resource-analysis.model.d.ts} +6 -1
  85. package/src/app-platform.d.ts +16 -16
  86. package/src/{artifact-group-reference.model.d.ts → artifacts/artifact-group-reference.model.d.ts} +1 -1
  87. package/src/{artifact-presentation.model.d.ts → artifacts/artifact-presentation.model.d.ts} +1 -1
  88. package/src/{artifact-use-grant-command.d.ts → artifacts/artifact-use-grant-command.d.ts} +1 -1
  89. package/src/{artifact-use-grant.model.d.ts → artifacts/artifact-use-grant.model.d.ts} +2 -2
  90. package/src/{artifact.model.d.ts → artifacts/artifact.model.d.ts} +2 -2
  91. package/src/artifacts/index.d.ts +5 -0
  92. package/src/collaboration.model.d.ts +31 -11
  93. package/src/{content-document.model.d.ts → content/content-document.model.d.ts} +2 -0
  94. package/src/{content-resource.model.d.ts → content/content-resource.model.d.ts} +6 -3
  95. package/src/content/content-transfer.model.d.ts +21 -0
  96. package/src/content/index.d.ts +4 -0
  97. package/src/execution-control-admission.schema.d.ts +2 -2
  98. package/src/index.d.ts +5 -14
  99. package/src/plugin-management.d.ts +13 -0
  100. package/src/plugin.d.ts +2 -0
  101. package/src/user-notification.schema.d.ts +75 -28
  102. package/src/view-extension/client-commands.d.ts +24 -0
  103. package/src/view-extension/context-event.d.ts +66 -0
  104. package/src/view-extension/index.d.ts +1 -0
  105. /package/src/{analytics-source.model.d.ts → analytics/analytics-source.model.d.ts} +0 -0
  106. /package/src/{content-reference.model.d.ts → content/content-reference.model.d.ts} +0 -0
@@ -160,8 +160,8 @@ export declare const updateAnnouncementSchema: z.ZodEffects<z.ZodObject<{
160
160
  } & {
161
161
  revision: z.ZodNumber;
162
162
  }, "strict", z.ZodTypeAny, {
163
- category?: "general" | "maintenance" | "model_retirement";
164
163
  revision?: number;
164
+ category?: "general" | "maintenance" | "model_retirement";
165
165
  title?: string;
166
166
  expiresAt?: string;
167
167
  action?: {
@@ -174,8 +174,8 @@ export declare const updateAnnouncementSchema: z.ZodEffects<z.ZodObject<{
174
174
  clients?: ("desktop" | "web")[];
175
175
  startsAt?: string;
176
176
  }, {
177
- category?: "general" | "maintenance" | "model_retirement";
178
177
  revision?: number;
178
+ category?: "general" | "maintenance" | "model_retirement";
179
179
  title?: string;
180
180
  expiresAt?: string;
181
181
  action?: {
@@ -188,8 +188,8 @@ export declare const updateAnnouncementSchema: z.ZodEffects<z.ZodObject<{
188
188
  clients?: ("desktop" | "web")[];
189
189
  startsAt?: string;
190
190
  }>, {
191
- category?: "general" | "maintenance" | "model_retirement";
192
191
  revision?: number;
192
+ category?: "general" | "maintenance" | "model_retirement";
193
193
  title?: string;
194
194
  expiresAt?: string;
195
195
  action?: {
@@ -202,8 +202,8 @@ export declare const updateAnnouncementSchema: z.ZodEffects<z.ZodObject<{
202
202
  clients?: ("desktop" | "web")[];
203
203
  startsAt?: string;
204
204
  }, {
205
- category?: "general" | "maintenance" | "model_retirement";
206
205
  revision?: number;
206
+ category?: "general" | "maintenance" | "model_retirement";
207
207
  title?: string;
208
208
  expiresAt?: string;
209
209
  action?: {
@@ -252,10 +252,10 @@ export declare const announcementSchema: z.ZodObject<{
252
252
  dismissedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
253
253
  }, "strict", z.ZodTypeAny, {
254
254
  status?: "withdrawn" | "draft" | "published";
255
- id?: string;
255
+ revision?: number;
256
256
  category?: "general" | "maintenance" | "model_retirement";
257
+ id?: string;
257
258
  createdAt?: string;
258
- revision?: number;
259
259
  title?: string;
260
260
  expiresAt?: string;
261
261
  action?: {
@@ -270,10 +270,10 @@ export declare const announcementSchema: z.ZodObject<{
270
270
  dismissedAt?: string;
271
271
  }, {
272
272
  status?: "withdrawn" | "draft" | "published";
273
- id?: string;
273
+ revision?: number;
274
274
  category?: "general" | "maintenance" | "model_retirement";
275
+ id?: string;
275
276
  createdAt?: string;
276
- revision?: number;
277
277
  title?: string;
278
278
  expiresAt?: string;
279
279
  action?: {
@@ -310,6 +310,46 @@ 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
+ }>;
336
+ export declare const openConversationActionSchema: z.ZodObject<{
337
+ type: z.ZodLiteral<"open_conversation">;
338
+ assistantId: z.ZodString;
339
+ conversationId: z.ZodString;
340
+ threadId: z.ZodNullable<z.ZodString>;
341
+ }, "strict", z.ZodTypeAny, {
342
+ type?: "open_conversation";
343
+ conversationId?: string;
344
+ threadId?: string;
345
+ assistantId?: string;
346
+ }, {
347
+ type?: "open_conversation";
348
+ conversationId?: string;
349
+ threadId?: string;
350
+ assistantId?: string;
351
+ }>;
352
+ export type OpenConversationAction = Required<z.output<typeof openConversationActionSchema>>;
313
353
  export declare const userNotificationSchema: z.ZodObject<{
314
354
  id: z.ZodString;
315
355
  kind: z.ZodLiteral<"agent.completed">;
@@ -351,8 +391,9 @@ export declare const userNotificationSchema: z.ZodObject<{
351
391
  assistantId?: string;
352
392
  }>;
353
393
  }, "strict", z.ZodTypeAny, {
354
- id?: string;
355
394
  kind?: "agent.completed";
395
+ id?: string;
396
+ createdAt?: string;
356
397
  source?: {
357
398
  type?: "scheduled_task";
358
399
  conversationId?: string;
@@ -360,7 +401,6 @@ export declare const userNotificationSchema: z.ZodObject<{
360
401
  taskId?: string;
361
402
  assistantId?: string;
362
403
  };
363
- createdAt?: string;
364
404
  action?: {
365
405
  type?: "open_conversation";
366
406
  conversationId?: string;
@@ -369,8 +409,9 @@ export declare const userNotificationSchema: z.ZodObject<{
369
409
  };
370
410
  readAt?: string;
371
411
  }, {
372
- id?: string;
373
412
  kind?: "agent.completed";
413
+ id?: string;
414
+ createdAt?: string;
374
415
  source?: {
375
416
  type?: "scheduled_task";
376
417
  conversationId?: string;
@@ -378,7 +419,6 @@ export declare const userNotificationSchema: z.ZodObject<{
378
419
  taskId?: string;
379
420
  assistantId?: string;
380
421
  };
381
- createdAt?: string;
382
422
  action?: {
383
423
  type?: "open_conversation";
384
424
  conversationId?: string;
@@ -423,10 +463,10 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
423
463
  dismissedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
424
464
  }, "strict", z.ZodTypeAny, {
425
465
  status?: "withdrawn" | "draft" | "published";
426
- id?: string;
466
+ revision?: number;
427
467
  category?: "general" | "maintenance" | "model_retirement";
468
+ id?: string;
428
469
  createdAt?: string;
429
- revision?: number;
430
470
  title?: string;
431
471
  expiresAt?: string;
432
472
  action?: {
@@ -441,10 +481,10 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
441
481
  dismissedAt?: string;
442
482
  }, {
443
483
  status?: "withdrawn" | "draft" | "published";
444
- id?: string;
484
+ revision?: number;
445
485
  category?: "general" | "maintenance" | "model_retirement";
486
+ id?: string;
446
487
  createdAt?: string;
447
- revision?: number;
448
488
  title?: string;
449
489
  expiresAt?: string;
450
490
  action?: {
@@ -499,8 +539,9 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
499
539
  assistantId?: string;
500
540
  }>;
501
541
  }, "strict", z.ZodTypeAny, {
502
- id?: string;
503
542
  kind?: "agent.completed";
543
+ id?: string;
544
+ createdAt?: string;
504
545
  source?: {
505
546
  type?: "scheduled_task";
506
547
  conversationId?: string;
@@ -508,7 +549,6 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
508
549
  taskId?: string;
509
550
  assistantId?: string;
510
551
  };
511
- createdAt?: string;
512
552
  action?: {
513
553
  type?: "open_conversation";
514
554
  conversationId?: string;
@@ -517,8 +557,9 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
517
557
  };
518
558
  readAt?: string;
519
559
  }, {
520
- id?: string;
521
560
  kind?: "agent.completed";
561
+ id?: string;
562
+ createdAt?: string;
522
563
  source?: {
523
564
  type?: "scheduled_task";
524
565
  conversationId?: string;
@@ -526,7 +567,6 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
526
567
  taskId?: string;
527
568
  assistantId?: string;
528
569
  };
529
- createdAt?: string;
530
570
  action?: {
531
571
  type?: "open_conversation";
532
572
  conversationId?: string;
@@ -542,10 +582,10 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
542
582
  supported?: true;
543
583
  announcements?: {
544
584
  status?: "withdrawn" | "draft" | "published";
545
- id?: string;
585
+ revision?: number;
546
586
  category?: "general" | "maintenance" | "model_retirement";
587
+ id?: string;
547
588
  createdAt?: string;
548
- revision?: number;
549
589
  title?: string;
550
590
  expiresAt?: string;
551
591
  action?: {
@@ -560,8 +600,9 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
560
600
  dismissedAt?: string;
561
601
  }[];
562
602
  notifications?: {
563
- id?: string;
564
603
  kind?: "agent.completed";
604
+ id?: string;
605
+ createdAt?: string;
565
606
  source?: {
566
607
  type?: "scheduled_task";
567
608
  conversationId?: string;
@@ -569,7 +610,6 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
569
610
  taskId?: string;
570
611
  assistantId?: string;
571
612
  };
572
- createdAt?: string;
573
613
  action?: {
574
614
  type?: "open_conversation";
575
615
  conversationId?: string;
@@ -585,10 +625,10 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
585
625
  supported?: true;
586
626
  announcements?: {
587
627
  status?: "withdrawn" | "draft" | "published";
588
- id?: string;
628
+ revision?: number;
589
629
  category?: "general" | "maintenance" | "model_retirement";
630
+ id?: string;
590
631
  createdAt?: string;
591
- revision?: number;
592
632
  title?: string;
593
633
  expiresAt?: string;
594
634
  action?: {
@@ -603,8 +643,9 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
603
643
  dismissedAt?: string;
604
644
  }[];
605
645
  notifications?: {
606
- id?: string;
607
646
  kind?: "agent.completed";
647
+ id?: string;
648
+ createdAt?: string;
608
649
  source?: {
609
650
  type?: "scheduled_task";
610
651
  conversationId?: string;
@@ -612,7 +653,6 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
612
653
  taskId?: string;
613
654
  assistantId?: string;
614
655
  };
615
- createdAt?: string;
616
656
  action?: {
617
657
  type?: "open_conversation";
618
658
  conversationId?: string;
@@ -670,17 +710,21 @@ export declare const notificationOutboxPayloadSchema: z.ZodDiscriminatedUnion<"t
670
710
  executionId: z.ZodString;
671
711
  assistantId: z.ZodString;
672
712
  conversationId: z.ZodString;
713
+ } & {
714
+ threadId: z.ZodOptional<z.ZodString>;
673
715
  }, "strict", z.ZodTypeAny, {
674
716
  type?: "scheduled_task";
675
717
  conversationId?: string;
676
718
  executionId?: string;
677
719
  taskId?: string;
720
+ threadId?: string;
678
721
  assistantId?: string;
679
722
  }, {
680
723
  type?: "scheduled_task";
681
724
  conversationId?: string;
682
725
  executionId?: string;
683
726
  taskId?: string;
727
+ threadId?: string;
684
728
  assistantId?: string;
685
729
  }>;
686
730
  }, "strict", z.ZodTypeAny, {
@@ -690,6 +734,7 @@ export declare const notificationOutboxPayloadSchema: z.ZodDiscriminatedUnion<"t
690
734
  conversationId?: string;
691
735
  executionId?: string;
692
736
  taskId?: string;
737
+ threadId?: string;
693
738
  assistantId?: string;
694
739
  };
695
740
  }, {
@@ -699,6 +744,7 @@ export declare const notificationOutboxPayloadSchema: z.ZodDiscriminatedUnion<"t
699
744
  conversationId?: string;
700
745
  executionId?: string;
701
746
  taskId?: string;
747
+ threadId?: string;
702
748
  assistantId?: string;
703
749
  };
704
750
  }>]>;
@@ -717,5 +763,6 @@ export type NotificationDestination = {
717
763
  bindingRevision: number;
718
764
  };
719
765
  export declare function parseAnnouncement(value: unknown): Announcement;
766
+ export declare function parseOpenConversationAction(value: unknown): OpenConversationAction;
720
767
  export declare function parseUserNotification(value: unknown): UserNotification;
721
768
  export declare function parseNotificationSnapshot(value: unknown): NotificationSnapshot;
@@ -174,3 +174,27 @@ export type AssistantComposerReference = {
174
174
  export type AssistantComposerAppendReferencesPayload = {
175
175
  references: AssistantComposerReference[];
176
176
  };
177
+ /** Host-owned browser persistence. Plugins never choose an account/storage namespace. */
178
+ export declare const WORKBENCH_CONTENT_DRAFT_COMMAND = "workbench.content.draft";
179
+ export interface XpertViewLocalDraftBinding {
180
+ resourceId: string;
181
+ scopeKey: string;
182
+ maxBytes: number;
183
+ }
184
+ export type WorkbenchContentDraftRequest = {
185
+ resourceId: string;
186
+ } & ({
187
+ operation: 'list';
188
+ } | {
189
+ operation: 'read';
190
+ draftId: string;
191
+ } | {
192
+ operation: 'write';
193
+ draftId: string;
194
+ expectedRevision: number;
195
+ content: string;
196
+ } | {
197
+ operation: 'delete';
198
+ draftId: string;
199
+ expectedRevision: number;
200
+ });
@@ -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';