@sellable/mcp 0.1.899 → 0.1.901

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.
@@ -146,7 +146,7 @@ export declare const REFILL_V3_ADVANCE_INPUT_SCHEMA: Readonly<{
146
146
  readonly yolo: {
147
147
  readonly type: "boolean";
148
148
  readonly default: true;
149
- readonly description: "The YOLO AUTONOMY GRANT. It defaults to true so an ordinary run continues through bounded preparation and one eligible PAUSED derived-evergreen start instead of stopping for another approval. It is not a mode and selects nothing: WHICH campaign may start is derived from the workspace's own campaigns. Pass false only for an explicit conservative, review-first run.";
149
+ readonly description: "The YOLO AUTONOMY GRANT. It defaults to true so an ordinary run continues through bounded preparation and one route-selected start-eligible PAUSED campaign instead of stopping for another approval. It is not a mode and selects nothing: WHICH campaign may start is derived from the workspace's canonical waterfall. A finite non-evergreen candidate must already expose positive bounded supply. Pass false only for an explicit conservative, review-first run.";
150
150
  };
151
151
  };
152
152
  }>;
@@ -157,13 +157,14 @@ export type RefillV3AdvanceResultKind = (typeof REFILL_V3_ADVANCE_RESULT_KINDS)[
157
157
  * existing authority that owns it; the coordinator never invents an authority
158
158
  * and never carries executable prose.
159
159
  */
160
- export declare const REFILL_V3_ADVANCE_ACTION_KINDS: readonly ["refresh_paid_credit_fact", "recheck_sender_connection", "fill_ready", "start_evergreen_campaign"];
160
+ export declare const REFILL_V3_ADVANCE_ACTION_KINDS: readonly ["refresh_paid_credit_fact", "recheck_sender_connection", "fill_ready", "start_paused_campaign", "start_evergreen_campaign"];
161
161
  export type RefillV3AdvanceActionKind = (typeof REFILL_V3_ADVANCE_ACTION_KINDS)[number];
162
162
  /** The exact existing owner each action key dispatches to. */
163
163
  export declare const REFILL_V3_ADVANCE_ACTION_AUTHORITIES: Readonly<{
164
164
  readonly refresh_paid_credit_fact: "getOrRefreshPaidInmailCreditFact";
165
165
  readonly recheck_sender_connection: "recheckRefillV3SenderConnection";
166
166
  readonly fill_ready: "fillRefillV3Ready";
167
+ readonly start_paused_campaign: "startRefillV3PausedCampaign";
167
168
  readonly start_evergreen_campaign: "startRefillV3EvergreenCampaign";
168
169
  }>;
169
170
  export type RefillV3AdvanceAuthority = (typeof REFILL_V3_ADVANCE_ACTION_AUTHORITIES)[RefillV3AdvanceActionKind];
@@ -464,7 +465,7 @@ export declare const REFILL_V3_ADVANCE_OUTPUT_SCHEMA: Readonly<{
464
465
  };
465
466
  readonly kind: {
466
467
  readonly type: "string";
467
- readonly enum: readonly ["refresh_paid_credit_fact", "recheck_sender_connection", "fill_ready", "start_evergreen_campaign"];
468
+ readonly enum: readonly ["refresh_paid_credit_fact", "recheck_sender_connection", "fill_ready", "start_paused_campaign", "start_evergreen_campaign"];
468
469
  };
469
470
  readonly actionKey: {
470
471
  readonly type: "string";
@@ -472,7 +473,7 @@ export declare const REFILL_V3_ADVANCE_OUTPUT_SCHEMA: Readonly<{
472
473
  };
473
474
  readonly authority: {
474
475
  readonly type: "string";
475
- readonly enum: ("getOrRefreshPaidInmailCreditFact" | "recheckRefillV3SenderConnection" | "fillRefillV3Ready" | "startRefillV3EvergreenCampaign")[];
476
+ readonly enum: ("getOrRefreshPaidInmailCreditFact" | "recheckRefillV3SenderConnection" | "fillRefillV3Ready" | "startRefillV3PausedCampaign" | "startRefillV3EvergreenCampaign")[];
476
477
  };
477
478
  };
478
479
  };
@@ -170,7 +170,7 @@ export const REFILL_V3_ADVANCE_INPUT_SCHEMA = Object.freeze({
170
170
  yolo: {
171
171
  type: "boolean",
172
172
  default: true,
173
- description: "The YOLO AUTONOMY GRANT. It defaults to true so an ordinary run continues through bounded preparation and one eligible PAUSED derived-evergreen start instead of stopping for another approval. It is not a mode and selects nothing: WHICH campaign may start is derived from the workspace's own campaigns. Pass false only for an explicit conservative, review-first run.",
173
+ description: "The YOLO AUTONOMY GRANT. It defaults to true so an ordinary run continues through bounded preparation and one route-selected start-eligible PAUSED campaign instead of stopping for another approval. It is not a mode and selects nothing: WHICH campaign may start is derived from the workspace's canonical waterfall. A finite non-evergreen candidate must already expose positive bounded supply. Pass false only for an explicit conservative, review-first run.",
174
174
  },
175
175
  },
176
176
  });
@@ -194,6 +194,9 @@ export const REFILL_V3_ADVANCE_ACTION_KINDS = [
194
194
  "refresh_paid_credit_fact",
195
195
  "recheck_sender_connection",
196
196
  "fill_ready",
197
+ "start_paused_campaign",
198
+ // Backward-compatible receipt/output vocabulary for runs created before
199
+ // the generic V1 paused-campaign authority was restored.
197
200
  "start_evergreen_campaign",
198
201
  ];
199
202
  /** The exact existing owner each action key dispatches to. */
@@ -201,6 +204,7 @@ export const REFILL_V3_ADVANCE_ACTION_AUTHORITIES = Object.freeze({
201
204
  refresh_paid_credit_fact: "getOrRefreshPaidInmailCreditFact",
202
205
  recheck_sender_connection: "recheckRefillV3SenderConnection",
203
206
  fill_ready: "fillRefillV3Ready",
207
+ start_paused_campaign: "startRefillV3PausedCampaign",
204
208
  start_evergreen_campaign: "startRefillV3EvergreenCampaign",
205
209
  });
206
210
  /**
@@ -111,7 +111,7 @@ export declare const refillV3AdvanceToolDefinitions: {
111
111
  readonly yolo: {
112
112
  readonly type: "boolean";
113
113
  readonly default: true;
114
- readonly description: "The YOLO AUTONOMY GRANT. It defaults to true so an ordinary run continues through bounded preparation and one eligible PAUSED derived-evergreen start instead of stopping for another approval. It is not a mode and selects nothing: WHICH campaign may start is derived from the workspace's own campaigns. Pass false only for an explicit conservative, review-first run.";
114
+ readonly description: "The YOLO AUTONOMY GRANT. It defaults to true so an ordinary run continues through bounded preparation and one route-selected start-eligible PAUSED campaign instead of stopping for another approval. It is not a mode and selects nothing: WHICH campaign may start is derived from the workspace's canonical waterfall. A finite non-evergreen candidate must already expose positive bounded supply. Pass false only for an explicit conservative, review-first run.";
115
115
  };
116
116
  };
117
117
  }>;
@@ -183,7 +183,7 @@ export declare const refillV3AdvanceToolDefinitions: {
183
183
  };
184
184
  readonly kind: {
185
185
  readonly type: "string";
186
- readonly enum: readonly ["refresh_paid_credit_fact", "recheck_sender_connection", "fill_ready", "start_evergreen_campaign"];
186
+ readonly enum: readonly ["refresh_paid_credit_fact", "recheck_sender_connection", "fill_ready", "start_paused_campaign", "start_evergreen_campaign"];
187
187
  };
188
188
  readonly actionKey: {
189
189
  readonly type: "string";
@@ -191,7 +191,7 @@ export declare const refillV3AdvanceToolDefinitions: {
191
191
  };
192
192
  readonly authority: {
193
193
  readonly type: "string";
194
- readonly enum: ("getOrRefreshPaidInmailCreditFact" | "recheckRefillV3SenderConnection" | "fillRefillV3Ready" | "startRefillV3EvergreenCampaign")[];
194
+ readonly enum: ("getOrRefreshPaidInmailCreditFact" | "recheckRefillV3SenderConnection" | "fillRefillV3Ready" | "startRefillV3PausedCampaign" | "startRefillV3EvergreenCampaign")[];
195
195
  };
196
196
  };
197
197
  };
@@ -78,7 +78,7 @@ export declare const REFILL_V3_CONTINUE_INPUT_SCHEMA: Readonly<{
78
78
  readonly yolo: {
79
79
  readonly type: "boolean";
80
80
  readonly default: true;
81
- readonly description: "The YOLO AUTONOMY GRANT. It defaults to true so an ordinary run continues through bounded preparation and one eligible PAUSED derived-evergreen start instead of stopping for another approval. It is not a mode and selects nothing: WHICH campaign may start is derived from the workspace's own campaigns. Pass false only for an explicit conservative, review-first run.";
81
+ readonly description: "The YOLO AUTONOMY GRANT. It defaults to true so an ordinary run continues through bounded preparation and one route-selected start-eligible PAUSED campaign instead of stopping for another approval. It is not a mode and selects nothing: WHICH campaign may start is derived from the workspace's canonical waterfall. A finite non-evergreen candidate must already expose positive bounded supply. Pass false only for an explicit conservative, review-first run.";
82
82
  };
83
83
  readonly decision: {
84
84
  readonly type: "object";
@@ -92,7 +92,7 @@ export declare const refillV3ContinueToolDefinitions: {
92
92
  readonly yolo: {
93
93
  readonly type: "boolean";
94
94
  readonly default: true;
95
- readonly description: "The YOLO AUTONOMY GRANT. It defaults to true so an ordinary run continues through bounded preparation and one eligible PAUSED derived-evergreen start instead of stopping for another approval. It is not a mode and selects nothing: WHICH campaign may start is derived from the workspace's own campaigns. Pass false only for an explicit conservative, review-first run.";
95
+ readonly description: "The YOLO AUTONOMY GRANT. It defaults to true so an ordinary run continues through bounded preparation and one route-selected start-eligible PAUSED campaign instead of stopping for another approval. It is not a mode and selects nothing: WHICH campaign may start is derived from the workspace's canonical waterfall. A finite non-evergreen candidate must already expose positive bounded supply. Pass false only for an explicit conservative, review-first run.";
96
96
  };
97
97
  readonly decision: {
98
98
  readonly type: "object";
@@ -1155,6 +1155,26 @@ function generatedMessageCountFrom(value) {
1155
1155
  ? count
1156
1156
  : null;
1157
1157
  }
1158
+ function campaignSettlementIsReady(value) {
1159
+ return (value !== null &&
1160
+ typeof value === "object" &&
1161
+ !Array.isArray(value) &&
1162
+ value.ready === true);
1163
+ }
1164
+ function continuationResultFromAdvance(advanceResult) {
1165
+ if (advanceResult.kind === "advanced") {
1166
+ return { kind: "world_advanced", advanceResult };
1167
+ }
1168
+ if (advanceResult.kind === "run_step_pending") {
1169
+ return { kind: "world_step_pending", advanceResult };
1170
+ }
1171
+ if (advanceResult.kind === "awaiting_external_change" ||
1172
+ advanceResult.kind === "complete" ||
1173
+ advanceResult.kind === "blocked") {
1174
+ return { kind: "world_terminal", advanceResult };
1175
+ }
1176
+ return { kind: "attention_refresh_required", advanceResult };
1177
+ }
1158
1178
  /**
1159
1179
  * The common refill funnel is mechanical. Keep it out of the model loop.
1160
1180
  *
@@ -1454,6 +1474,31 @@ async function executeRefillV3Continuation(input, dependencies) {
1454
1474
  };
1455
1475
  }
1456
1476
  }
1477
+ // RF-HANDOFF-001: a targeted YOLO continuation owns the exact
1478
+ // sender/date/lane/campaign until its settled work is handed back to the
1479
+ // coordinator. Returning at this boundary exposed newly approved,
1480
+ // unassigned rows to the campaign-wide scheduler before the next outer tool
1481
+ // call could run `fill_ready`; another sender could claim the cohort in that
1482
+ // gap. Consume the refreshed run credential here so the next fresh
1483
+ // observation either assigns+schedules the exact lane immediately or
1484
+ // returns its next truthful coordinator state. A guarded/timeout settlement
1485
+ // is deliberately not advanced because its preparation still owns work.
1486
+ if (input.yolo === true &&
1487
+ input.campaignId !== undefined &&
1488
+ (preparationOwnsSettlement || directlyQueuedRowsOwnSettlement) &&
1489
+ campaignSettlementIsReady(settlement)) {
1490
+ const postSettlementAdvance = await reconnectPostAdvanceStage({
1491
+ sleep: dependencies.sleep,
1492
+ operation: () => dependencies.advance({
1493
+ workspaceId,
1494
+ campaignId: input.campaignId,
1495
+ scope: input.scope,
1496
+ yolo: true,
1497
+ runToken,
1498
+ }),
1499
+ });
1500
+ return continuationResultFromAdvance(postSettlementAdvance);
1501
+ }
1457
1502
  return {
1458
1503
  kind: "campaign_work_completed",
1459
1504
  runToken,
@@ -10558,7 +10558,7 @@ export declare const allTools: ({
10558
10558
  readonly yolo: {
10559
10559
  readonly type: "boolean";
10560
10560
  readonly default: true;
10561
- readonly description: "The YOLO AUTONOMY GRANT. It defaults to true so an ordinary run continues through bounded preparation and one eligible PAUSED derived-evergreen start instead of stopping for another approval. It is not a mode and selects nothing: WHICH campaign may start is derived from the workspace's own campaigns. Pass false only for an explicit conservative, review-first run.";
10561
+ readonly description: "The YOLO AUTONOMY GRANT. It defaults to true so an ordinary run continues through bounded preparation and one route-selected start-eligible PAUSED campaign instead of stopping for another approval. It is not a mode and selects nothing: WHICH campaign may start is derived from the workspace's canonical waterfall. A finite non-evergreen candidate must already expose positive bounded supply. Pass false only for an explicit conservative, review-first run.";
10562
10562
  };
10563
10563
  };
10564
10564
  }>;
@@ -10630,7 +10630,7 @@ export declare const allTools: ({
10630
10630
  };
10631
10631
  readonly kind: {
10632
10632
  readonly type: "string";
10633
- readonly enum: readonly ["refresh_paid_credit_fact", "recheck_sender_connection", "fill_ready", "start_evergreen_campaign"];
10633
+ readonly enum: readonly ["refresh_paid_credit_fact", "recheck_sender_connection", "fill_ready", "start_paused_campaign", "start_evergreen_campaign"];
10634
10634
  };
10635
10635
  readonly actionKey: {
10636
10636
  readonly type: "string";
@@ -10638,7 +10638,7 @@ export declare const allTools: ({
10638
10638
  };
10639
10639
  readonly authority: {
10640
10640
  readonly type: "string";
10641
- readonly enum: ("getOrRefreshPaidInmailCreditFact" | "recheckRefillV3SenderConnection" | "fillRefillV3Ready" | "startRefillV3EvergreenCampaign")[];
10641
+ readonly enum: ("getOrRefreshPaidInmailCreditFact" | "recheckRefillV3SenderConnection" | "fillRefillV3Ready" | "startRefillV3PausedCampaign" | "startRefillV3EvergreenCampaign")[];
10642
10642
  };
10643
10643
  };
10644
10644
  };
@@ -11992,7 +11992,7 @@ export declare const allTools: ({
11992
11992
  readonly yolo: {
11993
11993
  readonly type: "boolean";
11994
11994
  readonly default: true;
11995
- readonly description: "The YOLO AUTONOMY GRANT. It defaults to true so an ordinary run continues through bounded preparation and one eligible PAUSED derived-evergreen start instead of stopping for another approval. It is not a mode and selects nothing: WHICH campaign may start is derived from the workspace's own campaigns. Pass false only for an explicit conservative, review-first run.";
11995
+ readonly description: "The YOLO AUTONOMY GRANT. It defaults to true so an ordinary run continues through bounded preparation and one route-selected start-eligible PAUSED campaign instead of stopping for another approval. It is not a mode and selects nothing: WHICH campaign may start is derived from the workspace's canonical waterfall. A finite non-evergreen candidate must already expose positive bounded supply. Pass false only for an explicit conservative, review-first run.";
11996
11996
  };
11997
11997
  readonly decision: {
11998
11998
  readonly type: "object";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/mcp",
3
- "version": "0.1.899",
3
+ "version": "0.1.901",
4
4
  "type": "module",
5
5
  "description": "Sellable MCP server for Claude Code, Codex, and Hermes campaign workflows",
6
6
  "main": "dist/index.js",
@@ -712,9 +712,11 @@ bounded preparation and fallback steps instead of stopping for another
712
712
  approval. It decides two things together:
713
713
 
714
714
  - **Granted** (`yolo: true` on every call of that run): after a row's active
715
- campaigns are exhausted, one derived-evergreen start-eligible campaign may be
716
- started, and you receive it as an ordinary executed `start_evergreen_campaign`
717
- action. Keep calling advance until a terminal without checking back.
715
+ campaigns are exhausted, one route-selected start-eligible PAUSED campaign
716
+ may be started, and you receive it as an ordinary executed
717
+ `start_paused_campaign` action. A finite non-evergreen candidate must expose
718
+ positive bounded supply. Keep calling advance until a terminal without
719
+ checking back.
718
720
  - **Withheld** (explicit `yolo:false` only): no paused campaign is started — the backend
719
721
  refuses it and answers the exhaustion terminal instead — and you surface each
720
722
  result and ASK before calling advance again.
@@ -393,7 +393,7 @@ you may keep going unattended:
393
393
 
394
394
  | | `yolo: true` (default) | explicit `yolo: false` |
395
395
  | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
396
- | paused derived-evergreen start | one may be started once a row's active campaigns are exhausted, arriving as an ordinary executed `start_evergreen_campaign` action | none: the backend REFUSES the start and answers the exhaustion terminal instead |
396
+ | route-selected start-eligible PAUSED campaign | one may be started once a row's active campaigns are exhausted, arriving as an ordinary executed `start_paused_campaign` action; finite non-evergreen candidates require positive bounded supply | none: the backend REFUSES the start and answers the exhaustion terminal instead |
397
397
  | loop | call `refill_v3_advance` again immediately, through to a terminal, without checking back | surface the result and ASK before the next call |
398
398
 
399
399
  Never replace the default from a workspace flag, a campaign field, a tool
@@ -108,7 +108,7 @@
108
108
  "note": "yolo is the refill AUTONOMY GRANT. It is not a mode and selects no campaign. WHICH campaign may start stays derived from the workspace's own campaigns; the input only says whether this run may start one at all."
109
109
  },
110
110
  "grants": {
111
- "execution": "One already-eligible PAUSED derived-evergreen campaign may be started once a row's active campaigns are exhausted. It arrives as an ordinary executed start_evergreen_campaign action.",
111
+ "execution": "One route-selected start-eligible PAUSED campaign may be started once a row's active campaigns are exhausted. A finite non-evergreen candidate must already expose positive bounded supply; an evergreen may start empty for refresh. It arrives as an ordinary executed start_paused_campaign action.",
112
112
  "loop": "Keep calling advance through re-observation until a terminal, without checking back with the operator between calls."
113
113
  },
114
114
  "withheld": {