@dench.com/cli 3.11.70-staging.1221 → 3.12.0-staging.1224
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/app-sdk.d.ts +36 -0
- package/crm-warm-intros.ts +147 -0
- package/crm.ts +7 -0
- package/dench.ts +49 -3
- package/lib/app-sdk-catalog.generated.ts +6 -0
- package/lib/command-registry.ts +62 -0
- package/lib/connection-source.ts +2 -1
- package/lib/references.generated.json +12 -12
- package/mcp.ts +251 -0
- package/package.json +3 -1
- package/tools.ts +59 -9
package/app-sdk.d.ts
CHANGED
|
@@ -1286,6 +1286,11 @@ export interface ApiRequests {
|
|
|
1286
1286
|
entryId: string;
|
|
1287
1287
|
hidden: boolean;
|
|
1288
1288
|
};
|
|
1289
|
+
/** Find ranked warm-intro paths from your own email, meetings and LinkedIn connections into a company, domain, person or CRM record id. — `dench crm warm-intros` — GET /api/v1/crm/warm-intros */
|
|
1290
|
+
"crm.warmIntros.find": {
|
|
1291
|
+
target: string;
|
|
1292
|
+
limit?: number;
|
|
1293
|
+
};
|
|
1289
1294
|
/** List account-detection verdicts — why a domain (or personal address) did or did not become an account: verdict, counterparty type, probabilities, evidence threads, the rows created. `kind` picks the creator: `detections` (email + sweep), `linkedin` (the LinkedIn resolver's rows) or `all` (default). Newest first. — `dench crm detections list` — GET /api/v1/crm/detections */
|
|
1290
1295
|
"crm.detections.list": Record<string, unknown>;
|
|
1291
1296
|
/** Undo what the ingestion jobs created since a timestamp (admin): `kind` = `detections` (accounts + contacts from the email detector and the sweep), `linkedin` (the LinkedIn resolver's contacts + accounts; their conversations are unlinked and parked), `email-tasks` (auto-created tasks and cases) or `all` (default). Deletes only rows no human has touched and marks the verdicts / decisions rolled_back so they are never re-created. `dryRun` lists what would go; per-kind counts in `kinds`. — `dench crm detections undo` — POST /api/v1/crm/detections/undo */
|
|
@@ -3591,6 +3596,19 @@ export interface ApiRequests {
|
|
|
3591
3596
|
/** Human name for the account. Empty clears it. */
|
|
3592
3597
|
displayName: string;
|
|
3593
3598
|
};
|
|
3599
|
+
/** List custom MCP servers connected in this workspace that you can use. — `dench mcp list` — GET /api/v1/mcp/servers */
|
|
3600
|
+
"mcp.servers.list": Record<string, unknown>;
|
|
3601
|
+
/** List cached tools exposed by a connected custom MCP server. — `dench mcp tools <server>` — GET /api/v1/mcp/servers/{server}/tools */
|
|
3602
|
+
"mcp.servers.tools": {
|
|
3603
|
+
server: string;
|
|
3604
|
+
};
|
|
3605
|
+
/** Call a tool on a connected custom MCP server. — `dench mcp call <server> <tool>` — POST /api/v1/mcp/servers/{server}/call */
|
|
3606
|
+
"mcp.servers.call": {
|
|
3607
|
+
server: string;
|
|
3608
|
+
tool: string;
|
|
3609
|
+
arguments?: Record<string, unknown>;
|
|
3610
|
+
[key: string]: unknown;
|
|
3611
|
+
};
|
|
3594
3612
|
/** Drive Dench Browser with a single interactive action (open, inspect, click, fill, type, screenshot, stop). Pass the step in `action` plus its arguments. — `dench browser` — POST /api/v1/browser/cli */
|
|
3595
3613
|
"browser.action": Record<string, unknown>;
|
|
3596
3614
|
/** Create a Dench Browser session and return a CDP connect URL for Playwright (chromium.connectOverCDP) plus a live-view URL. Use for durable scripts run from the sandbox. — `dench browser session create` — POST /api/v1/browser/sessions */
|
|
@@ -4880,6 +4898,7 @@ export interface ApiResponses {
|
|
|
4880
4898
|
"crm.entries.dossier.regenerate": unknown;
|
|
4881
4899
|
"crm.privacy.get": unknown;
|
|
4882
4900
|
"crm.privacy.set": unknown;
|
|
4901
|
+
"crm.warmIntros.find": unknown;
|
|
4883
4902
|
"crm.detections.list": unknown;
|
|
4884
4903
|
"crm.detections.undo": unknown;
|
|
4885
4904
|
"crm.entries.history": unknown;
|
|
@@ -8250,6 +8269,9 @@ export interface ApiResponses {
|
|
|
8250
8269
|
ok: boolean;
|
|
8251
8270
|
displayName: string | null;
|
|
8252
8271
|
};
|
|
8272
|
+
"mcp.servers.list": unknown;
|
|
8273
|
+
"mcp.servers.tools": unknown;
|
|
8274
|
+
"mcp.servers.call": unknown;
|
|
8253
8275
|
"browser.action": unknown;
|
|
8254
8276
|
"browser.session.create": unknown;
|
|
8255
8277
|
"browser.session.status": unknown;
|
|
@@ -9420,6 +9442,10 @@ export type DenchApiTree = {
|
|
|
9420
9442
|
/** Replace a saved view's definition (upsert by name). (`dench crm views update`) */
|
|
9421
9443
|
update(args: Req<"crm.views.update">): Promise<Res<"crm.views.update">>;
|
|
9422
9444
|
};
|
|
9445
|
+
warmIntros: {
|
|
9446
|
+
/** Find ranked warm-intro paths from your own email, meetings and LinkedIn connections into a company, domain, person or CRM record id. (`dench crm warm-intros`) */
|
|
9447
|
+
find(args?: Req<"crm.warmIntros.find">): Promise<Res<"crm.warmIntros.find">>;
|
|
9448
|
+
};
|
|
9423
9449
|
watch: {
|
|
9424
9450
|
/** Whether you follow a CRM entry's activity. (`dench crm watch status`) */
|
|
9425
9451
|
get(args: Req<"crm.watch.get">): Promise<Res<"crm.watch.get">>;
|
|
@@ -9677,6 +9703,16 @@ export type DenchApiTree = {
|
|
|
9677
9703
|
/** Update a saved list in place (title, filters, and/or replacement rows). (`dench lists update`) */
|
|
9678
9704
|
update(args: Req<"lists.update">): Promise<Res<"lists.update">>;
|
|
9679
9705
|
};
|
|
9706
|
+
mcp: {
|
|
9707
|
+
servers: {
|
|
9708
|
+
/** Call a tool on a connected custom MCP server. (`dench mcp call <server> <tool>`) */
|
|
9709
|
+
call(args: Req<"mcp.servers.call">): Promise<Res<"mcp.servers.call">>;
|
|
9710
|
+
/** List custom MCP servers connected in this workspace that you can use. (`dench mcp list`) */
|
|
9711
|
+
list(args?: Req<"mcp.servers.list">): Promise<Res<"mcp.servers.list">>;
|
|
9712
|
+
/** List cached tools exposed by a connected custom MCP server. (`dench mcp tools <server>`) */
|
|
9713
|
+
tools(args: Req<"mcp.servers.tools">): Promise<Res<"mcp.servers.tools">>;
|
|
9714
|
+
};
|
|
9715
|
+
};
|
|
9680
9716
|
me: {
|
|
9681
9717
|
avatar: {
|
|
9682
9718
|
/** Remove your avatar. (`dench members me --clear-avatar`) */
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `dench crm warm-intros <target> [--limit N] [--json]`
|
|
3
|
+
*
|
|
4
|
+
* Ranked warm-intro paths from the caller's own email, meetings, and LinkedIn
|
|
5
|
+
* connections into a company, domain, person, or CRM entry id.
|
|
6
|
+
* Teammate warm-intro paths stay out in v1 per DENCH-73.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { makeFunctionReference } from "convex/server";
|
|
10
|
+
import {
|
|
11
|
+
assertNoUnknownFlags,
|
|
12
|
+
type CrmCliContext,
|
|
13
|
+
CrmCliError,
|
|
14
|
+
callQuery,
|
|
15
|
+
out,
|
|
16
|
+
shift,
|
|
17
|
+
} from "./crm";
|
|
18
|
+
import { getFlag, hasFlag } from "./lib/cli-args";
|
|
19
|
+
|
|
20
|
+
const findWarmIntrosRef = makeFunctionReference<"query">(
|
|
21
|
+
"functions/crm/warmIntros:find",
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
export type WarmIntroCliPath = {
|
|
25
|
+
id: string;
|
|
26
|
+
personEntryId?: string;
|
|
27
|
+
name: string;
|
|
28
|
+
firstName: string;
|
|
29
|
+
title?: string;
|
|
30
|
+
companyName?: string;
|
|
31
|
+
email?: string;
|
|
32
|
+
linkedinUrl?: string;
|
|
33
|
+
strength: "Fair" | "Good" | "Strong";
|
|
34
|
+
buyerLikelihood: "likely_buyer" | "may_weigh_in" | "not_the_buyer" | null;
|
|
35
|
+
hops: 1 | 2;
|
|
36
|
+
source: "conversations" | "linkedin" | "contact_intro" | "yc";
|
|
37
|
+
fromYc?: boolean;
|
|
38
|
+
staleOver18Months: boolean;
|
|
39
|
+
summaryLine: string;
|
|
40
|
+
evidence: string[];
|
|
41
|
+
action: {
|
|
42
|
+
kind: "direct_email" | "direct_linkedin" | "ask_intro";
|
|
43
|
+
label: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export type WarmIntroFindResult = {
|
|
48
|
+
target: string;
|
|
49
|
+
matchedEntry: {
|
|
50
|
+
entryId: string;
|
|
51
|
+
objectName: string;
|
|
52
|
+
name: string;
|
|
53
|
+
} | null;
|
|
54
|
+
mode: "account" | "person" | "linked";
|
|
55
|
+
paths: WarmIntroCliPath[];
|
|
56
|
+
connectionState: {
|
|
57
|
+
hasMailboxConnected: boolean;
|
|
58
|
+
hasLinkedinConnected: boolean;
|
|
59
|
+
hasCsvConnections: boolean;
|
|
60
|
+
csvConnectionCount: number;
|
|
61
|
+
hasYcConnected: boolean;
|
|
62
|
+
ycServerSlug?: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const WARM_INTROS_USAGE =
|
|
67
|
+
"Usage: dench crm warm-intros <company|domain|person|entryId> [--limit N] [--json]";
|
|
68
|
+
|
|
69
|
+
export function formatWarmIntroFindResult(result: WarmIntroFindResult): string {
|
|
70
|
+
const headerTarget = result.matchedEntry
|
|
71
|
+
? `${result.matchedEntry.name} (${result.matchedEntry.objectName}:${result.matchedEntry.entryId})`
|
|
72
|
+
: result.target;
|
|
73
|
+
|
|
74
|
+
if (result.paths.length === 0) {
|
|
75
|
+
const hints: string[] = [];
|
|
76
|
+
if (
|
|
77
|
+
!result.connectionState.hasLinkedinConnected &&
|
|
78
|
+
!result.connectionState.hasCsvConnections
|
|
79
|
+
) {
|
|
80
|
+
hints.push("connect LinkedIn or upload Connections.csv");
|
|
81
|
+
}
|
|
82
|
+
if (!result.connectionState.hasYcConnected) {
|
|
83
|
+
hints.push("connect Y Combinator in Integrations → Custom MCP");
|
|
84
|
+
}
|
|
85
|
+
const suffix = hints.length > 0 ? ` Try: ${hints.join(", or ")}.` : "";
|
|
86
|
+
return `No warm intro paths found for ${headerTarget}.${suffix}`;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const lines = [
|
|
90
|
+
`Warm intro paths for ${headerTarget} (${result.paths.length}, warmest first):`,
|
|
91
|
+
];
|
|
92
|
+
for (const path of result.paths) {
|
|
93
|
+
const role = path.title ? ` (${path.title})` : "";
|
|
94
|
+
const buyer =
|
|
95
|
+
path.buyerLikelihood === "likely_buyer"
|
|
96
|
+
? " [Likely buyer]"
|
|
97
|
+
: path.buyerLikelihood === "may_weigh_in"
|
|
98
|
+
? " [May weigh in]"
|
|
99
|
+
: path.buyerLikelihood === "not_the_buyer"
|
|
100
|
+
? " [Not the buyer]"
|
|
101
|
+
: "";
|
|
102
|
+
const yc = path.fromYc ? " [From YC]" : "";
|
|
103
|
+
const stale = path.staleOver18Months ? " [Over 18m ago]" : "";
|
|
104
|
+
lines.push(
|
|
105
|
+
` [${path.strength}] ${path.name}${role}${buyer}${yc}${stale} — ${path.summaryLine} → ${path.action.label}`,
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
if (
|
|
109
|
+
result.connectionState.hasYcConnected &&
|
|
110
|
+
result.connectionState.ycServerSlug
|
|
111
|
+
) {
|
|
112
|
+
lines.push(
|
|
113
|
+
`Tip: YC MCP is connected (${result.connectionState.ycServerSlug}); also check \`dench mcp tools ${result.connectionState.ycServerSlug}\` for Bookface founder paths and label them "From YC".`,
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
return lines.join("\n");
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export async function runWarmIntrosCommand(ctx: CrmCliContext): Promise<void> {
|
|
120
|
+
if (hasFlag(ctx.args, "--help") || hasFlag(ctx.args, "-h")) {
|
|
121
|
+
out(ctx, WARM_INTROS_USAGE);
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
const json = hasFlag(ctx.args, "--json") || ctx.jsonOutput;
|
|
125
|
+
const rawLimit = getFlag(ctx.args, "--limit");
|
|
126
|
+
let limit: number | undefined;
|
|
127
|
+
if (rawLimit !== undefined) {
|
|
128
|
+
const parsed = Number.parseInt(rawLimit, 10);
|
|
129
|
+
if (!Number.isFinite(parsed) || parsed < 1 || parsed > 50) {
|
|
130
|
+
throw new CrmCliError("--limit must be an integer between 1 and 50.");
|
|
131
|
+
}
|
|
132
|
+
limit = parsed;
|
|
133
|
+
}
|
|
134
|
+
const target = shift(ctx.args, "target company, domain, person, or entry id");
|
|
135
|
+
assertNoUnknownFlags(ctx.args, "crm warm-intros");
|
|
136
|
+
|
|
137
|
+
const result = (await callQuery(ctx, findWarmIntrosRef, {
|
|
138
|
+
target,
|
|
139
|
+
...(limit !== undefined ? { limit } : {}),
|
|
140
|
+
})) as WarmIntroFindResult;
|
|
141
|
+
|
|
142
|
+
if (json) {
|
|
143
|
+
console.log(JSON.stringify(result, null, 2));
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
out(ctx, formatWarmIntroFindResult(result));
|
|
147
|
+
}
|
package/crm.ts
CHANGED
|
@@ -44,6 +44,7 @@ import {
|
|
|
44
44
|
import { runContextCommand } from "./crm-context";
|
|
45
45
|
import { runDetectionsCommand } from "./crm-detections";
|
|
46
46
|
import { runPrivacyCommand } from "./crm-privacy";
|
|
47
|
+
import { runWarmIntrosCommand } from "./crm-warm-intros";
|
|
47
48
|
import {
|
|
48
49
|
assertNoUnknownFlags as assertNoUnknownFlagsRaw,
|
|
49
50
|
CliArgError,
|
|
@@ -1262,6 +1263,9 @@ Example: dench crm aggregate deal --field Stage --sum Amount --json`);
|
|
|
1262
1263
|
return await runDetectionsCommand(ctx);
|
|
1263
1264
|
case "privacy":
|
|
1264
1265
|
return await runPrivacyCommand(ctx);
|
|
1266
|
+
case "warm-intros":
|
|
1267
|
+
case "intros":
|
|
1268
|
+
return await runWarmIntrosCommand(ctx);
|
|
1265
1269
|
case "docs":
|
|
1266
1270
|
case "documents":
|
|
1267
1271
|
return await runDocsCommand(ctx);
|
|
@@ -5743,6 +5747,9 @@ Cell / row / object enrichment:
|
|
|
5743
5747
|
Reports (chart-ready JSON):
|
|
5744
5748
|
dench crm reports generate '<name>' --object <object> --type pie|bar|line|table --group-by <field> [--metric count|sum --metric-field <field>]
|
|
5745
5749
|
|
|
5750
|
+
Warm intros (ranked paths from your email, meetings and LinkedIn):
|
|
5751
|
+
dench crm warm-intros <company|domain|person|entryId> [--limit N] [--json]
|
|
5752
|
+
|
|
5746
5753
|
Analytics (the dashboard strip above every object table — same math the UI draws):
|
|
5747
5754
|
dench crm analytics get <object> [--view <view-name>] [--json]
|
|
5748
5755
|
Panels, field roles, the strip's collapsed flag, the fields panels may
|
package/dench.ts
CHANGED
|
@@ -3145,10 +3145,9 @@ function formatContext(context: JsonRecord) {
|
|
|
3145
3145
|
lines.push(
|
|
3146
3146
|
...connections.slice(0, 8).map((connection) => {
|
|
3147
3147
|
const label = stringField(connection, "accountLabel");
|
|
3148
|
+
const src = connectionSource(stringField(connection, "source"), "app");
|
|
3148
3149
|
const via =
|
|
3149
|
-
|
|
3150
|
-
? " via Dench"
|
|
3151
|
-
: "";
|
|
3150
|
+
src === "dench" ? " via Dench" : src === "mcp" ? " via MCP" : "";
|
|
3152
3151
|
return ` - ${stringField(connection, "toolkit") ?? "unknown"} [${
|
|
3153
3152
|
stringField(connection, "status") ?? "unknown"
|
|
3154
3153
|
}]${label ? ` ${label}` : ""}${via}`;
|
|
@@ -4551,6 +4550,18 @@ async function main() {
|
|
|
4551
4550
|
return;
|
|
4552
4551
|
}
|
|
4553
4552
|
|
|
4553
|
+
if (
|
|
4554
|
+
command === "mcp" &&
|
|
4555
|
+
(!subcommand || subcommand === "help" || hasFlag("--help"))
|
|
4556
|
+
) {
|
|
4557
|
+
const { runMcpCommand } = await import("./mcp");
|
|
4558
|
+
await runMcpCommand({
|
|
4559
|
+
args: subcommand ? [subcommand] : ["help"],
|
|
4560
|
+
jsonOutput: json,
|
|
4561
|
+
});
|
|
4562
|
+
return;
|
|
4563
|
+
}
|
|
4564
|
+
|
|
4554
4565
|
if (
|
|
4555
4566
|
command === "browser" &&
|
|
4556
4567
|
(!subcommand || subcommand === "help" || hasFlag("--help"))
|
|
@@ -5105,6 +5116,41 @@ async function main() {
|
|
|
5105
5116
|
return;
|
|
5106
5117
|
}
|
|
5107
5118
|
|
|
5119
|
+
if (command === "mcp") {
|
|
5120
|
+
const { runMcpCommand } = await import("./mcp");
|
|
5121
|
+
const subArgs = stripRuntimeFlags(args.slice(args.indexOf("mcp") + 1));
|
|
5122
|
+
if (
|
|
5123
|
+
!subArgs[0] ||
|
|
5124
|
+
subArgs[0] === "help" ||
|
|
5125
|
+
subArgs.includes("--help") ||
|
|
5126
|
+
subArgs.includes("-h")
|
|
5127
|
+
) {
|
|
5128
|
+
await runMcpCommand({ args: subArgs });
|
|
5129
|
+
return;
|
|
5130
|
+
}
|
|
5131
|
+
const runtime = await getRuntime();
|
|
5132
|
+
if (runtime.mode === "dev") {
|
|
5133
|
+
const devToken = encodeDevCrmSessionToken(runtime.workspaceArgs);
|
|
5134
|
+
await runMcpCommand({
|
|
5135
|
+
convex: runtime.client,
|
|
5136
|
+
args: subArgs,
|
|
5137
|
+
sessionToken: devToken,
|
|
5138
|
+
bearerToken: devToken,
|
|
5139
|
+
});
|
|
5140
|
+
return;
|
|
5141
|
+
}
|
|
5142
|
+
const authedRuntime = requireAuthenticatedRuntime(runtime, "dench mcp");
|
|
5143
|
+
await runMcpCommand({
|
|
5144
|
+
convex: authedRuntime.client,
|
|
5145
|
+
args: subArgs,
|
|
5146
|
+
sessionToken: authedRuntime.sessionToken,
|
|
5147
|
+
bearerToken: authedRuntime.sessionToken,
|
|
5148
|
+
host: authedRuntime.host,
|
|
5149
|
+
workspaceSlug: authedRuntime.organization?.slug,
|
|
5150
|
+
});
|
|
5151
|
+
return;
|
|
5152
|
+
}
|
|
5153
|
+
|
|
5108
5154
|
if (command === "tool") {
|
|
5109
5155
|
const subArgs = stripRuntimeFlags(args.slice(args.indexOf("tool") + 1));
|
|
5110
5156
|
const filteredSubArgs = subArgs.filter((a) => a !== "--json");
|
|
@@ -61,6 +61,8 @@ export const APP_SDK_SCOPES = [
|
|
|
61
61
|
"integrations:write",
|
|
62
62
|
"lists:read",
|
|
63
63
|
"lists:write",
|
|
64
|
+
"mcp:read",
|
|
65
|
+
"mcp:write",
|
|
64
66
|
"meetings:read",
|
|
65
67
|
"meetings:write",
|
|
66
68
|
"members:read",
|
|
@@ -205,6 +207,7 @@ export const APP_SDK_OPERATIONS: readonly AppSdkOperationInfo[] = [
|
|
|
205
207
|
{"id":"crm.entries.dossier.regenerate","group":"crm","summary":"Research the account again and append a fresh dossier section to its Notes (needs a Website / Domain on the record).","cli":"dench crm entries dossier --regenerate","method":"POST","path":"/crm/entries/{entryId}/dossier/regenerate","permission":"crm:write","pathParams":["entryId"]},
|
|
206
208
|
{"id":"crm.privacy.get","group":"crm","summary":"Whether the caller hides their own emails / messages with this record from the workspace (directly, or through its account), and whether they own a connection the toggle applies to.","cli":"dench crm privacy status","method":"GET","path":"/crm/entries/{entryId}/privacy","permission":"crm:read","pathParams":["entryId"]},
|
|
207
209
|
{"id":"crm.privacy.set","group":"crm","summary":"Hide (`hidden: true`) or show the caller's own emails / messages with this record to the workspace. An account covers every contact and opportunity linked to it; existing ledger rows are restamped and the shared Brief regenerates.","cli":"dench crm privacy hide|show","method":"PUT","path":"/crm/entries/{entryId}/privacy","permission":"crm:write","pathParams":["entryId"]},
|
|
210
|
+
{"id":"crm.warmIntros.find","group":"crm","summary":"Find ranked warm-intro paths from your own email, meetings and LinkedIn connections into a company, domain, person or CRM record id.","cli":"dench crm warm-intros","method":"GET","path":"/crm/warm-intros","permission":"crm:read","pathParams":[]},
|
|
208
211
|
{"id":"crm.detections.list","group":"crm","summary":"List account-detection verdicts — why a domain (or personal address) did or did not become an account: verdict, counterparty type, probabilities, evidence threads, the rows created. `kind` picks the creator: `detections` (email + sweep), `linkedin` (the LinkedIn resolver's rows) or `all` (default). Newest first.","cli":"dench crm detections list","method":"GET","path":"/crm/detections","permission":"crm:read","pathParams":[]},
|
|
209
212
|
{"id":"crm.detections.undo","group":"crm","summary":"Undo what the ingestion jobs created since a timestamp (admin): `kind` = `detections` (accounts + contacts from the email detector and the sweep), `linkedin` (the LinkedIn resolver's contacts + accounts; their conversations are unlinked and parked), `email-tasks` (auto-created tasks and cases) or `all` (default). Deletes only rows no human has touched and marks the verdicts / decisions rolled_back so they are never re-created. `dryRun` lists what would go; per-kind counts in `kinds`.","cli":"dench crm detections undo","method":"POST","path":"/crm/detections/undo","permission":"crm:write","pathParams":[]},
|
|
210
213
|
{"id":"crm.entries.history","group":"crm","summary":"List a CRM entry's audit history.","cli":"dench crm history","method":"GET","path":"/crm/objects/{objectName}/entries/{entryId}/history","permission":"crm:read","pathParams":["objectName","entryId"]},
|
|
@@ -480,6 +483,9 @@ export const APP_SDK_OPERATIONS: readonly AppSdkOperationInfo[] = [
|
|
|
480
483
|
{"id":"tool.disconnect","group":"gateway","summary":"Disconnect an external tool account.","cli":"dench tool disconnect","method":"DELETE","path":"/tools/connections/{connectionId}","permission":"integrations:write","pathParams":["connectionId"]},
|
|
481
484
|
{"id":"tool.labels.list","group":"gateway","summary":"List human names given to connected accounts.","cli":"dench tool labels","method":"GET","path":"/tools/labels","permission":"integrations:read","pathParams":[]},
|
|
482
485
|
{"id":"tool.label.set","group":"gateway","summary":"Name a connected account, or clear its name with an empty string.","cli":"dench tool label","method":"PUT","path":"/tools/connections/{connectionId}/label","permission":"integrations:write","pathParams":["connectionId"]},
|
|
486
|
+
{"id":"mcp.servers.list","group":"gateway","summary":"List custom MCP servers connected in this workspace that you can use.","cli":"dench mcp list","method":"GET","path":"/mcp/servers","permission":"mcp:read","pathParams":[]},
|
|
487
|
+
{"id":"mcp.servers.tools","group":"gateway","summary":"List cached tools exposed by a connected custom MCP server.","cli":"dench mcp tools <server>","method":"GET","path":"/mcp/servers/{server}/tools","permission":"mcp:read","pathParams":["server"]},
|
|
488
|
+
{"id":"mcp.servers.call","group":"gateway","summary":"Call a tool on a connected custom MCP server.","cli":"dench mcp call <server> <tool>","method":"POST","path":"/mcp/servers/{server}/call","permission":"mcp:write","pathParams":["server"]},
|
|
483
489
|
{"id":"browser.action","group":"browser","summary":"Drive Dench Browser with a single interactive action (open, inspect, click, fill, type, screenshot, stop). Pass the step in `action` plus its arguments.","cli":"dench browser","method":"POST","path":"/browser/cli","permission":"browser:write","pathParams":[]},
|
|
484
490
|
{"id":"browser.session.create","group":"browser","summary":"Create a Dench Browser session and return a CDP connect URL for Playwright (chromium.connectOverCDP) plus a live-view URL. Use for durable scripts run from the sandbox.","cli":"dench browser session create","method":"POST","path":"/browser/sessions","permission":"browser:write","pathParams":[]},
|
|
485
491
|
{"id":"browser.session.status","group":"browser","summary":"Get the status, connect URL, and live-view URL for a Dench Browser session.","cli":"dench browser session status","method":"GET","path":"/browser/sessions/{sessionId}","permission":"browser:read","pathParams":["sessionId"]},
|
package/lib/command-registry.ts
CHANGED
|
@@ -49,6 +49,7 @@ export type CustomOperation = {
|
|
|
49
49
|
| "nativeToolSearch"
|
|
50
50
|
| "nativeToolRun"
|
|
51
51
|
| "nativeToolConnect"
|
|
52
|
+
| "customMcpCall"
|
|
52
53
|
| "billingTopup"
|
|
53
54
|
| "upgrade"
|
|
54
55
|
| "filesMove"
|
|
@@ -1864,6 +1865,27 @@ const rawApiOperations = [
|
|
|
1864
1865
|
}),
|
|
1865
1866
|
},
|
|
1866
1867
|
}),
|
|
1868
|
+
op({
|
|
1869
|
+
id: "crm.warmIntros.find",
|
|
1870
|
+
group: "crm",
|
|
1871
|
+
summary:
|
|
1872
|
+
"Find ranked warm-intro paths from your own email, meetings and LinkedIn connections into a company, domain, person or CRM record id.",
|
|
1873
|
+
cli: "dench crm warm-intros",
|
|
1874
|
+
method: "GET",
|
|
1875
|
+
path: "/crm/warm-intros",
|
|
1876
|
+
requestSchema: z.object({
|
|
1877
|
+
target: z.string(),
|
|
1878
|
+
limit: z.coerce.number().int().min(1).max(50).optional(),
|
|
1879
|
+
}),
|
|
1880
|
+
responseSchema: anyResponse,
|
|
1881
|
+
backend: {
|
|
1882
|
+
...convex("query", "functions/crm/warmIntros:find"),
|
|
1883
|
+
transformArgs: (input) => ({
|
|
1884
|
+
target: String(input.target ?? ""),
|
|
1885
|
+
...(typeof input.limit === "number" ? { limit: input.limit } : {}),
|
|
1886
|
+
}),
|
|
1887
|
+
},
|
|
1888
|
+
}),
|
|
1867
1889
|
// Account detection (plan §4): the verdicts Dench took on counterparties
|
|
1868
1890
|
// that emailed the workspace, the LinkedIn resolver's rows on the same
|
|
1869
1891
|
// table, and the ONE rollback for everything the ingestion jobs created
|
|
@@ -5521,6 +5543,46 @@ const rawApiOperations = [
|
|
|
5521
5543
|
responseSchema: anyResponse,
|
|
5522
5544
|
backend: convex("mutation", "functions/composioConnectionLabels:set"),
|
|
5523
5545
|
}),
|
|
5546
|
+
op({
|
|
5547
|
+
id: "mcp.servers.list",
|
|
5548
|
+
group: "gateway",
|
|
5549
|
+
summary:
|
|
5550
|
+
"List custom MCP servers connected in this workspace that you can use.",
|
|
5551
|
+
cli: "dench mcp list",
|
|
5552
|
+
method: "GET",
|
|
5553
|
+
path: "/mcp/servers",
|
|
5554
|
+
requestSchema: noBody,
|
|
5555
|
+
responseSchema: anyResponse,
|
|
5556
|
+
backend: convex("query", "functions/customMcpServers:list"),
|
|
5557
|
+
}),
|
|
5558
|
+
op({
|
|
5559
|
+
id: "mcp.servers.tools",
|
|
5560
|
+
group: "gateway",
|
|
5561
|
+
summary: "List cached tools exposed by a connected custom MCP server.",
|
|
5562
|
+
cli: "dench mcp tools <server>",
|
|
5563
|
+
method: "GET",
|
|
5564
|
+
path: "/mcp/servers/{server}/tools",
|
|
5565
|
+
requestSchema: z.object({ server: z.string().min(1) }),
|
|
5566
|
+
responseSchema: anyResponse,
|
|
5567
|
+
backend: convex("query", "functions/customMcpServers:getTools"),
|
|
5568
|
+
}),
|
|
5569
|
+
op({
|
|
5570
|
+
id: "mcp.servers.call",
|
|
5571
|
+
group: "gateway",
|
|
5572
|
+
summary: "Call a tool on a connected custom MCP server.",
|
|
5573
|
+
cli: "dench mcp call <server> <tool>",
|
|
5574
|
+
method: "POST",
|
|
5575
|
+
path: "/mcp/servers/{server}/call",
|
|
5576
|
+
requestSchema: z
|
|
5577
|
+
.object({
|
|
5578
|
+
server: z.string().min(1),
|
|
5579
|
+
tool: z.string().min(1),
|
|
5580
|
+
arguments: z.record(z.string(), z.unknown()).optional(),
|
|
5581
|
+
})
|
|
5582
|
+
.passthrough(),
|
|
5583
|
+
responseSchema: anyResponse,
|
|
5584
|
+
backend: custom("customMcpCall", "bearer"),
|
|
5585
|
+
}),
|
|
5524
5586
|
|
|
5525
5587
|
// Browser automation (Dench Browser). The provider stays server-side; the
|
|
5526
5588
|
// per-(org,user) browser profile is resolved by the gateway, so callers never
|
package/lib/connection-source.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ConnectionSource = "app" | "dench";
|
|
1
|
+
export type ConnectionSource = "app" | "dench" | "mcp";
|
|
2
2
|
|
|
3
3
|
export function connectionSource(
|
|
4
4
|
value: unknown,
|
|
@@ -6,5 +6,6 @@ export function connectionSource(
|
|
|
6
6
|
): ConnectionSource {
|
|
7
7
|
if (value === "app" || value === "composio") return "app";
|
|
8
8
|
if (value === "dench" || value === "unipile") return "dench";
|
|
9
|
+
if (value === "mcp") return "mcp";
|
|
9
10
|
return fallback;
|
|
10
11
|
}
|