@wjarka/cezarion 0.14.9-dev.829 → 0.14.9-dev.842

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.
@@ -18,8 +18,11 @@ const CONTROL_RE = /[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/gu;
18
18
  * prose like "context length exceeded" or "model not found" matches none of these.
19
19
  * Cursor's explicit RetriableError includes stream-protocol failures (#508);
20
20
  * the word boundary keeps NonRetriableError and unknown protocol errors fatal.
21
+ * `[resource_exhausted]` is the capacity class (#531) and must stay transient
22
+ * even when Cursor omits the RetriableError wrapper. Do not treat every
23
+ * Cursor `[internal]` code as transient.
21
24
  */
22
- const TRANSIENT_SIGNAL_RE = /\b(?:429|500|502|503|504|rate[ _-]?limit(?:ed)?|overloaded|temporar(?:y|ily)|timed?[ _-]?out|bad gateway|service unavailable|internal server error|connection (?:reset|refused|closed|error)|econn(?:reset|refused|aborted)|socket hang up|try again|retry|RetriableError)\b/i;
25
+ const TRANSIENT_SIGNAL_RE = /\b(?:429|500|502|503|504|rate[ _-]?limit(?:ed)?|overloaded|temporar(?:y|ily)|timed?[ _-]?out|bad gateway|service unavailable|internal server error|connection (?:reset|refused|closed|error)|econn(?:reset|refused|aborted)|socket hang up|try again|retry|RetriableError|resource_exhausted)\b/i;
23
26
  /**
24
27
  * Strip the envelope prefix, control characters and runs of whitespace. Uncapped — this is the
25
28
  * form classification and limit parsing read, so a verbose envelope cannot bury its reset
@@ -1 +1 @@
1
- {"version":3,"file":"cursor-provider-error.js","sourceRoot":"","sources":["../../src/core/cursor-provider-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;;;;;;GAOG;AAEH,0EAA0E;AAC1E,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAAG,CAAC;AAOnD,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAC3C,MAAM,UAAU,GAAG,kDAAkD,CAAC;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G,GAAG,CAAC;AAOnD,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAC3C,MAAM,UAAU,GAAG,kDAAkD,CAAC;AAEtE;;;;;;;;;;GAUG;AACH,MAAM,mBAAmB,GACvB,kSAAkS,CAAC;AAErS;;;;GAIG;AACH,SAAS,2BAA2B,CAAC,IAAY;IAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AACnG,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,2BAA2B,CAAC,IAAY;IACtD,OAAO,2BAA2B,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,+BAA+B,CAAC,CAAC;AACrF,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,2BAA2B,CAAC,IAAY,EAAE,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE;IACxE,MAAM,MAAM,GAAG,2BAA2B,CAAC,IAAI,CAAC,CAAC;IACjD,IAAI,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC7D,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3C,IAAI,KAAK;QAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;IAChE,IAAI,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;IACnE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC3B,CAAC"}
@@ -425,18 +425,6 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
425
425
  } & {
426
426
  "/:workerId": {
427
427
  $get: {
428
- output: {
429
- error: string;
430
- code?: "invalid_input" | undefined;
431
- };
432
- outputFormat: "json";
433
- status: 400;
434
- input: {
435
- param: {
436
- workerId: string;
437
- };
438
- };
439
- } | {
440
428
  output: {
441
429
  workerId: string;
442
430
  parentRunId: string;
@@ -513,11 +501,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
513
501
  workerId: string;
514
502
  };
515
503
  };
516
- };
517
- };
518
- } & {
519
- "/:workerId/collect": {
520
- $post: {
504
+ } | {
521
505
  output: {
522
506
  error: string;
523
507
  code?: "invalid_input" | undefined;
@@ -528,10 +512,12 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
528
512
  param: {
529
513
  workerId: string;
530
514
  };
531
- } & {
532
- json: Record<string, never>;
533
515
  };
534
- } | {
516
+ };
517
+ };
518
+ } & {
519
+ "/:workerId/collect": {
520
+ $post: {
535
521
  output: {
536
522
  workerId: string;
537
523
  parentRunId: string;
@@ -633,11 +619,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
633
619
  } & {
634
620
  json: Record<string, never>;
635
621
  };
636
- };
637
- };
638
- } & {
639
- "/:workerId/steer": {
640
- $post: {
622
+ } | {
641
623
  output: {
642
624
  error: string;
643
625
  code?: "invalid_input" | undefined;
@@ -649,11 +631,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
649
631
  workerId: string;
650
632
  };
651
633
  } & {
652
- json: {
653
- text: string;
654
- };
634
+ json: Record<string, never>;
655
635
  };
656
- } | {
636
+ };
637
+ };
638
+ } & {
639
+ "/:workerId/steer": {
640
+ $post: {
657
641
  output: {
658
642
  workerId: string;
659
643
  state: "delivered" | "queued";
@@ -669,11 +653,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
669
653
  text: string;
670
654
  };
671
655
  };
672
- };
673
- };
674
- } & {
675
- "/:workerId/stop": {
676
- $post: {
656
+ } | {
677
657
  output: {
678
658
  error: string;
679
659
  code?: "invalid_input" | undefined;
@@ -685,9 +665,15 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
685
665
  workerId: string;
686
666
  };
687
667
  } & {
688
- json: Record<string, never>;
668
+ json: {
669
+ text: string;
670
+ };
689
671
  };
690
- } | {
672
+ };
673
+ };
674
+ } & {
675
+ "/:workerId/stop": {
676
+ $post: {
691
677
  output: {
692
678
  workerId: string;
693
679
  state: "stopping" | "terminated";
@@ -701,11 +687,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
701
687
  } & {
702
688
  json: Record<string, never>;
703
689
  };
704
- };
705
- };
706
- } & {
707
- "/:workerId/destroy": {
708
- $post: {
690
+ } | {
709
691
  output: {
710
692
  error: string;
711
693
  code?: "invalid_input" | undefined;
@@ -719,7 +701,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
719
701
  } & {
720
702
  json: Record<string, never>;
721
703
  };
722
- } | {
704
+ };
705
+ };
706
+ } & {
707
+ "/:workerId/destroy": {
708
+ $post: {
723
709
  output: {
724
710
  workerId: string;
725
711
  state: "complete" | "incomplete";
@@ -742,6 +728,20 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
742
728
  } & {
743
729
  json: Record<string, never>;
744
730
  };
731
+ } | {
732
+ output: {
733
+ error: string;
734
+ code?: "invalid_input" | undefined;
735
+ };
736
+ outputFormat: "json";
737
+ status: 400;
738
+ input: {
739
+ param: {
740
+ workerId: string;
741
+ };
742
+ } & {
743
+ json: Record<string, never>;
744
+ };
745
745
  } | {
746
746
  output: {
747
747
  workerId: string;
@@ -771,11 +771,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
771
771
  "/:workerId/diff": {
772
772
  $get: {
773
773
  output: {
774
- error: string;
775
- code?: "invalid_input" | undefined;
774
+ workerId: string;
775
+ baselineSha: string;
776
+ diff: string;
777
+ truncated: boolean;
776
778
  };
777
779
  outputFormat: "json";
778
- status: 400;
780
+ status: 200;
779
781
  input: {
780
782
  param: {
781
783
  workerId: string;
@@ -783,13 +785,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
783
785
  };
784
786
  } | {
785
787
  output: {
786
- workerId: string;
787
- baselineSha: string;
788
- diff: string;
789
- truncated: boolean;
788
+ error: string;
789
+ code?: "invalid_input" | undefined;
790
790
  };
791
791
  outputFormat: "json";
792
- status: 200;
792
+ status: 400;
793
793
  input: {
794
794
  param: {
795
795
  workerId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wjarka/cezarion",
3
- "version": "0.14.9-dev.829",
3
+ "version": "0.14.9-dev.842",
4
4
  "description": "Local cockpit for running and tracking AI agent tasks in your repo. Uses your logged-in `claude` CLI and `gh` — zero config, zero database.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -51,8 +51,8 @@
51
51
  "zod": "^4.4.3"
52
52
  },
53
53
  "devDependencies": {
54
- "@open-mercato/cezar-api-client": "0.14.9-dev.829",
55
- "@open-mercato/cezar-contract": "0.14.9-dev.829",
54
+ "@open-mercato/cezar-api-client": "0.14.9-dev.842",
55
+ "@open-mercato/cezar-contract": "0.14.9-dev.842",
56
56
  "@types/node": "^20.14.0",
57
57
  "@types/ws": "^8.18.1",
58
58
  "esbuild": "^0.28.1",
@@ -36,6 +36,11 @@ async function prompt(id, content) {
36
36
  // bare 'mock:provider-error' prefix, which every one of them contains.
37
37
  // #508: observed Cursor 2026.09.18-9a7762b error envelope, followed by end_turn.
38
38
  if (input.includes('mock:provider-error-protocol') && (input.includes('-exhaust') || prompts === 1)) { text('\n\nError: RetriableError: [invalid_argument] protocol error: missing EndStreamResponse'); complete(id); return; }
39
+ // #531: observed run 2f891027 seq 2005 capacity envelope. Match before the bare prefix.
40
+ // Do not reuse the protocol mock's `includes('-exhaust')` check: that token is a
41
+ // substring of `resource-exhausted` and would never recover.
42
+ if (input.includes('mock:provider-error-resource-exhausted-exhaust')) { text('\n\nError: RetriableError: [resource_exhausted] Error'); complete(id); return; }
43
+ if (input.includes('mock:provider-error-resource-exhausted') && prompts === 1) { text('\n\nError: RetriableError: [resource_exhausted] Error'); complete(id); return; }
39
44
  if (input.includes('mock:provider-error-unknown-protocol')) { text('\n\nError: [invalid_argument] protocol error: unknown frame'); complete(id); return; }
40
45
  if (input.includes('mock:provider-error-transient') && prompts === 1) { text('\n\nError: 502 bad gateway.'); complete(id); return; }
41
46
  if (input.includes('mock:provider-error-bare')) { text('\n\nError: 502 bad gateway.'); complete(id); return; }