@xpert-ai/plugin-sdk 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 (66) hide show
  1. package/agent-results.cjs.js +5 -1
  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 +214 -9
  13. package/index.esm.js +193 -15
  14. package/model-provider.cjs.js +8 -0
  15. package/model-provider.esm.js +7 -1
  16. package/package.json +8 -2
  17. package/remote-component.cjs.default.js +1 -0
  18. package/remote-component.cjs.js +143 -0
  19. package/remote-component.cjs.mjs +2 -0
  20. package/remote-component.d.ts +1 -0
  21. package/remote-component.esm.js +139 -0
  22. package/results.cjs.js +2 -6
  23. package/results.esm.js +2 -6
  24. package/src/analytics.d.ts +2 -0
  25. package/src/collaboration-client.d.ts +1 -0
  26. package/src/index.d.ts +1 -0
  27. package/src/lib/agent/handoff/agent-runtime-message.contract.d.ts +24 -24
  28. package/src/lib/agent/middleware/strategy.interface.d.ts +2 -0
  29. package/src/lib/agent/runtime/capability.d.ts +2 -0
  30. package/src/lib/agent/runtime/cli-model-profile.d.ts +14 -1
  31. package/src/lib/agent/runtime/dispatch.d.ts +298 -75
  32. package/src/lib/agent/runtime/execution-runner.d.ts +24 -5
  33. package/src/lib/agent/runtime/pipeline-scope.d.ts +4 -4
  34. package/src/lib/agent/runtime/results.d.ts +16 -219
  35. package/src/lib/agent/runtime/strategy.d.ts +3 -0
  36. package/src/lib/agent/runtime/types.d.ts +21 -0
  37. package/src/lib/agent-event/index.d.ts +55 -0
  38. package/src/lib/agent-event/journal.d.ts +30 -0
  39. package/src/lib/artifact-document/dependencies.d.ts +13 -13
  40. package/src/lib/artifact-document/protocol.d.ts +2 -2
  41. package/src/lib/artifact-document/scheduler.d.ts +3 -0
  42. package/src/lib/assistant-capability/middleware.d.ts +2 -1
  43. package/src/lib/collaboration/client.d.ts +6 -59
  44. package/src/lib/collaboration/index.d.ts +1 -0
  45. package/src/lib/collaboration/operations-client.d.ts +23 -0
  46. package/src/lib/collaboration/presence.d.ts +36 -0
  47. package/src/lib/collaboration/provider.registry.d.ts +2 -2
  48. package/src/lib/collaboration/transport.d.ts +24 -0
  49. package/src/lib/collaboration/types.d.ts +57 -5
  50. package/src/lib/content-resource/catalog.d.ts +23 -1
  51. package/src/lib/content-resource/editor.d.ts +36 -1
  52. package/src/lib/data/analytics/analysis-evidence.d.ts +757 -0
  53. package/src/lib/data/analytics/analytics-certification.d.ts +64 -0
  54. package/src/lib/data/analytics/analytics-provider.d.ts +9 -0
  55. package/src/lib/data/analytics/analytics-value.d.ts +5 -0
  56. package/src/lib/data/analytics/index.d.ts +1 -0
  57. package/src/lib/evolution/runtime-capability.d.ts +1 -0
  58. package/src/lib/project-pipeline/adapters.d.ts +9 -2
  59. package/src/lib/project-pipeline/registry.d.ts +53 -50
  60. package/src/lib/project-task/acceptance.d.ts +29 -0
  61. package/src/lib/project-task/index.d.ts +6 -0
  62. package/src/lib/runtime/capabilities/index.d.ts +2 -0
  63. package/src/lib/runtime/capabilities/plugin-test-access.d.ts +14 -0
  64. package/src/lib/runtime/capabilities/project-configuration.d.ts +166 -0
  65. package/src/lib/view-extension/provider.interface.d.ts +51 -0
  66. 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;
@@ -163,15 +163,72 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
163
163
  description?: string | undefined;
164
164
  };
165
165
  }>;
166
- purpose: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
166
+ purpose: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
167
167
  type: z.ZodLiteral<"implementation">;
168
+ reviewer: z.ZodOptional<z.ZodObject<{
169
+ bindingId: z.ZodString;
170
+ mode: z.ZodEnum<["evidence_only", "execution"]>;
171
+ }, "strict", z.ZodTypeAny, {
172
+ mode: "execution" | "evidence_only";
173
+ bindingId: string;
174
+ }, {
175
+ mode: "execution" | "evidence_only";
176
+ bindingId: string;
177
+ }>>;
178
+ coordination: z.ZodOptional<z.ZodObject<{
179
+ taskId: z.ZodString;
180
+ specificationDigest: z.ZodString;
181
+ }, "strict", z.ZodTypeAny, {
182
+ taskId: string;
183
+ specificationDigest: string;
184
+ }, {
185
+ taskId: string;
186
+ specificationDigest: string;
187
+ }>>;
188
+ rework: z.ZodOptional<z.ZodObject<{
189
+ reviewExecutionId: z.ZodString;
190
+ feedback: z.ZodString;
191
+ }, "strict", z.ZodTypeAny, {
192
+ reviewExecutionId: string;
193
+ feedback: string;
194
+ }, {
195
+ reviewExecutionId: string;
196
+ feedback: string;
197
+ }>>;
168
198
  }, "strict", z.ZodTypeAny, {
169
199
  type: "implementation";
200
+ reviewer?: {
201
+ mode: "execution" | "evidence_only";
202
+ bindingId: string;
203
+ } | undefined;
204
+ coordination?: {
205
+ taskId: string;
206
+ specificationDigest: string;
207
+ } | undefined;
208
+ rework?: {
209
+ reviewExecutionId: string;
210
+ feedback: string;
211
+ } | undefined;
170
212
  }, {
171
213
  type: "implementation";
214
+ reviewer?: {
215
+ mode: "execution" | "evidence_only";
216
+ bindingId: string;
217
+ } | undefined;
218
+ coordination?: {
219
+ taskId: string;
220
+ specificationDigest: string;
221
+ } | undefined;
222
+ rework?: {
223
+ reviewExecutionId: string;
224
+ feedback: string;
225
+ } | undefined;
172
226
  }>, z.ZodObject<{
173
227
  type: z.ZodLiteral<"review">;
228
+ mode: z.ZodOptional<z.ZodEnum<["evidence_only", "execution"]>>;
229
+ candidatePaths: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
174
230
  implementationExecutionId: z.ZodString;
231
+ implementationTaskId: z.ZodOptional<z.ZodString>;
175
232
  implementationInvocationId: z.ZodString;
176
233
  specificationDigest: z.ZodString;
177
234
  evidence: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -227,8 +284,11 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
227
284
  snapshotId: string;
228
285
  })[];
229
286
  implementationExecutionId: string;
230
- implementationInvocationId: string;
231
287
  specificationDigest: string;
288
+ implementationInvocationId: string;
289
+ mode?: "execution" | "evidence_only" | undefined;
290
+ implementationTaskId?: string | undefined;
291
+ candidatePaths?: string[] | undefined;
232
292
  }, {
233
293
  type: "review";
234
294
  evidence: ({
@@ -245,28 +305,97 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
245
305
  snapshotId: string;
246
306
  })[];
247
307
  implementationExecutionId: string;
308
+ specificationDigest: string;
309
+ implementationInvocationId: string;
310
+ mode?: "execution" | "evidence_only" | undefined;
311
+ implementationTaskId?: string | undefined;
312
+ candidatePaths?: string[] | undefined;
313
+ }>]>, {
314
+ type: "implementation";
315
+ reviewer?: {
316
+ mode: "execution" | "evidence_only";
317
+ bindingId: string;
318
+ } | undefined;
319
+ coordination?: {
320
+ taskId: string;
321
+ specificationDigest: string;
322
+ } | undefined;
323
+ rework?: {
324
+ reviewExecutionId: string;
325
+ feedback: string;
326
+ } | undefined;
327
+ } | {
328
+ type: "review";
329
+ evidence: ({
330
+ type: "artifact";
331
+ artifactId: string;
332
+ versionId: string;
333
+ } | {
334
+ type: "invocation_result";
335
+ revision: number;
336
+ invocationId: string;
337
+ } | {
338
+ type: "workspace_snapshot";
339
+ digest: string;
340
+ snapshotId: string;
341
+ })[];
342
+ implementationExecutionId: string;
343
+ specificationDigest: string;
248
344
  implementationInvocationId: string;
345
+ mode?: "execution" | "evidence_only" | undefined;
346
+ implementationTaskId?: string | undefined;
347
+ candidatePaths?: string[] | undefined;
348
+ }, {
349
+ type: "implementation";
350
+ reviewer?: {
351
+ mode: "execution" | "evidence_only";
352
+ bindingId: string;
353
+ } | undefined;
354
+ coordination?: {
355
+ taskId: string;
356
+ specificationDigest: string;
357
+ } | undefined;
358
+ rework?: {
359
+ reviewExecutionId: string;
360
+ feedback: string;
361
+ } | undefined;
362
+ } | {
363
+ type: "review";
364
+ evidence: ({
365
+ type: "artifact";
366
+ artifactId: string;
367
+ versionId: string;
368
+ } | {
369
+ type: "invocation_result";
370
+ revision: number;
371
+ invocationId: string;
372
+ } | {
373
+ type: "workspace_snapshot";
374
+ digest: string;
375
+ snapshotId: string;
376
+ })[];
377
+ implementationExecutionId: string;
249
378
  specificationDigest: string;
250
- }>]>;
379
+ implementationInvocationId: string;
380
+ mode?: "execution" | "evidence_only" | undefined;
381
+ implementationTaskId?: string | undefined;
382
+ candidatePaths?: string[] | undefined;
383
+ }>;
251
384
  }, "strict", z.ZodTypeAny, {
252
- projectId: string;
253
- specification: {
254
- digest: string;
255
- specification: {
256
- version: 1;
257
- title: string;
258
- steps: {
259
- description: string;
260
- stepIndex: number;
261
- }[];
262
- requirements: string[];
263
- description?: string | undefined;
264
- };
265
- };
266
- projectTaskId: string;
267
- taskExecutionId: string;
268
385
  purpose: {
269
386
  type: "implementation";
387
+ reviewer?: {
388
+ mode: "execution" | "evidence_only";
389
+ bindingId: string;
390
+ } | undefined;
391
+ coordination?: {
392
+ taskId: string;
393
+ specificationDigest: string;
394
+ } | undefined;
395
+ rework?: {
396
+ reviewExecutionId: string;
397
+ feedback: string;
398
+ } | undefined;
270
399
  } | {
271
400
  type: "review";
272
401
  evidence: ({
@@ -283,16 +412,18 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
283
412
  snapshotId: string;
284
413
  })[];
285
414
  implementationExecutionId: string;
286
- implementationInvocationId: string;
287
415
  specificationDigest: string;
416
+ implementationInvocationId: string;
417
+ mode?: "execution" | "evidence_only" | undefined;
418
+ implementationTaskId?: string | undefined;
419
+ candidatePaths?: string[] | undefined;
288
420
  };
289
- }, {
290
421
  projectId: string;
291
422
  specification: {
292
423
  digest: string;
293
424
  specification: {
294
- version: 1;
295
425
  title: string;
426
+ version: 1;
296
427
  steps: {
297
428
  description: string;
298
429
  stepIndex: number;
@@ -303,8 +434,21 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
303
434
  };
304
435
  projectTaskId: string;
305
436
  taskExecutionId: string;
437
+ }, {
306
438
  purpose: {
307
439
  type: "implementation";
440
+ reviewer?: {
441
+ mode: "execution" | "evidence_only";
442
+ bindingId: string;
443
+ } | undefined;
444
+ coordination?: {
445
+ taskId: string;
446
+ specificationDigest: string;
447
+ } | undefined;
448
+ rework?: {
449
+ reviewExecutionId: string;
450
+ feedback: string;
451
+ } | undefined;
308
452
  } | {
309
453
  type: "review";
310
454
  evidence: ({
@@ -321,16 +465,18 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
321
465
  snapshotId: string;
322
466
  })[];
323
467
  implementationExecutionId: string;
324
- implementationInvocationId: string;
325
468
  specificationDigest: string;
469
+ implementationInvocationId: string;
470
+ mode?: "execution" | "evidence_only" | undefined;
471
+ implementationTaskId?: string | undefined;
472
+ candidatePaths?: string[] | undefined;
326
473
  };
327
- }>, {
328
474
  projectId: string;
329
475
  specification: {
330
476
  digest: string;
331
477
  specification: {
332
- version: 1;
333
478
  title: string;
479
+ version: 1;
334
480
  steps: {
335
481
  description: string;
336
482
  stepIndex: number;
@@ -341,8 +487,21 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
341
487
  };
342
488
  projectTaskId: string;
343
489
  taskExecutionId: string;
490
+ }>, {
344
491
  purpose: {
345
492
  type: "implementation";
493
+ reviewer?: {
494
+ mode: "execution" | "evidence_only";
495
+ bindingId: string;
496
+ } | undefined;
497
+ coordination?: {
498
+ taskId: string;
499
+ specificationDigest: string;
500
+ } | undefined;
501
+ rework?: {
502
+ reviewExecutionId: string;
503
+ feedback: string;
504
+ } | undefined;
346
505
  } | {
347
506
  type: "review";
348
507
  evidence: ({
@@ -359,16 +518,18 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
359
518
  snapshotId: string;
360
519
  })[];
361
520
  implementationExecutionId: string;
362
- implementationInvocationId: string;
363
521
  specificationDigest: string;
522
+ implementationInvocationId: string;
523
+ mode?: "execution" | "evidence_only" | undefined;
524
+ implementationTaskId?: string | undefined;
525
+ candidatePaths?: string[] | undefined;
364
526
  };
365
- }, {
366
527
  projectId: string;
367
528
  specification: {
368
529
  digest: string;
369
530
  specification: {
370
- version: 1;
371
531
  title: string;
532
+ version: 1;
372
533
  steps: {
373
534
  description: string;
374
535
  stepIndex: number;
@@ -379,8 +540,21 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
379
540
  };
380
541
  projectTaskId: string;
381
542
  taskExecutionId: string;
543
+ }, {
382
544
  purpose: {
383
545
  type: "implementation";
546
+ reviewer?: {
547
+ mode: "execution" | "evidence_only";
548
+ bindingId: string;
549
+ } | undefined;
550
+ coordination?: {
551
+ taskId: string;
552
+ specificationDigest: string;
553
+ } | undefined;
554
+ rework?: {
555
+ reviewExecutionId: string;
556
+ feedback: string;
557
+ } | undefined;
384
558
  } | {
385
559
  type: "review";
386
560
  evidence: ({
@@ -397,9 +571,28 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
397
571
  snapshotId: string;
398
572
  })[];
399
573
  implementationExecutionId: string;
400
- implementationInvocationId: string;
401
574
  specificationDigest: string;
575
+ implementationInvocationId: string;
576
+ mode?: "execution" | "evidence_only" | undefined;
577
+ implementationTaskId?: string | undefined;
578
+ candidatePaths?: string[] | undefined;
579
+ };
580
+ projectId: string;
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
+ };
402
593
  };
594
+ projectTaskId: string;
595
+ taskExecutionId: string;
403
596
  }>>;
404
597
  }, "strict", z.ZodTypeAny, {
405
598
  version?: 1;
@@ -413,30 +606,26 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
413
606
  agentKey?: string;
414
607
  } | {
415
608
  type?: "project_agent";
609
+ projectId?: string;
416
610
  threadId?: string;
417
611
  conversationId?: string;
418
- projectId?: string;
419
612
  agentKey?: "general_agent";
420
613
  };
421
614
  projectTask?: {
422
- projectId: string;
423
- specification: {
424
- digest: string;
425
- specification: {
426
- version: 1;
427
- title: string;
428
- steps: {
429
- description: string;
430
- stepIndex: number;
431
- }[];
432
- requirements: string[];
433
- description?: string | undefined;
434
- };
435
- };
436
- projectTaskId: string;
437
- taskExecutionId: string;
438
615
  purpose: {
439
616
  type: "implementation";
617
+ reviewer?: {
618
+ mode: "execution" | "evidence_only";
619
+ bindingId: string;
620
+ } | undefined;
621
+ coordination?: {
622
+ taskId: string;
623
+ specificationDigest: string;
624
+ } | undefined;
625
+ rework?: {
626
+ reviewExecutionId: string;
627
+ feedback: string;
628
+ } | undefined;
440
629
  } | {
441
630
  type: "review";
442
631
  evidence: ({
@@ -453,9 +642,28 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
453
642
  snapshotId: string;
454
643
  })[];
455
644
  implementationExecutionId: string;
456
- implementationInvocationId: string;
457
645
  specificationDigest: string;
646
+ implementationInvocationId: string;
647
+ mode?: "execution" | "evidence_only" | undefined;
648
+ implementationTaskId?: string | undefined;
649
+ candidatePaths?: string[] | undefined;
650
+ };
651
+ projectId: string;
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
+ };
458
664
  };
665
+ projectTaskId: string;
666
+ taskExecutionId: string;
459
667
  };
460
668
  }, {
461
669
  version?: 1;
@@ -469,30 +677,26 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
469
677
  agentKey?: string;
470
678
  } | {
471
679
  type?: "project_agent";
680
+ projectId?: string;
472
681
  threadId?: string;
473
682
  conversationId?: string;
474
- projectId?: string;
475
683
  agentKey?: "general_agent";
476
684
  };
477
685
  projectTask?: {
478
- projectId: string;
479
- specification: {
480
- digest: string;
481
- specification: {
482
- version: 1;
483
- title: string;
484
- steps: {
485
- description: string;
486
- stepIndex: number;
487
- }[];
488
- requirements: string[];
489
- description?: string | undefined;
490
- };
491
- };
492
- projectTaskId: string;
493
- taskExecutionId: string;
494
686
  purpose: {
495
687
  type: "implementation";
688
+ reviewer?: {
689
+ mode: "execution" | "evidence_only";
690
+ bindingId: string;
691
+ } | undefined;
692
+ coordination?: {
693
+ taskId: string;
694
+ specificationDigest: string;
695
+ } | undefined;
696
+ rework?: {
697
+ reviewExecutionId: string;
698
+ feedback: string;
699
+ } | undefined;
496
700
  } | {
497
701
  type: "review";
498
702
  evidence: ({
@@ -509,9 +713,28 @@ export declare const agentInvocationDispatchContextSchema: z.ZodObject<{
509
713
  snapshotId: string;
510
714
  })[];
511
715
  implementationExecutionId: string;
512
- implementationInvocationId: string;
513
716
  specificationDigest: string;
717
+ implementationInvocationId: string;
718
+ mode?: "execution" | "evidence_only" | undefined;
719
+ implementationTaskId?: string | undefined;
720
+ candidatePaths?: string[] | undefined;
721
+ };
722
+ projectId: string;
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
+ };
514
735
  };
736
+ projectTaskId: string;
737
+ taskExecutionId: string;
515
738
  };
516
739
  }>;
517
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 } 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. */
@@ -26,6 +24,11 @@ interface AgentRunnerReceiptBase {
26
24
  };
27
25
  /** Effective policy pinned when this process started; absent on historical receipts. */
28
26
  permissionMode?: CliPermissionMode;
27
+ executionBudget?: {
28
+ maxDurationSeconds: number;
29
+ deadline: string;
30
+ project?: import('@xpert-ai/contracts').ProjectTaskDurationConfiguration;
31
+ };
29
32
  }
30
33
  /** V1 retains its original cwd; V2 separates per-invocation records from the business cwd. */
31
34
  export type AgentRunnerReceipt = AgentRunnerReceiptBase & ({
@@ -33,6 +36,20 @@ export type AgentRunnerReceipt = AgentRunnerReceiptBase & ({
33
36
  } | {
34
37
  version: 2;
35
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
+ };
36
53
  });
37
54
  export interface AgentRunnerExitEvidence {
38
55
  version: 1;
@@ -62,6 +79,8 @@ export interface AgentExecutionRunner {
62
79
  }): Promise<unknown>;
63
80
  /** Export only selected files after revalidating the persisted delivery request. No selection means no export. */
64
81
  collectArtifacts(receipt: AgentRunnerReceipt, selection?: AgentArtifactSelection): Promise<NonNullable<AgentInvocationResult['artifacts']>>;
82
+ /** Read one explicitly selected UTF-8 Markdown report after receipt and filesystem authorization. */
83
+ readTaskReportFile?(receipt: AgentRunnerReceipt, path: string): Promise<AgentTaskReport>;
65
84
  /** Revoke model access and request process termination. Only exited confirms termination. */
66
85
  stop(receipt: AgentRunnerReceipt): Promise<{
67
86
  state: 'exited' | 'stopping' | 'unknown';