@sellable/mcp 0.1.747 → 0.1.748
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.
|
@@ -688,6 +688,7 @@ type WorkspaceCoordinatorWaitAction = {
|
|
|
688
688
|
senderId: string | null;
|
|
689
689
|
reason: string | null;
|
|
690
690
|
};
|
|
691
|
+
declare function clearCompleteDefersForCampaign(runState: Record<string, unknown> | undefined, campaignId: string | null, preserveActionKey?: string | null): Record<string, unknown> | undefined;
|
|
691
692
|
export declare function approvedPacketComparison(input: RefillSendsCommandInput, targetPlan: unknown): {
|
|
692
693
|
changed: boolean;
|
|
693
694
|
expectedTargetShapeRevision: string | null;
|
|
@@ -728,6 +729,10 @@ type RefillSenderSelectorMiss = {
|
|
|
728
729
|
displayName: string;
|
|
729
730
|
}>;
|
|
730
731
|
};
|
|
732
|
+
export declare const refillSendsDeferInternals: {
|
|
733
|
+
clearCompleteDefersForCampaign: typeof clearCompleteDefersForCampaign;
|
|
734
|
+
SUPPLY_INVALIDATED_DEFER_BLOCKERS: Set<string>;
|
|
735
|
+
};
|
|
731
736
|
export declare function executeRefillSendsCommand(input?: RefillSendsCommandInput): Promise<import("./workspace-context.js").WorkspaceRequiredResult | {
|
|
732
737
|
ok: boolean;
|
|
733
738
|
code: string;
|
|
@@ -918,7 +918,32 @@ const WORKSPACE_SUPPLY_ACTION_FAMILIES = new Set([
|
|
|
918
918
|
"broaden_provider_search",
|
|
919
919
|
"refresh_sender_post_engagers",
|
|
920
920
|
]);
|
|
921
|
-
|
|
921
|
+
// fix(112ar): the blocker vocabulary the ledger WRITES and the one this cleaner
|
|
922
|
+
// MATCHED had drifted apart. `workspaceExactDeferredBlocker` records
|
|
923
|
+
// "exact_action_complete" (see deferWorkspaceExactTarget), but the filter only
|
|
924
|
+
// recognised "complete"/"capped_by_scheduler" -- so the clear never fired for
|
|
925
|
+
// the blocker that actually gets written, and a satisfied-before-supply defer
|
|
926
|
+
// became a STANDING claim for the rest of the session.
|
|
927
|
+
//
|
|
928
|
+
// Amplify 7-30: three exposed edges (run_scheduler_sweep, approve_messages,
|
|
929
|
+
// prepare_messages) were all held at "exact_action_complete" while the same
|
|
930
|
+
// payload reported 18 ready and 12 rows still to prepare. Every edge that could
|
|
931
|
+
// have filled the day was suppressed, and the run terminaled
|
|
932
|
+
// `actionable_supply_not_queued` -- an owner-invariant breach produced by a
|
|
933
|
+
// stale proof, not by absent supply.
|
|
934
|
+
//
|
|
935
|
+
// Same shape as 112c: a bounded ATTEMPT must not harden into a standing claim.
|
|
936
|
+
const SUPPLY_INVALIDATED_DEFER_BLOCKERS = new Set([
|
|
937
|
+
"complete",
|
|
938
|
+
"capped_by_scheduler",
|
|
939
|
+
"exact_action_complete",
|
|
940
|
+
]);
|
|
941
|
+
function clearCompleteDefersForCampaign(runState, campaignId,
|
|
942
|
+
// fix(112ar): the action that JUST landed keeps its own defer. Clearing it
|
|
943
|
+
// would re-expose the edge we just completed and invite a duplicate copy /
|
|
944
|
+
// approve. Only the OTHER campaign edges held on a now-stale completeness
|
|
945
|
+
// proof are released.
|
|
946
|
+
preserveActionKey) {
|
|
922
947
|
if (!runState || !campaignId)
|
|
923
948
|
return runState;
|
|
924
949
|
const entries = Array.isArray(runState.coordinatorBlockedExactTargets)
|
|
@@ -929,7 +954,11 @@ function clearCompleteDefersForCampaign(runState, campaignId) {
|
|
|
929
954
|
const kept = entries.filter((entry) => {
|
|
930
955
|
const blocked = recordValue(entry);
|
|
931
956
|
const blocker = stringValue(blocked?.blocker);
|
|
932
|
-
if (blocker
|
|
957
|
+
if (!SUPPLY_INVALIDATED_DEFER_BLOCKERS.has(blocker ?? "")) {
|
|
958
|
+
return true;
|
|
959
|
+
}
|
|
960
|
+
if (preserveActionKey &&
|
|
961
|
+
stringValue(blocked?.actionKey) === preserveActionKey) {
|
|
933
962
|
return true;
|
|
934
963
|
}
|
|
935
964
|
return stringValue(blocked?.campaignId) !== campaignId;
|
|
@@ -3018,6 +3047,16 @@ async function resolveRefillSenderSelectors(params) {
|
|
|
3018
3047
|
resolvedSelectors,
|
|
3019
3048
|
};
|
|
3020
3049
|
}
|
|
3050
|
+
// fix(112ar): exported for a DIRECT pin. Binding this rule through the full
|
|
3051
|
+
// command harness proved impossible without silently voiding the test --
|
|
3052
|
+
// deferWorkspaceExactTarget replaces same-identity entries, and
|
|
3053
|
+
// clearApprovalAttemptsForCampaign removes approve-family keys, so a seeded
|
|
3054
|
+
// defer disappears for reasons that have nothing to do with this fix. A unit
|
|
3055
|
+
// pin binds the writer/cleaner vocabulary contract directly.
|
|
3056
|
+
export const refillSendsDeferInternals = {
|
|
3057
|
+
clearCompleteDefersForCampaign,
|
|
3058
|
+
SUPPLY_INVALIDATED_DEFER_BLOCKERS,
|
|
3059
|
+
};
|
|
3021
3060
|
export async function executeRefillSendsCommand(input = {}) {
|
|
3022
3061
|
const normalizedInput = normalizeRefillSendsInput(input);
|
|
3023
3062
|
const yolo = normalizedInput.yolo === true;
|
|
@@ -3871,10 +3910,10 @@ export async function executeRefillSendsCommand(input = {}) {
|
|
|
3871
3910
|
WORKSPACE_SUPPLY_ACTION_FAMILIES.has(supplyActionFamily)));
|
|
3872
3911
|
const coordinatorWorkspaceRunState = prepFamilyLandedOnCampaign
|
|
3873
3912
|
? clearApprovalAttemptsForCampaign(supplyLandedOnCampaign
|
|
3874
|
-
? clearCompleteDefersForCampaign(deferredCoordinatorWorkspaceRunState, selectedCoordinatorTarget?.campaignId ?? null)
|
|
3913
|
+
? clearCompleteDefersForCampaign(deferredCoordinatorWorkspaceRunState, selectedCoordinatorTarget?.campaignId ?? null, selectedCoordinatorTarget?.actionKey ?? null)
|
|
3875
3914
|
: deferredCoordinatorWorkspaceRunState, selectedCoordinatorTarget?.campaignId ?? null)
|
|
3876
3915
|
: supplyLandedOnCampaign
|
|
3877
|
-
? clearCompleteDefersForCampaign(deferredCoordinatorWorkspaceRunState, selectedCoordinatorTarget?.campaignId ?? null)
|
|
3916
|
+
? clearCompleteDefersForCampaign(deferredCoordinatorWorkspaceRunState, selectedCoordinatorTarget?.campaignId ?? null, selectedCoordinatorTarget?.actionKey ?? null)
|
|
3878
3917
|
: deferredCoordinatorWorkspaceRunState;
|
|
3879
3918
|
// fix(112aj): continuation-level progress-or-settle. When this dispatch is an
|
|
3880
3919
|
// active_exact_run resume (continuationHandle set, in_progress), fingerprint
|