@sellable/install 0.1.319 → 0.1.320
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.
package/bin/sellable-install.mjs
CHANGED
|
@@ -2099,9 +2099,9 @@ Desktop, then start a new thread.
|
|
|
2099
2099
|
|
|
2100
2100
|
1. Call \`mcp__sellable__get_auth_status({})\`.
|
|
2101
2101
|
2. Resolve the target workspace id from the user request, automation config, or install-time workspace mapping. Pass \`workspaceId\` on every scheduled or \`--yolo\` refill tool call. Missing \`workspaceId\` in scheduled or \`--yolo\` mode is a blocker; return \`WORKSPACE_REQUIRED\` instead of running against shared config state. Do not solve automation workspace uncertainty by changing the shared active workspace.
|
|
2102
|
-
3. Normalize invocation arguments with \`mcp__sellable__refill_sends({ yolo, executionMode, requireWorkspace, workspaceId, senders, senderIds, senderNames, targetDate, untilDate })\` when the host exposes typed MCP tools. Type shape: \`refill_sends({ yolo?: boolean, executionMode?: "manual" | "scheduled" | "yolo", requireWorkspace?: boolean, workspaceId?: string, senders?: string[], senderIds?: string[], senderNames?: string[], horizonSendDays?: number, untilDate?: "YYYY-MM-DD", targetDate?: "YYYY-MM-DD" })\`.
|
|
2102
|
+
3. Normalize invocation arguments with \`mcp__sellable__refill_sends({ yolo, executionMode, requireWorkspace, workspaceId, senders, senderIds, senderNames, actionTypes, targetDate, untilDate })\` when the host exposes typed MCP tools. Type shape: \`refill_sends({ yolo?: boolean, executionMode?: "manual" | "scheduled" | "yolo", requireWorkspace?: boolean, workspaceId?: string, senders?: string[], senderIds?: string[], senderNames?: string[], actionTypes?: ("send_invite" | "send_inmail_closed")[], horizonSendDays?: number, untilDate?: "YYYY-MM-DD", targetDate?: "YYYY-MM-DD" })\`.
|
|
2103
2103
|
4. Clover scheduled automation example: \`mcp__sellable__refill_sends({ yolo:false, executionMode:"scheduled", requireWorkspace:true, workspaceId:"cmlq1v8ms0000jx04ang4hi7e" })\`, then \`mcp__sellable__get_refill_target_plan({ intent:"plain", approvalMode:"mark_ready", workspaceId:"cmlq1v8ms0000jx04ang4hi7e" })\`.
|
|
2104
|
-
5. Call \`mcp__sellable__get_refill_target_plan({ workspaceId, senders, senderIds, senderNames, targetDate, untilDate })\` before any mutation. Render \`target.eligibleSenderLedger\`, \`target.senderRefillPlans[]\`, and \`target.globalActionQueue\` as the structured packet. Preserve the labels \`Need to prepare\`, \`Goal\`, \`Already sent\`, \`Scheduled\`, \`Ready and waiting to be scheduled\`, and \`Still need\`. In \`--yolo\`, \`mcp__sellable__refill_sends\` maintains a run-local \`refreshedPaidInmailSenderIds\` set, refreshes stale/missing paid InMail facts for each selected paid-InMail sender at most once, reruns \`get_refill_target_plan\`, and returns \`autoPaidInmailRefresh\` plus the post-refresh \`targetPlan\` before choosing the next prep/source-copy/bounded-approval/read-only wait action. Refill ladder: approve generated rows only through the explicit bounded approval gate, process existing same-campaign unenriched/unprepared rows before source work, then same-source copy, then provider-aligned source-more. New source/provider switches change reply-rate baseline and are manual alternates, not \`--yolo\` side effects. Do not present paid-credit refresh as the next operator action after \`refill_sends\` returns that post-refresh plan. For exact-date proof, \`mcp__sellable__get_scheduler_fill_capacity\` is read-only and tells how many cells the scheduler will try to place for a sender/action/date. When
|
|
2104
|
+
5. Call \`mcp__sellable__get_refill_target_plan({ workspaceId, senders, senderIds, senderNames, actionTypes, targetDate, untilDate })\` before any mutation. Render \`target.eligibleSenderLedger\`, \`target.senderRefillPlans[]\`, and \`target.globalActionQueue\` as the structured packet. Preserve the labels \`Need to prepare\`, \`Goal\`, \`Already sent\`, \`Scheduled\`, \`Ready and waiting to be scheduled\`, and \`Still need\`. In \`--yolo\`, \`mcp__sellable__refill_sends\` maintains a run-local \`refreshedPaidInmailSenderIds\` set, refreshes stale/missing paid InMail facts for each selected paid-InMail sender at most once, reruns \`get_refill_target_plan\`, and returns \`autoPaidInmailRefresh\` plus the post-refresh \`targetPlan\` before choosing the next prep/source-copy/bounded-approval/read-only wait or exact-date sweep action. Refill ladder: approve generated rows only through the explicit bounded approval gate, process existing same-campaign unenriched/unprepared rows before source work, then same-source copy, then provider-aligned source-more. New source/provider switches change reply-rate baseline and are manual alternates, not \`--yolo\` side effects. Do not present paid-credit refresh as the next operator action after \`refill_sends\` returns that post-refresh plan. For exact-date proof, \`mcp__sellable__get_scheduler_fill_capacity\` is read-only and tells how many cells the scheduler will try to place for a sender/action/date. When the planner returns a request-scoped exact-date scheduler sweep, execute \`mcp__sellable__run_scheduler_sweep({ workspaceId, action:"run", targetDate, requestKey, targetShapeRevision })\` once, capture its receipt, and fully reread before another action. It may schedule eligible workspace cells through existing gates, but it never sends directly or bypasses limits. If the returned target is already complete, stop with the no-op receipt. Only non-exact or no-sweep waits use the read-only scheduler wait/re-read loop until projected coverage fills, a concrete non-scheduler blocker appears, or Christian explicitly stops/statuses the run.
|
|
2105
2105
|
6. Load the canonical prompt and deterministic flow asset via
|
|
2106
2106
|
\`mcp__sellable__get_subskill_prompt({ subskillName: "refill-sends" })\`,
|
|
2107
2107
|
then load \`mcp__sellable__get_subskill_prompt({ subskillName: "refill-sends-workflow" })\`,
|
|
@@ -2112,8 +2112,7 @@ Desktop, then start a new thread.
|
|
|
2112
2112
|
facts are present, refresh exact selected sender facts once, rerun
|
|
2113
2113
|
\`get_refill_target_plan\`, and only then enter \`wait_for_scheduler\` if
|
|
2114
2114
|
freshness is clean.
|
|
2115
|
-
7. Follow the canonical prompt exactly. Do not
|
|
2116
|
-
or write scheduler rows as part of refill sends.
|
|
2115
|
+
7. Follow the canonical prompt exactly. Do not directly send, bypass scheduler gates, or raw-write scheduler fields. Only the exact rendered paused-campaign start and request-scoped scheduler sweep may use their existing product-gated paths; do not launch, archive, or delete unrelated work.
|
|
2117
2116
|
|
|
2118
2117
|
## MCP Prompt Fallback
|
|
2119
2118
|
|
package/package.json
CHANGED
|
@@ -83,6 +83,8 @@ Accepted invocation flags in the same user request:
|
|
|
83
83
|
- `senderIds: <id>, <id>` or `senderNames: <name>, <name>`: explicit selector
|
|
84
84
|
alternatives when the host preserves natural-language arguments better than
|
|
85
85
|
shell-style flags.
|
|
86
|
+
- `actionTypes: send_invite, send_inmail_closed`: optional lane selector. Omit
|
|
87
|
+
`actionTypes` to preserve the target planner's lane inference.
|
|
86
88
|
- `untilDate: YYYY-MM-DD`: explicit date selector alternative when the host
|
|
87
89
|
preserves natural-language arguments better than shell-style flags.
|
|
88
90
|
- `targetDate: YYYY-MM-DD`: exact-date selector alternative when the host
|
|
@@ -91,7 +93,7 @@ Accepted invocation flags in the same user request:
|
|
|
91
93
|
When the host can call typed MCP tools, start with:
|
|
92
94
|
|
|
93
95
|
```text
|
|
94
|
-
refill_sends({ yolo?: boolean, executionMode?: "manual" | "scheduled" | "yolo", requireWorkspace?: boolean, workspaceId?: string, senders?: string[], senderIds?: string[], senderNames?: string[], horizonSendDays?: number, untilDate?: "YYYY-MM-DD", targetDate?: "YYYY-MM-DD" })
|
|
96
|
+
refill_sends({ yolo?: boolean, executionMode?: "manual" | "scheduled" | "yolo", requireWorkspace?: boolean, workspaceId?: string, senders?: string[], senderIds?: string[], senderNames?: string[], actionTypes?: ("send_invite" | "send_inmail_closed")[], horizonSendDays?: number, untilDate?: "YYYY-MM-DD", targetDate?: "YYYY-MM-DD" })
|
|
95
97
|
```
|
|
96
98
|
|
|
97
99
|
That command helper normalizes arguments and returns the execution contract. In
|
|
@@ -99,14 +101,22 @@ non-yolo mode it does not mutate. In `--yolo`, it may execute exactly one safe
|
|
|
99
101
|
bounded primitive from the fresh `target.globalActionQueue[0]`, then reread and
|
|
100
102
|
return the new target plan; currently safe primitives are paid-credit refresh,
|
|
101
103
|
existing-row message preparation, generated-message approval, receipt-proven
|
|
102
|
-
same-source row copy,
|
|
104
|
+
same-source row copy, a request-scoped exact-date product scheduler sweep, and
|
|
105
|
+
read-only wait rereads. Same-source copy/source
|
|
103
106
|
fallback is safe only after receipt-proven exhaustion:
|
|
104
107
|
`hasMoreFrontierRows:false`, zero `approvalCandidates`, no `stuckActiveCells`,
|
|
105
|
-
and no non-terminal `approvedNotDispatched` work. It does not run unbounded
|
|
106
|
-
paid-InMail thresholds, switch source families, create
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
approval.
|
|
108
|
+
and no non-terminal `approvedNotDispatched` work. It does not run unbounded
|
|
109
|
+
approval, lower paid-InMail thresholds, switch source families, create
|
|
110
|
+
campaigns, launch, or send directly; it never raw-writes scheduler fields.
|
|
111
|
+
Continue with the workflow below for route selection, state rereads, approval
|
|
112
|
+
gating, source import, preparation, and bounded approval.
|
|
113
|
+
|
|
114
|
+
The approval scope is the exact `workspaceId`, `targetDate`, sender ids, action
|
|
115
|
+
types, campaign/table/source ids, `targetShapeRevision`, and `actionKey` in the
|
|
116
|
+
rendered packet. `stateRevision` and sent/scheduled/ready counts are mutable
|
|
117
|
+
progress, not approval-scope drift. Execute only
|
|
118
|
+
`target.globalActionQueue[0]`, then perform a full authoritative reread before
|
|
119
|
+
deciding any next action.
|
|
110
120
|
|
|
111
121
|
## Workspace Contract
|
|
112
122
|
|
|
@@ -284,6 +294,19 @@ When the refill loop has ready rows and needs scheduler pickup now, use
|
|
|
284
294
|
`run_scheduler_sweep` with the same explicit `workspaceId`; it can place cells
|
|
285
295
|
within existing scheduler gates and returns the receipt, but it never sends or
|
|
286
296
|
bypasses limits.
|
|
297
|
+
A scheduler sweep is a visible workspace-wide scheduling side effect. The
|
|
298
|
+
request packet limits the expected target changes to its exact date, senders,
|
|
299
|
+
action types, campaigns, tables, and stable sources, but the product scheduler
|
|
300
|
+
may also place unrelated eligible workspace work; disclose that possibility in
|
|
301
|
+
the approval packet and receipt. For an exact-date sweep action, execute it
|
|
302
|
+
once, then reread the full target plan before taking or presenting another
|
|
303
|
+
action.
|
|
304
|
+
The exact-date `run_scheduler_sweep` may schedule eligible workspace cells
|
|
305
|
+
through existing product gates; it never sends directly or raw-writes scheduler
|
|
306
|
+
fields. Only non-exact or no-sweep scheduler waits are read-only.
|
|
307
|
+
On resume, reconcile the current target plan and matching sweep status/receipt
|
|
308
|
+
before retrying. A matching same-key terminal receipt replays; an
|
|
309
|
+
`uncertain_outcome` stops for reconciliation and must not schedule again.
|
|
287
310
|
Scheduler-run receipt interpretation: `cellsConsidered is allocation-attempt
|
|
288
311
|
count`, not total ready supply, while `readyCellsFound` is ready inventory found
|
|
289
312
|
before prefilters. Inspect `campaignScopeSummary` before assuming the selected
|
|
@@ -396,6 +419,14 @@ scheduler wait loop. Do not finish the refill goal, mark it complete, or mark it
|
|
|
396
419
|
blocked only because it is still `awaiting_scheduler_after_ready_buffer`; keep
|
|
397
420
|
waiting unless Christian stops the run or the host cannot continue.
|
|
398
421
|
|
|
422
|
+
Future scheduled coverage and already sent actions are distinct; only
|
|
423
|
+
scheduler-owned future scheduled actions count as scheduled coverage. For
|
|
424
|
+
multiple target dates, finish D1 execution and the full D1 reread before
|
|
425
|
+
planning D2. Completion proof is product-native Sellable MCP evidence only:
|
|
426
|
+
target plan, campaign refill state, scheduler capacity, sweep/status, and
|
|
427
|
+
bounded receipts. Never use individual cell ids, Prisma, SQL, direct database
|
|
428
|
+
access, or production-environment scripts as completion proof.
|
|
429
|
+
|
|
399
430
|
In `--yolo`, the default fill target is the scheduler-forward 48-hour window
|
|
400
431
|
unless `--target-date`/`targetDate`, `--until`/`untilDate`, or an explicit
|
|
401
432
|
compatibility `horizonSendDays` is provided. If a target date is provided,
|