@dench.com/cli 3.0.4-staging.289 → 3.1.0-staging.292
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -0
- package/app-sdk.d.ts +23 -0
- package/leads.ts +54 -0
- package/lib/app-sdk-catalog.generated.ts +2 -0
- package/lib/command-registry.ts +42 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -201,6 +201,42 @@ dench signin --staging
|
|
|
201
201
|
dench signin --host https://staging.dench.com
|
|
202
202
|
```
|
|
203
203
|
|
|
204
|
+
## Prospect review lists
|
|
205
|
+
|
|
206
|
+
People found with `dench leads find` stay in saved lists, not the CRM.
|
|
207
|
+
Open the list in Find for a teammate to mark profiles **ICP approved**,
|
|
208
|
+
**Rejected**, or **Needs research**; missing decisions are **Unreviewed**.
|
|
209
|
+
ICP means ideal customer profile, not sales qualification.
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
dench leads find --titles "VP Sales" --save-as "Q3 targets" --json
|
|
213
|
+
dench lists reviews <artifactId> --limit 100 --json
|
|
214
|
+
dench lists reviews <artifactId> --limit 100 --cursor <continueCursor> --json
|
|
215
|
+
dench lists assess <artifactId> --row-json '<exact returned profile row>' --fit likely_fit --reason 'Matches the requested role; company size is still unknown.' --json
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
`reviews` returns `page`, `continueCursor`, and `isDone`; its limit is 1–100
|
|
219
|
+
(default 50). `assess` records only an AI suggestion, never human approval.
|
|
220
|
+
Its `--fit` accepts `likely_fit`, `unlikely_fit`, or `unknown`. Reuse the
|
|
221
|
+
returned profile identity rather than inventing a row. Material profile
|
|
222
|
+
changes require human review again; formatting and added contacts do not.
|
|
223
|
+
|
|
224
|
+
Approval starts nothing by itself. In Find, a teammate separately chooses
|
|
225
|
+
**Enrich selected**, selects contact fields, and confirms the credit spend.
|
|
226
|
+
Results stay with the list and appear in `reviews` and **Export review CSV**.
|
|
227
|
+
Do not resubmit pending or uncertain lookups through another tool.
|
|
228
|
+
|
|
229
|
+
Only when the human explicitly asks to import approved profiles:
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
dench artifacts import <artifactId> --to lead --view "Q3 outbound" --pin
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
This imports currently approved profiles and known contacts, reusing existing
|
|
236
|
+
CRM records. It does not buy contacts, mark Leads `Qualified`, or start outreach.
|
|
237
|
+
See the [lead-finding workflow](../convex/lib/seedSkills/lead-finding.md)
|
|
238
|
+
and [sales pipeline playbook](../public/references/SALES.md).
|
|
239
|
+
|
|
204
240
|
## Outreach campaigns
|
|
205
241
|
|
|
206
242
|
`dench campaign` runs email + LinkedIn outreach campaigns (the Outreach →
|
package/app-sdk.d.ts
CHANGED
|
@@ -90,6 +90,21 @@ export interface ApiRequests {
|
|
|
90
90
|
"lists.rename": Record<string, unknown>;
|
|
91
91
|
/** Delete a saved search / list, its exported CSV/JSONL files, and any linked watch. — `dench lists delete` — DELETE /api/v1/lists/{artifactId} */
|
|
92
92
|
"lists.delete": Record<string, unknown>;
|
|
93
|
+
/** Read saved prospect review decisions and enrichment outcomes. Human approval is separate from AI suggestions. — `dench lists reviews` — GET /api/v1/lists/{artifactId}/reviews */
|
|
94
|
+
"lists.prospects.reviews": {
|
|
95
|
+
artifactId: string;
|
|
96
|
+
limit?: number;
|
|
97
|
+
cursor?: string;
|
|
98
|
+
};
|
|
99
|
+
/** Suggest ICP fit for one profile. Never changes a human review decision. — `dench lists assess` — POST /api/v1/lists/{artifactId}/assess */
|
|
100
|
+
"lists.prospects.assess": {
|
|
101
|
+
artifactId: string;
|
|
102
|
+
row: Record<string, unknown>;
|
|
103
|
+
suggestion: {
|
|
104
|
+
fit: "likely_fit" | "unlikely_fit" | "unknown";
|
|
105
|
+
reason: string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
93
108
|
/** Search durable workspace memory. — `dench memory search` — GET /api/v1/memory/search */
|
|
94
109
|
"memory.search": {
|
|
95
110
|
/** Full-text query. */
|
|
@@ -2783,6 +2798,8 @@ export interface ApiResponses {
|
|
|
2783
2798
|
"lists.update": unknown;
|
|
2784
2799
|
"lists.rename": unknown;
|
|
2785
2800
|
"lists.delete": unknown;
|
|
2801
|
+
"lists.prospects.reviews": unknown;
|
|
2802
|
+
"lists.prospects.assess": unknown;
|
|
2786
2803
|
"memory.search": Array<{
|
|
2787
2804
|
_id: string;
|
|
2788
2805
|
_creationTime: number;
|
|
@@ -6475,6 +6492,12 @@ export type DenchApiTree = {
|
|
|
6475
6492
|
get(args: Req<"lists.get">): Promise<Res<"lists.get">>;
|
|
6476
6493
|
/** List saved searches (find-result lists) in the workspace, newest first. (`dench lists`) */
|
|
6477
6494
|
list(args?: Req<"lists.list">): Promise<Res<"lists.list">>;
|
|
6495
|
+
prospects: {
|
|
6496
|
+
/** Suggest ICP fit for one profile. Never changes a human review decision. (`dench lists assess`) */
|
|
6497
|
+
assess(args: Req<"lists.prospects.assess">): Promise<Res<"lists.prospects.assess">>;
|
|
6498
|
+
/** Read saved prospect review decisions and enrichment outcomes. Human approval is separate from AI suggestions. (`dench lists reviews`) */
|
|
6499
|
+
reviews(args: Req<"lists.prospects.reviews">): Promise<Res<"lists.prospects.reviews">>;
|
|
6500
|
+
};
|
|
6478
6501
|
/** Rename a saved search / list. (`dench lists rename`) */
|
|
6479
6502
|
rename(args: Req<"lists.rename">): Promise<Res<"lists.rename">>;
|
|
6480
6503
|
/** Save find results as a named list (rows + filters become a workspace artifact). (`dench leads find --save-as "Name"`) */
|
package/leads.ts
CHANGED
|
@@ -51,6 +51,8 @@ const api = {
|
|
|
51
51
|
),
|
|
52
52
|
list: makeFunctionReference<"query">("functions/workspaceArtifacts:list"),
|
|
53
53
|
get: makeFunctionReference<"query">("functions/workspaceArtifacts:get"),
|
|
54
|
+
reviews: makeFunctionReference<"query">("functions/prospectReviews:list"),
|
|
55
|
+
assess: makeFunctionReference<"mutation">("functions/prospectReviews:assess"),
|
|
54
56
|
importArtifact: makeFunctionReference<"action">(
|
|
55
57
|
"functions/workspaceArtifacts:importArtifact",
|
|
56
58
|
),
|
|
@@ -511,6 +513,10 @@ Usage:
|
|
|
511
513
|
dench lists delete <id> [--json]
|
|
512
514
|
|
|
513
515
|
Lists are saved searches from Find (people / companies / job postings).
|
|
516
|
+
People lists are review queues, not Leads. In Find, mark profiles ICP approved,
|
|
517
|
+
then explicitly confirm enrichment or import. Agents can suggest fit, not approve.
|
|
518
|
+
dench lists reviews <id> [--limit 100] [--cursor <cursor>] [--json]
|
|
519
|
+
dench lists assess <id> --row-json '<profile>' --fit likely_fit|unlikely_fit|unknown --reason '<evidence and unknowns>' [--json]
|
|
514
520
|
Create one with \`dench leads|companies|jobs find --save-as "Name"\`.
|
|
515
521
|
Delete removes the list, its exported CSV/JSONL files, and any linked watch.
|
|
516
522
|
CRM lists (saved views on Leads/Companies/Job Postings) are managed with
|
|
@@ -563,6 +569,54 @@ export async function runListsCommand(opts: {
|
|
|
563
569
|
return true;
|
|
564
570
|
}
|
|
565
571
|
args.shift();
|
|
572
|
+
if (verb === "reviews") {
|
|
573
|
+
const artifactId = shift(args, "list id");
|
|
574
|
+
const limit = Number(getFlag(args, "--limit") ?? 50);
|
|
575
|
+
const cursor = getFlag(args, "--cursor") ?? null;
|
|
576
|
+
if (!Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
577
|
+
throw new FindCliError("--limit must be between 1 and 100");
|
|
578
|
+
assertNoUnknownFlags(args, "lists reviews");
|
|
579
|
+
out(
|
|
580
|
+
ctx,
|
|
581
|
+
await callQuery(ctx, api.reviews, {
|
|
582
|
+
artifactId,
|
|
583
|
+
paginationOpts: { numItems: limit, cursor },
|
|
584
|
+
}),
|
|
585
|
+
);
|
|
586
|
+
return true;
|
|
587
|
+
}
|
|
588
|
+
if (verb === "assess") {
|
|
589
|
+
const artifactId = shift(args, "list id");
|
|
590
|
+
const rowJson = getFlag(args, "--row-json");
|
|
591
|
+
const fit = getFlag(args, "--fit");
|
|
592
|
+
const reason = getFlag(args, "--reason");
|
|
593
|
+
assertNoUnknownFlags(args, "lists assess");
|
|
594
|
+
if (
|
|
595
|
+
!rowJson ||
|
|
596
|
+
!reason ||
|
|
597
|
+
!fit ||
|
|
598
|
+
!["likely_fit", "unlikely_fit", "unknown"].includes(fit)
|
|
599
|
+
)
|
|
600
|
+
throw new FindCliError(
|
|
601
|
+
"Use --row-json, --fit likely_fit|unlikely_fit|unknown, and --reason. This records an AI suggestion, not human approval.",
|
|
602
|
+
);
|
|
603
|
+
let row: unknown;
|
|
604
|
+
try {
|
|
605
|
+
row = JSON.parse(rowJson);
|
|
606
|
+
} catch {
|
|
607
|
+
throw new FindCliError("--row-json must be valid JSON");
|
|
608
|
+
}
|
|
609
|
+
out(
|
|
610
|
+
ctx,
|
|
611
|
+
await ctx.convex.mutation(api.assess, {
|
|
612
|
+
artifactId,
|
|
613
|
+
row,
|
|
614
|
+
suggestion: { fit, reason },
|
|
615
|
+
...(ctx.sessionToken ? { sessionToken: ctx.sessionToken } : {}),
|
|
616
|
+
} as never),
|
|
617
|
+
);
|
|
618
|
+
return true;
|
|
619
|
+
}
|
|
566
620
|
if (verb === "show") {
|
|
567
621
|
const artifactId = shift(args, "list id");
|
|
568
622
|
assertNoUnknownFlags(args, "lists show");
|
|
@@ -100,6 +100,8 @@ export const APP_SDK_OPERATIONS: readonly AppSdkOperationInfo[] = [
|
|
|
100
100
|
{"id":"lists.update","group":"lists","summary":"Update a saved list in place (title, filters, and/or replacement rows).","cli":"dench lists update","method":"PATCH","path":"/lists/{artifactId}","permission":"lists:write","pathParams":["artifactId"]},
|
|
101
101
|
{"id":"lists.rename","group":"lists","summary":"Rename a saved search / list.","cli":"dench lists rename","method":"POST","path":"/lists/{artifactId}/rename","permission":"lists:write","pathParams":["artifactId"]},
|
|
102
102
|
{"id":"lists.delete","group":"lists","summary":"Delete a saved search / list, its exported CSV/JSONL files, and any linked watch.","cli":"dench lists delete","method":"DELETE","path":"/lists/{artifactId}","permission":"lists:write","pathParams":["artifactId"]},
|
|
103
|
+
{"id":"lists.prospects.reviews","group":"lists","summary":"Read saved prospect review decisions and enrichment outcomes. Human approval is separate from AI suggestions.","cli":"dench lists reviews","method":"GET","path":"/lists/{artifactId}/reviews","permission":"lists:read","pathParams":["artifactId"]},
|
|
104
|
+
{"id":"lists.prospects.assess","group":"lists","summary":"Suggest ICP fit for one profile. Never changes a human review decision.","cli":"dench lists assess","method":"POST","path":"/lists/{artifactId}/assess","permission":"lists:write","pathParams":["artifactId"]},
|
|
103
105
|
{"id":"memory.search","group":"memory","summary":"Search durable workspace memory.","cli":"dench memory search","method":"GET","path":"/memory/search","permission":"memory:read","pathParams":[]},
|
|
104
106
|
{"id":"memory.save","group":"memory","summary":"Save a durable workspace memory fact.","cli":"dench memory save","method":"POST","path":"/memory","permission":"memory:write","pathParams":[]},
|
|
105
107
|
{"id":"approval.request","group":"approvals","summary":"Request human approval.","cli":"dench approval request","method":"POST","path":"/approvals","permission":"approvals:write","pathParams":[]},
|
package/lib/command-registry.ts
CHANGED
|
@@ -409,6 +409,48 @@ const rawApiOperations = [
|
|
|
409
409
|
backend: convex("mutation", "functions/workspaceArtifacts:remove"),
|
|
410
410
|
}),
|
|
411
411
|
|
|
412
|
+
op({
|
|
413
|
+
id: "lists.prospects.reviews",
|
|
414
|
+
group: "lists",
|
|
415
|
+
summary:
|
|
416
|
+
"Read saved prospect review decisions and enrichment outcomes. Human approval is separate from AI suggestions.",
|
|
417
|
+
cli: "dench lists reviews",
|
|
418
|
+
method: "GET",
|
|
419
|
+
path: "/lists/{artifactId}/reviews",
|
|
420
|
+
requestSchema: z.object({
|
|
421
|
+
artifactId: z.string().min(1),
|
|
422
|
+
limit: z.coerce.number().int().min(1).max(100).optional(),
|
|
423
|
+
cursor: z.string().optional(),
|
|
424
|
+
}),
|
|
425
|
+
responseSchema: anyResponse,
|
|
426
|
+
backend: {
|
|
427
|
+
...convex("query", "functions/prospectReviews:list"),
|
|
428
|
+
transformArgs: (input) => ({
|
|
429
|
+
artifactId: input.artifactId,
|
|
430
|
+
paginationOpts: paginationOptsFrom(input, 50),
|
|
431
|
+
}),
|
|
432
|
+
},
|
|
433
|
+
}),
|
|
434
|
+
op({
|
|
435
|
+
id: "lists.prospects.assess",
|
|
436
|
+
group: "lists",
|
|
437
|
+
summary:
|
|
438
|
+
"Suggest ICP fit for one profile. Never changes a human review decision.",
|
|
439
|
+
cli: "dench lists assess",
|
|
440
|
+
method: "POST",
|
|
441
|
+
path: "/lists/{artifactId}/assess",
|
|
442
|
+
requestSchema: z.object({
|
|
443
|
+
artifactId: z.string().min(1),
|
|
444
|
+
row: z.record(z.string(), z.unknown()),
|
|
445
|
+
suggestion: z.object({
|
|
446
|
+
fit: z.enum(["likely_fit", "unlikely_fit", "unknown"]),
|
|
447
|
+
reason: z.string().min(1).max(2000),
|
|
448
|
+
}),
|
|
449
|
+
}),
|
|
450
|
+
responseSchema: anyResponse,
|
|
451
|
+
backend: convex("mutation", "functions/prospectReviews:assess"),
|
|
452
|
+
}),
|
|
453
|
+
|
|
412
454
|
// Memory and approvals.
|
|
413
455
|
op({
|
|
414
456
|
id: "memory.search",
|