@xpert-ai/plugin-sdk 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 (65) hide show
  1. package/agent-results.cjs.js +5 -3
  2. package/agent-results.esm.js +2 -2
  3. package/analytics-result.cjs.js +64 -27
  4. package/analytics-result.esm.js +62 -28
  5. package/analytics.cjs.js +157 -15
  6. package/analytics.esm.js +154 -17
  7. package/artifact-document.cjs.js +9 -3
  8. package/artifact-document.esm.js +9 -3
  9. package/collaboration-client.cjs.js +274 -140
  10. package/collaboration-client.esm.js +273 -141
  11. package/docs/README.md +23 -0
  12. package/index.cjs.js +227 -10
  13. package/index.esm.js +198 -13
  14. package/package.json +8 -2
  15. package/remote-component.cjs.default.js +1 -0
  16. package/remote-component.cjs.js +143 -0
  17. package/remote-component.cjs.mjs +2 -0
  18. package/remote-component.d.ts +1 -0
  19. package/remote-component.esm.js +139 -0
  20. package/results.cjs.js +2 -14
  21. package/results.esm.js +2 -12
  22. package/src/analytics.d.ts +2 -0
  23. package/src/collaboration-client.d.ts +1 -0
  24. package/src/index.d.ts +1 -0
  25. package/src/lib/agent/handoff/agent-runtime-message.contract.d.ts +24 -24
  26. package/src/lib/agent/middleware/strategy.interface.d.ts +4 -0
  27. package/src/lib/agent/runtime/capability.d.ts +2 -0
  28. package/src/lib/agent/runtime/cli-model-profile.d.ts +14 -1
  29. package/src/lib/agent/runtime/dispatch.d.ts +79 -79
  30. package/src/lib/agent/runtime/execution-runner.d.ts +19 -10
  31. package/src/lib/agent/runtime/pipeline-scope.d.ts +4 -4
  32. package/src/lib/agent/runtime/results.d.ts +14 -234
  33. package/src/lib/agent/runtime/types.d.ts +19 -0
  34. package/src/lib/agent-event/index.d.ts +89 -0
  35. package/src/lib/agent-event/journal.d.ts +30 -0
  36. package/src/lib/artifact-document/dependencies.d.ts +3 -3
  37. package/src/lib/artifact-document/protocol.d.ts +2 -2
  38. package/src/lib/artifact-document/scheduler.d.ts +3 -0
  39. package/src/lib/artifact-type/definition.schema.d.ts +11 -39
  40. package/src/lib/assistant-capability/middleware.d.ts +2 -1
  41. package/src/lib/channel/strategy.interface.d.ts +20 -0
  42. package/src/lib/collaboration/client.d.ts +6 -59
  43. package/src/lib/collaboration/index.d.ts +1 -0
  44. package/src/lib/collaboration/operations-client.d.ts +23 -0
  45. package/src/lib/collaboration/presence.d.ts +36 -0
  46. package/src/lib/collaboration/provider.registry.d.ts +2 -2
  47. package/src/lib/collaboration/transport.d.ts +24 -0
  48. package/src/lib/collaboration/types.d.ts +57 -5
  49. package/src/lib/content-resource/catalog.d.ts +40 -2
  50. package/src/lib/content-resource/editor.d.ts +36 -1
  51. package/src/lib/data/analytics/analysis-evidence.d.ts +757 -0
  52. package/src/lib/data/analytics/analytics-certification.d.ts +64 -0
  53. package/src/lib/data/analytics/analytics-provider.d.ts +9 -0
  54. package/src/lib/data/analytics/analytics-value.d.ts +5 -0
  55. package/src/lib/data/analytics/index.d.ts +1 -0
  56. package/src/lib/evolution/runtime-capability.d.ts +1 -0
  57. package/src/lib/project-pipeline/adapters.d.ts +9 -2
  58. package/src/lib/project-pipeline/registry.d.ts +59 -48
  59. package/src/lib/project-task/acceptance.d.ts +13 -1
  60. package/src/lib/project-task/index.d.ts +4 -2
  61. package/src/lib/runtime/capabilities/project-configuration.d.ts +2 -0
  62. package/src/lib/view-extension/index.d.ts +1 -0
  63. package/src/lib/view-extension/provider.interface.d.ts +51 -0
  64. package/src/lib/view-extension/workbench-decision.d.ts +10 -0
  65. package/src/remote-component.d.ts +13 -0
@@ -25,15 +25,15 @@ export declare const agentRuntimeReplyTargetSchema: z.ZodDiscriminatedUnion<"typ
25
25
  threadId: z.ZodString;
26
26
  }, "strict", z.ZodTypeAny, {
27
27
  type?: "project_agent";
28
+ projectId?: string;
28
29
  threadId?: string;
29
30
  conversationId?: string;
30
- projectId?: string;
31
31
  agentKey?: "general_agent";
32
32
  }, {
33
33
  type?: "project_agent";
34
+ projectId?: string;
34
35
  threadId?: string;
35
36
  conversationId?: string;
36
- projectId?: string;
37
37
  agentKey?: "general_agent";
38
38
  }>]>;
39
39
  export type AgentRuntimeReplyTarget = z.output<typeof agentRuntimeReplyTargetSchema>;
@@ -68,15 +68,15 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
68
68
  threadId: z.ZodString;
69
69
  }, "strict", z.ZodTypeAny, {
70
70
  type?: "project_agent";
71
+ projectId?: string;
71
72
  threadId?: string;
72
73
  conversationId?: string;
73
- projectId?: string;
74
74
  agentKey?: "general_agent";
75
75
  }, {
76
76
  type?: "project_agent";
77
+ projectId?: string;
77
78
  threadId?: string;
78
79
  conversationId?: string;
79
- projectId?: string;
80
80
  agentKey?: "general_agent";
81
81
  }>]>;
82
82
  projectTask: z.ZodOptional<z.ZodEffects<z.ZodObject<{
@@ -102,8 +102,8 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
102
102
  stepIndex: number;
103
103
  }>, "many">;
104
104
  }, "strict", z.ZodTypeAny, {
105
- version: 1;
106
105
  title: string;
106
+ version: 1;
107
107
  steps: {
108
108
  description: string;
109
109
  stepIndex: number;
@@ -111,8 +111,8 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
111
111
  requirements: string[];
112
112
  description?: string | undefined;
113
113
  }, {
114
- version: 1;
115
114
  title: string;
115
+ version: 1;
116
116
  steps: {
117
117
  description: string;
118
118
  stepIndex: number;
@@ -120,8 +120,8 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
120
120
  requirements: string[];
121
121
  description?: string | undefined;
122
122
  }>, {
123
- version: 1;
124
123
  title: string;
124
+ version: 1;
125
125
  steps: {
126
126
  description: string;
127
127
  stepIndex: number;
@@ -129,8 +129,8 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
129
129
  requirements: string[];
130
130
  description?: string | undefined;
131
131
  }, {
132
- version: 1;
133
132
  title: string;
133
+ version: 1;
134
134
  steps: {
135
135
  description: string;
136
136
  stepIndex: number;
@@ -141,8 +141,8 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
141
141
  }, "strict", z.ZodTypeAny, {
142
142
  digest: string;
143
143
  specification: {
144
- version: 1;
145
144
  title: string;
145
+ version: 1;
146
146
  steps: {
147
147
  description: string;
148
148
  stepIndex: number;
@@ -153,8 +153,8 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
153
153
  }, {
154
154
  digest: string;
155
155
  specification: {
156
- version: 1;
157
156
  title: string;
157
+ version: 1;
158
158
  steps: {
159
159
  description: string;
160
160
  stepIndex: number;
@@ -187,13 +187,13 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
187
187
  }>>;
188
188
  rework: z.ZodOptional<z.ZodObject<{
189
189
  reviewExecutionId: z.ZodString;
190
- findingIds: z.ZodArray<z.ZodString, "many">;
190
+ feedback: z.ZodString;
191
191
  }, "strict", z.ZodTypeAny, {
192
192
  reviewExecutionId: string;
193
- findingIds: string[];
193
+ feedback: string;
194
194
  }, {
195
195
  reviewExecutionId: string;
196
- findingIds: string[];
196
+ feedback: string;
197
197
  }>>;
198
198
  }, "strict", z.ZodTypeAny, {
199
199
  type: "implementation";
@@ -207,7 +207,7 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
207
207
  } | undefined;
208
208
  rework?: {
209
209
  reviewExecutionId: string;
210
- findingIds: string[];
210
+ feedback: string;
211
211
  } | undefined;
212
212
  }, {
213
213
  type: "implementation";
@@ -221,7 +221,7 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
221
221
  } | undefined;
222
222
  rework?: {
223
223
  reviewExecutionId: string;
224
- findingIds: string[];
224
+ feedback: string;
225
225
  } | undefined;
226
226
  }>, z.ZodObject<{
227
227
  type: z.ZodLiteral<"review">;
@@ -322,7 +322,7 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
322
322
  } | undefined;
323
323
  rework?: {
324
324
  reviewExecutionId: string;
325
- findingIds: string[];
325
+ feedback: string;
326
326
  } | undefined;
327
327
  } | {
328
328
  type: "review";
@@ -357,7 +357,7 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
357
357
  } | undefined;
358
358
  rework?: {
359
359
  reviewExecutionId: string;
360
- findingIds: string[];
360
+ feedback: string;
361
361
  } | undefined;
362
362
  } | {
363
363
  type: "review";
@@ -383,21 +383,6 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
383
383
  }>;
384
384
  }, "strict", z.ZodTypeAny, {
385
385
  projectId: string;
386
- specification: {
387
- digest: string;
388
- specification: {
389
- version: 1;
390
- title: string;
391
- steps: {
392
- description: string;
393
- stepIndex: number;
394
- }[];
395
- requirements: string[];
396
- description?: string | undefined;
397
- };
398
- };
399
- projectTaskId: string;
400
- taskExecutionId: string;
401
386
  purpose: {
402
387
  type: "implementation";
403
388
  reviewer?: {
@@ -410,7 +395,7 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
410
395
  } | undefined;
411
396
  rework?: {
412
397
  reviewExecutionId: string;
413
- findingIds: string[];
398
+ feedback: string;
414
399
  } | undefined;
415
400
  } | {
416
401
  type: "review";
@@ -434,13 +419,11 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
434
419
  implementationTaskId?: string | undefined;
435
420
  candidatePaths?: string[] | undefined;
436
421
  };
437
- }, {
438
- projectId: string;
439
422
  specification: {
440
423
  digest: string;
441
424
  specification: {
442
- version: 1;
443
425
  title: string;
426
+ version: 1;
444
427
  steps: {
445
428
  description: string;
446
429
  stepIndex: number;
@@ -451,6 +434,8 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
451
434
  };
452
435
  projectTaskId: string;
453
436
  taskExecutionId: string;
437
+ }, {
438
+ projectId: string;
454
439
  purpose: {
455
440
  type: "implementation";
456
441
  reviewer?: {
@@ -463,7 +448,7 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
463
448
  } | undefined;
464
449
  rework?: {
465
450
  reviewExecutionId: string;
466
- findingIds: string[];
451
+ feedback: string;
467
452
  } | undefined;
468
453
  } | {
469
454
  type: "review";
@@ -487,13 +472,11 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
487
472
  implementationTaskId?: string | undefined;
488
473
  candidatePaths?: string[] | undefined;
489
474
  };
490
- }>, {
491
- projectId: string;
492
475
  specification: {
493
476
  digest: string;
494
477
  specification: {
495
- version: 1;
496
478
  title: string;
479
+ version: 1;
497
480
  steps: {
498
481
  description: string;
499
482
  stepIndex: number;
@@ -504,6 +487,8 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
504
487
  };
505
488
  projectTaskId: string;
506
489
  taskExecutionId: string;
490
+ }>, {
491
+ projectId: string;
507
492
  purpose: {
508
493
  type: "implementation";
509
494
  reviewer?: {
@@ -516,7 +501,7 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
516
501
  } | undefined;
517
502
  rework?: {
518
503
  reviewExecutionId: string;
519
- findingIds: string[];
504
+ feedback: string;
520
505
  } | undefined;
521
506
  } | {
522
507
  type: "review";
@@ -540,13 +525,11 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
540
525
  implementationTaskId?: string | undefined;
541
526
  candidatePaths?: string[] | undefined;
542
527
  };
543
- }, {
544
- projectId: string;
545
528
  specification: {
546
529
  digest: string;
547
530
  specification: {
548
- version: 1;
549
531
  title: string;
532
+ version: 1;
550
533
  steps: {
551
534
  description: string;
552
535
  stepIndex: number;
@@ -557,6 +540,8 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
557
540
  };
558
541
  projectTaskId: string;
559
542
  taskExecutionId: string;
543
+ }, {
544
+ projectId: string;
560
545
  purpose: {
561
546
  type: "implementation";
562
547
  reviewer?: {
@@ -569,7 +554,7 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
569
554
  } | undefined;
570
555
  rework?: {
571
556
  reviewExecutionId: string;
572
- findingIds: string[];
557
+ feedback: string;
573
558
  } | undefined;
574
559
  } | {
575
560
  type: "review";
@@ -593,6 +578,21 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
593
578
  implementationTaskId?: string | undefined;
594
579
  candidatePaths?: string[] | undefined;
595
580
  };
581
+ specification: {
582
+ digest: string;
583
+ specification: {
584
+ title: string;
585
+ version: 1;
586
+ steps: {
587
+ description: string;
588
+ stepIndex: number;
589
+ }[];
590
+ requirements: string[];
591
+ description?: string | undefined;
592
+ };
593
+ };
594
+ projectTaskId: string;
595
+ taskExecutionId: string;
596
596
  }>>;
597
597
  }, "strict", z.ZodTypeAny, {
598
598
  version?: 1;
@@ -606,28 +606,13 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
606
606
  agentKey?: string;
607
607
  } | {
608
608
  type?: "project_agent";
609
+ projectId?: string;
609
610
  threadId?: string;
610
611
  conversationId?: string;
611
- projectId?: string;
612
612
  agentKey?: "general_agent";
613
613
  };
614
614
  projectTask?: {
615
615
  projectId: string;
616
- specification: {
617
- digest: string;
618
- specification: {
619
- version: 1;
620
- title: string;
621
- steps: {
622
- description: string;
623
- stepIndex: number;
624
- }[];
625
- requirements: string[];
626
- description?: string | undefined;
627
- };
628
- };
629
- projectTaskId: string;
630
- taskExecutionId: string;
631
616
  purpose: {
632
617
  type: "implementation";
633
618
  reviewer?: {
@@ -640,7 +625,7 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
640
625
  } | undefined;
641
626
  rework?: {
642
627
  reviewExecutionId: string;
643
- findingIds: string[];
628
+ feedback: string;
644
629
  } | undefined;
645
630
  } | {
646
631
  type: "review";
@@ -664,6 +649,21 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
664
649
  implementationTaskId?: string | undefined;
665
650
  candidatePaths?: string[] | undefined;
666
651
  };
652
+ specification: {
653
+ digest: string;
654
+ specification: {
655
+ title: string;
656
+ version: 1;
657
+ steps: {
658
+ description: string;
659
+ stepIndex: number;
660
+ }[];
661
+ requirements: string[];
662
+ description?: string | undefined;
663
+ };
664
+ };
665
+ projectTaskId: string;
666
+ taskExecutionId: string;
667
667
  };
668
668
  }, {
669
669
  version?: 1;
@@ -677,28 +677,13 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
677
677
  agentKey?: string;
678
678
  } | {
679
679
  type?: "project_agent";
680
+ projectId?: string;
680
681
  threadId?: string;
681
682
  conversationId?: string;
682
- projectId?: string;
683
683
  agentKey?: "general_agent";
684
684
  };
685
685
  projectTask?: {
686
686
  projectId: string;
687
- specification: {
688
- digest: string;
689
- specification: {
690
- version: 1;
691
- title: string;
692
- steps: {
693
- description: string;
694
- stepIndex: number;
695
- }[];
696
- requirements: string[];
697
- description?: string | undefined;
698
- };
699
- };
700
- projectTaskId: string;
701
- taskExecutionId: string;
702
687
  purpose: {
703
688
  type: "implementation";
704
689
  reviewer?: {
@@ -711,7 +696,7 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
711
696
  } | undefined;
712
697
  rework?: {
713
698
  reviewExecutionId: string;
714
- findingIds: string[];
699
+ feedback: string;
715
700
  } | undefined;
716
701
  } | {
717
702
  type: "review";
@@ -735,6 +720,21 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
735
720
  implementationTaskId?: string | undefined;
736
721
  candidatePaths?: string[] | undefined;
737
722
  };
723
+ specification: {
724
+ digest: string;
725
+ specification: {
726
+ title: string;
727
+ version: 1;
728
+ steps: {
729
+ description: string;
730
+ stepIndex: number;
731
+ }[];
732
+ requirements: string[];
733
+ description?: string | undefined;
734
+ };
735
+ };
736
+ projectTaskId: string;
737
+ taskExecutionId: string;
738
738
  };
739
739
  }>;
740
740
  export type AgentInvocationDispatchContext = z.output<typeof agentInvocationDispatchContextSchema>;
@@ -1,8 +1,8 @@
1
- import type { CliPermissionMode, ModelExecutionEnvironment } from '@xpert-ai/contracts';
1
+ import type { CliPermissionMode, ExecutionEnvironment } from '@xpert-ai/contracts';
2
2
  import type { AgentInvocationScope, AgentInvocationResult, AgentJson } from './types';
3
- import type { AgentArtifactSelection, AgentTaskResult, AgentTaskResultFile } from './results';
3
+ import type { AgentArtifactSelection, AgentTaskReport } from './results';
4
4
  /** A host-managed process location. Remote service runtimes can use their own session/run handles. */
5
- export type AgentRunnerEnvironment = Extract<ModelExecutionEnvironment, {
5
+ export type AgentRunnerEnvironment = Extract<ExecutionEnvironment, {
6
6
  type: 'computer' | 'sandbox';
7
7
  }>;
8
8
  /** A durable process receipt, not a second Agent task or a credential. Host methods must revalidate ownership. */
@@ -15,8 +15,6 @@ interface AgentRunnerReceiptBase {
15
15
  environment: AgentRunnerEnvironment;
16
16
  /** Opaque host process reference, not necessarily an operating-system PID. */
17
17
  processId: string;
18
- /** Model execution grant ID only; never store its bearer secret in the receipt. */
19
- grantId: string;
20
18
  /** Actual business cwd selected by the host; retained verbatim for historical receipts. */
21
19
  workingDirectory: string;
22
20
  /** Tool selected from the approved binding and host policy, independent of the model provider. */
@@ -38,6 +36,20 @@ export type AgentRunnerReceipt = AgentRunnerReceiptBase & ({
38
36
  } | {
39
37
  version: 2;
40
38
  executionDirectory: string;
39
+ }) & ({
40
+ grantId: string;
41
+ nativeLeaseId?: never;
42
+ connection?: {
43
+ mode: 'platform';
44
+ revision: number;
45
+ };
46
+ } | {
47
+ grantId?: never;
48
+ nativeLeaseId: string;
49
+ connection: {
50
+ mode: 'native';
51
+ revision: number;
52
+ };
41
53
  });
42
54
  export interface AgentRunnerExitEvidence {
43
55
  version: 1;
@@ -67,11 +79,8 @@ export interface AgentExecutionRunner {
67
79
  }): Promise<unknown>;
68
80
  /** Export only selected files after revalidating the persisted delivery request. No selection means no export. */
69
81
  collectArtifacts(receipt: AgentRunnerReceipt, selection?: AgentArtifactSelection): Promise<NonNullable<AgentInvocationResult['artifacts']>>;
70
- /** Read a submitted result envelope after checking receipt ownership, instance, byte limit, digest and schema.
71
- * Adapters call after verified CLI completion and checkpoint the result before cleanup.
72
- * Absence means file submission is unsupported; reading does not export files or accept the task.
73
- */
74
- readTaskResultFile?(receipt: AgentRunnerReceipt, reference: AgentTaskResultFile): Promise<AgentTaskResult>;
82
+ /** Read one explicitly selected UTF-8 Markdown report after receipt and filesystem authorization. */
83
+ readTaskReportFile?(receipt: AgentRunnerReceipt, path: string): Promise<AgentTaskReport>;
75
84
  /** Revoke model access and request process termination. Only exited confirms termination. */
76
85
  stop(receipt: AgentRunnerReceipt): Promise<{
77
86
  state: 'exited' | 'stopping' | 'unknown';
@@ -35,10 +35,10 @@ export declare const projectPipelineInvocationScopeSchema: z.ZodEffects<z.ZodObj
35
35
  generation: number;
36
36
  }>;
37
37
  }, "strict", z.ZodTypeAny, {
38
+ projectId?: string;
38
39
  userId?: string;
39
40
  organizationId?: string;
40
41
  tenantId?: string;
41
- projectId?: string;
42
42
  workspaceId?: string;
43
43
  callerType?: "project_pipeline";
44
44
  callerAgentKey?: "pipeline_node";
@@ -53,10 +53,10 @@ export declare const projectPipelineInvocationScopeSchema: z.ZodEffects<z.ZodObj
53
53
  generation: number;
54
54
  };
55
55
  }, {
56
+ projectId?: string;
56
57
  userId?: string;
57
58
  organizationId?: string;
58
59
  tenantId?: string;
59
- projectId?: string;
60
60
  workspaceId?: string;
61
61
  callerType?: "project_pipeline";
62
62
  callerAgentKey?: "pipeline_node";
@@ -71,10 +71,10 @@ export declare const projectPipelineInvocationScopeSchema: z.ZodEffects<z.ZodObj
71
71
  generation: number;
72
72
  };
73
73
  }>, {
74
+ projectId?: string;
74
75
  userId?: string;
75
76
  organizationId?: string;
76
77
  tenantId?: string;
77
- projectId?: string;
78
78
  workspaceId?: string;
79
79
  callerType?: "project_pipeline";
80
80
  callerAgentKey?: "pipeline_node";
@@ -89,10 +89,10 @@ export declare const projectPipelineInvocationScopeSchema: z.ZodEffects<z.ZodObj
89
89
  generation: number;
90
90
  };
91
91
  }, {
92
+ projectId?: string;
92
93
  userId?: string;
93
94
  organizationId?: string;
94
95
  tenantId?: string;
95
- projectId?: string;
96
96
  workspaceId?: string;
97
97
  callerType?: "project_pipeline";
98
98
  callerAgentKey?: "pipeline_node";