@dench.com/cli 3.11.14 → 3.11.16-staging.551

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/agent-config.ts CHANGED
@@ -18,8 +18,7 @@
18
18
  * tools show | edit
19
19
  * memory show | append <text> | set (MEMORY.md aggregate)
20
20
  * bootstrap status | complete | reopen | template
21
- * model default <id> | model default clear |
22
- * model thread <threadId> <id> | model thread <threadId> clear
21
+ * model [show] (Dench runs one chat model; writes are refused)
23
22
  *
24
23
  * `edit` / `template` open the
25
24
  * user's `$EDITOR` (default `vi`) to capture the new body. The
@@ -63,12 +62,6 @@ const api = {
63
62
  completeBootstrap: makeFunctionReference<"mutation">(
64
63
  "functions/agentConfig:completeBootstrap",
65
64
  ),
66
- setDefaultChatModelV2: makeFunctionReference<"mutation">(
67
- "functions/agentConfig:setDefaultChatModelV2",
68
- ),
69
- setThreadModelOverride: makeFunctionReference<"mutation">(
70
- "functions/agentConfig:setThreadModelOverride",
71
- ),
72
65
  },
73
66
  },
74
67
  };
@@ -343,61 +336,32 @@ async function handleBootstrap(ctx: CliCtx, args: string[]): Promise<void> {
343
336
  );
344
337
  }
345
338
 
339
+ /** Every chat runs one model; the server refuses model writes too. */
340
+ const ONE_CHAT_MODEL =
341
+ "Dench runs one chat model; model selection is not available.";
342
+
346
343
  async function handleModel(ctx: CliCtx, args: string[]): Promise<void> {
347
344
  const sub = args[0];
348
- if (sub === "default") {
349
- const arg = args[1];
350
- if (!arg || arg === "show") {
351
- const config = await loadAgentConfig(ctx);
352
- // org default lives outside agentConfig — use the same query
353
- // but pull from a separate getMyOrganization call. For now we
354
- // surface "(use the dashboard for the current value)".
355
- out(
356
- ctx,
357
- ctx.jsonOutput
358
- ? { organizationId: config.organizationId }
359
- : "Use `dench identity show` and your settings page to view the active default; this command sets the value.",
360
- );
361
- return;
362
- }
363
- if (arg === "clear") {
364
- await runMutation(ctx, api.functions.agentConfig.setDefaultChatModelV2, {
365
- modelId: null,
366
- });
367
- out(ctx, { ok: true, defaultChatModelId: null });
368
- return;
369
- }
370
- await runMutation(ctx, api.functions.agentConfig.setDefaultChatModelV2, {
371
- modelId: arg,
372
- });
373
- out(ctx, { ok: true, defaultChatModelId: arg });
345
+ const target = sub === "default" ? args[1] : undefined;
346
+ if (
347
+ !sub ||
348
+ sub === "show" ||
349
+ (sub === "default" && (!target || target === "show"))
350
+ ) {
351
+ const config = await loadAgentConfig(ctx);
352
+ out(
353
+ ctx,
354
+ ctx.jsonOutput
355
+ ? { organizationId: config.organizationId, modelSelection: false }
356
+ : ONE_CHAT_MODEL,
357
+ );
374
358
  return;
375
359
  }
376
- if (sub === "thread") {
377
- const threadId = args[1];
378
- const target = args[2];
379
- if (!threadId || !target) {
380
- throw new AgentConfigCliError(
381
- "Usage: dench model thread <threadId> <modelId|clear>",
382
- );
383
- }
384
- if (target === "clear") {
385
- await runMutation(ctx, api.functions.agentConfig.setThreadModelOverride, {
386
- threadId: threadId as never,
387
- modelId: null,
388
- });
389
- out(ctx, { ok: true, threadId, modelOverride: null });
390
- return;
391
- }
392
- await runMutation(ctx, api.functions.agentConfig.setThreadModelOverride, {
393
- threadId: threadId as never,
394
- modelId: target,
395
- });
396
- out(ctx, { ok: true, threadId, modelOverride: target });
397
- return;
360
+ if (sub === "default" || sub === "thread") {
361
+ throw new AgentConfigCliError(ONE_CHAT_MODEL);
398
362
  }
399
363
  throw new AgentConfigCliError(
400
- `Unknown model subcommand: "${sub}". Try "default <id|clear>" or "thread <threadId> <id|clear>".`,
364
+ `Unknown model subcommand: "${sub}". ${ONE_CHAT_MODEL}`,
401
365
  );
402
366
  }
403
367
 
@@ -505,7 +469,7 @@ export function printAgentConfigCliHelp(): void {
505
469
  dench tools show | edit TOOLS.md notes section
506
470
  dench mem show | append <text> | set MEMORY.md aggregate
507
471
  dench bootstrap status | complete | reopen | template
508
- dench model default <id|clear> | model thread <threadId> <id|clear>
472
+ dench model Dench runs one chat model; model selection is not available
509
473
 
510
474
  Editing flags:
511
475
  --content "<markdown>" Inline body
package/app-sdk.d.ts CHANGED
@@ -2253,6 +2253,7 @@ export interface ApiRequests {
2253
2253
  domain?: string;
2254
2254
  name?: string;
2255
2255
  linkedinUrl?: string;
2256
+ /** Words matched in the company's description. Every word of every comma-separated phrase must appear, so use one or two distinctive words ("fintech", "payments"), not a long phrase ("B2B fintech platform"); put industry, size and location in their own filters. */
2256
2257
  keywords?: string;
2257
2258
  /** Exact enum, e.g. Software Development. Accepted values: see `dench leads filters` or https://dench.com/references/find-filter-options.json. */
2258
2259
  industries?: string[];
@@ -3616,12 +3617,12 @@ export interface ApiRequests {
3616
3617
  "agentConfig.bootstrap.template": {
3617
3618
  content: string;
3618
3619
  };
3619
- /** Set the default chat model. — `dench model default` — PUT /api/v1/agent-config/model/default */
3620
+ /** Not available: Dench runs one chat model, so this always fails. — `dench model default` — PUT /api/v1/agent-config/model/default */
3620
3621
  "agentConfig.model.default": {
3621
3622
  /** Model id, or null to clear. */
3622
3623
  modelId: string | null;
3623
3624
  };
3624
- /** Set a thread model override. — `dench model thread` — PUT /api/v1/agent-config/model/threads/{threadId} */
3625
+ /** Not available: Dench runs one chat model, so this always fails. — `dench model thread` — PUT /api/v1/agent-config/model/threads/{threadId} */
3625
3626
  "agentConfig.model.thread": {
3626
3627
  threadId: string;
3627
3628
  modelId: string | null;
@@ -8787,9 +8788,9 @@ export type DenchApiTree = {
8787
8788
  show(args?: Req<"agentConfig.mem.show">): Promise<Res<"agentConfig.mem.show">>;
8788
8789
  };
8789
8790
  model: {
8790
- /** Set the default chat model. (`dench model default`) */
8791
+ /** Not available: Dench runs one chat model, so this always fails. (`dench model default`) */
8791
8792
  default(args: Req<"agentConfig.model.default">): Promise<Res<"agentConfig.model.default">>;
8792
- /** Set a thread model override. (`dench model thread`) */
8793
+ /** Not available: Dench runs one chat model, so this always fails. (`dench model thread`) */
8793
8794
  thread(args: Req<"agentConfig.model.thread">): Promise<Res<"agentConfig.model.thread">>;
8794
8795
  };
8795
8796
  organisation: {
package/dench.ts CHANGED
@@ -697,8 +697,6 @@ Standing context and memory:
697
697
  dench context --sections identity,organisation,user,memory,rules,tools [--json]
698
698
  dench context set <identity|organisation|user|tools|rules> --stdin
699
699
  dench memory search "<query>" | save <key> "<fact>"
700
- dench model default <id|clear>
701
- dench model thread <threadId> <id|clear>
702
700
  Context describes preferences and instructions. Environments store setup;
703
701
  secrets store credentials. A memory note does not install or save either.
704
702
 
@@ -2747,7 +2747,12 @@ const companySearch = z.object({
2747
2747
  domain: z.string().optional(),
2748
2748
  name: z.string().optional(),
2749
2749
  linkedinUrl: z.string().optional(),
2750
- keywords: z.string().optional(),
2750
+ keywords: z
2751
+ .string()
2752
+ .optional()
2753
+ .describe(
2754
+ 'Words matched in the company\'s description. Every word of every comma-separated phrase must appear, so use one or two distinctive words ("fintech", "payments"), not a long phrase ("B2B fintech platform"); put industry, size and location in their own filters.',
2755
+ ),
2751
2756
  industries: z
2752
2757
  .array(z.string())
2753
2758
  .max(50)
@@ -498,8 +498,8 @@ export const APP_SDK_OPERATIONS: readonly AppSdkOperationInfo[] = [
498
498
  {"id":"agentConfig.bootstrap.show","group":"agent-config","summary":"Read bootstrap state.","cli":"dench bootstrap status","method":"GET","path":"/agent-config/bootstrap","permission":"agent-config:read","deprecated":true,"pathParams":[]},
499
499
  {"id":"agentConfig.bootstrap.complete","group":"agent-config","summary":"Complete bootstrap.","cli":"dench bootstrap complete","method":"POST","path":"/agent-config/bootstrap/complete","permission":"agent-config:write","deprecated":true,"pathParams":[]},
500
500
  {"id":"agentConfig.bootstrap.template","group":"agent-config","summary":"Update bootstrap template.","cli":"dench bootstrap template","method":"PUT","path":"/agent-config/bootstrap/template","permission":"agent-config:write","deprecated":true,"pathParams":[]},
501
- {"id":"agentConfig.model.default","group":"agent-config","summary":"Set the default chat model.","cli":"dench model default","method":"PUT","path":"/agent-config/model/default","permission":"agent-config:write","pathParams":[]},
502
- {"id":"agentConfig.model.thread","group":"agent-config","summary":"Set a thread model override.","cli":"dench model thread","method":"PUT","path":"/agent-config/model/threads/{threadId}","permission":"agent-config:write","pathParams":["threadId"]},
501
+ {"id":"agentConfig.model.default","group":"agent-config","summary":"Not available: Dench runs one chat model, so this always fails.","cli":"dench model default","method":"PUT","path":"/agent-config/model/default","permission":"agent-config:write","deprecated":true,"pathParams":[]},
502
+ {"id":"agentConfig.model.thread","group":"agent-config","summary":"Not available: Dench runs one chat model, so this always fails.","cli":"dench model thread","method":"PUT","path":"/agent-config/model/threads/{threadId}","permission":"agent-config:write","deprecated":true,"pathParams":["threadId"]},
503
503
  {"id":"agentConfig.daily.today","group":"agent-config","summary":"Read today's daily activity path.","cli":"dench daily today","method":"GET","path":"/agent-config/daily/today","permission":"agent-config:read","deprecated":true,"pathParams":[]},
504
504
  {"id":"agentConfig.daily.show","group":"agent-config","summary":"Read a daily activity path.","cli":"dench daily show","method":"GET","path":"/agent-config/daily/{date}","permission":"agent-config:read","deprecated":true,"pathParams":["date"]},
505
505
  {"id":"notifications.list","group":"notifications","summary":"List your notifications (inbox, unread, archived, or all).","cli":"dench notifications list","method":"GET","path":"/notifications","permission":"notifications:read","pathParams":[]},
@@ -41,6 +41,9 @@ const browserSpec = (
41
41
  flagPositionals,
42
42
  );
43
43
 
44
+ const ONE_CHAT_MODEL_HELP =
45
+ "Not available: Dench runs one chat model; model selection is not available.";
46
+
44
47
  /** CLI spellings for dispatchers that do not reject leftovers themselves.
45
48
  * Positional ranges follow the actual handlers; null deliberately allows free text
46
49
  * or multiple IDs. Flag alternatives cover positional inputs replaced by flags.
@@ -163,8 +166,16 @@ export const COMMAND_ARGUMENTS = [
163
166
  ),
164
167
  ),
165
168
  spec("mem append", [1, null]),
166
- spec("model default", [0, 1]),
167
- spec("model thread", [2, 2]),
169
+ {
170
+ ...spec("model default", [0, 1]),
171
+ usage: "dench model default",
172
+ description: ONE_CHAT_MODEL_HELP,
173
+ },
174
+ {
175
+ ...spec("model thread", [2, 2]),
176
+ usage: "dench model thread <threadId> <modelId|clear>",
177
+ description: ONE_CHAT_MODEL_HELP,
178
+ },
168
179
  spec("bootstrap complete", [0, 0]),
169
180
  spec("bootstrap reopen", [0, 0]),
170
181
  spec("bootstrap template", [0, 0], "--content", "--stdin"),
@@ -5716,8 +5716,9 @@ const rawApiOperations = [
5716
5716
  }),
5717
5717
  op({
5718
5718
  id: "agentConfig.model.default",
5719
+ deprecated: true,
5719
5720
  group: "agent-config",
5720
- summary: "Set the default chat model.",
5721
+ summary: "Not available: Dench runs one chat model, so this always fails.",
5721
5722
  cli: "dench model default",
5722
5723
  method: "PUT",
5723
5724
  path: "/agent-config/model/default",
@@ -5727,8 +5728,9 @@ const rawApiOperations = [
5727
5728
  }),
5728
5729
  op({
5729
5730
  id: "agentConfig.model.thread",
5731
+ deprecated: true,
5730
5732
  group: "agent-config",
5731
- summary: "Set a thread model override.",
5733
+ summary: "Not available: Dench runs one chat model, so this always fails.",
5732
5734
  cli: "dench model thread",
5733
5735
  method: "PUT",
5734
5736
  path: "/agent-config/model/threads/{threadId}",