@monster-orange/den 0.4.11 → 0.4.13

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +169 -0
  2. package/README.md +7 -7
  3. package/docs/distributions.md +212 -12
  4. package/package.json +2 -1
  5. package/src/shared/agents/catalog.ts +77 -0
  6. package/src/shared/agents/default-pack/be-dev.md +1 -0
  7. package/src/shared/agents/default-pack/devops.md +1 -0
  8. package/src/shared/agents/default-pack/fe-dev.md +1 -0
  9. package/src/shared/agents/default-pack/orchestrator.md +3 -1
  10. package/src/shared/agents/default-pack/planner.md +1 -0
  11. package/src/shared/agents/default-pack/reviewer.md +1 -0
  12. package/src/shared/agents/default-pack/tester.md +16 -0
  13. package/src/shared/agents/default-pack/ux-designer.md +1 -0
  14. package/src/shared/agents/den-claude.ts +151 -17
  15. package/src/shared/agents/permissions.ts +108 -0
  16. package/src/shared/agents/persona-store.ts +286 -0
  17. package/src/shared/agents/personas.ts +116 -12
  18. package/src/shared/agents/records.ts +57 -0
  19. package/src/shared/agents/roles.ts +288 -0
  20. package/src/shared/agents/runtime.ts +49 -0
  21. package/src/shared/agents/session-name.ts +110 -0
  22. package/src/shared/agents/transcript-follow.ts +180 -0
  23. package/src/shared/den-config.ts +27 -1
  24. package/src/ui/cli/agent-ops.ts +578 -11
  25. package/src/ui/cli/agents-command.ts +12 -2
  26. package/src/ui/cli/env-probe.ts +4 -1
  27. package/src/ui/mcp/tools.ts +1 -1
  28. package/src/ui/server/agent-paths.ts +52 -0
  29. package/src/ui/server/agent-routes.ts +329 -19
  30. package/src/ui/server/agents-layout-pref.ts +43 -0
  31. package/src/ui/server/editor-open-pref.ts +41 -0
  32. package/src/ui/server/index.ts +22 -0
  33. package/src/ui/server/public/agent-start.js +3 -2
  34. package/src/ui/server/public/agents-page.js +1037 -67
  35. package/src/ui/server/public/agents-section.js +1 -1
  36. package/src/ui/server/public/agents.html +236 -20
  37. package/src/ui/server/public/header.js +2 -0
  38. package/src/ui/server/public/i18n/es.js +139 -0
  39. package/src/ui/server/public/i18n/ja.js +139 -0
  40. package/src/ui/server/public/persona-ui.css +539 -0
  41. package/src/ui/server/public/persona-ui.js +796 -0
  42. package/src/ui/server/public/settings-page.js +4 -9
  43. package/src/ui/server/public/settings-registry.js +66 -0
  44. package/src/ui/server/public/settings.html +1 -0
  45. package/src/ui/server/public/shell.js +137 -0
  46. package/src/ui/server/public/term-input.js +129 -0
  47. package/src/ui/server/public/topbar.js +22 -4
  48. package/src/ui/server/route-classes.ts +29 -0
  49. package/src/ui/server/session-routes.ts +34 -1
  50. package/src/ui/server/ui-assets.ts +8 -0
@@ -21,6 +21,13 @@ import { ConfigError, isConfigError } from "./config-error.js";
21
21
  import { validateCatalog, type CatalogEntry } from "./agents/catalog.js";
22
22
  import type { Guardrails } from "./agents/guardrails.js";
23
23
  import { DEFAULT_ROTATE, type RotateSettings } from "./agents/rotation.js";
24
+ import {
25
+ checkCategoriesConfig,
26
+ checkRolesConfig,
27
+ DEN_CATEGORIES,
28
+ type Category,
29
+ type RolesConfig,
30
+ } from "./agents/roles.js";
24
31
  import type { TestAccountsConfig } from "./auth/test-accounts.js";
25
32
 
26
33
  import { product } from "./product.js";
@@ -339,6 +346,11 @@ export interface UserConfig {
339
346
  * editor instead of the default.
340
347
  */
341
348
  editor_overrides?: Record<string, string>;
349
+ /**
350
+ * Where a file path in an agent's pane opens (AG-4b): vscode, cursor or
351
+ * zed by URL scheme, or none (copy the path). editor-open-pref.ts.
352
+ */
353
+ editor_open?: string;
342
354
  /**
343
355
  * Personal override of the team release config (config/den.yml `release:`).
344
356
  * Wave-assignment edits made in the Release tab are saved here so they stay
@@ -397,6 +409,8 @@ export interface UserConfig {
397
409
  * (the default), 1d or 7d. Interrupted agents are never forgotten.
398
410
  */
399
411
  remove_stopped_after?: unknown;
412
+ /** AG-4b: the Agents tab's layout (src/ui/server/agents-layout-pref.ts). */
413
+ layout?: unknown;
400
414
  };
401
415
  /**
402
416
  * The web server's per-machine keys (src/shared/web-session.ts
@@ -911,6 +925,9 @@ export const AGENTS_RESERVED_KEYS = [
911
925
  "runtime_catalog",
912
926
  "default_pack",
913
927
  "rotate",
928
+ // AG-10.5, AG-11.1: the distribution's persona categories and roles.
929
+ "categories",
930
+ "roles",
914
931
  ];
915
932
 
916
933
  /** One agent's own block, `agents.<id>`. */
@@ -934,6 +951,10 @@ export interface ResolvedAgentsConfig {
934
951
  runtimeCatalog: CatalogEntry[];
935
952
  /** agents.rotate with its defaults (den#4); unset: DEFAULT_ROTATE. */
936
953
  rotate?: RotateSettings;
954
+ /** agents.categories (AG-10.5): the distribution's, after Den's. */
955
+ categories?: Category[];
956
+ /** agents.roles (AG-11.1): new roles and Den roles' preset extensions. */
957
+ roles?: RolesConfig;
937
958
  }
938
959
 
939
960
  /** `agents.rotate` checked; any other key, or a bad value, throws naming it. */
@@ -1027,6 +1048,11 @@ export function readAgentsConfig(
1027
1048
  ),
1028
1049
  rotate: rotateBlock(raw.rotate),
1029
1050
  };
1051
+ out.categories = checkCategoriesConfig(raw.categories);
1052
+ out.roles = checkRolesConfig(raw.roles, [
1053
+ ...DEN_CATEGORIES.map((c) => c.id),
1054
+ ...out.categories.map((c) => c.id),
1055
+ ]);
1030
1056
  const max = raw.max_concurrent;
1031
1057
  if (max !== undefined) {
1032
1058
  if (typeof max !== "number" || !Number.isInteger(max) || max < 1)
@@ -1059,7 +1085,7 @@ export function readAgentsConfig(
1059
1085
  const where = `agents.${id}`;
1060
1086
  if (!AGENT_KEY_RE.test(id) || !isMapping(block))
1061
1087
  throw new Error(
1062
- `${where}: unknown key (agents: takes max_concurrent, persona_packs, runtime_catalog, default_pack, rotate, ` +
1088
+ `${where}: unknown key (agents: takes max_concurrent, persona_packs, runtime_catalog, default_pack, rotate, categories, roles, ` +
1063
1089
  `or an agent id mapping to { grants: [...] })`,
1064
1090
  );
1065
1091
  for (const k of Object.keys(block))