@general-input/cli 0.12.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/cli.js +1020 -906
  2. package/dist/cli.js.map +1 -1
  3. package/package.json +5 -5
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();
@@ -18219,7 +18219,7 @@ function buildClientLabel() {
18219
18219
  return `geni CLI on ${hostname()}`;
18220
18220
  }
18221
18221
  function sleep(ms) {
18222
- return new Promise((resolve21) => setTimeout(resolve21, ms));
18222
+ return new Promise((resolve22) => setTimeout(resolve22, ms));
18223
18223
  }
18224
18224
 
18225
18225
  // src/services/WorkspaceService.ts
@@ -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.14.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",
@@ -19056,7 +19056,13 @@ import {
19056
19056
  } from "fs";
19057
19057
  import { join as join3, relative, sep } from "path";
19058
19058
  var RESOURCE_MARKER_FILE = ".geni-resource.json";
19059
- var SKIP_DIRS = /* @__PURE__ */ new Set(["node_modules", ".git", "dist", ".turbo"]);
19059
+ var SKIP_DIRS = /* @__PURE__ */ new Set([
19060
+ "node_modules",
19061
+ ".git",
19062
+ "dist",
19063
+ ".turbo",
19064
+ "geni-skills"
19065
+ ]);
19060
19066
  function readMarker(dir) {
19061
19067
  const path = join3(dir, RESOURCE_MARKER_FILE);
19062
19068
  if (!existsSync2(path)) return null;
@@ -19155,12 +19161,12 @@ async function packResourceDir(dir) {
19155
19161
  }
19156
19162
  async function extractBundle(dir, buffer) {
19157
19163
  mkdirSync3(dir, { recursive: true });
19158
- await new Promise((resolve21, reject) => {
19164
+ await new Promise((resolve22, reject) => {
19159
19165
  const unpack = extract({
19160
19166
  cwd: dir,
19161
19167
  filter: (path) => !SKIP_DIRS.has(path.split("/")[0])
19162
19168
  });
19163
- unpack.on("close", resolve21);
19169
+ unpack.on("close", resolve22);
19164
19170
  unpack.on("error", reject);
19165
19171
  Readable.from(buffer).on("error", reject).pipe(unpack);
19166
19172
  });
@@ -19333,10 +19339,6 @@ var WorkflowAuthoringService = class {
19333
19339
  const { client } = await this.sessionContext.requireAuthed();
19334
19340
  return client.workflows.clearHandlerCache(id);
19335
19341
  }
19336
- async spec(type) {
19337
- const { client } = await this.sessionContext.requireAuthed();
19338
- return client.workflows.spec(type);
19339
- }
19340
19342
  async listTriggers(query) {
19341
19343
  const { client } = await this.sessionContext.requireAuthed();
19342
19344
  return client.workflows.listTriggers(query);
@@ -19401,10 +19403,17 @@ Write the instructions the loading agent should follow.
19401
19403
  const bundleKey = await this.uploadBundle(args.id, args.dir);
19402
19404
  return client.skills.publish(args.id, { bundleKey });
19403
19405
  }
19404
- async spec() {
19406
+ /**
19407
+ * Write a platform skill's full bundle (SKILL.md + references/) into `dir`.
19408
+ * Read-only reference material — no resource marker, never published.
19409
+ */
19410
+ async loadPlatformSkill(args) {
19405
19411
  const { client } = await this.sessionContext.requireAuthed();
19406
- const { spec } = await client.skills.spec();
19407
- return spec;
19412
+ const skill = await client.skills.platform(args.name);
19413
+ for (const file of skill.files) {
19414
+ this.writeFileInto(args.dir, file.path, file.content);
19415
+ }
19416
+ return { fileCount: skill.files.length, description: skill.description };
19408
19417
  }
19409
19418
  /** Tar `dir`, PUT it to a presigned URL, return the staged `bundleKey`. */
19410
19419
  async uploadBundle(id, dir) {
@@ -19481,7 +19490,7 @@ var CrmService = class {
19481
19490
  async deleteCompanies(ids) {
19482
19491
  return (await this.crm()).deleteCompanies(ids);
19483
19492
  }
19484
- // ── Sequences (reads + draft CRUD; queueing is dashboard-only) ─────
19493
+ // ── Sequences (reads + draft CRUD; syncing is dashboard-only) ──────
19485
19494
  async listSequences(args) {
19486
19495
  return (await this.crm()).listSequences(args);
19487
19496
  }
@@ -19500,12 +19509,33 @@ var CrmService = class {
19500
19509
  async deleteSequence(id) {
19501
19510
  await (await this.crm()).deleteSequence(id);
19502
19511
  }
19503
- // ── Skills (read-only) ─────────────────────────────────────────────
19504
- async listSkills() {
19505
- return (await this.crm()).listSkills();
19512
+ // ── Campaigns (CRUD + membership; syncing is dashboard-only) ────────
19513
+ async listCampaigns(query) {
19514
+ return (await this.crm()).listCampaigns(query);
19515
+ }
19516
+ async getCampaign(id) {
19517
+ return (await this.crm()).getCampaign(id);
19518
+ }
19519
+ async createCampaign(body) {
19520
+ return (await this.crm()).createCampaign(body);
19521
+ }
19522
+ async updateCampaign(id, body) {
19523
+ return (await this.crm()).updateCampaign(id, body);
19524
+ }
19525
+ async deleteCampaign(id) {
19526
+ await (await this.crm()).deleteCampaign(id);
19527
+ }
19528
+ async listCampaignMembers(campaignId, query) {
19529
+ return (await this.crm()).listCampaignMembers(campaignId, query);
19530
+ }
19531
+ async addCampaignPeople(campaignId, personIds) {
19532
+ return (await this.crm()).addCampaignPeople(campaignId, personIds);
19506
19533
  }
19507
- async getSkill(id) {
19508
- return (await this.crm()).getSkill(id);
19534
+ async removeCampaignPeople(campaignId, personIds) {
19535
+ return (await this.crm()).removeCampaignPeople(campaignId, personIds);
19536
+ }
19537
+ async listPersonCampaigns(personId) {
19538
+ return (await this.crm()).listPersonCampaigns(personId);
19509
19539
  }
19510
19540
  // ── Employments / contact points ───────────────────────────────────
19511
19541
  async addEmployment(personId, body) {
@@ -20021,10 +20051,6 @@ var WorkflowsApiClient = class {
20021
20051
  { method: "POST" }
20022
20052
  );
20023
20053
  }
20024
- async spec(type) {
20025
- this.http.requireAuthed();
20026
- return this.http.fetch(`/v1/workflows/spec/${encodeURIComponent(type)}`);
20027
- }
20028
20054
  async listTriggers(query) {
20029
20055
  this.http.requireAuthed();
20030
20056
  const suffix = query ? `?q=${encodeURIComponent(query)}` : "";
@@ -20168,12 +20194,12 @@ var CrmApiClient = class {
20168
20194
  body: { ids }
20169
20195
  });
20170
20196
  }
20171
- // ── Sequences (reads + draft CRUD — queueing is dashboard-only) ─────
20197
+ // ── Sequences (reads + draft CRUD — syncing is dashboard-only) ──────
20172
20198
  async listSequences(args) {
20173
20199
  this.http.requireAuthed();
20174
20200
  const params = new URLSearchParams();
20175
- if (args.status) params.set("status", args.status);
20176
20201
  if (args.query) params.set("q", args.query);
20202
+ if (args.campaignId) params.set("campaignId", args.campaignId);
20177
20203
  const queryString = params.toString();
20178
20204
  return this.http.fetch(
20179
20205
  `${CRM}/sequences${queryString ? `?${queryString}` : ""}`
@@ -20207,14 +20233,55 @@ var CrmApiClient = class {
20207
20233
  method: "DELETE"
20208
20234
  });
20209
20235
  }
20210
- // ── Skills (read-only) ─────────────────────────────────────────────
20211
- async listSkills() {
20236
+ // ── Campaigns (CRUD + membership — syncing is dashboard-only) ───────
20237
+ async listCampaigns(query) {
20238
+ this.http.requireAuthed();
20239
+ return this.http.fetch(`${CRM}/campaigns${query ? `?q=${enc(query)}` : ""}`);
20240
+ }
20241
+ async getCampaign(campaignId) {
20242
+ this.http.requireAuthed();
20243
+ return this.http.fetch(`${CRM}/campaigns/${enc(campaignId)}`);
20244
+ }
20245
+ async createCampaign(body) {
20246
+ this.http.requireAuthed();
20247
+ return this.http.fetch(`${CRM}/campaigns`, { method: "POST", body });
20248
+ }
20249
+ async updateCampaign(campaignId, body) {
20250
+ this.http.requireAuthed();
20251
+ return this.http.fetch(`${CRM}/campaigns/${enc(campaignId)}`, {
20252
+ method: "PUT",
20253
+ body
20254
+ });
20255
+ }
20256
+ async deleteCampaign(campaignId) {
20257
+ this.http.requireAuthed();
20258
+ await this.http.fetch(`${CRM}/campaigns/${enc(campaignId)}`, {
20259
+ method: "DELETE"
20260
+ });
20261
+ }
20262
+ async listCampaignMembers(campaignId, query) {
20263
+ this.http.requireAuthed();
20264
+ return this.http.fetch(
20265
+ `${CRM}/campaigns/${enc(campaignId)}/members${query ? `?q=${enc(query)}` : ""}`
20266
+ );
20267
+ }
20268
+ async addCampaignPeople(campaignId, personIds) {
20269
+ this.http.requireAuthed();
20270
+ return this.http.fetch(`${CRM}/campaigns/${enc(campaignId)}/people`, {
20271
+ method: "POST",
20272
+ body: { personIds }
20273
+ });
20274
+ }
20275
+ async removeCampaignPeople(campaignId, personIds) {
20212
20276
  this.http.requireAuthed();
20213
- return this.http.fetch(`${CRM}/skills`);
20277
+ return this.http.fetch(
20278
+ `${CRM}/campaigns/${enc(campaignId)}/people/remove`,
20279
+ { method: "POST", body: { personIds } }
20280
+ );
20214
20281
  }
20215
- async getSkill(skillId) {
20282
+ async listPersonCampaigns(personId) {
20216
20283
  this.http.requireAuthed();
20217
- return this.http.fetch(`${CRM}/skills/${enc(skillId)}`);
20284
+ return this.http.fetch(`${CRM}/campaigns/people/${enc(personId)}`);
20218
20285
  }
20219
20286
  // ── Employments (person sub-records) ───────────────────────────────
20220
20287
  async addEmployment(personId, body) {
@@ -20603,9 +20670,10 @@ var SkillsApiClient = class {
20603
20670
  body
20604
20671
  });
20605
20672
  }
20606
- async spec() {
20673
+ /** Read-only platform skill detail: SKILL.md plus its references/ files. */
20674
+ async platform(name) {
20607
20675
  this.http.requireAuthed();
20608
- return this.http.fetch("/v1/skills/spec");
20676
+ return this.http.fetch(`/v1/skills/platform/${encodeURIComponent(name)}`);
20609
20677
  }
20610
20678
  };
20611
20679
 
@@ -20852,11 +20920,11 @@ var ChildProcessSpawner = class {
20852
20920
  process.on("SIGINT", forwardSignal);
20853
20921
  process.on("SIGTERM", forwardSignal);
20854
20922
  try {
20855
- const exitCode = await new Promise((resolve21, reject) => {
20923
+ const exitCode = await new Promise((resolve22, reject) => {
20856
20924
  child.once("exit", (code, signal) => {
20857
- if (code !== null) resolve21(code);
20858
- else if (signal !== null) resolve21(128 + signalNumber(signal));
20859
- else resolve21(1);
20925
+ if (code !== null) resolve22(code);
20926
+ else if (signal !== null) resolve22(128 + signalNumber(signal));
20927
+ else resolve22(1);
20860
20928
  });
20861
20929
  child.once("error", (err) => reject(err));
20862
20930
  });
@@ -20869,7 +20937,7 @@ var ChildProcessSpawner = class {
20869
20937
  }
20870
20938
  };
20871
20939
  function pipeWithScrubbing(source, dest, scrubber, onChunk) {
20872
- return new Promise((resolve21) => {
20940
+ return new Promise((resolve22) => {
20873
20941
  let flushed = false;
20874
20942
  const emit = (chunk) => {
20875
20943
  if (chunk.length === 0) return;
@@ -20880,13 +20948,13 @@ function pipeWithScrubbing(source, dest, scrubber, onChunk) {
20880
20948
  if (flushed) return;
20881
20949
  flushed = true;
20882
20950
  emit(scrubber.redact("", { final: true }));
20883
- resolve21();
20951
+ resolve22();
20884
20952
  };
20885
20953
  source.on("end", finishOnce);
20886
20954
  source.on("close", finishOnce);
20887
20955
  source.on("error", () => {
20888
20956
  flushed = true;
20889
- resolve21();
20957
+ resolve22();
20890
20958
  });
20891
20959
  source.setEncoding("utf8");
20892
20960
  source.on("data", (chunk) => {
@@ -21554,7 +21622,7 @@ ${ca.caCertPem}`
21554
21622
  log: () => {
21555
21623
  }
21556
21624
  });
21557
- const port = await new Promise((resolve21, reject) => {
21625
+ const port = await new Promise((resolve22, reject) => {
21558
21626
  connectListener.once("error", reject);
21559
21627
  connectListener.listen(0, "127.0.0.1", () => {
21560
21628
  const address = connectListener.address();
@@ -21562,7 +21630,7 @@ ${ca.caCertPem}`
21562
21630
  reject(new Error("egress proxy failed to bind a TCP port"));
21563
21631
  return;
21564
21632
  }
21565
- resolve21(address.port);
21633
+ resolve22(address.port);
21566
21634
  });
21567
21635
  });
21568
21636
  const proxyUrl = `http://127.0.0.1:${port}`;
@@ -21570,7 +21638,7 @@ ${ca.caCertPem}`
21570
21638
  env: buildEgressClientEnv({ proxyUrl, caFile, bundleFile }),
21571
21639
  stop: async () => {
21572
21640
  await new Promise(
21573
- (resolve21) => connectListener.close(() => resolve21())
21641
+ (resolve22) => connectListener.close(() => resolve22())
21574
21642
  );
21575
21643
  await rm(dir, { recursive: true, force: true });
21576
21644
  }
@@ -21645,6 +21713,10 @@ function exitOnApiError(error, opts = {}) {
21645
21713
  );
21646
21714
  exit(ExitCode.NotFound);
21647
21715
  }
21716
+ if (error.status === 426) {
21717
+ printError(error.message);
21718
+ exit(ExitCode.UpgradeRequired);
21719
+ }
21648
21720
  if (error.status >= 500) {
21649
21721
  printError(
21650
21722
  `Server error (HTTP ${error.status}): ${error.message} Retry once before reporting.`
@@ -22531,7 +22603,7 @@ function registerIntegrationCommands(program2) {
22531
22603
  import { resolve as resolve2 } from "path";
22532
22604
  function registerResourceCreate(parent) {
22533
22605
  parent.command("create").description(
22534
- "Create a resource (code or agent workflow, app, or skill) and scaffold its starting files locally. Edit them, then validate and publish. Read the contract first with `geni resource spec <type>`."
22606
+ "Create a resource (code or agent workflow, app, or skill) and scaffold its starting files locally. Edit them, then validate and publish. Load the authoring skill first with `geni skills load <type>` for the contract and a worked example."
22535
22607
  ).requiredOption(
22536
22608
  "--type <type>",
22537
22609
  'Resource type: "code" (deterministic, fixed steps), "agent" (LLM-driven, variable-length tasks), "app" (interactive React mini-app with server-side handlers), or "skill" (a SKILL.md instruction bundle agents load as context).'
@@ -22569,7 +22641,7 @@ function registerResourceCreate(parent) {
22569
22641
  printInfo(`id: ${skill.id}`);
22570
22642
  printInfo(`Scaffolded ${fileCount2} file(s) into ${dir}`);
22571
22643
  printInfo(
22572
- "Next: edit SKILL.md, then `geni resource validate` and `geni resource publish`. See the contract with `geni resource spec skill`."
22644
+ "Next: edit SKILL.md, then `geni resource validate` and `geni resource publish`. The contract ships in the skill-authoring platform skill: `geni skills load skill-authoring`."
22573
22645
  );
22574
22646
  return;
22575
22647
  }
@@ -22585,8 +22657,9 @@ function registerResourceCreate(parent) {
22585
22657
  printSuccess(`Created ${detail.workflowType} resource "${detail.name}"`);
22586
22658
  printInfo(`id: ${detail.id}`);
22587
22659
  printInfo(`Scaffolded ${fileCount} file(s) into ${dir}`);
22660
+ const authoringSkill = detail.workflowType === "app" ? "app" : `${detail.workflowType}-workflow`;
22588
22661
  printInfo(
22589
- "Next: edit the files, then `geni resource validate`. See the contract with `geni resource spec " + detail.workflowType + "`."
22662
+ `Next: \`geni skills load ${authoringSkill}\` for the contract and a worked example, edit the files, then \`geni resource validate\`.`
22590
22663
  );
22591
22664
  } catch (error) {
22592
22665
  exitOnApiError(error);
@@ -23008,33 +23081,10 @@ function registerResourcePublish(parent) {
23008
23081
  });
23009
23082
  }
23010
23083
 
23011
- // src/commands/resource/spec.ts
23012
- function registerResourceSpec(parent) {
23013
- parent.command("spec <type>").description(
23014
- "Print the resource-type contract (code | agent | app | skill): required files, runtime API, allowed/forbidden patterns. Read this before editing files."
23015
- ).action(async (type) => {
23016
- try {
23017
- if (type === "skill") {
23018
- const spec = await skillAuthoringService.spec();
23019
- process.stdout.write(spec.endsWith("\n") ? spec : spec + "\n");
23020
- return;
23021
- }
23022
- const result = await workflowAuthoringService.spec(type);
23023
- process.stdout.write(
23024
- result.spec.endsWith("\n") ? result.spec : result.spec + "\n"
23025
- );
23026
- } catch (error) {
23027
- exitOnApiError(error, {
23028
- notFoundMessage: `Unknown resource type "${type}". Use code, agent, app, or skill.`
23029
- });
23030
- }
23031
- });
23032
- }
23033
-
23034
23084
  // src/commands/resource/index.ts
23035
23085
  function registerResourceCommands(program2) {
23036
23086
  const resource = program2.command("resource").alias("resources").description(
23037
- "Author resources (workflows, apps, and skills) locally against the cloud: scaffold and pull files, edit them, then validate, wire credentials, and publish. Run `geni resource spec <type>` to learn a type contract."
23087
+ "Author resources (workflows, apps, and skills) locally against the cloud: scaffold and pull files, edit them, then validate, wire credentials, and publish. Run `geni skills load <type>` first to get the type contract and a worked example."
23038
23088
  ).action(() => executeResourceList({}));
23039
23089
  registerResourceCreate(resource);
23040
23090
  registerResourceList(resource);
@@ -23043,11 +23093,10 @@ function registerResourceCommands(program2) {
23043
23093
  registerResourceValidate(resource);
23044
23094
  registerResourceConfig(resource);
23045
23095
  registerResourcePublish(resource);
23046
- registerResourceSpec(resource);
23047
23096
  resource.addHelpText(
23048
23097
  "after",
23049
23098
  `
23050
- Build loop (run \`geni resource spec <type>\` first):
23099
+ Build loop (run \`geni skills load <code-workflow|agent-workflow|app|skill-authoring>\` first):
23051
23100
  1. geni resource create --type code --name "My Resource" scaffold files + the cloud resource
23052
23101
  2. (edit the files with your editor)
23053
23102
  3. geni resource validate spec + type check, no publish
@@ -23066,7 +23115,7 @@ Commands accept the resource id as a positional, or infer it from the
23066
23115
  import { resolve as resolve9 } from "path";
23067
23116
  function registerWorkflowSetType(parent) {
23068
23117
  parent.command("set-type <type> [id]").description(
23069
- "Switch a workflow's execution type (code <-> agent). Then rewrite the files for the new type and delete the old type's. Read `geni resource spec <type>`."
23118
+ "Switch a workflow's execution type (code <-> agent). Then rewrite the files for the new type and delete the old type's. Load the new type's authoring skill: `geni skills load <type>-workflow`."
23070
23119
  ).option("--dir <path>", "Resource directory. Defaults to cwd.").option("--json", "Machine-readable output.").action(
23071
23120
  async (type, id, opts) => {
23072
23121
  if (type !== "code" && type !== "agent") {
@@ -23094,7 +23143,7 @@ function registerWorkflowSetType(parent) {
23094
23143
  );
23095
23144
  }
23096
23145
  printInfo(
23097
- `Write the ${type} files, then validate. Read the contract: \`geni resource spec ${type}\`.`
23146
+ `Write the ${type} files, then validate. Load the authoring skill first: \`geni skills load ${type}-workflow\` (its references/ hold the contract and a worked example).`
23098
23147
  );
23099
23148
  } catch (error) {
23100
23149
  exitOnApiError(error, {
@@ -23237,7 +23286,7 @@ function parseTimeout(raw) {
23237
23286
  return seconds * 1e3;
23238
23287
  }
23239
23288
  function sleep2(ms) {
23240
- return new Promise((resolve21) => setTimeout(resolve21, ms));
23289
+ return new Promise((resolve22) => setTimeout(resolve22, ms));
23241
23290
  }
23242
23291
 
23243
23292
  // src/commands/workflow/triggerSample.ts
@@ -23903,10 +23952,10 @@ import {
23903
23952
  } from "fs";
23904
23953
 
23905
23954
  // src/skills/geni.md
23906
- 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";
23955
+ 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**Load the authoring skill first.** `geni skills load\n<code-workflow|agent-workflow|app|skill-authoring>` writes the platform's\nauthoring skill for that type into `geni-skills/<name>/`: `SKILL.md` (the\nmethod), `references/spec.md` (the full contract \u2014 required files, the\nruntime API, allowed and forbidden patterns), and `references/example/`\n(a complete, validated example to mirror). Read SKILL.md and the spec,\nand copy shapes from the example. (`skill-authoring` is the one type\nwhose short spec is inline in SKILL.md, with no example.) Don't write a\nsingle file before loading 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 + (code\n workflows) TypeScript check. Exit 9 means invalid; fix what it\n reports and re-run. For apps the compile gate is the publish build,\n not validate.\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`; load the authoring skill with `geni skills load app` (its\n`references/` hold the contract, the component catalog, and a complete\nexample app). The shared commands work the same (validate, config set\nfor credential slots, publish), 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- `79` \u2014 this geni is below the server's minimum version. Run\n `geni upgrade`, then `geni skills install`, and retry.\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 resource files before loading the authoring skill\n (`geni skills load <code-workflow|agent-workflow|app|skill-authoring>`)\n and reading its spec + example. Don't try to compile or `npm install`\n them locally; let `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
23956
 
23908
23957
  // 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';
23958
+ 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
23959
 
23911
23960
  // src/lib/skills.ts
23912
23961
  var GENI_SKILL_NAME = "geni";
@@ -24087,13 +24136,39 @@ function registerSkillsUninstall(parent) {
24087
24136
  });
24088
24137
  }
24089
24138
 
24139
+ // src/commands/skills/load.ts
24140
+ import { resolve as resolve21, join as join8 } from "path";
24141
+ function registerSkillsLoad(parent) {
24142
+ parent.command("load <name>").description(
24143
+ "Download a platform skill (SKILL.md + references/) into a local directory. Load the matching authoring skill (code-workflow, agent-workflow, app, skill-authoring) before building a resource: its references/ hold the type spec and a complete worked example."
24144
+ ).option(
24145
+ "--dir <path>",
24146
+ "Destination directory. Defaults to ./geni-skills/<name>."
24147
+ ).action(async (name, opts) => {
24148
+ const dir = resolve21(opts.dir ?? join8("geni-skills", name));
24149
+ try {
24150
+ const { fileCount, description } = await skillAuthoringService.loadPlatformSkill({ name, dir });
24151
+ printSuccess(`Loaded ${name} (${fileCount} file(s)) into ${dir}`);
24152
+ printInfo(description);
24153
+ printInfo(
24154
+ `Start with ${join8(dir, "SKILL.md")}; the spec and worked example (when the skill ships them) are under ${join8(dir, "references")}/.`
24155
+ );
24156
+ } catch (error) {
24157
+ exitOnApiError(error, {
24158
+ notFoundMessage: `Platform skill "${name}" not found. Authoring skills: code-workflow, agent-workflow, app, skill-authoring.`
24159
+ });
24160
+ }
24161
+ });
24162
+ }
24163
+
24090
24164
  // src/commands/skills/index.ts
24091
24165
  function registerSkillsCommands(program2) {
24092
24166
  const skills = program2.command("skills").description(
24093
- "Install (or remove) the agent-facing geni instructions in your AI coding agent. Detects Claude Code (others coming) and writes a skill file the agent loads automatically."
24167
+ "Install (or remove) the agent-facing geni instructions in your AI coding agent, and load platform skills (authoring contracts + worked examples) into a local directory."
24094
24168
  );
24095
24169
  registerSkillsInstall(skills);
24096
24170
  registerSkillsUninstall(skills);
24171
+ registerSkillsLoad(skills);
24097
24172
  }
24098
24173
 
24099
24174
  // src/lib/options.ts
@@ -24252,7 +24327,7 @@ function parseJsonObjectArg(raw) {
24252
24327
  }
24253
24328
 
24254
24329
  // src/lib/leadFilterArg.ts
24255
- import { z as z52 } from "zod";
24330
+ import { z as z50 } from "zod";
24256
24331
 
24257
24332
  // ../../packages/crm-api/dist/types/enums.js
24258
24333
  import { z as z12 } from "zod";
@@ -24283,14 +24358,6 @@ var ReachabilitySchema = z12.enum([
24283
24358
  "mobile_only",
24284
24359
  "none"
24285
24360
  ]);
24286
- var OutreachStatusSchema = z12.enum([
24287
- "none",
24288
- "queued",
24289
- "contacted",
24290
- "replied",
24291
- "bounced",
24292
- "unsubscribed"
24293
- ]);
24294
24361
 
24295
24362
  // ../../packages/crm-api/dist/types/concurrency.js
24296
24363
  import { z as z13 } from "zod";
@@ -24304,7 +24371,6 @@ var CrmSubjectTypeSchema = z14.enum([
24304
24371
  "person",
24305
24372
  "company",
24306
24373
  "list",
24307
- "conversation",
24308
24374
  "pipeline",
24309
24375
  "card"
24310
24376
  ]);
@@ -24735,101 +24801,8 @@ var UpdateScheduledAgentRequestSchema = z25.object({
24735
24801
  }).merge(ExpectedUpdatedAtSchema);
24736
24802
 
24737
24803
  // ../../packages/crm-api/dist/types/leadFilters.js
24738
- import { z as z27 } from "zod";
24739
-
24740
- // ../../packages/crm-api/dist/types/sequence.js
24741
24804
  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([
24805
+ var LeadFilterFieldTypeSchema = z26.enum([
24833
24806
  "text",
24834
24807
  "number",
24835
24808
  "date",
@@ -24837,7 +24810,7 @@ var LeadFilterFieldTypeSchema = z27.enum([
24837
24810
  "stringArray",
24838
24811
  "boolean"
24839
24812
  ]);
24840
- var LeadFilterOperatorSchema = z27.enum([
24813
+ var LeadFilterOperatorSchema = z26.enum([
24841
24814
  // text
24842
24815
  "contains",
24843
24816
  "not_contains",
@@ -24870,16 +24843,16 @@ var LeadFilterOperatorSchema = z27.enum([
24870
24843
  "is_empty",
24871
24844
  "is_not_empty"
24872
24845
  ]);
24873
- var LeadFilterConditionSchema = z27.object({
24874
- field: z27.string().min(1).max(200),
24846
+ var LeadFilterConditionSchema = z26.object({
24847
+ field: z26.string().min(1).max(200),
24875
24848
  operator: LeadFilterOperatorSchema,
24876
24849
  // Single-value operators (contains, gt, before, in_last_days, …).
24877
- value: z27.union([z27.string().max(500), z27.number()]).optional(),
24850
+ value: z26.union([z26.string().max(500), z26.number()]).optional(),
24878
24851
  // Multi-value operators (any_of, includes_any, …).
24879
- values: z27.array(z27.string().max(500)).max(100).optional(),
24852
+ values: z26.array(z26.string().max(500)).max(100).optional(),
24880
24853
  // `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()
24854
+ min: z26.union([z26.string().max(100), z26.number()]).optional(),
24855
+ max: z26.union([z26.string().max(100), z26.number()]).optional()
24883
24856
  });
24884
24857
  function staticOptions(values) {
24885
24858
  return values.map((value) => ({
@@ -24943,13 +24916,6 @@ var PERSON_FILTER_FIELDS = [
24943
24916
  group: "Segmentation",
24944
24917
  options: staticOptions(ReachabilitySchema.options)
24945
24918
  },
24946
- {
24947
- key: "outreachStatus",
24948
- label: "Outreach status",
24949
- type: "enum",
24950
- group: "Segmentation",
24951
- options: staticOptions(OutreachStatusSchema.options)
24952
- },
24953
24919
  { key: "companyName", label: "Company name", type: "text", group: "Company" },
24954
24920
  {
24955
24921
  key: "companyDomain",
@@ -24997,13 +24963,6 @@ var PERSON_FILTER_FIELDS = [
24997
24963
  { key: "facebook", label: "Facebook", type: "text", group: "Links" },
24998
24964
  { key: "youtube", label: "YouTube", type: "text", group: "Links" },
24999
24965
  { 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
24966
  { key: "createdAt", label: "Added", type: "date", group: "Activity" },
25008
24967
  { key: "updatedAt", label: "Updated", type: "date", group: "Activity" },
25009
24968
  {
@@ -25114,28 +25073,27 @@ function leadFilterConditionsDescription(fields) {
25114
25073
  }
25115
25074
 
25116
25075
  // ../../packages/crm-api/dist/types/search.js
25117
- import { z as z28 } from "zod";
25118
- var PersonSearchFiltersSchema = z28.object({
25076
+ import { z as z27 } from "zod";
25077
+ var PersonSearchFiltersSchema = z27.object({
25119
25078
  // Scope to one company's people (the company detail People tab).
25120
- companyId: z28.uuid().optional(),
25079
+ companyId: z27.uuid().optional(),
25121
25080
  // Scope to a person list's members.
25122
- listId: z28.uuid().optional(),
25081
+ listId: z27.uuid().optional(),
25123
25082
  // 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(),
25083
+ tagIds: z27.array(z27.uuid()).optional(),
25084
+ roleCategory: z27.array(z27.string()).optional(),
25085
+ seniority: z27.array(z27.string()).optional(),
25086
+ sizeBand: z27.array(z27.string()).optional(),
25087
+ industry: z27.array(z27.string()).optional(),
25088
+ country: z27.array(z27.string()).optional(),
25089
+ reachability: z27.array(ReachabilitySchema).optional(),
25090
+ minIcpScore: z27.number().min(0).max(100).optional(),
25091
+ minEmployeeCount: z27.number().int().min(0).optional(),
25092
+ maxEmployeeCount: z27.number().int().min(0).optional(),
25135
25093
  // Column conditions, ANDed together and with the keys above.
25136
- conditions: z28.array(LeadFilterConditionSchema).max(20).optional().describe(leadFilterConditionsDescription(PERSON_FILTER_FIELDS))
25094
+ conditions: z27.array(LeadFilterConditionSchema).max(20).optional().describe(leadFilterConditionsDescription(PERSON_FILTER_FIELDS))
25137
25095
  });
25138
- var PersonSearchSortSchema = z28.enum([
25096
+ var PersonSearchSortSchema = z27.enum([
25139
25097
  "relevance",
25140
25098
  "icp_score",
25141
25099
  "recent",
@@ -25149,32 +25107,32 @@ var PersonSearchSortSchema = z28.enum([
25149
25107
  "linkedin",
25150
25108
  "enriched"
25151
25109
  ]);
25152
- var PersonSearchRequestSchema = z28.object({
25110
+ var PersonSearchRequestSchema = z27.object({
25153
25111
  // Free-text keyword query (FTS + fuzzy fallback). Omit for pure facet browse.
25154
- query: z28.string().optional(),
25112
+ query: z27.string().optional(),
25155
25113
  filters: PersonSearchFiltersSchema.optional(),
25156
25114
  sort: PersonSearchSortSchema.default("relevance"),
25157
25115
  // Direction for the column sort; omitted falls back to the sort's default.
25158
25116
  direction: LeadSortDirectionSchema.optional(),
25159
25117
  // 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),
25118
+ cursor: z27.string().nullable().optional(),
25119
+ limit: z27.number().int().min(1).max(100).default(25),
25162
25120
  // Whether to compute facet counts for this query (extra work; off for paging).
25163
- includeFacets: z28.boolean().default(false)
25121
+ includeFacets: z27.boolean().default(false)
25164
25122
  });
25165
- var CompanySearchFiltersSchema = z28.object({
25123
+ var CompanySearchFiltersSchema = z27.object({
25166
25124
  // Scope to a company list's members.
25167
- listId: z28.uuid().optional(),
25125
+ listId: z27.uuid().optional(),
25168
25126
  // 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(),
25127
+ tagIds: z27.array(z27.uuid()).optional(),
25128
+ industry: z27.array(z27.string()).optional(),
25129
+ hqCountry: z27.array(z27.string()).optional(),
25130
+ minEmployeeCount: z27.number().int().min(0).optional(),
25131
+ maxEmployeeCount: z27.number().int().min(0).optional(),
25174
25132
  // Column conditions, ANDed together and with the keys above.
25175
- conditions: z28.array(LeadFilterConditionSchema).max(20).optional().describe(leadFilterConditionsDescription(COMPANY_FILTER_FIELDS))
25133
+ conditions: z27.array(LeadFilterConditionSchema).max(20).optional().describe(leadFilterConditionsDescription(COMPANY_FILTER_FIELDS))
25176
25134
  });
25177
- var CompanySearchSortSchema = z28.enum([
25135
+ var CompanySearchSortSchema = z27.enum([
25178
25136
  "relevance",
25179
25137
  "employee_count",
25180
25138
  "recent",
@@ -25185,222 +25143,283 @@ var CompanySearchSortSchema = z28.enum([
25185
25143
  "hq",
25186
25144
  "enriched"
25187
25145
  ]);
25188
- var CompanySearchRequestSchema = z28.object({
25189
- query: z28.string().optional(),
25146
+ var CompanySearchRequestSchema = z27.object({
25147
+ query: z27.string().optional(),
25190
25148
  filters: CompanySearchFiltersSchema.optional(),
25191
25149
  sort: CompanySearchSortSchema.default("relevance"),
25192
25150
  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)
25151
+ cursor: z27.string().nullable().optional(),
25152
+ limit: z27.number().int().min(1).max(100).default(25),
25153
+ includeFacets: z27.boolean().default(false)
25196
25154
  });
25197
25155
 
25198
25156
  // ../../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),
25157
+ import { z as z28 } from "zod";
25158
+ var GlobalSearchRequestSchema = z28.object({
25159
+ query: z28.string().min(1).max(200),
25202
25160
  // Per-entity cap; the response holds up to 3 × this many results.
25203
- limitPerType: z29.number().int().min(1).max(20).default(6)
25161
+ limitPerType: z28.number().int().min(1).max(20).default(6)
25204
25162
  });
25205
25163
 
25206
25164
  // ../../packages/crm-api/dist/types/leadTools.js
25207
- import { z as z30 } from "zod";
25165
+ import { z as z29 } from "zod";
25208
25166
  var LEAD_BATCH_MAX = 100;
25209
25167
  var companyEnrichmentFields = {
25210
- legalName: z30.string().nullish(),
25211
- tagline: z30.string().nullish(),
25212
- linkedinUrl: z30.string().nullish(),
25213
- logoUrl: z30.string().nullish(),
25168
+ legalName: z29.string().nullish(),
25169
+ tagline: z29.string().nullish(),
25170
+ linkedinUrl: z29.string().nullish(),
25171
+ logoUrl: z29.string().nullish(),
25214
25172
  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(),
25173
+ industry: z29.string().nullish(),
25174
+ subIndustry: z29.string().nullish(),
25175
+ keywords: z29.array(z29.string()).max(50).nullish(),
25176
+ description: z29.string().nullish(),
25177
+ employeeCount: z29.number().int().min(0).nullish(),
25178
+ foundedYear: z29.number().int().nullish(),
25179
+ ticker: z29.string().nullish(),
25180
+ annualRevenueUsd: z29.number().min(0).nullish(),
25181
+ totalFundingUsd: z29.number().min(0).nullish(),
25182
+ lastFundingRound: z29.string().nullish(),
25225
25183
  // 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()
25184
+ lastFundingAt: z29.string().nullish(),
25185
+ investors: z29.array(z29.string()).max(50).nullish(),
25186
+ hqCity: z29.string().nullish(),
25187
+ hqRegion: z29.string().nullish(),
25188
+ hqCountry: z29.string().nullish(),
25189
+ hqAddress: z29.string().nullish(),
25190
+ phone: z29.string().nullish(),
25191
+ twitterUrl: z29.string().nullish(),
25192
+ githubUrl: z29.string().nullish(),
25193
+ facebookUrl: z29.string().nullish(),
25194
+ youtubeUrl: z29.string().nullish(),
25195
+ instagramUrl: z29.string().nullish(),
25196
+ crunchbaseUrl: z29.string().nullish(),
25197
+ techStack: z29.array(z29.string()).max(100).nullish()
25240
25198
  };
25241
- var CreateLeadCompanyRequestSchema = z30.strictObject({
25242
- name: z30.string().min(1),
25243
- domain: z30.string().optional(),
25199
+ var CreateLeadCompanyRequestSchema = z29.strictObject({
25200
+ name: z29.string().min(1),
25201
+ domain: z29.string().optional(),
25244
25202
  ...companyEnrichmentFields
25245
25203
  });
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()
25204
+ var LeadPersonEducationInputSchema = z29.strictObject({
25205
+ school: z29.string().min(1),
25206
+ degree: z29.string().optional(),
25207
+ field: z29.string().optional(),
25208
+ startYear: z29.number().int().optional(),
25209
+ endYear: z29.number().int().optional()
25252
25210
  });
25253
25211
  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(),
25212
+ title: z29.string().nullish(),
25213
+ headline: z29.string().nullish(),
25214
+ bio: z29.string().nullish(),
25215
+ department: z29.string().nullish(),
25216
+ yearsExperience: z29.number().int().min(0).max(80).nullish(),
25217
+ skills: z29.array(z29.string()).max(50).nullish(),
25218
+ languages: z29.array(z29.string()).max(20).nullish(),
25219
+ photoUrl: z29.string().nullish(),
25220
+ linkedinUrl: z29.string().nullish(),
25221
+ twitterUrl: z29.string().nullish(),
25222
+ githubUrl: z29.string().nullish(),
25223
+ facebookUrl: z29.string().nullish(),
25224
+ youtubeUrl: z29.string().nullish(),
25225
+ instagramUrl: z29.string().nullish(),
25226
+ personalWebsiteUrl: z29.string().nullish(),
25227
+ email: z29.string().nullish(),
25228
+ locationCity: z29.string().nullish(),
25229
+ locationRegion: z29.string().nullish(),
25230
+ locationCountry: z29.string().nullish(),
25273
25231
  // IANA timezone, e.g. America/New_York
25274
- timezone: z30.string().nullish(),
25232
+ timezone: z29.string().nullish(),
25275
25233
  // Full education history — REPLACES any previously saved entries.
25276
- educations: z30.array(LeadPersonEducationInputSchema).max(10).optional()
25234
+ educations: z29.array(LeadPersonEducationInputSchema).max(10).optional()
25277
25235
  };
25278
- var CreateLeadPersonRequestSchema = z30.strictObject({
25279
- fullName: z30.string().min(1),
25236
+ var CreateLeadPersonRequestSchema = z29.strictObject({
25237
+ fullName: z29.string().min(1),
25280
25238
  ...personEnrichmentFields,
25281
- companyId: z30.string().optional(),
25282
- companyName: z30.string().optional(),
25283
- companyDomain: z30.string().optional()
25239
+ companyId: z29.string().optional(),
25240
+ companyName: z29.string().optional(),
25241
+ companyDomain: z29.string().optional()
25284
25242
  });
25285
- var UpdateLeadCompanyRequestSchema = z30.strictObject({
25286
- id: z30.uuid(),
25287
- name: z30.string().min(1).optional(),
25288
- domain: z30.string().optional(),
25243
+ var UpdateLeadCompanyRequestSchema = z29.strictObject({
25244
+ id: z29.uuid(),
25245
+ name: z29.string().min(1).optional(),
25246
+ domain: z29.string().optional(),
25289
25247
  ...companyEnrichmentFields,
25290
25248
  // Registry-defined custom fields; validated + merged server-side.
25291
25249
  custom: CustomFieldValuesSchema.optional()
25292
25250
  });
25293
- var UpdateLeadPersonRequestSchema = z30.strictObject({
25294
- id: z30.uuid(),
25295
- fullName: z30.string().min(1).optional(),
25251
+ var UpdateLeadPersonRequestSchema = z29.strictObject({
25252
+ id: z29.uuid(),
25253
+ fullName: z29.string().min(1).optional(),
25296
25254
  ...personEnrichmentFields,
25297
25255
  // (re)assign current employment — companyId, or companyName/companyDomain
25298
25256
  // to find-or-create the company first
25299
- companyId: z30.string().optional(),
25300
- companyName: z30.string().optional(),
25301
- companyDomain: z30.string().optional(),
25257
+ companyId: z29.string().optional(),
25258
+ companyName: z29.string().optional(),
25259
+ companyDomain: z29.string().optional(),
25302
25260
  // Set the primary company directly (the people.current_company_id cache shown
25303
25261
  // in lists/header). Independent of the employment rows that hold the full set
25304
25262
  // of current roles; null clears it. Recompute overwrites it when the current
25305
25263
  // employment set changes.
25306
- primaryCompanyId: z30.string().nullish(),
25264
+ primaryCompanyId: z29.string().nullish(),
25307
25265
  // Registry-defined custom fields; validated + merged server-side.
25308
25266
  custom: CustomFieldValuesSchema.optional()
25309
25267
  });
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)
25268
+ var LeadEmploymentInputSchema = z29.strictObject({
25269
+ companyId: z29.uuid().nullish(),
25270
+ companyName: z29.string().nullish(),
25271
+ title: z29.string().nullish(),
25272
+ startDate: z29.string().nullish(),
25273
+ endDate: z29.string().nullish(),
25274
+ isCurrent: z29.boolean().default(false)
25317
25275
  });
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()
25276
+ var UpdateLeadEmploymentRequestSchema = z29.strictObject({
25277
+ companyId: z29.uuid().nullish(),
25278
+ companyName: z29.string().nullish(),
25279
+ title: z29.string().nullish(),
25280
+ startDate: z29.string().nullish(),
25281
+ endDate: z29.string().nullish(),
25282
+ isCurrent: z29.boolean().optional()
25325
25283
  });
25326
- var LeadContactPointInputSchema = z30.strictObject({
25284
+ var LeadContactPointInputSchema = z29.strictObject({
25327
25285
  kind: ContactPointKindSchema,
25328
- value: z30.string().min(1),
25286
+ value: z29.string().min(1),
25329
25287
  status: ContactPointStatusSchema.optional(),
25330
- isPrimary: z30.boolean().optional()
25288
+ isPrimary: z29.boolean().optional()
25331
25289
  });
25332
- var UpdateLeadContactPointRequestSchema = z30.strictObject({
25290
+ var UpdateLeadContactPointRequestSchema = z29.strictObject({
25333
25291
  kind: ContactPointKindSchema.optional(),
25334
- value: z30.string().min(1).optional(),
25292
+ value: z29.string().min(1).optional(),
25335
25293
  status: ContactPointStatusSchema.optional(),
25336
- isPrimary: z30.boolean().optional()
25294
+ isPrimary: z29.boolean().optional()
25337
25295
  });
25338
- var LeadCompanyPeopleRequestSchema = z30.object({
25339
- limit: z30.coerce.number().int().min(1).max(100).default(50),
25340
- cursor: z30.string().optional(),
25296
+ var LeadCompanyPeopleRequestSchema = z29.object({
25297
+ limit: z29.coerce.number().int().min(1).max(100).default(50),
25298
+ cursor: z29.string().optional(),
25341
25299
  sort: PersonSearchSortSchema.default("recent"),
25342
25300
  direction: LeadSortDirectionSchema.optional()
25343
25301
  });
25344
- var CreateLeadCompaniesRequestSchema = z30.strictObject({
25345
- companies: z30.array(CreateLeadCompanyRequestSchema).min(1).max(LEAD_BATCH_MAX)
25302
+ var CreateLeadCompaniesRequestSchema = z29.strictObject({
25303
+ companies: z29.array(CreateLeadCompanyRequestSchema).min(1).max(LEAD_BATCH_MAX)
25346
25304
  });
25347
- var CreateLeadPeopleRequestSchema = z30.strictObject({
25348
- people: z30.array(CreateLeadPersonRequestSchema).min(1).max(LEAD_BATCH_MAX)
25305
+ var CreateLeadPeopleRequestSchema = z29.strictObject({
25306
+ people: z29.array(CreateLeadPersonRequestSchema).min(1).max(LEAD_BATCH_MAX)
25349
25307
  });
25350
- var UpdateLeadCompaniesRequestSchema = z30.strictObject({
25351
- companies: z30.array(UpdateLeadCompanyRequestSchema).min(1).max(LEAD_BATCH_MAX)
25308
+ var UpdateLeadCompaniesRequestSchema = z29.strictObject({
25309
+ companies: z29.array(UpdateLeadCompanyRequestSchema).min(1).max(LEAD_BATCH_MAX)
25352
25310
  });
25353
- var UpdateLeadPeopleRequestSchema = z30.strictObject({
25354
- people: z30.array(UpdateLeadPersonRequestSchema).min(1).max(LEAD_BATCH_MAX)
25311
+ var UpdateLeadPeopleRequestSchema = z29.strictObject({
25312
+ people: z29.array(UpdateLeadPersonRequestSchema).min(1).max(LEAD_BATCH_MAX)
25355
25313
  });
25356
- var DeleteLeadCompaniesRequestSchema = z30.strictObject({
25357
- ids: z30.array(z30.uuid()).min(1).max(LEAD_BATCH_MAX)
25314
+ var DeleteLeadCompaniesRequestSchema = z29.strictObject({
25315
+ ids: z29.array(z29.uuid()).min(1).max(LEAD_BATCH_MAX)
25358
25316
  });
25359
- var DeleteLeadPeopleRequestSchema = z30.strictObject({
25360
- ids: z30.array(z30.uuid()).min(1).max(LEAD_BATCH_MAX)
25317
+ var DeleteLeadPeopleRequestSchema = z29.strictObject({
25318
+ ids: z29.array(z29.uuid()).min(1).max(LEAD_BATCH_MAX)
25361
25319
  });
25362
25320
 
25363
- // ../../packages/crm-api/dist/types/suppression.js
25321
+ // ../../packages/crm-api/dist/types/sequence.js
25322
+ import { z as z30 } from "zod";
25323
+ var SequenceListSortSchema = z30.enum([
25324
+ "recent",
25325
+ "person",
25326
+ "company",
25327
+ "to",
25328
+ "messages",
25329
+ "activity"
25330
+ ]);
25331
+ var SequenceListRequestSchema = z30.object({
25332
+ query: z30.string().trim().min(1).optional(),
25333
+ campaignId: z30.uuid().optional(),
25334
+ sort: SequenceListSortSchema.default("recent"),
25335
+ // Direction for the column sort; omitted falls back to the sort's default.
25336
+ direction: LeadSortDirectionSchema.optional()
25337
+ });
25338
+ var SequenceStepInputSchema = z30.object({
25339
+ subject: z30.string().min(1).max(300).nullish(),
25340
+ body: z30.string().min(1).max(2e4),
25341
+ waitDays: z30.number().int().min(0).max(90)
25342
+ });
25343
+ var SetPersonSequenceRequestSchema = z30.object({
25344
+ steps: z30.array(SequenceStepInputSchema).min(1).max(10),
25345
+ recipientContactPointId: z30.string().nullish()
25346
+ });
25347
+ var CreatePersonSequenceRequestSchema = SetPersonSequenceRequestSchema.extend({
25348
+ campaignId: z30.uuid()
25349
+ });
25350
+ var SequenceExportSkipReasonSchema = z30.enum([
25351
+ "no_steps",
25352
+ "no_email",
25353
+ "no_linkedin_url",
25354
+ "suppressed",
25355
+ "not_found"
25356
+ ]);
25357
+ var SequenceExportDestinationIdSchema = z30.enum([
25358
+ "csv",
25359
+ "instantly",
25360
+ "smartlead",
25361
+ "apollo",
25362
+ "heyreach",
25363
+ "expandi"
25364
+ ]);
25365
+
25366
+ // ../../packages/crm-api/dist/types/campaign.js
25364
25367
  import { z as z31 } from "zod";
25365
- var SuppressionKindSchema = z31.enum(["email", "domain", "phone"]);
25366
- var SuppressionReasonSchema = z31.enum([
25368
+ var CampaignListSortSchema = z31.enum([
25369
+ "recent",
25370
+ "name",
25371
+ "people",
25372
+ "activity"
25373
+ ]);
25374
+ var CampaignListRequestSchema = z31.object({
25375
+ query: z31.string().trim().min(1).optional(),
25376
+ sort: CampaignListSortSchema.default("recent"),
25377
+ direction: LeadSortDirectionSchema.optional()
25378
+ });
25379
+ var SetCampaignRequestSchema = z31.object({
25380
+ name: z31.string().trim().min(1).max(120),
25381
+ purpose: z31.string().trim().max(2e3).nullish()
25382
+ });
25383
+ var BulkCampaignIdsRequestSchema = z31.object({
25384
+ ids: z31.array(z31.uuid()).min(1).max(200)
25385
+ });
25386
+ var CampaignSyncRequestSchema = z31.object({
25387
+ destination: SequenceExportDestinationIdSchema,
25388
+ /** File destinations only: 'new' downloads only sequences not yet exported
25389
+ * to this destination. Campaign destinations ignore it. */
25390
+ fileScope: z31.enum(["all", "new"]).default("all"),
25391
+ /** Names the external campaign created on first sync; defaults to the CRM
25392
+ * campaign's name. Ignored once linked. */
25393
+ campaignName: z31.string().trim().min(1).max(120).optional()
25394
+ });
25395
+ var CampaignMemberListSortSchema = z31.enum([
25396
+ "recent",
25397
+ "person",
25398
+ "company"
25399
+ ]);
25400
+ var CampaignMemberListRequestSchema = z31.object({
25401
+ query: z31.string().trim().min(1).optional(),
25402
+ sort: CampaignMemberListSortSchema.default("recent"),
25403
+ direction: LeadSortDirectionSchema.optional()
25404
+ });
25405
+ var CampaignPeopleRequestSchema = z31.object({
25406
+ personIds: z31.array(z31.uuid()).min(1).max(1e3)
25407
+ });
25408
+
25409
+ // ../../packages/crm-api/dist/types/suppression.js
25410
+ import { z as z32 } from "zod";
25411
+ var SuppressionKindSchema = z32.enum(["email", "domain", "phone"]);
25412
+ var SuppressionReasonSchema = z32.enum([
25367
25413
  "unsubscribed",
25368
25414
  "complained",
25369
25415
  "hard_bounced",
25370
25416
  "manual"
25371
25417
  ]);
25372
- var CreateSuppressionRequestSchema = z31.object({
25418
+ var CreateSuppressionRequestSchema = z32.object({
25373
25419
  kind: SuppressionKindSchema,
25374
- value: z31.string().min(1).max(320),
25420
+ value: z32.string().min(1).max(320),
25375
25421
  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()
25422
+ sourcePersonId: z32.uuid().nullish()
25404
25423
  });
25405
25424
 
25406
25425
  // ../../packages/crm-api/dist/types/enrichment.js
@@ -25497,9 +25516,9 @@ var UpdateEnrichmentWaterfallsRequestSchema = z34.object({
25497
25516
  phoneEnrichment: z34.array(PhoneEnrichmentProviderIdSchema).optional()
25498
25517
  });
25499
25518
 
25500
- // ../../packages/crm-api/dist/types/skill.js
25519
+ // ../../packages/crm-api/dist/types/playbook.js
25501
25520
  import { z as z35 } from "zod";
25502
- var SkillIdSchema = z35.enum([
25521
+ var PlaybookIdSchema = z35.enum([
25503
25522
  "fill-in-person",
25504
25523
  "fill-in-company",
25505
25524
  "fill-in-list",
@@ -25507,7 +25526,6 @@ var SkillIdSchema = z35.enum([
25507
25526
  "lookalike-person",
25508
25527
  "lookalike-company",
25509
25528
  "add-enrich",
25510
- "signal-sweep-list",
25511
25529
  "build-list-person",
25512
25530
  "build-list-company"
25513
25531
  ]);
@@ -25516,81 +25534,40 @@ var AgentQuickActionSchema = z35.enum([
25516
25534
  "draft_sequence",
25517
25535
  "create_lookalikes",
25518
25536
  "add_enrich",
25519
- "signal_sweep",
25520
25537
  "build_list"
25521
25538
  ]);
25522
- var SkillEntityTypeSchema = z35.enum(["person", "company"]);
25523
- var SkillListTargetValueSchema = z35.union([
25539
+ var PlaybookEntityTypeSchema = z35.enum(["person", "company"]);
25540
+ var PlaybookListTargetValueSchema = z35.union([
25524
25541
  z35.object({
25525
25542
  listId: z35.uuid(),
25526
25543
  listName: z35.string().trim().min(1).max(200)
25527
25544
  }),
25528
25545
  z35.object({ newListName: z35.string().trim().min(1).max(200) })
25529
25546
  ]);
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"
25547
+ var PlaybookCampaignTargetValueSchema = z35.union([
25548
+ z35.object({
25549
+ campaignId: z35.uuid(),
25550
+ campaignName: z35.string().trim().min(1).max(120),
25551
+ campaignPurpose: z35.string().max(2e3).nullish()
25552
+ }),
25553
+ z35.object({ newCampaignName: z35.string().trim().min(1).max(120) })
25562
25554
  ]);
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
- });
25555
+ var PlaybookSeedValueSchema = z35.string().trim().min(1).max(2e3);
25556
+ var PlaybookBriefValueSchema = z35.string().trim().min(1).max(2e3);
25580
25557
 
25581
25558
  // ../../packages/api/dist/types/user.js
25582
- import { z as z39 } from "zod";
25583
- var UserRoleSchema = z39.enum(["God", "Owner", "Admin", "Member"]);
25559
+ import { z as z36 } from "zod";
25560
+ var UserRoleSchema = z36.enum(["God", "Owner", "Admin", "Member"]);
25584
25561
 
25585
25562
  // ../../packages/api/dist/types/credential.js
25586
- import { z as z40 } from "zod";
25587
- var CredentialTypeSchema2 = z40.enum([
25563
+ import { z as z37 } from "zod";
25564
+ var CredentialTypeSchema2 = z37.enum([
25588
25565
  "oauth2",
25589
25566
  "apiKey",
25590
25567
  "platform",
25591
25568
  "noAuth"
25592
25569
  ]);
25593
- var CredentialAuthSourceSchema = z40.enum([
25570
+ var CredentialAuthSourceSchema = z37.enum([
25594
25571
  "personal_oauth",
25595
25572
  "organization_oauth",
25596
25573
  "managed_oauth",
@@ -25599,8 +25576,8 @@ var CredentialAuthSourceSchema = z40.enum([
25599
25576
  ]);
25600
25577
 
25601
25578
  // ../../packages/api/dist/types/agent.js
25602
- import { z as z41 } from "zod";
25603
- var GiAgentMessageTypeSchema = z41.enum([
25579
+ import { z as z38 } from "zod";
25580
+ var GiAgentMessageTypeSchema = z38.enum([
25604
25581
  "text",
25605
25582
  "tool-call",
25606
25583
  "tool-result",
@@ -25612,7 +25589,7 @@ var GiAgentMessageTypeSchema = z41.enum([
25612
25589
  // threads still load (an unknown type drops the whole message on read).
25613
25590
  "delegating"
25614
25591
  ]);
25615
- var GiAgentMessageRoleSchema = z41.enum([
25592
+ var GiAgentMessageRoleSchema = z38.enum([
25616
25593
  "user",
25617
25594
  "assistant",
25618
25595
  "system",
@@ -25620,215 +25597,215 @@ var GiAgentMessageRoleSchema = z41.enum([
25620
25597
  "display"
25621
25598
  ]);
25622
25599
  var STORAGE_URI_PREFIX = "store://";
25623
- var agentStorageUriSchema = z41.string().refine((v) => v.startsWith(STORAGE_URI_PREFIX) || v.startsWith("r2://"), {
25600
+ var agentStorageUriSchema = z38.string().refine((v) => v.startsWith(STORAGE_URI_PREFIX) || v.startsWith("r2://"), {
25624
25601
  message: `Storage URI must start with ${STORAGE_URI_PREFIX}`
25625
25602
  });
25626
- var AgentPersistedImagePartSchema = z41.object({
25627
- type: z41.literal("image"),
25603
+ var AgentPersistedImagePartSchema = z38.object({
25604
+ type: z38.literal("image"),
25628
25605
  image: agentStorageUriSchema,
25629
- mimeType: z41.string()
25606
+ mimeType: z38.string()
25630
25607
  }).loose();
25631
- var AgentPersistedFilePartSchema = z41.object({
25632
- type: z41.literal("file"),
25608
+ var AgentPersistedFilePartSchema = z38.object({
25609
+ type: z38.literal("file"),
25633
25610
  data: agentStorageUriSchema,
25634
- mimeType: z41.string(),
25635
- filename: z41.string()
25611
+ mimeType: z38.string(),
25612
+ filename: z38.string()
25636
25613
  }).loose();
25637
- var AgentPersistedTextPartSchema = z41.object({
25638
- type: z41.literal("text"),
25639
- text: z41.string()
25614
+ var AgentPersistedTextPartSchema = z38.object({
25615
+ type: z38.literal("text"),
25616
+ text: z38.string()
25640
25617
  }).loose();
25641
- var AgentPersistedReasoningPartSchema = z41.object({
25642
- type: z41.literal("reasoning"),
25643
- text: z41.string()
25618
+ var AgentPersistedReasoningPartSchema = z38.object({
25619
+ type: z38.literal("reasoning"),
25620
+ text: z38.string()
25644
25621
  }).loose();
25645
- var AgentPersistedToolCallPartSchema = z41.object({
25646
- type: z41.literal("tool-call"),
25647
- toolCallId: z41.string(),
25648
- toolName: z41.string(),
25649
- input: z41.unknown()
25622
+ var AgentPersistedToolCallPartSchema = z38.object({
25623
+ type: z38.literal("tool-call"),
25624
+ toolCallId: z38.string(),
25625
+ toolName: z38.string(),
25626
+ input: z38.unknown()
25650
25627
  }).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()
25628
+ var AgentPersistedToolResultPartSchema = z38.object({
25629
+ type: z38.literal("tool-result"),
25630
+ toolCallId: z38.string(),
25631
+ toolName: z38.string(),
25632
+ output: z38.object({
25633
+ type: z38.string(),
25634
+ value: z38.unknown()
25658
25635
  }).loose()
25659
25636
  }).loose();
25660
- var AgentPersistedDisplayEventSchema = z41.object({
25661
- type: z41.string()
25637
+ var AgentPersistedDisplayEventSchema = z38.object({
25638
+ type: z38.string()
25662
25639
  }).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()
25640
+ var AgentPersistedUserContentSchema = z38.union([
25641
+ z38.string(),
25642
+ z38.array(z38.union([
25643
+ z38.object({ type: z38.literal("text"), text: z38.string() }).loose(),
25644
+ z38.object({ type: z38.literal("api-mention"), service: z38.string() }).loose(),
25645
+ z38.object({
25646
+ type: z38.literal("platform-api-mention"),
25647
+ service: z38.string()
25671
25648
  }).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()
25649
+ z38.object({ type: z38.literal("trigger-mention"), triggerId: z38.string() }).loose(),
25650
+ z38.object({
25651
+ type: z38.literal("credential-mention"),
25652
+ credentialId: z38.string(),
25653
+ credentialTitle: z38.string(),
25654
+ service: z38.string()
25678
25655
  }).loose(),
25679
- z41.object({
25680
- type: z41.literal("workflow-mention"),
25681
- workflowId: z41.string(),
25682
- name: z41.string()
25656
+ z38.object({
25657
+ type: z38.literal("workflow-mention"),
25658
+ workflowId: z38.string(),
25659
+ name: z38.string()
25683
25660
  }).loose(),
25684
- z41.object({
25685
- type: z41.literal("app-mention"),
25686
- workflowId: z41.string(),
25687
- name: z41.string()
25661
+ z38.object({
25662
+ type: z38.literal("app-mention"),
25663
+ workflowId: z38.string(),
25664
+ name: z38.string()
25688
25665
  }).loose(),
25689
- z41.object({
25690
- type: z41.literal("skill-mention"),
25691
- skillId: z41.string(),
25692
- name: z41.string()
25666
+ z38.object({
25667
+ type: z38.literal("skill-mention"),
25668
+ skillId: z38.string(),
25669
+ name: z38.string()
25693
25670
  }).loose(),
25694
- z41.object({
25695
- type: z41.literal("platform-skill-mention"),
25696
- name: z41.string()
25671
+ z38.object({
25672
+ type: z38.literal("platform-skill-mention"),
25673
+ name: z38.string()
25697
25674
  }).loose(),
25698
- z41.object({
25699
- type: z41.literal("context-file-mention"),
25700
- fileId: z41.string(),
25701
- title: z41.string(),
25702
- path: z41.string()
25675
+ z38.object({
25676
+ type: z38.literal("context-file-mention"),
25677
+ fileId: z38.string(),
25678
+ title: z38.string(),
25679
+ path: z38.string()
25703
25680
  }).loose(),
25704
25681
  AgentPersistedImagePartSchema,
25705
25682
  AgentPersistedFilePartSchema
25706
25683
  ])).min(1)
25707
25684
  ]);
25708
- var AgentPersistedAssistantContentSchema = z41.union([
25709
- z41.string(),
25710
- z41.array(z41.union([
25685
+ var AgentPersistedAssistantContentSchema = z38.union([
25686
+ z38.string(),
25687
+ z38.array(z38.union([
25711
25688
  AgentPersistedTextPartSchema,
25712
25689
  AgentPersistedReasoningPartSchema,
25713
25690
  AgentPersistedToolCallPartSchema
25714
25691
  ])).min(1)
25715
25692
  ]);
25716
- var AgentPersistedToolContentSchema = z41.array(AgentPersistedToolResultPartSchema).min(1);
25717
- var AgentPersistedSystemContentSchema = z41.string();
25718
- var CreateResourceTypeSchema = z41.enum([
25693
+ var AgentPersistedToolContentSchema = z38.array(AgentPersistedToolResultPartSchema).min(1);
25694
+ var AgentPersistedSystemContentSchema = z38.string();
25695
+ var CreateResourceTypeSchema = z38.enum([
25719
25696
  "code",
25720
25697
  "agent",
25721
25698
  "app",
25722
25699
  "skill"
25723
25700
  ]);
25724
- var QuestionResumePayloadSchema = z41.object({
25725
- answer: z41.string(),
25726
- displayText: z41.string()
25701
+ var QuestionResumePayloadSchema = z38.object({
25702
+ answer: z38.string(),
25703
+ displayText: z38.string()
25727
25704
  });
25728
- var CreateResourceResumePayloadSchema = z41.object({
25729
- action: z41.enum(["create", "cancel"]),
25730
- displayText: z41.string()
25705
+ var CreateResourceResumePayloadSchema = z38.object({
25706
+ action: z38.enum(["create", "cancel"]),
25707
+ displayText: z38.string()
25731
25708
  });
25732
- var RunWorkflowResumePayloadSchema = z41.object({
25733
- action: z41.enum(["run", "cancel"]),
25734
- displayText: z41.string()
25709
+ var RunWorkflowResumePayloadSchema = z38.object({
25710
+ action: z38.enum(["run", "cancel"]),
25711
+ displayText: z38.string()
25735
25712
  });
25736
- var ConnectCredentialForAccountResumePayloadSchema = z41.object({
25737
- credentialId: z41.string().nullable(),
25738
- displayText: z41.string()
25713
+ var ConnectCredentialForAccountResumePayloadSchema = z38.object({
25714
+ credentialId: z38.string().nullable(),
25715
+ displayText: z38.string()
25739
25716
  });
25740
- var CrmApprovalResumePayloadSchema = z41.object({
25741
- decision: z41.enum(["approve", "deny"]),
25742
- displayText: z41.string()
25717
+ var CrmApprovalResumePayloadSchema = z38.object({
25718
+ decision: z38.enum(["approve", "deny"]),
25719
+ displayText: z38.string()
25743
25720
  });
25744
- var HumanInputResumePayloadSchema = z41.union([
25721
+ var HumanInputResumePayloadSchema = z38.union([
25745
25722
  QuestionResumePayloadSchema,
25746
25723
  CreateResourceResumePayloadSchema,
25747
25724
  RunWorkflowResumePayloadSchema,
25748
25725
  ConnectCredentialForAccountResumePayloadSchema,
25749
25726
  CrmApprovalResumePayloadSchema
25750
25727
  ]);
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()
25728
+ var AgentUserContentSegmentSchema = z38.discriminatedUnion("type", [
25729
+ z38.object({ type: z38.literal("text"), text: z38.string() }),
25730
+ z38.object({
25731
+ type: z38.literal("api-mention"),
25732
+ service: z38.string(),
25733
+ inlinedText: z38.string().optional()
25757
25734
  }),
25758
- z41.object({
25759
- type: z41.literal("platform-api-mention"),
25760
- service: z41.string(),
25761
- inlinedText: z41.string().optional()
25735
+ z38.object({
25736
+ type: z38.literal("platform-api-mention"),
25737
+ service: z38.string(),
25738
+ inlinedText: z38.string().optional()
25762
25739
  }),
25763
- z41.object({
25764
- type: z41.literal("trigger-mention"),
25765
- triggerId: z41.string(),
25766
- inlinedText: z41.string().optional()
25740
+ z38.object({
25741
+ type: z38.literal("trigger-mention"),
25742
+ triggerId: z38.string(),
25743
+ inlinedText: z38.string().optional()
25767
25744
  }),
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()
25745
+ z38.object({
25746
+ type: z38.literal("credential-mention"),
25747
+ credentialId: z38.string(),
25748
+ credentialTitle: z38.string(),
25749
+ service: z38.string(),
25750
+ inlinedText: z38.string().optional()
25774
25751
  }),
25775
- z41.object({
25776
- type: z41.literal("workflow-mention"),
25777
- workflowId: z41.string(),
25778
- name: z41.string(),
25779
- inlinedText: z41.string().optional()
25752
+ z38.object({
25753
+ type: z38.literal("workflow-mention"),
25754
+ workflowId: z38.string(),
25755
+ name: z38.string(),
25756
+ inlinedText: z38.string().optional()
25780
25757
  }),
25781
- z41.object({
25782
- type: z41.literal("app-mention"),
25783
- workflowId: z41.string(),
25784
- name: z41.string(),
25785
- inlinedText: z41.string().optional()
25758
+ z38.object({
25759
+ type: z38.literal("app-mention"),
25760
+ workflowId: z38.string(),
25761
+ name: z38.string(),
25762
+ inlinedText: z38.string().optional()
25786
25763
  }),
25787
- z41.object({
25788
- type: z41.literal("skill-mention"),
25789
- skillId: z41.string(),
25790
- name: z41.string(),
25791
- inlinedText: z41.string().optional()
25764
+ z38.object({
25765
+ type: z38.literal("skill-mention"),
25766
+ skillId: z38.string(),
25767
+ name: z38.string(),
25768
+ inlinedText: z38.string().optional()
25792
25769
  }),
25793
25770
  // 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()
25771
+ z38.object({
25772
+ type: z38.literal("platform-skill-mention"),
25773
+ name: z38.string(),
25774
+ inlinedText: z38.string().optional()
25798
25775
  }),
25799
- z41.object({
25800
- type: z41.literal("context-file-mention"),
25801
- fileId: z41.string(),
25802
- title: z41.string(),
25776
+ z38.object({
25777
+ type: z38.literal("context-file-mention"),
25778
+ fileId: z38.string(),
25779
+ title: z38.string(),
25803
25780
  /** Agent-workspace path, e.g. `knowledge-base/org/company-overview.md`. */
25804
- path: z41.string(),
25805
- inlinedText: z41.string().optional()
25781
+ path: z38.string(),
25782
+ inlinedText: z38.string().optional()
25806
25783
  })
25807
25784
  ]);
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()
25785
+ var AgentUserContentSchema = z38.array(AgentUserContentSegmentSchema).min(1);
25786
+ var MessageAttachmentSchema = z38.object({
25787
+ type: z38.enum(["image", "file"]),
25788
+ key: z38.string(),
25789
+ mimeType: z38.string(),
25790
+ filename: z38.string()
25814
25791
  });
25815
25792
 
25816
25793
  // ../../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()
25794
+ import { z as z39 } from "zod";
25795
+ var UpdateAutofillSettingsRequestSchema = z39.discriminatedUnion("enabled", [
25796
+ z39.object({
25797
+ enabled: z39.literal(true),
25798
+ targetCredits: z39.number().positive(),
25799
+ thresholdCredits: z39.number().nonnegative()
25823
25800
  }),
25824
- z42.object({
25825
- enabled: z42.literal(false)
25801
+ z39.object({
25802
+ enabled: z39.literal(false)
25826
25803
  })
25827
25804
  ]);
25828
25805
 
25829
25806
  // ../../packages/api/dist/types/usage.js
25830
- import { z as z43 } from "zod";
25831
- var UsageEventTypeSchema = z43.enum([
25807
+ import { z as z40 } from "zod";
25808
+ var UsageEventTypeSchema = z40.enum([
25832
25809
  "llm_cost",
25833
25810
  "agent_llm_cost",
25834
25811
  "sandbox_runtime",
@@ -25843,16 +25820,17 @@ var UsageEventTypeSchema = z43.enum([
25843
25820
  "financial_research",
25844
25821
  "stock_data",
25845
25822
  "send_email",
25846
- "user_database"
25823
+ "user_database",
25824
+ "voice_transcription"
25847
25825
  ]);
25848
25826
 
25849
25827
  // ../../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)
25828
+ import { z as z41 } from "zod";
25829
+ var DashboardArtifactLayoutSchema = z41.object({
25830
+ x: z41.number().int().min(0),
25831
+ y: z41.number().int().min(0),
25832
+ w: z41.number().int().min(1),
25833
+ h: z41.number().int().min(1)
25856
25834
  });
25857
25835
 
25858
25836
  // ../../packages/api/dist/types/permission.js
@@ -26004,23 +25982,23 @@ var WORKFLOW_PERMISSION_ROLE_FLOOR = {
26004
25982
  };
26005
25983
 
26006
25984
  // ../../packages/api/dist/types/audit.js
26007
- import { z as z45 } from "zod";
26008
- var AuditWindowSchema = z45.enum(["1d", "3d", "7d"]);
25985
+ import { z as z42 } from "zod";
25986
+ var AuditWindowSchema = z42.enum(["1d", "3d", "7d"]);
26009
25987
 
26010
25988
  // ../../packages/api/dist/types/membershipApiKey.js
26011
- import { z as z46 } from "zod";
25989
+ import { z as z43 } from "zod";
26012
25990
  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"])
25991
+ var ApiKeyScopeSchema = z43.enum(API_KEY_SCOPES);
25992
+ var CreateMembershipApiKeyRequestSchema = z43.object({
25993
+ name: z43.string().min(1).max(255),
25994
+ scopes: z43.array(ApiKeyScopeSchema).min(1).default(["all"])
26017
25995
  });
26018
25996
 
26019
25997
  // ../../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([
25998
+ import { z as z44 } from "zod";
25999
+ var NotificationChannelProvider = z44.enum(["slack"]);
26000
+ var NotificationDeliveryChannel = z44.enum(["email", "slack"]);
26001
+ var NotificationType = z44.enum([
26024
26002
  "workflow_auto_disabled",
26025
26003
  "trigger_failed",
26026
26004
  "balance_auto_refilled",
@@ -26032,78 +26010,78 @@ var NotificationType = z47.enum([
26032
26010
  "crm_reply_received",
26033
26011
  "crm_task_due"
26034
26012
  ]);
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()
26013
+ var NotificationPreferencesSchema = z44.record(NotificationType, z44.array(NotificationDeliveryChannel));
26014
+ var WorkflowAutoDisabledPayloadSchema = z44.object({
26015
+ type: z44.literal("workflow_auto_disabled"),
26016
+ workflowId: z44.string(),
26017
+ workflowName: z44.string(),
26018
+ reason: z44.string()
26041
26019
  });
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()
26020
+ var TriggerFailedPayloadSchema = z44.object({
26021
+ type: z44.literal("trigger_failed"),
26022
+ workflowId: z44.string(),
26023
+ workflowName: z44.string(),
26024
+ triggerId: z44.string(),
26025
+ reason: z44.string()
26048
26026
  });
26049
- var BalanceAutoRefilledPayloadSchema = z47.object({
26050
- type: z47.literal("balance_auto_refilled"),
26051
- amountDollars: z47.number(),
26052
- newBalanceDollars: z47.number()
26027
+ var BalanceAutoRefilledPayloadSchema = z44.object({
26028
+ type: z44.literal("balance_auto_refilled"),
26029
+ amountDollars: z44.number(),
26030
+ newBalanceDollars: z44.number()
26053
26031
  });
26054
- var BalanceLowPayloadSchema = z47.object({
26055
- type: z47.literal("balance_low"),
26056
- balanceDollars: z47.number()
26032
+ var BalanceLowPayloadSchema = z44.object({
26033
+ type: z44.literal("balance_low"),
26034
+ balanceDollars: z44.number()
26057
26035
  });
26058
- var CredentialRevokedPayloadSchema = z47.object({
26059
- type: z47.literal("credential_revoked"),
26060
- credentialTitle: z47.string(),
26061
- service: z47.string()
26036
+ var CredentialRevokedPayloadSchema = z44.object({
26037
+ type: z44.literal("credential_revoked"),
26038
+ credentialTitle: z44.string(),
26039
+ service: z44.string()
26062
26040
  });
26063
- var WorkflowSharedPayloadSchema = z47.object({
26064
- type: z47.literal("workflow_shared"),
26065
- workflowId: z47.string(),
26066
- workflowName: z47.string(),
26041
+ var WorkflowSharedPayloadSchema = z44.object({
26042
+ type: z44.literal("workflow_shared"),
26043
+ workflowId: z44.string(),
26044
+ workflowName: z44.string(),
26067
26045
  /** The role the recipient was granted (`viewer` or `runner`).
26068
26046
  * Stored as a plain string so this schema doesn't have to import
26069
26047
  * the workflow-collaborator role enum and stay in lock-step with
26070
26048
  * it. The email service maps it to friendly copy. */
26071
- role: z47.string(),
26049
+ role: z44.string(),
26072
26050
  /** Display name (or email fallback) of the user who shared. Used
26073
26051
  * in the email subject + subtitle copy. */
26074
- sharedByName: z47.string()
26052
+ sharedByName: z44.string()
26075
26053
  });
26076
- var CredentialSharedPayloadSchema = z47.object({
26077
- type: z47.literal("credential_shared"),
26078
- credentialId: z47.string(),
26079
- credentialTitle: z47.string(),
26080
- service: z47.string(),
26054
+ var CredentialSharedPayloadSchema = z44.object({
26055
+ type: z44.literal("credential_shared"),
26056
+ credentialId: z44.string(),
26057
+ credentialTitle: z44.string(),
26058
+ service: z44.string(),
26081
26059
  /** Display name (or email fallback) of the user who shared. */
26082
- sharedByName: z47.string()
26060
+ sharedByName: z44.string()
26083
26061
  });
26084
- var DatabaseSharedPayloadSchema = z47.object({
26085
- type: z47.literal("database_shared"),
26086
- databaseId: z47.string(),
26087
- databaseName: z47.string(),
26062
+ var DatabaseSharedPayloadSchema = z44.object({
26063
+ type: z44.literal("database_shared"),
26064
+ databaseId: z44.string(),
26065
+ databaseName: z44.string(),
26088
26066
  /** The role the recipient was granted. Stored as a plain string so
26089
26067
  * this schema doesn't import the database-collaborator role enum. */
26090
- role: z47.string(),
26068
+ role: z44.string(),
26091
26069
  /** Display name (or email fallback) of the user who shared. */
26092
- sharedByName: z47.string()
26070
+ sharedByName: z44.string()
26093
26071
  });
26094
- var CrmReplyReceivedPayloadSchema = z47.object({
26095
- type: z47.literal("crm_reply_received"),
26096
- conversationId: z47.string(),
26072
+ var CrmReplyReceivedPayloadSchema = z44.object({
26073
+ type: z44.literal("crm_reply_received"),
26074
+ conversationId: z44.string(),
26097
26075
  /** Person's display name, or their email address as a fallback. */
26098
- fromName: z47.string(),
26099
- preview: z47.string()
26076
+ fromName: z44.string(),
26077
+ preview: z44.string()
26100
26078
  });
26101
- var CrmTaskDuePayloadSchema = z47.object({
26102
- type: z47.literal("crm_task_due"),
26103
- taskId: z47.string(),
26104
- taskTitle: z47.string()
26079
+ var CrmTaskDuePayloadSchema = z44.object({
26080
+ type: z44.literal("crm_task_due"),
26081
+ taskId: z44.string(),
26082
+ taskTitle: z44.string()
26105
26083
  });
26106
- var NotificationPayloadSchema = z47.discriminatedUnion("type", [
26084
+ var NotificationPayloadSchema = z44.discriminatedUnion("type", [
26107
26085
  WorkflowAutoDisabledPayloadSchema,
26108
26086
  TriggerFailedPayloadSchema,
26109
26087
  BalanceAutoRefilledPayloadSchema,
@@ -26115,11 +26093,11 @@ var NotificationPayloadSchema = z47.discriminatedUnion("type", [
26115
26093
  CrmReplyReceivedPayloadSchema,
26116
26094
  CrmTaskDuePayloadSchema
26117
26095
  ]);
26118
- var ConnectNotificationChannelRequestSchema = z47.object({
26119
- credentialId: z47.string().min(1)
26096
+ var ConnectNotificationChannelRequestSchema = z44.object({
26097
+ credentialId: z44.string().min(1)
26120
26098
  });
26121
- var SetNotificationChannelAddressRequestSchema = z47.object({
26122
- address: z47.string().min(1)
26099
+ var SetNotificationChannelAddressRequestSchema = z44.object({
26100
+ address: z44.string().min(1)
26123
26101
  });
26124
26102
 
26125
26103
  // ../../packages/api/dist/types/organizationOAuthConnection.js
@@ -26146,6 +26124,11 @@ var OAUTH_PROVIDER_GROUPS = {
26146
26124
  "google-search-console"
26147
26125
  ]
26148
26126
  },
26127
+ "google-ads": {
26128
+ title: "Google Ads",
26129
+ iconUrl: "https://icons.generalinput.com/google-ads.png",
26130
+ services: ["google-ads"]
26131
+ },
26149
26132
  microsoft: {
26150
26133
  title: "Microsoft",
26151
26134
  iconUrl: "https://icons.generalinput.com/microsoft.png",
@@ -26362,6 +26345,11 @@ var OAUTH_PROVIDER_GROUPS = {
26362
26345
  title: "Bullhorn",
26363
26346
  iconUrl: "https://icons.generalinput.com/bullhorn.png",
26364
26347
  services: ["bullhorn"]
26348
+ },
26349
+ videoask: {
26350
+ title: "VideoAsk",
26351
+ iconUrl: "https://icons.generalinput.com/videoask.png",
26352
+ services: ["videoask"]
26365
26353
  }
26366
26354
  };
26367
26355
 
@@ -26385,143 +26373,153 @@ var PERSONAL_OAUTH_PROVIDER_GROUPS = {
26385
26373
  };
26386
26374
 
26387
26375
  // ../../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()
26376
+ import { z as z45 } from "zod";
26377
+ var PromptWorkflowTypeSchema = z45.enum(["code", "agent"]);
26378
+ var PromptStatusSchema = z45.enum(["draft", "published"]);
26379
+ var PromptCachedServiceSchema = z45.object({
26380
+ slug: z45.string(),
26381
+ name: z45.string(),
26382
+ iconUrl: z45.string(),
26383
+ category: z45.string().optional()
26396
26384
  });
26397
- var PromptIntegrationSchema = z48.object({
26398
- service: z48.string(),
26399
- title: z48.string(),
26400
- iconUrl: z48.string()
26385
+ var PromptIntegrationSchema = z45.object({
26386
+ service: z45.string(),
26387
+ title: z45.string(),
26388
+ iconUrl: z45.string()
26401
26389
  });
26402
- var PromptFaqSchema = z48.object({
26403
- question: z48.string(),
26404
- answer: z48.string()
26390
+ var PromptFaqSchema = z45.object({
26391
+ question: z45.string(),
26392
+ answer: z45.string()
26405
26393
  });
26406
- var PromptExampleOutputSchema = z48.object({
26407
- kind: z48.enum(["text", "image"]),
26408
- value: z48.string()
26394
+ var PromptExampleOutputSchema = z45.object({
26395
+ kind: z45.enum(["text", "image"]),
26396
+ value: z45.string()
26409
26397
  });
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()
26398
+ var PromptCategorySchema = z45.object({
26399
+ id: z45.string(),
26400
+ slug: z45.string(),
26401
+ name: z45.string(),
26402
+ description: z45.string().nullable(),
26403
+ ogImageUrl: z45.string().nullable(),
26404
+ icon: z45.string(),
26405
+ sortOrder: z45.number(),
26406
+ updatedAt: z45.string()
26419
26407
  });
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()
26408
+ var PromptUseCaseSchema = z45.object({
26409
+ id: z45.string(),
26410
+ slug: z45.string(),
26411
+ name: z45.string(),
26412
+ description: z45.string().nullable(),
26413
+ ogImageUrl: z45.string().nullable(),
26414
+ icon: z45.string(),
26415
+ sortOrder: z45.number(),
26416
+ updatedAt: z45.string()
26429
26417
  });
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(),
26418
+ var PromptSummarySchema = z45.object({
26419
+ id: z45.string(),
26420
+ slug: z45.string(),
26421
+ title: z45.string(),
26422
+ subtitle: z45.string(),
26423
+ ogImageUrl: z45.string().nullable(),
26436
26424
  workflowType: PromptWorkflowTypeSchema,
26437
26425
  status: PromptStatusSchema,
26438
- services: z48.array(PromptCachedServiceSchema),
26439
- publishedAt: z48.string().nullable(),
26440
- updatedAt: z48.string()
26426
+ services: z45.array(PromptCachedServiceSchema),
26427
+ publishedAt: z45.string().nullable(),
26428
+ updatedAt: z45.string()
26441
26429
  });
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(),
26430
+ var PromptDetailSchema = z45.object({
26431
+ id: z45.string(),
26432
+ slug: z45.string(),
26433
+ title: z45.string(),
26434
+ metaTitle: z45.string().nullable(),
26435
+ subtitle: z45.string(),
26436
+ whatItDoes: z45.array(z45.string()),
26437
+ whatYoullNeed: z45.array(z45.string()),
26438
+ howToCustomize: z45.array(z45.string()),
26439
+ promptDoc: z45.unknown(),
26452
26440
  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),
26441
+ faqs: z45.array(PromptFaqSchema),
26442
+ ctaTitle: z45.string().nullable(),
26443
+ ctaDescription: z45.string().nullable(),
26444
+ ogImageUrl: z45.string().nullable(),
26445
+ services: z45.array(PromptCachedServiceSchema),
26458
26446
  workflowType: PromptWorkflowTypeSchema,
26459
26447
  status: PromptStatusSchema,
26460
- categories: z48.array(PromptCategorySchema),
26461
- useCases: z48.array(PromptUseCaseSchema),
26462
- relatedPrompts: z48.array(PromptSummarySchema),
26463
- publishedAt: z48.string().nullable()
26448
+ categories: z45.array(PromptCategorySchema),
26449
+ useCases: z45.array(PromptUseCaseSchema),
26450
+ relatedPrompts: z45.array(PromptSummarySchema),
26451
+ publishedAt: z45.string().nullable()
26452
+ });
26453
+
26454
+ // ../../packages/api/dist/types/voiceDictation.js
26455
+ import { z as z46 } from "zod";
26456
+ var VoiceDictationSessionEndRequestSchema = z46.object({
26457
+ audioSeconds: z46.number().positive().max(900)
26458
+ });
26459
+ var VoiceDictationComposeRequestSchema = z46.object({
26460
+ existingText: z46.string().max(5e4),
26461
+ transcript: z46.string().trim().min(1).max(5e4)
26464
26462
  });
26465
26463
 
26466
26464
  // ../../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),
26465
+ import { z as z47 } from "zod";
26466
+ var GlobalSearchRequestSchema2 = z47.object({
26467
+ query: z47.string().min(1).max(200),
26470
26468
  // 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)
26469
+ limitPerType: z47.number().int().min(1).max(20).default(6)
26472
26470
  });
26473
- var GlobalSearchRecentsRequestSchema = z49.object({
26474
- limitPerType: z49.number().int().min(1).max(20).default(5)
26471
+ var GlobalSearchRecentsRequestSchema = z47.object({
26472
+ limitPerType: z47.number().int().min(1).max(20).default(5)
26475
26473
  });
26476
26474
 
26477
26475
  // ../../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)
26476
+ import { z as z48 } from "zod";
26477
+ var CommandCenterTileLayoutSchema = z48.object({
26478
+ x: z48.number().int().min(0),
26479
+ y: z48.number().int().min(0),
26480
+ w: z48.number().int().min(1),
26481
+ h: z48.number().int().min(1)
26484
26482
  });
26485
26483
 
26486
26484
  // ../../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()
26485
+ import { z as z49 } from "zod";
26486
+ var CodeExecutionOutputLineSchema = z49.discriminatedUnion("type", [
26487
+ z49.object({
26488
+ type: z49.literal("log"),
26489
+ level: z49.enum(["info", "warn", "error"]),
26490
+ message: z49.string(),
26491
+ data: z49.unknown().optional()
26494
26492
  }),
26495
- z51.object({
26496
- type: z51.literal("result"),
26497
- data: z51.unknown()
26493
+ z49.object({
26494
+ type: z49.literal("result"),
26495
+ data: z49.unknown()
26498
26496
  }),
26499
- z51.object({
26500
- type: z51.literal("error"),
26501
- error: z51.string(),
26502
- stack: z51.string().optional()
26497
+ z49.object({
26498
+ type: z49.literal("error"),
26499
+ error: z49.string(),
26500
+ stack: z49.string().optional()
26503
26501
  })
26504
26502
  ]);
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()
26503
+ var CodeExecutionResultSchema = z49.discriminatedUnion("success", [
26504
+ z49.object({
26505
+ success: z49.literal(true),
26506
+ result: z49.unknown(),
26507
+ logs: z49.array(z49.object({
26508
+ level: z49.string(),
26509
+ message: z49.string(),
26510
+ data: z49.unknown().optional()
26513
26511
  })),
26514
- stderr: z51.string().optional()
26512
+ stderr: z49.string().optional()
26515
26513
  }),
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()
26514
+ z49.object({
26515
+ success: z49.literal(false),
26516
+ error: z49.string(),
26517
+ logs: z49.array(z49.object({
26518
+ level: z49.string(),
26519
+ message: z49.string(),
26520
+ data: z49.unknown().optional()
26523
26521
  })),
26524
- stderr: z51.string().optional()
26522
+ stderr: z49.string().optional()
26525
26523
  })
26526
26524
  ]);
26527
26525
 
@@ -26550,7 +26548,7 @@ function parseLeadFilterArg(raw) {
26550
26548
  printError(`Invalid --filter: not valid JSON. Example: ${FILTER_EXAMPLE}`);
26551
26549
  exit(ExitCode.InternalError);
26552
26550
  }
26553
- const parsed = z52.array(LeadFilterConditionSchema).safeParse(value);
26551
+ const parsed = z50.array(LeadFilterConditionSchema).safeParse(value);
26554
26552
  if (!parsed.success) {
26555
26553
  const issue = parsed.error.issues[0];
26556
26554
  const path = issue?.path.map(String).join(".");
@@ -27698,35 +27696,187 @@ function registerCrmContactPoints(parent) {
27698
27696
  });
27699
27697
  }
27700
27698
 
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
- );
27699
+ // src/commands/crm/campaigns.ts
27700
+ function registerCrmCampaigns(parent) {
27701
+ const campaigns = parent.command("campaigns").description(
27702
+ "List outbound campaigns (default), or get / create / update / delete them and manage members. Syncing to a sequencer happens in the dashboard."
27703
+ ).argument("[query]", "Match campaign name or purpose.").option("--person <id>", "List this person's campaigns instead.").option("--json", "Machine-readable output.").action(
27704
+ (query, opts) => executeCampaignsList(query, opts)
27705
+ );
27706
+ campaigns.command("get").argument("<id>", "Campaign id.").description(
27707
+ "One campaign with member and sequence rollups. Use --field to extract a value (e.g. purpose)."
27708
+ ).option("--field <path>", "Print one dotted-path value.").action(async (id, opts) => {
27709
+ try {
27710
+ printJsonOrField(await crmService.getCampaign(id), opts.field);
27711
+ } catch (error) {
27712
+ exitOnApiError(error, {
27713
+ notFoundMessage: `No campaign with id "${id}" in this workspace.`
27714
+ });
27715
+ }
27716
+ });
27717
+ campaigns.command("create").description(
27718
+ "Create a campaign. --json: { name, purpose? }. Names are unique per workspace; the purpose steers every sequence drafted into it."
27719
+ ).requiredOption("--json <body>", "JSON campaign definition.").action(async (opts) => {
27720
+ try {
27721
+ printJson(
27722
+ await crmService.createCampaign(parseJsonObjectArg(opts.json))
27723
+ );
27724
+ } catch (error) {
27725
+ exitOnApiError(error);
27726
+ }
27727
+ });
27728
+ campaigns.command("update").argument("<id>", "Campaign id.").description(
27729
+ "Rename a campaign or change its purpose. --json: { name, purpose? }."
27730
+ ).requiredOption("--json <body>", "JSON campaign definition.").action(async (id, opts) => {
27731
+ try {
27732
+ printJson(
27733
+ await crmService.updateCampaign(id, parseJsonObjectArg(opts.json))
27734
+ );
27735
+ } catch (error) {
27736
+ exitOnApiError(error, {
27737
+ notFoundMessage: `No campaign with id "${id}" in this workspace.`
27738
+ });
27739
+ }
27740
+ });
27741
+ campaigns.command("delete").argument("<id>", "Campaign id.").description("Delete a campaign. Its sequence drafts are removed with it.").action(async (id) => {
27742
+ try {
27743
+ await crmService.deleteCampaign(id);
27744
+ printSuccess("Campaign deleted.");
27745
+ } catch (error) {
27746
+ exitOnApiError(error, {
27747
+ notFoundMessage: `No campaign with id "${id}" in this workspace.`
27748
+ });
27749
+ }
27750
+ });
27751
+ 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(
27752
+ async (id, query, opts) => executeMembersList(id, query, opts)
27753
+ );
27754
+ campaigns.command("add").argument("<campaignId>", "Campaign id.").argument("<personIds...>", "Person ids to add as members.").description(
27755
+ "Add people to a campaign. Members get their sequences drafted from the campaign page."
27756
+ ).action(async (campaignId, personIds) => {
27757
+ try {
27758
+ const { addedPersonIds } = await crmService.addCampaignPeople(
27759
+ campaignId,
27760
+ personIds
27761
+ );
27762
+ printSuccess(
27763
+ `Added ${addedPersonIds.length} member(s) to the campaign.`
27764
+ );
27765
+ } catch (error) {
27766
+ exitOnApiError(error);
27767
+ }
27768
+ });
27769
+ campaigns.command("remove").argument("<campaignId>", "Campaign id.").argument("<personIds...>", "Person ids to remove.").description(
27770
+ "Remove members and their drafts in this campaign. Leads already synced to a linked sequencer are deleted there too."
27771
+ ).action(async (campaignId, personIds) => {
27772
+ try {
27773
+ const { removedPersonIds } = await crmService.removeCampaignPeople(
27774
+ campaignId,
27775
+ personIds
27776
+ );
27777
+ printSuccess(
27778
+ `Removed ${removedPersonIds.length} member(s) from the campaign.`
27779
+ );
27780
+ } catch (error) {
27781
+ exitOnApiError(error);
27782
+ }
27783
+ });
27784
+ }
27785
+ async function executeCampaignsList(query, opts) {
27786
+ if (opts.person && query) {
27787
+ printError("Pass either a query or --person, not both.");
27717
27788
  exit(ExitCode.InternalError);
27718
27789
  }
27719
- return match;
27790
+ try {
27791
+ if (opts.person) {
27792
+ const results2 = await crmService.listPersonCampaigns(opts.person);
27793
+ if (opts.json) {
27794
+ printJson({ campaigns: results2 });
27795
+ return;
27796
+ }
27797
+ if (results2.length === 0) {
27798
+ process.stdout.write("Not in any campaigns.\n");
27799
+ return;
27800
+ }
27801
+ printTable(
27802
+ ["ID", "NAME", "DRAFTED", "ADDED"],
27803
+ results2.map((campaign) => [
27804
+ campaign.campaignId,
27805
+ campaign.campaignName,
27806
+ campaign.sequenceId ? "yes" : "",
27807
+ campaign.addedAt.slice(0, 10)
27808
+ ]),
27809
+ { colorFn: dimColumn(0) }
27810
+ );
27811
+ return;
27812
+ }
27813
+ const results = await crmService.listCampaigns(query);
27814
+ if (opts.json) {
27815
+ printJson({ campaigns: results });
27816
+ return;
27817
+ }
27818
+ if (results.length === 0) {
27819
+ process.stdout.write(
27820
+ query ? "No campaigns match.\n" : "No campaigns yet.\n"
27821
+ );
27822
+ return;
27823
+ }
27824
+ printTable(
27825
+ ["ID", "NAME", "PEOPLE", "SEQUENCES", "EXPORTED", "UPDATED"],
27826
+ results.map((campaign) => [
27827
+ campaign.id,
27828
+ campaign.name,
27829
+ String(campaign.personCount),
27830
+ String(campaign.sequenceCount),
27831
+ campaign.exportedTo.join(","),
27832
+ campaign.updatedAt.slice(0, 10)
27833
+ ]),
27834
+ { colorFn: dimColumn(0) }
27835
+ );
27836
+ } catch (error) {
27837
+ exitOnApiError(error);
27838
+ }
27720
27839
  }
27840
+ async function executeMembersList(campaignId, query, opts) {
27841
+ try {
27842
+ const results = await crmService.listCampaignMembers(campaignId, query);
27843
+ if (opts.json) {
27844
+ printJson({ members: results });
27845
+ return;
27846
+ }
27847
+ if (results.length === 0) {
27848
+ process.stdout.write(query ? "No members match.\n" : "No members yet.\n");
27849
+ return;
27850
+ }
27851
+ printTable(
27852
+ ["PERSON", "NAME", "COMPANY", "STEPS", "TO", "EXPORTED", "ADDED"],
27853
+ results.map((member) => [
27854
+ member.id,
27855
+ member.personName,
27856
+ member.personCompanyName ?? "",
27857
+ member.sequenceStepCount === null ? "" : String(member.sequenceStepCount),
27858
+ member.recipientEmail ?? "",
27859
+ member.exportedTo.join(","),
27860
+ member.addedAt.slice(0, 10)
27861
+ ]),
27862
+ { colorFn: dimColumn(0) }
27863
+ );
27864
+ } catch (error) {
27865
+ exitOnApiError(error, {
27866
+ notFoundMessage: `No campaign with id "${campaignId}" in this workspace.`
27867
+ });
27868
+ }
27869
+ }
27870
+
27871
+ // src/commands/crm/sequences.ts
27721
27872
  function registerCrmSequences(parent) {
27722
27873
  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));
27874
+ "List sequence drafts (default), or get / create / update / delete them. Every draft lives in a campaign; syncing to a sequencer happens in the dashboard."
27875
+ ).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(
27876
+ (query, opts) => executeSequencesList(query, opts)
27877
+ );
27728
27878
  sequences.command("get").argument("<id>", "Sequence id.").description(
27729
- "One sequence with its steps. Use --field to extract a value (e.g. status)."
27879
+ "One draft with its steps. Use --field to extract a value (e.g. campaignId)."
27730
27880
  ).option("--field <path>", "Print one dotted-path value.").action(async (id, opts) => {
27731
27881
  try {
27732
27882
  printJsonOrField(await crmService.getSequence(id), opts.field);
@@ -27737,21 +27887,23 @@ function registerCrmSequences(parent) {
27737
27887
  }
27738
27888
  });
27739
27889
  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);
27890
+ "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."
27891
+ ).requiredOption("--person <id>", "Person the sequence targets.").requiredOption("--campaign <id>", "Campaign the draft belongs to.").requiredOption("--json <body>", "JSON sequence definition.").action(
27892
+ async (opts) => {
27893
+ try {
27894
+ printJson(
27895
+ await crmService.createSequence(opts.person, {
27896
+ ...parseJsonObjectArg(opts.json),
27897
+ campaignId: opts.campaign
27898
+ })
27899
+ );
27900
+ } catch (error) {
27901
+ exitOnApiError(error);
27902
+ }
27751
27903
  }
27752
- });
27904
+ );
27753
27905
  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."
27906
+ "Replace a draft wholesale (steps, recipient). The next campaign sync pushes the new copy to linked sequencers."
27755
27907
  ).requiredOption("--json <body>", "JSON sequence definition.").action(async (id, opts) => {
27756
27908
  try {
27757
27909
  printJson(
@@ -27763,7 +27915,7 @@ function registerCrmSequences(parent) {
27763
27915
  });
27764
27916
  }
27765
27917
  });
27766
- sequences.command("delete").argument("<id>", "Sequence id.").description("Delete a draft or finished sequence (active ones refuse).").action(async (id) => {
27918
+ sequences.command("delete").argument("<id>", "Sequence id.").description("Delete a draft. The person stays a member of the campaign.").action(async (id) => {
27767
27919
  try {
27768
27920
  await crmService.deleteSequence(id);
27769
27921
  printSuccess("Sequence deleted.");
@@ -27774,14 +27926,17 @@ function registerCrmSequences(parent) {
27774
27926
  }
27775
27927
  });
27776
27928
  }
27777
- async function executeSequencesList(opts) {
27778
- const status = statusOrExit(opts.status);
27929
+ async function executeSequencesList(query, opts) {
27930
+ if (opts.person && query) {
27931
+ printError("Pass either a query or --person, not both.");
27932
+ exit(ExitCode.InternalError);
27933
+ }
27779
27934
  try {
27780
27935
  if (opts.person) {
27781
27936
  const all = await crmService.listPersonSequences(opts.person);
27782
- const results2 = status ? all.filter((sequence) => sequence.status === status) : all;
27937
+ const results2 = opts.campaign ? all.filter((sequence) => sequence.campaignId === opts.campaign) : all;
27783
27938
  if (opts.json) {
27784
- printJson(results2);
27939
+ printJson({ sequences: results2 });
27785
27940
  return;
27786
27941
  }
27787
27942
  if (results2.length === 0) {
@@ -27789,10 +27944,10 @@ async function executeSequencesList(opts) {
27789
27944
  return;
27790
27945
  }
27791
27946
  printTable(
27792
- ["ID", "STATUS", "STEPS", "RECIPIENT", "UPDATED"],
27947
+ ["ID", "CAMPAIGN", "STEPS", "TO", "UPDATED"],
27793
27948
  results2.map((sequence) => [
27794
27949
  sequence.id,
27795
- sequence.status,
27950
+ sequence.campaignName,
27796
27951
  String(sequence.steps.length),
27797
27952
  sequence.recipientEmail ?? "",
27798
27953
  sequence.updatedAt.slice(0, 10)
@@ -27801,9 +27956,12 @@ async function executeSequencesList(opts) {
27801
27956
  );
27802
27957
  return;
27803
27958
  }
27804
- const results = await crmService.listSequences({ status });
27959
+ const results = await crmService.listSequences({
27960
+ query,
27961
+ campaignId: opts.campaign
27962
+ });
27805
27963
  if (opts.json) {
27806
- printJson(results);
27964
+ printJson({ sequences: results });
27807
27965
  return;
27808
27966
  }
27809
27967
  if (results.length === 0) {
@@ -27811,13 +27969,14 @@ async function executeSequencesList(opts) {
27811
27969
  return;
27812
27970
  }
27813
27971
  printTable(
27814
- ["ID", "PERSON", "STATUS", "STEPS", "RECIPIENT", "UPDATED"],
27972
+ ["ID", "PERSON", "CAMPAIGN", "STEPS", "TO", "EXPORTED", "UPDATED"],
27815
27973
  results.map((sequence) => [
27816
27974
  sequence.id,
27817
27975
  sequence.personName,
27818
- sequence.status,
27976
+ sequence.campaignName,
27819
27977
  String(sequence.stepCount),
27820
27978
  sequence.recipientEmail ?? "",
27979
+ sequence.exportedTo.join(","),
27821
27980
  sequence.updatedAt.slice(0, 10)
27822
27981
  ]),
27823
27982
  { colorFn: dimColumn(0) }
@@ -27827,51 +27986,6 @@ async function executeSequencesList(opts) {
27827
27986
  }
27828
27987
  }
27829
27988
 
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
27989
  // src/commands/crm/waterfalls.ts
27876
27990
  function registerCrmWaterfalls(parent) {
27877
27991
  parent.command("waterfalls").description(
@@ -28032,8 +28146,8 @@ function registerCrmCommands(program2) {
28032
28146
  registerCrmFields(crm);
28033
28147
  registerCrmEmployments(crm);
28034
28148
  registerCrmContactPoints(crm);
28149
+ registerCrmCampaigns(crm);
28035
28150
  registerCrmSequences(crm);
28036
- registerCrmSkills(crm);
28037
28151
  registerCrmWaterfalls(crm);
28038
28152
  registerCrmEnrich(crm);
28039
28153
  crm.action(() => crm.help());
@@ -28045,7 +28159,7 @@ function registerCrmCommands(program2) {
28045
28159
  import chalk9 from "chalk";
28046
28160
 
28047
28161
  // src/lib/preflight.ts
28048
- import { delimiter, join as join8 } from "path";
28162
+ import { delimiter, join as join9 } from "path";
28049
28163
  import { accessSync, constants } from "fs";
28050
28164
  var REQUIRED_RUNTIME_DEPS = ["bash", "curl", "jq"];
28051
28165
  function findOnPath(name) {
@@ -28053,7 +28167,7 @@ function findOnPath(name) {
28053
28167
  if (!path) return null;
28054
28168
  for (const dir of path.split(delimiter)) {
28055
28169
  if (dir.length === 0) continue;
28056
- const candidate = join8(dir, name);
28170
+ const candidate = join9(dir, name);
28057
28171
  try {
28058
28172
  accessSync(candidate, constants.X_OK);
28059
28173
  return candidate;
@@ -28246,10 +28360,10 @@ function printReport(checks) {
28246
28360
  import { spawn as spawn3, execFileSync } from "child_process";
28247
28361
  import { realpathSync } from "fs";
28248
28362
  import { sep as sep2 } from "path";
28249
- import { z as z53 } from "zod";
28363
+ import { z as z51 } from "zod";
28250
28364
  import semver from "semver";
28251
28365
  var PACKAGE_NAME = "@general-input/cli";
28252
- var registryLatestSchema = z53.object({ version: z53.string() });
28366
+ var registryLatestSchema = z51.object({ version: z51.string() });
28253
28367
  function registerUpgradeCommand(program2) {
28254
28368
  program2.command("upgrade").description(
28255
28369
  "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."
@@ -28337,11 +28451,11 @@ function isInsideDirectory(args) {
28337
28451
  return args.path.startsWith(args.directory + sep2);
28338
28452
  }
28339
28453
  function runNpmInstall() {
28340
- return new Promise((resolve21, reject) => {
28454
+ return new Promise((resolve22, reject) => {
28341
28455
  const child = spawn3("npm", ["install", "-g", `${PACKAGE_NAME}@latest`], {
28342
28456
  stdio: "inherit"
28343
28457
  });
28344
- child.once("exit", (code) => resolve21(code ?? 1));
28458
+ child.once("exit", (code) => resolve22(code ?? 1));
28345
28459
  child.once("error", (err) => reject(err));
28346
28460
  });
28347
28461
  }