@wjarka/cezarion 0.14.8-pr507.762 → 0.14.8-pr511.765

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.
@@ -16,8 +16,10 @@ const CONTROL_RE = /[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/gu;
16
16
  * the cost of a false positive is two wasted prompts (bounded below), while the
17
17
  * cost of a false negative is a dead run that needed a human Continue. Fatal
18
18
  * prose like "context length exceeded" or "model not found" matches none of these.
19
+ * Cursor's explicit RetriableError includes stream-protocol failures (#508);
20
+ * the word boundary keeps NonRetriableError and unknown protocol errors fatal.
19
21
  */
20
- 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)\b/i;
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;
21
23
  /**
22
24
  * Strip the envelope prefix, control characters and runs of whitespace. Uncapped — this is the
23
25
  * 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;AAEtE;;;;;GAKG;AACH,MAAM,mBAAmB,GACvB,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AAe,CAAC;AAC3C,MAAM,UAAU,GAAG,kDAAkD,CAAC;AAEtE;;;;;;;GAOG;AACH,MAAM,mBAAmB,GACvB,+QAA+Q,CAAC;AAElR;;;;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"}
@@ -365,18 +365,6 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
365
365
  } & {
366
366
  "/:workerId": {
367
367
  $get: {
368
- output: {
369
- error: string;
370
- code?: "invalid_input" | undefined;
371
- };
372
- outputFormat: "json";
373
- status: 400;
374
- input: {
375
- param: {
376
- workerId: string;
377
- };
378
- };
379
- } | {
380
368
  output: {
381
369
  workerId: string;
382
370
  parentRunId: string;
@@ -453,11 +441,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
453
441
  workerId: string;
454
442
  };
455
443
  };
456
- };
457
- };
458
- } & {
459
- "/:workerId/collect": {
460
- $post: {
444
+ } | {
461
445
  output: {
462
446
  error: string;
463
447
  code?: "invalid_input" | undefined;
@@ -468,10 +452,12 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
468
452
  param: {
469
453
  workerId: string;
470
454
  };
471
- } & {
472
- json: Record<string, never>;
473
455
  };
474
- } | {
456
+ };
457
+ };
458
+ } & {
459
+ "/:workerId/collect": {
460
+ $post: {
475
461
  output: {
476
462
  workerId: string;
477
463
  parentRunId: string;
@@ -573,11 +559,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
573
559
  } & {
574
560
  json: Record<string, never>;
575
561
  };
576
- };
577
- };
578
- } & {
579
- "/:workerId/steer": {
580
- $post: {
562
+ } | {
581
563
  output: {
582
564
  error: string;
583
565
  code?: "invalid_input" | undefined;
@@ -589,11 +571,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
589
571
  workerId: string;
590
572
  };
591
573
  } & {
592
- json: {
593
- text: string;
594
- };
574
+ json: Record<string, never>;
595
575
  };
596
- } | {
576
+ };
577
+ };
578
+ } & {
579
+ "/:workerId/steer": {
580
+ $post: {
597
581
  output: {
598
582
  workerId: string;
599
583
  state: "delivered" | "queued";
@@ -609,11 +593,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
609
593
  text: string;
610
594
  };
611
595
  };
612
- };
613
- };
614
- } & {
615
- "/:workerId/stop": {
616
- $post: {
596
+ } | {
617
597
  output: {
618
598
  error: string;
619
599
  code?: "invalid_input" | undefined;
@@ -625,9 +605,15 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
625
605
  workerId: string;
626
606
  };
627
607
  } & {
628
- json: Record<string, never>;
608
+ json: {
609
+ text: string;
610
+ };
629
611
  };
630
- } | {
612
+ };
613
+ };
614
+ } & {
615
+ "/:workerId/stop": {
616
+ $post: {
631
617
  output: {
632
618
  workerId: string;
633
619
  state: "stopping" | "terminated";
@@ -641,11 +627,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
641
627
  } & {
642
628
  json: Record<string, never>;
643
629
  };
644
- };
645
- };
646
- } & {
647
- "/:workerId/destroy": {
648
- $post: {
630
+ } | {
649
631
  output: {
650
632
  error: string;
651
633
  code?: "invalid_input" | undefined;
@@ -659,7 +641,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
659
641
  } & {
660
642
  json: Record<string, never>;
661
643
  };
662
- } | {
644
+ };
645
+ };
646
+ } & {
647
+ "/:workerId/destroy": {
648
+ $post: {
663
649
  output: {
664
650
  workerId: string;
665
651
  state: "complete" | "incomplete";
@@ -682,6 +668,20 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
682
668
  } & {
683
669
  json: Record<string, never>;
684
670
  };
671
+ } | {
672
+ output: {
673
+ error: string;
674
+ code?: "invalid_input" | undefined;
675
+ };
676
+ outputFormat: "json";
677
+ status: 400;
678
+ input: {
679
+ param: {
680
+ workerId: string;
681
+ };
682
+ } & {
683
+ json: Record<string, never>;
684
+ };
685
685
  } | {
686
686
  output: {
687
687
  workerId: string;
@@ -711,11 +711,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
711
711
  "/:workerId/diff": {
712
712
  $get: {
713
713
  output: {
714
- error: string;
715
- code?: "invalid_input" | undefined;
714
+ workerId: string;
715
+ baselineSha: string;
716
+ diff: string;
717
+ truncated: boolean;
716
718
  };
717
719
  outputFormat: "json";
718
- status: 400;
720
+ status: 200;
719
721
  input: {
720
722
  param: {
721
723
  workerId: string;
@@ -723,13 +725,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
723
725
  };
724
726
  } | {
725
727
  output: {
726
- workerId: string;
727
- baselineSha: string;
728
- diff: string;
729
- truncated: boolean;
728
+ error: string;
729
+ code?: "invalid_input" | undefined;
730
730
  };
731
731
  outputFormat: "json";
732
- status: 200;
732
+ status: 400;
733
733
  input: {
734
734
  param: {
735
735
  workerId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wjarka/cezarion",
3
- "version": "0.14.8-pr507.762",
3
+ "version": "0.14.8-pr511.765",
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.8-pr507.762",
55
- "@open-mercato/cezar-contract": "0.14.8-pr507.762",
54
+ "@open-mercato/cezar-api-client": "0.14.8-pr511.765",
55
+ "@open-mercato/cezar-contract": "0.14.8-pr511.765",
56
56
  "@types/node": "^20.14.0",
57
57
  "@types/ws": "^8.18.1",
58
58
  "esbuild": "^0.28.1",
@@ -34,6 +34,9 @@ async function prompt(id, content) {
34
34
  if (input.includes('mock:rpc-error')) { emit({ id, error: { code: -32603, message: 'Provider rejected request' } }); return; }
35
35
  // #443 provider-error envelopes: the specific scenarios must be matched BEFORE the
36
36
  // bare 'mock:provider-error' prefix, which every one of them contains.
37
+ // #508: observed Cursor 2026.09.18-9a7762b error envelope, followed by end_turn.
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
+ if (input.includes('mock:provider-error-unknown-protocol')) { text('\n\nError: [invalid_argument] protocol error: unknown frame'); complete(id); return; }
37
40
  if (input.includes('mock:provider-error-transient') && prompts === 1) { text('\n\nError: 502 bad gateway.'); complete(id); return; }
38
41
  if (input.includes('mock:provider-error-bare')) { text('\n\nError: 502 bad gateway.'); complete(id); return; }
39
42
  if (input.includes('mock:provider-error-instant-near') && prompts === 1) { text(`\n\nError: 429 rate limited, try again at ${new Date(Date.now() + 300).toISOString()}.`); complete(id); return; }