@intentic/sandbox-contract 1.238.1 → 1.240.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 (41) hide show
  1. package/dist/contracts/agent.contract.d.ts +49 -30
  2. package/dist/contracts/agent.contract.d.ts.map +1 -1
  3. package/dist/contracts/agent.contract.js +1 -1
  4. package/dist/contracts/agent.contract.js.map +1 -1
  5. package/dist/contracts/agents.contract.d.ts +474 -0
  6. package/dist/contracts/agents.contract.d.ts.map +1 -1
  7. package/dist/contracts/runner.contract.d.ts +40 -30
  8. package/dist/contracts/runner.contract.d.ts.map +1 -1
  9. package/dist/contracts/sessions.contract.d.ts +474 -0
  10. package/dist/contracts/sessions.contract.d.ts.map +1 -1
  11. package/dist/contracts/system.contract.d.ts +474 -0
  12. package/dist/contracts/system.contract.d.ts.map +1 -1
  13. package/dist/events.d.ts +2546 -123
  14. package/dist/events.d.ts.map +1 -1
  15. package/dist/events.js +122 -61
  16. package/dist/events.js.map +1 -1
  17. package/dist/index.d.ts +1607 -165
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +1 -0
  20. package/dist/index.js.map +1 -1
  21. package/dist/schemas/engines.d.ts +157 -0
  22. package/dist/schemas/engines.d.ts.map +1 -0
  23. package/dist/schemas/engines.js +70 -0
  24. package/dist/schemas/engines.js.map +1 -0
  25. package/dist/schemas/plan-limits.d.ts +19 -0
  26. package/dist/schemas/plan-limits.d.ts.map +1 -1
  27. package/dist/schemas/plan-limits.js +8 -1
  28. package/dist/schemas/plan-limits.js.map +1 -1
  29. package/dist/workspace-state.d.ts +5 -0
  30. package/dist/workspace-state.d.ts.map +1 -1
  31. package/dist/workspace-state.js +1 -0
  32. package/dist/workspace-state.js.map +1 -1
  33. package/package.json +4 -4
  34. package/src/contracts/agent.contract.ts +1 -1
  35. package/src/events.test.ts +14 -0
  36. package/src/events.ts +250 -104
  37. package/src/index.ts +1 -0
  38. package/src/schemas/engines.ts +129 -0
  39. package/src/schemas/plan-limits.ts +31 -12
  40. package/src/workspace-state.test.ts +5 -0
  41. package/src/workspace-state.ts +12 -0
@@ -50,7 +50,6 @@ export declare const runnerContract: {
50
50
  bytesBase64: z.ZodString;
51
51
  }, z.core.$strip>>>;
52
52
  }, z.core.$strip>, import("@orpc/contract").Schema<AsyncIteratorObject<{
53
- kind: "plan";
54
53
  requestId: string;
55
54
  text: string;
56
55
  document?: {
@@ -60,8 +59,8 @@ export declare const runnerContract: {
60
59
  truncated?: boolean | undefined;
61
60
  plan?: boolean | undefined;
62
61
  } | undefined;
62
+ kind: "plan";
63
63
  } | {
64
- kind: "question";
65
64
  requestId: string;
66
65
  questions: {
67
66
  question: string;
@@ -80,6 +79,7 @@ export declare const runnerContract: {
80
79
  truncated?: boolean | undefined;
81
80
  plan?: boolean | undefined;
82
81
  } | undefined;
82
+ kind: "question";
83
83
  } | {
84
84
  toolName: string;
85
85
  title?: string | undefined;
@@ -98,8 +98,8 @@ export declare const runnerContract: {
98
98
  }[];
99
99
  } | undefined;
100
100
  explain?: string | undefined;
101
- kind: "permission";
102
101
  requestId: string;
102
+ kind: "permission";
103
103
  } | {
104
104
  kind: "session";
105
105
  sessionId: string;
@@ -304,18 +304,17 @@ export declare const runnerContract: {
304
304
  preTokens?: number | undefined;
305
305
  postTokens?: number | undefined;
306
306
  } | {
307
- kind: "browser_help";
308
307
  requestId: string;
309
308
  session: string;
310
309
  account: string;
311
310
  message: string;
311
+ kind: "browser_help";
312
312
  } | {
313
- kind: "terminal_help";
314
313
  requestId: string;
315
314
  session: string;
316
315
  message: string;
316
+ kind: "terminal_help";
317
317
  } | {
318
- kind: "service_offer";
319
318
  requestId: string;
320
319
  offer: {
321
320
  slug: string;
@@ -332,6 +331,7 @@ export declare const runnerContract: {
332
331
  request: string;
333
332
  why?: string | undefined;
334
333
  };
334
+ kind: "service_offer";
335
335
  } | {
336
336
  kind: "service_event";
337
337
  requestId: string;
@@ -343,26 +343,25 @@ export declare const runnerContract: {
343
343
  data: unknown;
344
344
  };
345
345
  } | {
346
- kind: "service_receipt";
347
- requestId: string;
348
346
  outcome: "ok" | "refunded" | "refused";
349
347
  credits: number;
350
348
  remaining?: number | undefined;
349
+ kind: "service_receipt";
350
+ requestId: string;
351
351
  } | {
352
- kind: "capability_offer";
353
352
  requestId: string;
354
353
  offer: {
355
354
  card: string;
356
355
  name: string;
357
356
  why?: string | undefined;
358
357
  };
358
+ kind: "capability_offer";
359
359
  } | {
360
- kind: "capability_outcome";
361
- requestId: string;
362
360
  outcome: "connected" | "unfinished";
363
361
  id?: string | undefined;
362
+ kind: "capability_outcome";
363
+ requestId: string;
364
364
  } | {
365
- kind: "payment_offer";
366
365
  requestId: string;
367
366
  offer: {
368
367
  url: string;
@@ -376,13 +375,14 @@ export declare const runnerContract: {
376
375
  dailyCapUsd: string;
377
376
  why?: string | undefined;
378
377
  };
378
+ kind: "payment_offer";
379
379
  } | {
380
- kind: "payment_receipt";
381
- requestId: string;
382
380
  outcome: "failed" | "paid";
383
381
  amountUsd: string;
384
382
  transaction?: string | undefined;
385
383
  network?: string | undefined;
384
+ kind: "payment_receipt";
385
+ requestId: string;
386
386
  } | {
387
387
  kind: "resolved";
388
388
  requestId: string;
@@ -434,7 +434,12 @@ export declare const runnerContract: {
434
434
  } | {
435
435
  kind: "error";
436
436
  message: string;
437
- code?: "agent-busy" | "claude-not-entitled" | "claude-reauth" | "claude-token-refused" | "codex-advisory" | "codex-model-invalid" | "codex-reauth" | "context-window-too-small" | "grok-model-invalid" | "harness-incomplete" | "provider-outage" | "rate_limit" | "sandbox-memory-low" | "session-not-found" | "subscription-required" | "trial-exhausted" | "trial-model-unavailable" | "trial-unavailable" | "turn-cap" | "unknown-command" | undefined;
437
+ code?: "agent-busy" | "claude-not-entitled" | "claude-reauth" | "claude-token-refused" | "codex-advisory" | "codex-model-invalid" | "codex-reauth" | "context-window-too-small" | "engine-version-floor" | "grok-model-invalid" | "harness-incomplete" | "provider-outage" | "rate_limit" | "sandbox-memory-low" | "session-not-found" | "subscription-required" | "trial-exhausted" | "trial-model-unavailable" | "trial-unavailable" | "turn-cap" | "unknown-command" | undefined;
438
+ engine?: {
439
+ id: string;
440
+ running?: string | undefined;
441
+ floor: string;
442
+ } | undefined;
438
443
  resetsAt?: number | undefined;
439
444
  autoResume?: "available" | "scheduled" | undefined;
440
445
  held?: {
@@ -448,7 +453,6 @@ export declare const runnerContract: {
448
453
  } | {
449
454
  kind: "done";
450
455
  }, unknown, void>, import("@orpc/contract").AsyncIteratorClass<{
451
- kind: "plan";
452
456
  requestId: string;
453
457
  text: string;
454
458
  document?: {
@@ -458,8 +462,8 @@ export declare const runnerContract: {
458
462
  truncated?: boolean | undefined;
459
463
  plan?: boolean | undefined;
460
464
  } | undefined;
465
+ kind: "plan";
461
466
  } | {
462
- kind: "question";
463
467
  requestId: string;
464
468
  questions: {
465
469
  question: string;
@@ -478,6 +482,7 @@ export declare const runnerContract: {
478
482
  truncated?: boolean | undefined;
479
483
  plan?: boolean | undefined;
480
484
  } | undefined;
485
+ kind: "question";
481
486
  } | {
482
487
  toolName: string;
483
488
  title?: string | undefined;
@@ -496,8 +501,8 @@ export declare const runnerContract: {
496
501
  }[];
497
502
  } | undefined;
498
503
  explain?: string | undefined;
499
- kind: "permission";
500
504
  requestId: string;
505
+ kind: "permission";
501
506
  } | {
502
507
  kind: "session";
503
508
  sessionId: string;
@@ -702,18 +707,17 @@ export declare const runnerContract: {
702
707
  preTokens?: number | undefined;
703
708
  postTokens?: number | undefined;
704
709
  } | {
705
- kind: "browser_help";
706
710
  requestId: string;
707
711
  session: string;
708
712
  account: string;
709
713
  message: string;
714
+ kind: "browser_help";
710
715
  } | {
711
- kind: "terminal_help";
712
716
  requestId: string;
713
717
  session: string;
714
718
  message: string;
719
+ kind: "terminal_help";
715
720
  } | {
716
- kind: "service_offer";
717
721
  requestId: string;
718
722
  offer: {
719
723
  slug: string;
@@ -730,6 +734,7 @@ export declare const runnerContract: {
730
734
  request: string;
731
735
  why?: string | undefined;
732
736
  };
737
+ kind: "service_offer";
733
738
  } | {
734
739
  kind: "service_event";
735
740
  requestId: string;
@@ -741,26 +746,25 @@ export declare const runnerContract: {
741
746
  data: unknown;
742
747
  };
743
748
  } | {
744
- kind: "service_receipt";
745
- requestId: string;
746
749
  outcome: "ok" | "refunded" | "refused";
747
750
  credits: number;
748
751
  remaining?: number | undefined;
752
+ kind: "service_receipt";
753
+ requestId: string;
749
754
  } | {
750
- kind: "capability_offer";
751
755
  requestId: string;
752
756
  offer: {
753
757
  card: string;
754
758
  name: string;
755
759
  why?: string | undefined;
756
760
  };
761
+ kind: "capability_offer";
757
762
  } | {
758
- kind: "capability_outcome";
759
- requestId: string;
760
763
  outcome: "connected" | "unfinished";
761
764
  id?: string | undefined;
765
+ kind: "capability_outcome";
766
+ requestId: string;
762
767
  } | {
763
- kind: "payment_offer";
764
768
  requestId: string;
765
769
  offer: {
766
770
  url: string;
@@ -774,13 +778,14 @@ export declare const runnerContract: {
774
778
  dailyCapUsd: string;
775
779
  why?: string | undefined;
776
780
  };
781
+ kind: "payment_offer";
777
782
  } | {
778
- kind: "payment_receipt";
779
- requestId: string;
780
783
  outcome: "failed" | "paid";
781
784
  amountUsd: string;
782
785
  transaction?: string | undefined;
783
786
  network?: string | undefined;
787
+ kind: "payment_receipt";
788
+ requestId: string;
784
789
  } | {
785
790
  kind: "resolved";
786
791
  requestId: string;
@@ -832,7 +837,12 @@ export declare const runnerContract: {
832
837
  } | {
833
838
  kind: "error";
834
839
  message: string;
835
- code?: "agent-busy" | "claude-not-entitled" | "claude-reauth" | "claude-token-refused" | "codex-advisory" | "codex-model-invalid" | "codex-reauth" | "context-window-too-small" | "grok-model-invalid" | "harness-incomplete" | "provider-outage" | "rate_limit" | "sandbox-memory-low" | "session-not-found" | "subscription-required" | "trial-exhausted" | "trial-model-unavailable" | "trial-unavailable" | "turn-cap" | "unknown-command" | undefined;
840
+ code?: "agent-busy" | "claude-not-entitled" | "claude-reauth" | "claude-token-refused" | "codex-advisory" | "codex-model-invalid" | "codex-reauth" | "context-window-too-small" | "engine-version-floor" | "grok-model-invalid" | "harness-incomplete" | "provider-outage" | "rate_limit" | "sandbox-memory-low" | "session-not-found" | "subscription-required" | "trial-exhausted" | "trial-model-unavailable" | "trial-unavailable" | "turn-cap" | "unknown-command" | undefined;
841
+ engine?: {
842
+ id: string;
843
+ running?: string | undefined;
844
+ floor: string;
845
+ } | undefined;
836
846
  resetsAt?: number | undefined;
837
847
  autoResume?: "available" | "scheduled" | undefined;
838
848
  held?: {
@@ -1 +1 @@
1
- {"version":3,"file":"runner.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/runner.contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB,eAAO,MAAM,cAAc;IAIvB,QAAQ;;;;;;IAGR,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGb,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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