@general-input/cli 0.12.0 → 0.13.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.
package/dist/cli.js CHANGED
@@ -2217,17 +2217,17 @@ var require_cipherModes = __commonJS({
2217
2217
  }
2218
2218
  };
2219
2219
  modes.gcm.prototype.tableMultiply = function(x) {
2220
- var z54 = [0, 0, 0, 0];
2220
+ var z52 = [0, 0, 0, 0];
2221
2221
  for (var i = 0; i < 32; ++i) {
2222
2222
  var idx = i / 8 | 0;
2223
2223
  var x_i = x[idx] >>> (7 - i % 8) * 4 & 15;
2224
2224
  var ah = this._m[i][x_i];
2225
- z54[0] ^= ah[0];
2226
- z54[1] ^= ah[1];
2227
- z54[2] ^= ah[2];
2228
- z54[3] ^= ah[3];
2225
+ z52[0] ^= ah[0];
2226
+ z52[1] ^= ah[1];
2227
+ z52[2] ^= ah[2];
2228
+ z52[3] ^= ah[3];
2229
2229
  }
2230
- return z54;
2230
+ return z52;
2231
2231
  };
2232
2232
  modes.gcm.prototype.ghash = function(h, y, x) {
2233
2233
  y[0] ^= x[0];
@@ -5972,26 +5972,26 @@ var require_jsbn = __commonJS({
5972
5972
  function bnpIsEven() {
5973
5973
  return (this.t > 0 ? this.data[0] & 1 : this.s) == 0;
5974
5974
  }
5975
- function bnpExp(e, z54) {
5975
+ function bnpExp(e, z52) {
5976
5976
  if (e > 4294967295 || e < 1) return BigInteger.ONE;
5977
- var r = nbi(), r2 = nbi(), g = z54.convert(this), i = nbits(e) - 1;
5977
+ var r = nbi(), r2 = nbi(), g = z52.convert(this), i = nbits(e) - 1;
5978
5978
  g.copyTo(r);
5979
5979
  while (--i >= 0) {
5980
- z54.sqrTo(r, r2);
5981
- if ((e & 1 << i) > 0) z54.mulTo(r2, g, r);
5980
+ z52.sqrTo(r, r2);
5981
+ if ((e & 1 << i) > 0) z52.mulTo(r2, g, r);
5982
5982
  else {
5983
5983
  var t = r;
5984
5984
  r = r2;
5985
5985
  r2 = t;
5986
5986
  }
5987
5987
  }
5988
- return z54.revert(r);
5988
+ return z52.revert(r);
5989
5989
  }
5990
5990
  function bnModPowInt(e, m) {
5991
- var z54;
5992
- if (e < 256 || m.isEven()) z54 = new Classic(m);
5993
- else z54 = new Montgomery(m);
5994
- return this.exp(e, z54);
5991
+ var z52;
5992
+ if (e < 256 || m.isEven()) z52 = new Classic(m);
5993
+ else z52 = new Montgomery(m);
5994
+ return this.exp(e, z52);
5995
5995
  }
5996
5996
  BigInteger.prototype.copyTo = bnpCopyTo;
5997
5997
  BigInteger.prototype.fromInt = bnpFromInt;
@@ -6049,13 +6049,13 @@ var require_jsbn = __commonJS({
6049
6049
  if (this.signum() == 0 || b < 2 || b > 36) return "0";
6050
6050
  var cs = this.chunkSize(b);
6051
6051
  var a = Math.pow(b, cs);
6052
- var d = nbv(a), y = nbi(), z54 = nbi(), r = "";
6053
- this.divRemTo(d, y, z54);
6052
+ var d = nbv(a), y = nbi(), z52 = nbi(), r = "";
6053
+ this.divRemTo(d, y, z52);
6054
6054
  while (y.signum() > 0) {
6055
- r = (a + z54.intValue()).toString(b).substr(1) + r;
6056
- y.divRemTo(d, y, z54);
6055
+ r = (a + z52.intValue()).toString(b).substr(1) + r;
6056
+ y.divRemTo(d, y, z52);
6057
6057
  }
6058
- return z54.intValue().toString(b) + r;
6058
+ return z52.intValue().toString(b) + r;
6059
6059
  }
6060
6060
  function bnpFromRadix(s, b) {
6061
6061
  this.fromInt(0);
@@ -6428,7 +6428,7 @@ var require_jsbn = __commonJS({
6428
6428
  Barrett.prototype.mulTo = barrettMulTo;
6429
6429
  Barrett.prototype.sqrTo = barrettSqrTo;
6430
6430
  function bnModPow(e, m) {
6431
- var i = e.bitLength(), k, r = nbv(1), z54;
6431
+ var i = e.bitLength(), k, r = nbv(1), z52;
6432
6432
  if (i <= 0) return r;
6433
6433
  else if (i < 18) k = 1;
6434
6434
  else if (i < 48) k = 3;
@@ -6436,19 +6436,19 @@ var require_jsbn = __commonJS({
6436
6436
  else if (i < 768) k = 5;
6437
6437
  else k = 6;
6438
6438
  if (i < 8)
6439
- z54 = new Classic(m);
6439
+ z52 = new Classic(m);
6440
6440
  else if (m.isEven())
6441
- z54 = new Barrett(m);
6441
+ z52 = new Barrett(m);
6442
6442
  else
6443
- z54 = new Montgomery(m);
6443
+ z52 = new Montgomery(m);
6444
6444
  var g = new Array(), n = 3, k1 = k - 1, km = (1 << k) - 1;
6445
- g[1] = z54.convert(this);
6445
+ g[1] = z52.convert(this);
6446
6446
  if (k > 1) {
6447
6447
  var g2 = nbi();
6448
- z54.sqrTo(g[1], g2);
6448
+ z52.sqrTo(g[1], g2);
6449
6449
  while (n <= km) {
6450
6450
  g[n] = nbi();
6451
- z54.mulTo(g2, g[n - 2], g[n]);
6451
+ z52.mulTo(g2, g[n - 2], g[n]);
6452
6452
  n += 2;
6453
6453
  }
6454
6454
  }
@@ -6474,20 +6474,20 @@ var require_jsbn = __commonJS({
6474
6474
  is1 = false;
6475
6475
  } else {
6476
6476
  while (n > 1) {
6477
- z54.sqrTo(r, r2);
6478
- z54.sqrTo(r2, r);
6477
+ z52.sqrTo(r, r2);
6478
+ z52.sqrTo(r2, r);
6479
6479
  n -= 2;
6480
6480
  }
6481
- if (n > 0) z54.sqrTo(r, r2);
6481
+ if (n > 0) z52.sqrTo(r, r2);
6482
6482
  else {
6483
6483
  t = r;
6484
6484
  r = r2;
6485
6485
  r2 = t;
6486
6486
  }
6487
- z54.mulTo(r2, g[w], r);
6487
+ z52.mulTo(r2, g[w], r);
6488
6488
  }
6489
6489
  while (j >= 0 && (e.data[j] & 1 << i) == 0) {
6490
- z54.sqrTo(r, r2);
6490
+ z52.sqrTo(r, r2);
6491
6491
  t = r;
6492
6492
  r = r2;
6493
6493
  r2 = t;
@@ -6497,7 +6497,7 @@ var require_jsbn = __commonJS({
6497
6497
  }
6498
6498
  }
6499
6499
  }
6500
- return z54.revert(r);
6500
+ return z52.revert(r);
6501
6501
  }
6502
6502
  function bnGCD(a) {
6503
6503
  var x = this.s < 0 ? this.negate() : this.clone();
@@ -18288,7 +18288,7 @@ import chalk4 from "chalk";
18288
18288
  // package.json
18289
18289
  var package_default = {
18290
18290
  name: "@general-input/cli",
18291
- version: "0.12.0",
18291
+ version: "0.13.0",
18292
18292
  type: "module",
18293
18293
  description: "The agent-facing CLI for General Input. Authenticate, manage workflows, run bash with operator credentials injected by the cloud.",
18294
18294
  license: "SEE LICENSE IN LICENSE",
@@ -18317,7 +18317,7 @@ var package_default = {
18317
18317
  ],
18318
18318
  scripts: {
18319
18319
  dev: "tsup --watch",
18320
- build: "tsup",
18320
+ build: "tsc --noEmit && tsup",
18321
18321
  clean: "rm -rf dist",
18322
18322
  typecheck: "tsc --noEmit",
18323
18323
  lint: "eslint . --max-warnings 0",
@@ -19481,7 +19481,7 @@ var CrmService = class {
19481
19481
  async deleteCompanies(ids) {
19482
19482
  return (await this.crm()).deleteCompanies(ids);
19483
19483
  }
19484
- // ── Sequences (reads + draft CRUD; queueing is dashboard-only) ─────
19484
+ // ── Sequences (reads + draft CRUD; syncing is dashboard-only) ──────
19485
19485
  async listSequences(args) {
19486
19486
  return (await this.crm()).listSequences(args);
19487
19487
  }
@@ -19500,12 +19500,33 @@ var CrmService = class {
19500
19500
  async deleteSequence(id) {
19501
19501
  await (await this.crm()).deleteSequence(id);
19502
19502
  }
19503
- // ── Skills (read-only) ─────────────────────────────────────────────
19504
- async listSkills() {
19505
- return (await this.crm()).listSkills();
19503
+ // ── Campaigns (CRUD + membership; syncing is dashboard-only) ────────
19504
+ async listCampaigns(query) {
19505
+ return (await this.crm()).listCampaigns(query);
19506
19506
  }
19507
- async getSkill(id) {
19508
- return (await this.crm()).getSkill(id);
19507
+ async getCampaign(id) {
19508
+ return (await this.crm()).getCampaign(id);
19509
+ }
19510
+ async createCampaign(body) {
19511
+ return (await this.crm()).createCampaign(body);
19512
+ }
19513
+ async updateCampaign(id, body) {
19514
+ return (await this.crm()).updateCampaign(id, body);
19515
+ }
19516
+ async deleteCampaign(id) {
19517
+ await (await this.crm()).deleteCampaign(id);
19518
+ }
19519
+ async listCampaignMembers(campaignId, query) {
19520
+ return (await this.crm()).listCampaignMembers(campaignId, query);
19521
+ }
19522
+ async addCampaignPeople(campaignId, personIds) {
19523
+ return (await this.crm()).addCampaignPeople(campaignId, personIds);
19524
+ }
19525
+ async removeCampaignPeople(campaignId, personIds) {
19526
+ return (await this.crm()).removeCampaignPeople(campaignId, personIds);
19527
+ }
19528
+ async listPersonCampaigns(personId) {
19529
+ return (await this.crm()).listPersonCampaigns(personId);
19509
19530
  }
19510
19531
  // ── Employments / contact points ───────────────────────────────────
19511
19532
  async addEmployment(personId, body) {
@@ -20168,12 +20189,12 @@ var CrmApiClient = class {
20168
20189
  body: { ids }
20169
20190
  });
20170
20191
  }
20171
- // ── Sequences (reads + draft CRUD — queueing is dashboard-only) ─────
20192
+ // ── Sequences (reads + draft CRUD — syncing is dashboard-only) ──────
20172
20193
  async listSequences(args) {
20173
20194
  this.http.requireAuthed();
20174
20195
  const params = new URLSearchParams();
20175
- if (args.status) params.set("status", args.status);
20176
20196
  if (args.query) params.set("q", args.query);
20197
+ if (args.campaignId) params.set("campaignId", args.campaignId);
20177
20198
  const queryString = params.toString();
20178
20199
  return this.http.fetch(
20179
20200
  `${CRM}/sequences${queryString ? `?${queryString}` : ""}`
@@ -20207,14 +20228,55 @@ var CrmApiClient = class {
20207
20228
  method: "DELETE"
20208
20229
  });
20209
20230
  }
20210
- // ── Skills (read-only) ─────────────────────────────────────────────
20211
- async listSkills() {
20231
+ // ── Campaigns (CRUD + membership — syncing is dashboard-only) ───────
20232
+ async listCampaigns(query) {
20233
+ this.http.requireAuthed();
20234
+ return this.http.fetch(`${CRM}/campaigns${query ? `?q=${enc(query)}` : ""}`);
20235
+ }
20236
+ async getCampaign(campaignId) {
20212
20237
  this.http.requireAuthed();
20213
- return this.http.fetch(`${CRM}/skills`);
20238
+ return this.http.fetch(`${CRM}/campaigns/${enc(campaignId)}`);
20214
20239
  }
20215
- async getSkill(skillId) {
20240
+ async createCampaign(body) {
20216
20241
  this.http.requireAuthed();
20217
- return this.http.fetch(`${CRM}/skills/${enc(skillId)}`);
20242
+ return this.http.fetch(`${CRM}/campaigns`, { method: "POST", body });
20243
+ }
20244
+ async updateCampaign(campaignId, body) {
20245
+ this.http.requireAuthed();
20246
+ return this.http.fetch(`${CRM}/campaigns/${enc(campaignId)}`, {
20247
+ method: "PUT",
20248
+ body
20249
+ });
20250
+ }
20251
+ async deleteCampaign(campaignId) {
20252
+ this.http.requireAuthed();
20253
+ await this.http.fetch(`${CRM}/campaigns/${enc(campaignId)}`, {
20254
+ method: "DELETE"
20255
+ });
20256
+ }
20257
+ async listCampaignMembers(campaignId, query) {
20258
+ this.http.requireAuthed();
20259
+ return this.http.fetch(
20260
+ `${CRM}/campaigns/${enc(campaignId)}/members${query ? `?q=${enc(query)}` : ""}`
20261
+ );
20262
+ }
20263
+ async addCampaignPeople(campaignId, personIds) {
20264
+ this.http.requireAuthed();
20265
+ return this.http.fetch(`${CRM}/campaigns/${enc(campaignId)}/people`, {
20266
+ method: "POST",
20267
+ body: { personIds }
20268
+ });
20269
+ }
20270
+ async removeCampaignPeople(campaignId, personIds) {
20271
+ this.http.requireAuthed();
20272
+ return this.http.fetch(
20273
+ `${CRM}/campaigns/${enc(campaignId)}/people/remove`,
20274
+ { method: "POST", body: { personIds } }
20275
+ );
20276
+ }
20277
+ async listPersonCampaigns(personId) {
20278
+ this.http.requireAuthed();
20279
+ return this.http.fetch(`${CRM}/campaigns/people/${enc(personId)}`);
20218
20280
  }
20219
20281
  // ── Employments (person sub-records) ───────────────────────────────
20220
20282
  async addEmployment(personId, body) {
@@ -23906,7 +23968,7 @@ import {
23906
23968
  var geni_default = "---\nname: geni\ndescription: Use the operator's connected services (Slack, Gmail, GitHub, Stripe, anything they've authorized in General Input) to fulfill their request, or build them a saved workflow (scheduled or event-driven automation). Load this whenever the user wants you to take an action on their behalf against an external SaaS account, fetch data from one of their tools, wire something up that crosses service boundaries, or set up a recurring/triggered automation.\n---\n\n# geni\n\n`geni` is a CLI that gives you credentialed access to the operator's\nconnected accounts. The cloud injects their tokens into a fresh bash\nsubprocess as env vars; you write the `curl`, you never see the\nsecret. Run `geni --help` for the full command surface.\n\n## How to talk about geni\n\nTreat geni as a teammate \u2014 the integration specialist who picks the\nright operation and runs the credentialed call. You're the one\nsynthesizing and replying.\n\nIn summaries of multi-step work, credit geni naturally: \"Geni pulled\nthe last 30 days of charges from Stripe; I rolled them into the report\nbelow.\" Skip the credit on trivial single calls; don't manufacture\nteam language (\"with geni's help\u2026\") to fill space. Lowercase `geni`\nin commands; capitalize \"Geni\" when personifying.\n\n## Request flow\n\nDiscovery first. Don't guess URLs, params, or env var names \u2014 the\noperation docs have them.\n\n1. `geni credential list [--service <slug>]` \u2014 find a connected\n credential id. If nothing's connected for the service, run\n `geni integration list -q \"<keyword>\"` to confirm the slug, then\n `geni credential connect <service>` (see \"Connecting a missing\n credential\" below).\n2. `geni integration operations <service> [-q \"<keyword>\"]` \u2014 find\n the operation you need.\n3. `geni integration operation <id> --format markdown` \u2014 read the\n HTTP shape, params, and **exact env var names** this call will set.\n4. `geni exec bash --cred <cred_id> --reason \"<what + why>\" -- '<curl>'`\n\n## Connecting a missing credential\n\n`geni credential connect <service>` opens the integration's\ndashboard page in the operator's browser. Tell the operator to\nfinish the connection there and come back \u2014 then re-run `geni\ncredential list --service <service>` to pick up the new id. Don't\npoll, don't loop. In non-interactive shells, add `--print-url` so\nthe URL prints to stdout instead.\n\n## Env vars\n\nRead the names off the operation docs; never derive them. Two flavors\nemitted per credential:\n\n- **Suffixed**: `<SERVICE>_<FIELD>_<id>` (e.g. `$SLACK_BOT_TOKEN_ABC`,\n `$SALESFORCE_INSTANCE_URL_KG`). The `<id>` is the credential id with\n `cred_` stripped, uppercased. Use these when fanning out across\n multiple credentials of the same service in one call.\n- **Canonical aliases**: well-known SDK names (`$GH_TOKEN`,\n `$SLACK_BOT_TOKEN`, `$OPENAI_API_KEY`, `$STRIPE_API_KEY`, \u2026) for\n tools that hardcode them.\n\nPlus `$PLATFORM_API_KEY` and `$PLATFORM_BASE_URL` on every exec \u2014 use\nthem to call General Input's first-party services (web search, image\ngen, weather, send-email) without `--cred`.\n\n## --reason is per-call\n\nEvery `geni exec bash --cred ...` requires `--reason`. It lands in\nthe operator's audit log and is shown to them. Be specific\n(\"Posting daily digest to #engineering\"), not generic (\"Slack call\").\nRe-state it on every call \u2014 the log is per-call, not per-session.\n\n## Output is scrubbed\n\nstdout and stderr pass through a streaming scrubber that replaces\nevery registered secret with `[REDACTED:credential_<id>]`. Don't try\nto exfiltrate via `echo $TOKEN | base64`; common encodings are\ncaught too. You don't need to see the secret to use it \u2014 the\nsubprocess can.\n\n## Building resources (workflows, apps, and skills)\n\n`geni exec bash` is for one-off actions. When the user wants something\nsaved and reusable, build a **resource**. A resource is one of four\ntypes: a `code` **workflow** (deterministic, fixed steps, runs on a\nschedule or trigger), an `agent` **workflow** (LLM-driven, variable-length\ntasks like research or triage), an `app` (an interactive React mini-app\nwith server-side handlers, like a dashboard or internal tool), or a\n`skill` (a SKILL.md instruction bundle the platform's cloud agents load\nas context \u2014 not executed). The shared lifecycle lives under `geni\nresource`; type-specific tools under `geni workflow` and `geni app`.\n\nYou author the files locally with your own editor; the cloud validates,\nconfigures, publishes, and runs them. This is the same build loop as the\ngeni chat, just on the user's machine with your brain driving it. Same\nloop for every type; apps add a build step and handler tools (see\n\"Building apps\" below), skills drop the config step (see \"Building\nskills\" below).\n\n**Read the spec first.** `geni resource spec <code|agent|app|skill>`\nprints the full contract: required files, the runtime API, allowed and\nforbidden patterns. Don't write a single file before reading it.\n\nThe loop:\n\n1. `geni resource create --type code --name \"Daily Digest\"`: creates the\n resource in the cloud and scaffolds its files into the current\n directory, with a `.geni-resource.json` marker so later commands here\n resolve the id automatically.\n2. Edit the files (`workflow.json`, `main.ts`, `package.json`) with your\n normal Read/Write/Edit tools. **Don't run `npm install`, `tsc`, or\n `bun` locally**: `@general-input/core` only resolves server-side, so\n a local compile always fails on the missing module. That's not a real\n error.\n3. `geni resource validate`: server-side spec + wiring + TypeScript\n check. Exit 9 means invalid; fix what it reports and re-run. A green\n validate is the compile gate.\n4. `geni resource config set`: wire what the workflow needs. Find\n credential ids with `geni credential list`; set them with\n `--cred <service>=<credentialId>`. Set consts with `--const k=v`,\n schedules with `--schedule <triggerId>=<cron>`. `geni resource config\nget` shows the current state. Find trigger providers with\n `geni trigger list`.\n5. `geni resource publish --summary \"<one plain sentence>\"`: promote\n your local files to the live version. Required before a test reflects\n your latest edits.\n6. `geni workflow test --payload '{...}'`: run a real cloud test\n execution and wait for the result, output, and logs. Iterate from\n step 2 until it does what the user asked.\n\nWhen a run misbehaves, `geni workflow execution <id> --download` writes\nits full trace to `executions/<id>/` (run.json, logs.txt, input.json, and\nthread.json). For an agent workflow, read `thread.json` to see every step\nthe agent took. Use `--thread` or `--input` to print those inline instead.\n\nUse the same discovery tools as exec: `geni integration operations\n<service>` and `geni integration operation <id>` to learn an API's shape\nbefore you write the `fetch` call in `main.ts`.\n\nFor a poll-triggered workflow, `geni workflow trigger-sample` returns\nlive sample records so you see the exact shape `input` receives before\nwriting `main.ts` (wire the trigger's credential and inputs with\n`config set` first). To test a file-type input, `geni workflow\nstage-input <file>` uploads a local file and prints a `store://` URI to\npass as that field's value in `--payload`.\n\n## Building apps\n\nAn `app` workflow is a React SPA (rendered in the dashboard's iframe)\nthat calls server-side handlers. Create it with `geni resource create\n--type app`; read the contract with `geni resource spec app`. The shared\ncommands work the same (validate, config set for credential slots,\npublish), with these differences:\n\n- The scaffold is a whole Vite project. Edit only `app.json`, `src/App.tsx`,\n `src/pages/*`, your own `src/components/*`, and `handlers/*.ts`. Leave\n the platform-owned files alone.\n- `geni resource publish` builds the app; the result's `build` reports\n whether the Vite build passed. You can't preview the UI from the CLI,\n so drive correctness through handlers and the build.\n- `geni app run-handler <name> --input '{...}'` runs a handler\n against the live app (publish first). `geni app invocations`\n shows recent handler runs, `geni app errors` shows browser\n errors the iframe reported, `geni app build-status` shows the\n build, and `geni app clear-cache` flushes the handler cache.\n\nThe loop: create --type app -> edit handlers + pages -> validate ->\nconfig set (wire credential slots) -> publish (builds) -> app run-handler\nto verify -> tell the user to open it in their dashboard.\n\n## Building skills\n\nA `skill` is a SKILL.md bundle (frontmatter `name` slug + `description`,\nthen the instructions body; optional `scripts/`, `references/`,\n`assets/`) that the platform's cloud agents load as context. It is not\nexecuted, so the loop is shorter: create --type skill -> edit SKILL.md ->\nvalidate -> publish. No `config set` (nothing to wire) and publish needs\nno `--summary`. The frontmatter `description` is the only thing agents\nsee before deciding to load it, so it must say what the skill does AND\nwhen to use it. Skill ids are `skl_`-prefixed; pull/validate/publish\nwork on them like any resource.\n\nA skill is never run and has no triggers. Once published, tell the user\nit's in their dashboard Skills page, ready for their agents to load into\nfuture work. Commands accept the skill id as a positional or infer it\nfrom the marker in the current directory.\n\n## Exit codes worth knowing\n\n- `0` \u2014 success; `1\u2013125` \u2014 subprocess's own exit (curl, jq, etc.)\n- `4` \u2014 resource not found (bad cred id, slug, operation id)\n- `77` \u2014 server refused to resolve a credential. Don't retry; surface\n to the operator.\n- `78` \u2014 session expired. Tell the operator to run `geni login`.\n\n## Don't\n\n- Don't construct a curl without reading the operation docs first.\n Guessing at URLs and env var names is the most common failure mode.\n- Don't hand-write workflow files before reading `geni resource spec\n<type>`. Don't try to compile or `npm install` them locally; let\n `geni resource validate` be the gate.\n- Use `--json` on list/get commands when you're going to parse the\n output. Table output is for humans.\n";
23907
23969
 
23908
23970
  // src/skills/geni-crm.md
23909
- var geni_crm_default = '---\nname: geni-crm\ndescription: Read and write the operator\'s General Input CRM from the command line. Load this whenever the user wants you to look something up in their CRM, pull a list of people or companies, check a deal pipeline, find or verify someone\'s email or phone (enrichment), draft or review email sequences, OR change CRM data (create or update people/companies, manage lists and tags, add notes, create and resolve tasks, move deals through stages, log touchpoints). Full read/write access to people, companies, pipelines, deals, lists, tags, notes, tasks, enrichment, sequence drafts, and the workspace\'s skill playbooks.\n---\n\n# geni crm\n\n`geni crm` reads and writes the operator\'s General Input CRM: the lead database\n(people and companies), deal pipelines and their cards, lists, tags, notes,\ntasks, touchpoints, and custom fields. It is part of the same `geni` CLI, so it\nuses the same session and active workspace. The workspace must have CRM access,\nor these commands return a 403. Run `geni crm --help` for the full surface, and\n`geni crm <noun> --help` for a noun\'s verbs.\n\nThe shape is `geni crm <noun> <verb>`. Each noun is a group: `people`,\n`companies`, `lists`, `tags`, `notes`, `tasks`, `pipelines`, `stages`, `cards`,\n`touchpoints`, `fields`, `employments`, `contact-points`, `sequences`,\n`skills`, `waterfalls`, `enrich`, plus a top-level `search`.\n\n## Finding things, then acting on them\n\nThe same two-step flow as the rest of geni: find an id, then read or write it.\n\n1. Find by name with one query across everything:\n `geni crm search "<text>" [--type person|company|list|pipeline|card]`. Or\n list one kind: `geni crm people "<text>"`, `geni crm companies "<text>"`,\n `geni crm pipelines`, `geni crm lists`, `geni crm tags`, `geni crm tasks`.\n `people` and `companies` also take `--filter`, a JSON array of column\n conditions, e.g. `--filter \'[{"field":"seniority","operator":"any_of","values":["vp"]},{"field":"icpScore","operator":"gte","value":70}]\'` \u2014\n see `--help` for the field and operator lists (custom fields filter as\n `custom.<key>`).\n2. Read one record: `geni crm people get <id>`, `geni crm companies get <id>`,\n `geni crm cards get <id>`, `geni crm pipelines get <id>` (add `--board` for\n its cards), `geni crm tasks get <id>`.\n\n## Writing\n\nCreates and updates take the record body as `--json`; the server validates it,\nso a 400 means the body was wrong (read the error and fix the JSON). Run\n`geni crm <noun> <verb> --help` to see the expected fields.\n\n- **Create / update records** (JSON body):\n - `geni crm people create --json \'[{"fullName":"Ada Lovelace","companyName":"Acme","email":"ada@acme.com"}]\'` (batch, find-or-create, deduped). `companies create` mirrors it. A `"created": false` result matched an existing record by identity key (email/LinkedIn; domain for companies) \u2014 the CLI warns on stderr when the matched name differs, e.g. a shared inbox collapsing distinct people.\n - `geni crm people update --json \'[{"id":"<id>","title":"VP Eng","linkedinUrl":"https://\u2026"}]\'` (batch, ids inline). `companies update` mirrors it. Writes take the create field names (`title`, `linkedinUrl`), not the read names you see on `get` (`currentTitle`, `primaryLinkedinUrl`); unknown keys are rejected with a 400 naming them.\n - `geni crm lists create --json \'{"name":"Q3 ICP","type":"company"}\'`, `geni crm tags create --json \'{"name":"Customer","entityType":"company"}\'`, `geni crm tasks create --json \'{"title":"Follow up","entity":{"type":"person","id":"<id>"}}\'`, `geni crm cards create <pipelineId> --json \'{"title":"Acme renewal","amount":50000}\'`.\n- **Notes** take the text directly: `geni crm notes create person <id> --body "Met at the conference"`.\n- **State-change verbs** (no JSON, just flags/ids):\n - Lists/tags: `geni crm lists add <listId> <entityIds...>`, `geni crm tags assign <tagId> <entityIds...>` (and `remove` / `unassign`).\n - Tasks: `geni crm tasks done <id>` (also `dismiss`, `reopen`, `delete`).\n - Cards: `geni crm cards move <id> --stage <stageId>`, `geni crm cards status <id> --status won|lost|open [--reason "..."]`, `geni crm cards archive <id>`, `geni crm cards add-contact <cardId> <personId>`.\n- **Deals/touchpoints**: `geni crm touchpoints log <cardId> --json \'{"channel":"call","occurredAt":"2026-07-01T15:00:00Z","summary":"Pricing call"}\'`.\n- **Delete** is `<noun> delete <id...>` (people/companies/lists take multiple ids; most others take one).\n\nCard edits, moves, and status changes use optimistic concurrency. Pass\n`--expected-updated-at <ts>` to enforce it; omit it and the CLI reads the card\'s\ncurrent version first (last-write-wins), which is usually what you want from a\nscript. With the token, a stale card fails with an HTTP 409 conflict; re-read\nthe card and retry.\n\n## Output\n\nList commands print a table; pass `--json` to parse. `get` commands and all\nwrites print the affected record as JSON (state-change verbs print a short\nconfirmation). The single-record `get` commands take `--field <path>` to pull\none value, e.g. `geni crm cards get <id> --field status`.\n\nJSON shapes vary by verb: searches print `{"results": [...]}` (people/companies\nadd `nextCursor`), `people get` prints `{person, company, contactPoints, ...}`,\nand bare noun lists wrap in a named key (e.g. `{"lists": [...]}`) \u2014 check before\npiping into a parser.\n\n## Enrichment\n\nFind and verify contact info for people through the workspace\'s configured\nprovider waterfalls. This is **paid** (it spends credits per provider call), so\nevery verb requires `--yes` and a run is capped at 25 people. Only enrich when\nthe operator has asked you to. Found emails and numbers save onto the person\'s\ncontact points automatically.\n\n- See what\'s wired first: `geni crm waterfalls` lists the provider chain for each\n capability (email-enrichment, email-validation, phone-enrichment). An empty\n chain finds nothing and spends nothing.\n- `geni crm enrich emails <personIds...> --yes` finds work emails;\n `geni crm enrich phones <personIds...> --yes` finds mobile numbers (both take\n `--retry-unverified`).\n- `geni crm enrich validate <personIds...> --yes` checks deliverability \u2014 run it\n before sequencing so you don\'t send to a bad address.\n\n## Workspace skills (read these before doing the job yourself)\n\n`geni crm skills` lists the workspace\'s skill playbooks \u2014 the canned prompts\nthe in-app agent runs for jobs like enriching a record, drafting a sequence, or\nbuilding a list. `geni crm skills get <id>` prints one; the org\'s customized\nvariant is returned when it exists, so it reflects how _this_ workspace wants\nthe job done. Before doing one of those jobs from the CLI (e.g. drafting a\nsequence, filling in a person, compiling a list), fetch the matching skill and\nfollow its instructions \u2014 tone, structure, and rules included.\n\n## Sequences (drafts only \u2014 the dashboard sends)\n\nPer-person email sequences. The CLI reads all of them and creates, edits, and\ndeletes **drafts**; it can never queue, unqueue, or send \u2014 the server refuses,\nby design. When a draft is ready, tell the operator to review and queue it from\nthe person\'s page in the dashboard.\n\n- `geni crm sequences [--person <id>] [--status draft|queued|sending|completed|stopped|replied]` lists; `get <id>` shows the steps.\n- Draft: `geni crm sequences create --person <id> --json \'{"steps":[{"subject":"\u2026","body":"\u2026","waitDays":0},{"body":"\u2026","waitDays":3}]}\'`. The first step carries the subject; follow-ups reply in-thread after `waitDays` with no reply.\n- `geni crm sequences update <id> --json \'\u2026\'` replaces a draft wholesale; `delete <id>` removes a draft.\n- Before drafting, read the workspace\'s playbook: `geni crm skills get draft-sequence-person`. Consider `geni crm enrich validate` on the recipient first so the operator isn\'t queueing mail to a dead address.\n\n## Composing with the rest of geni\n\nThe CRM is the source of who and what; connected credentials are how you act on\nthe outside world. To add contact info, prefer `geni crm enrich` (it runs the\nworkspace\'s provider waterfalls and saves results). For anything else, pull\npeople or a company from the CRM, reach a service through `geni exec bash` (send\nan email, update an external system), and write the result back to the CRM (a\nnote, a task, a touchpoint, a moved card). Credit each tool naturally in your\nsummary.\n\n## Exit codes worth knowing\n\n- `0` success.\n- `4` not found (bad id, or it is not in the active workspace).\n- `5` forbidden (the workspace lacks CRM access, or the record is out of scope).\n- `9` stale write (a card changed since you read it; re-read and retry, or pass `--expected-updated-at`).\n- `78` session expired. Tell the operator to run `geni login`.\n';
23971
+ var geni_crm_default = '---\nname: geni-crm\ndescription: Read and write the operator\'s General Input CRM from the command line. Load this whenever the user wants you to look something up in their CRM, pull a list of people or companies, check a deal pipeline, find or verify someone\'s email or phone (enrichment), work outbound campaigns and their sequence drafts, OR change CRM data (create or update people/companies, manage lists and tags, add notes, create and resolve tasks, move deals through stages, log touchpoints). Full read/write access to people, companies, pipelines, deals, lists, tags, notes, tasks, enrichment, campaigns, and sequence drafts.\n---\n\n# geni crm\n\n`geni crm` reads and writes the operator\'s General Input CRM: the lead database\n(people and companies), deal pipelines and their cards, lists, tags, notes,\ntasks, touchpoints, custom fields, and outbound campaigns with their sequence\ndrafts. It is part of the same `geni` CLI, so it\nuses the same session and active workspace. The workspace must have CRM access,\nor these commands return a 403. Run `geni crm --help` for the full surface, and\n`geni crm <noun> --help` for a noun\'s verbs.\n\nThe shape is `geni crm <noun> <verb>`. Each noun is a group: `people`,\n`companies`, `lists`, `tags`, `notes`, `tasks`, `pipelines`, `stages`, `cards`,\n`touchpoints`, `fields`, `employments`, `contact-points`, `campaigns`,\n`sequences`, `waterfalls`, `enrich`, plus a top-level `search`.\n\n## Finding things, then acting on them\n\nThe same two-step flow as the rest of geni: find an id, then read or write it.\n\n1. Find by name with one query across everything:\n `geni crm search "<text>" [--type person|company|list|pipeline|card]`. Or\n list one kind: `geni crm people "<text>"`, `geni crm companies "<text>"`,\n `geni crm pipelines`, `geni crm lists`, `geni crm tags`, `geni crm tasks`.\n `people` and `companies` also take `--filter`, a JSON array of column\n conditions, e.g. `--filter \'[{"field":"seniority","operator":"any_of","values":["vp"]},{"field":"icpScore","operator":"gte","value":70}]\'` \u2014\n see `--help` for the field and operator lists (custom fields filter as\n `custom.<key>`).\n2. Read one record: `geni crm people get <id>`, `geni crm companies get <id>`,\n `geni crm cards get <id>`, `geni crm pipelines get <id>` (add `--board` for\n its cards), `geni crm tasks get <id>`.\n\n## Writing\n\nCreates and updates take the record body as `--json`; the server validates it,\nso a 400 means the body was wrong (read the error and fix the JSON). Run\n`geni crm <noun> <verb> --help` to see the expected fields.\n\n- **Create / update records** (JSON body):\n - `geni crm people create --json \'[{"fullName":"Ada Lovelace","companyName":"Acme","email":"ada@acme.com"}]\'` (batch, find-or-create, deduped). `companies create` mirrors it. A `"created": false` result matched an existing record by identity key (email/LinkedIn; domain for companies) \u2014 the CLI warns on stderr when the matched name differs, e.g. a shared inbox collapsing distinct people.\n - `geni crm people update --json \'[{"id":"<id>","title":"VP Eng","linkedinUrl":"https://\u2026"}]\'` (batch, ids inline). `companies update` mirrors it. Writes take the create field names (`title`, `linkedinUrl`), not the read names you see on `get` (`currentTitle`, `primaryLinkedinUrl`); unknown keys are rejected with a 400 naming them.\n - `geni crm lists create --json \'{"name":"Q3 ICP","type":"company"}\'`, `geni crm tags create --json \'{"name":"Customer","entityType":"company"}\'`, `geni crm tasks create --json \'{"title":"Follow up","entity":{"type":"person","id":"<id>"}}\'`, `geni crm cards create <pipelineId> --json \'{"title":"Acme renewal","amount":50000}\'`.\n- **Notes** take the text directly: `geni crm notes create person <id> --body "Met at the conference"`.\n- **State-change verbs** (no JSON, just flags/ids):\n - Lists/tags: `geni crm lists add <listId> <entityIds...>`, `geni crm tags assign <tagId> <entityIds...>` (and `remove` / `unassign`).\n - Tasks: `geni crm tasks done <id>` (also `dismiss`, `reopen`, `delete`).\n - Cards: `geni crm cards move <id> --stage <stageId>`, `geni crm cards status <id> --status won|lost|open [--reason "..."]`, `geni crm cards archive <id>`, `geni crm cards add-contact <cardId> <personId>`.\n- **Deals/touchpoints**: `geni crm touchpoints log <cardId> --json \'{"channel":"call","occurredAt":"2026-07-01T15:00:00Z","summary":"Pricing call"}\'`.\n- **Delete** is `<noun> delete <id...>` (people/companies/lists take multiple ids; most others take one).\n\nCard edits, moves, and status changes use optimistic concurrency. Pass\n`--expected-updated-at <ts>` to enforce it; omit it and the CLI reads the card\'s\ncurrent version first (last-write-wins), which is usually what you want from a\nscript. With the token, a stale card fails with an HTTP 409 conflict; re-read\nthe card and retry.\n\n## Output\n\nList commands print a table; pass `--json` to parse. `get` commands and all\nwrites print the affected record as JSON (state-change verbs print a short\nconfirmation). The single-record `get` commands take `--field <path>` to pull\none value, e.g. `geni crm cards get <id> --field status`.\n\nJSON shapes vary by verb: searches print `{"results": [...]}` (people/companies\nadd `nextCursor`), `people get` prints `{person, company, contactPoints, ...}`,\nand bare noun lists wrap in a named key (e.g. `{"lists": [...]}`) \u2014 check before\npiping into a parser.\n\n## Enrichment\n\nFind and verify contact info for people through the workspace\'s configured\nprovider waterfalls. This is **paid** (it spends credits per provider call), so\nevery verb requires `--yes` and a run is capped at 25 people. Only enrich when\nthe operator has asked you to. Found emails and numbers save onto the person\'s\ncontact points automatically.\n\n- See what\'s wired first: `geni crm waterfalls` lists the provider chain for each\n capability (email-enrichment, email-validation, phone-enrichment). An empty\n chain finds nothing and spends nothing.\n- `geni crm enrich emails <personIds...> --yes` finds work emails;\n `geni crm enrich phones <personIds...> --yes` finds mobile numbers (both take\n `--retry-unverified`).\n- `geni crm enrich validate <personIds...> --yes` checks deliverability \u2014 run it\n before sequencing so you don\'t send to a bad address.\n\n## Campaigns and sequences (draft here \u2014 the dashboard delivers)\n\nOutbound is prep + export: campaigns group people under one purpose, each\nmember gets a fully personalized per-person sequence **draft**, and the\noperator syncs the campaign to an external sequencer (Instantly, Smartlead,\nCSV) from the dashboard. There is no sending from General Input, and the CLI\ncannot sync \u2014 by design. When drafts are ready, tell the operator to review\nand sync from the campaign\'s page in the dashboard.\n\n- `geni crm campaigns [query]` lists campaigns with member/sequence rollups;\n `get <id>` shows one (its `purpose` is the messaging angle every draft in it\n must serve); `--person <id>` lists the campaigns a person is in.\n- `geni crm campaigns create --json \'{"name":"Q3 fintech CFOs","purpose":"Book intro calls about closing automation"}\'`.\n Names are unique per workspace. `update <id>` and `delete <id>` exist;\n deleting removes the campaign\'s drafts too.\n- Membership first: `geni crm campaigns add <campaignId> <personIds...>` adds\n people; `members <id>` shows who is in and who still has no draft.\n `remove` also deletes the member\'s synced leads from linked sequencers \u2014\n it\'s how "stop emailing them" propagates.\n- `geni crm sequences [query] [--person <id>] [--campaign <id>]` lists\n drafts; `get <id>` shows the steps.\n- Draft: `geni crm sequences create --person <id> --campaign <id> --json \'{"steps":[{"subject":"\u2026","body":"\u2026","waitDays":0},{"body":"\u2026","waitDays":3}]}\'`.\n The first step carries the subject; follow-ups reply in-thread after\n `waitDays` with no reply. Read the campaign\'s `purpose` first and write to\n it. A member has ONE draft per campaign \u2014 creating again rewrites it (and\n the next sync updates the lead instead of duplicating it).\n- `geni crm sequences update <id> --json \'\u2026\'` replaces a draft wholesale;\n `delete <id>` removes a draft (the person stays a member).\n- Consider `geni crm enrich validate` on recipients first so the operator\n isn\'t syncing mail to a dead address.\n\n## Composing with the rest of geni\n\nThe CRM is the source of who and what; connected credentials are how you act on\nthe outside world. To add contact info, prefer `geni crm enrich` (it runs the\nworkspace\'s provider waterfalls and saves results). For anything else, pull\npeople or a company from the CRM, reach a service through `geni exec bash` (send\nan email, update an external system), and write the result back to the CRM (a\nnote, a task, a touchpoint, a moved card). Credit each tool naturally in your\nsummary.\n\n## Exit codes worth knowing\n\n- `0` success.\n- `4` not found (bad id, or it is not in the active workspace).\n- `5` forbidden (the workspace lacks CRM access, or the record is out of scope).\n- `9` stale write (a card changed since you read it; re-read and retry, or pass `--expected-updated-at`).\n- `78` session expired. Tell the operator to run `geni login`.\n';
23910
23972
 
23911
23973
  // src/lib/skills.ts
23912
23974
  var GENI_SKILL_NAME = "geni";
@@ -24252,7 +24314,7 @@ function parseJsonObjectArg(raw) {
24252
24314
  }
24253
24315
 
24254
24316
  // src/lib/leadFilterArg.ts
24255
- import { z as z52 } from "zod";
24317
+ import { z as z50 } from "zod";
24256
24318
 
24257
24319
  // ../../packages/crm-api/dist/types/enums.js
24258
24320
  import { z as z12 } from "zod";
@@ -24283,14 +24345,6 @@ var ReachabilitySchema = z12.enum([
24283
24345
  "mobile_only",
24284
24346
  "none"
24285
24347
  ]);
24286
- var OutreachStatusSchema = z12.enum([
24287
- "none",
24288
- "queued",
24289
- "contacted",
24290
- "replied",
24291
- "bounced",
24292
- "unsubscribed"
24293
- ]);
24294
24348
 
24295
24349
  // ../../packages/crm-api/dist/types/concurrency.js
24296
24350
  import { z as z13 } from "zod";
@@ -24304,7 +24358,6 @@ var CrmSubjectTypeSchema = z14.enum([
24304
24358
  "person",
24305
24359
  "company",
24306
24360
  "list",
24307
- "conversation",
24308
24361
  "pipeline",
24309
24362
  "card"
24310
24363
  ]);
@@ -24735,101 +24788,8 @@ var UpdateScheduledAgentRequestSchema = z25.object({
24735
24788
  }).merge(ExpectedUpdatedAtSchema);
24736
24789
 
24737
24790
  // ../../packages/crm-api/dist/types/leadFilters.js
24738
- import { z as z27 } from "zod";
24739
-
24740
- // ../../packages/crm-api/dist/types/sequence.js
24741
24791
  import { z as z26 } from "zod";
24742
- var PersonSequenceStatusSchema = z26.enum([
24743
- "draft",
24744
- "queued",
24745
- "sending",
24746
- "completed",
24747
- "stopped",
24748
- // The person replied — a positive terminal outcome, distinct from a halt.
24749
- "replied"
24750
- ]);
24751
- var SequenceListSortSchema = z26.enum([
24752
- "recent",
24753
- "person",
24754
- "company",
24755
- "from",
24756
- "to",
24757
- "messages",
24758
- "status",
24759
- "activity"
24760
- ]);
24761
- var SequenceListRequestSchema = z26.object({
24762
- status: PersonSequenceStatusSchema.optional(),
24763
- query: z26.string().trim().min(1).optional(),
24764
- sort: SequenceListSortSchema.default("recent"),
24765
- // Direction for the column sort; omitted falls back to the sort's default.
24766
- direction: LeadSortDirectionSchema.optional()
24767
- });
24768
- var SequenceStepInputSchema = z26.object({
24769
- subject: z26.string().min(1).max(300).nullish(),
24770
- body: z26.string().min(1).max(2e4),
24771
- waitDays: z26.number().int().min(0).max(90)
24772
- });
24773
- var SetPersonSequenceRequestSchema = z26.object({
24774
- steps: z26.array(SequenceStepInputSchema).min(1).max(10),
24775
- emailAccountId: z26.string().nullish(),
24776
- recipientContactPointId: z26.string().nullish()
24777
- });
24778
- var BulkSequenceIdsRequestSchema = z26.object({
24779
- ids: z26.array(z26.uuid()).min(1).max(1e3)
24780
- });
24781
- var BulkQueueSequencesRequestSchema = z26.object({
24782
- ids: z26.array(z26.uuid()).min(1).max(1e3),
24783
- emailAccountId: z26.uuid()
24784
- });
24785
- var BulkQueueSkipReasonSchema = z26.enum([
24786
- "not_draft",
24787
- "no_steps",
24788
- "no_verified_email",
24789
- "suppressed",
24790
- "failed"
24791
- ]);
24792
- var SequenceExportSkipReasonSchema = z26.enum([
24793
- "no_steps",
24794
- "no_email",
24795
- "no_linkedin_url",
24796
- "suppressed",
24797
- "not_found"
24798
- ]);
24799
- var SequenceExportDestinationIdSchema = z26.enum([
24800
- "csv",
24801
- "instantly",
24802
- "smartlead",
24803
- "apollo",
24804
- "heyreach",
24805
- "expandi"
24806
- ]);
24807
- var ExportSequencesRequestSchema = z26.object({
24808
- ids: z26.array(z26.uuid()).min(1).max(500),
24809
- destination: SequenceExportDestinationIdSchema,
24810
- /** Required for campaign destinations, ignored by file destinations. */
24811
- campaignName: z26.string().min(1).max(120).optional()
24812
- });
24813
- function isValidTimeZone(timeZone) {
24814
- try {
24815
- new Intl.DateTimeFormat("en-US", { timeZone });
24816
- return true;
24817
- } catch {
24818
- return false;
24819
- }
24820
- }
24821
- var SequenceSendScheduleInputSchema = z26.object({
24822
- name: z26.string().min(1).max(120),
24823
- timezone: z26.string().refine(isValidTimeZone, "Unknown timezone"),
24824
- startHour: z26.number().int().min(0).max(23),
24825
- endHour: z26.number().int().min(1).max(24),
24826
- sendDays: z26.array(z26.number().int().min(1).max(7)).min(1).max(7)
24827
- }).refine((schedule) => schedule.startHour < schedule.endHour, {
24828
- message: "Start must be before end"
24829
- });
24830
-
24831
- // ../../packages/crm-api/dist/types/leadFilters.js
24832
- var LeadFilterFieldTypeSchema = z27.enum([
24792
+ var LeadFilterFieldTypeSchema = z26.enum([
24833
24793
  "text",
24834
24794
  "number",
24835
24795
  "date",
@@ -24837,7 +24797,7 @@ var LeadFilterFieldTypeSchema = z27.enum([
24837
24797
  "stringArray",
24838
24798
  "boolean"
24839
24799
  ]);
24840
- var LeadFilterOperatorSchema = z27.enum([
24800
+ var LeadFilterOperatorSchema = z26.enum([
24841
24801
  // text
24842
24802
  "contains",
24843
24803
  "not_contains",
@@ -24870,16 +24830,16 @@ var LeadFilterOperatorSchema = z27.enum([
24870
24830
  "is_empty",
24871
24831
  "is_not_empty"
24872
24832
  ]);
24873
- var LeadFilterConditionSchema = z27.object({
24874
- field: z27.string().min(1).max(200),
24833
+ var LeadFilterConditionSchema = z26.object({
24834
+ field: z26.string().min(1).max(200),
24875
24835
  operator: LeadFilterOperatorSchema,
24876
24836
  // Single-value operators (contains, gt, before, in_last_days, …).
24877
- value: z27.union([z27.string().max(500), z27.number()]).optional(),
24837
+ value: z26.union([z26.string().max(500), z26.number()]).optional(),
24878
24838
  // Multi-value operators (any_of, includes_any, …).
24879
- values: z27.array(z27.string().max(500)).max(100).optional(),
24839
+ values: z26.array(z26.string().max(500)).max(100).optional(),
24880
24840
  // `between` bounds — numbers, or ISO dates for date fields.
24881
- min: z27.union([z27.string().max(100), z27.number()]).optional(),
24882
- max: z27.union([z27.string().max(100), z27.number()]).optional()
24841
+ min: z26.union([z26.string().max(100), z26.number()]).optional(),
24842
+ max: z26.union([z26.string().max(100), z26.number()]).optional()
24883
24843
  });
24884
24844
  function staticOptions(values) {
24885
24845
  return values.map((value) => ({
@@ -24943,13 +24903,6 @@ var PERSON_FILTER_FIELDS = [
24943
24903
  group: "Segmentation",
24944
24904
  options: staticOptions(ReachabilitySchema.options)
24945
24905
  },
24946
- {
24947
- key: "outreachStatus",
24948
- label: "Outreach status",
24949
- type: "enum",
24950
- group: "Segmentation",
24951
- options: staticOptions(OutreachStatusSchema.options)
24952
- },
24953
24906
  { key: "companyName", label: "Company name", type: "text", group: "Company" },
24954
24907
  {
24955
24908
  key: "companyDomain",
@@ -24997,13 +24950,6 @@ var PERSON_FILTER_FIELDS = [
24997
24950
  { key: "facebook", label: "Facebook", type: "text", group: "Links" },
24998
24951
  { key: "youtube", label: "YouTube", type: "text", group: "Links" },
24999
24952
  { key: "instagram", label: "Instagram", type: "text", group: "Links" },
25000
- {
25001
- key: "sequenceStatus",
25002
- label: "Sequence status",
25003
- type: "enum",
25004
- group: "Activity",
25005
- options: staticOptions(PersonSequenceStatusSchema.options)
25006
- },
25007
24953
  { key: "createdAt", label: "Added", type: "date", group: "Activity" },
25008
24954
  { key: "updatedAt", label: "Updated", type: "date", group: "Activity" },
25009
24955
  {
@@ -25114,28 +25060,27 @@ function leadFilterConditionsDescription(fields) {
25114
25060
  }
25115
25061
 
25116
25062
  // ../../packages/crm-api/dist/types/search.js
25117
- import { z as z28 } from "zod";
25118
- var PersonSearchFiltersSchema = z28.object({
25063
+ import { z as z27 } from "zod";
25064
+ var PersonSearchFiltersSchema = z27.object({
25119
25065
  // Scope to one company's people (the company detail People tab).
25120
- companyId: z28.uuid().optional(),
25066
+ companyId: z27.uuid().optional(),
25121
25067
  // Scope to a person list's members.
25122
- listId: z28.uuid().optional(),
25068
+ listId: z27.uuid().optional(),
25123
25069
  // Carrying ANY of these tags (OR-within, like the other array facets).
25124
- tagIds: z28.array(z28.uuid()).optional(),
25125
- roleCategory: z28.array(z28.string()).optional(),
25126
- seniority: z28.array(z28.string()).optional(),
25127
- sizeBand: z28.array(z28.string()).optional(),
25128
- industry: z28.array(z28.string()).optional(),
25129
- country: z28.array(z28.string()).optional(),
25130
- reachability: z28.array(ReachabilitySchema).optional(),
25131
- outreachStatus: z28.array(OutreachStatusSchema).optional(),
25132
- minIcpScore: z28.number().min(0).max(100).optional(),
25133
- minEmployeeCount: z28.number().int().min(0).optional(),
25134
- maxEmployeeCount: z28.number().int().min(0).optional(),
25070
+ tagIds: z27.array(z27.uuid()).optional(),
25071
+ roleCategory: z27.array(z27.string()).optional(),
25072
+ seniority: z27.array(z27.string()).optional(),
25073
+ sizeBand: z27.array(z27.string()).optional(),
25074
+ industry: z27.array(z27.string()).optional(),
25075
+ country: z27.array(z27.string()).optional(),
25076
+ reachability: z27.array(ReachabilitySchema).optional(),
25077
+ minIcpScore: z27.number().min(0).max(100).optional(),
25078
+ minEmployeeCount: z27.number().int().min(0).optional(),
25079
+ maxEmployeeCount: z27.number().int().min(0).optional(),
25135
25080
  // Column conditions, ANDed together and with the keys above.
25136
- conditions: z28.array(LeadFilterConditionSchema).max(20).optional().describe(leadFilterConditionsDescription(PERSON_FILTER_FIELDS))
25081
+ conditions: z27.array(LeadFilterConditionSchema).max(20).optional().describe(leadFilterConditionsDescription(PERSON_FILTER_FIELDS))
25137
25082
  });
25138
- var PersonSearchSortSchema = z28.enum([
25083
+ var PersonSearchSortSchema = z27.enum([
25139
25084
  "relevance",
25140
25085
  "icp_score",
25141
25086
  "recent",
@@ -25149,32 +25094,32 @@ var PersonSearchSortSchema = z28.enum([
25149
25094
  "linkedin",
25150
25095
  "enriched"
25151
25096
  ]);
25152
- var PersonSearchRequestSchema = z28.object({
25097
+ var PersonSearchRequestSchema = z27.object({
25153
25098
  // Free-text keyword query (FTS + fuzzy fallback). Omit for pure facet browse.
25154
- query: z28.string().optional(),
25099
+ query: z27.string().optional(),
25155
25100
  filters: PersonSearchFiltersSchema.optional(),
25156
25101
  sort: PersonSearchSortSchema.default("relevance"),
25157
25102
  // Direction for the column sort; omitted falls back to the sort's default.
25158
25103
  direction: LeadSortDirectionSchema.optional(),
25159
25104
  // Keyset pagination — opaque cursor from the previous response.
25160
- cursor: z28.string().nullable().optional(),
25161
- limit: z28.number().int().min(1).max(100).default(25),
25105
+ cursor: z27.string().nullable().optional(),
25106
+ limit: z27.number().int().min(1).max(100).default(25),
25162
25107
  // Whether to compute facet counts for this query (extra work; off for paging).
25163
- includeFacets: z28.boolean().default(false)
25108
+ includeFacets: z27.boolean().default(false)
25164
25109
  });
25165
- var CompanySearchFiltersSchema = z28.object({
25110
+ var CompanySearchFiltersSchema = z27.object({
25166
25111
  // Scope to a company list's members.
25167
- listId: z28.uuid().optional(),
25112
+ listId: z27.uuid().optional(),
25168
25113
  // Carrying ANY of these tags (OR-within, like the other array facets).
25169
- tagIds: z28.array(z28.uuid()).optional(),
25170
- industry: z28.array(z28.string()).optional(),
25171
- hqCountry: z28.array(z28.string()).optional(),
25172
- minEmployeeCount: z28.number().int().min(0).optional(),
25173
- maxEmployeeCount: z28.number().int().min(0).optional(),
25114
+ tagIds: z27.array(z27.uuid()).optional(),
25115
+ industry: z27.array(z27.string()).optional(),
25116
+ hqCountry: z27.array(z27.string()).optional(),
25117
+ minEmployeeCount: z27.number().int().min(0).optional(),
25118
+ maxEmployeeCount: z27.number().int().min(0).optional(),
25174
25119
  // Column conditions, ANDed together and with the keys above.
25175
- conditions: z28.array(LeadFilterConditionSchema).max(20).optional().describe(leadFilterConditionsDescription(COMPANY_FILTER_FIELDS))
25120
+ conditions: z27.array(LeadFilterConditionSchema).max(20).optional().describe(leadFilterConditionsDescription(COMPANY_FILTER_FIELDS))
25176
25121
  });
25177
- var CompanySearchSortSchema = z28.enum([
25122
+ var CompanySearchSortSchema = z27.enum([
25178
25123
  "relevance",
25179
25124
  "employee_count",
25180
25125
  "recent",
@@ -25185,222 +25130,300 @@ var CompanySearchSortSchema = z28.enum([
25185
25130
  "hq",
25186
25131
  "enriched"
25187
25132
  ]);
25188
- var CompanySearchRequestSchema = z28.object({
25189
- query: z28.string().optional(),
25133
+ var CompanySearchRequestSchema = z27.object({
25134
+ query: z27.string().optional(),
25190
25135
  filters: CompanySearchFiltersSchema.optional(),
25191
25136
  sort: CompanySearchSortSchema.default("relevance"),
25192
25137
  direction: LeadSortDirectionSchema.optional(),
25193
- cursor: z28.string().nullable().optional(),
25194
- limit: z28.number().int().min(1).max(100).default(25),
25195
- includeFacets: z28.boolean().default(false)
25138
+ cursor: z27.string().nullable().optional(),
25139
+ limit: z27.number().int().min(1).max(100).default(25),
25140
+ includeFacets: z27.boolean().default(false)
25196
25141
  });
25197
25142
 
25198
25143
  // ../../packages/crm-api/dist/types/globalSearch.js
25199
- import { z as z29 } from "zod";
25200
- var GlobalSearchRequestSchema = z29.object({
25201
- query: z29.string().min(1).max(200),
25144
+ import { z as z28 } from "zod";
25145
+ var GlobalSearchRequestSchema = z28.object({
25146
+ query: z28.string().min(1).max(200),
25202
25147
  // Per-entity cap; the response holds up to 3 × this many results.
25203
- limitPerType: z29.number().int().min(1).max(20).default(6)
25148
+ limitPerType: z28.number().int().min(1).max(20).default(6)
25204
25149
  });
25205
25150
 
25206
25151
  // ../../packages/crm-api/dist/types/leadTools.js
25207
- import { z as z30 } from "zod";
25152
+ import { z as z29 } from "zod";
25208
25153
  var LEAD_BATCH_MAX = 100;
25209
25154
  var companyEnrichmentFields = {
25210
- legalName: z30.string().nullish(),
25211
- tagline: z30.string().nullish(),
25212
- linkedinUrl: z30.string().nullish(),
25213
- logoUrl: z30.string().nullish(),
25155
+ legalName: z29.string().nullish(),
25156
+ tagline: z29.string().nullish(),
25157
+ linkedinUrl: z29.string().nullish(),
25158
+ logoUrl: z29.string().nullish(),
25214
25159
  companyType: CompanyTypeSchema.nullish(),
25215
- industry: z30.string().nullish(),
25216
- subIndustry: z30.string().nullish(),
25217
- keywords: z30.array(z30.string()).max(50).nullish(),
25218
- description: z30.string().nullish(),
25219
- employeeCount: z30.number().int().min(0).nullish(),
25220
- foundedYear: z30.number().int().nullish(),
25221
- ticker: z30.string().nullish(),
25222
- annualRevenueUsd: z30.number().min(0).nullish(),
25223
- totalFundingUsd: z30.number().min(0).nullish(),
25224
- lastFundingRound: z30.string().nullish(),
25160
+ industry: z29.string().nullish(),
25161
+ subIndustry: z29.string().nullish(),
25162
+ keywords: z29.array(z29.string()).max(50).nullish(),
25163
+ description: z29.string().nullish(),
25164
+ employeeCount: z29.number().int().min(0).nullish(),
25165
+ foundedYear: z29.number().int().nullish(),
25166
+ ticker: z29.string().nullish(),
25167
+ annualRevenueUsd: z29.number().min(0).nullish(),
25168
+ totalFundingUsd: z29.number().min(0).nullish(),
25169
+ lastFundingRound: z29.string().nullish(),
25225
25170
  // ISO date, e.g. 2025-03-01
25226
- lastFundingAt: z30.string().nullish(),
25227
- investors: z30.array(z30.string()).max(50).nullish(),
25228
- hqCity: z30.string().nullish(),
25229
- hqRegion: z30.string().nullish(),
25230
- hqCountry: z30.string().nullish(),
25231
- hqAddress: z30.string().nullish(),
25232
- phone: z30.string().nullish(),
25233
- twitterUrl: z30.string().nullish(),
25234
- githubUrl: z30.string().nullish(),
25235
- facebookUrl: z30.string().nullish(),
25236
- youtubeUrl: z30.string().nullish(),
25237
- instagramUrl: z30.string().nullish(),
25238
- crunchbaseUrl: z30.string().nullish(),
25239
- techStack: z30.array(z30.string()).max(100).nullish()
25171
+ lastFundingAt: z29.string().nullish(),
25172
+ investors: z29.array(z29.string()).max(50).nullish(),
25173
+ hqCity: z29.string().nullish(),
25174
+ hqRegion: z29.string().nullish(),
25175
+ hqCountry: z29.string().nullish(),
25176
+ hqAddress: z29.string().nullish(),
25177
+ phone: z29.string().nullish(),
25178
+ twitterUrl: z29.string().nullish(),
25179
+ githubUrl: z29.string().nullish(),
25180
+ facebookUrl: z29.string().nullish(),
25181
+ youtubeUrl: z29.string().nullish(),
25182
+ instagramUrl: z29.string().nullish(),
25183
+ crunchbaseUrl: z29.string().nullish(),
25184
+ techStack: z29.array(z29.string()).max(100).nullish()
25240
25185
  };
25241
- var CreateLeadCompanyRequestSchema = z30.strictObject({
25242
- name: z30.string().min(1),
25243
- domain: z30.string().optional(),
25186
+ var CreateLeadCompanyRequestSchema = z29.strictObject({
25187
+ name: z29.string().min(1),
25188
+ domain: z29.string().optional(),
25244
25189
  ...companyEnrichmentFields
25245
25190
  });
25246
- var LeadPersonEducationInputSchema = z30.strictObject({
25247
- school: z30.string().min(1),
25248
- degree: z30.string().optional(),
25249
- field: z30.string().optional(),
25250
- startYear: z30.number().int().optional(),
25251
- endYear: z30.number().int().optional()
25191
+ var LeadPersonEducationInputSchema = z29.strictObject({
25192
+ school: z29.string().min(1),
25193
+ degree: z29.string().optional(),
25194
+ field: z29.string().optional(),
25195
+ startYear: z29.number().int().optional(),
25196
+ endYear: z29.number().int().optional()
25252
25197
  });
25253
25198
  var personEnrichmentFields = {
25254
- title: z30.string().nullish(),
25255
- headline: z30.string().nullish(),
25256
- bio: z30.string().nullish(),
25257
- department: z30.string().nullish(),
25258
- yearsExperience: z30.number().int().min(0).max(80).nullish(),
25259
- skills: z30.array(z30.string()).max(50).nullish(),
25260
- languages: z30.array(z30.string()).max(20).nullish(),
25261
- photoUrl: z30.string().nullish(),
25262
- linkedinUrl: z30.string().nullish(),
25263
- twitterUrl: z30.string().nullish(),
25264
- githubUrl: z30.string().nullish(),
25265
- facebookUrl: z30.string().nullish(),
25266
- youtubeUrl: z30.string().nullish(),
25267
- instagramUrl: z30.string().nullish(),
25268
- personalWebsiteUrl: z30.string().nullish(),
25269
- email: z30.string().nullish(),
25270
- locationCity: z30.string().nullish(),
25271
- locationRegion: z30.string().nullish(),
25272
- locationCountry: z30.string().nullish(),
25199
+ title: z29.string().nullish(),
25200
+ headline: z29.string().nullish(),
25201
+ bio: z29.string().nullish(),
25202
+ department: z29.string().nullish(),
25203
+ yearsExperience: z29.number().int().min(0).max(80).nullish(),
25204
+ skills: z29.array(z29.string()).max(50).nullish(),
25205
+ languages: z29.array(z29.string()).max(20).nullish(),
25206
+ photoUrl: z29.string().nullish(),
25207
+ linkedinUrl: z29.string().nullish(),
25208
+ twitterUrl: z29.string().nullish(),
25209
+ githubUrl: z29.string().nullish(),
25210
+ facebookUrl: z29.string().nullish(),
25211
+ youtubeUrl: z29.string().nullish(),
25212
+ instagramUrl: z29.string().nullish(),
25213
+ personalWebsiteUrl: z29.string().nullish(),
25214
+ email: z29.string().nullish(),
25215
+ locationCity: z29.string().nullish(),
25216
+ locationRegion: z29.string().nullish(),
25217
+ locationCountry: z29.string().nullish(),
25273
25218
  // IANA timezone, e.g. America/New_York
25274
- timezone: z30.string().nullish(),
25219
+ timezone: z29.string().nullish(),
25275
25220
  // Full education history — REPLACES any previously saved entries.
25276
- educations: z30.array(LeadPersonEducationInputSchema).max(10).optional()
25221
+ educations: z29.array(LeadPersonEducationInputSchema).max(10).optional()
25277
25222
  };
25278
- var CreateLeadPersonRequestSchema = z30.strictObject({
25279
- fullName: z30.string().min(1),
25223
+ var CreateLeadPersonRequestSchema = z29.strictObject({
25224
+ fullName: z29.string().min(1),
25280
25225
  ...personEnrichmentFields,
25281
- companyId: z30.string().optional(),
25282
- companyName: z30.string().optional(),
25283
- companyDomain: z30.string().optional()
25226
+ companyId: z29.string().optional(),
25227
+ companyName: z29.string().optional(),
25228
+ companyDomain: z29.string().optional()
25284
25229
  });
25285
- var UpdateLeadCompanyRequestSchema = z30.strictObject({
25286
- id: z30.uuid(),
25287
- name: z30.string().min(1).optional(),
25288
- domain: z30.string().optional(),
25230
+ var UpdateLeadCompanyRequestSchema = z29.strictObject({
25231
+ id: z29.uuid(),
25232
+ name: z29.string().min(1).optional(),
25233
+ domain: z29.string().optional(),
25289
25234
  ...companyEnrichmentFields,
25290
25235
  // Registry-defined custom fields; validated + merged server-side.
25291
25236
  custom: CustomFieldValuesSchema.optional()
25292
25237
  });
25293
- var UpdateLeadPersonRequestSchema = z30.strictObject({
25294
- id: z30.uuid(),
25295
- fullName: z30.string().min(1).optional(),
25238
+ var UpdateLeadPersonRequestSchema = z29.strictObject({
25239
+ id: z29.uuid(),
25240
+ fullName: z29.string().min(1).optional(),
25296
25241
  ...personEnrichmentFields,
25297
25242
  // (re)assign current employment — companyId, or companyName/companyDomain
25298
25243
  // to find-or-create the company first
25299
- companyId: z30.string().optional(),
25300
- companyName: z30.string().optional(),
25301
- companyDomain: z30.string().optional(),
25244
+ companyId: z29.string().optional(),
25245
+ companyName: z29.string().optional(),
25246
+ companyDomain: z29.string().optional(),
25302
25247
  // Set the primary company directly (the people.current_company_id cache shown
25303
25248
  // in lists/header). Independent of the employment rows that hold the full set
25304
25249
  // of current roles; null clears it. Recompute overwrites it when the current
25305
25250
  // employment set changes.
25306
- primaryCompanyId: z30.string().nullish(),
25251
+ primaryCompanyId: z29.string().nullish(),
25307
25252
  // Registry-defined custom fields; validated + merged server-side.
25308
25253
  custom: CustomFieldValuesSchema.optional()
25309
25254
  });
25310
- var LeadEmploymentInputSchema = z30.strictObject({
25311
- companyId: z30.uuid().nullish(),
25312
- companyName: z30.string().nullish(),
25313
- title: z30.string().nullish(),
25314
- startDate: z30.string().nullish(),
25315
- endDate: z30.string().nullish(),
25316
- isCurrent: z30.boolean().default(false)
25255
+ var LeadEmploymentInputSchema = z29.strictObject({
25256
+ companyId: z29.uuid().nullish(),
25257
+ companyName: z29.string().nullish(),
25258
+ title: z29.string().nullish(),
25259
+ startDate: z29.string().nullish(),
25260
+ endDate: z29.string().nullish(),
25261
+ isCurrent: z29.boolean().default(false)
25317
25262
  });
25318
- var UpdateLeadEmploymentRequestSchema = z30.strictObject({
25319
- companyId: z30.uuid().nullish(),
25320
- companyName: z30.string().nullish(),
25321
- title: z30.string().nullish(),
25322
- startDate: z30.string().nullish(),
25323
- endDate: z30.string().nullish(),
25324
- isCurrent: z30.boolean().optional()
25263
+ var UpdateLeadEmploymentRequestSchema = z29.strictObject({
25264
+ companyId: z29.uuid().nullish(),
25265
+ companyName: z29.string().nullish(),
25266
+ title: z29.string().nullish(),
25267
+ startDate: z29.string().nullish(),
25268
+ endDate: z29.string().nullish(),
25269
+ isCurrent: z29.boolean().optional()
25325
25270
  });
25326
- var LeadContactPointInputSchema = z30.strictObject({
25271
+ var LeadContactPointInputSchema = z29.strictObject({
25327
25272
  kind: ContactPointKindSchema,
25328
- value: z30.string().min(1),
25273
+ value: z29.string().min(1),
25329
25274
  status: ContactPointStatusSchema.optional(),
25330
- isPrimary: z30.boolean().optional()
25275
+ isPrimary: z29.boolean().optional()
25331
25276
  });
25332
- var UpdateLeadContactPointRequestSchema = z30.strictObject({
25277
+ var UpdateLeadContactPointRequestSchema = z29.strictObject({
25333
25278
  kind: ContactPointKindSchema.optional(),
25334
- value: z30.string().min(1).optional(),
25279
+ value: z29.string().min(1).optional(),
25335
25280
  status: ContactPointStatusSchema.optional(),
25336
- isPrimary: z30.boolean().optional()
25281
+ isPrimary: z29.boolean().optional()
25337
25282
  });
25338
- var LeadCompanyPeopleRequestSchema = z30.object({
25339
- limit: z30.coerce.number().int().min(1).max(100).default(50),
25340
- cursor: z30.string().optional(),
25283
+ var LeadCompanyPeopleRequestSchema = z29.object({
25284
+ limit: z29.coerce.number().int().min(1).max(100).default(50),
25285
+ cursor: z29.string().optional(),
25341
25286
  sort: PersonSearchSortSchema.default("recent"),
25342
25287
  direction: LeadSortDirectionSchema.optional()
25343
25288
  });
25344
- var CreateLeadCompaniesRequestSchema = z30.strictObject({
25345
- companies: z30.array(CreateLeadCompanyRequestSchema).min(1).max(LEAD_BATCH_MAX)
25289
+ var CreateLeadCompaniesRequestSchema = z29.strictObject({
25290
+ companies: z29.array(CreateLeadCompanyRequestSchema).min(1).max(LEAD_BATCH_MAX)
25346
25291
  });
25347
- var CreateLeadPeopleRequestSchema = z30.strictObject({
25348
- people: z30.array(CreateLeadPersonRequestSchema).min(1).max(LEAD_BATCH_MAX)
25292
+ var CreateLeadPeopleRequestSchema = z29.strictObject({
25293
+ people: z29.array(CreateLeadPersonRequestSchema).min(1).max(LEAD_BATCH_MAX)
25349
25294
  });
25350
- var UpdateLeadCompaniesRequestSchema = z30.strictObject({
25351
- companies: z30.array(UpdateLeadCompanyRequestSchema).min(1).max(LEAD_BATCH_MAX)
25295
+ var UpdateLeadCompaniesRequestSchema = z29.strictObject({
25296
+ companies: z29.array(UpdateLeadCompanyRequestSchema).min(1).max(LEAD_BATCH_MAX)
25352
25297
  });
25353
- var UpdateLeadPeopleRequestSchema = z30.strictObject({
25354
- people: z30.array(UpdateLeadPersonRequestSchema).min(1).max(LEAD_BATCH_MAX)
25298
+ var UpdateLeadPeopleRequestSchema = z29.strictObject({
25299
+ people: z29.array(UpdateLeadPersonRequestSchema).min(1).max(LEAD_BATCH_MAX)
25355
25300
  });
25356
- var DeleteLeadCompaniesRequestSchema = z30.strictObject({
25357
- ids: z30.array(z30.uuid()).min(1).max(LEAD_BATCH_MAX)
25301
+ var DeleteLeadCompaniesRequestSchema = z29.strictObject({
25302
+ ids: z29.array(z29.uuid()).min(1).max(LEAD_BATCH_MAX)
25358
25303
  });
25359
- var DeleteLeadPeopleRequestSchema = z30.strictObject({
25360
- ids: z30.array(z30.uuid()).min(1).max(LEAD_BATCH_MAX)
25304
+ var DeleteLeadPeopleRequestSchema = z29.strictObject({
25305
+ ids: z29.array(z29.uuid()).min(1).max(LEAD_BATCH_MAX)
25361
25306
  });
25362
25307
 
25363
- // ../../packages/crm-api/dist/types/suppression.js
25308
+ // ../../packages/crm-api/dist/types/sequence.js
25309
+ import { z as z30 } from "zod";
25310
+ var SequenceListSortSchema = z30.enum([
25311
+ "recent",
25312
+ "person",
25313
+ "company",
25314
+ "to",
25315
+ "messages",
25316
+ "activity"
25317
+ ]);
25318
+ var SequenceListRequestSchema = z30.object({
25319
+ query: z30.string().trim().min(1).optional(),
25320
+ campaignId: z30.uuid().optional(),
25321
+ sort: SequenceListSortSchema.default("recent"),
25322
+ // Direction for the column sort; omitted falls back to the sort's default.
25323
+ direction: LeadSortDirectionSchema.optional()
25324
+ });
25325
+ var SequenceStepInputSchema = z30.object({
25326
+ subject: z30.string().min(1).max(300).nullish(),
25327
+ body: z30.string().min(1).max(2e4),
25328
+ waitDays: z30.number().int().min(0).max(90)
25329
+ });
25330
+ var SetPersonSequenceRequestSchema = z30.object({
25331
+ steps: z30.array(SequenceStepInputSchema).min(1).max(10),
25332
+ recipientContactPointId: z30.string().nullish()
25333
+ });
25334
+ var CreatePersonSequenceRequestSchema = SetPersonSequenceRequestSchema.extend({
25335
+ campaignId: z30.uuid()
25336
+ });
25337
+ var SequenceExportSkipReasonSchema = z30.enum([
25338
+ "no_steps",
25339
+ "no_email",
25340
+ "no_linkedin_url",
25341
+ "suppressed",
25342
+ "not_found"
25343
+ ]);
25344
+ var SequenceExportDestinationIdSchema = z30.enum([
25345
+ "csv",
25346
+ "instantly",
25347
+ "smartlead",
25348
+ "apollo",
25349
+ "heyreach",
25350
+ "expandi"
25351
+ ]);
25352
+ function isValidTimeZone(timeZone) {
25353
+ try {
25354
+ new Intl.DateTimeFormat("en-US", { timeZone });
25355
+ return true;
25356
+ } catch {
25357
+ return false;
25358
+ }
25359
+ }
25360
+ var SequenceSendScheduleInputSchema = z30.object({
25361
+ name: z30.string().min(1).max(120),
25362
+ timezone: z30.string().refine(isValidTimeZone, "Unknown timezone"),
25363
+ startHour: z30.number().int().min(0).max(23),
25364
+ endHour: z30.number().int().min(1).max(24),
25365
+ sendDays: z30.array(z30.number().int().min(1).max(7)).min(1).max(7)
25366
+ }).refine((schedule) => schedule.startHour < schedule.endHour, {
25367
+ message: "Start must be before end"
25368
+ });
25369
+
25370
+ // ../../packages/crm-api/dist/types/campaign.js
25364
25371
  import { z as z31 } from "zod";
25365
- var SuppressionKindSchema = z31.enum(["email", "domain", "phone"]);
25366
- var SuppressionReasonSchema = z31.enum([
25372
+ var CampaignListSortSchema = z31.enum([
25373
+ "recent",
25374
+ "name",
25375
+ "people",
25376
+ "activity"
25377
+ ]);
25378
+ var CampaignListRequestSchema = z31.object({
25379
+ query: z31.string().trim().min(1).optional(),
25380
+ sort: CampaignListSortSchema.default("recent"),
25381
+ direction: LeadSortDirectionSchema.optional()
25382
+ });
25383
+ var SetCampaignRequestSchema = z31.object({
25384
+ name: z31.string().trim().min(1).max(120),
25385
+ purpose: z31.string().trim().max(2e3).nullish()
25386
+ });
25387
+ var BulkCampaignIdsRequestSchema = z31.object({
25388
+ ids: z31.array(z31.uuid()).min(1).max(200)
25389
+ });
25390
+ var CampaignSyncRequestSchema = z31.object({
25391
+ destination: SequenceExportDestinationIdSchema,
25392
+ /** File destinations only: 'new' downloads only sequences not yet exported
25393
+ * to this destination. Campaign destinations ignore it. */
25394
+ fileScope: z31.enum(["all", "new"]).default("all"),
25395
+ /** Names the external campaign created on first sync; defaults to the CRM
25396
+ * campaign's name. Ignored once linked. */
25397
+ campaignName: z31.string().trim().min(1).max(120).optional()
25398
+ });
25399
+ var CampaignMemberListSortSchema = z31.enum([
25400
+ "recent",
25401
+ "person",
25402
+ "company"
25403
+ ]);
25404
+ var CampaignMemberListRequestSchema = z31.object({
25405
+ query: z31.string().trim().min(1).optional(),
25406
+ sort: CampaignMemberListSortSchema.default("recent"),
25407
+ direction: LeadSortDirectionSchema.optional()
25408
+ });
25409
+ var CampaignPeopleRequestSchema = z31.object({
25410
+ personIds: z31.array(z31.uuid()).min(1).max(1e3)
25411
+ });
25412
+
25413
+ // ../../packages/crm-api/dist/types/suppression.js
25414
+ import { z as z32 } from "zod";
25415
+ var SuppressionKindSchema = z32.enum(["email", "domain", "phone"]);
25416
+ var SuppressionReasonSchema = z32.enum([
25367
25417
  "unsubscribed",
25368
25418
  "complained",
25369
25419
  "hard_bounced",
25370
25420
  "manual"
25371
25421
  ]);
25372
- var CreateSuppressionRequestSchema = z31.object({
25422
+ var CreateSuppressionRequestSchema = z32.object({
25373
25423
  kind: SuppressionKindSchema,
25374
- value: z31.string().min(1).max(320),
25424
+ value: z32.string().min(1).max(320),
25375
25425
  reason: SuppressionReasonSchema,
25376
- sourcePersonId: z31.uuid().nullish()
25377
- });
25378
-
25379
- // ../../packages/crm-api/dist/types/conversation.js
25380
- import { z as z32 } from "zod";
25381
- var ConversationChannelSchema = z32.enum(["email", "linkedin"]);
25382
- var MessageDirectionSchema = z32.enum(["outbound", "inbound"]);
25383
- var InboxFilterSchema = z32.enum(["all", "unread"]);
25384
- var InboxListRequestSchema = z32.object({
25385
- filter: InboxFilterSchema.default("all"),
25386
- channel: ConversationChannelSchema.optional(),
25387
- // Keyset cursor — last page's (lastMessageAt, id), opaque to clients.
25388
- cursor: z32.string().nullable().optional(),
25389
- limit: z32.number().int().min(1).max(100).default(30)
25390
- });
25391
- var SentListRequestSchema = z32.object({
25392
- // Keyset cursor — last page's (sentAt, id), opaque to clients.
25393
- cursor: z32.string().nullable().optional(),
25394
- limit: z32.number().int().min(1).max(100).default(30)
25395
- });
25396
- var ReplyToConversationRequestSchema = z32.object({
25397
- bodyText: z32.string().min(1).max(2e4)
25398
- });
25399
- var DraftReplyRequestSchema = z32.object({
25400
- /** What the reply should say or avoid — optional steer from the sender. */
25401
- guidance: z32.string().max(2e3).optional(),
25402
- /** Composer text to revise; omitted on a fresh draft. */
25403
- currentDraft: z32.string().max(2e4).optional()
25426
+ sourcePersonId: z32.uuid().nullish()
25404
25427
  });
25405
25428
 
25406
25429
  // ../../packages/crm-api/dist/types/enrichment.js
@@ -25497,9 +25520,9 @@ var UpdateEnrichmentWaterfallsRequestSchema = z34.object({
25497
25520
  phoneEnrichment: z34.array(PhoneEnrichmentProviderIdSchema).optional()
25498
25521
  });
25499
25522
 
25500
- // ../../packages/crm-api/dist/types/skill.js
25523
+ // ../../packages/crm-api/dist/types/playbook.js
25501
25524
  import { z as z35 } from "zod";
25502
- var SkillIdSchema = z35.enum([
25525
+ var PlaybookIdSchema = z35.enum([
25503
25526
  "fill-in-person",
25504
25527
  "fill-in-company",
25505
25528
  "fill-in-list",
@@ -25507,7 +25530,6 @@ var SkillIdSchema = z35.enum([
25507
25530
  "lookalike-person",
25508
25531
  "lookalike-company",
25509
25532
  "add-enrich",
25510
- "signal-sweep-list",
25511
25533
  "build-list-person",
25512
25534
  "build-list-company"
25513
25535
  ]);
@@ -25516,81 +25538,40 @@ var AgentQuickActionSchema = z35.enum([
25516
25538
  "draft_sequence",
25517
25539
  "create_lookalikes",
25518
25540
  "add_enrich",
25519
- "signal_sweep",
25520
25541
  "build_list"
25521
25542
  ]);
25522
- var SkillEntityTypeSchema = z35.enum(["person", "company"]);
25523
- var SkillListTargetValueSchema = z35.union([
25543
+ var PlaybookEntityTypeSchema = z35.enum(["person", "company"]);
25544
+ var PlaybookListTargetValueSchema = z35.union([
25524
25545
  z35.object({
25525
25546
  listId: z35.uuid(),
25526
25547
  listName: z35.string().trim().min(1).max(200)
25527
25548
  }),
25528
25549
  z35.object({ newListName: z35.string().trim().min(1).max(200) })
25529
25550
  ]);
25530
- var SkillSeedValueSchema = z35.string().trim().min(1).max(2e3);
25531
- var SkillBriefValueSchema = z35.string().trim().min(1).max(2e3);
25532
- var UpdateSkillRequestSchema = z35.object({
25533
- content: z35.string().trim().min(1).max(1e5)
25534
- });
25535
-
25536
- // ../../packages/crm-api/dist/types/agentMail.js
25537
- import { z as z36 } from "zod";
25538
- var AgentMailAttachmentUploadSchema = z36.object({
25539
- filename: z36.string().min(1).max(255),
25540
- contentType: z36.string().min(1).max(255),
25541
- dataBase64: z36.string().min(1).max(28e6)
25542
- });
25543
- var CreateAgentMailRequestSchema = z36.object({
25544
- threadId: z36.string().min(1),
25545
- subject: z36.string().trim().min(1).max(200),
25546
- body: z36.string().trim().min(1).max(2e4),
25547
- senderProvider: z36.string().max(50).nullable(),
25548
- attachments: z36.array(AgentMailAttachmentUploadSchema).max(8)
25549
- });
25550
-
25551
- // ../../packages/crm-api/dist/types/workspaceEmail.js
25552
- import { z as z37 } from "zod";
25553
- var GoogleWorkspaceConnectionStatusSchema = z37.enum([
25554
- "pending_grant",
25555
- "active",
25556
- "revoked"
25557
- ]);
25558
- var EmailAccountDirectoryStatusSchema = z37.enum([
25559
- "active",
25560
- "suspended",
25561
- "removed"
25551
+ var PlaybookCampaignTargetValueSchema = z35.union([
25552
+ z35.object({
25553
+ campaignId: z35.uuid(),
25554
+ campaignName: z35.string().trim().min(1).max(120),
25555
+ campaignPurpose: z35.string().max(2e3).nullish()
25556
+ }),
25557
+ z35.object({ newCampaignName: z35.string().trim().min(1).max(120) })
25562
25558
  ]);
25563
- var CreateWorkspaceConnectionRequestSchema = z37.object({
25564
- adminEmail: z37.email().max(320)
25565
- });
25566
- var UpdateEmailAccountRequestSchema = z37.object({
25567
- isSendingEnabled: z37.boolean().optional(),
25568
- dailySendCap: z37.number().int().min(1).max(500).optional()
25569
- });
25570
-
25571
- // ../../packages/crm-api/dist/types/mailbox.js
25572
- import { z as z38 } from "zod";
25573
- var ConnectCrmMailboxRequestSchema = z38.object({
25574
- credentialId: z38.string()
25575
- });
25576
- var UpdateCrmMailboxRequestSchema = z38.object({
25577
- isSendingEnabled: z38.boolean().optional(),
25578
- dailySendCap: z38.number().int().min(1).max(500).optional()
25579
- });
25559
+ var PlaybookSeedValueSchema = z35.string().trim().min(1).max(2e3);
25560
+ var PlaybookBriefValueSchema = z35.string().trim().min(1).max(2e3);
25580
25561
 
25581
25562
  // ../../packages/api/dist/types/user.js
25582
- import { z as z39 } from "zod";
25583
- var UserRoleSchema = z39.enum(["God", "Owner", "Admin", "Member"]);
25563
+ import { z as z36 } from "zod";
25564
+ var UserRoleSchema = z36.enum(["God", "Owner", "Admin", "Member"]);
25584
25565
 
25585
25566
  // ../../packages/api/dist/types/credential.js
25586
- import { z as z40 } from "zod";
25587
- var CredentialTypeSchema2 = z40.enum([
25567
+ import { z as z37 } from "zod";
25568
+ var CredentialTypeSchema2 = z37.enum([
25588
25569
  "oauth2",
25589
25570
  "apiKey",
25590
25571
  "platform",
25591
25572
  "noAuth"
25592
25573
  ]);
25593
- var CredentialAuthSourceSchema = z40.enum([
25574
+ var CredentialAuthSourceSchema = z37.enum([
25594
25575
  "personal_oauth",
25595
25576
  "organization_oauth",
25596
25577
  "managed_oauth",
@@ -25599,8 +25580,8 @@ var CredentialAuthSourceSchema = z40.enum([
25599
25580
  ]);
25600
25581
 
25601
25582
  // ../../packages/api/dist/types/agent.js
25602
- import { z as z41 } from "zod";
25603
- var GiAgentMessageTypeSchema = z41.enum([
25583
+ import { z as z38 } from "zod";
25584
+ var GiAgentMessageTypeSchema = z38.enum([
25604
25585
  "text",
25605
25586
  "tool-call",
25606
25587
  "tool-result",
@@ -25612,7 +25593,7 @@ var GiAgentMessageTypeSchema = z41.enum([
25612
25593
  // threads still load (an unknown type drops the whole message on read).
25613
25594
  "delegating"
25614
25595
  ]);
25615
- var GiAgentMessageRoleSchema = z41.enum([
25596
+ var GiAgentMessageRoleSchema = z38.enum([
25616
25597
  "user",
25617
25598
  "assistant",
25618
25599
  "system",
@@ -25620,215 +25601,215 @@ var GiAgentMessageRoleSchema = z41.enum([
25620
25601
  "display"
25621
25602
  ]);
25622
25603
  var STORAGE_URI_PREFIX = "store://";
25623
- var agentStorageUriSchema = z41.string().refine((v) => v.startsWith(STORAGE_URI_PREFIX) || v.startsWith("r2://"), {
25604
+ var agentStorageUriSchema = z38.string().refine((v) => v.startsWith(STORAGE_URI_PREFIX) || v.startsWith("r2://"), {
25624
25605
  message: `Storage URI must start with ${STORAGE_URI_PREFIX}`
25625
25606
  });
25626
- var AgentPersistedImagePartSchema = z41.object({
25627
- type: z41.literal("image"),
25607
+ var AgentPersistedImagePartSchema = z38.object({
25608
+ type: z38.literal("image"),
25628
25609
  image: agentStorageUriSchema,
25629
- mimeType: z41.string()
25610
+ mimeType: z38.string()
25630
25611
  }).loose();
25631
- var AgentPersistedFilePartSchema = z41.object({
25632
- type: z41.literal("file"),
25612
+ var AgentPersistedFilePartSchema = z38.object({
25613
+ type: z38.literal("file"),
25633
25614
  data: agentStorageUriSchema,
25634
- mimeType: z41.string(),
25635
- filename: z41.string()
25615
+ mimeType: z38.string(),
25616
+ filename: z38.string()
25636
25617
  }).loose();
25637
- var AgentPersistedTextPartSchema = z41.object({
25638
- type: z41.literal("text"),
25639
- text: z41.string()
25618
+ var AgentPersistedTextPartSchema = z38.object({
25619
+ type: z38.literal("text"),
25620
+ text: z38.string()
25640
25621
  }).loose();
25641
- var AgentPersistedReasoningPartSchema = z41.object({
25642
- type: z41.literal("reasoning"),
25643
- text: z41.string()
25622
+ var AgentPersistedReasoningPartSchema = z38.object({
25623
+ type: z38.literal("reasoning"),
25624
+ text: z38.string()
25644
25625
  }).loose();
25645
- var AgentPersistedToolCallPartSchema = z41.object({
25646
- type: z41.literal("tool-call"),
25647
- toolCallId: z41.string(),
25648
- toolName: z41.string(),
25649
- input: z41.unknown()
25626
+ var AgentPersistedToolCallPartSchema = z38.object({
25627
+ type: z38.literal("tool-call"),
25628
+ toolCallId: z38.string(),
25629
+ toolName: z38.string(),
25630
+ input: z38.unknown()
25650
25631
  }).loose();
25651
- var AgentPersistedToolResultPartSchema = z41.object({
25652
- type: z41.literal("tool-result"),
25653
- toolCallId: z41.string(),
25654
- toolName: z41.string(),
25655
- output: z41.object({
25656
- type: z41.string(),
25657
- value: z41.unknown()
25632
+ var AgentPersistedToolResultPartSchema = z38.object({
25633
+ type: z38.literal("tool-result"),
25634
+ toolCallId: z38.string(),
25635
+ toolName: z38.string(),
25636
+ output: z38.object({
25637
+ type: z38.string(),
25638
+ value: z38.unknown()
25658
25639
  }).loose()
25659
25640
  }).loose();
25660
- var AgentPersistedDisplayEventSchema = z41.object({
25661
- type: z41.string()
25641
+ var AgentPersistedDisplayEventSchema = z38.object({
25642
+ type: z38.string()
25662
25643
  }).loose();
25663
- var AgentPersistedUserContentSchema = z41.union([
25664
- z41.string(),
25665
- z41.array(z41.union([
25666
- z41.object({ type: z41.literal("text"), text: z41.string() }).loose(),
25667
- z41.object({ type: z41.literal("api-mention"), service: z41.string() }).loose(),
25668
- z41.object({
25669
- type: z41.literal("platform-api-mention"),
25670
- service: z41.string()
25644
+ var AgentPersistedUserContentSchema = z38.union([
25645
+ z38.string(),
25646
+ z38.array(z38.union([
25647
+ z38.object({ type: z38.literal("text"), text: z38.string() }).loose(),
25648
+ z38.object({ type: z38.literal("api-mention"), service: z38.string() }).loose(),
25649
+ z38.object({
25650
+ type: z38.literal("platform-api-mention"),
25651
+ service: z38.string()
25671
25652
  }).loose(),
25672
- z41.object({ type: z41.literal("trigger-mention"), triggerId: z41.string() }).loose(),
25673
- z41.object({
25674
- type: z41.literal("credential-mention"),
25675
- credentialId: z41.string(),
25676
- credentialTitle: z41.string(),
25677
- service: z41.string()
25653
+ z38.object({ type: z38.literal("trigger-mention"), triggerId: z38.string() }).loose(),
25654
+ z38.object({
25655
+ type: z38.literal("credential-mention"),
25656
+ credentialId: z38.string(),
25657
+ credentialTitle: z38.string(),
25658
+ service: z38.string()
25678
25659
  }).loose(),
25679
- z41.object({
25680
- type: z41.literal("workflow-mention"),
25681
- workflowId: z41.string(),
25682
- name: z41.string()
25660
+ z38.object({
25661
+ type: z38.literal("workflow-mention"),
25662
+ workflowId: z38.string(),
25663
+ name: z38.string()
25683
25664
  }).loose(),
25684
- z41.object({
25685
- type: z41.literal("app-mention"),
25686
- workflowId: z41.string(),
25687
- name: z41.string()
25665
+ z38.object({
25666
+ type: z38.literal("app-mention"),
25667
+ workflowId: z38.string(),
25668
+ name: z38.string()
25688
25669
  }).loose(),
25689
- z41.object({
25690
- type: z41.literal("skill-mention"),
25691
- skillId: z41.string(),
25692
- name: z41.string()
25670
+ z38.object({
25671
+ type: z38.literal("skill-mention"),
25672
+ skillId: z38.string(),
25673
+ name: z38.string()
25693
25674
  }).loose(),
25694
- z41.object({
25695
- type: z41.literal("platform-skill-mention"),
25696
- name: z41.string()
25675
+ z38.object({
25676
+ type: z38.literal("platform-skill-mention"),
25677
+ name: z38.string()
25697
25678
  }).loose(),
25698
- z41.object({
25699
- type: z41.literal("context-file-mention"),
25700
- fileId: z41.string(),
25701
- title: z41.string(),
25702
- path: z41.string()
25679
+ z38.object({
25680
+ type: z38.literal("context-file-mention"),
25681
+ fileId: z38.string(),
25682
+ title: z38.string(),
25683
+ path: z38.string()
25703
25684
  }).loose(),
25704
25685
  AgentPersistedImagePartSchema,
25705
25686
  AgentPersistedFilePartSchema
25706
25687
  ])).min(1)
25707
25688
  ]);
25708
- var AgentPersistedAssistantContentSchema = z41.union([
25709
- z41.string(),
25710
- z41.array(z41.union([
25689
+ var AgentPersistedAssistantContentSchema = z38.union([
25690
+ z38.string(),
25691
+ z38.array(z38.union([
25711
25692
  AgentPersistedTextPartSchema,
25712
25693
  AgentPersistedReasoningPartSchema,
25713
25694
  AgentPersistedToolCallPartSchema
25714
25695
  ])).min(1)
25715
25696
  ]);
25716
- var AgentPersistedToolContentSchema = z41.array(AgentPersistedToolResultPartSchema).min(1);
25717
- var AgentPersistedSystemContentSchema = z41.string();
25718
- var CreateResourceTypeSchema = z41.enum([
25697
+ var AgentPersistedToolContentSchema = z38.array(AgentPersistedToolResultPartSchema).min(1);
25698
+ var AgentPersistedSystemContentSchema = z38.string();
25699
+ var CreateResourceTypeSchema = z38.enum([
25719
25700
  "code",
25720
25701
  "agent",
25721
25702
  "app",
25722
25703
  "skill"
25723
25704
  ]);
25724
- var QuestionResumePayloadSchema = z41.object({
25725
- answer: z41.string(),
25726
- displayText: z41.string()
25705
+ var QuestionResumePayloadSchema = z38.object({
25706
+ answer: z38.string(),
25707
+ displayText: z38.string()
25727
25708
  });
25728
- var CreateResourceResumePayloadSchema = z41.object({
25729
- action: z41.enum(["create", "cancel"]),
25730
- displayText: z41.string()
25709
+ var CreateResourceResumePayloadSchema = z38.object({
25710
+ action: z38.enum(["create", "cancel"]),
25711
+ displayText: z38.string()
25731
25712
  });
25732
- var RunWorkflowResumePayloadSchema = z41.object({
25733
- action: z41.enum(["run", "cancel"]),
25734
- displayText: z41.string()
25713
+ var RunWorkflowResumePayloadSchema = z38.object({
25714
+ action: z38.enum(["run", "cancel"]),
25715
+ displayText: z38.string()
25735
25716
  });
25736
- var ConnectCredentialForAccountResumePayloadSchema = z41.object({
25737
- credentialId: z41.string().nullable(),
25738
- displayText: z41.string()
25717
+ var ConnectCredentialForAccountResumePayloadSchema = z38.object({
25718
+ credentialId: z38.string().nullable(),
25719
+ displayText: z38.string()
25739
25720
  });
25740
- var CrmApprovalResumePayloadSchema = z41.object({
25741
- decision: z41.enum(["approve", "deny"]),
25742
- displayText: z41.string()
25721
+ var CrmApprovalResumePayloadSchema = z38.object({
25722
+ decision: z38.enum(["approve", "deny"]),
25723
+ displayText: z38.string()
25743
25724
  });
25744
- var HumanInputResumePayloadSchema = z41.union([
25725
+ var HumanInputResumePayloadSchema = z38.union([
25745
25726
  QuestionResumePayloadSchema,
25746
25727
  CreateResourceResumePayloadSchema,
25747
25728
  RunWorkflowResumePayloadSchema,
25748
25729
  ConnectCredentialForAccountResumePayloadSchema,
25749
25730
  CrmApprovalResumePayloadSchema
25750
25731
  ]);
25751
- var AgentUserContentSegmentSchema = z41.discriminatedUnion("type", [
25752
- z41.object({ type: z41.literal("text"), text: z41.string() }),
25753
- z41.object({
25754
- type: z41.literal("api-mention"),
25755
- service: z41.string(),
25756
- inlinedText: z41.string().optional()
25732
+ var AgentUserContentSegmentSchema = z38.discriminatedUnion("type", [
25733
+ z38.object({ type: z38.literal("text"), text: z38.string() }),
25734
+ z38.object({
25735
+ type: z38.literal("api-mention"),
25736
+ service: z38.string(),
25737
+ inlinedText: z38.string().optional()
25757
25738
  }),
25758
- z41.object({
25759
- type: z41.literal("platform-api-mention"),
25760
- service: z41.string(),
25761
- inlinedText: z41.string().optional()
25739
+ z38.object({
25740
+ type: z38.literal("platform-api-mention"),
25741
+ service: z38.string(),
25742
+ inlinedText: z38.string().optional()
25762
25743
  }),
25763
- z41.object({
25764
- type: z41.literal("trigger-mention"),
25765
- triggerId: z41.string(),
25766
- inlinedText: z41.string().optional()
25744
+ z38.object({
25745
+ type: z38.literal("trigger-mention"),
25746
+ triggerId: z38.string(),
25747
+ inlinedText: z38.string().optional()
25767
25748
  }),
25768
- z41.object({
25769
- type: z41.literal("credential-mention"),
25770
- credentialId: z41.string(),
25771
- credentialTitle: z41.string(),
25772
- service: z41.string(),
25773
- inlinedText: z41.string().optional()
25749
+ z38.object({
25750
+ type: z38.literal("credential-mention"),
25751
+ credentialId: z38.string(),
25752
+ credentialTitle: z38.string(),
25753
+ service: z38.string(),
25754
+ inlinedText: z38.string().optional()
25774
25755
  }),
25775
- z41.object({
25776
- type: z41.literal("workflow-mention"),
25777
- workflowId: z41.string(),
25778
- name: z41.string(),
25779
- inlinedText: z41.string().optional()
25756
+ z38.object({
25757
+ type: z38.literal("workflow-mention"),
25758
+ workflowId: z38.string(),
25759
+ name: z38.string(),
25760
+ inlinedText: z38.string().optional()
25780
25761
  }),
25781
- z41.object({
25782
- type: z41.literal("app-mention"),
25783
- workflowId: z41.string(),
25784
- name: z41.string(),
25785
- inlinedText: z41.string().optional()
25762
+ z38.object({
25763
+ type: z38.literal("app-mention"),
25764
+ workflowId: z38.string(),
25765
+ name: z38.string(),
25766
+ inlinedText: z38.string().optional()
25786
25767
  }),
25787
- z41.object({
25788
- type: z41.literal("skill-mention"),
25789
- skillId: z41.string(),
25790
- name: z41.string(),
25791
- inlinedText: z41.string().optional()
25768
+ z38.object({
25769
+ type: z38.literal("skill-mention"),
25770
+ skillId: z38.string(),
25771
+ name: z38.string(),
25772
+ inlinedText: z38.string().optional()
25792
25773
  }),
25793
25774
  // A platform-provided skill (ships in code, no DB row) — keyed by slug name.
25794
- z41.object({
25795
- type: z41.literal("platform-skill-mention"),
25796
- name: z41.string(),
25797
- inlinedText: z41.string().optional()
25775
+ z38.object({
25776
+ type: z38.literal("platform-skill-mention"),
25777
+ name: z38.string(),
25778
+ inlinedText: z38.string().optional()
25798
25779
  }),
25799
- z41.object({
25800
- type: z41.literal("context-file-mention"),
25801
- fileId: z41.string(),
25802
- title: z41.string(),
25780
+ z38.object({
25781
+ type: z38.literal("context-file-mention"),
25782
+ fileId: z38.string(),
25783
+ title: z38.string(),
25803
25784
  /** Agent-workspace path, e.g. `knowledge-base/org/company-overview.md`. */
25804
- path: z41.string(),
25805
- inlinedText: z41.string().optional()
25785
+ path: z38.string(),
25786
+ inlinedText: z38.string().optional()
25806
25787
  })
25807
25788
  ]);
25808
- var AgentUserContentSchema = z41.array(AgentUserContentSegmentSchema).min(1);
25809
- var MessageAttachmentSchema = z41.object({
25810
- type: z41.enum(["image", "file"]),
25811
- key: z41.string(),
25812
- mimeType: z41.string(),
25813
- filename: z41.string()
25789
+ var AgentUserContentSchema = z38.array(AgentUserContentSegmentSchema).min(1);
25790
+ var MessageAttachmentSchema = z38.object({
25791
+ type: z38.enum(["image", "file"]),
25792
+ key: z38.string(),
25793
+ mimeType: z38.string(),
25794
+ filename: z38.string()
25814
25795
  });
25815
25796
 
25816
25797
  // ../../packages/api/dist/types/balance.js
25817
- import { z as z42 } from "zod";
25818
- var UpdateAutofillSettingsRequestSchema = z42.discriminatedUnion("enabled", [
25819
- z42.object({
25820
- enabled: z42.literal(true),
25821
- targetCredits: z42.number().positive(),
25822
- thresholdCredits: z42.number().nonnegative()
25798
+ import { z as z39 } from "zod";
25799
+ var UpdateAutofillSettingsRequestSchema = z39.discriminatedUnion("enabled", [
25800
+ z39.object({
25801
+ enabled: z39.literal(true),
25802
+ targetCredits: z39.number().positive(),
25803
+ thresholdCredits: z39.number().nonnegative()
25823
25804
  }),
25824
- z42.object({
25825
- enabled: z42.literal(false)
25805
+ z39.object({
25806
+ enabled: z39.literal(false)
25826
25807
  })
25827
25808
  ]);
25828
25809
 
25829
25810
  // ../../packages/api/dist/types/usage.js
25830
- import { z as z43 } from "zod";
25831
- var UsageEventTypeSchema = z43.enum([
25811
+ import { z as z40 } from "zod";
25812
+ var UsageEventTypeSchema = z40.enum([
25832
25813
  "llm_cost",
25833
25814
  "agent_llm_cost",
25834
25815
  "sandbox_runtime",
@@ -25843,16 +25824,17 @@ var UsageEventTypeSchema = z43.enum([
25843
25824
  "financial_research",
25844
25825
  "stock_data",
25845
25826
  "send_email",
25846
- "user_database"
25827
+ "user_database",
25828
+ "voice_transcription"
25847
25829
  ]);
25848
25830
 
25849
25831
  // ../../packages/api/dist/types/dashboard.js
25850
- import { z as z44 } from "zod";
25851
- var DashboardArtifactLayoutSchema = z44.object({
25852
- x: z44.number().int().min(0),
25853
- y: z44.number().int().min(0),
25854
- w: z44.number().int().min(1),
25855
- h: z44.number().int().min(1)
25832
+ import { z as z41 } from "zod";
25833
+ var DashboardArtifactLayoutSchema = z41.object({
25834
+ x: z41.number().int().min(0),
25835
+ y: z41.number().int().min(0),
25836
+ w: z41.number().int().min(1),
25837
+ h: z41.number().int().min(1)
25856
25838
  });
25857
25839
 
25858
25840
  // ../../packages/api/dist/types/permission.js
@@ -26004,23 +25986,23 @@ var WORKFLOW_PERMISSION_ROLE_FLOOR = {
26004
25986
  };
26005
25987
 
26006
25988
  // ../../packages/api/dist/types/audit.js
26007
- import { z as z45 } from "zod";
26008
- var AuditWindowSchema = z45.enum(["1d", "3d", "7d"]);
25989
+ import { z as z42 } from "zod";
25990
+ var AuditWindowSchema = z42.enum(["1d", "3d", "7d"]);
26009
25991
 
26010
25992
  // ../../packages/api/dist/types/membershipApiKey.js
26011
- import { z as z46 } from "zod";
25993
+ import { z as z43 } from "zod";
26012
25994
  var API_KEY_SCOPES = ["all"];
26013
- var ApiKeyScopeSchema = z46.enum(API_KEY_SCOPES);
26014
- var CreateMembershipApiKeyRequestSchema = z46.object({
26015
- name: z46.string().min(1).max(255),
26016
- scopes: z46.array(ApiKeyScopeSchema).min(1).default(["all"])
25995
+ var ApiKeyScopeSchema = z43.enum(API_KEY_SCOPES);
25996
+ var CreateMembershipApiKeyRequestSchema = z43.object({
25997
+ name: z43.string().min(1).max(255),
25998
+ scopes: z43.array(ApiKeyScopeSchema).min(1).default(["all"])
26017
25999
  });
26018
26000
 
26019
26001
  // ../../packages/api/dist/types/notification.js
26020
- import { z as z47 } from "zod";
26021
- var NotificationChannelProvider = z47.enum(["slack"]);
26022
- var NotificationDeliveryChannel = z47.enum(["email", "slack"]);
26023
- var NotificationType = z47.enum([
26002
+ import { z as z44 } from "zod";
26003
+ var NotificationChannelProvider = z44.enum(["slack"]);
26004
+ var NotificationDeliveryChannel = z44.enum(["email", "slack"]);
26005
+ var NotificationType = z44.enum([
26024
26006
  "workflow_auto_disabled",
26025
26007
  "trigger_failed",
26026
26008
  "balance_auto_refilled",
@@ -26032,78 +26014,78 @@ var NotificationType = z47.enum([
26032
26014
  "crm_reply_received",
26033
26015
  "crm_task_due"
26034
26016
  ]);
26035
- var NotificationPreferencesSchema = z47.record(NotificationType, z47.array(NotificationDeliveryChannel));
26036
- var WorkflowAutoDisabledPayloadSchema = z47.object({
26037
- type: z47.literal("workflow_auto_disabled"),
26038
- workflowId: z47.string(),
26039
- workflowName: z47.string(),
26040
- reason: z47.string()
26017
+ var NotificationPreferencesSchema = z44.record(NotificationType, z44.array(NotificationDeliveryChannel));
26018
+ var WorkflowAutoDisabledPayloadSchema = z44.object({
26019
+ type: z44.literal("workflow_auto_disabled"),
26020
+ workflowId: z44.string(),
26021
+ workflowName: z44.string(),
26022
+ reason: z44.string()
26041
26023
  });
26042
- var TriggerFailedPayloadSchema = z47.object({
26043
- type: z47.literal("trigger_failed"),
26044
- workflowId: z47.string(),
26045
- workflowName: z47.string(),
26046
- triggerId: z47.string(),
26047
- reason: z47.string()
26024
+ var TriggerFailedPayloadSchema = z44.object({
26025
+ type: z44.literal("trigger_failed"),
26026
+ workflowId: z44.string(),
26027
+ workflowName: z44.string(),
26028
+ triggerId: z44.string(),
26029
+ reason: z44.string()
26048
26030
  });
26049
- var BalanceAutoRefilledPayloadSchema = z47.object({
26050
- type: z47.literal("balance_auto_refilled"),
26051
- amountDollars: z47.number(),
26052
- newBalanceDollars: z47.number()
26031
+ var BalanceAutoRefilledPayloadSchema = z44.object({
26032
+ type: z44.literal("balance_auto_refilled"),
26033
+ amountDollars: z44.number(),
26034
+ newBalanceDollars: z44.number()
26053
26035
  });
26054
- var BalanceLowPayloadSchema = z47.object({
26055
- type: z47.literal("balance_low"),
26056
- balanceDollars: z47.number()
26036
+ var BalanceLowPayloadSchema = z44.object({
26037
+ type: z44.literal("balance_low"),
26038
+ balanceDollars: z44.number()
26057
26039
  });
26058
- var CredentialRevokedPayloadSchema = z47.object({
26059
- type: z47.literal("credential_revoked"),
26060
- credentialTitle: z47.string(),
26061
- service: z47.string()
26040
+ var CredentialRevokedPayloadSchema = z44.object({
26041
+ type: z44.literal("credential_revoked"),
26042
+ credentialTitle: z44.string(),
26043
+ service: z44.string()
26062
26044
  });
26063
- var WorkflowSharedPayloadSchema = z47.object({
26064
- type: z47.literal("workflow_shared"),
26065
- workflowId: z47.string(),
26066
- workflowName: z47.string(),
26045
+ var WorkflowSharedPayloadSchema = z44.object({
26046
+ type: z44.literal("workflow_shared"),
26047
+ workflowId: z44.string(),
26048
+ workflowName: z44.string(),
26067
26049
  /** The role the recipient was granted (`viewer` or `runner`).
26068
26050
  * Stored as a plain string so this schema doesn't have to import
26069
26051
  * the workflow-collaborator role enum and stay in lock-step with
26070
26052
  * it. The email service maps it to friendly copy. */
26071
- role: z47.string(),
26053
+ role: z44.string(),
26072
26054
  /** Display name (or email fallback) of the user who shared. Used
26073
26055
  * in the email subject + subtitle copy. */
26074
- sharedByName: z47.string()
26056
+ sharedByName: z44.string()
26075
26057
  });
26076
- var CredentialSharedPayloadSchema = z47.object({
26077
- type: z47.literal("credential_shared"),
26078
- credentialId: z47.string(),
26079
- credentialTitle: z47.string(),
26080
- service: z47.string(),
26058
+ var CredentialSharedPayloadSchema = z44.object({
26059
+ type: z44.literal("credential_shared"),
26060
+ credentialId: z44.string(),
26061
+ credentialTitle: z44.string(),
26062
+ service: z44.string(),
26081
26063
  /** Display name (or email fallback) of the user who shared. */
26082
- sharedByName: z47.string()
26064
+ sharedByName: z44.string()
26083
26065
  });
26084
- var DatabaseSharedPayloadSchema = z47.object({
26085
- type: z47.literal("database_shared"),
26086
- databaseId: z47.string(),
26087
- databaseName: z47.string(),
26066
+ var DatabaseSharedPayloadSchema = z44.object({
26067
+ type: z44.literal("database_shared"),
26068
+ databaseId: z44.string(),
26069
+ databaseName: z44.string(),
26088
26070
  /** The role the recipient was granted. Stored as a plain string so
26089
26071
  * this schema doesn't import the database-collaborator role enum. */
26090
- role: z47.string(),
26072
+ role: z44.string(),
26091
26073
  /** Display name (or email fallback) of the user who shared. */
26092
- sharedByName: z47.string()
26074
+ sharedByName: z44.string()
26093
26075
  });
26094
- var CrmReplyReceivedPayloadSchema = z47.object({
26095
- type: z47.literal("crm_reply_received"),
26096
- conversationId: z47.string(),
26076
+ var CrmReplyReceivedPayloadSchema = z44.object({
26077
+ type: z44.literal("crm_reply_received"),
26078
+ conversationId: z44.string(),
26097
26079
  /** Person's display name, or their email address as a fallback. */
26098
- fromName: z47.string(),
26099
- preview: z47.string()
26080
+ fromName: z44.string(),
26081
+ preview: z44.string()
26100
26082
  });
26101
- var CrmTaskDuePayloadSchema = z47.object({
26102
- type: z47.literal("crm_task_due"),
26103
- taskId: z47.string(),
26104
- taskTitle: z47.string()
26083
+ var CrmTaskDuePayloadSchema = z44.object({
26084
+ type: z44.literal("crm_task_due"),
26085
+ taskId: z44.string(),
26086
+ taskTitle: z44.string()
26105
26087
  });
26106
- var NotificationPayloadSchema = z47.discriminatedUnion("type", [
26088
+ var NotificationPayloadSchema = z44.discriminatedUnion("type", [
26107
26089
  WorkflowAutoDisabledPayloadSchema,
26108
26090
  TriggerFailedPayloadSchema,
26109
26091
  BalanceAutoRefilledPayloadSchema,
@@ -26115,11 +26097,11 @@ var NotificationPayloadSchema = z47.discriminatedUnion("type", [
26115
26097
  CrmReplyReceivedPayloadSchema,
26116
26098
  CrmTaskDuePayloadSchema
26117
26099
  ]);
26118
- var ConnectNotificationChannelRequestSchema = z47.object({
26119
- credentialId: z47.string().min(1)
26100
+ var ConnectNotificationChannelRequestSchema = z44.object({
26101
+ credentialId: z44.string().min(1)
26120
26102
  });
26121
- var SetNotificationChannelAddressRequestSchema = z47.object({
26122
- address: z47.string().min(1)
26103
+ var SetNotificationChannelAddressRequestSchema = z44.object({
26104
+ address: z44.string().min(1)
26123
26105
  });
26124
26106
 
26125
26107
  // ../../packages/api/dist/types/organizationOAuthConnection.js
@@ -26362,6 +26344,11 @@ var OAUTH_PROVIDER_GROUPS = {
26362
26344
  title: "Bullhorn",
26363
26345
  iconUrl: "https://icons.generalinput.com/bullhorn.png",
26364
26346
  services: ["bullhorn"]
26347
+ },
26348
+ videoask: {
26349
+ title: "VideoAsk",
26350
+ iconUrl: "https://icons.generalinput.com/videoask.png",
26351
+ services: ["videoask"]
26365
26352
  }
26366
26353
  };
26367
26354
 
@@ -26385,143 +26372,153 @@ var PERSONAL_OAUTH_PROVIDER_GROUPS = {
26385
26372
  };
26386
26373
 
26387
26374
  // ../../packages/api/dist/types/prompt.js
26388
- import { z as z48 } from "zod";
26389
- var PromptWorkflowTypeSchema = z48.enum(["code", "agent"]);
26390
- var PromptStatusSchema = z48.enum(["draft", "published"]);
26391
- var PromptCachedServiceSchema = z48.object({
26392
- slug: z48.string(),
26393
- name: z48.string(),
26394
- iconUrl: z48.string(),
26395
- category: z48.string().optional()
26375
+ import { z as z45 } from "zod";
26376
+ var PromptWorkflowTypeSchema = z45.enum(["code", "agent"]);
26377
+ var PromptStatusSchema = z45.enum(["draft", "published"]);
26378
+ var PromptCachedServiceSchema = z45.object({
26379
+ slug: z45.string(),
26380
+ name: z45.string(),
26381
+ iconUrl: z45.string(),
26382
+ category: z45.string().optional()
26396
26383
  });
26397
- var PromptIntegrationSchema = z48.object({
26398
- service: z48.string(),
26399
- title: z48.string(),
26400
- iconUrl: z48.string()
26384
+ var PromptIntegrationSchema = z45.object({
26385
+ service: z45.string(),
26386
+ title: z45.string(),
26387
+ iconUrl: z45.string()
26401
26388
  });
26402
- var PromptFaqSchema = z48.object({
26403
- question: z48.string(),
26404
- answer: z48.string()
26389
+ var PromptFaqSchema = z45.object({
26390
+ question: z45.string(),
26391
+ answer: z45.string()
26405
26392
  });
26406
- var PromptExampleOutputSchema = z48.object({
26407
- kind: z48.enum(["text", "image"]),
26408
- value: z48.string()
26393
+ var PromptExampleOutputSchema = z45.object({
26394
+ kind: z45.enum(["text", "image"]),
26395
+ value: z45.string()
26409
26396
  });
26410
- var PromptCategorySchema = z48.object({
26411
- id: z48.string(),
26412
- slug: z48.string(),
26413
- name: z48.string(),
26414
- description: z48.string().nullable(),
26415
- ogImageUrl: z48.string().nullable(),
26416
- icon: z48.string(),
26417
- sortOrder: z48.number(),
26418
- updatedAt: z48.string()
26397
+ var PromptCategorySchema = z45.object({
26398
+ id: z45.string(),
26399
+ slug: z45.string(),
26400
+ name: z45.string(),
26401
+ description: z45.string().nullable(),
26402
+ ogImageUrl: z45.string().nullable(),
26403
+ icon: z45.string(),
26404
+ sortOrder: z45.number(),
26405
+ updatedAt: z45.string()
26419
26406
  });
26420
- var PromptUseCaseSchema = z48.object({
26421
- id: z48.string(),
26422
- slug: z48.string(),
26423
- name: z48.string(),
26424
- description: z48.string().nullable(),
26425
- ogImageUrl: z48.string().nullable(),
26426
- icon: z48.string(),
26427
- sortOrder: z48.number(),
26428
- updatedAt: z48.string()
26407
+ var PromptUseCaseSchema = z45.object({
26408
+ id: z45.string(),
26409
+ slug: z45.string(),
26410
+ name: z45.string(),
26411
+ description: z45.string().nullable(),
26412
+ ogImageUrl: z45.string().nullable(),
26413
+ icon: z45.string(),
26414
+ sortOrder: z45.number(),
26415
+ updatedAt: z45.string()
26429
26416
  });
26430
- var PromptSummarySchema = z48.object({
26431
- id: z48.string(),
26432
- slug: z48.string(),
26433
- title: z48.string(),
26434
- subtitle: z48.string(),
26435
- ogImageUrl: z48.string().nullable(),
26417
+ var PromptSummarySchema = z45.object({
26418
+ id: z45.string(),
26419
+ slug: z45.string(),
26420
+ title: z45.string(),
26421
+ subtitle: z45.string(),
26422
+ ogImageUrl: z45.string().nullable(),
26436
26423
  workflowType: PromptWorkflowTypeSchema,
26437
26424
  status: PromptStatusSchema,
26438
- services: z48.array(PromptCachedServiceSchema),
26439
- publishedAt: z48.string().nullable(),
26440
- updatedAt: z48.string()
26425
+ services: z45.array(PromptCachedServiceSchema),
26426
+ publishedAt: z45.string().nullable(),
26427
+ updatedAt: z45.string()
26441
26428
  });
26442
- var PromptDetailSchema = z48.object({
26443
- id: z48.string(),
26444
- slug: z48.string(),
26445
- title: z48.string(),
26446
- metaTitle: z48.string().nullable(),
26447
- subtitle: z48.string(),
26448
- whatItDoes: z48.array(z48.string()),
26449
- whatYoullNeed: z48.array(z48.string()),
26450
- howToCustomize: z48.array(z48.string()),
26451
- promptDoc: z48.unknown(),
26429
+ var PromptDetailSchema = z45.object({
26430
+ id: z45.string(),
26431
+ slug: z45.string(),
26432
+ title: z45.string(),
26433
+ metaTitle: z45.string().nullable(),
26434
+ subtitle: z45.string(),
26435
+ whatItDoes: z45.array(z45.string()),
26436
+ whatYoullNeed: z45.array(z45.string()),
26437
+ howToCustomize: z45.array(z45.string()),
26438
+ promptDoc: z45.unknown(),
26452
26439
  exampleOutput: PromptExampleOutputSchema.nullable(),
26453
- faqs: z48.array(PromptFaqSchema),
26454
- ctaTitle: z48.string().nullable(),
26455
- ctaDescription: z48.string().nullable(),
26456
- ogImageUrl: z48.string().nullable(),
26457
- services: z48.array(PromptCachedServiceSchema),
26440
+ faqs: z45.array(PromptFaqSchema),
26441
+ ctaTitle: z45.string().nullable(),
26442
+ ctaDescription: z45.string().nullable(),
26443
+ ogImageUrl: z45.string().nullable(),
26444
+ services: z45.array(PromptCachedServiceSchema),
26458
26445
  workflowType: PromptWorkflowTypeSchema,
26459
26446
  status: PromptStatusSchema,
26460
- categories: z48.array(PromptCategorySchema),
26461
- useCases: z48.array(PromptUseCaseSchema),
26462
- relatedPrompts: z48.array(PromptSummarySchema),
26463
- publishedAt: z48.string().nullable()
26447
+ categories: z45.array(PromptCategorySchema),
26448
+ useCases: z45.array(PromptUseCaseSchema),
26449
+ relatedPrompts: z45.array(PromptSummarySchema),
26450
+ publishedAt: z45.string().nullable()
26451
+ });
26452
+
26453
+ // ../../packages/api/dist/types/voiceDictation.js
26454
+ import { z as z46 } from "zod";
26455
+ var VoiceDictationSessionEndRequestSchema = z46.object({
26456
+ audioSeconds: z46.number().positive().max(900)
26457
+ });
26458
+ var VoiceDictationComposeRequestSchema = z46.object({
26459
+ existingText: z46.string().max(5e4),
26460
+ transcript: z46.string().trim().min(1).max(5e4)
26464
26461
  });
26465
26462
 
26466
26463
  // ../../packages/api/dist/types/globalSearch.js
26467
- import { z as z49 } from "zod";
26468
- var GlobalSearchRequestSchema2 = z49.object({
26469
- query: z49.string().min(1).max(200),
26464
+ import { z as z47 } from "zod";
26465
+ var GlobalSearchRequestSchema2 = z47.object({
26466
+ query: z47.string().min(1).max(200),
26470
26467
  // Per-entity cap; the response holds up to one block of this many per type.
26471
- limitPerType: z49.number().int().min(1).max(20).default(6)
26468
+ limitPerType: z47.number().int().min(1).max(20).default(6)
26472
26469
  });
26473
- var GlobalSearchRecentsRequestSchema = z49.object({
26474
- limitPerType: z49.number().int().min(1).max(20).default(5)
26470
+ var GlobalSearchRecentsRequestSchema = z47.object({
26471
+ limitPerType: z47.number().int().min(1).max(20).default(5)
26475
26472
  });
26476
26473
 
26477
26474
  // ../../packages/api/dist/types/commandCenter.js
26478
- import { z as z50 } from "zod";
26479
- var CommandCenterTileLayoutSchema = z50.object({
26480
- x: z50.number().int().min(0),
26481
- y: z50.number().int().min(0),
26482
- w: z50.number().int().min(1),
26483
- h: z50.number().int().min(1)
26475
+ import { z as z48 } from "zod";
26476
+ var CommandCenterTileLayoutSchema = z48.object({
26477
+ x: z48.number().int().min(0),
26478
+ y: z48.number().int().min(0),
26479
+ w: z48.number().int().min(1),
26480
+ h: z48.number().int().min(1)
26484
26481
  });
26485
26482
 
26486
26483
  // ../../packages/api/dist/types/cli/exec.js
26487
- import { z as z51 } from "zod";
26488
- var CodeExecutionOutputLineSchema = z51.discriminatedUnion("type", [
26489
- z51.object({
26490
- type: z51.literal("log"),
26491
- level: z51.enum(["info", "warn", "error"]),
26492
- message: z51.string(),
26493
- data: z51.unknown().optional()
26484
+ import { z as z49 } from "zod";
26485
+ var CodeExecutionOutputLineSchema = z49.discriminatedUnion("type", [
26486
+ z49.object({
26487
+ type: z49.literal("log"),
26488
+ level: z49.enum(["info", "warn", "error"]),
26489
+ message: z49.string(),
26490
+ data: z49.unknown().optional()
26494
26491
  }),
26495
- z51.object({
26496
- type: z51.literal("result"),
26497
- data: z51.unknown()
26492
+ z49.object({
26493
+ type: z49.literal("result"),
26494
+ data: z49.unknown()
26498
26495
  }),
26499
- z51.object({
26500
- type: z51.literal("error"),
26501
- error: z51.string(),
26502
- stack: z51.string().optional()
26496
+ z49.object({
26497
+ type: z49.literal("error"),
26498
+ error: z49.string(),
26499
+ stack: z49.string().optional()
26503
26500
  })
26504
26501
  ]);
26505
- var CodeExecutionResultSchema = z51.discriminatedUnion("success", [
26506
- z51.object({
26507
- success: z51.literal(true),
26508
- result: z51.unknown(),
26509
- logs: z51.array(z51.object({
26510
- level: z51.string(),
26511
- message: z51.string(),
26512
- data: z51.unknown().optional()
26502
+ var CodeExecutionResultSchema = z49.discriminatedUnion("success", [
26503
+ z49.object({
26504
+ success: z49.literal(true),
26505
+ result: z49.unknown(),
26506
+ logs: z49.array(z49.object({
26507
+ level: z49.string(),
26508
+ message: z49.string(),
26509
+ data: z49.unknown().optional()
26513
26510
  })),
26514
- stderr: z51.string().optional()
26511
+ stderr: z49.string().optional()
26515
26512
  }),
26516
- z51.object({
26517
- success: z51.literal(false),
26518
- error: z51.string(),
26519
- logs: z51.array(z51.object({
26520
- level: z51.string(),
26521
- message: z51.string(),
26522
- data: z51.unknown().optional()
26513
+ z49.object({
26514
+ success: z49.literal(false),
26515
+ error: z49.string(),
26516
+ logs: z49.array(z49.object({
26517
+ level: z49.string(),
26518
+ message: z49.string(),
26519
+ data: z49.unknown().optional()
26523
26520
  })),
26524
- stderr: z51.string().optional()
26521
+ stderr: z49.string().optional()
26525
26522
  })
26526
26523
  ]);
26527
26524
 
@@ -26550,7 +26547,7 @@ function parseLeadFilterArg(raw) {
26550
26547
  printError(`Invalid --filter: not valid JSON. Example: ${FILTER_EXAMPLE}`);
26551
26548
  exit(ExitCode.InternalError);
26552
26549
  }
26553
- const parsed = z52.array(LeadFilterConditionSchema).safeParse(value);
26550
+ const parsed = z50.array(LeadFilterConditionSchema).safeParse(value);
26554
26551
  if (!parsed.success) {
26555
26552
  const issue = parsed.error.issues[0];
26556
26553
  const path = issue?.path.map(String).join(".");
@@ -27698,35 +27695,187 @@ function registerCrmContactPoints(parent) {
27698
27695
  });
27699
27696
  }
27700
27697
 
27701
- // src/commands/crm/sequences.ts
27702
- var SEQUENCE_STATUSES = [
27703
- "draft",
27704
- "queued",
27705
- "sending",
27706
- "completed",
27707
- "stopped",
27708
- "replied"
27709
- ];
27710
- function statusOrExit(value) {
27711
- if (value === void 0) return void 0;
27712
- const match = SEQUENCE_STATUSES.find((status) => status === value);
27713
- if (match === void 0) {
27714
- printError(
27715
- `Unknown --status "${value}". Expected one of: ${SEQUENCE_STATUSES.join(", ")}.`
27716
- );
27698
+ // src/commands/crm/campaigns.ts
27699
+ function registerCrmCampaigns(parent) {
27700
+ const campaigns = parent.command("campaigns").description(
27701
+ "List outbound campaigns (default), or get / create / update / delete them and manage members. Syncing to a sequencer happens in the dashboard."
27702
+ ).argument("[query]", "Match campaign name or purpose.").option("--person <id>", "List this person's campaigns instead.").option("--json", "Machine-readable output.").action(
27703
+ (query, opts) => executeCampaignsList(query, opts)
27704
+ );
27705
+ campaigns.command("get").argument("<id>", "Campaign id.").description(
27706
+ "One campaign with member and sequence rollups. Use --field to extract a value (e.g. purpose)."
27707
+ ).option("--field <path>", "Print one dotted-path value.").action(async (id, opts) => {
27708
+ try {
27709
+ printJsonOrField(await crmService.getCampaign(id), opts.field);
27710
+ } catch (error) {
27711
+ exitOnApiError(error, {
27712
+ notFoundMessage: `No campaign with id "${id}" in this workspace.`
27713
+ });
27714
+ }
27715
+ });
27716
+ campaigns.command("create").description(
27717
+ "Create a campaign. --json: { name, purpose? }. Names are unique per workspace; the purpose steers every sequence drafted into it."
27718
+ ).requiredOption("--json <body>", "JSON campaign definition.").action(async (opts) => {
27719
+ try {
27720
+ printJson(
27721
+ await crmService.createCampaign(parseJsonObjectArg(opts.json))
27722
+ );
27723
+ } catch (error) {
27724
+ exitOnApiError(error);
27725
+ }
27726
+ });
27727
+ campaigns.command("update").argument("<id>", "Campaign id.").description(
27728
+ "Rename a campaign or change its purpose. --json: { name, purpose? }."
27729
+ ).requiredOption("--json <body>", "JSON campaign definition.").action(async (id, opts) => {
27730
+ try {
27731
+ printJson(
27732
+ await crmService.updateCampaign(id, parseJsonObjectArg(opts.json))
27733
+ );
27734
+ } catch (error) {
27735
+ exitOnApiError(error, {
27736
+ notFoundMessage: `No campaign with id "${id}" in this workspace.`
27737
+ });
27738
+ }
27739
+ });
27740
+ campaigns.command("delete").argument("<id>", "Campaign id.").description("Delete a campaign. Its sequence drafts are removed with it.").action(async (id) => {
27741
+ try {
27742
+ await crmService.deleteCampaign(id);
27743
+ printSuccess("Campaign deleted.");
27744
+ } catch (error) {
27745
+ exitOnApiError(error, {
27746
+ notFoundMessage: `No campaign with id "${id}" in this workspace.`
27747
+ });
27748
+ }
27749
+ });
27750
+ campaigns.command("members").argument("<id>", "Campaign id.").argument("[query]", "Match member name or company.").description("The campaign's people with their draft state.").option("--json", "Machine-readable output.").action(
27751
+ async (id, query, opts) => executeMembersList(id, query, opts)
27752
+ );
27753
+ campaigns.command("add").argument("<campaignId>", "Campaign id.").argument("<personIds...>", "Person ids to add as members.").description(
27754
+ "Add people to a campaign. Members get their sequences drafted from the campaign page."
27755
+ ).action(async (campaignId, personIds) => {
27756
+ try {
27757
+ const { addedPersonIds } = await crmService.addCampaignPeople(
27758
+ campaignId,
27759
+ personIds
27760
+ );
27761
+ printSuccess(
27762
+ `Added ${addedPersonIds.length} member(s) to the campaign.`
27763
+ );
27764
+ } catch (error) {
27765
+ exitOnApiError(error);
27766
+ }
27767
+ });
27768
+ campaigns.command("remove").argument("<campaignId>", "Campaign id.").argument("<personIds...>", "Person ids to remove.").description(
27769
+ "Remove members and their drafts in this campaign. Leads already synced to a linked sequencer are deleted there too."
27770
+ ).action(async (campaignId, personIds) => {
27771
+ try {
27772
+ const { removedPersonIds } = await crmService.removeCampaignPeople(
27773
+ campaignId,
27774
+ personIds
27775
+ );
27776
+ printSuccess(
27777
+ `Removed ${removedPersonIds.length} member(s) from the campaign.`
27778
+ );
27779
+ } catch (error) {
27780
+ exitOnApiError(error);
27781
+ }
27782
+ });
27783
+ }
27784
+ async function executeCampaignsList(query, opts) {
27785
+ if (opts.person && query) {
27786
+ printError("Pass either a query or --person, not both.");
27717
27787
  exit(ExitCode.InternalError);
27718
27788
  }
27719
- return match;
27789
+ try {
27790
+ if (opts.person) {
27791
+ const results2 = await crmService.listPersonCampaigns(opts.person);
27792
+ if (opts.json) {
27793
+ printJson({ campaigns: results2 });
27794
+ return;
27795
+ }
27796
+ if (results2.length === 0) {
27797
+ process.stdout.write("Not in any campaigns.\n");
27798
+ return;
27799
+ }
27800
+ printTable(
27801
+ ["ID", "NAME", "DRAFTED", "ADDED"],
27802
+ results2.map((campaign) => [
27803
+ campaign.campaignId,
27804
+ campaign.campaignName,
27805
+ campaign.sequenceId ? "yes" : "",
27806
+ campaign.addedAt.slice(0, 10)
27807
+ ]),
27808
+ { colorFn: dimColumn(0) }
27809
+ );
27810
+ return;
27811
+ }
27812
+ const results = await crmService.listCampaigns(query);
27813
+ if (opts.json) {
27814
+ printJson({ campaigns: results });
27815
+ return;
27816
+ }
27817
+ if (results.length === 0) {
27818
+ process.stdout.write(
27819
+ query ? "No campaigns match.\n" : "No campaigns yet.\n"
27820
+ );
27821
+ return;
27822
+ }
27823
+ printTable(
27824
+ ["ID", "NAME", "PEOPLE", "SEQUENCES", "EXPORTED", "UPDATED"],
27825
+ results.map((campaign) => [
27826
+ campaign.id,
27827
+ campaign.name,
27828
+ String(campaign.personCount),
27829
+ String(campaign.sequenceCount),
27830
+ campaign.exportedTo.join(","),
27831
+ campaign.updatedAt.slice(0, 10)
27832
+ ]),
27833
+ { colorFn: dimColumn(0) }
27834
+ );
27835
+ } catch (error) {
27836
+ exitOnApiError(error);
27837
+ }
27838
+ }
27839
+ async function executeMembersList(campaignId, query, opts) {
27840
+ try {
27841
+ const results = await crmService.listCampaignMembers(campaignId, query);
27842
+ if (opts.json) {
27843
+ printJson({ members: results });
27844
+ return;
27845
+ }
27846
+ if (results.length === 0) {
27847
+ process.stdout.write(query ? "No members match.\n" : "No members yet.\n");
27848
+ return;
27849
+ }
27850
+ printTable(
27851
+ ["PERSON", "NAME", "COMPANY", "STEPS", "TO", "EXPORTED", "ADDED"],
27852
+ results.map((member) => [
27853
+ member.id,
27854
+ member.personName,
27855
+ member.personCompanyName ?? "",
27856
+ member.sequenceStepCount === null ? "" : String(member.sequenceStepCount),
27857
+ member.recipientEmail ?? "",
27858
+ member.exportedTo.join(","),
27859
+ member.addedAt.slice(0, 10)
27860
+ ]),
27861
+ { colorFn: dimColumn(0) }
27862
+ );
27863
+ } catch (error) {
27864
+ exitOnApiError(error, {
27865
+ notFoundMessage: `No campaign with id "${campaignId}" in this workspace.`
27866
+ });
27867
+ }
27720
27868
  }
27869
+
27870
+ // src/commands/crm/sequences.ts
27721
27871
  function registerCrmSequences(parent) {
27722
27872
  const sequences = parent.command("sequences").description(
27723
- "List email sequences (default), or get / create / update / delete drafts. Queueing and sending happen in the dashboard."
27724
- ).option("--person <id>", "Only this person's sequences.").option(
27725
- "--status <status>",
27726
- "Filter: draft, queued, sending, completed, stopped, or replied."
27727
- ).option("--json", "Machine-readable output.").action((opts) => executeSequencesList(opts));
27873
+ "List sequence drafts (default), or get / create / update / delete them. Every draft lives in a campaign; syncing to a sequencer happens in the dashboard."
27874
+ ).argument("[query]", "Match person name, company, or recipient.").option("--person <id>", "Only this person's drafts.").option("--campaign <id>", "Only drafts in this campaign.").option("--json", "Machine-readable output.").action(
27875
+ (query, opts) => executeSequencesList(query, opts)
27876
+ );
27728
27877
  sequences.command("get").argument("<id>", "Sequence id.").description(
27729
- "One sequence with its steps. Use --field to extract a value (e.g. status)."
27878
+ "One draft with its steps. Use --field to extract a value (e.g. campaignId)."
27730
27879
  ).option("--field <path>", "Print one dotted-path value.").action(async (id, opts) => {
27731
27880
  try {
27732
27881
  printJsonOrField(await crmService.getSequence(id), opts.field);
@@ -27737,21 +27886,23 @@ function registerCrmSequences(parent) {
27737
27886
  }
27738
27887
  });
27739
27888
  sequences.command("create").description(
27740
- "Draft a sequence for a person. --json: { steps: [{ subject?, body, waitDays }], recipientContactPointId?, emailAccountId? }. The draft stays unsent until someone queues it in the dashboard."
27741
- ).requiredOption("--person <id>", "Person the sequence targets.").requiredOption("--json <body>", "JSON sequence definition.").action(async (opts) => {
27742
- try {
27743
- printJson(
27744
- await crmService.createSequence(
27745
- opts.person,
27746
- parseJsonObjectArg(opts.json)
27747
- )
27748
- );
27749
- } catch (error) {
27750
- exitOnApiError(error);
27889
+ "Draft a sequence for a person in a campaign (adds them as a member). --json: { steps: [{ subject?, body, waitDays }], recipientContactPointId? }. A member has one draft per campaign \u2014 drafting again rewrites it."
27890
+ ).requiredOption("--person <id>", "Person the sequence targets.").requiredOption("--campaign <id>", "Campaign the draft belongs to.").requiredOption("--json <body>", "JSON sequence definition.").action(
27891
+ async (opts) => {
27892
+ try {
27893
+ printJson(
27894
+ await crmService.createSequence(opts.person, {
27895
+ ...parseJsonObjectArg(opts.json),
27896
+ campaignId: opts.campaign
27897
+ })
27898
+ );
27899
+ } catch (error) {
27900
+ exitOnApiError(error);
27901
+ }
27751
27902
  }
27752
- });
27903
+ );
27753
27904
  sequences.command("update").argument("<id>", "Sequence id.").description(
27754
- "Replace a draft wholesale (steps, recipient, inbox). Drafts only \u2014 queued or sent sequences cannot be edited."
27905
+ "Replace a draft wholesale (steps, recipient). The next campaign sync pushes the new copy to linked sequencers."
27755
27906
  ).requiredOption("--json <body>", "JSON sequence definition.").action(async (id, opts) => {
27756
27907
  try {
27757
27908
  printJson(
@@ -27763,7 +27914,7 @@ function registerCrmSequences(parent) {
27763
27914
  });
27764
27915
  }
27765
27916
  });
27766
- sequences.command("delete").argument("<id>", "Sequence id.").description("Delete a draft or finished sequence (active ones refuse).").action(async (id) => {
27917
+ sequences.command("delete").argument("<id>", "Sequence id.").description("Delete a draft. The person stays a member of the campaign.").action(async (id) => {
27767
27918
  try {
27768
27919
  await crmService.deleteSequence(id);
27769
27920
  printSuccess("Sequence deleted.");
@@ -27774,14 +27925,17 @@ function registerCrmSequences(parent) {
27774
27925
  }
27775
27926
  });
27776
27927
  }
27777
- async function executeSequencesList(opts) {
27778
- const status = statusOrExit(opts.status);
27928
+ async function executeSequencesList(query, opts) {
27929
+ if (opts.person && query) {
27930
+ printError("Pass either a query or --person, not both.");
27931
+ exit(ExitCode.InternalError);
27932
+ }
27779
27933
  try {
27780
27934
  if (opts.person) {
27781
27935
  const all = await crmService.listPersonSequences(opts.person);
27782
- const results2 = status ? all.filter((sequence) => sequence.status === status) : all;
27936
+ const results2 = opts.campaign ? all.filter((sequence) => sequence.campaignId === opts.campaign) : all;
27783
27937
  if (opts.json) {
27784
- printJson(results2);
27938
+ printJson({ sequences: results2 });
27785
27939
  return;
27786
27940
  }
27787
27941
  if (results2.length === 0) {
@@ -27789,10 +27943,10 @@ async function executeSequencesList(opts) {
27789
27943
  return;
27790
27944
  }
27791
27945
  printTable(
27792
- ["ID", "STATUS", "STEPS", "RECIPIENT", "UPDATED"],
27946
+ ["ID", "CAMPAIGN", "STEPS", "TO", "UPDATED"],
27793
27947
  results2.map((sequence) => [
27794
27948
  sequence.id,
27795
- sequence.status,
27949
+ sequence.campaignName,
27796
27950
  String(sequence.steps.length),
27797
27951
  sequence.recipientEmail ?? "",
27798
27952
  sequence.updatedAt.slice(0, 10)
@@ -27801,9 +27955,12 @@ async function executeSequencesList(opts) {
27801
27955
  );
27802
27956
  return;
27803
27957
  }
27804
- const results = await crmService.listSequences({ status });
27958
+ const results = await crmService.listSequences({
27959
+ query,
27960
+ campaignId: opts.campaign
27961
+ });
27805
27962
  if (opts.json) {
27806
- printJson(results);
27963
+ printJson({ sequences: results });
27807
27964
  return;
27808
27965
  }
27809
27966
  if (results.length === 0) {
@@ -27811,13 +27968,14 @@ async function executeSequencesList(opts) {
27811
27968
  return;
27812
27969
  }
27813
27970
  printTable(
27814
- ["ID", "PERSON", "STATUS", "STEPS", "RECIPIENT", "UPDATED"],
27971
+ ["ID", "PERSON", "CAMPAIGN", "STEPS", "TO", "EXPORTED", "UPDATED"],
27815
27972
  results.map((sequence) => [
27816
27973
  sequence.id,
27817
27974
  sequence.personName,
27818
- sequence.status,
27975
+ sequence.campaignName,
27819
27976
  String(sequence.stepCount),
27820
27977
  sequence.recipientEmail ?? "",
27978
+ sequence.exportedTo.join(","),
27821
27979
  sequence.updatedAt.slice(0, 10)
27822
27980
  ]),
27823
27981
  { colorFn: dimColumn(0) }
@@ -27827,51 +27985,6 @@ async function executeSequencesList(opts) {
27827
27985
  }
27828
27986
  }
27829
27987
 
27830
- // src/commands/crm/skills.ts
27831
- function registerCrmSkills(parent) {
27832
- const skills = parent.command("skills").description(
27833
- "List the workspace's agent skill playbooks (default), or get one's content."
27834
- ).option("--json", "Machine-readable output.").action((opts) => executeSkillsList(opts));
27835
- skills.command("get").argument("<id>", "Skill id (e.g. draft-sequence-person).").description(
27836
- "A skill's playbook content \u2014 the org's customized variant when one exists, else the default. --json for the full record."
27837
- ).option("--json", "Full record: content, default content, customization.").action(async (id, opts) => {
27838
- try {
27839
- const skill = await crmService.getSkill(id);
27840
- if (opts.json) {
27841
- printJson(skill);
27842
- return;
27843
- }
27844
- process.stdout.write(`${skill.content}
27845
- `);
27846
- } catch (error) {
27847
- exitOnApiError(error, {
27848
- notFoundMessage: `No skill "${id}". Run \`geni crm skills\` to list ids.`
27849
- });
27850
- }
27851
- });
27852
- }
27853
- async function executeSkillsList(opts) {
27854
- try {
27855
- const results = await crmService.listSkills();
27856
- if (opts.json) {
27857
- printJson(results);
27858
- return;
27859
- }
27860
- printTable(
27861
- ["ID", "NAME", "CUSTOMIZED", "DESCRIPTION"],
27862
- results.map((skill) => [
27863
- skill.id,
27864
- skill.name,
27865
- skill.custom ? "yes" : "",
27866
- skill.description
27867
- ]),
27868
- { colorFn: dimColumn(0) }
27869
- );
27870
- } catch (error) {
27871
- exitOnApiError(error);
27872
- }
27873
- }
27874
-
27875
27988
  // src/commands/crm/waterfalls.ts
27876
27989
  function registerCrmWaterfalls(parent) {
27877
27990
  parent.command("waterfalls").description(
@@ -28032,8 +28145,8 @@ function registerCrmCommands(program2) {
28032
28145
  registerCrmFields(crm);
28033
28146
  registerCrmEmployments(crm);
28034
28147
  registerCrmContactPoints(crm);
28148
+ registerCrmCampaigns(crm);
28035
28149
  registerCrmSequences(crm);
28036
- registerCrmSkills(crm);
28037
28150
  registerCrmWaterfalls(crm);
28038
28151
  registerCrmEnrich(crm);
28039
28152
  crm.action(() => crm.help());
@@ -28246,10 +28359,10 @@ function printReport(checks) {
28246
28359
  import { spawn as spawn3, execFileSync } from "child_process";
28247
28360
  import { realpathSync } from "fs";
28248
28361
  import { sep as sep2 } from "path";
28249
- import { z as z53 } from "zod";
28362
+ import { z as z51 } from "zod";
28250
28363
  import semver from "semver";
28251
28364
  var PACKAGE_NAME = "@general-input/cli";
28252
- var registryLatestSchema = z53.object({ version: z53.string() });
28365
+ var registryLatestSchema = z51.object({ version: z51.string() });
28253
28366
  function registerUpgradeCommand(program2) {
28254
28367
  program2.command("upgrade").description(
28255
28368
  "Upgrade geni to the latest published version. Checks the npm registry and reinstalls via `npm install -g` when this install is npm-managed. Use --check to only report whether a newer version exists."