@sellable/mcp 0.1.854 → 0.1.856

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.
@@ -265,11 +265,20 @@ export type RefillV3AdvanceRowReadback = {
265
265
  };
266
266
  export declare const REFILL_V3_TERMINAL_ROW_CLASSIFICATIONS: readonly ["capacity_met", "campaigns_exhausted", "no_eligible_campaigns", "externally_gated", "deferred", "blocked", "scope_unresolved", "defect"];
267
267
  export type RefillV3TerminalRowClassification = (typeof REFILL_V3_TERMINAL_ROW_CLASSIFICATIONS)[number];
268
+ export declare const REFILL_V3_PAID_CREDIT_REFRESH_ATTEMPT_OUTCOMES: readonly ["skipped_fresh", "succeeded", "failed", "not_attempted"];
269
+ export type RefillV3PaidCreditRefreshAttemptEvidence = {
270
+ attemptedAt: string | null;
271
+ outcome: (typeof REFILL_V3_PAID_CREDIT_REFRESH_ATTEMPT_OUTCOMES)[number];
272
+ errorClass: string | null;
273
+ errorDetail: string | null;
274
+ durationMs: number | null;
275
+ };
268
276
  export type RefillV3TerminalRowEvidence = RefillV3AdvanceRowReadback & {
269
277
  terminalClassification: RefillV3TerminalRowClassification;
270
278
  approvedDelta: number;
271
279
  scheduledDelta: number;
272
280
  paidCreditEvidence?: RefillWorldStatePaidCreditEvidence;
281
+ paidCreditRefreshAttempt?: RefillV3PaidCreditRefreshAttemptEvidence;
273
282
  };
274
283
  export type RefillV3AdvanceTerminalEvidence = {
275
284
  rows: RefillV3TerminalRowEvidence[];
@@ -686,6 +695,30 @@ export declare const REFILL_V3_ADVANCE_OUTPUT_SCHEMA: Readonly<{
686
695
  };
687
696
  };
688
697
  };
698
+ readonly paidCreditRefreshAttempt: {
699
+ readonly type: "object";
700
+ readonly additionalProperties: false;
701
+ readonly required: readonly ["attemptedAt", "outcome", "errorClass", "errorDetail", "durationMs"];
702
+ readonly properties: {
703
+ readonly attemptedAt: {
704
+ readonly type: readonly ["string", "null"];
705
+ };
706
+ readonly outcome: {
707
+ readonly type: "string";
708
+ readonly enum: readonly ["skipped_fresh", "succeeded", "failed", "not_attempted"];
709
+ };
710
+ readonly errorClass: {
711
+ readonly type: readonly ["string", "null"];
712
+ };
713
+ readonly errorDetail: {
714
+ readonly type: readonly ["string", "null"];
715
+ };
716
+ readonly durationMs: {
717
+ readonly type: readonly ["integer", "null"];
718
+ readonly minimum: 0;
719
+ };
720
+ };
721
+ };
689
722
  readonly senderId: {
690
723
  readonly type: "string";
691
724
  readonly minLength: 1;
@@ -792,6 +825,30 @@ export declare const REFILL_V3_ADVANCE_OUTPUT_SCHEMA: Readonly<{
792
825
  };
793
826
  };
794
827
  };
828
+ readonly paidCreditRefreshAttempt: {
829
+ readonly type: "object";
830
+ readonly additionalProperties: false;
831
+ readonly required: readonly ["attemptedAt", "outcome", "errorClass", "errorDetail", "durationMs"];
832
+ readonly properties: {
833
+ readonly attemptedAt: {
834
+ readonly type: readonly ["string", "null"];
835
+ };
836
+ readonly outcome: {
837
+ readonly type: "string";
838
+ readonly enum: readonly ["skipped_fresh", "succeeded", "failed", "not_attempted"];
839
+ };
840
+ readonly errorClass: {
841
+ readonly type: readonly ["string", "null"];
842
+ };
843
+ readonly errorDetail: {
844
+ readonly type: readonly ["string", "null"];
845
+ };
846
+ readonly durationMs: {
847
+ readonly type: readonly ["integer", "null"];
848
+ readonly minimum: 0;
849
+ };
850
+ };
851
+ };
795
852
  readonly senderId: {
796
853
  readonly type: "string";
797
854
  readonly minLength: 1;
@@ -898,6 +955,30 @@ export declare const REFILL_V3_ADVANCE_OUTPUT_SCHEMA: Readonly<{
898
955
  };
899
956
  };
900
957
  };
958
+ readonly paidCreditRefreshAttempt: {
959
+ readonly type: "object";
960
+ readonly additionalProperties: false;
961
+ readonly required: readonly ["attemptedAt", "outcome", "errorClass", "errorDetail", "durationMs"];
962
+ readonly properties: {
963
+ readonly attemptedAt: {
964
+ readonly type: readonly ["string", "null"];
965
+ };
966
+ readonly outcome: {
967
+ readonly type: "string";
968
+ readonly enum: readonly ["skipped_fresh", "succeeded", "failed", "not_attempted"];
969
+ };
970
+ readonly errorClass: {
971
+ readonly type: readonly ["string", "null"];
972
+ };
973
+ readonly errorDetail: {
974
+ readonly type: readonly ["string", "null"];
975
+ };
976
+ readonly durationMs: {
977
+ readonly type: readonly ["integer", "null"];
978
+ readonly minimum: 0;
979
+ };
980
+ };
981
+ };
901
982
  readonly senderId: {
902
983
  readonly type: "string";
903
984
  readonly minLength: 1;
@@ -340,6 +340,12 @@ export const REFILL_V3_TERMINAL_ROW_CLASSIFICATIONS = [
340
340
  "scope_unresolved",
341
341
  "defect",
342
342
  ];
343
+ export const REFILL_V3_PAID_CREDIT_REFRESH_ATTEMPT_OUTCOMES = [
344
+ "skipped_fresh",
345
+ "succeeded",
346
+ "failed",
347
+ "not_attempted",
348
+ ];
343
349
  /**
344
350
  * Required keys per variant. The decoder rejects any other key set.
345
351
  *
@@ -488,6 +494,27 @@ const TERMINAL_ROW_EVIDENCE_SCHEMA = {
488
494
  approvedDelta: { type: "integer", minimum: 0 },
489
495
  scheduledDelta: { type: "integer", minimum: 0 },
490
496
  paidCreditEvidence: REFILL_V3_WORLD_STATE_PAID_CREDIT_EVIDENCE_SCHEMA,
497
+ paidCreditRefreshAttempt: {
498
+ type: "object",
499
+ additionalProperties: false,
500
+ required: [
501
+ "attemptedAt",
502
+ "outcome",
503
+ "errorClass",
504
+ "errorDetail",
505
+ "durationMs",
506
+ ],
507
+ properties: {
508
+ attemptedAt: { type: ["string", "null"] },
509
+ outcome: {
510
+ type: "string",
511
+ enum: [...REFILL_V3_PAID_CREDIT_REFRESH_ATTEMPT_OUTCOMES],
512
+ },
513
+ errorClass: { type: ["string", "null"] },
514
+ errorDetail: { type: ["string", "null"] },
515
+ durationMs: { type: ["integer", "null"], minimum: 0 },
516
+ },
517
+ },
491
518
  },
492
519
  };
493
520
  const TERMINAL_EVIDENCE_SCHEMA = {
@@ -776,7 +803,11 @@ function decodeTerminalRowEvidence(value) {
776
803
  "approvedDelta",
777
804
  "scheduledDelta",
778
805
  ];
779
- const keys = [...requiredKeys, "paidCreditEvidence"];
806
+ const keys = [
807
+ ...requiredKeys,
808
+ "paidCreditEvidence",
809
+ "paidCreditRefreshAttempt",
810
+ ];
780
811
  if (!onlyKeys(value, keys) || requiredKeys.some((key) => !(key in value))) {
781
812
  return null;
782
813
  }
@@ -793,12 +824,39 @@ function decodeTerminalRowEvidence(value) {
793
824
  if (value.paidCreditEvidence !== undefined && !paidCreditEvidence) {
794
825
  return null;
795
826
  }
827
+ let paidCreditRefreshAttempt;
828
+ if (value.paidCreditRefreshAttempt !== undefined) {
829
+ const attempt = value.paidCreditRefreshAttempt;
830
+ if (!isRecord(attempt) ||
831
+ !onlyKeys(attempt, [
832
+ "attemptedAt",
833
+ "outcome",
834
+ "errorClass",
835
+ "errorDetail",
836
+ "durationMs",
837
+ ]) ||
838
+ !(attempt.attemptedAt === null || typeof attempt.attemptedAt === "string") ||
839
+ !isOneOfAdvance(attempt.outcome, REFILL_V3_PAID_CREDIT_REFRESH_ATTEMPT_OUTCOMES) ||
840
+ !(attempt.errorClass === null || typeof attempt.errorClass === "string") ||
841
+ !(attempt.errorDetail === null || typeof attempt.errorDetail === "string") ||
842
+ !(attempt.durationMs === null || count(attempt.durationMs))) {
843
+ return null;
844
+ }
845
+ paidCreditRefreshAttempt = {
846
+ attemptedAt: attempt.attemptedAt,
847
+ outcome: attempt.outcome,
848
+ errorClass: attempt.errorClass,
849
+ errorDetail: attempt.errorDetail,
850
+ durationMs: attempt.durationMs,
851
+ };
852
+ }
796
853
  return {
797
854
  ...readback,
798
855
  terminalClassification: value.terminalClassification,
799
856
  approvedDelta: value.approvedDelta,
800
857
  scheduledDelta: value.scheduledDelta,
801
858
  ...(paidCreditEvidence ? { paidCreditEvidence } : {}),
859
+ ...(paidCreditRefreshAttempt ? { paidCreditRefreshAttempt } : {}),
802
860
  };
803
861
  }
804
862
  function decodeTerminalEvidence(value) {
@@ -415,6 +415,30 @@ export declare const refillV3AdvanceToolDefinitions: {
415
415
  };
416
416
  };
417
417
  };
418
+ readonly paidCreditRefreshAttempt: {
419
+ readonly type: "object";
420
+ readonly additionalProperties: false;
421
+ readonly required: readonly ["attemptedAt", "outcome", "errorClass", "errorDetail", "durationMs"];
422
+ readonly properties: {
423
+ readonly attemptedAt: {
424
+ readonly type: readonly ["string", "null"];
425
+ };
426
+ readonly outcome: {
427
+ readonly type: "string";
428
+ readonly enum: readonly ["skipped_fresh", "succeeded", "failed", "not_attempted"];
429
+ };
430
+ readonly errorClass: {
431
+ readonly type: readonly ["string", "null"];
432
+ };
433
+ readonly errorDetail: {
434
+ readonly type: readonly ["string", "null"];
435
+ };
436
+ readonly durationMs: {
437
+ readonly type: readonly ["integer", "null"];
438
+ readonly minimum: 0;
439
+ };
440
+ };
441
+ };
418
442
  readonly senderId: {
419
443
  readonly type: "string";
420
444
  readonly minLength: 1;
@@ -521,6 +545,30 @@ export declare const refillV3AdvanceToolDefinitions: {
521
545
  };
522
546
  };
523
547
  };
548
+ readonly paidCreditRefreshAttempt: {
549
+ readonly type: "object";
550
+ readonly additionalProperties: false;
551
+ readonly required: readonly ["attemptedAt", "outcome", "errorClass", "errorDetail", "durationMs"];
552
+ readonly properties: {
553
+ readonly attemptedAt: {
554
+ readonly type: readonly ["string", "null"];
555
+ };
556
+ readonly outcome: {
557
+ readonly type: "string";
558
+ readonly enum: readonly ["skipped_fresh", "succeeded", "failed", "not_attempted"];
559
+ };
560
+ readonly errorClass: {
561
+ readonly type: readonly ["string", "null"];
562
+ };
563
+ readonly errorDetail: {
564
+ readonly type: readonly ["string", "null"];
565
+ };
566
+ readonly durationMs: {
567
+ readonly type: readonly ["integer", "null"];
568
+ readonly minimum: 0;
569
+ };
570
+ };
571
+ };
524
572
  readonly senderId: {
525
573
  readonly type: "string";
526
574
  readonly minLength: 1;
@@ -627,6 +675,30 @@ export declare const refillV3AdvanceToolDefinitions: {
627
675
  };
628
676
  };
629
677
  };
678
+ readonly paidCreditRefreshAttempt: {
679
+ readonly type: "object";
680
+ readonly additionalProperties: false;
681
+ readonly required: readonly ["attemptedAt", "outcome", "errorClass", "errorDetail", "durationMs"];
682
+ readonly properties: {
683
+ readonly attemptedAt: {
684
+ readonly type: readonly ["string", "null"];
685
+ };
686
+ readonly outcome: {
687
+ readonly type: "string";
688
+ readonly enum: readonly ["skipped_fresh", "succeeded", "failed", "not_attempted"];
689
+ };
690
+ readonly errorClass: {
691
+ readonly type: readonly ["string", "null"];
692
+ };
693
+ readonly errorDetail: {
694
+ readonly type: readonly ["string", "null"];
695
+ };
696
+ readonly durationMs: {
697
+ readonly type: readonly ["integer", "null"];
698
+ readonly minimum: 0;
699
+ };
700
+ };
701
+ };
630
702
  readonly senderId: {
631
703
  readonly type: "string";
632
704
  readonly minLength: 1;
@@ -10541,6 +10541,30 @@ export declare const allTools: ({
10541
10541
  };
10542
10542
  };
10543
10543
  };
10544
+ readonly paidCreditRefreshAttempt: {
10545
+ readonly type: "object";
10546
+ readonly additionalProperties: false;
10547
+ readonly required: readonly ["attemptedAt", "outcome", "errorClass", "errorDetail", "durationMs"];
10548
+ readonly properties: {
10549
+ readonly attemptedAt: {
10550
+ readonly type: readonly ["string", "null"];
10551
+ };
10552
+ readonly outcome: {
10553
+ readonly type: "string";
10554
+ readonly enum: readonly ["skipped_fresh", "succeeded", "failed", "not_attempted"];
10555
+ };
10556
+ readonly errorClass: {
10557
+ readonly type: readonly ["string", "null"];
10558
+ };
10559
+ readonly errorDetail: {
10560
+ readonly type: readonly ["string", "null"];
10561
+ };
10562
+ readonly durationMs: {
10563
+ readonly type: readonly ["integer", "null"];
10564
+ readonly minimum: 0;
10565
+ };
10566
+ };
10567
+ };
10544
10568
  readonly senderId: {
10545
10569
  readonly type: "string";
10546
10570
  readonly minLength: 1;
@@ -10647,6 +10671,30 @@ export declare const allTools: ({
10647
10671
  };
10648
10672
  };
10649
10673
  };
10674
+ readonly paidCreditRefreshAttempt: {
10675
+ readonly type: "object";
10676
+ readonly additionalProperties: false;
10677
+ readonly required: readonly ["attemptedAt", "outcome", "errorClass", "errorDetail", "durationMs"];
10678
+ readonly properties: {
10679
+ readonly attemptedAt: {
10680
+ readonly type: readonly ["string", "null"];
10681
+ };
10682
+ readonly outcome: {
10683
+ readonly type: "string";
10684
+ readonly enum: readonly ["skipped_fresh", "succeeded", "failed", "not_attempted"];
10685
+ };
10686
+ readonly errorClass: {
10687
+ readonly type: readonly ["string", "null"];
10688
+ };
10689
+ readonly errorDetail: {
10690
+ readonly type: readonly ["string", "null"];
10691
+ };
10692
+ readonly durationMs: {
10693
+ readonly type: readonly ["integer", "null"];
10694
+ readonly minimum: 0;
10695
+ };
10696
+ };
10697
+ };
10650
10698
  readonly senderId: {
10651
10699
  readonly type: "string";
10652
10700
  readonly minLength: 1;
@@ -10753,6 +10801,30 @@ export declare const allTools: ({
10753
10801
  };
10754
10802
  };
10755
10803
  };
10804
+ readonly paidCreditRefreshAttempt: {
10805
+ readonly type: "object";
10806
+ readonly additionalProperties: false;
10807
+ readonly required: readonly ["attemptedAt", "outcome", "errorClass", "errorDetail", "durationMs"];
10808
+ readonly properties: {
10809
+ readonly attemptedAt: {
10810
+ readonly type: readonly ["string", "null"];
10811
+ };
10812
+ readonly outcome: {
10813
+ readonly type: "string";
10814
+ readonly enum: readonly ["skipped_fresh", "succeeded", "failed", "not_attempted"];
10815
+ };
10816
+ readonly errorClass: {
10817
+ readonly type: readonly ["string", "null"];
10818
+ };
10819
+ readonly errorDetail: {
10820
+ readonly type: readonly ["string", "null"];
10821
+ };
10822
+ readonly durationMs: {
10823
+ readonly type: readonly ["integer", "null"];
10824
+ readonly minimum: 0;
10825
+ };
10826
+ };
10827
+ };
10756
10828
  readonly senderId: {
10757
10829
  readonly type: "string";
10758
10830
  readonly minLength: 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/mcp",
3
- "version": "0.1.854",
3
+ "version": "0.1.856",
4
4
  "type": "module",
5
5
  "description": "Sellable MCP server for Claude Code, Codex, and Hermes campaign workflows",
6
6
  "main": "dist/index.js",
@@ -623,8 +623,16 @@ those terminal results, report **every** entry in `terminalEvidence.rows`, one
623
623
  per scoped sender/date/lane—not only the headline deferral or blocker. Include
624
624
  `targetSlots`, `takenSlots`, `remainingTargetGap`, `fillableSlotsNow`,
625
625
  `blockedGap`, `terminalClassification`, `reasonCodes`, `approvedDelta`, and
626
- `scheduledDelta`. A cumulative observation or one surfaced blocker is never a
627
- row-complete terminal summary.
626
+ `scheduledDelta`. When `reasonCodes` contains
627
+ `paid_inmail_credit_refresh_failed`, also report `paidCreditRefreshAttempt`
628
+ exactly: `attemptedAt`, `outcome`, `errorClass`, `errorDetail`, and `durationMs`.
629
+ A cumulative observation, vague "credit refresh" label, or one surfaced blocker
630
+ is never a row-complete terminal summary.
631
+
632
+ Lead every row-complete terminal summary by stating that all scoped
633
+ sender/date/lane rows were explored. Never say the workspace "stopped on" one
634
+ sender or headline blocker: that blocker classifies one row after independent
635
+ sibling work was explored; it is not the traversal stop.
628
636
 
629
637
  Resolve the workspace BEFORE the first call, exactly as the V1 route already
630
638
  requires. `workspaceId` must be an exact id on every automation call: when the
@@ -473,8 +473,16 @@ result, report **every** entry in `terminalEvidence.rows`, one per scoped
473
473
  sender/date/lane—not only the headline deferral or blocker. Include
474
474
  `targetSlots`, `takenSlots`, `remainingTargetGap`, `fillableSlotsNow`,
475
475
  `blockedGap`, `terminalClassification`, `reasonCodes`, `approvedDelta`, and
476
- `scheduledDelta`. A cumulative observation or one surfaced blocker is never a
477
- row-complete terminal summary.
476
+ `scheduledDelta`. When `reasonCodes` contains
477
+ `paid_inmail_credit_refresh_failed`, also report `paidCreditRefreshAttempt`
478
+ exactly: `attemptedAt`, `outcome`, `errorClass`, `errorDetail`, and `durationMs`.
479
+ A cumulative observation, vague "credit refresh" label, or one surfaced blocker
480
+ is never a row-complete terminal summary.
481
+
482
+ Lead every row-complete terminal summary by stating that all scoped
483
+ sender/date/lane rows were explored. Never say the workspace "stopped on" one
484
+ sender or headline blocker: that blocker classifies one row after independent
485
+ sibling work was explored; it is not the traversal stop.
478
486
 
479
487
  This workflow chooses nothing. It never reads capacity, supply, family, or reason
480
488
  fields to decide what to do next; never declares a terminal, an exhaustion
@@ -152,12 +152,7 @@
152
152
  "subskill": "refill-sends-work-campaign",
153
153
  "pass": ["packet.scope", "packet.evidence"],
154
154
  "returnThrough": "refill_v3_continue",
155
- "returnInput": [
156
- "workspaceId",
157
- "scope",
158
- "decision",
159
- "yolo"
160
- ]
155
+ "returnInput": ["workspaceId", "scope", "decision", "yolo"]
161
156
  },
162
157
  "settlement": {
163
158
  "ownedBy": "refill_v3_continue",
@@ -225,7 +220,8 @@
225
220
  "terminalEvidence.rows[].terminalClassification",
226
221
  "terminalEvidence.rows[].reasonCodes",
227
222
  "terminalEvidence.rows[].approvedDelta",
228
- "terminalEvidence.rows[].scheduledDelta"
223
+ "terminalEvidence.rows[].scheduledDelta",
224
+ "terminalEvidence.rows[].paidCreditRefreshAttempt"
229
225
  ],
230
226
  "campaignWorkInFlight": {
231
227
  "appliesToDeferralCode": "campaign_work_in_flight",
@@ -240,7 +236,7 @@
240
236
  "then": "call the advance tool again with the identical workspaceId, scope, and yolo grant",
241
237
  "note": "This is a bounded read-only wait inherited from Create Campaign. It holds the same campaign while its cells settle; it never authorizes selecting a sibling. A partial timeout returns to fresh advance, and the same deferral may authorize another bounded wait. NOTE on run identity: awaiting_external_change is a terminal, so the server already CLOSED the run and returned no runToken. The advance after this wait therefore omits runToken and opens a new run, which starts with zero progress-free campaign visits and zero retryable paid attempts."
242
238
  },
243
- "then": "for any other deferral code, stop and report the scoped wait plus every scoped sender/date/lane row from terminalEvidence.rows; never summarize only the headline deferral"
239
+ "then": "for any other deferral code, stop and report the scoped wait plus every scoped sender/date/lane row from terminalEvidence.rows; state that all scoped sender/date/lane rows were explored; never say the workspace \"stopped on\" the headline deferral"
244
240
  },
245
241
  "complete": {
246
242
  "alreadyExecuted": false,
@@ -258,9 +254,10 @@
258
254
  "terminalEvidence.rows[].terminalClassification",
259
255
  "terminalEvidence.rows[].reasonCodes",
260
256
  "terminalEvidence.rows[].approvedDelta",
261
- "terminalEvidence.rows[].scheduledDelta"
257
+ "terminalEvidence.rows[].scheduledDelta",
258
+ "terminalEvidence.rows[].paidCreditRefreshAttempt"
262
259
  ],
263
- "then": "stop and report the terminal code plus every scoped sender/date/lane row from terminalEvidence.rows"
260
+ "then": "stop and report the terminal code plus every scoped sender/date/lane row from terminalEvidence.rows; state that all scoped sender/date/lane rows were explored; never say the workspace \"stopped on\" the headline terminal"
264
261
  },
265
262
  "blocked": {
266
263
  "alreadyExecuted": false,
@@ -281,9 +278,10 @@
281
278
  "terminalEvidence.rows[].terminalClassification",
282
279
  "terminalEvidence.rows[].reasonCodes",
283
280
  "terminalEvidence.rows[].approvedDelta",
284
- "terminalEvidence.rows[].scheduledDelta"
281
+ "terminalEvidence.rows[].scheduledDelta",
282
+ "terminalEvidence.rows[].paidCreditRefreshAttempt"
285
283
  ],
286
- "then": "stop and report the typed business blocker plus every scoped sender/date/lane row from terminalEvidence.rows"
284
+ "then": "stop and report the typed business blocker plus every scoped sender/date/lane row from terminalEvidence.rows; state that all scoped sender/date/lane rows were explored; never say the workspace \"stopped on\" the headline blocker"
287
285
  }
288
286
  },
289
287
  "forbidden": [