@agentdocumentformat/cli 0.7.5 → 0.7.7

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/dist/adf.mjs CHANGED
@@ -9,7 +9,7 @@ import "./chunks/chunk-M2RX3S2T.mjs";
9
9
 
10
10
  // src/main/cli/bin.ts
11
11
  function version() {
12
- return "0.7.5";
12
+ return "0.7.7";
13
13
  }
14
14
  var DAEMON_HELP = `Usage: adf daemon [--port <n>] [--host <h>] [--settings <file>]
15
15
  adf daemon start [--port <n>] [--force]
@@ -140,9 +140,9 @@ async function main(argv) {
140
140
  let { daemonPaths } = await import("./chunks/daemon-control-HKFVSQTQ.mjs");
141
141
  process.env.ADF_DAEMON_PIDFILE = daemonPaths(Number(process.env.ADF_DAEMON_PORT ?? 7385)).pidFile;
142
142
  }
143
- return await import("./chunks/daemon-6RA2DIJ2.mjs"), -1;
143
+ return await import("./chunks/daemon-CHZHTLGR.mjs"), -1;
144
144
  }
145
- let [{ runCli, tuiInvocation }, control] = await Promise.all([import("./chunks/cli-JDBN7CBR.mjs"), import("./chunks/daemon-control-HKFVSQTQ.mjs")]);
145
+ let [{ runCli, tuiInvocation }, control] = await Promise.all([import("./chunks/cli-AFHQ2XTN.mjs"), import("./chunks/daemon-control-HKFVSQTQ.mjs")]);
146
146
  return tuiInvocation(argv) && process.env.NODE_ENV === void 0 && (process.env.NODE_ENV = "production", process.env.ADF_NODE_ENV_DEFAULTED = "1"), await runCli(argv, {
147
147
  fetch: globalThis.fetch.bind(globalThis),
148
148
  stdout: (text) => process.stdout.write(text),
@@ -117,7 +117,7 @@ import {
117
117
  validateCredentials,
118
118
  validateMcpForm,
119
119
  validateProvider
120
- } from "./chunk-GEKSJHIV.mjs";
120
+ } from "./chunk-QPLEAE6V.mjs";
121
121
  import {
122
122
  require_jsx_runtime
123
123
  } from "./chunk-7CV2SA3H.mjs";
@@ -137,10 +137,10 @@ import {
137
137
  findTheme,
138
138
  nextThemeName,
139
139
  themeNames
140
- } from "./chunk-SLUKGXKH.mjs";
140
+ } from "./chunk-KXEF4F4E.mjs";
141
141
  import {
142
142
  DaemonClient
143
- } from "./chunk-3UCKYP7P.mjs";
143
+ } from "./chunk-VN7UH7I5.mjs";
144
144
  import {
145
145
  DaemonError,
146
146
  MAIN_LOOP,
@@ -157,7 +157,7 @@ import {
157
157
  ADF_SKILLS_REGISTRY_URL,
158
158
  checkFetchTarget,
159
159
  context_breakdown_exports
160
- } from "./chunk-2WSQ7V6K.mjs";
160
+ } from "./chunk-4N4ASPH6.mjs";
161
161
  import "./chunk-2NAP2ZF7.mjs";
162
162
  import "./chunk-5PO5PKRV.mjs";
163
163
  import "./chunk-VMHTYDH4.mjs";
@@ -177,7 +177,7 @@ import {
177
177
  ThemeContext,
178
178
  stateColor,
179
179
  useTheme
180
- } from "./chunk-EYX2YLJW.mjs";
180
+ } from "./chunk-PRMGZZM5.mjs";
181
181
  import {
182
182
  isMouseGarbage,
183
183
  lastRawInput,
@@ -8639,7 +8639,7 @@ var help = {
8639
8639
  }
8640
8640
  }, theme = {
8641
8641
  name: "theme",
8642
- args: "[adf|adf-light|adf-contrast|adf-mono|next]",
8642
+ args: "[adf|adf-light|adf-contrast|parchment|adf-mono|next]",
8643
8643
  description: "Pick a color theme (no argument opens the picker)",
8644
8644
  complete: (partial) => [...themeNames(), "next", "light", "dark", "mono"].filter((n) => n.startsWith(partial.trim())),
8645
8645
  run: (ctx) => {
@@ -504,6 +504,7 @@ export {
504
504
  checkFetchTarget,
505
505
  checkConnectTarget,
506
506
  resolveCompactThreshold,
507
+ resolveLoopThreshold,
507
508
  contextTotal,
508
509
  contextCategories,
509
510
  context_breakdown_exports
@@ -0,0 +1,113 @@
1
+ import { createRequire as __adfCreateRequire } from 'node:module';
2
+ import { fileURLToPath as __adfFileURLToPath } from 'node:url';
3
+ import { dirname as __adfDirname } from 'node:path';
4
+ const require = __adfCreateRequire(import.meta.url);
5
+ const __filename = __adfFileURLToPath(import.meta.url);
6
+ const __dirname = __adfDirname(__filename);
7
+ import {
8
+ createTheme
9
+ } from "./chunk-PRMGZZM5.mjs";
10
+
11
+ // src/main/tui/commands/builtin/themes.ts
12
+ var ADF_DARK = { ...createTheme({ mono: !1, env: {} }).color }, ADF_LIGHT = {
13
+ text: "#111111",
14
+ // ink
15
+ muted: "#474B54",
16
+ // ink-muted
17
+ dim: "#6B707C",
18
+ // ink-faint
19
+ accent: "#2F5BEA",
20
+ // blue
21
+ live: "#1F44BF",
22
+ // blue-strong
23
+ loop: "#6A4A8C",
24
+ // status: experimental
25
+ user: "#2F5BEA",
26
+ // blue
27
+ assistant: "#111111",
28
+ // ink
29
+ thinking: "#6B707C",
30
+ // ink-faint
31
+ tool: "#474B54",
32
+ // ink-muted
33
+ success: "#1F6A52",
34
+ // status: stable
35
+ warn: "#8A5A0B",
36
+ // status: draft
37
+ error: "#A12F29",
38
+ // status: deprecated
39
+ info: "#474B54",
40
+ // ink-muted
41
+ border: "#C9CED8",
42
+ // rule-strong
43
+ borderFocus: "#2F5BEA",
44
+ // blue
45
+ selectionFg: "#FFFFFF",
46
+ // paper (on a blue fill)
47
+ selectionBg: "#2F5BEA",
48
+ // blue
49
+ surface: "#F6F7FA",
50
+ // paper-sunken
51
+ overlay: "#F6F7FA"
52
+ // paper-sunken
53
+ }, ADF_CONTRAST = {
54
+ ...ADF_DARK,
55
+ text: "#FFFFFF",
56
+ assistant: "#FFFFFF",
57
+ muted: "#D4D8E1",
58
+ dim: "#B0B5C2",
59
+ thinking: "#B0B5C2",
60
+ tool: "#D4D8E1",
61
+ info: "#D4D8E1",
62
+ border: "#858B99"
63
+ }, PARCHMENT = {
64
+ text: "#D9D4C7",
65
+ muted: "#9A9384",
66
+ dim: "#5F5A50",
67
+ accent: "#E3A857",
68
+ live: "#4DB6AC",
69
+ loop: "#A98BE3",
70
+ user: "#E3A857",
71
+ assistant: "#D9D4C7",
72
+ thinking: "#7F7A6E",
73
+ tool: "#6FA8DC",
74
+ success: "#8CC084",
75
+ warn: "#E0B050",
76
+ error: "#E06C6C",
77
+ info: "#6FA8DC",
78
+ border: "#4A463E",
79
+ borderFocus: "#E3A857",
80
+ selectionFg: "#1B1A17",
81
+ selectionBg: "#E3A857",
82
+ surface: "#23211D",
83
+ overlay: "#2B2823"
84
+ }, THEMES = [
85
+ { name: "adf", label: "ADF dark", description: "ADF brand colors on a dark terminal (default)", colors: ADF_DARK },
86
+ { name: "adf-light", label: "ADF light", description: "ADF brand colors on a light terminal", colors: ADF_LIGHT },
87
+ { name: "adf-contrast", label: "ADF high contrast", description: "Brighter text and borders on dark backgrounds", colors: ADF_CONTRAST },
88
+ { name: "parchment", label: "Parchment", description: "The earlier warm palette: amber accent on a dark terminal", colors: PARCHMENT },
89
+ { name: "adf-mono", label: "Mono", description: "No color (like NO_COLOR): bold and inverse carry emphasis", colors: void 0 }
90
+ ], ALIASES = { dark: "adf", default: "adf", light: "adf-light", contrast: "adf-contrast", mono: "adf-mono", "no-color": "adf-mono" };
91
+ function findTheme(name) {
92
+ let wanted = name.trim().toLowerCase();
93
+ return THEMES.find((t) => t.name === (ALIASES[wanted] ?? wanted));
94
+ }
95
+ function nextThemeName(current) {
96
+ let at = THEMES.findIndex((t) => t.name === current);
97
+ return THEMES[(at + 1) % THEMES.length].name;
98
+ }
99
+ var MONO_COLORS = Object.fromEntries(Object.keys(ADF_DARK).map((k) => [k, void 0]));
100
+ function applyTheme(theme, choice) {
101
+ theme.name = choice.name, theme.mono = choice.colors === void 0, theme.color = { ...choice.colors ?? MONO_COLORS };
102
+ }
103
+ function themeNames() {
104
+ return THEMES.map((t) => t.name);
105
+ }
106
+
107
+ export {
108
+ THEMES,
109
+ findTheme,
110
+ nextThemeName,
111
+ applyTheme,
112
+ themeNames
113
+ };
@@ -13,26 +13,46 @@ import {
13
13
 
14
14
  // src/main/tui/app/theme.ts
15
15
  var import_react = __toESM(require_react(), 1), ADF_COLORS = {
16
- text: "#D9D4C7",
17
- muted: "#9A9384",
18
- dim: "#5F5A50",
19
- accent: "#E3A857",
20
- live: "#4DB6AC",
21
- loop: "#A98BE3",
22
- user: "#E3A857",
23
- assistant: "#D9D4C7",
24
- thinking: "#7F7A6E",
25
- tool: "#6FA8DC",
26
- success: "#8CC084",
27
- warn: "#E0B050",
28
- error: "#E06C6C",
29
- info: "#6FA8DC",
30
- border: "#4A463E",
31
- borderFocus: "#E3A857",
32
- selectionFg: "#1B1A17",
33
- selectionBg: "#E3A857",
34
- surface: "#23211D",
35
- overlay: "#2B2823"
16
+ text: "#ECEEF3",
17
+ // ink
18
+ muted: "#B0B5C2",
19
+ // ink-muted
20
+ dim: "#858B99",
21
+ // ink-faint
22
+ accent: "#7F9DFF",
23
+ // blue
24
+ live: "#A9BDFF",
25
+ // blue-strong
26
+ loop: "#C6A8E6",
27
+ // status: experimental
28
+ user: "#7F9DFF",
29
+ // blue
30
+ assistant: "#ECEEF3",
31
+ // ink
32
+ thinking: "#858B99",
33
+ // ink-faint
34
+ tool: "#B0B5C2",
35
+ // ink-muted
36
+ success: "#86CFAE",
37
+ // status: stable
38
+ warn: "#E7BF73",
39
+ // status: draft
40
+ error: "#EE9B92",
41
+ // status: deprecated
42
+ info: "#B0B5C2",
43
+ // ink-muted
44
+ border: "#333A49",
45
+ // rule-strong
46
+ borderFocus: "#7F9DFF",
47
+ // blue
48
+ selectionFg: "#0C0E13",
49
+ // paper (on a blue fill)
50
+ selectionBg: "#7F9DFF",
51
+ // blue
52
+ surface: "#151922",
53
+ // paper-sunken
54
+ overlay: "#151922"
55
+ // paper-sunken
36
56
  }, MONO_COLORS = Object.fromEntries(
37
57
  Object.keys(ADF_COLORS).map((key) => [key, void 0])
38
58
  ), UNICODE_GLYPHS = {
@@ -22,7 +22,7 @@ import {
22
22
  } from "./chunk-3AT7IIP7.mjs";
23
23
  import {
24
24
  useTheme
25
- } from "./chunk-EYX2YLJW.mjs";
25
+ } from "./chunk-PRMGZZM5.mjs";
26
26
  import {
27
27
  require_react
28
28
  } from "./chunk-6GJ4QHRI.mjs";
@@ -833,6 +833,15 @@ var DaemonClient = class _DaemonClient {
833
833
  agentContext(agentId, loop, items) {
834
834
  return this.get(`/agents/${enc(agentId)}/context`, { loop: loop && loop !== MAIN_LOOP ? loop : void 0, items });
835
835
  }
836
+ // --- agent vitals (/vitals) ------------------------------------------------
837
+ /** Header facts plus Reach/Access/Autonomy/Experience. `force` skips the daemon's cache. */
838
+ agentVitals(agentId, force = !1) {
839
+ return this.get(`/agents/${enc(agentId)}/vitals`, { force: force ? 1 : void 0 });
840
+ }
841
+ /** Next wakes, 14 days of turns and cost, and what the file holds (mind, skills, tables). `force` skips the daemon's cache. */
842
+ agentActivity(agentId, force = !1) {
843
+ return this.get(`/agents/${enc(agentId)}/activity`, { force: force ? 1 : void 0 });
844
+ }
836
845
  };
837
846
  function buildQuery(query) {
838
847
  let params = new URLSearchParams();
@@ -44,7 +44,7 @@ function tuiInvocation(argv) {
44
44
  return argv.filter((a) => a !== "--json");
45
45
  }
46
46
  async function defaultLaunchTui(argv) {
47
- let { runTui } = await import("./tui-I5LEARAV.mjs");
47
+ let { runTui } = await import("./tui-4ZWZKD4C.mjs");
48
48
  return await runTui(argv);
49
49
  }
50
50
  function urlFromArgv(argv) {