@sellable/mcp 0.1.556 → 0.1.558

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.
@@ -29,6 +29,11 @@ export declare function heartbeatRefillRun(input: {
29
29
  runId: string;
30
30
  fence: number;
31
31
  }): Promise<unknown>;
32
+ export declare function yieldRefillRun(input: {
33
+ workspaceId?: string;
34
+ runId: string;
35
+ fence: number;
36
+ }): Promise<unknown>;
32
37
  export declare function advanceRefillRunGateRemote(input: {
33
38
  workspaceId?: string;
34
39
  runId: string;
@@ -70,6 +70,13 @@ export function heartbeatRefillRun(input) {
70
70
  fence: input.fence,
71
71
  });
72
72
  }
73
+ export function yieldRefillRun(input) {
74
+ return postRefillRuns(input.workspaceId, {
75
+ action: "yield",
76
+ runId: input.runId,
77
+ fence: input.fence,
78
+ });
79
+ }
73
80
  export function advanceRefillRunGateRemote(input) {
74
81
  return postRefillRuns(input.workspaceId, {
75
82
  action: "advance-gate",
@@ -1,5 +1,5 @@
1
1
  import type { appendIndexLine, appendJournalEvent, createRunJournal, renderBootstrapSection, renderCrashedAbandonedSection, renderExecutionEventSection, renderPlanSection, renderTerminalSection } from "./refill-journal.js";
2
- import type { advanceRefillRunGateRemote, completeRefillRun, heartbeatRefillRun, recordRunOutcome, recordRunPlanned, refillRunStatus, startRefillRunRemote } from "./refill-run-client.js";
2
+ import type { advanceRefillRunGateRemote, completeRefillRun, heartbeatRefillRun, recordRunOutcome, recordRunPlanned, refillRunStatus, startRefillRunRemote, yieldRefillRun } from "./refill-run-client.js";
3
3
  import type { getPrepareCampaignMessagesStatus, stopSatisfiedPrepareCampaignMessages } from "./tools/campaign-message-preparation.js";
4
4
  import type { executeOneYoloPrimitive, executeStartCampaignPrimitive, prepareRowSelectorValue, refillPrepareRequestHash, refreshPaidInmailCreditsWithRetry } from "./tools/refill-executors.js";
5
5
  export type RefillLoopGate = "g0_bootstrap" | "g1_plan" | "g2_execute" | "g3_verify" | "g4_terminal";
@@ -32,6 +32,7 @@ export interface RefillV2RunClient {
32
32
  startRefillRunRemote: typeof startRefillRunRemote;
33
33
  refillRunStatus: typeof refillRunStatus;
34
34
  heartbeatRefillRun: typeof heartbeatRefillRun;
35
+ yieldRefillRun: typeof yieldRefillRun;
35
36
  advanceRefillRunGateRemote: typeof advanceRefillRunGateRemote;
36
37
  recordRunPlanned: typeof recordRunPlanned;
37
38
  recordRunOutcome: typeof recordRunOutcome;
@@ -1618,12 +1618,12 @@ function classifyCaughtError(error, ctx) {
1618
1618
  };
1619
1619
  }
1620
1620
  async function heartbeatAndContinue(input, deps, ctx) {
1621
- const heartbeat = await deps.runClient.heartbeatRefillRun({
1621
+ const yielded = await deps.runClient.yieldRefillRun({
1622
1622
  workspaceId: input.workspaceId,
1623
1623
  runId: ctx.runId,
1624
1624
  fence: ctx.fence,
1625
1625
  });
1626
- if (isLeaseLost(heartbeat))
1626
+ if (isLeaseLost(yielded))
1627
1627
  return leaseLostResult(ctx);
1628
1628
  return {
1629
1629
  status: "in_progress",
@@ -2,7 +2,7 @@ import { createHash } from "node:crypto";
2
2
  import { REFILL_CONTRACT_CACHE_VERSION, REFILL_CONTRACT_HASH, REFILL_CONTRACT_VERSION, renderRefillSafetyGuidance, } from "../refill-contract.js";
3
3
  import { appendIndexLine, appendJournalEvent, createRunJournal, renderBootstrapSection, renderCrashedAbandonedSection, renderExecutionEventSection, renderPlanSection, renderTerminalSection, } from "../refill-journal.js";
4
4
  import { writeRefillWorkspaceState } from "../refill-local-state.js";
5
- import { advanceRefillRunGateRemote, completeRefillRun, heartbeatRefillRun, recordRunOutcome, recordRunPlanned, refillRunStatus, startRefillRunRemote, } from "../refill-run-client.js";
5
+ import { advanceRefillRunGateRemote, completeRefillRun, heartbeatRefillRun, recordRunOutcome, recordRunPlanned, refillRunStatus, startRefillRunRemote, yieldRefillRun, } from "../refill-run-client.js";
6
6
  import { runRefillV2Loop } from "../refill-run-loop.js";
7
7
  import { getPrepareCampaignMessagesStatus, stopSatisfiedPrepareCampaignMessages, } from "./campaign-message-preparation.js";
8
8
  import { getRefillPlanV2 } from "./evergreen-refill-plan.js";
@@ -424,6 +424,7 @@ export async function refillSendsV2Command(input) {
424
424
  startRefillRunRemote,
425
425
  refillRunStatus,
426
426
  heartbeatRefillRun,
427
+ yieldRefillRun,
427
428
  advanceRefillRunGateRemote,
428
429
  recordRunPlanned,
429
430
  recordRunOutcome,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/mcp",
3
- "version": "0.1.556",
3
+ "version": "0.1.558",
4
4
  "type": "module",
5
5
  "description": "Sellable MCP server for Claude Code, Codex, and Hermes campaign workflows",
6
6
  "main": "dist/index.js",