@sellable/mcp 0.1.793 → 0.1.794

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.
Files changed (54) hide show
  1. package/dist/agent-tool-names.d.ts +2 -2
  2. package/dist/agent-tool-names.js +14 -0
  3. package/dist/scheduler-envelope.d.ts +190 -0
  4. package/dist/scheduler-envelope.js +412 -0
  5. package/dist/server.js +28 -2
  6. package/dist/tools/campaign-message-preparation.d.ts +25 -0
  7. package/dist/tools/campaign-message-preparation.js +37 -0
  8. package/dist/tools/campaign-processing.d.ts +74 -1
  9. package/dist/tools/campaign-processing.js +57 -1
  10. package/dist/tools/prompts.d.ts +15 -3
  11. package/dist/tools/prompts.js +25 -0
  12. package/dist/tools/refill-executors.d.ts +43 -70
  13. package/dist/tools/refill-executors.js +201 -273
  14. package/dist/tools/refill-sends.d.ts +3 -3
  15. package/dist/tools/refill-sends.js +1 -1
  16. package/dist/tools/refill-target-plan.js +1 -1
  17. package/dist/tools/refill-v3-advance-contract.d.ts +618 -0
  18. package/dist/tools/refill-v3-advance-contract.js +920 -0
  19. package/dist/tools/refill-v3-advance.d.ts +397 -0
  20. package/dist/tools/refill-v3-advance.js +75 -0
  21. package/dist/tools/refill-v3-attention-packet-contract.d.ts +608 -0
  22. package/dist/tools/refill-v3-attention-packet-contract.js +911 -0
  23. package/dist/tools/refill-v3-campaign-work.d.ts +324 -0
  24. package/dist/tools/refill-v3-campaign-work.js +1015 -0
  25. package/dist/tools/refill-v3-continue-contract.d.ts +433 -0
  26. package/dist/tools/refill-v3-continue-contract.js +112 -0
  27. package/dist/tools/refill-v3-continue.d.ts +501 -0
  28. package/dist/tools/refill-v3-continue.js +654 -0
  29. package/dist/tools/refill-v3-edit-selected-campaign-contract.d.ts +208 -0
  30. package/dist/tools/refill-v3-edit-selected-campaign-contract.js +351 -0
  31. package/dist/tools/refill-v3-edit-selected-campaign.d.ts +232 -0
  32. package/dist/tools/refill-v3-edit-selected-campaign.js +147 -0
  33. package/dist/tools/refill-v3-fill-ready-contract.d.ts +198 -0
  34. package/dist/tools/refill-v3-fill-ready-contract.js +324 -0
  35. package/dist/tools/refill-v3-fill-ready.d.ts +199 -0
  36. package/dist/tools/refill-v3-fill-ready.js +136 -0
  37. package/dist/tools/refill-v3-source-family-dispatch.d.ts +249 -0
  38. package/dist/tools/refill-v3-source-family-dispatch.js +514 -0
  39. package/dist/tools/refill-v3-waterfall-contract.d.ts +156 -0
  40. package/dist/tools/refill-v3-waterfall-contract.js +181 -0
  41. package/dist/tools/refill-v3-waterfall.d.ts +136 -0
  42. package/dist/tools/refill-v3-waterfall.js +161 -0
  43. package/dist/tools/refill-v3-world-state-contract.d.ts +666 -0
  44. package/dist/tools/refill-v3-world-state-contract.js +790 -0
  45. package/dist/tools/refill-v3-world-state.d.ts +592 -0
  46. package/dist/tools/refill-v3-world-state.js +137 -0
  47. package/dist/tools/registry.d.ts +1710 -3
  48. package/dist/tools/registry.js +19 -0
  49. package/package.json +1 -1
  50. package/skills/refill-sends/SKILL.md +89 -4
  51. package/skills/refill-sends-waterfall-order/SKILL.md +174 -0
  52. package/skills/refill-sends-work-campaign/SKILL.md +253 -0
  53. package/skills/refill-sends-workflow/SKILL.md +112 -5
  54. package/skills/refill-sends-workflow/core/flow.v3.json +209 -0
@@ -0,0 +1,608 @@
1
+ /**
2
+ * Refill V3 `campaign_attention_required` PACKAGE seam.
3
+ *
4
+ * This module is declared inside `@sellable/mcp` so the packet contract ships
5
+ * with the published package and both later waves import ONE declaration:
6
+ * the wave-7 AI seams validate their output against it, and the wave-8
7
+ * deterministic coordinator produces packets against it. Copying the packet
8
+ * shape, the action list, the exhaustion table, or the yield floor into either
9
+ * consumer is forbidden.
10
+ *
11
+ * It is also the phase's shared PACKAGE VOCABULARY owner. The campaign supply
12
+ * buckets, live-job vocabulary, lead-source families, schema-version gate, and
13
+ * the emitted-module registry are declared exactly once here and imported by
14
+ * the sibling world-state and waterfall contracts, because a vocabulary
15
+ * mirrored across two modules is a defect by construction (error law 2).
16
+ *
17
+ * Constraints:
18
+ * - zero imports: no app `src/**`, no validation library, no runtime dependency
19
+ * beyond what `@sellable/mcp` already publishes (assumption A02-NO-ZOD);
20
+ * - hand-rolled type guards plus as-const JSON-Schema literals;
21
+ * - strict-in, tolerant-out, lossless decoding; and
22
+ * - a compatible-RANGE schema version gate, never an exact-string pin.
23
+ */
24
+ export type RefillV3PackagedContractModule = {
25
+ source: string;
26
+ js: string;
27
+ types: string;
28
+ ownerPlan: string;
29
+ ownerTask: string;
30
+ };
31
+ /**
32
+ * Every package contract module pair this phase emits under `dist/tools/`.
33
+ * Earlier plans append their own module; Plan 10's single packed-asset
34
+ * assertion consumes this list instead of four escalating set-completeness
35
+ * assertions.
36
+ */
37
+ export declare const REFILL_V3_PACKAGED_CONTRACT_MODULES: readonly [{
38
+ readonly source: "mcp/sellable/src/tools/refill-v3-world-state-contract.ts";
39
+ readonly js: "dist/tools/refill-v3-world-state-contract.js";
40
+ readonly types: "dist/tools/refill-v3-world-state-contract.d.ts";
41
+ readonly ownerPlan: "146.5-02";
42
+ readonly ownerTask: "146.5-02-T1";
43
+ }, {
44
+ readonly source: "mcp/sellable/src/tools/refill-v3-attention-packet-contract.ts";
45
+ readonly js: "dist/tools/refill-v3-attention-packet-contract.js";
46
+ readonly types: "dist/tools/refill-v3-attention-packet-contract.d.ts";
47
+ readonly ownerPlan: "146.5-02";
48
+ readonly ownerTask: "146.5-02-T3";
49
+ }, {
50
+ readonly source: "mcp/sellable/src/tools/refill-v3-waterfall-contract.ts";
51
+ readonly js: "dist/tools/refill-v3-waterfall-contract.js";
52
+ readonly types: "dist/tools/refill-v3-waterfall-contract.d.ts";
53
+ readonly ownerPlan: "146.5-02";
54
+ readonly ownerTask: "146.5-02-T3";
55
+ }, {
56
+ readonly source: "mcp/sellable/src/tools/refill-v3-fill-ready-contract.ts";
57
+ readonly js: "dist/tools/refill-v3-fill-ready-contract.js";
58
+ readonly types: "dist/tools/refill-v3-fill-ready-contract.d.ts";
59
+ readonly ownerPlan: "146.5-07";
60
+ readonly ownerTask: "146.5-07-T3";
61
+ }, {
62
+ readonly source: "mcp/sellable/src/tools/refill-v3-world-state.ts";
63
+ readonly js: "dist/tools/refill-v3-world-state.js";
64
+ readonly types: "dist/tools/refill-v3-world-state.d.ts";
65
+ readonly ownerPlan: "146.5-08";
66
+ readonly ownerTask: "146.5-08-T1";
67
+ }, {
68
+ readonly source: "mcp/sellable/src/tools/refill-v3-fill-ready.ts";
69
+ readonly js: "dist/tools/refill-v3-fill-ready.js";
70
+ readonly types: "dist/tools/refill-v3-fill-ready.d.ts";
71
+ readonly ownerPlan: "146.5-08";
72
+ readonly ownerTask: "146.5-08-T2";
73
+ }, {
74
+ readonly source: "mcp/sellable/src/tools/refill-v3-edit-selected-campaign-contract.ts";
75
+ readonly js: "dist/tools/refill-v3-edit-selected-campaign-contract.js";
76
+ readonly types: "dist/tools/refill-v3-edit-selected-campaign-contract.d.ts";
77
+ readonly ownerPlan: "146.5-09";
78
+ readonly ownerTask: "146.5-09-T2";
79
+ }, {
80
+ /**
81
+ * Plan 09's WRAPPER. Its contract pair was already registered; the wrapper
82
+ * itself was missing, which left the four-tool package parity claim
83
+ * unsatisfiable. Plan 10 T2 appended it because it owns set completeness
84
+ * across every emitted Refill V3 module.
85
+ */
86
+ readonly source: "mcp/sellable/src/tools/refill-v3-edit-selected-campaign.ts";
87
+ readonly js: "dist/tools/refill-v3-edit-selected-campaign.js";
88
+ readonly types: "dist/tools/refill-v3-edit-selected-campaign.d.ts";
89
+ readonly ownerPlan: "146.5-09";
90
+ readonly ownerTask: "146.5-09-T2";
91
+ }, {
92
+ readonly source: "mcp/sellable/src/tools/refill-v3-advance-contract.ts";
93
+ readonly js: "dist/tools/refill-v3-advance-contract.js";
94
+ readonly types: "dist/tools/refill-v3-advance-contract.d.ts";
95
+ readonly ownerPlan: "146.5-10";
96
+ readonly ownerTask: "146.5-10-T1a";
97
+ }, {
98
+ readonly source: "mcp/sellable/src/tools/refill-v3-advance.ts";
99
+ readonly js: "dist/tools/refill-v3-advance.js";
100
+ readonly types: "dist/tools/refill-v3-advance.d.ts";
101
+ readonly ownerPlan: "146.5-10";
102
+ readonly ownerTask: "146.5-10-T1a";
103
+ }, {
104
+ readonly source: "mcp/sellable/src/tools/refill-v3-continue-contract.ts";
105
+ readonly js: "dist/tools/refill-v3-continue-contract.js";
106
+ readonly types: "dist/tools/refill-v3-continue-contract.d.ts";
107
+ readonly ownerPlan: "146.5-13";
108
+ readonly ownerTask: "146.5-13-T2";
109
+ }, {
110
+ readonly source: "mcp/sellable/src/tools/refill-v3-continue.ts";
111
+ readonly js: "dist/tools/refill-v3-continue.js";
112
+ readonly types: "dist/tools/refill-v3-continue.d.ts";
113
+ readonly ownerPlan: "146.5-13";
114
+ readonly ownerTask: "146.5-13-T2";
115
+ }];
116
+ /**
117
+ * The typed VALUE an unsupported MAJOR returns. It is deliberately not `null`
118
+ * and never a throw: the backend deploys before the package is installed, so an
119
+ * already-installed client that fails closed on one new field would take every
120
+ * installed customer down (112-EMH-06).
121
+ */
122
+ export declare const REFILL_V3_SCHEMA_VERSION_UNSUPPORTED: "schema_version_unsupported";
123
+ export type RefillV3SchemaVersionUnsupported = typeof REFILL_V3_SCHEMA_VERSION_UNSUPPORTED;
124
+ export type RefillV3SchemaVersionSupport = {
125
+ supported: true;
126
+ major: number;
127
+ minor: number;
128
+ } | {
129
+ supported: false;
130
+ reason: "malformed";
131
+ } | {
132
+ supported: false;
133
+ reason: RefillV3SchemaVersionUnsupported;
134
+ };
135
+ /**
136
+ * Compatible-RANGE gate. Any minor of the supported major decodes, including a
137
+ * newer one; a different major returns the typed unsupported value; anything
138
+ * that is not `<namespace>.v<major>.<minor>` is malformed transport.
139
+ */
140
+ export declare function resolveRefillV3SchemaVersion(value: unknown, namespace: string, supportedMajor: number): RefillV3SchemaVersionSupport;
141
+ export declare const REFILL_V3_LEAD_SOURCE_FAMILIES: readonly ["post_engager", "signal_discovery", "cold"];
142
+ export type RefillV3LeadSourceFamily = (typeof REFILL_V3_LEAD_SOURCE_FAMILIES)[number];
143
+ export declare const REFILL_V3_ACTIVE_JOB_KINDS: readonly ["enrichment", "message_generation", "source_expansion", "scheduling"];
144
+ export type RefillV3ActiveJobKind = (typeof REFILL_V3_ACTIVE_JOB_KINDS)[number];
145
+ export declare const REFILL_V3_ACTIVE_JOB_STATUSES: readonly ["queued", "running"];
146
+ export type RefillV3ActiveJobStatus = (typeof REFILL_V3_ACTIVE_JOB_STATUSES)[number];
147
+ export type RefillV3ActiveJob = {
148
+ id: string;
149
+ kind: RefillV3ActiveJobKind;
150
+ status: RefillV3ActiveJobStatus;
151
+ };
152
+ export declare const REFILL_V3_SUPPLY_BUCKETS: readonly ["readyToSchedule", "readyForApproval", "readyForMessageGeneration", "needsEnrichment"];
153
+ export type RefillV3SupplyBucket = (typeof REFILL_V3_SUPPLY_BUCKETS)[number];
154
+ export type RefillV3SupplyCounts = {
155
+ readyToSchedule: number;
156
+ readyForApproval: number;
157
+ readyForMessageGeneration: number;
158
+ needsEnrichment: number;
159
+ };
160
+ /** The at-most-10 bounded diagnostic sample. A REFERENCE, never row payload. */
161
+ export declare const REFILL_V3_DIAGNOSTIC_SAMPLE_CAP = 10;
162
+ /**
163
+ * The measured ACCEPTANCE FLOOR for a new source search: 8% of an evaluated
164
+ * sample must pass.
165
+ *
166
+ * This is NOT `SIGNAL_YIELD_DEFAULT_PASS_RATE` in `refill-executors.ts`, which
167
+ * is the no-evidence PROJECTION default used to size a request. Quality and
168
+ * volume stay separate on purpose: coupling a quality floor to gap-fill
169
+ * projection arithmetic is exactly what made the predecessor brittle.
170
+ */
171
+ export declare const REFILL_V3_MIN_SOURCE_YIELD = 0.08;
172
+ /** The acceptance sample is a fixed number of EVALUATED candidates. */
173
+ export declare const REFILL_V3_MIN_SOURCE_YIELD_SAMPLE = 20;
174
+ /** `post_engager` is excluded: it keeps posts-refresh preconditions, not a rate. */
175
+ export declare const REFILL_V3_YIELD_FLOOR_FAMILIES: readonly ["signal_discovery", "cold"];
176
+ export type RefillV3YieldFloorFamily = (typeof REFILL_V3_YIELD_FLOOR_FAMILIES)[number];
177
+ export type RefillV3SourceYieldEvidence = {
178
+ family: RefillV3LeadSourceFamily;
179
+ evaluated: number;
180
+ passes: number;
181
+ };
182
+ export type RefillV3SourceYieldVerdict = {
183
+ decision: "floor_not_applicable";
184
+ family: RefillV3LeadSourceFamily;
185
+ } | {
186
+ decision: "invalid_evidence";
187
+ detail: string;
188
+ } | {
189
+ decision: "sample_incomplete";
190
+ evaluated: number;
191
+ required: number;
192
+ } | {
193
+ decision: "meets_floor";
194
+ ratio: number;
195
+ floor: number;
196
+ } | {
197
+ decision: "below_floor";
198
+ ratio: number;
199
+ floor: number;
200
+ };
201
+ /**
202
+ * The DETERMINISTIC half of the yield floor. The AI judges WHICH sampled
203
+ * candidates pass; this owns sample-size enforcement, the arithmetic, the
204
+ * comparison, and the routing decision. There is deliberately no deterministic
205
+ * candidate judge here.
206
+ *
207
+ */
208
+ export declare function evaluateRefillV3SourceYield(evidence: RefillV3SourceYieldEvidence): RefillV3SourceYieldVerdict;
209
+ export declare const REFILL_V3_EXHAUSTION_CONJUNCTS: readonly ["existing_supply_drained", "no_live_active_job", "no_repairable_existing_rows", "no_undispatched_approved_work", "source_frontier_scan_terminated"];
210
+ export type RefillV3ExhaustionConjunct = (typeof REFILL_V3_EXHAUSTION_CONJUNCTS)[number];
211
+ export declare const REFILL_V3_SCAN_TERMINATIONS: readonly ["not_started", "in_progress", "frontier_scanned", "provider_unavailable"];
212
+ export type RefillV3ScanTermination = (typeof REFILL_V3_SCAN_TERMINATIONS)[number];
213
+ export type RefillV3ExhaustionInput = {
214
+ supply: RefillV3SupplyCounts;
215
+ activeJob: RefillV3ActiveJob | null;
216
+ repairableExistingRows: number;
217
+ approvedUndispatchedWork: number;
218
+ structurallyUnactionableRows: number;
219
+ retryExhaustedRows: number;
220
+ scanTermination: RefillV3ScanTermination;
221
+ searchedNegativeSet: {
222
+ fingerprints: readonly string[];
223
+ untriedBroadenings: number;
224
+ };
225
+ yieldEvidence: RefillV3SourceYieldEvidence | null;
226
+ };
227
+ export type RefillV3ExhaustionVerdict = {
228
+ exhausted: true;
229
+ } | {
230
+ exhausted: false;
231
+ falsifyingClause: RefillV3ExhaustionConjunct;
232
+ };
233
+ /**
234
+ * The ONE five-conjunct exhaustion predicate. Wave 7's AI falsification check
235
+ * and wave 8's coordinator both route through this symbol; declaring it in
236
+ * wave 8 would make a wave-7 behavior assert through an artifact that does not
237
+ * yet exist and would duplicate the same table twice.
238
+ *
239
+ * `structurallyUnactionableRows` and `retryExhaustedRows` are recorded evidence
240
+ * that SUPPORTS exhaustion; they can never falsify it, which is why they are
241
+ * inputs and not conjuncts.
242
+ */
243
+ export declare const REFILL_V3_EXHAUSTION_PREDICATE: {
244
+ readonly conjuncts: readonly ["existing_supply_drained", "no_live_active_job", "no_repairable_existing_rows", "no_undispatched_approved_work", "source_frontier_scan_terminated"];
245
+ readonly evaluate: (input: RefillV3ExhaustionInput) => RefillV3ExhaustionVerdict;
246
+ };
247
+ /** Future modules that must IMPORT the predicate rather than restate it. */
248
+ export declare const REFILL_V3_EXHAUSTION_PREDICATE_CONSUMERS: readonly ["mcp/sellable/src/tools/refill-v3-advance-contract.ts", "mcp/sellable/src/tools/refill-v3-edit-selected-campaign-contract.ts"];
249
+ /**
250
+ * The ONE closed AI action vocabulary. Wave 7 validates model output against
251
+ * this constant and GENERATES its prompt's allowed-action list from it; wave 8
252
+ * consumes it. Neither may declare a second list (error law 1).
253
+ */
254
+ export declare const REFILL_V3_CAMPAIGN_ATTENTION_ACTIONS: readonly ["rerun_errored_cells", "repair_campaign_config", "enrich_bounded_sample", "regenerate_stale_messages", "patch_filter_criteria", "patch_source_criteria", "broaden_source_family", "request_rubric_trial", "await_active_job", "record_source_frontier_exhausted"];
255
+ export type RefillV3CampaignAttentionAction = (typeof REFILL_V3_CAMPAIGN_ATTENTION_ACTIONS)[number];
256
+ /**
257
+ * Typed traversal RESULTS. `source_frontier_exhausted` and
258
+ * `health_recheck_required` live here and are never unreceipted AI actions:
259
+ * the AI records exhaustion through `record_source_frontier_exhausted`, and the
260
+ * deterministic authority answers with the result.
261
+ */
262
+ export declare const REFILL_V3_CAMPAIGN_ATTENTION_RESULTS: readonly ["cells_rerun", "campaign_config_repaired", "bounded_sample_enriched", "stale_messages_regenerated", "filter_criteria_patched", "source_criteria_patched", "source_family_broadened", "rubric_trial_requested", "active_job_awaited", "source_frontier_exhausted", "health_recheck_required", "no_action_available"];
263
+ export type RefillV3CampaignAttentionResult = (typeof REFILL_V3_CAMPAIGN_ATTENTION_RESULTS)[number];
264
+ /**
265
+ * Prompt assets that must GENERATE their allowed outputs from the constants
266
+ * above rather than hand-maintain a second list. Every named asset that exists
267
+ * is bound by the shared-vocabulary assertion; the assets themselves are
268
+ * authored by their owning wave-7 plan.
269
+ */
270
+ export declare const REFILL_V3_ATTENTION_ASSET_CONTRACT: readonly [{
271
+ readonly asset: "mcp/sellable/skills/refill-sends-work-campaign/SKILL.md";
272
+ readonly generatedFrom: "REFILL_V3_CAMPAIGN_ATTENTION_ACTIONS";
273
+ readonly ownerPlan: "146.5-09";
274
+ }, {
275
+ readonly asset: "mcp/sellable/skills/refill-sends-waterfall/SKILL.md";
276
+ readonly generatedFrom: "REFILL_V3_WATERFALL_PROPOSAL_SCHEMA";
277
+ readonly ownerPlan: "146.5-09";
278
+ }];
279
+ /**
280
+ * Prose that must never survive in a generated asset. Deterministic ladder
281
+ * step 3 owns the hand-off to `refill_v3_fill_ready`; an AI action token for it
282
+ * would put a deterministic transition inside the model's vocabulary.
283
+ */
284
+ export declare const REFILL_V3_ATTENTION_FORBIDDEN_ASSET_INSTRUCTIONS: readonly ["refill_v3_fill_ready", "approve_and_hand_off", "hand off to refill_v3_fill_ready"];
285
+ export declare const REFILL_V3_CAMPAIGN_ATTENTION_SCHEMA_NAMESPACE: "refill_v3_campaign_attention";
286
+ export declare const REFILL_V3_CAMPAIGN_ATTENTION_SCHEMA_MAJOR = 1;
287
+ export declare const REFILL_V3_CAMPAIGN_ATTENTION_SCHEMA_VERSION: "refill_v3_campaign_attention.v1.0";
288
+ export declare const REFILL_V3_CAMPAIGN_ATTENTION_LANE_ACTION_TYPES: Readonly<{
289
+ readonly connection_invite: "send_invite";
290
+ readonly paid_inmail: "send_inmail_closed";
291
+ }>;
292
+ export type RefillV3CampaignAttentionLane = keyof typeof REFILL_V3_CAMPAIGN_ATTENTION_LANE_ACTION_TYPES;
293
+ export type RefillV3CampaignAttentionActionType = (typeof REFILL_V3_CAMPAIGN_ATTENTION_LANE_ACTION_TYPES)[RefillV3CampaignAttentionLane];
294
+ export type RefillV3CampaignAttentionScope = {
295
+ workspaceId: string;
296
+ campaignId: string;
297
+ tableId: string;
298
+ campaignVersion: number;
299
+ evidenceFingerprint: string;
300
+ senderId: string;
301
+ date: string;
302
+ lane: RefillV3CampaignAttentionLane;
303
+ actionType: RefillV3CampaignAttentionActionType;
304
+ };
305
+ export type RefillV3CampaignAttentionEvidence = {
306
+ campaignType: string;
307
+ campaignObjective: string;
308
+ protectedFitDigest: string;
309
+ leadSourceFamily: RefillV3LeadSourceFamily;
310
+ provider: string | null;
311
+ /** Exact selected source table, when the campaign has one. */
312
+ selectedLeadListId?: string | null;
313
+ /**
314
+ * Ownership-proven reusable saved-search authority for cold providers.
315
+ * Loaded server-side through the existing target-plan resolver; callers and
316
+ * the model may neither invent nor loosen it.
317
+ */
318
+ providerSearchReference?: RefillV3ProviderSearchReference | null;
319
+ sourceLineage: string[];
320
+ priorYieldReceipt: RefillV3SourceYieldEvidence | null;
321
+ searchedNegativeSetFingerprints: string[];
322
+ remainingGap: number;
323
+ supply: RefillV3SupplyCounts;
324
+ activeJob: RefillV3ActiveJob | null;
325
+ failedJobRef: string | null;
326
+ diagnosticRowRef: {
327
+ count: number;
328
+ selectorRef: string;
329
+ } | null;
330
+ /**
331
+ * ADDITIVE evidence enrichment (146.5-12 §84 queue; coordinator ruling:
332
+ * additive only). The error-nature split reuses THIS contract's own
333
+ * exhaustion-input vocabulary (`repairableExistingRows` = transient
334
+ * error|timeout rows, `retryExhaustedRows` = retry-terminal ones), and
335
+ * `laneSchedulable` transports the census's lane-scoped schedulable fact for
336
+ * the packet's own lane (null when the observation predates the fact).
337
+ * Absent on packets from older backends — never fabricated zeros. The
338
+ * campaign's recency/effectiveness evidence deliberately STAYS on the
339
+ * world-state surface (its owner); the packet references the campaign the
340
+ * session already observed.
341
+ */
342
+ repairableExistingRows?: number;
343
+ retryExhaustedRows?: number;
344
+ laneSchedulable?: number | null;
345
+ };
346
+ export type RefillV3ProviderSearchReference = {
347
+ workspaceId: string;
348
+ provider: "sales-nav" | "prospeo";
349
+ sourceTableId: string;
350
+ searchId: string;
351
+ resolutionOrigin: "config_import_job" | "exact_table_job" | "find_leads_run";
352
+ owner: {
353
+ kind: "campaign" | "find_leads_run";
354
+ id: string;
355
+ };
356
+ basisFingerprint: string;
357
+ };
358
+ export type RefillV3CampaignAttentionPacket = {
359
+ scope: RefillV3CampaignAttentionScope;
360
+ evidence: RefillV3CampaignAttentionEvidence;
361
+ };
362
+ /**
363
+ * Identity, payload, policy, and bookkeeping classes the packet must never
364
+ * carry. A raw row/cell/provider payload would move the table into the model;
365
+ * a rank/selection field would move backend authority into the model; a retry
366
+ * counter or cursor would recreate the durable state machine this phase deletes.
367
+ */
368
+ export declare const REFILL_V3_ATTENTION_FORBIDDEN_KEYS: readonly ["rows", "cells", "rowIds", "cellIds", "rowPayload", "cellPayload", "providerResponse", "providerPayload", "rank", "ranking", "graph", "selectedCampaign", "waterfall", "retryCount", "attempts", "cursor", "continuation", "prompt", "instructions", "systemPrompt"];
369
+ export declare const REFILL_V3_CAMPAIGN_ATTENTION_PACKET_SCHEMA: Readonly<{
370
+ readonly type: "object";
371
+ readonly additionalProperties: false;
372
+ readonly required: readonly ["scope", "evidence"];
373
+ readonly properties: {
374
+ readonly scope: {
375
+ readonly type: "object";
376
+ readonly additionalProperties: false;
377
+ readonly required: readonly ["workspaceId", "campaignId", "tableId", "campaignVersion", "evidenceFingerprint", "senderId", "date", "lane", "actionType"];
378
+ readonly properties: {
379
+ readonly workspaceId: {
380
+ readonly type: "string";
381
+ readonly minLength: 1;
382
+ };
383
+ readonly campaignId: {
384
+ readonly type: "string";
385
+ readonly minLength: 1;
386
+ };
387
+ readonly tableId: {
388
+ readonly type: "string";
389
+ readonly minLength: 1;
390
+ };
391
+ readonly campaignVersion: {
392
+ readonly type: "integer";
393
+ readonly minimum: 0;
394
+ };
395
+ readonly evidenceFingerprint: {
396
+ readonly type: "string";
397
+ readonly minLength: 1;
398
+ };
399
+ readonly senderId: {
400
+ readonly type: "string";
401
+ readonly minLength: 1;
402
+ };
403
+ readonly date: {
404
+ readonly type: "string";
405
+ readonly pattern: "^\\d{4}-\\d{2}-\\d{2}$";
406
+ };
407
+ readonly lane: {
408
+ readonly type: "string";
409
+ readonly enum: string[];
410
+ };
411
+ readonly actionType: {
412
+ readonly type: "string";
413
+ readonly enum: ("send_invite" | "send_inmail_closed")[];
414
+ };
415
+ };
416
+ };
417
+ readonly evidence: {
418
+ readonly type: "object";
419
+ readonly additionalProperties: false;
420
+ readonly required: readonly ["campaignType", "campaignObjective", "protectedFitDigest", "leadSourceFamily", "provider", "sourceLineage", "priorYieldReceipt", "searchedNegativeSetFingerprints", "remainingGap", "supply", "activeJob", "failedJobRef", "diagnosticRowRef"];
421
+ readonly properties: {
422
+ readonly campaignType: {
423
+ readonly type: "string";
424
+ };
425
+ readonly campaignObjective: {
426
+ readonly type: "string";
427
+ };
428
+ readonly protectedFitDigest: {
429
+ readonly type: "string";
430
+ };
431
+ readonly leadSourceFamily: {
432
+ readonly type: "string";
433
+ readonly enum: readonly ["post_engager", "signal_discovery", "cold"];
434
+ };
435
+ readonly provider: {
436
+ readonly type: readonly ["string", "null"];
437
+ };
438
+ readonly selectedLeadListId: {
439
+ readonly type: readonly ["string", "null"];
440
+ };
441
+ readonly providerSearchReference: {
442
+ readonly type: readonly ["object", "null"];
443
+ readonly additionalProperties: false;
444
+ readonly required: readonly ["workspaceId", "provider", "sourceTableId", "searchId", "resolutionOrigin", "owner", "basisFingerprint"];
445
+ readonly properties: {
446
+ readonly workspaceId: {
447
+ readonly type: "string";
448
+ };
449
+ readonly provider: {
450
+ readonly type: "string";
451
+ readonly enum: readonly ["sales-nav", "prospeo"];
452
+ };
453
+ readonly sourceTableId: {
454
+ readonly type: "string";
455
+ };
456
+ readonly searchId: {
457
+ readonly type: "string";
458
+ };
459
+ readonly resolutionOrigin: {
460
+ readonly type: "string";
461
+ readonly enum: readonly ["config_import_job", "exact_table_job", "find_leads_run"];
462
+ };
463
+ readonly owner: {
464
+ readonly type: "object";
465
+ readonly additionalProperties: false;
466
+ readonly required: readonly ["kind", "id"];
467
+ readonly properties: {
468
+ readonly kind: {
469
+ readonly type: "string";
470
+ readonly enum: readonly ["campaign", "find_leads_run"];
471
+ };
472
+ readonly id: {
473
+ readonly type: "string";
474
+ };
475
+ };
476
+ };
477
+ readonly basisFingerprint: {
478
+ readonly type: "string";
479
+ };
480
+ };
481
+ };
482
+ readonly sourceLineage: {
483
+ readonly type: "array";
484
+ readonly items: {
485
+ readonly type: "string";
486
+ };
487
+ };
488
+ readonly priorYieldReceipt: {
489
+ readonly type: readonly ["object", "null"];
490
+ readonly additionalProperties: false;
491
+ readonly required: readonly ["family", "evaluated", "passes"];
492
+ readonly properties: {
493
+ readonly family: {
494
+ readonly type: "string";
495
+ readonly enum: readonly ["post_engager", "signal_discovery", "cold"];
496
+ };
497
+ readonly evaluated: {
498
+ readonly type: "integer";
499
+ readonly minimum: 0;
500
+ };
501
+ readonly passes: {
502
+ readonly type: "integer";
503
+ readonly minimum: 0;
504
+ };
505
+ };
506
+ };
507
+ readonly searchedNegativeSetFingerprints: {
508
+ readonly type: "array";
509
+ readonly items: {
510
+ readonly type: "string";
511
+ };
512
+ };
513
+ readonly remainingGap: {
514
+ readonly type: "integer";
515
+ readonly minimum: 0;
516
+ };
517
+ readonly supply: {
518
+ readonly type: "object";
519
+ readonly additionalProperties: false;
520
+ readonly required: readonly ["readyToSchedule", "readyForApproval", "readyForMessageGeneration", "needsEnrichment"];
521
+ readonly properties: {
522
+ readonly readyToSchedule: {
523
+ readonly type: "integer";
524
+ readonly minimum: 0;
525
+ };
526
+ readonly readyForApproval: {
527
+ readonly type: "integer";
528
+ readonly minimum: 0;
529
+ };
530
+ readonly readyForMessageGeneration: {
531
+ readonly type: "integer";
532
+ readonly minimum: 0;
533
+ };
534
+ readonly needsEnrichment: {
535
+ readonly type: "integer";
536
+ readonly minimum: 0;
537
+ };
538
+ };
539
+ };
540
+ readonly activeJob: {
541
+ readonly type: readonly ["object", "null"];
542
+ readonly additionalProperties: false;
543
+ readonly required: readonly ["id", "kind", "status"];
544
+ readonly properties: {
545
+ readonly id: {
546
+ readonly type: "string";
547
+ readonly minLength: 1;
548
+ };
549
+ readonly kind: {
550
+ readonly type: "string";
551
+ readonly enum: readonly ["enrichment", "message_generation", "source_expansion", "scheduling"];
552
+ };
553
+ readonly status: {
554
+ readonly type: "string";
555
+ readonly enum: readonly ["queued", "running"];
556
+ };
557
+ };
558
+ };
559
+ readonly failedJobRef: {
560
+ readonly type: readonly ["string", "null"];
561
+ };
562
+ readonly diagnosticRowRef: {
563
+ readonly type: readonly ["object", "null"];
564
+ readonly additionalProperties: false;
565
+ readonly required: readonly ["count", "selectorRef"];
566
+ readonly properties: {
567
+ readonly count: {
568
+ readonly type: "integer";
569
+ readonly minimum: 0;
570
+ readonly maximum: 10;
571
+ };
572
+ readonly selectorRef: {
573
+ readonly type: "string";
574
+ readonly minLength: 1;
575
+ };
576
+ };
577
+ };
578
+ readonly repairableExistingRows: {
579
+ readonly type: "integer";
580
+ readonly minimum: 0;
581
+ };
582
+ readonly retryExhaustedRows: {
583
+ readonly type: "integer";
584
+ readonly minimum: 0;
585
+ };
586
+ readonly laneSchedulable: {
587
+ readonly type: readonly ["integer", "null"];
588
+ readonly minimum: 0;
589
+ };
590
+ };
591
+ };
592
+ };
593
+ }>;
594
+ /**
595
+ * Sole unknown-value decoder for the packet.
596
+ *
597
+ * Strict-in, tolerant-out, lossless. `null` means "not this contract"; the
598
+ * typed unsupported VALUE means "a major this build cannot speak", which is a
599
+ * different fact and must never be collapsed into `null` or business zero.
600
+ */
601
+ export declare function decodeRefillV3CampaignAttentionPacket(value: unknown): RefillV3CampaignAttentionPacket | RefillV3SchemaVersionUnsupported | null;
602
+ /**
603
+ * Wire form of a decoded packet. `schemaVersion` is TRANSPORT, not business, so
604
+ * it is gated and stripped on decode and re-attached here. Every locked field
605
+ * is projected explicitly, because a silently dropped property is exactly the
606
+ * defect that turns a round trip into a confident wrong success.
607
+ */
608
+ export declare function encodeRefillV3CampaignAttentionPacket(packet: RefillV3CampaignAttentionPacket): Record<string, unknown>;