@dench.com/cli 3.12.30-staging.1461 → 3.12.32-staging.1473

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.
@@ -160,6 +160,74 @@ function local(reason: string): LocalOnlyOperation {
160
160
  return { kind: "local", reason };
161
161
  }
162
162
 
163
+ // Shared schemas for CRM AI Research Columns & Staging Lists (`crm.columns.*`).
164
+ // Wave 1 hard exclusions: strict 5-shape outputKind (no "boolean") and strict
165
+ // request objects (no Wave 2 `runCondition`).
166
+ const aiColumnOutputKindSchema = z.enum([
167
+ "fit_check",
168
+ "text",
169
+ "enum",
170
+ "number",
171
+ "url",
172
+ ]);
173
+
174
+ const aiColumnRunScopeSchema = z.enum(["selected", "empty", "all"]);
175
+
176
+ const stagingEntityKindSchema = z.enum(["company", "person"]);
177
+
178
+ const columnRunSummarySchema = z.object({
179
+ _id: z.string(),
180
+ organizationId: z.string(),
181
+ objectId: z.string(),
182
+ fieldId: z.string(),
183
+ kind: z.literal("ai_research"),
184
+ status: z.enum([
185
+ "pending",
186
+ "running",
187
+ "paused",
188
+ "capped",
189
+ "stopped",
190
+ "completed",
191
+ "failed",
192
+ ]),
193
+ scope: aiColumnRunScopeSchema,
194
+ includeUnknownAndFailed: z.boolean(),
195
+ nextIndex: z.number(),
196
+ totalCount: z.number(),
197
+ completedCount: z.number(),
198
+ skippedCount: z.number(),
199
+ failedCount: z.number(),
200
+ spentCents: z.number(),
201
+ creditStopCeiling: z.number().nullable(),
202
+ pauseReason: z
203
+ .enum([
204
+ "user_paused",
205
+ "out_of_credits",
206
+ "billing_unavailable",
207
+ "kill_switch",
208
+ ])
209
+ .nullable(),
210
+ errorMessage: z.string().nullable(),
211
+ promptVersion: z.number(),
212
+ actorUserId: z.string().nullable(),
213
+ claimedAt: z.number().nullable(),
214
+ startedAt: z.number(),
215
+ finishedAt: z.number().nullable(),
216
+ updatedAt: z.number(),
217
+ });
218
+
219
+ const cellProvenanceSummarySchema = z.object({
220
+ status: z.enum(["ok", "unknown", "skipped", "failed", "user_override"]),
221
+ skipReason: z.string().nullable(),
222
+ errorMessage: z.string().nullable(),
223
+ sourceUrl: z.string().nullable(),
224
+ evidenceQuote: z.string().nullable(),
225
+ promptVersion: z.number(),
226
+ runId: z.string().nullable(),
227
+ updatedByUserId: z.string().nullable(),
228
+ updatedAt: z.number(),
229
+ });
230
+
163
231
  const rawApiOperations = [
164
232
  op({
165
233
  id: "environments.list",
@@ -995,13 +1063,18 @@ const rawApiOperations = [
995
1063
  id: "lists.import",
996
1064
  group: "lists",
997
1065
  summary:
998
- "Explicitly import selected saved profiles, optionally filtered by enrichment, with a configured Lead status. Reuses CRM records; never sends outreach or triggers conversion.",
1066
+ "Explicitly import saved find rows into lead, company, job_posting, or a list slug (e.g. list_q4_fintech). Reuses existing records; never sends outreach or triggers conversion.",
999
1067
  cli: "dench artifacts import",
1000
1068
  method: "POST",
1001
1069
  path: "/lists/{artifactId}/import",
1002
1070
  requestSchema: z.object({
1003
1071
  artifactId: z.string().min(1),
1004
- to: z.enum(["lead", "company", "job_posting"]),
1072
+ to: z
1073
+ .string()
1074
+ .min(1)
1075
+ .describe(
1076
+ 'Target CRM object or list slug: "lead", "company", "job_posting", or a list slug like "list_q4_fintech".',
1077
+ ),
1005
1078
  rowIndexes: z.array(z.number().int().min(0)).optional(),
1006
1079
  status: z.string().min(1).optional(),
1007
1080
  enrichment: z
@@ -1020,6 +1093,35 @@ const rawApiOperations = [
1020
1093
  responseSchema: anyResponse,
1021
1094
  backend: convex("action", "functions/workspaceArtifacts:importArtifact"),
1022
1095
  }),
1096
+ op({
1097
+ id: "lists.resolveCompanies",
1098
+ group: "lists",
1099
+ summary:
1100
+ "Resolve a saved Find company list, Company saved view, or qualified list (optionally fitOnly) into canonical company domains for people/job searches.",
1101
+ cli: "dench leads find --company-list",
1102
+ method: "POST",
1103
+ path: "/lists/resolve-companies",
1104
+ requestSchema: z
1105
+ .object({
1106
+ artifactId: z.string().min(1).optional(),
1107
+ viewName: z.string().min(1).optional(),
1108
+ objectName: z.string().min(1).optional(),
1109
+ entryIds: z.array(z.string().min(1)).optional(),
1110
+ fitOnly: z.boolean().optional(),
1111
+ domainsOnly: z.boolean().optional(),
1112
+ })
1113
+ .strict(),
1114
+ responseSchema: z.object({
1115
+ source: z.enum(["artifact", "view", "entries", "fit_checks"]),
1116
+ title: z.string(),
1117
+ domains: z.array(z.string()),
1118
+ names: z.array(z.string()),
1119
+ totalCompanies: z.number(),
1120
+ truncated: z.boolean(),
1121
+ skippedNoDomain: z.number().optional(),
1122
+ }),
1123
+ backend: convex("action", "functions/companyLists:resolveCompanyList"),
1124
+ }),
1023
1125
  op({
1024
1126
  id: "lists.get",
1025
1127
  group: "lists",
@@ -3261,6 +3363,557 @@ const rawApiOperations = [
3261
3363
  responseSchema: anyResponse,
3262
3364
  backend: convex("mutation", "functions/crm/analytics:setViewAnalyticsMode"),
3263
3365
  }),
3366
+ // CRM AI Research columns & staging lists (`functions/crm/columns`).
3367
+ op({
3368
+ id: "crm.columns.listStagingLists",
3369
+ group: "crm",
3370
+ summary:
3371
+ "List active workspace staging lists with row counts and management permissions.",
3372
+ cli: "dench crm columns lists",
3373
+ method: "GET",
3374
+ path: "/crm/columns/lists",
3375
+ requestSchema: z.object({}).strict(),
3376
+ responseSchema: z.array(
3377
+ z.object({
3378
+ _id: z.string(),
3379
+ name: z.string(),
3380
+ displayName: z.string(),
3381
+ stagingEntityKind: stagingEntityKindSchema,
3382
+ entryCount: z.number(),
3383
+ createdByUserId: z.string().nullable(),
3384
+ canManage: z.boolean(),
3385
+ updatedAt: z.number(),
3386
+ }),
3387
+ ),
3388
+ backend: convex("query", "functions/crm/columns:listStagingLists"),
3389
+ }),
3390
+ op({
3391
+ id: "crm.columns.createStagingList",
3392
+ group: "crm",
3393
+ summary:
3394
+ "Create a staging list CRM object pre-seeded with canonical company or person columns and Notes.",
3395
+ cli: "dench crm columns create-list",
3396
+ method: "POST",
3397
+ path: "/crm/columns/lists",
3398
+ requestSchema: z
3399
+ .object({
3400
+ displayName: z
3401
+ .string()
3402
+ .min(1)
3403
+ .max(120)
3404
+ .describe("Human-readable staging list title (1-120 characters)."),
3405
+ entityKind: stagingEntityKindSchema
3406
+ .optional()
3407
+ .describe('Entity kind: "company" (default) or "person".'),
3408
+ })
3409
+ .strict(),
3410
+ responseSchema: z.object({
3411
+ objectId: z.string(),
3412
+ objectName: z.string(),
3413
+ displayName: z.string(),
3414
+ stagingEntityKind: stagingEntityKindSchema,
3415
+ }),
3416
+ backend: convex("mutation", "functions/crm/columns:createStagingList"),
3417
+ }),
3418
+ op({
3419
+ id: "crm.columns.deleteStagingListCascade",
3420
+ group: "crm",
3421
+ summary:
3422
+ "Archive a staging list immediately, stop active AI column runs, and schedule bounded cascade deletion (creator or admin).",
3423
+ cli: "dench crm columns delete-list",
3424
+ method: "DELETE",
3425
+ path: "/crm/columns/lists/{objectName}",
3426
+ requestSchema: z
3427
+ .object({
3428
+ objectName: z.string().min(1).describe("Staging list object slug."),
3429
+ })
3430
+ .strict(),
3431
+ responseSchema: z.object({
3432
+ deleted: z.literal(true),
3433
+ archivedAt: z.number(),
3434
+ }),
3435
+ backend: convex(
3436
+ "mutation",
3437
+ "functions/crm/columns:deleteStagingListCascade",
3438
+ ),
3439
+ }),
3440
+ op({
3441
+ id: "crm.columns.createAi",
3442
+ group: "crm",
3443
+ summary:
3444
+ "Create a typed AI Research column (fit_check, text, enum, number, or url) on a staging list or CRM object without autorunning.",
3445
+ cli: "dench crm columns create-ai",
3446
+ method: "POST",
3447
+ path: "/crm/objects/{objectName}/columns/ai",
3448
+ requestSchema: z
3449
+ .object({
3450
+ objectName: z
3451
+ .string()
3452
+ .min(1)
3453
+ .describe("CRM object or staging list slug."),
3454
+ name: z
3455
+ .string()
3456
+ .min(1)
3457
+ .max(100)
3458
+ .describe("Column name (1-100 characters, cannot start with '--')."),
3459
+ prompt: z
3460
+ .string()
3461
+ .min(1)
3462
+ .max(2000)
3463
+ .describe(
3464
+ "Web-research prompt (1-2000 characters; supports {{Field}} tokens).",
3465
+ ),
3466
+ outputKind: aiColumnOutputKindSchema.describe(
3467
+ 'Typed output shape: "fit_check" | "text" | "enum" | "number" | "url".',
3468
+ ),
3469
+ enumValues: z
3470
+ .array(z.string().min(1).max(80))
3471
+ .min(1)
3472
+ .max(20)
3473
+ .optional()
3474
+ .describe(
3475
+ 'Allowed options (1-20 items, <=80 chars each); only valid for outputKind "enum".',
3476
+ ),
3477
+ description: z
3478
+ .string()
3479
+ .optional()
3480
+ .describe("Optional column description."),
3481
+ requiredInputFieldIds: z
3482
+ .array(z.string().min(1))
3483
+ .optional()
3484
+ .describe(
3485
+ "CRM field IDs that must be populated on a row before it runs.",
3486
+ ),
3487
+ })
3488
+ .strict(),
3489
+ responseSchema: z.object({
3490
+ fieldId: z.string(),
3491
+ name: z.string(),
3492
+ promptVersion: z.number(),
3493
+ }),
3494
+ backend: convex("mutation", "functions/crm/columns:createAi"),
3495
+ }),
3496
+ op({
3497
+ id: "crm.columns.updateAi",
3498
+ group: "crm",
3499
+ summary:
3500
+ "Update an AI Research column's prompt, enum options, description, or required input fields without autorunning.",
3501
+ cli: "dench crm columns update-ai",
3502
+ method: "PATCH",
3503
+ path: "/crm/objects/{objectName}/columns/ai/{fieldName}",
3504
+ requestSchema: z
3505
+ .object({
3506
+ objectName: z
3507
+ .string()
3508
+ .min(1)
3509
+ .describe("CRM object or staging list slug."),
3510
+ fieldName: z
3511
+ .string()
3512
+ .min(1)
3513
+ .describe("Existing AI Research column name."),
3514
+ prompt: z
3515
+ .string()
3516
+ .min(1)
3517
+ .max(2000)
3518
+ .optional()
3519
+ .describe(
3520
+ "Updated prompt (blocked while a run is pending or running).",
3521
+ ),
3522
+ enumValues: z
3523
+ .array(z.string().min(1).max(80))
3524
+ .min(1)
3525
+ .max(20)
3526
+ .optional()
3527
+ .describe(
3528
+ 'Updated options for "enum" columns (blocked while a run is pending or running).',
3529
+ ),
3530
+ description: z
3531
+ .string()
3532
+ .optional()
3533
+ .describe("Updated description (empty string clears)."),
3534
+ requiredInputFieldIds: z
3535
+ .array(z.string().min(1))
3536
+ .optional()
3537
+ .describe("Updated required input field IDs (empty array clears)."),
3538
+ })
3539
+ .strict(),
3540
+ responseSchema: z.object({
3541
+ fieldId: z.string(),
3542
+ promptVersion: z.number(),
3543
+ }),
3544
+ backend: convex("mutation", "functions/crm/columns:updateAi"),
3545
+ }),
3546
+ op({
3547
+ id: "crm.columns.deleteAi",
3548
+ group: "crm",
3549
+ summary:
3550
+ "Delete an AI Research column, stop any active run, and schedule bounded cell provenance cleanup.",
3551
+ cli: "dench crm columns delete-ai",
3552
+ method: "DELETE",
3553
+ path: "/crm/objects/{objectName}/columns/ai/{fieldName}",
3554
+ requestSchema: z
3555
+ .object({
3556
+ objectName: z
3557
+ .string()
3558
+ .min(1)
3559
+ .describe("CRM object or staging list slug."),
3560
+ fieldName: z
3561
+ .string()
3562
+ .min(1)
3563
+ .describe("AI Research column name to delete."),
3564
+ })
3565
+ .strict(),
3566
+ responseSchema: z.object({
3567
+ deleted: z.literal(true),
3568
+ }),
3569
+ backend: convex("mutation", "functions/crm/columns:deleteAi"),
3570
+ }),
3571
+ op({
3572
+ id: "crm.columns.estimateRun",
3573
+ group: "crm",
3574
+ summary:
3575
+ "Estimate eligible rows and exact AI credit cost (2 AI credits/row) before starting an AI Research column run.",
3576
+ cli: "dench crm columns estimate-run",
3577
+ method: "POST",
3578
+ path: "/crm/objects/{objectName}/columns/{fieldName}/estimate",
3579
+ requestSchema: z
3580
+ .object({
3581
+ objectName: z
3582
+ .string()
3583
+ .min(1)
3584
+ .describe("CRM object or staging list slug."),
3585
+ fieldName: z.string().min(1).describe("AI Research column name."),
3586
+ scope: aiColumnRunScopeSchema.describe(
3587
+ 'Row scope: "selected" (uses entryIds), "empty", or "all".',
3588
+ ),
3589
+ entryIds: z
3590
+ .array(z.string().min(1))
3591
+ .optional()
3592
+ .describe('Target entry IDs when scope is "selected".'),
3593
+ includeUnknownAndFailed: z
3594
+ .boolean()
3595
+ .optional()
3596
+ .describe(
3597
+ "Include rows whose prior provenance was unknown or failed (default true).",
3598
+ ),
3599
+ limit: z
3600
+ .number()
3601
+ .int()
3602
+ .min(1)
3603
+ .max(2000)
3604
+ .optional()
3605
+ .describe(
3606
+ "Optional row limit (1-2000) to test the top N eligible rows in newest-first order.",
3607
+ ),
3608
+ })
3609
+ .strict(),
3610
+ responseSchema: z.object({
3611
+ eligibleCount: z.number(),
3612
+ totalCandidates: z.number(),
3613
+ skippedOverrideCount: z.number(),
3614
+ skippedFilledCount: z.number(),
3615
+ outdatedCount: z.number().optional(),
3616
+ cappedAtLimit: z.boolean(),
3617
+ creditsPerRow: z.number(),
3618
+ estimatedCredits: z.number(),
3619
+ pool: z.literal("ai_credits"),
3620
+ activeRun: columnRunSummarySchema.nullable(),
3621
+ }),
3622
+ backend: convex("query", "functions/crm/columns:estimateRun"),
3623
+ }),
3624
+ op({
3625
+ id: "crm.columns.startRun",
3626
+ group: "crm",
3627
+ summary:
3628
+ "Start a durable AI Research column run with explicit row scope and optional hard AI credit ceiling.",
3629
+ cli: "dench crm columns start-run",
3630
+ method: "POST",
3631
+ path: "/crm/objects/{objectName}/columns/{fieldName}/runs",
3632
+ requestSchema: z
3633
+ .object({
3634
+ objectName: z
3635
+ .string()
3636
+ .min(1)
3637
+ .describe("CRM object or staging list slug."),
3638
+ fieldName: z.string().min(1).describe("AI Research column name."),
3639
+ scope: aiColumnRunScopeSchema.describe(
3640
+ 'Row scope: "selected" (uses entryIds), "empty", or "all".',
3641
+ ),
3642
+ entryIds: z
3643
+ .array(z.string().min(1))
3644
+ .optional()
3645
+ .describe('Target entry IDs when scope is "selected".'),
3646
+ includeUnknownAndFailed: z
3647
+ .boolean()
3648
+ .optional()
3649
+ .describe(
3650
+ "Include rows whose prior provenance was unknown or failed (default true).",
3651
+ ),
3652
+ limit: z
3653
+ .number()
3654
+ .int()
3655
+ .min(1)
3656
+ .max(2000)
3657
+ .optional()
3658
+ .describe(
3659
+ "Optional row limit (1-2000) to run only the top N eligible rows in newest-first order.",
3660
+ ),
3661
+ creditStopCeiling: z
3662
+ .number()
3663
+ .min(2)
3664
+ .nullable()
3665
+ .optional()
3666
+ .describe(
3667
+ "Optional hard spend cap in AI credits (>=2, 1 credit = 1 cent) or null for uncapped.",
3668
+ ),
3669
+ })
3670
+ .strict(),
3671
+ responseSchema: z.object({
3672
+ runId: z.string(),
3673
+ status: z.literal("pending"),
3674
+ totalCount: z.number(),
3675
+ estimatedCredits: z.number(),
3676
+ }),
3677
+ backend: convex("mutation", "functions/crm/columns:startRun"),
3678
+ }),
3679
+ op({
3680
+ id: "crm.columns.pauseRun",
3681
+ group: "crm",
3682
+ summary: "Pause a pending or running AI Research column run.",
3683
+ cli: "dench crm columns pause-run",
3684
+ method: "POST",
3685
+ path: "/crm/columns/runs/{runId}/pause",
3686
+ requestSchema: z
3687
+ .object({
3688
+ runId: z.string().min(1).describe("AI column run ID."),
3689
+ })
3690
+ .strict(),
3691
+ responseSchema: z.object({
3692
+ runId: z.string(),
3693
+ status: z.literal("paused"),
3694
+ applied: z.boolean(),
3695
+ }),
3696
+ backend: convex("mutation", "functions/crm/columns:pauseRun"),
3697
+ }),
3698
+ op({
3699
+ id: "crm.columns.resumeRun",
3700
+ group: "crm",
3701
+ summary:
3702
+ "Resume a paused or capped AI Research column run, optionally raising or clearing creditStopCeiling.",
3703
+ cli: "dench crm columns resume-run",
3704
+ method: "POST",
3705
+ path: "/crm/columns/runs/{runId}/resume",
3706
+ requestSchema: z
3707
+ .object({
3708
+ runId: z.string().min(1).describe("Paused or capped AI column run ID."),
3709
+ creditStopCeiling: z
3710
+ .number()
3711
+ .min(2)
3712
+ .nullable()
3713
+ .optional()
3714
+ .describe(
3715
+ "New spend cap in AI credits (must be >= spentCents + 2 on capped runs) or null to remove the cap.",
3716
+ ),
3717
+ })
3718
+ .strict(),
3719
+ responseSchema: z.object({
3720
+ runId: z.string(),
3721
+ status: z.enum(["pending", "completed"]),
3722
+ }),
3723
+ backend: convex("mutation", "functions/crm/columns:resumeRun"),
3724
+ }),
3725
+ op({
3726
+ id: "crm.columns.stopRun",
3727
+ group: "crm",
3728
+ summary:
3729
+ "Permanently stop an active, paused, or capped AI Research column run.",
3730
+ cli: "dench crm columns stop-run",
3731
+ method: "POST",
3732
+ path: "/crm/columns/runs/{runId}/stop",
3733
+ requestSchema: z
3734
+ .object({
3735
+ runId: z.string().min(1).describe("AI column run ID to stop."),
3736
+ })
3737
+ .strict(),
3738
+ responseSchema: z.object({
3739
+ runId: z.string(),
3740
+ status: z.literal("stopped"),
3741
+ applied: z.boolean(),
3742
+ }),
3743
+ backend: convex("mutation", "functions/crm/columns:stopRun"),
3744
+ }),
3745
+ op({
3746
+ id: "crm.columns.getRunStatus",
3747
+ group: "crm",
3748
+ summary:
3749
+ "Read active AI Research column runs on an object and optionally inspect a specific column or run ID.",
3750
+ cli: "dench crm columns run-status",
3751
+ method: "GET",
3752
+ path: "/crm/objects/{objectName}/columns/runs",
3753
+ requestSchema: z
3754
+ .object({
3755
+ objectName: z
3756
+ .string()
3757
+ .min(1)
3758
+ .describe("CRM object or staging list slug."),
3759
+ fieldName: z
3760
+ .string()
3761
+ .min(1)
3762
+ .optional()
3763
+ .describe(
3764
+ "Optional AI Research column name to inspect its active or latest terminal run.",
3765
+ ),
3766
+ runId: z
3767
+ .string()
3768
+ .min(1)
3769
+ .optional()
3770
+ .describe("Optional specific AI column run ID."),
3771
+ })
3772
+ .strict(),
3773
+ responseSchema: z.object({
3774
+ run: columnRunSummarySchema.nullable(),
3775
+ activeRuns: z.array(columnRunSummarySchema),
3776
+ }),
3777
+ backend: convex("query", "functions/crm/columns:getRunStatus"),
3778
+ }),
3779
+ op({
3780
+ id: "crm.columns.overrideCell",
3781
+ group: "crm",
3782
+ summary:
3783
+ "Manually override (or clear with null) an AI Research cell, locking it as user_override and clearing stale citations.",
3784
+ cli: "dench crm columns override-cell",
3785
+ method: "PUT",
3786
+ path: "/crm/objects/{objectName}/entries/{entryId}/columns/{fieldName}/override",
3787
+ requestSchema: z
3788
+ .object({
3789
+ objectName: z
3790
+ .string()
3791
+ .min(1)
3792
+ .describe("CRM object or staging list slug."),
3793
+ entryId: z.string().min(1).describe("CRM entry ID."),
3794
+ fieldName: z.string().min(1).describe("AI Research column name."),
3795
+ value: z
3796
+ .union([z.string(), z.number(), z.null()])
3797
+ .describe(
3798
+ "Manual cell value matching the column's outputKind, or null to clear.",
3799
+ ),
3800
+ })
3801
+ .strict(),
3802
+ responseSchema: z.object({
3803
+ entryId: z.string(),
3804
+ fieldId: z.string(),
3805
+ fieldName: z.string(),
3806
+ value: z.union([z.string(), z.number(), z.null()]),
3807
+ provenanceStatus: z.literal("user_override"),
3808
+ }),
3809
+ backend: convex("mutation", "functions/crm/columns:overrideCell"),
3810
+ }),
3811
+ op({
3812
+ id: "crm.columns.rerunSingleCell",
3813
+ group: "crm",
3814
+ summary:
3815
+ "Re-run a single AI Research cell live (2 AI credits; 0 DB writes on error; set unlockOverride to replace a manual override).",
3816
+ cli: "dench crm columns rerun-cell",
3817
+ method: "POST",
3818
+ path: "/crm/objects/{objectName}/entries/{entryId}/columns/{fieldName}/rerun",
3819
+ requestSchema: z
3820
+ .object({
3821
+ objectName: z
3822
+ .string()
3823
+ .min(1)
3824
+ .describe("CRM object or staging list slug."),
3825
+ entryId: z.string().min(1).describe("CRM entry ID."),
3826
+ fieldName: z.string().min(1).describe("AI Research column name."),
3827
+ unlockOverride: z
3828
+ .boolean()
3829
+ .optional()
3830
+ .describe(
3831
+ "Set true to replace an existing manual user_override (default false).",
3832
+ ),
3833
+ })
3834
+ .strict(),
3835
+ responseSchema: z.union([
3836
+ z.object({
3837
+ status: z.enum(["ok", "unknown"]),
3838
+ entryId: z.string(),
3839
+ fieldId: z.string(),
3840
+ value: z.union([z.string(), z.number(), z.null()]),
3841
+ sourceUrl: z.string().nullable(),
3842
+ evidenceQuote: z.string().nullable(),
3843
+ billedCents: z.number(),
3844
+ }),
3845
+ z.object({
3846
+ status: z.literal("skipped"),
3847
+ entryId: z.string(),
3848
+ fieldId: z.string(),
3849
+ reason: z.literal("missing_input"),
3850
+ missingFieldNames: z.array(z.string()),
3851
+ billedCents: z.literal(0),
3852
+ }),
3853
+ ]),
3854
+ backend: convex("action", "functions/crm/columns:rerunSingleCell"),
3855
+ }),
3856
+ op({
3857
+ id: "crm.columns.getCellProvenanceBatch",
3858
+ group: "crm",
3859
+ summary:
3860
+ "Read page-scoped AI Research cell citations, statuses, and override state for up to 100 entry IDs.",
3861
+ cli: "dench crm columns provenance",
3862
+ method: "POST",
3863
+ path: "/crm/objects/{objectName}/columns/provenance",
3864
+ requestSchema: z
3865
+ .object({
3866
+ objectName: z
3867
+ .string()
3868
+ .min(1)
3869
+ .describe("CRM object or staging list slug."),
3870
+ entryIds: z
3871
+ .array(z.string().min(1))
3872
+ .max(100)
3873
+ .describe("Entry IDs to fetch cell provenance for (max 100)."),
3874
+ })
3875
+ .strict(),
3876
+ responseSchema: z.record(z.string(), cellProvenanceSummarySchema),
3877
+ backend: convex("query", "functions/crm/columns:getCellProvenanceBatch"),
3878
+ }),
3879
+ op({
3880
+ id: "crm.columns.getStagingTriageSummary",
3881
+ group: "crm",
3882
+ summary:
3883
+ "Read O(1) Fit Check triage counts (Fits, Does not fit, Unknown, Not run) and domain-ready Fit count for a list.",
3884
+ cli: "dench crm columns summary",
3885
+ method: "GET",
3886
+ path: "/crm/objects/{objectName}/columns/summary",
3887
+ requestSchema: z
3888
+ .object({
3889
+ objectName: z
3890
+ .string()
3891
+ .min(1)
3892
+ .describe("CRM object or list slug (e.g. list_q4_fintech)."),
3893
+ })
3894
+ .strict(),
3895
+ responseSchema: z.object({
3896
+ totalCount: z.number(),
3897
+ countsTruncated: z.boolean(),
3898
+ fitColumns: z.array(
3899
+ z.object({
3900
+ fieldId: z.string(),
3901
+ fieldName: z.string(),
3902
+ fits: z.number(),
3903
+ doesNotFit: z.number(),
3904
+ unknown: z.number(),
3905
+ notRun: z.number(),
3906
+ populated: z.boolean(),
3907
+ }),
3908
+ ),
3909
+ populatedFitFieldCount: z.number(),
3910
+ fitQualifiedCount: z.number(),
3911
+ fitQualifiedWithDomainCount: z.number(),
3912
+ fitQualifiedSkippedNoDomain: z.number(),
3913
+ fitQualifiedTruncated: z.boolean(),
3914
+ }),
3915
+ backend: convex("query", "functions/crm/columns:getStagingTriageSummary"),
3916
+ }),
3264
3917
  op({
3265
3918
  id: "crm.enrich.cell",
3266
3919
  group: "crm",