@dench.com/cli 3.1.0-staging.292 → 3.2.0-staging.294
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 +28 -20
- package/app-sdk.d.ts +32 -5
- package/dench.ts +2 -0
- package/leads.ts +142 -32
- package/lib/app-sdk-catalog.generated.ts +4 -2
- package/lib/command-registry.ts +70 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -201,39 +201,47 @@ dench signin --staging
|
|
|
201
201
|
dench signin --host https://staging.dench.com
|
|
202
202
|
```
|
|
203
203
|
|
|
204
|
-
##
|
|
204
|
+
## Saved prospect lists
|
|
205
205
|
|
|
206
206
|
People found with `dench leads find` stay in saved lists, not the CRM.
|
|
207
|
-
Open the list in Find
|
|
208
|
-
|
|
209
|
-
|
|
207
|
+
Open the list in Find, select profiles, and choose **Enrich selected**.
|
|
208
|
+
The lead-finding skill establishes `/workspace/ICP.md` on first use and
|
|
209
|
+
reads it before later searches. There is no mandatory per-profile ICP decision.
|
|
210
|
+
A teammate confirms the contact fields
|
|
211
|
+
and credit spend; progress and results remain in the saved list.
|
|
210
212
|
|
|
211
213
|
```bash
|
|
212
214
|
dench leads find --titles "VP Sales" --save-as "Q3 targets" --json
|
|
213
|
-
dench lists
|
|
214
|
-
dench lists
|
|
215
|
-
dench lists
|
|
215
|
+
dench lists save --title "10 RevOps leaders" --people-file /tmp/shortlist.json --json
|
|
216
|
+
dench lists --search "Q3 targets" --limit 25 --json
|
|
217
|
+
dench lists rows <artifactId> --enrichment enriched --limit 100 --json
|
|
218
|
+
dench lists rows <artifactId> --enrichment enriched --limit 100 --cursor <continueCursor> --json
|
|
216
219
|
```
|
|
217
220
|
|
|
218
|
-
`
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
`lists save` takes a non-empty JSON array of person rows (`name` or
|
|
222
|
+
`fullName` required), consolidating selected discoveries into a new list
|
|
223
|
+
without searching, enriching, or importing CRM rows. It leaves source lists
|
|
224
|
+
unchanged. Optional `--filters-json` stores criteria/source evidence metadata.
|
|
225
|
+
In chat, explicitly present the final list; research batches stay in activity
|
|
226
|
+
details instead of becoming competing result sets.
|
|
223
227
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
+
Directory and row reads return `page`, `continueCursor`, and `isDone`.
|
|
229
|
+
Follow cursors even through empty filtered pages. Lists survive new chats;
|
|
230
|
+
read fresh rows and contacts instead of an old transcript or CSV. Each row
|
|
231
|
+
has its original zero-based `index`. Enriched means a contact was returned,
|
|
232
|
+
not merely that a lookup completed. Never resubmit pending/uncertain jobs.
|
|
228
233
|
|
|
229
|
-
Only when the
|
|
234
|
+
Only when the user explicitly asks to import the selected profiles:
|
|
230
235
|
|
|
231
236
|
```bash
|
|
232
|
-
dench artifacts import <artifactId> --to lead --view "Q3 outbound" --pin
|
|
237
|
+
dench artifacts import <artifactId> --to lead --rows 0,4,9 --status "Contacted" --view "Q3 outbound" --pin
|
|
233
238
|
```
|
|
234
239
|
|
|
235
|
-
This imports
|
|
236
|
-
CRM records.
|
|
240
|
+
This imports exactly those original indices and known contacts, reusing existing
|
|
241
|
+
CRM records. Inspect the actual Lead status options first. Omit `--status`
|
|
242
|
+
to keep the default New; use `--enrichment enriched` for contact-bearing rows.
|
|
243
|
+
Enrichment is optional for explicit imports. Import sets status only, even
|
|
244
|
+
Qualified: it never purchases contacts, sends outreach, or converts records.
|
|
237
245
|
See the [lead-finding workflow](../convex/lib/seedSkills/lead-finding.md)
|
|
238
246
|
and [sales pipeline playbook](../public/references/SALES.md).
|
|
239
247
|
|
package/app-sdk.d.ts
CHANGED
|
@@ -79,10 +79,31 @@ export interface ApiRequests {
|
|
|
79
79
|
limit?: number;
|
|
80
80
|
};
|
|
81
81
|
/** List saved searches (find-result lists) in the workspace, newest first. — `dench lists` — GET /api/v1/lists */
|
|
82
|
-
"lists.list":
|
|
82
|
+
"lists.list": {
|
|
83
|
+
search?: string;
|
|
84
|
+
cursor?: string;
|
|
85
|
+
limit?: number;
|
|
86
|
+
};
|
|
87
|
+
/** Read saved rows with current enrichment results and original indices; cursor-paged, without repeating a search. — `dench lists rows` — GET /api/v1/lists/{artifactId}/rows */
|
|
88
|
+
"lists.rows": {
|
|
89
|
+
artifactId: string;
|
|
90
|
+
cursor?: string;
|
|
91
|
+
limit?: number;
|
|
92
|
+
enrichment?: "all" | "enriched" | "in_progress" | "no_contacts" | "failed" | "not_enriched";
|
|
93
|
+
};
|
|
94
|
+
/** Explicitly import selected saved profiles, optionally filtered by enrichment, with a configured Lead status. Reuses CRM records; never sends outreach or triggers conversion. — `dench artifacts import` — POST /api/v1/lists/{artifactId}/import */
|
|
95
|
+
"lists.import": {
|
|
96
|
+
artifactId: string;
|
|
97
|
+
to: "lead" | "company" | "job_posting";
|
|
98
|
+
rowIndexes?: number[];
|
|
99
|
+
status?: string;
|
|
100
|
+
enrichment?: "all" | "enriched" | "in_progress" | "no_contacts" | "failed" | "not_enriched";
|
|
101
|
+
viewName?: string;
|
|
102
|
+
pin?: boolean;
|
|
103
|
+
};
|
|
83
104
|
/** Get one saved search / list by artifact id. — `dench lists show` — GET /api/v1/lists/{artifactId} */
|
|
84
105
|
"lists.get": Record<string, unknown>;
|
|
85
|
-
/** Save find results as a named list (rows + filters become a workspace artifact). — `dench
|
|
106
|
+
/** Save find results as a named list (rows + filters become a workspace artifact). — `dench lists save` — POST /api/v1/lists */
|
|
86
107
|
"lists.save": Record<string, unknown>;
|
|
87
108
|
/** Update a saved list in place (title, filters, and/or replacement rows). — `dench lists update` — PATCH /api/v1/lists/{artifactId} */
|
|
88
109
|
"lists.update": Record<string, unknown>;
|
|
@@ -90,7 +111,7 @@ export interface ApiRequests {
|
|
|
90
111
|
"lists.rename": Record<string, unknown>;
|
|
91
112
|
/** Delete a saved search / list, its exported CSV/JSONL files, and any linked watch. — `dench lists delete` — DELETE /api/v1/lists/{artifactId} */
|
|
92
113
|
"lists.delete": Record<string, unknown>;
|
|
93
|
-
/** Read
|
|
114
|
+
/** Read durable enrichment activity (legacy review metadata remains readable). Use lists rows for current saved profiles and contacts. — `dench lists reviews` — GET /api/v1/lists/{artifactId}/reviews */
|
|
94
115
|
"lists.prospects.reviews": {
|
|
95
116
|
artifactId: string;
|
|
96
117
|
limit?: number;
|
|
@@ -2793,6 +2814,8 @@ export interface ApiResponses {
|
|
|
2793
2814
|
updatedAt: number;
|
|
2794
2815
|
}>;
|
|
2795
2816
|
"lists.list": unknown;
|
|
2817
|
+
"lists.rows": unknown;
|
|
2818
|
+
"lists.import": unknown;
|
|
2796
2819
|
"lists.get": unknown;
|
|
2797
2820
|
"lists.save": unknown;
|
|
2798
2821
|
"lists.update": unknown;
|
|
@@ -6490,17 +6513,21 @@ export type DenchApiTree = {
|
|
|
6490
6513
|
delete(args: Req<"lists.delete">): Promise<Res<"lists.delete">>;
|
|
6491
6514
|
/** Get one saved search / list by artifact id. (`dench lists show`) */
|
|
6492
6515
|
get(args: Req<"lists.get">): Promise<Res<"lists.get">>;
|
|
6516
|
+
/** Explicitly import selected saved profiles, optionally filtered by enrichment, with a configured Lead status. Reuses CRM records; never sends outreach or triggers conversion. (`dench artifacts import`) */
|
|
6517
|
+
import(args: Req<"lists.import">): Promise<Res<"lists.import">>;
|
|
6493
6518
|
/** List saved searches (find-result lists) in the workspace, newest first. (`dench lists`) */
|
|
6494
6519
|
list(args?: Req<"lists.list">): Promise<Res<"lists.list">>;
|
|
6495
6520
|
prospects: {
|
|
6496
6521
|
/** Suggest ICP fit for one profile. Never changes a human review decision. (`dench lists assess`) */
|
|
6497
6522
|
assess(args: Req<"lists.prospects.assess">): Promise<Res<"lists.prospects.assess">>;
|
|
6498
|
-
/** Read
|
|
6523
|
+
/** Read durable enrichment activity (legacy review metadata remains readable). Use lists rows for current saved profiles and contacts. (`dench lists reviews`) */
|
|
6499
6524
|
reviews(args: Req<"lists.prospects.reviews">): Promise<Res<"lists.prospects.reviews">>;
|
|
6500
6525
|
};
|
|
6501
6526
|
/** Rename a saved search / list. (`dench lists rename`) */
|
|
6502
6527
|
rename(args: Req<"lists.rename">): Promise<Res<"lists.rename">>;
|
|
6503
|
-
/**
|
|
6528
|
+
/** Read saved rows with current enrichment results and original indices; cursor-paged, without repeating a search. (`dench lists rows`) */
|
|
6529
|
+
rows(args: Req<"lists.rows">): Promise<Res<"lists.rows">>;
|
|
6530
|
+
/** Save find results as a named list (rows + filters become a workspace artifact). (`dench lists save`) */
|
|
6504
6531
|
save(args: Req<"lists.save">): Promise<Res<"lists.save">>;
|
|
6505
6532
|
/** Update a saved list in place (title, filters, and/or replacement rows). (`dench lists update`) */
|
|
6506
6533
|
update(args: Req<"lists.update">): Promise<Res<"lists.update">>;
|
package/dench.ts
CHANGED
|
@@ -501,6 +501,7 @@ Usage:
|
|
|
501
501
|
dench artifacts import <id> --to lead|company|job_posting [--view "Q3 outbound"] [--pin] [--json]
|
|
502
502
|
dench lists [--limit 25] [--json]
|
|
503
503
|
dench lists show <id> [--json]
|
|
504
|
+
dench lists save --title "Shortlist" --people-file <people.json> [--json]
|
|
504
505
|
dench lists rename <id> "New name" [--json]
|
|
505
506
|
dench lists update <id> [--title "New name"] [--filters-json '{...}'] [--json]
|
|
506
507
|
dench lists delete <id> [--json]
|
|
@@ -827,6 +828,7 @@ function listsCliHelp() {
|
|
|
827
828
|
Usage:
|
|
828
829
|
dench lists [--limit 25] [--json]
|
|
829
830
|
dench lists show <id> [--json]
|
|
831
|
+
dench lists save --title "Shortlist" --people-file <people.json> [--json]
|
|
830
832
|
dench lists rename <id> "New name" [--json]
|
|
831
833
|
dench lists update <id> [--title "New name"] [--filters-json '{"titles":["CTO"]}'] [--json]
|
|
832
834
|
dench lists delete <id> [--json]
|
package/leads.ts
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* list/show/import. Find writes a durable table artifact; import is the
|
|
4
4
|
* same path as the chat card.
|
|
5
5
|
*/
|
|
6
|
+
|
|
7
|
+
import { readFile } from "node:fs/promises";
|
|
6
8
|
import type { ConvexHttpClient } from "convex/browser";
|
|
7
9
|
import { makeFunctionReference } from "convex/server";
|
|
8
10
|
import {
|
|
@@ -50,6 +52,12 @@ const api = {
|
|
|
50
52
|
"functions/workspaceArtifacts:remove",
|
|
51
53
|
),
|
|
52
54
|
list: makeFunctionReference<"query">("functions/workspaceArtifacts:list"),
|
|
55
|
+
listSaved: makeFunctionReference<"query">(
|
|
56
|
+
"functions/workspaceArtifacts:listSaved",
|
|
57
|
+
),
|
|
58
|
+
listRows: makeFunctionReference<"action">(
|
|
59
|
+
"functions/workspaceArtifacts:listRows",
|
|
60
|
+
),
|
|
53
61
|
get: makeFunctionReference<"query">("functions/workspaceArtifacts:get"),
|
|
54
62
|
reviews: makeFunctionReference<"query">("functions/prospectReviews:list"),
|
|
55
63
|
assess: makeFunctionReference<"mutation">("functions/prospectReviews:assess"),
|
|
@@ -61,14 +69,22 @@ const api = {
|
|
|
61
69
|
),
|
|
62
70
|
};
|
|
63
71
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
]
|
|
72
|
+
const ENRICHMENT_FILTERS = [
|
|
73
|
+
"all",
|
|
74
|
+
"enriched",
|
|
75
|
+
"in_progress",
|
|
76
|
+
"no_contacts",
|
|
77
|
+
"failed",
|
|
78
|
+
"not_enriched",
|
|
79
|
+
];
|
|
80
|
+
function enrichmentFlag(args: string[]): string | undefined {
|
|
81
|
+
const value = getFlag(args, "--enrichment");
|
|
82
|
+
if (value !== undefined && !ENRICHMENT_FILTERS.includes(value))
|
|
83
|
+
throw new FindCliError(
|
|
84
|
+
"--enrichment must be " + ENRICHMENT_FILTERS.join("|"),
|
|
85
|
+
);
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
72
88
|
|
|
73
89
|
function shift(args: string[], expected: string): string {
|
|
74
90
|
try {
|
|
@@ -494,7 +510,7 @@ Usage:
|
|
|
494
510
|
dench artifacts [--limit 25] [--json]
|
|
495
511
|
dench artifacts list [--limit 25] [--json]
|
|
496
512
|
dench artifacts show <id> [--json]
|
|
497
|
-
dench artifacts import <id> --to lead|company|job_posting [--view "Q3 outbound"] [--pin] [--json]
|
|
513
|
+
dench artifacts import <id> --to lead|company|job_posting [--rows 0,4,9] [--enrichment enriched] [--status "Contacted"] [--view "Q3 outbound"] [--pin] [--json]
|
|
498
514
|
|
|
499
515
|
\`list\` / \`show\` / \`import\` operate on find results (lead lists and job
|
|
500
516
|
searches). Bare \`dench artifacts\` still lists agent suggested-work artifacts.
|
|
@@ -506,18 +522,25 @@ export function listsHelp(): void {
|
|
|
506
522
|
console.log(`Dench lists
|
|
507
523
|
|
|
508
524
|
Usage:
|
|
509
|
-
dench lists [--limit 25] [--json]
|
|
525
|
+
dench lists [--search "September"] [--limit 25] [--cursor <cursor>] [--json]
|
|
510
526
|
dench lists show <id> [--json]
|
|
527
|
+
dench lists save --title "Shortlist" --people-file <people.json> [--filters-json '{...}'] [--json]
|
|
528
|
+
dench lists rows <id> [--enrichment all|enriched|in_progress|no_contacts|failed|not_enriched] [--limit 100] [--cursor <cursor>] [--json]
|
|
511
529
|
dench lists rename <id> "New name" [--json]
|
|
512
530
|
dench lists update <id> [--title "New name"] [--filters-json '{"titles":["CTO"]}'] [--json]
|
|
513
531
|
dench lists delete <id> [--json]
|
|
514
532
|
|
|
515
533
|
Lists are saved searches from Find (people / companies / job postings).
|
|
516
|
-
People lists are
|
|
517
|
-
|
|
534
|
+
People lists are not Leads. Select profiles in Find and confirm enrichment;
|
|
535
|
+
there is no mandatory per-profile ICP decision. Import only on explicit request, with the
|
|
536
|
+
requested configured CRM status. Follow pagination until isDone, even across
|
|
537
|
+
empty filtered pages. --rows uses original zero-based indices from lists rows.
|
|
518
538
|
dench lists reviews <id> [--limit 100] [--cursor <cursor>] [--json]
|
|
519
539
|
dench lists assess <id> --row-json '<profile>' --fit likely_fit|unlikely_fit|unknown --reason '<evidence and unknowns>' [--json]
|
|
520
540
|
Create one with \`dench leads|companies|jobs find --save-as "Name"\`.
|
|
541
|
+
Consolidate selected search profiles with \`dench lists save\`: --people-file
|
|
542
|
+
is a JSON array of person rows, not a CSV or a whole tool response. It saves
|
|
543
|
+
a new list without searching, enriching, changing source lists, or importing CRM rows.
|
|
521
544
|
Delete removes the list, its exported CSV/JSONL files, and any linked watch.
|
|
522
545
|
CRM lists (saved views on Leads/Companies/Job Postings) are managed with
|
|
523
546
|
\`dench crm views list|get|create|rename|delete\`.
|
|
@@ -545,30 +568,98 @@ export async function runListsCommand(opts: {
|
|
|
545
568
|
if (verb === "help" || verb === "--help") return false;
|
|
546
569
|
if (verb === undefined || verb === "list" || verb?.startsWith("--")) {
|
|
547
570
|
if (verb === "list") args.shift();
|
|
548
|
-
const
|
|
549
|
-
const
|
|
571
|
+
const limit = Number(getFlag(args, "--limit") ?? 25);
|
|
572
|
+
const cursor = getFlag(args, "--cursor") ?? null;
|
|
573
|
+
const search = getFlag(args, "--search");
|
|
574
|
+
if (!Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
575
|
+
throw new FindCliError("--limit must be between 1 and 100");
|
|
550
576
|
assertNoUnknownFlags(args, "lists");
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
.filter((row) => LIST_CREATED_FROM.has(String(row.createdFrom)))
|
|
559
|
-
.slice(0, limit)
|
|
560
|
-
.map((row) => ({
|
|
561
|
-
_id: row._id,
|
|
562
|
-
title: row.title,
|
|
563
|
-
createdFrom: row.createdFrom,
|
|
564
|
-
rowCount: row.rowCount,
|
|
565
|
-
createdAt: row.createdAt,
|
|
566
|
-
watchId: row.watchId,
|
|
567
|
-
}));
|
|
568
|
-
out(ctx, lists);
|
|
577
|
+
out(
|
|
578
|
+
ctx,
|
|
579
|
+
await callQuery(ctx, api.listSaved, {
|
|
580
|
+
paginationOpts: { numItems: limit, cursor },
|
|
581
|
+
search,
|
|
582
|
+
}),
|
|
583
|
+
);
|
|
569
584
|
return true;
|
|
570
585
|
}
|
|
571
586
|
args.shift();
|
|
587
|
+
if (verb === "save") {
|
|
588
|
+
const title = getFlag(args, "--title")?.trim();
|
|
589
|
+
const peopleFile = getFlag(args, "--people-file");
|
|
590
|
+
const filtersJson = getFlag(args, "--filters-json");
|
|
591
|
+
assertNoUnknownFlags(args, "lists save");
|
|
592
|
+
if (!title || !peopleFile) {
|
|
593
|
+
throw new FindCliError(
|
|
594
|
+
"dench lists save requires --title and --people-file",
|
|
595
|
+
);
|
|
596
|
+
}
|
|
597
|
+
let people: unknown;
|
|
598
|
+
let filters: unknown;
|
|
599
|
+
try {
|
|
600
|
+
people = JSON.parse(await readFile(peopleFile, "utf-8"));
|
|
601
|
+
} catch {
|
|
602
|
+
throw new FindCliError(
|
|
603
|
+
"--people-file must be a readable JSON file containing an array of person rows",
|
|
604
|
+
);
|
|
605
|
+
}
|
|
606
|
+
if (
|
|
607
|
+
!Array.isArray(people) ||
|
|
608
|
+
people.length === 0 ||
|
|
609
|
+
people.some(
|
|
610
|
+
(person) =>
|
|
611
|
+
!person ||
|
|
612
|
+
typeof person !== "object" ||
|
|
613
|
+
Array.isArray(person) ||
|
|
614
|
+
![person.fullName, person.name].some(
|
|
615
|
+
(name) => typeof name === "string" && name.trim(),
|
|
616
|
+
),
|
|
617
|
+
)
|
|
618
|
+
) {
|
|
619
|
+
throw new FindCliError(
|
|
620
|
+
"--people-file must contain a non-empty array of person rows, each with name or fullName",
|
|
621
|
+
);
|
|
622
|
+
}
|
|
623
|
+
if (filtersJson !== undefined) {
|
|
624
|
+
try {
|
|
625
|
+
filters = JSON.parse(filtersJson);
|
|
626
|
+
} catch {
|
|
627
|
+
throw new FindCliError("--filters-json must be a JSON object");
|
|
628
|
+
}
|
|
629
|
+
if (!filters || typeof filters !== "object" || Array.isArray(filters)) {
|
|
630
|
+
throw new FindCliError("--filters-json must be a JSON object");
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
out(
|
|
634
|
+
ctx,
|
|
635
|
+
await callAction(ctx, api.saveFind, {
|
|
636
|
+
createdFrom: "find_people",
|
|
637
|
+
title,
|
|
638
|
+
people,
|
|
639
|
+
...(filters !== undefined ? { filters } : {}),
|
|
640
|
+
}),
|
|
641
|
+
);
|
|
642
|
+
return true;
|
|
643
|
+
}
|
|
644
|
+
if (verb === "rows") {
|
|
645
|
+
const artifactId = shift(args, "list id");
|
|
646
|
+
const limit = Number(getFlag(args, "--limit") ?? 100);
|
|
647
|
+
const cursor = getFlag(args, "--cursor");
|
|
648
|
+
const enrichment = enrichmentFlag(args);
|
|
649
|
+
if (!Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
650
|
+
throw new FindCliError("--limit must be between 1 and 100");
|
|
651
|
+
assertNoUnknownFlags(args, "lists rows");
|
|
652
|
+
out(
|
|
653
|
+
ctx,
|
|
654
|
+
await callAction(ctx, api.listRows, {
|
|
655
|
+
artifactId,
|
|
656
|
+
limit,
|
|
657
|
+
cursor,
|
|
658
|
+
enrichment,
|
|
659
|
+
}),
|
|
660
|
+
);
|
|
661
|
+
return true;
|
|
662
|
+
}
|
|
572
663
|
if (verb === "reviews") {
|
|
573
664
|
const artifactId = shift(args, "list id");
|
|
574
665
|
const limit = Number(getFlag(args, "--limit") ?? 50);
|
|
@@ -1075,6 +1166,22 @@ export async function runWorkspaceArtifactsCommand(opts: {
|
|
|
1075
1166
|
}
|
|
1076
1167
|
const viewName = getFlag(args, "--view");
|
|
1077
1168
|
const pin = hasFlag(args, "--pin");
|
|
1169
|
+
const status = getFlag(args, "--status");
|
|
1170
|
+
const enrichment = enrichmentFlag(args);
|
|
1171
|
+
const rowsFlag = getFlag(args, "--rows");
|
|
1172
|
+
const rowIndexes =
|
|
1173
|
+
rowsFlag === undefined
|
|
1174
|
+
? undefined
|
|
1175
|
+
: rowsFlag.split(",").map((value) => {
|
|
1176
|
+
if (!/^\d+$/.test(value.trim()))
|
|
1177
|
+
throw new FindCliError(
|
|
1178
|
+
"--rows must be comma-separated original zero-based row indices",
|
|
1179
|
+
);
|
|
1180
|
+
const index = Number(value);
|
|
1181
|
+
if (!Number.isSafeInteger(index))
|
|
1182
|
+
throw new FindCliError("Invalid row index");
|
|
1183
|
+
return index;
|
|
1184
|
+
});
|
|
1078
1185
|
assertNoUnknownFlags(args, "artifacts import");
|
|
1079
1186
|
out(
|
|
1080
1187
|
ctx,
|
|
@@ -1083,6 +1190,9 @@ export async function runWorkspaceArtifactsCommand(opts: {
|
|
|
1083
1190
|
to,
|
|
1084
1191
|
viewName,
|
|
1085
1192
|
pin,
|
|
1193
|
+
status,
|
|
1194
|
+
enrichment,
|
|
1195
|
+
rowIndexes,
|
|
1086
1196
|
}),
|
|
1087
1197
|
);
|
|
1088
1198
|
return true;
|
|
@@ -95,12 +95,14 @@ export const APP_SDK_OPERATIONS: readonly AppSdkOperationInfo[] = [
|
|
|
95
95
|
{"id":"workspace.artifacts.list","group":"workspace","summary":"List artifacts for the authenticated workspace.","cli":"dench artifacts","method":"GET","path":"/artifacts","permission":"workspace:read","pathParams":[]},
|
|
96
96
|
{"id":"workspace.suggestedWork.list","group":"workspace","summary":"List draft suggested-work artifacts.","cli":"dench suggested-work","method":"GET","path":"/suggested-work","permission":"workspace:read","pathParams":[]},
|
|
97
97
|
{"id":"lists.list","group":"lists","summary":"List saved searches (find-result lists) in the workspace, newest first.","cli":"dench lists","method":"GET","path":"/lists","permission":"lists:read","pathParams":[]},
|
|
98
|
+
{"id":"lists.rows","group":"lists","summary":"Read saved rows with current enrichment results and original indices; cursor-paged, without repeating a search.","cli":"dench lists rows","method":"GET","path":"/lists/{artifactId}/rows","permission":"lists:read","pathParams":["artifactId"]},
|
|
99
|
+
{"id":"lists.import","group":"lists","summary":"Explicitly import selected saved profiles, optionally filtered by enrichment, with a configured Lead status. Reuses CRM records; never sends outreach or triggers conversion.","cli":"dench artifacts import","method":"POST","path":"/lists/{artifactId}/import","permission":"lists:write","pathParams":["artifactId"]},
|
|
98
100
|
{"id":"lists.get","group":"lists","summary":"Get one saved search / list by artifact id.","cli":"dench lists show","method":"GET","path":"/lists/{artifactId}","permission":"lists:read","pathParams":["artifactId"]},
|
|
99
|
-
{"id":"lists.save","group":"lists","summary":"Save find results as a named list (rows + filters become a workspace artifact).","cli":"dench
|
|
101
|
+
{"id":"lists.save","group":"lists","summary":"Save find results as a named list (rows + filters become a workspace artifact).","cli":"dench lists save","method":"POST","path":"/lists","permission":"lists:write","pathParams":[]},
|
|
100
102
|
{"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
103
|
{"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
104
|
{"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
|
|
105
|
+
{"id":"lists.prospects.reviews","group":"lists","summary":"Read durable enrichment activity (legacy review metadata remains readable). Use lists rows for current saved profiles and contacts.","cli":"dench lists reviews","method":"GET","path":"/lists/{artifactId}/reviews","permission":"lists:read","pathParams":["artifactId"]},
|
|
104
106
|
{"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"]},
|
|
105
107
|
{"id":"memory.search","group":"memory","summary":"Search durable workspace memory.","cli":"dench memory search","method":"GET","path":"/memory/search","permission":"memory:read","pathParams":[]},
|
|
106
108
|
{"id":"memory.save","group":"memory","summary":"Save a durable workspace memory fact.","cli":"dench memory save","method":"POST","path":"/memory","permission":"memory:write","pathParams":[]},
|
package/lib/command-registry.ts
CHANGED
|
@@ -346,9 +346,74 @@ const rawApiOperations = [
|
|
|
346
346
|
aliases: ["dench lists list"],
|
|
347
347
|
method: "GET",
|
|
348
348
|
path: "/lists",
|
|
349
|
-
requestSchema:
|
|
349
|
+
requestSchema: z.object({
|
|
350
|
+
search: z.string().optional(),
|
|
351
|
+
cursor: z.string().optional(),
|
|
352
|
+
limit: z.coerce.number().int().min(1).max(100).optional(),
|
|
353
|
+
}),
|
|
354
|
+
responseSchema: anyResponse,
|
|
355
|
+
backend: {
|
|
356
|
+
...convex("query", "functions/workspaceArtifacts:listSaved"),
|
|
357
|
+
transformArgs: (input) => ({
|
|
358
|
+
search: input.search,
|
|
359
|
+
paginationOpts: paginationOptsFrom(input, 25),
|
|
360
|
+
}),
|
|
361
|
+
},
|
|
362
|
+
}),
|
|
363
|
+
op({
|
|
364
|
+
id: "lists.rows",
|
|
365
|
+
group: "lists",
|
|
366
|
+
summary:
|
|
367
|
+
"Read saved rows with current enrichment results and original indices; cursor-paged, without repeating a search.",
|
|
368
|
+
cli: "dench lists rows",
|
|
369
|
+
method: "GET",
|
|
370
|
+
path: "/lists/{artifactId}/rows",
|
|
371
|
+
requestSchema: z.object({
|
|
372
|
+
artifactId: z.string().min(1),
|
|
373
|
+
cursor: z.string().optional(),
|
|
374
|
+
limit: z.coerce.number().int().min(1).max(100).optional(),
|
|
375
|
+
enrichment: z
|
|
376
|
+
.enum([
|
|
377
|
+
"all",
|
|
378
|
+
"enriched",
|
|
379
|
+
"in_progress",
|
|
380
|
+
"no_contacts",
|
|
381
|
+
"failed",
|
|
382
|
+
"not_enriched",
|
|
383
|
+
])
|
|
384
|
+
.optional(),
|
|
385
|
+
}),
|
|
386
|
+
responseSchema: anyResponse,
|
|
387
|
+
backend: convex("action", "functions/workspaceArtifacts:listRows"),
|
|
388
|
+
}),
|
|
389
|
+
op({
|
|
390
|
+
id: "lists.import",
|
|
391
|
+
group: "lists",
|
|
392
|
+
summary:
|
|
393
|
+
"Explicitly import selected saved profiles, optionally filtered by enrichment, with a configured Lead status. Reuses CRM records; never sends outreach or triggers conversion.",
|
|
394
|
+
cli: "dench artifacts import",
|
|
395
|
+
method: "POST",
|
|
396
|
+
path: "/lists/{artifactId}/import",
|
|
397
|
+
requestSchema: z.object({
|
|
398
|
+
artifactId: z.string().min(1),
|
|
399
|
+
to: z.enum(["lead", "company", "job_posting"]),
|
|
400
|
+
rowIndexes: z.array(z.number().int().min(0)).optional(),
|
|
401
|
+
status: z.string().min(1).optional(),
|
|
402
|
+
enrichment: z
|
|
403
|
+
.enum([
|
|
404
|
+
"all",
|
|
405
|
+
"enriched",
|
|
406
|
+
"in_progress",
|
|
407
|
+
"no_contacts",
|
|
408
|
+
"failed",
|
|
409
|
+
"not_enriched",
|
|
410
|
+
])
|
|
411
|
+
.optional(),
|
|
412
|
+
viewName: z.string().optional(),
|
|
413
|
+
pin: z.boolean().optional(),
|
|
414
|
+
}),
|
|
350
415
|
responseSchema: anyResponse,
|
|
351
|
-
backend: convex("
|
|
416
|
+
backend: convex("action", "functions/workspaceArtifacts:importArtifact"),
|
|
352
417
|
}),
|
|
353
418
|
op({
|
|
354
419
|
id: "lists.get",
|
|
@@ -366,7 +431,8 @@ const rawApiOperations = [
|
|
|
366
431
|
group: "lists",
|
|
367
432
|
summary:
|
|
368
433
|
"Save find results as a named list (rows + filters become a workspace artifact).",
|
|
369
|
-
cli:
|
|
434
|
+
cli: "dench lists save",
|
|
435
|
+
aliases: ['dench leads find --save-as "Name"'],
|
|
370
436
|
method: "POST",
|
|
371
437
|
path: "/lists",
|
|
372
438
|
requestSchema: anyObject,
|
|
@@ -413,7 +479,7 @@ const rawApiOperations = [
|
|
|
413
479
|
id: "lists.prospects.reviews",
|
|
414
480
|
group: "lists",
|
|
415
481
|
summary:
|
|
416
|
-
"Read
|
|
482
|
+
"Read durable enrichment activity (legacy review metadata remains readable). Use lists rows for current saved profiles and contacts.",
|
|
417
483
|
cli: "dench lists reviews",
|
|
418
484
|
method: "GET",
|
|
419
485
|
path: "/lists/{artifactId}/reviews",
|