@sellable/mcp 0.1.864 → 0.1.865
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/dist/tools/refill-v3-advance-contract.d.ts +22 -11
- package/dist/tools/refill-v3-advance-contract.js +33 -2
- package/dist/tools/refill-v3-advance.d.ts +18 -7
- package/dist/tools/refill-v3-advance.js +6 -0
- package/dist/tools/refill-v3-continue-contract.d.ts +6 -0
- package/dist/tools/refill-v3-continue-contract.js +1 -0
- package/dist/tools/refill-v3-continue.d.ts +15 -0
- package/dist/tools/refill-v3-continue.js +46 -0
- package/dist/tools/refill-v3-run-token-transport.d.ts +2 -0
- package/dist/tools/refill-v3-run-token-transport.js +25 -2
- package/dist/tools/refill-v3-world-state.d.ts +6 -0
- package/dist/tools/refill-v3-world-state.js +8 -1
- package/dist/tools/registry.d.ts +28 -7
- package/package.json +1 -1
- package/skills/refill-sends/SKILL.md +15 -0
- package/skills/refill-sends-workflow/SKILL.md +16 -3
- package/skills/refill-sends-workflow/core/flow.v3.json +34 -5
|
@@ -51,14 +51,14 @@ export declare function resolveRefillV3AdvanceSchemaVersion(value: unknown): Ref
|
|
|
51
51
|
* The MCP transport retains exact backend-issued bytes for the current command;
|
|
52
52
|
* callers neither author nor copy credentials.
|
|
53
53
|
*/
|
|
54
|
-
export declare const REFILL_V3_ADVANCE_INPUT_KEYS: readonly ["workspaceId", "scope", "yolo"];
|
|
54
|
+
export declare const REFILL_V3_ADVANCE_INPUT_KEYS: readonly ["workspaceId", "scope", "campaignId", "yolo"];
|
|
55
55
|
export type RefillV3AdvanceInputKey = (typeof REFILL_V3_ADVANCE_INPUT_KEYS)[number];
|
|
56
56
|
/**
|
|
57
57
|
* The private MCP-to-backend request adds exactly one credential. The public
|
|
58
58
|
* tool schema below intentionally stays on `REFILL_V3_ADVANCE_INPUT_KEYS`, so
|
|
59
59
|
* a model cannot supply this field even though the backend must decode it.
|
|
60
60
|
*/
|
|
61
|
-
export declare const REFILL_V3_ADVANCE_TRANSPORT_INPUT_KEYS: readonly ["workspaceId", "scope", "yolo", "runToken"];
|
|
61
|
+
export declare const REFILL_V3_ADVANCE_TRANSPORT_INPUT_KEYS: readonly ["workspaceId", "scope", "campaignId", "yolo", "runToken"];
|
|
62
62
|
/** The keys a caller MUST supply. `yolo` is optional and defaults to false. */
|
|
63
63
|
export declare const REFILL_V3_ADVANCE_REQUIRED_INPUT_KEYS: readonly ["workspaceId", "scope"];
|
|
64
64
|
/**
|
|
@@ -77,6 +77,12 @@ export declare const REFILL_V3_ADVANCE_INPUT_SCHEMA: Readonly<{
|
|
|
77
77
|
readonly minLength: 1;
|
|
78
78
|
readonly description: "Explicit request-scoped workspace id. Pass this instead of switching the shared active workspace.";
|
|
79
79
|
};
|
|
80
|
+
readonly campaignId: {
|
|
81
|
+
readonly type: "string";
|
|
82
|
+
readonly minLength: 1;
|
|
83
|
+
readonly pattern: "\\S";
|
|
84
|
+
readonly description: "Optional stable campaign id for exact-campaign execution. Display names are never execution identity.";
|
|
85
|
+
};
|
|
80
86
|
readonly scope: {
|
|
81
87
|
readonly description: "Either a 1-3 day sender-local horizon or an exact sender/date set. There is no lane input, no row input, and no mode input.";
|
|
82
88
|
readonly oneOf: readonly [{
|
|
@@ -175,9 +181,9 @@ export type RefillV3AdvanceTerminalCode = (typeof REFILL_V3_ADVANCE_TERMINAL_COD
|
|
|
175
181
|
* which already extends the world-state vocabulary, so retryability stays a
|
|
176
182
|
* property of the code rather than of a call site.
|
|
177
183
|
*/
|
|
178
|
-
export declare const REFILL_V3_ADVANCE_ONLY_REASON_CODES: readonly ["account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
184
|
+
export declare const REFILL_V3_ADVANCE_ONLY_REASON_CODES: readonly ["account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "campaign_target_missing", "campaign_target_stale", "campaign_target_inactive", "campaign_target_unauthorized", "campaign_target_sender_incompatible", "target_lane_incompatible", "campaign_target_action_incompatible", "campaign_target_exhausted", "campaign_target_identity_mismatch", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
179
185
|
export type RefillV3AdvanceOnlyReasonCode = (typeof REFILL_V3_ADVANCE_ONLY_REASON_CODES)[number];
|
|
180
|
-
export declare const REFILL_V3_ADVANCE_REASON_CODES: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
186
|
+
export declare const REFILL_V3_ADVANCE_REASON_CODES: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "campaign_target_missing", "campaign_target_stale", "campaign_target_inactive", "campaign_target_unauthorized", "campaign_target_sender_incompatible", "target_lane_incompatible", "campaign_target_action_incompatible", "campaign_target_exhausted", "campaign_target_identity_mismatch", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
181
187
|
export type RefillV3AdvanceReasonCode = (typeof REFILL_V3_ADVANCE_REASON_CODES)[number];
|
|
182
188
|
export declare const REFILL_V3_ADVANCE_RECEIPT_STATUSES: readonly ["executed", "attached", "failed", "indeterminate"];
|
|
183
189
|
export type RefillV3AdvanceReceiptStatus = (typeof REFILL_V3_ADVANCE_RECEIPT_STATUSES)[number];
|
|
@@ -195,6 +201,7 @@ export declare const REFILL_V3_ADVANCE_FORBIDDEN_RESULT_KEYS: readonly ["rows",
|
|
|
195
201
|
export type RefillV3AdvanceScopeEcho = {
|
|
196
202
|
workspaceId: string;
|
|
197
203
|
scopeKind: "sender_local_horizon" | "exact_sender_dates";
|
|
204
|
+
campaignId?: string;
|
|
198
205
|
/** Stable identity of the requested scope. Never a clock or a nonce. */
|
|
199
206
|
scopeFingerprint: string;
|
|
200
207
|
};
|
|
@@ -408,6 +415,10 @@ export declare const REFILL_V3_ADVANCE_OUTPUT_SCHEMA: Readonly<{
|
|
|
408
415
|
readonly type: "string";
|
|
409
416
|
readonly minLength: 1;
|
|
410
417
|
};
|
|
418
|
+
readonly campaignId: {
|
|
419
|
+
readonly type: "string";
|
|
420
|
+
readonly minLength: 1;
|
|
421
|
+
};
|
|
411
422
|
readonly scopeKind: {
|
|
412
423
|
readonly type: "string";
|
|
413
424
|
readonly enum: readonly ["sender_local_horizon", "exact_sender_dates"];
|
|
@@ -486,7 +497,7 @@ export declare const REFILL_V3_ADVANCE_OUTPUT_SCHEMA: Readonly<{
|
|
|
486
497
|
};
|
|
487
498
|
readonly reasonCode: {
|
|
488
499
|
readonly type: readonly ["string", "null"];
|
|
489
|
-
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch", null];
|
|
500
|
+
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "campaign_target_missing", "campaign_target_stale", "campaign_target_inactive", "campaign_target_unauthorized", "campaign_target_sender_incompatible", "target_lane_incompatible", "campaign_target_action_incompatible", "campaign_target_exhausted", "campaign_target_identity_mismatch", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch", null];
|
|
490
501
|
};
|
|
491
502
|
readonly approvedCount: {
|
|
492
503
|
readonly type: "integer";
|
|
@@ -537,7 +548,7 @@ export declare const REFILL_V3_ADVANCE_OUTPUT_SCHEMA: Readonly<{
|
|
|
537
548
|
readonly type: "array";
|
|
538
549
|
readonly items: {
|
|
539
550
|
readonly type: "string";
|
|
540
|
-
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
551
|
+
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "campaign_target_missing", "campaign_target_stale", "campaign_target_inactive", "campaign_target_unauthorized", "campaign_target_sender_incompatible", "target_lane_incompatible", "campaign_target_action_incompatible", "campaign_target_exhausted", "campaign_target_identity_mismatch", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
541
552
|
};
|
|
542
553
|
};
|
|
543
554
|
};
|
|
@@ -561,7 +572,7 @@ export declare const REFILL_V3_ADVANCE_OUTPUT_SCHEMA: Readonly<{
|
|
|
561
572
|
readonly properties: {
|
|
562
573
|
readonly code: {
|
|
563
574
|
readonly type: "string";
|
|
564
|
-
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
575
|
+
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "campaign_target_missing", "campaign_target_stale", "campaign_target_inactive", "campaign_target_unauthorized", "campaign_target_sender_incompatible", "target_lane_incompatible", "campaign_target_action_incompatible", "campaign_target_exhausted", "campaign_target_identity_mismatch", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
565
576
|
};
|
|
566
577
|
readonly message: {
|
|
567
578
|
readonly type: "string";
|
|
@@ -596,7 +607,7 @@ export declare const REFILL_V3_ADVANCE_OUTPUT_SCHEMA: Readonly<{
|
|
|
596
607
|
readonly properties: {
|
|
597
608
|
readonly code: {
|
|
598
609
|
readonly type: "string";
|
|
599
|
-
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
610
|
+
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "campaign_target_missing", "campaign_target_stale", "campaign_target_inactive", "campaign_target_unauthorized", "campaign_target_sender_incompatible", "target_lane_incompatible", "campaign_target_action_incompatible", "campaign_target_exhausted", "campaign_target_identity_mismatch", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
600
611
|
};
|
|
601
612
|
readonly message: {
|
|
602
613
|
readonly type: "string";
|
|
@@ -755,7 +766,7 @@ export declare const REFILL_V3_ADVANCE_OUTPUT_SCHEMA: Readonly<{
|
|
|
755
766
|
readonly type: "array";
|
|
756
767
|
readonly items: {
|
|
757
768
|
readonly type: "string";
|
|
758
|
-
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
769
|
+
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "campaign_target_missing", "campaign_target_stale", "campaign_target_inactive", "campaign_target_unauthorized", "campaign_target_sender_incompatible", "target_lane_incompatible", "campaign_target_action_incompatible", "campaign_target_exhausted", "campaign_target_identity_mismatch", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
759
770
|
};
|
|
760
771
|
};
|
|
761
772
|
};
|
|
@@ -885,7 +896,7 @@ export declare const REFILL_V3_ADVANCE_OUTPUT_SCHEMA: Readonly<{
|
|
|
885
896
|
readonly type: "array";
|
|
886
897
|
readonly items: {
|
|
887
898
|
readonly type: "string";
|
|
888
|
-
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
899
|
+
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "campaign_target_missing", "campaign_target_stale", "campaign_target_inactive", "campaign_target_unauthorized", "campaign_target_sender_incompatible", "target_lane_incompatible", "campaign_target_action_incompatible", "campaign_target_exhausted", "campaign_target_identity_mismatch", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
889
900
|
};
|
|
890
901
|
};
|
|
891
902
|
};
|
|
@@ -1015,7 +1026,7 @@ export declare const REFILL_V3_ADVANCE_OUTPUT_SCHEMA: Readonly<{
|
|
|
1015
1026
|
readonly type: "array";
|
|
1016
1027
|
readonly items: {
|
|
1017
1028
|
readonly type: "string";
|
|
1018
|
-
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
1029
|
+
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "campaign_target_missing", "campaign_target_stale", "campaign_target_inactive", "campaign_target_unauthorized", "campaign_target_sender_incompatible", "target_lane_incompatible", "campaign_target_action_incompatible", "campaign_target_exhausted", "campaign_target_identity_mismatch", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
1019
1030
|
};
|
|
1020
1031
|
};
|
|
1021
1032
|
};
|
|
@@ -62,6 +62,7 @@ export function resolveRefillV3AdvanceSchemaVersion(value) {
|
|
|
62
62
|
export const REFILL_V3_ADVANCE_INPUT_KEYS = [
|
|
63
63
|
"workspaceId",
|
|
64
64
|
"scope",
|
|
65
|
+
"campaignId",
|
|
65
66
|
"yolo",
|
|
66
67
|
];
|
|
67
68
|
/**
|
|
@@ -156,6 +157,12 @@ export const REFILL_V3_ADVANCE_INPUT_SCHEMA = Object.freeze({
|
|
|
156
157
|
minLength: 1,
|
|
157
158
|
description: "Explicit request-scoped workspace id. Pass this instead of switching the shared active workspace.",
|
|
158
159
|
},
|
|
160
|
+
campaignId: {
|
|
161
|
+
type: "string",
|
|
162
|
+
minLength: 1,
|
|
163
|
+
pattern: "\\S",
|
|
164
|
+
description: "Optional stable campaign id for exact-campaign execution. Display names are never execution identity.",
|
|
165
|
+
},
|
|
159
166
|
scope: {
|
|
160
167
|
...ADVANCE_SCOPE_SCHEMA,
|
|
161
168
|
description: "Either a 1-3 day sender-local horizon or an exact sender/date set. There is no lane input, no row input, and no mode input.",
|
|
@@ -264,6 +271,24 @@ export const REFILL_V3_ADVANCE_ONLY_REASON_CODES = [
|
|
|
264
271
|
* is a refusal rather than an executed mutation.
|
|
265
272
|
*/
|
|
266
273
|
"workspace_membership_revoked",
|
|
274
|
+
/** The stable target no longer exists in the authorized workspace. */
|
|
275
|
+
"campaign_target_missing",
|
|
276
|
+
/** The stable target changed between two authority-bound observations. */
|
|
277
|
+
"campaign_target_stale",
|
|
278
|
+
/** The target exists but is not currently active. */
|
|
279
|
+
"campaign_target_inactive",
|
|
280
|
+
/** The target is outside the request's authorized workspace. */
|
|
281
|
+
"campaign_target_unauthorized",
|
|
282
|
+
/** The target does not belong to the requested sender scope. */
|
|
283
|
+
"campaign_target_sender_incompatible",
|
|
284
|
+
/** The target cannot serve the selected lane. */
|
|
285
|
+
"target_lane_incompatible",
|
|
286
|
+
/** The target has no compatible schedulable action. */
|
|
287
|
+
"campaign_target_action_incompatible",
|
|
288
|
+
/** The exact target has no remaining supply for this request. */
|
|
289
|
+
"campaign_target_exhausted",
|
|
290
|
+
/** An explicit continuation target differs from its retained run target. */
|
|
291
|
+
"campaign_target_identity_mismatch",
|
|
267
292
|
// ── V32-CONT-001 · the presented RUN CREDENTIAL.
|
|
268
293
|
//
|
|
269
294
|
// Each is a statement the caller made about CONTINUITY that this server could
|
|
@@ -435,6 +460,7 @@ const SCOPE_ECHO_SCHEMA = {
|
|
|
435
460
|
required: ["workspaceId", "scopeKind", "scopeFingerprint"],
|
|
436
461
|
properties: {
|
|
437
462
|
workspaceId: { type: "string", minLength: 1 },
|
|
463
|
+
campaignId: { type: "string", minLength: 1 },
|
|
438
464
|
scopeKind: {
|
|
439
465
|
type: "string",
|
|
440
466
|
enum: ["sender_local_horizon", "exact_sender_dates"],
|
|
@@ -884,11 +910,13 @@ function decodeTerminalEvidence(value) {
|
|
|
884
910
|
function decodeScopeEcho(value) {
|
|
885
911
|
if (!isRecord(value))
|
|
886
912
|
return null;
|
|
887
|
-
const
|
|
888
|
-
|
|
913
|
+
const requiredKeys = ["workspaceId", "scopeKind", "scopeFingerprint"];
|
|
914
|
+
const keys = [...requiredKeys, "campaignId"];
|
|
915
|
+
if (!onlyKeys(value, keys) || requiredKeys.some((key) => !(key in value)))
|
|
889
916
|
return null;
|
|
890
917
|
if (!nonEmptyString(value.workspaceId) ||
|
|
891
918
|
!nonEmptyString(value.scopeFingerprint) ||
|
|
919
|
+
(value.campaignId !== undefined && !nonEmptyString(value.campaignId)) ||
|
|
892
920
|
!isOneOfAdvance(value.scopeKind, [
|
|
893
921
|
"sender_local_horizon",
|
|
894
922
|
"exact_sender_dates",
|
|
@@ -899,6 +927,9 @@ function decodeScopeEcho(value) {
|
|
|
899
927
|
workspaceId: value.workspaceId,
|
|
900
928
|
scopeKind: value.scopeKind,
|
|
901
929
|
scopeFingerprint: value.scopeFingerprint,
|
|
930
|
+
...(value.campaignId === undefined
|
|
931
|
+
? {}
|
|
932
|
+
: { campaignId: value.campaignId }),
|
|
902
933
|
};
|
|
903
934
|
}
|
|
904
935
|
function decodeRowScope(value) {
|
|
@@ -42,6 +42,12 @@ export declare const refillV3AdvanceToolDefinitions: {
|
|
|
42
42
|
readonly minLength: 1;
|
|
43
43
|
readonly description: "Explicit request-scoped workspace id. Pass this instead of switching the shared active workspace.";
|
|
44
44
|
};
|
|
45
|
+
readonly campaignId: {
|
|
46
|
+
readonly type: "string";
|
|
47
|
+
readonly minLength: 1;
|
|
48
|
+
readonly pattern: "\\S";
|
|
49
|
+
readonly description: "Optional stable campaign id for exact-campaign execution. Display names are never execution identity.";
|
|
50
|
+
};
|
|
45
51
|
readonly scope: {
|
|
46
52
|
readonly description: "Either a 1-3 day sender-local horizon or an exact sender/date set. There is no lane input, no row input, and no mode input.";
|
|
47
53
|
readonly oneOf: readonly [{
|
|
@@ -128,6 +134,10 @@ export declare const refillV3AdvanceToolDefinitions: {
|
|
|
128
134
|
readonly type: "string";
|
|
129
135
|
readonly minLength: 1;
|
|
130
136
|
};
|
|
137
|
+
readonly campaignId: {
|
|
138
|
+
readonly type: "string";
|
|
139
|
+
readonly minLength: 1;
|
|
140
|
+
};
|
|
131
141
|
readonly scopeKind: {
|
|
132
142
|
readonly type: "string";
|
|
133
143
|
readonly enum: readonly ["sender_local_horizon", "exact_sender_dates"];
|
|
@@ -206,7 +216,7 @@ export declare const refillV3AdvanceToolDefinitions: {
|
|
|
206
216
|
};
|
|
207
217
|
readonly reasonCode: {
|
|
208
218
|
readonly type: readonly ["string", "null"];
|
|
209
|
-
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch", null];
|
|
219
|
+
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "campaign_target_missing", "campaign_target_stale", "campaign_target_inactive", "campaign_target_unauthorized", "campaign_target_sender_incompatible", "target_lane_incompatible", "campaign_target_action_incompatible", "campaign_target_exhausted", "campaign_target_identity_mismatch", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch", null];
|
|
210
220
|
};
|
|
211
221
|
readonly approvedCount: {
|
|
212
222
|
readonly type: "integer";
|
|
@@ -257,7 +267,7 @@ export declare const refillV3AdvanceToolDefinitions: {
|
|
|
257
267
|
readonly type: "array";
|
|
258
268
|
readonly items: {
|
|
259
269
|
readonly type: "string";
|
|
260
|
-
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
270
|
+
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "campaign_target_missing", "campaign_target_stale", "campaign_target_inactive", "campaign_target_unauthorized", "campaign_target_sender_incompatible", "target_lane_incompatible", "campaign_target_action_incompatible", "campaign_target_exhausted", "campaign_target_identity_mismatch", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
261
271
|
};
|
|
262
272
|
};
|
|
263
273
|
};
|
|
@@ -281,7 +291,7 @@ export declare const refillV3AdvanceToolDefinitions: {
|
|
|
281
291
|
readonly properties: {
|
|
282
292
|
readonly code: {
|
|
283
293
|
readonly type: "string";
|
|
284
|
-
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
294
|
+
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "campaign_target_missing", "campaign_target_stale", "campaign_target_inactive", "campaign_target_unauthorized", "campaign_target_sender_incompatible", "target_lane_incompatible", "campaign_target_action_incompatible", "campaign_target_exhausted", "campaign_target_identity_mismatch", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
285
295
|
};
|
|
286
296
|
readonly message: {
|
|
287
297
|
readonly type: "string";
|
|
@@ -316,7 +326,7 @@ export declare const refillV3AdvanceToolDefinitions: {
|
|
|
316
326
|
readonly properties: {
|
|
317
327
|
readonly code: {
|
|
318
328
|
readonly type: "string";
|
|
319
|
-
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
329
|
+
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "campaign_target_missing", "campaign_target_stale", "campaign_target_inactive", "campaign_target_unauthorized", "campaign_target_sender_incompatible", "target_lane_incompatible", "campaign_target_action_incompatible", "campaign_target_exhausted", "campaign_target_identity_mismatch", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
320
330
|
};
|
|
321
331
|
readonly message: {
|
|
322
332
|
readonly type: "string";
|
|
@@ -475,7 +485,7 @@ export declare const refillV3AdvanceToolDefinitions: {
|
|
|
475
485
|
readonly type: "array";
|
|
476
486
|
readonly items: {
|
|
477
487
|
readonly type: "string";
|
|
478
|
-
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
488
|
+
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "campaign_target_missing", "campaign_target_stale", "campaign_target_inactive", "campaign_target_unauthorized", "campaign_target_sender_incompatible", "target_lane_incompatible", "campaign_target_action_incompatible", "campaign_target_exhausted", "campaign_target_identity_mismatch", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
479
489
|
};
|
|
480
490
|
};
|
|
481
491
|
};
|
|
@@ -605,7 +615,7 @@ export declare const refillV3AdvanceToolDefinitions: {
|
|
|
605
615
|
readonly type: "array";
|
|
606
616
|
readonly items: {
|
|
607
617
|
readonly type: "string";
|
|
608
|
-
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
618
|
+
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "campaign_target_missing", "campaign_target_stale", "campaign_target_inactive", "campaign_target_unauthorized", "campaign_target_sender_incompatible", "target_lane_incompatible", "campaign_target_action_incompatible", "campaign_target_exhausted", "campaign_target_identity_mismatch", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
609
619
|
};
|
|
610
620
|
};
|
|
611
621
|
};
|
|
@@ -735,7 +745,7 @@ export declare const refillV3AdvanceToolDefinitions: {
|
|
|
735
745
|
readonly type: "array";
|
|
736
746
|
readonly items: {
|
|
737
747
|
readonly type: "string";
|
|
738
|
-
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
748
|
+
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "campaign_target_missing", "campaign_target_stale", "campaign_target_inactive", "campaign_target_unauthorized", "campaign_target_sender_incompatible", "target_lane_incompatible", "campaign_target_action_incompatible", "campaign_target_exhausted", "campaign_target_identity_mismatch", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
739
749
|
};
|
|
740
750
|
};
|
|
741
751
|
};
|
|
@@ -864,6 +874,7 @@ export declare const refillV3AdvanceToolDefinitions: {
|
|
|
864
874
|
export type RefillV3AdvanceToolInput = {
|
|
865
875
|
workspaceId?: string;
|
|
866
876
|
scope?: unknown;
|
|
877
|
+
campaignId?: string;
|
|
867
878
|
/**
|
|
868
879
|
* The operator's autonomy grant, forwarded verbatim. It is NOT defaulted here
|
|
869
880
|
* — an omitted grant stays omitted so the backend parser, which is the single
|
|
@@ -66,12 +66,18 @@ export async function advanceRefillV3Tool(input) {
|
|
|
66
66
|
const transportScope = {
|
|
67
67
|
workspaceId,
|
|
68
68
|
scope: input.scope,
|
|
69
|
+
...(input.campaignId === undefined
|
|
70
|
+
? {}
|
|
71
|
+
: { campaignId: input.campaignId }),
|
|
69
72
|
...(input.yolo === undefined ? {} : { yolo: input.yolo }),
|
|
70
73
|
};
|
|
71
74
|
const runToken = resolveRefillV3RunToken(transportScope, input.runToken);
|
|
72
75
|
const raw = await getApi().post(REFILL_V3_ADVANCE_ROUTE, {
|
|
73
76
|
workspaceId,
|
|
74
77
|
scope: input.scope,
|
|
78
|
+
...(input.campaignId === undefined
|
|
79
|
+
? {}
|
|
80
|
+
: { campaignId: input.campaignId }),
|
|
75
81
|
// Forwarded only when the caller actually supplied it, so an absent grant
|
|
76
82
|
// is absent on the wire rather than an explicit `false` this layer made up.
|
|
77
83
|
...(input.yolo === undefined ? {} : { yolo: input.yolo }),
|
|
@@ -69,6 +69,12 @@ export declare const REFILL_V3_CONTINUE_INPUT_SCHEMA: Readonly<{
|
|
|
69
69
|
};
|
|
70
70
|
}];
|
|
71
71
|
};
|
|
72
|
+
readonly campaignId: {
|
|
73
|
+
readonly type: "string";
|
|
74
|
+
readonly minLength: 1;
|
|
75
|
+
readonly pattern: "\\S";
|
|
76
|
+
readonly description: "Optional stable campaign id for exact-campaign execution. Display names are never execution identity.";
|
|
77
|
+
};
|
|
72
78
|
readonly yolo: {
|
|
73
79
|
readonly type: "boolean";
|
|
74
80
|
readonly description: "The operator's AUTONOMY GRANT, true only when the operator actually asked for --yolo. It is not a mode and selects nothing: WHICH campaign may start is derived from the workspace's own campaigns. It authorizes exactly one thing this call could not otherwise do — starting one already-eligible PAUSED derived-evergreen campaign once every active campaign for a row is exhausted. Omit it, or pass false, for a conservative run that reports that exhaustion instead of acting on it.";
|
|
@@ -58,6 +58,7 @@ export const REFILL_V3_CONTINUE_INPUT_SCHEMA = Object.freeze({
|
|
|
58
58
|
properties: {
|
|
59
59
|
workspaceId: REFILL_V3_ADVANCE_INPUT_SCHEMA.properties.workspaceId,
|
|
60
60
|
scope: REFILL_V3_ADVANCE_INPUT_SCHEMA.properties.scope,
|
|
61
|
+
campaignId: REFILL_V3_ADVANCE_INPUT_SCHEMA.properties.campaignId,
|
|
61
62
|
yolo: REFILL_V3_ADVANCE_INPUT_SCHEMA.properties.yolo,
|
|
62
63
|
decision: {
|
|
63
64
|
type: "object",
|
|
@@ -83,6 +83,12 @@ export declare const refillV3ContinueToolDefinitions: {
|
|
|
83
83
|
};
|
|
84
84
|
}];
|
|
85
85
|
};
|
|
86
|
+
readonly campaignId: {
|
|
87
|
+
readonly type: "string";
|
|
88
|
+
readonly minLength: 1;
|
|
89
|
+
readonly pattern: "\\S";
|
|
90
|
+
readonly description: "Optional stable campaign id for exact-campaign execution. Display names are never execution identity.";
|
|
91
|
+
};
|
|
86
92
|
readonly yolo: {
|
|
87
93
|
readonly type: "boolean";
|
|
88
94
|
readonly description: "The operator's AUTONOMY GRANT, true only when the operator actually asked for --yolo. It is not a mode and selects nothing: WHICH campaign may start is derived from the workspace's own campaigns. It authorizes exactly one thing this call could not otherwise do — starting one already-eligible PAUSED derived-evergreen campaign once every active campaign for a row is exhausted. Omit it, or pass false, for a conservative run that reports that exhaustion instead of acting on it.";
|
|
@@ -348,6 +354,7 @@ export declare const refillV3ContinueToolDefinitions: {
|
|
|
348
354
|
export type RefillV3ContinueInput = {
|
|
349
355
|
workspaceId: string;
|
|
350
356
|
scope: unknown;
|
|
357
|
+
campaignId?: string;
|
|
351
358
|
yolo?: boolean;
|
|
352
359
|
/**
|
|
353
360
|
* MCP-internal server credential assembled by the public tool wrapper from
|
|
@@ -438,6 +445,13 @@ export type RefillV3ContinueDependencies = {
|
|
|
438
445
|
requireIdle: true;
|
|
439
446
|
requirePreparationTerminal?: true;
|
|
440
447
|
}): Promise<unknown>;
|
|
448
|
+
/** Stable-id re-attestation after an external wait and before receipt use. */
|
|
449
|
+
attestCampaignTargetAfterWait?(input: {
|
|
450
|
+
workspaceId: string;
|
|
451
|
+
campaignId: string;
|
|
452
|
+
senderId: string;
|
|
453
|
+
date: string;
|
|
454
|
+
}): Promise<boolean>;
|
|
441
455
|
/** Read the cumulative campaign message total at one exact observation. */
|
|
442
456
|
readCampaignMessageCount?: (input: {
|
|
443
457
|
workspaceId: string;
|
|
@@ -542,6 +556,7 @@ export declare function continueRefillV3(input: RefillV3ContinueInput, dependenc
|
|
|
542
556
|
export declare function continueRefillV3Tool(input: {
|
|
543
557
|
workspaceId?: string;
|
|
544
558
|
scope?: unknown;
|
|
559
|
+
campaignId?: string;
|
|
545
560
|
yolo?: boolean;
|
|
546
561
|
decision?: unknown;
|
|
547
562
|
}): Promise<RefillV3ContinueResult>;
|
|
@@ -1172,6 +1172,22 @@ const DEFAULT_DEPENDENCIES = {
|
|
|
1172
1172
|
advance: advanceRefillV3Tool,
|
|
1173
1173
|
runCampaignWork: runRefillV3CampaignWorkWithProductionOwners,
|
|
1174
1174
|
waitForCampaignProcessing,
|
|
1175
|
+
async attestCampaignTargetAfterWait(input) {
|
|
1176
|
+
const observation = await getRefillV3WorldStateTool({
|
|
1177
|
+
workspaceId: input.workspaceId,
|
|
1178
|
+
campaignId: input.campaignId,
|
|
1179
|
+
scope: {
|
|
1180
|
+
kind: "exact_sender_dates",
|
|
1181
|
+
senderDates: [{ senderId: input.senderId, dates: [input.date] }],
|
|
1182
|
+
},
|
|
1183
|
+
});
|
|
1184
|
+
const campaigns = observation.rows.flatMap((row) => [
|
|
1185
|
+
...row.activeCampaigns,
|
|
1186
|
+
...row.inactiveCampaigns,
|
|
1187
|
+
]);
|
|
1188
|
+
return (campaigns.length > 0 &&
|
|
1189
|
+
campaigns.every((campaign) => campaign.id === input.campaignId && campaign.status === "ACTIVE"));
|
|
1190
|
+
},
|
|
1175
1191
|
persistCampaignWorkReceipt: (input) => getApi().post("/api/v3/mcp/refill-v3/campaign-work-receipt", input, {
|
|
1176
1192
|
workspaceId: input.workspaceId,
|
|
1177
1193
|
}),
|
|
@@ -1272,6 +1288,9 @@ async function executeRefillV3Continuation(input, dependencies) {
|
|
|
1272
1288
|
const advanceResult = await dependencies.advance({
|
|
1273
1289
|
workspaceId,
|
|
1274
1290
|
scope: input.scope,
|
|
1291
|
+
...(input.campaignId === undefined
|
|
1292
|
+
? {}
|
|
1293
|
+
: { campaignId: input.campaignId }),
|
|
1275
1294
|
...(input.yolo === undefined ? {} : { yolo: input.yolo }),
|
|
1276
1295
|
runToken: presentedRunToken,
|
|
1277
1296
|
});
|
|
@@ -1437,6 +1456,19 @@ async function executeRefillV3Continuation(input, dependencies) {
|
|
|
1437
1456
|
campaignWideIdleRequired: false,
|
|
1438
1457
|
}
|
|
1439
1458
|
: null;
|
|
1459
|
+
if (input.campaignId &&
|
|
1460
|
+
(preparationOwnsSettlement || directlyQueuedRowsOwnSettlement) &&
|
|
1461
|
+
dependencies.attestCampaignTargetAfterWait) {
|
|
1462
|
+
const stillAttested = await dependencies.attestCampaignTargetAfterWait({
|
|
1463
|
+
workspaceId,
|
|
1464
|
+
campaignId: input.campaignId,
|
|
1465
|
+
senderId: advanceResult.packet.scope.senderId,
|
|
1466
|
+
date: advanceResult.packet.scope.date,
|
|
1467
|
+
});
|
|
1468
|
+
if (!stillAttested) {
|
|
1469
|
+
throw new Error("campaign_target_stale: the exact campaign changed while continuation waited; no post-wait receipt authority was consumed");
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1440
1472
|
let messageCountAfter = generatedMessageCountFrom(settlement);
|
|
1441
1473
|
if (messageCountAfter === null && dependencies.readCampaignMessageCount) {
|
|
1442
1474
|
messageCountAfter = await reconnectPostAdvanceStage({
|
|
@@ -1527,6 +1559,9 @@ function refillV3ContinueReplayKey(input) {
|
|
|
1527
1559
|
.update(canonical({
|
|
1528
1560
|
workspaceId: input.workspaceId,
|
|
1529
1561
|
scope: input.scope,
|
|
1562
|
+
...(input.campaignId === undefined
|
|
1563
|
+
? {}
|
|
1564
|
+
: { campaignId: input.campaignId }),
|
|
1530
1565
|
yolo: input.yolo,
|
|
1531
1566
|
runToken: input.runToken,
|
|
1532
1567
|
packet: input.packet,
|
|
@@ -1572,6 +1607,9 @@ export async function continueRefillV3Tool(input) {
|
|
|
1572
1607
|
? {
|
|
1573
1608
|
workspaceId,
|
|
1574
1609
|
scope: input.scope,
|
|
1610
|
+
...(input.campaignId === undefined
|
|
1611
|
+
? {}
|
|
1612
|
+
: { campaignId: input.campaignId }),
|
|
1575
1613
|
...(input.yolo === undefined ? {} : { yolo: input.yolo }),
|
|
1576
1614
|
}
|
|
1577
1615
|
: null;
|
|
@@ -1581,9 +1619,17 @@ export async function continueRefillV3Tool(input) {
|
|
|
1581
1619
|
if (!workspaceId || !retained) {
|
|
1582
1620
|
throw new Error("refill_v3_continue requires an exact workspaceId and current server-issued attention state. Call refill_v3_advance first.");
|
|
1583
1621
|
}
|
|
1622
|
+
if (input.campaignId !== undefined &&
|
|
1623
|
+
retained.campaignId !== undefined &&
|
|
1624
|
+
input.campaignId !== retained.campaignId) {
|
|
1625
|
+
throw new Error("campaign_target_identity_mismatch: the explicit continuation campaignId differs from the retained server-issued run target");
|
|
1626
|
+
}
|
|
1584
1627
|
return continueRefillV3({
|
|
1585
1628
|
workspaceId,
|
|
1586
1629
|
scope: input.scope,
|
|
1630
|
+
...((input.campaignId ?? retained.campaignId) === undefined
|
|
1631
|
+
? {}
|
|
1632
|
+
: { campaignId: input.campaignId ?? retained.campaignId }),
|
|
1587
1633
|
...(input.yolo === undefined ? {} : { yolo: input.yolo }),
|
|
1588
1634
|
runToken: retained.runToken,
|
|
1589
1635
|
packet: retained.packet,
|
|
@@ -17,6 +17,7 @@ import type { RefillV3CampaignAttentionPacket } from "./refill-v3-attention-pack
|
|
|
17
17
|
export type RefillV3RunTransportScope = {
|
|
18
18
|
workspaceId: string;
|
|
19
19
|
scope: unknown;
|
|
20
|
+
campaignId?: string;
|
|
20
21
|
yolo?: boolean;
|
|
21
22
|
};
|
|
22
23
|
/** Prefer exact MCP-held continuity; use caller bytes only after a restart. */
|
|
@@ -27,6 +28,7 @@ export declare function recordRefillV3RunTransition(input: RefillV3RunTransportS
|
|
|
27
28
|
export declare function retainedRefillV3Attention(input: RefillV3RunTransportScope): {
|
|
28
29
|
runToken: string;
|
|
29
30
|
packet: RefillV3CampaignAttentionPacket;
|
|
31
|
+
campaignId?: string;
|
|
30
32
|
} | null;
|
|
31
33
|
/** Test-only isolation owner; production code never clears live continuity. */
|
|
32
34
|
export declare function resetRefillV3RunTokenTransportForTests(): void;
|
|
@@ -28,6 +28,16 @@ function canonical(value) {
|
|
|
28
28
|
return JSON.stringify(normalize(value));
|
|
29
29
|
}
|
|
30
30
|
function runKey(input) {
|
|
31
|
+
return canonical({
|
|
32
|
+
workspaceId: input.workspaceId,
|
|
33
|
+
scope: input.scope,
|
|
34
|
+
...(input.campaignId === undefined
|
|
35
|
+
? {}
|
|
36
|
+
: { campaignId: input.campaignId }),
|
|
37
|
+
yolo: input.yolo === true,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function baseRunKey(input) {
|
|
31
41
|
return canonical({
|
|
32
42
|
workspaceId: input.workspaceId,
|
|
33
43
|
scope: input.scope,
|
|
@@ -56,6 +66,7 @@ export function recordRefillV3RunTransition(input, result) {
|
|
|
56
66
|
result.kind === "run_step_pending") {
|
|
57
67
|
retain(key, {
|
|
58
68
|
runToken: result.runToken,
|
|
69
|
+
transportScope: { ...input },
|
|
59
70
|
attentionPacket: result.kind === "campaign_attention_required" ? result.packet : null,
|
|
60
71
|
});
|
|
61
72
|
return;
|
|
@@ -64,9 +75,21 @@ export function recordRefillV3RunTransition(input, result) {
|
|
|
64
75
|
}
|
|
65
76
|
/** Exact current attention state for the public continuation wrapper. */
|
|
66
77
|
export function retainedRefillV3Attention(input) {
|
|
67
|
-
|
|
78
|
+
let retained = retainedRuns.get(runKey(input));
|
|
79
|
+
if (!retained) {
|
|
80
|
+
const matching = [...retainedRuns.values()].filter((candidate) => baseRunKey(candidate.transportScope) === baseRunKey(input) &&
|
|
81
|
+
candidate.attentionPacket !== null);
|
|
82
|
+
if (matching.length === 1)
|
|
83
|
+
retained = matching[0];
|
|
84
|
+
}
|
|
68
85
|
return retained?.attentionPacket
|
|
69
|
-
? {
|
|
86
|
+
? {
|
|
87
|
+
runToken: retained.runToken,
|
|
88
|
+
packet: retained.attentionPacket,
|
|
89
|
+
...(retained.transportScope.campaignId === undefined
|
|
90
|
+
? {}
|
|
91
|
+
: { campaignId: retained.transportScope.campaignId }),
|
|
92
|
+
}
|
|
70
93
|
: null;
|
|
71
94
|
}
|
|
72
95
|
/** Test-only isolation owner; production code never clears live continuity. */
|
|
@@ -42,6 +42,11 @@ export declare const refillV3WorldStateToolDefinitions: {
|
|
|
42
42
|
readonly type: "string";
|
|
43
43
|
readonly minLength: 1;
|
|
44
44
|
};
|
|
45
|
+
readonly campaignId: {
|
|
46
|
+
readonly type: "string";
|
|
47
|
+
readonly minLength: 1;
|
|
48
|
+
readonly pattern: "\\S";
|
|
49
|
+
};
|
|
45
50
|
readonly scope: {
|
|
46
51
|
readonly oneOf: readonly [{
|
|
47
52
|
readonly type: "object";
|
|
@@ -615,6 +620,7 @@ export declare const refillV3WorldStateToolDefinitions: {
|
|
|
615
620
|
export type RefillV3WorldStateToolInput = {
|
|
616
621
|
workspaceId?: string;
|
|
617
622
|
scope?: unknown;
|
|
623
|
+
campaignId?: string;
|
|
618
624
|
};
|
|
619
625
|
/**
|
|
620
626
|
* Observe the canonical world state for ONE explicit workspace.
|
|
@@ -40,6 +40,7 @@ const REFILL_V3_WORLD_STATE_TOOL_INPUT_SCHEMA = {
|
|
|
40
40
|
required: ["workspaceId", "scope"],
|
|
41
41
|
properties: {
|
|
42
42
|
workspaceId: { type: "string", minLength: 1 },
|
|
43
|
+
campaignId: { type: "string", minLength: 1, pattern: "\\S" },
|
|
43
44
|
scope: {
|
|
44
45
|
oneOf: [
|
|
45
46
|
{
|
|
@@ -125,7 +126,13 @@ export async function getRefillV3WorldStateTool(input) {
|
|
|
125
126
|
if (!workspaceId) {
|
|
126
127
|
throw new Error("Explicit workspaceId is required for refill_v3_world_state. Pass workspaceId on the tool call instead of switching the shared active workspace.");
|
|
127
128
|
}
|
|
128
|
-
const raw = await getApi().post(REFILL_V3_WORLD_STATE_ROUTE, {
|
|
129
|
+
const raw = await getApi().post(REFILL_V3_WORLD_STATE_ROUTE, {
|
|
130
|
+
workspaceId,
|
|
131
|
+
scope: input.scope,
|
|
132
|
+
...(input.campaignId === undefined
|
|
133
|
+
? {}
|
|
134
|
+
: { campaignId: input.campaignId }),
|
|
135
|
+
}, workspaceRequestOptions(workspaceId));
|
|
129
136
|
const decoded = decodeRefillWorldStateResult(raw);
|
|
130
137
|
if (decoded === null) {
|
|
131
138
|
throw new Error("The Refill V3 world-state response failed the published result contract.");
|
package/dist/tools/registry.d.ts
CHANGED
|
@@ -10198,6 +10198,12 @@ export declare const allTools: ({
|
|
|
10198
10198
|
readonly minLength: 1;
|
|
10199
10199
|
readonly description: "Explicit request-scoped workspace id. Pass this instead of switching the shared active workspace.";
|
|
10200
10200
|
};
|
|
10201
|
+
readonly campaignId: {
|
|
10202
|
+
readonly type: "string";
|
|
10203
|
+
readonly minLength: 1;
|
|
10204
|
+
readonly pattern: "\\S";
|
|
10205
|
+
readonly description: "Optional stable campaign id for exact-campaign execution. Display names are never execution identity.";
|
|
10206
|
+
};
|
|
10201
10207
|
readonly scope: {
|
|
10202
10208
|
readonly description: "Either a 1-3 day sender-local horizon or an exact sender/date set. There is no lane input, no row input, and no mode input.";
|
|
10203
10209
|
readonly oneOf: readonly [{
|
|
@@ -10284,6 +10290,10 @@ export declare const allTools: ({
|
|
|
10284
10290
|
readonly type: "string";
|
|
10285
10291
|
readonly minLength: 1;
|
|
10286
10292
|
};
|
|
10293
|
+
readonly campaignId: {
|
|
10294
|
+
readonly type: "string";
|
|
10295
|
+
readonly minLength: 1;
|
|
10296
|
+
};
|
|
10287
10297
|
readonly scopeKind: {
|
|
10288
10298
|
readonly type: "string";
|
|
10289
10299
|
readonly enum: readonly ["sender_local_horizon", "exact_sender_dates"];
|
|
@@ -10362,7 +10372,7 @@ export declare const allTools: ({
|
|
|
10362
10372
|
};
|
|
10363
10373
|
readonly reasonCode: {
|
|
10364
10374
|
readonly type: readonly ["string", "null"];
|
|
10365
|
-
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch", null];
|
|
10375
|
+
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "campaign_target_missing", "campaign_target_stale", "campaign_target_inactive", "campaign_target_unauthorized", "campaign_target_sender_incompatible", "target_lane_incompatible", "campaign_target_action_incompatible", "campaign_target_exhausted", "campaign_target_identity_mismatch", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch", null];
|
|
10366
10376
|
};
|
|
10367
10377
|
readonly approvedCount: {
|
|
10368
10378
|
readonly type: "integer";
|
|
@@ -10413,7 +10423,7 @@ export declare const allTools: ({
|
|
|
10413
10423
|
readonly type: "array";
|
|
10414
10424
|
readonly items: {
|
|
10415
10425
|
readonly type: "string";
|
|
10416
|
-
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
10426
|
+
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "campaign_target_missing", "campaign_target_stale", "campaign_target_inactive", "campaign_target_unauthorized", "campaign_target_sender_incompatible", "target_lane_incompatible", "campaign_target_action_incompatible", "campaign_target_exhausted", "campaign_target_identity_mismatch", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
10417
10427
|
};
|
|
10418
10428
|
};
|
|
10419
10429
|
};
|
|
@@ -10437,7 +10447,7 @@ export declare const allTools: ({
|
|
|
10437
10447
|
readonly properties: {
|
|
10438
10448
|
readonly code: {
|
|
10439
10449
|
readonly type: "string";
|
|
10440
|
-
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
10450
|
+
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "campaign_target_missing", "campaign_target_stale", "campaign_target_inactive", "campaign_target_unauthorized", "campaign_target_sender_incompatible", "target_lane_incompatible", "campaign_target_action_incompatible", "campaign_target_exhausted", "campaign_target_identity_mismatch", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
10441
10451
|
};
|
|
10442
10452
|
readonly message: {
|
|
10443
10453
|
readonly type: "string";
|
|
@@ -10472,7 +10482,7 @@ export declare const allTools: ({
|
|
|
10472
10482
|
readonly properties: {
|
|
10473
10483
|
readonly code: {
|
|
10474
10484
|
readonly type: "string";
|
|
10475
|
-
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
10485
|
+
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "campaign_target_missing", "campaign_target_stale", "campaign_target_inactive", "campaign_target_unauthorized", "campaign_target_sender_incompatible", "target_lane_incompatible", "campaign_target_action_incompatible", "campaign_target_exhausted", "campaign_target_identity_mismatch", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
10476
10486
|
};
|
|
10477
10487
|
readonly message: {
|
|
10478
10488
|
readonly type: "string";
|
|
@@ -10631,7 +10641,7 @@ export declare const allTools: ({
|
|
|
10631
10641
|
readonly type: "array";
|
|
10632
10642
|
readonly items: {
|
|
10633
10643
|
readonly type: "string";
|
|
10634
|
-
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
10644
|
+
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "campaign_target_missing", "campaign_target_stale", "campaign_target_inactive", "campaign_target_unauthorized", "campaign_target_sender_incompatible", "target_lane_incompatible", "campaign_target_action_incompatible", "campaign_target_exhausted", "campaign_target_identity_mismatch", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
10635
10645
|
};
|
|
10636
10646
|
};
|
|
10637
10647
|
};
|
|
@@ -10761,7 +10771,7 @@ export declare const allTools: ({
|
|
|
10761
10771
|
readonly type: "array";
|
|
10762
10772
|
readonly items: {
|
|
10763
10773
|
readonly type: "string";
|
|
10764
|
-
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
10774
|
+
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "campaign_target_missing", "campaign_target_stale", "campaign_target_inactive", "campaign_target_unauthorized", "campaign_target_sender_incompatible", "target_lane_incompatible", "campaign_target_action_incompatible", "campaign_target_exhausted", "campaign_target_identity_mismatch", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
10765
10775
|
};
|
|
10766
10776
|
};
|
|
10767
10777
|
};
|
|
@@ -10891,7 +10901,7 @@ export declare const allTools: ({
|
|
|
10891
10901
|
readonly type: "array";
|
|
10892
10902
|
readonly items: {
|
|
10893
10903
|
readonly type: "string";
|
|
10894
|
-
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
10904
|
+
readonly enum: readonly ["global_cooldown", "connection_cooldown", "paid_inmail_cooldown", "endpoint_temporarily_unavailable", "date_in_past", "no_sending_hours", "sender_disconnected", "sender_limit_reached", "daily_target_met", "no_eligible_campaign", "no_ready_supply", "sales_nav_disconnected", "insufficient_paid_credits", "paid_inmail_connection_health_recheck_required", "paid_inmail_credit_refresh_failed", "invalid_paid_configuration", "campaign_table_missing", "campaign_sequence_invalid", "source_family_unresolved", "campaign_work_in_flight", "zero_requested_count", "idempotency_scope_mismatch", "uncertain_outcome", "placed_under_other_sender", "placed_off_target_date", "paid_inmail_credit_receipt_invalid", "awaiting_external_change", "approval_authority_invalid", "approval_authority_in_flight", "approval_dispatch_incomplete", "ready_cells_unavailable", "sender_affinity_conflict", "scheduler_target_omitted", "scheduler_failed", "receipt_readback_mismatch", "account_identity_missing", "no_progress_refused", "retryable_paid_attempts_exhausted", "unknown_transport_vocabulary", "forged_authority_receipt_facts", "authority_failure_uncertain", "sender_scope_unresolved", "campaign_supply_unclaimed", "lane_campaigns_exhausted", "missing_balance", "blocked", "workspace_membership_revoked", "campaign_target_missing", "campaign_target_stale", "campaign_target_inactive", "campaign_target_unauthorized", "campaign_target_sender_incompatible", "target_lane_incompatible", "campaign_target_action_incompatible", "campaign_target_exhausted", "campaign_target_identity_mismatch", "invalid_run_token", "expired_run_token", "run_token_scope_mismatch", "run_token_replayed", "unknown_run", "run_closed", "run_grant_mismatch"];
|
|
10895
10905
|
};
|
|
10896
10906
|
};
|
|
10897
10907
|
};
|
|
@@ -11028,6 +11038,11 @@ export declare const allTools: ({
|
|
|
11028
11038
|
readonly type: "string";
|
|
11029
11039
|
readonly minLength: 1;
|
|
11030
11040
|
};
|
|
11041
|
+
readonly campaignId: {
|
|
11042
|
+
readonly type: "string";
|
|
11043
|
+
readonly minLength: 1;
|
|
11044
|
+
readonly pattern: "\\S";
|
|
11045
|
+
};
|
|
11031
11046
|
readonly scope: {
|
|
11032
11047
|
readonly oneOf: readonly [{
|
|
11033
11048
|
readonly type: "object";
|
|
@@ -11670,6 +11685,12 @@ export declare const allTools: ({
|
|
|
11670
11685
|
};
|
|
11671
11686
|
}];
|
|
11672
11687
|
};
|
|
11688
|
+
readonly campaignId: {
|
|
11689
|
+
readonly type: "string";
|
|
11690
|
+
readonly minLength: 1;
|
|
11691
|
+
readonly pattern: "\\S";
|
|
11692
|
+
readonly description: "Optional stable campaign id for exact-campaign execution. Display names are never execution identity.";
|
|
11693
|
+
};
|
|
11673
11694
|
readonly yolo: {
|
|
11674
11695
|
readonly type: "boolean";
|
|
11675
11696
|
readonly description: "The operator's AUTONOMY GRANT, true only when the operator actually asked for --yolo. It is not a mode and selects nothing: WHICH campaign may start is derived from the workspace's own campaigns. It authorizes exactly one thing this call could not otherwise do — starting one already-eligible PAUSED derived-evergreen campaign once every active campaign for a row is exhausted. Omit it, or pass false, for a conservative run that reports that exhaustion instead of acting on it.";
|
package/package.json
CHANGED
|
@@ -5,7 +5,9 @@ visibility: public
|
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- mcp__sellable__refill_sends
|
|
7
7
|
- mcp__sellable__refill_v3_advance
|
|
8
|
+
- mcp__sellable__refill_v3_world_state
|
|
8
9
|
- mcp__sellable__refill_v3_continue
|
|
10
|
+
- mcp__sellable__get_campaigns
|
|
9
11
|
- mcp__sellable__get_refill_target_plan
|
|
10
12
|
- mcp__sellable__get_scheduler_fill_capacity
|
|
11
13
|
- mcp__sellable__get_subskill_asset
|
|
@@ -604,6 +606,19 @@ Synchronous source, configuration, rubric, and exhaustion authorities already
|
|
|
604
606
|
return after their own exact reread, so they return `settlement.ready:true` from
|
|
605
607
|
that bounded authority receipt and never wait on unrelated campaign-wide
|
|
606
608
|
processing cells.
|
|
609
|
+
|
|
610
|
+
When a non-yolo request names a campaign, resolve that visible name with one
|
|
611
|
+
authorized bounded `get_campaigns` call carrying an explicit `limit`. Require
|
|
612
|
+
exactly one case-insensitive exact match; if none or more than one match, stop
|
|
613
|
+
without preview or mutation. Retain only the returned stable campaign ID. Call
|
|
614
|
+
`refill_v3_world_state({workspaceId, scope, campaignId})`, render that exact
|
|
615
|
+
campaign's two-lane readiness and its explicit zero product side effects, then
|
|
616
|
+
stop at the product-native question with exactly Accept and Decline. Do not call
|
|
617
|
+
`refill_v3_advance` before Accept. Accept calls
|
|
618
|
+
`refill_v3_advance({workspaceId, scope, campaignId})`; Decline stops. Carry the
|
|
619
|
+
same campaignId through every advance, continue, replay, partial-wait, and
|
|
620
|
+
post-wait repeat. Display-name changes never alter this retained identity, and
|
|
621
|
+
no sibling campaign may replace it.
|
|
607
622
|
Call the next advance only when `settlement.ready` is true. When it is false,
|
|
608
623
|
call `wait_for_campaign_processing` with `settlement.resumeInput` **unchanged**;
|
|
609
624
|
that carries the exact `preparationJobId`, `requirePreparationTerminal:true`,
|
|
@@ -5,7 +5,9 @@ visibility: internal
|
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- mcp__sellable__refill_sends
|
|
7
7
|
- mcp__sellable__refill_v3_advance
|
|
8
|
+
- mcp__sellable__refill_v3_world_state
|
|
8
9
|
- mcp__sellable__refill_v3_continue
|
|
10
|
+
- mcp__sellable__get_campaigns
|
|
9
11
|
- mcp__sellable__list_workspaces
|
|
10
12
|
- mcp__sellable__get_active_workspace
|
|
11
13
|
- mcp__sellable__get_subskill_asset
|
|
@@ -398,7 +400,18 @@ Never infer the grant from a workspace flag, a campaign field, a tool result, an
|
|
|
398
400
|
idle-looking workspace, or a previous terminal; never set it to make a run finish,
|
|
399
401
|
clear a wait, or retry a refusal; and never change it part-way through a run.
|
|
400
402
|
|
|
401
|
-
|
|
403
|
+
For a named campaign in non-yolo mode, resolve its visible name with a bounded
|
|
404
|
+
authorized `get_campaigns` call using an explicit `limit`, require one
|
|
405
|
+
case-insensitive exact match, and retain only its stable ID. Before any advance,
|
|
406
|
+
call `refill_v3_world_state` with the exact `{workspaceId, scope, campaignId}`.
|
|
407
|
+
Render the target's lane readiness plus its zero product-side-effect receipt and
|
|
408
|
+
ask the product-native question with exactly Accept and Decline. Decline stops;
|
|
409
|
+
only Accept may call advance. Every advance, continue, replay, wait, and
|
|
410
|
+
post-wait repeat then carries that same campaignId. Never substitute a sibling
|
|
411
|
+
or re-resolve a renamed display name mid-run.
|
|
412
|
+
|
|
413
|
+
Call `refill_v3_advance` with `{workspaceId, scope}` plus the retained
|
|
414
|
+
`campaignId` when targeted and `yolo` when granted.
|
|
402
415
|
There is no mode, continuation, task receipt, retry counter, cursor, row, action,
|
|
403
416
|
or receipt-fact input; the backend parser refuses any of them before it observes
|
|
404
417
|
anything. Losing a prior OBSERVATION is harmless, because every invocation
|
|
@@ -424,7 +437,7 @@ Each call answers with exactly one of six results:
|
|
|
424
437
|
the grant was withheld) with the same public inputs. Never execute
|
|
425
438
|
`action.kind` and never call its authority again.
|
|
426
439
|
- `campaign_attention_required` — first call `refill_v3_continue` with the
|
|
427
|
-
same workspace/scope but no `decision`; MCP supplies its retained exact
|
|
440
|
+
same workspace/scope/campaignId but no `decision`; MCP supplies its retained exact
|
|
428
441
|
packet and token. It revalidates the packet
|
|
429
442
|
against a fresh advance result and deterministically owns live-job waiting,
|
|
430
443
|
exact actionable enrichment, and same-template message generation. Only a
|
|
@@ -467,7 +480,7 @@ Each call answers with exactly one of six results:
|
|
|
467
480
|
`campaign_work_in_flight`, call
|
|
468
481
|
`wait_for_campaign_processing({ workspaceId, campaignId, requireIdle:true })`
|
|
469
482
|
for that exact selected campaign, then call `refill_v3_advance` again with
|
|
470
|
-
the identical scope. This result is a terminal, so the server already closed
|
|
483
|
+
the identical scope and campaignId. This result is a terminal, so the server already closed
|
|
471
484
|
the run; the advance after the wait opens a new run. A partial timeout is
|
|
472
485
|
followed by that fresh advance;
|
|
473
486
|
if the same campaign is still live, repeat the bounded wait. This is the
|
|
@@ -49,10 +49,39 @@
|
|
|
49
49
|
},
|
|
50
50
|
"tools": {
|
|
51
51
|
"advance": "refill_v3_advance",
|
|
52
|
+
"preview": "refill_v3_world_state",
|
|
53
|
+
"campaignResolution": "get_campaigns",
|
|
52
54
|
"campaignAttentionSubskill": "refill-sends-work-campaign",
|
|
53
55
|
"campaignAttentionAuthority": "refill_v3_continue",
|
|
54
56
|
"campaignProcessingWait": "wait_for_campaign_processing"
|
|
55
57
|
},
|
|
58
|
+
"namedCampaignPreview": {
|
|
59
|
+
"appliesWhen": "the operator names a campaign and yolo is withheld",
|
|
60
|
+
"resolve": {
|
|
61
|
+
"tool": "get_campaigns",
|
|
62
|
+
"bounded": true,
|
|
63
|
+
"requiredInputKeys": ["workspaceId", "limit"],
|
|
64
|
+
"match": "exactly one case-insensitive exact visible-name match",
|
|
65
|
+
"retain": "campaignId only",
|
|
66
|
+
"onMissingOrAmbiguous": "stop without preview, run, receipt, credit refresh, or product mutation"
|
|
67
|
+
},
|
|
68
|
+
"preview": {
|
|
69
|
+
"tool": "refill_v3_world_state",
|
|
70
|
+
"inputKeys": ["workspaceId", "scope", "campaignId"],
|
|
71
|
+
"requires": "the stable id returned by the bounded authorized resolution",
|
|
72
|
+
"render": "exact target and per-lane readiness plus observationSideEffects",
|
|
73
|
+
"paidCreditCache": "not_checked",
|
|
74
|
+
"productEffects": "all false"
|
|
75
|
+
},
|
|
76
|
+
"decision": {
|
|
77
|
+
"kind": "product_native",
|
|
78
|
+
"choices": ["Accept", "Decline"],
|
|
79
|
+
"accept": "call refill_v3_advance with the same workspaceId, scope, and campaignId",
|
|
80
|
+
"decline": "stop",
|
|
81
|
+
"forbiddenBeforeAccept": ["refill_v3_advance", "refill_v3_continue", "any product mutation"]
|
|
82
|
+
},
|
|
83
|
+
"continuity": "carry the same stable campaignId through every advance, continue, replay, partial wait, and post-wait repeat; never use display name or a sibling fallback"
|
|
84
|
+
},
|
|
56
85
|
"workspaceResolution": {
|
|
57
86
|
"appliesWhen": "always, BEFORE the first advance call",
|
|
58
87
|
"allowedTools": ["list_workspaces", "get_active_workspace"],
|
|
@@ -109,8 +138,8 @@
|
|
|
109
138
|
"loop": {
|
|
110
139
|
"call": {
|
|
111
140
|
"tool": "refill_v3_advance",
|
|
112
|
-
"inputKeys": ["workspaceId", "scope", "yolo"],
|
|
113
|
-
"note": "Pass workspaceId and scope with the values the host resolved once, plus yolo:true only when the autonomy step granted it. workspaceId is the EXACT id workspaceResolution produced, never a name and never an implicit config default when the operator named a workspace. The MCP transport owns run continuity. There is no token, mode, continuation, task receipt, retry counter, cursor, row, action, or receipt-fact input for the caller.",
|
|
141
|
+
"inputKeys": ["workspaceId", "scope", "campaignId", "yolo"],
|
|
142
|
+
"note": "Pass workspaceId and scope with the values the host resolved once, the stable campaignId on a targeted run, plus yolo:true only when the autonomy step granted it. workspaceId is the EXACT id workspaceResolution produced, never a name and never an implicit config default when the operator named a workspace. The MCP transport owns run continuity. There is no token, display-name selector, mode, continuation, task receipt, retry counter, cursor, row, action, or receipt-fact input for the caller.",
|
|
114
143
|
"requiredInputKeys": ["workspaceId", "scope"]
|
|
115
144
|
},
|
|
116
145
|
"repeatWhile": [
|
|
@@ -120,7 +149,7 @@
|
|
|
120
149
|
"awaiting_external_change:campaign_work_in_flight_after_wait"
|
|
121
150
|
],
|
|
122
151
|
"stopOn": ["awaiting_external_change:other", "complete", "blocked"],
|
|
123
|
-
"note": "Call advance again with the same workspaceId, scope, and autonomy grant. The MCP transport carries exact run continuity internally; every invocation still reconstructs from fresh world state plus server-loaded authority receipts.",
|
|
152
|
+
"note": "Call advance again with the same workspaceId, scope, optional stable campaignId, and autonomy grant. The MCP transport carries exact run continuity internally; every invocation still reconstructs from fresh world state plus server-loaded authority receipts.",
|
|
124
153
|
"repeatPolicy": {
|
|
125
154
|
"granted": "Call advance again immediately, without checking back.",
|
|
126
155
|
"withheld": "Surface the result, then ASK before the next call. The repeatWhile set is unchanged \u2014 only who decides to take the next step changes."
|
|
@@ -145,14 +174,14 @@
|
|
|
145
174
|
"campaign_attention_required": {
|
|
146
175
|
"alreadyExecuted": false,
|
|
147
176
|
"surface": ["packet.scope", "packet.evidence"],
|
|
148
|
-
"carryForward": "call refill_v3_continue with workspaceId, scope, and yolo only; MCP carries the exact token and packet internally",
|
|
177
|
+
"carryForward": "call refill_v3_continue with workspaceId, scope, campaignId when targeted, and yolo only; MCP carries the exact token and packet internally",
|
|
149
178
|
"route": {
|
|
150
179
|
"first": "call refill_v3_continue with no decision; it owns live-job waiting, exact actionable enrichment, and same-template generation from the fresh packet",
|
|
151
180
|
"modelBoundary": "only model_decision_required loads refill-sends-work-campaign",
|
|
152
181
|
"subskill": "refill-sends-work-campaign",
|
|
153
182
|
"pass": ["packet.scope", "packet.evidence"],
|
|
154
183
|
"returnThrough": "refill_v3_continue",
|
|
155
|
-
"returnInput": ["workspaceId", "scope", "decision", "yolo"]
|
|
184
|
+
"returnInput": ["workspaceId", "scope", "campaignId", "decision", "yolo"]
|
|
156
185
|
},
|
|
157
186
|
"settlement": {
|
|
158
187
|
"ownedBy": "refill_v3_continue",
|