conduyt 1.54.0 → 1.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +39 -0
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -2097,6 +2097,45 @@ webhooks
2097
2097
  Object.assign(body, jsonArg(opts.json, "--json"));
2098
2098
  return client.post("/api/v1/webhooks/manage", body);
2099
2099
  }));
2100
+ // ---- drip send barrier recovery (Smart Views slice A, Codex r70 m5) ----
2101
+ // A drip step whose provider outcome was unconfirmed is PARKED behind a barrier (a parked webhook log and/or the
2102
+ // processor's marker). An operator (admin/owner) cancels it here: cancel-only leaves the barrier standing (nothing is
2103
+ // sent); --skip assumes the step was delivered (the processor advances without sending); --resend sends the step AGAIN
2104
+ // (a possible duplicate SMS) and is refused without --acknowledge-duplicate-risk.
2105
+ const uuidArg = (raw, name) => {
2106
+ if (!/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(raw))
2107
+ throw new Error(`${name} must be a UUID`);
2108
+ return raw;
2109
+ };
2110
+ const barrierBody = (opts) => {
2111
+ if (opts.skip && opts.resend)
2112
+ throw new Error("pass --skip or --resend, not both");
2113
+ if (opts.resend && !opts.acknowledgeDuplicateRisk)
2114
+ throw new Error("--resend may deliver the step TWICE (its outcome was unconfirmed): pass --acknowledge-duplicate-risk, or --skip to advance without sending");
2115
+ const body = {};
2116
+ if (opts.skip)
2117
+ body.resolution = "skip";
2118
+ if (opts.resend) {
2119
+ body.resolution = "resend";
2120
+ body.confirm = "RESEND_UNCONFIRMED_DRIP";
2121
+ }
2122
+ return body;
2123
+ };
2124
+ webhooks
2125
+ .command("cancel-log <id>")
2126
+ .description("Cancel ONE parked / queued / failed webhook log of an unconfirmed drip send (POST /webhook-logs/{id}/cancel; admin/owner, webhooks scope). Cancel-only by default: the barrier stands")
2127
+ .option("--skip", "assume the step was delivered: the processor advances without sending")
2128
+ .option("--resend", "send the step again (duplicate risk: needs --acknowledge-duplicate-risk; refused 409 step_already_sent when the step already carries sent evidence: use --skip)")
2129
+ .option("--acknowledge-duplicate-risk", "you accept the step may be delivered twice")
2130
+ .action(run(async (client, id, opts) => client.post(`/api/v1/webhook-logs/${uuidArg(id, "id")}/cancel`, barrierBody(opts))));
2131
+ const dripEnrollments = program.command("drip-enrollments").description("Drip enrollment recovery");
2132
+ dripEnrollments
2133
+ .command("cancel-barrier <id>")
2134
+ .description("Cancel a drip enrollment's whole send barrier (POST /drip-enrollments/{id}/cancel-barrier; admin/owner, drip-enrollments scope) — every parked / queued / failed log, including a marker-only barrier with no log at all. Cancel-only by default: the barrier stands")
2135
+ .option("--skip", "assume the current step was delivered: the processor advances without sending")
2136
+ .option("--resend", "send the step again (duplicate risk: needs --acknowledge-duplicate-risk; refused 409 step_already_sent when the step already carries sent evidence: use --skip)")
2137
+ .option("--acknowledge-duplicate-risk", "you accept the step may be delivered twice")
2138
+ .action(run(async (client, id, opts) => client.post(`/api/v1/drip-enrollments/${uuidArg(id, "id")}/cancel-barrier`, barrierBody(opts))));
2100
2139
  // ---- dnc (Do Not Call) ----
2101
2140
  // NOTE: an AI agent's API key must be granted the `dnc` scope to manage the DNC
2102
2141
  // list. Reading also requires dialer:view; adding a litigator entry and removals
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "conduyt",
3
- "version": "1.54.0",
4
- "description": "Command-line interface for Conduyt CRM \u2014 manage contacts, deals, pipelines, and run insight queries from your terminal.",
3
+ "version": "1.55.0",
4
+ "description": "Command-line interface for Conduyt CRM — manage contacts, deals, pipelines, and run insight queries from your terminal.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "bin": {