agent-dag 3.8.7 → 3.8.9

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/bin/agent-dag.js CHANGED
@@ -291,7 +291,7 @@ async function prefetchUpgrade(worker) {
291
291
  const note = readRestartFailure(pkgName);
292
292
  const decision = upgradeAttempt({ note, target, now: Date.now() });
293
293
  if (!decision.allow) {
294
- const error = upgradeRefusalText(decision, target);
294
+ const error = upgradeRefusalText({ ...decision, dash: G.dash }, target);
295
295
  // Re-stamped even though nothing was attempted: the tab ends its attempt on
296
296
  // a failure note it has not seen before, so a refusal that left the note
297
297
  // untouched would leave the button reading "fetching…" for the full three
@@ -413,7 +413,7 @@ function launchNpx() {
413
413
  if (stopping || served) return; // the user stopped it, or it ran and ended
414
414
  const summary = npxFailureSummary(tail);
415
415
  const hint = npxFailureHint(tail);
416
- console.error(`${PRODUCT}: ${why} staying on v${VERSION}`);
416
+ console.error(`${PRODUCT}: ${why} ${G.dash} staying on v${VERSION}`);
417
417
  if (summary) console.error(` ${summary}`);
418
418
  if (hint) console.error(` ${hint}`);
419
419
  // Left for the worker about to be launched: it is the only way the browser
package/bin/deck.js CHANGED
@@ -76,12 +76,15 @@ if (flags.uninstall) {
76
76
  // the whole path-plus-parser-error twice buries the one line that differs —
77
77
  // which of our two installations is still in there.
78
78
  const named = new Set();
79
+ // Its own glyphs for the same reason the bad-port line has them: this block
80
+ // runs at module top level, well before `G` is declared (#797).
81
+ const { dash: gDash } = glyphs(unicodeOK());
79
82
  /** Report one provider's outcome. `ok` first — see uninstallHooks. */
80
83
  const report = (res, label) => {
81
84
  if (res.ok === false) {
82
85
  refused = true;
83
86
  named.add(res.settingsPath);
84
- console.error(`${PRODUCT}: ${label} hooks NOT removed ${res.settingsPath} could not be read as JSON (${res.why}).`);
87
+ console.error(`${PRODUCT}: ${label} hooks NOT removed ${gDash} ${res.settingsPath} could not be read as JSON (${res.why}).`);
85
88
  console.error(`${PRODUCT}: the __agent-dag hook entries are still in that file and keep firing on every ${label} event.`);
86
89
  return;
87
90
  }
@@ -116,7 +119,7 @@ if (flags.uninstall) {
116
119
  : `${PRODUCT}: sound hook left in place — ${sound.message}`);
117
120
  named.add(sound.settingsPath);
118
121
  } else {
119
- console.error(`${PRODUCT}: your own sound hooks were NOT restored ${sound.message}`);
122
+ console.error(`${PRODUCT}: your own sound hooks were NOT restored ${gDash} ${sound.message}`);
120
123
  }
121
124
  }
122
125
  if (hasCodexInstalled()) {
@@ -149,7 +152,13 @@ const envPort = process.env.AGENT_DAG_PORT?.trim();
149
152
  const rawPort = flags.port ?? (envPort ? envPort : null);
150
153
  if (rawPort != null && !isPortValue(rawPort)) {
151
154
  const named = flags.port != null ? "--port" : "AGENT_DAG_PORT";
152
- console.error(`${PRODUCT}: ${named} ${rawPort}: not a port number expected 0–65535.`);
155
+ // Its own glyphs, not `G` — that is declared a hundred lines below and this
156
+ // runs at module top level, so reaching for it here would be a temporal dead
157
+ // zone and a ReferenceError on the one path that reports a bad port. Both
158
+ // helpers read the environment and nothing this file has parsed yet, so
159
+ // asking twice on a path that exits immediately costs nothing (#797).
160
+ const { dash } = glyphs(unicodeOK());
161
+ console.error(`${PRODUCT}: ${named} ${rawPort}: not a port number ${dash} expected 0-65535.`);
153
162
  process.exit(1);
154
163
  }
155
164
  const port = rawPort == null ? 4317 : Number(rawPort);
@@ -1167,7 +1176,7 @@ function reportUnregistered({ file, error }) {
1167
1176
  const why = error?.message ? ` ${G.dash} ${error.message}` : "";
1168
1177
  write(
1169
1178
  `\n ${P.warn}${G.warn}${P.reset} ${P.bold}not registered${P.reset}${P.muted}${why}${P.reset}\n` +
1170
- ` ${P.muted}${unregisteredDetail({ file, claude: wantClaude })}${P.reset}\n`,
1179
+ ` ${P.muted}${unregisteredDetail({ file, claude: wantClaude, dash: G.dash })}${P.reset}\n`,
1171
1180
  );
1172
1181
  }
1173
1182