@dench.com/cli 3.11.26-staging.630 → 3.11.28-staging.639

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dench.com/cli",
3
- "version": "3.11.26-staging.630",
3
+ "version": "3.11.28-staging.639",
4
4
  "description": "Dench agent workspace CLI.",
5
5
  "type": "module",
6
6
  "bin": {
package/tools.ts CHANGED
@@ -458,14 +458,12 @@ async function runUnipileTool(
458
458
  ctx: ToolCliContext,
459
459
  slug: string,
460
460
  toolArgs: Record<string, unknown>,
461
- approvalId: string | undefined,
462
461
  ): Promise<void> {
463
462
  if (!ctx.convex) throw new MissingApiKeyError();
464
463
  const result = await ctx.convex.action(runUnipileToolRef, {
465
464
  ...(ctx.sessionToken ? { sessionToken: ctx.sessionToken } : {}),
466
465
  slug,
467
466
  arguments: toolArgs,
468
- ...(approvalId ? { approvalId } : {}),
469
467
  } as never);
470
468
 
471
469
  const record = asRecord(result) ?? {};
@@ -482,18 +480,7 @@ async function runUnipileTool(
482
480
 
483
481
  function formatUnipileToolResult(record: JsonRecord): string {
484
482
  if (record.ok === false) {
485
- const lines = [
486
- `Failed: ${stringField(record, "error") ?? "unknown error"}`,
487
- ];
488
- const approvalId = stringField(record, "approvalId");
489
- if (approvalId) {
490
- lines.push(
491
- `Approval required. Once a human says yes:`,
492
- ` dench approval approve ${approvalId} --evidence "…"`,
493
- ` dench tool run ${stringField(record, "toolSlug") ?? "<slug>"} --args '…' --approval ${approvalId}`,
494
- );
495
- }
496
- return lines.join("\n");
483
+ return `Failed: ${stringField(record, "error") ?? "unknown error"}`;
497
484
  }
498
485
  if (record.queued === true) {
499
486
  const data = asRecord(record.data) ?? {};
@@ -560,7 +547,6 @@ async function runRunSubcommand(ctx: ToolCliContext): Promise<void> {
560
547
  ctx.args.shift();
561
548
  const argsJson = getFlag(ctx.args, "--args");
562
549
  const account = getFlag(ctx.args, "--account");
563
- const approval = getFlag(ctx.args, "--approval");
564
550
  const parsedArgs = (parseJson(argsJson) ?? {}) as Record<string, unknown>;
565
551
  if (
566
552
  parsedArgs &&
@@ -582,7 +568,7 @@ async function runRunSubcommand(ctx: ToolCliContext): Promise<void> {
582
568
  throw new ToolCliError(
583
569
  "--account is for third-party connections. Pass the native mailbox/account field in --args.",
584
570
  );
585
- await runUnipileTool(ctx, toolSlug, parsedArgs, approval);
571
+ await runUnipileTool(ctx, toolSlug, parsedArgs);
586
572
  return;
587
573
  }
588
574
  if (nativeToolkitForTool(toolSlug)) {
@@ -1260,14 +1246,14 @@ const READ_ONLY_TOOL_ACTIONS = new Set([
1260
1246
  "FIND",
1261
1247
  ]);
1262
1248
 
1263
- function toolApprovalHint(toolSlug: string | undefined): string {
1264
- if (!toolSlug) return "approval unknown";
1249
+ function toolAccessHint(toolSlug: string | undefined): string {
1250
+ if (!toolSlug) return "kind unknown";
1265
1251
  const tokens = toolSlug
1266
1252
  .toUpperCase()
1267
1253
  .split(/[^A-Z0-9]+/)
1268
1254
  .filter(Boolean);
1269
1255
  const readOnly = tokens.find((token) => READ_ONLY_TOOL_ACTIONS.has(token));
1270
- return readOnly ? `read-only (${readOnly})` : "approval likely";
1256
+ return readOnly ? `read-only (${readOnly})` : "writes";
1271
1257
  }
1272
1258
 
1273
1259
  function formatSearchResult(searchResult: unknown, compact = false): string {
@@ -1317,7 +1303,7 @@ function formatSearchResult(searchResult: unknown, compact = false): string {
1317
1303
  : (compactLine(tool.description) ?? null);
1318
1304
  lines.push(
1319
1305
  `${index + 1}. ${slug} - ${name}`,
1320
- ` toolkit: ${toolkit} | ${toolApprovalHint(slug)} | ${
1306
+ ` toolkit: ${toolkit} | ${toolAccessHint(slug)} | ${
1321
1307
  isConnected ? "connected" : "not connected"
1322
1308
  }`,
1323
1309
  );
@@ -1409,7 +1395,7 @@ Usage:
1409
1395
  dench tool status [toolkit] [--json]
1410
1396
  dench tool connect <toolkit> [--callback-url <url>] [--json]
1411
1397
  dench tool search "create github issue" [--toolkit github] [--limit 20] [--compact] [--json]
1412
- dench tool run <tool_slug> --args '{"key":"value"}' [--account <connectedAccountId>] [--approval <approvalId>] [--json]
1398
+ dench tool run <tool_slug> --args '{"key":"value"}' [--account <connectedAccountId>] [--json]
1413
1399
  dench tool disconnect <connectionId> [--json]
1414
1400
 
1415
1401
  Notes:
@@ -1429,9 +1415,6 @@ Notes:
1429
1415
  Slack is ALWAYS in-house: SLACK_* slugs (SLACK_SEND_MESSAGE with Block Kit
1430
1416
  blocks/buttons, SLACK_FETCH_HISTORY, SLACK_LIST_CHANNELS, …) run through the
1431
1417
  org's own Slack app install and can post to / read any channel.
1432
- A write tool returns approval_required with an approvalId. Once a human
1433
- approves it, re-run with --approval <approvalId>; an approval is bound to that
1434
- exact tool and argument set.
1435
1418
  LinkedIn tools are QUEUED, not run inline, so account-safety pacing (daily
1436
1419
  caps, working hours, spacing) applies. They return an action_id — poll it with
1437
1420
  LINKEDIN_GET_ACTION_STATUS.