@dosu/cli 0.67.0-beta.3 → 0.67.0-beta.5

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 (3) hide show
  1. package/README.md +6 -11
  2. package/bin/dosu.js +144 -418
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -133,33 +133,28 @@ Run `dosu <command> --help` for subcommands and flags.
133
133
 
134
134
  ### Agent skills
135
135
 
136
- The `dosu` skill — which teaches coding agents how to operate Dosu through this CLI — lives in [`skills/dosu`](skills/dosu) and is embedded in the CLI at build time, so the copy an agent reads always matches the installed CLI version. `dosu setup` (and `dosu skill install`) writes it to `~/.agents/skills/dosu`, the universal location read by Cursor, Codex, Gemini CLI, Zed, Cline, Copilot, OpenCode, and Antigravity, and symlinks Claude Code's `~/.claude/skills/dosu` and Windsurf's `~/.codeium/windsurf/skills/dosu` at that copy. After a CLI upgrade, the first command re-applies the skill automatically; `dosu skill update` does the same on demand. The former standalone [`dosu-ai/dosu-skill`](https://github.com/dosu-ai/dosu-skill) repository is deprecated in favour of this bundle.
136
+ The `dosu` skill — which teaches coding agents how to operate Dosu through this CLI — lives in [`skills/dosu`](skills/dosu) and is embedded in the CLI at build time, so the copy an agent reads always matches the installed CLI version. `dosu setup` (and `dosu skill install`) writes it to `~/.agents/skills/dosu`, the universal location read by Cursor, Codex, Gemini CLI, Copilot, and OpenCode, and symlinks Claude Code's `~/.claude/skills/dosu` at that copy. After a CLI upgrade, the first command re-applies the skill automatically; `dosu skill update` does the same on demand. The former standalone [`dosu-ai/dosu-skill`](https://github.com/dosu-ai/dosu-skill) repository is deprecated in favour of this bundle.
137
137
 
138
138
  To change a skill, edit `skills/<name>/…` and run `bun run embed:skills` to regenerate `src/generated/skills.ts` (a test fails if the two drift).
139
139
 
140
140
  ### Supported AI tools
141
141
 
142
- `dosu mcp add <id>` and the setup wizard support:
142
+ `dosu mcp add <id>` and the setup wizard support the coding agents whose sessions Dosu can learn from — each one keeps a session log on disk that [`@letta-ai/trajectory`](https://github.com/letta-ai/trajectory) normalizes:
143
143
 
144
144
  | ID | Tool |
145
145
  |---|---|
146
146
  | `claude` | Claude Code |
147
- | `claude-desktop` | Claude Desktop |
148
147
  | `cursor` | Cursor |
149
- | `vscode` | VS Code |
150
148
  | `codex` | Codex CLI |
151
149
  | `gemini` | Gemini CLI |
152
- | `windsurf` | Windsurf |
153
- | `zed` | Zed |
154
- | `cline` | Cline |
155
- | `cline-cli` | Cline CLI |
156
150
  | `copilot` | GitHub Copilot CLI |
157
151
  | `opencode` | OpenCode |
158
- | `antigravity` | Antigravity |
159
- | `mcporter` | MCPorter |
160
- | `factory` | Factory |
152
+ | `factory` | Factory (droid) |
153
+ | `pi` | Pi (installs the Dosu pi extension; global only) |
161
154
  | `manual` | Manual Configuration (prints config to paste yourself) |
162
155
 
156
+ Tools with no such log (Claude Desktop, VS Code, Windsurf, Zed, Cline, Antigravity, MCPorter, ...) can still reach Dosu's MCP server: `dosu mcp add manual` prints the entry to paste into their config. The CLI no longer writes it for them, since nothing it does for them beyond that entry could learn from their sessions.
157
+
163
158
  ### Non-interactive / agent setup
164
159
 
165
160
  For coding agents and CI, `setup` has a non-interactive mode:
package/bin/dosu.js CHANGED
@@ -450,7 +450,7 @@ function isNpxInvocation(channel = INSTALL_CHANNEL, env = process.env) {
450
450
  function getVersionString() {
451
451
  return `v${VERSION}`;
452
452
  }
453
- var VERSION = "0.67.0-beta.3", INSTALL_CHANNEL = "npm";
453
+ var VERSION = "0.67.0-beta.5", INSTALL_CHANNEL = "npm";
454
454
 
455
455
  // src/debug/logger.ts
456
456
  import {
@@ -602,22 +602,6 @@ function expandHome(path) {
602
602
  return path;
603
603
  return join3(homedir2(), path.slice(1));
604
604
  }
605
- function appSupportDir() {
606
- switch (platform()) {
607
- case "darwin": {
608
- return join3(homedir2(), "Library", "Application Support");
609
- }
610
- case "win32": {
611
- return process.env.APPDATA ?? "";
612
- }
613
- default: {
614
- const xdg = process.env.XDG_CONFIG_HOME;
615
- if (xdg)
616
- return xdg;
617
- return join3(homedir2(), ".config");
618
- }
619
- }
620
- }
621
605
  function allOnPath(name) {
622
606
  return (process.env.PATH ?? "").split(delimiter).filter(Boolean).map((dir) => join3(dir, name)).filter((candidate) => existsSync3(candidate));
623
607
  }
@@ -9415,18 +9399,26 @@ function groupedAgent(options) {
9415
9399
  }
9416
9400
  function cursorAgent() {
9417
9401
  const configPath = () => expandHome("~/.cursor/hooks.json");
9402
+ const has = (event) => hasCursorHook(readHookConfig(configPath()), event);
9418
9403
  return {
9419
9404
  id: () => "cursor",
9420
9405
  name: () => "Cursor",
9421
9406
  isInstalled: () => isInstalled(["~/.cursor"]),
9422
9407
  configPath,
9423
- isEnabled: () => hasCursorHook(readHookConfig(configPath()), CURSOR_EVENT),
9408
+ isEnabled: () => has(CURSOR_EVENT),
9424
9409
  enable: () => {
9425
- writeHookConfig(configPath(), addCursorHook(readHookConfig(configPath()), CURSOR_EVENT));
9410
+ let config = readHookConfig(configPath());
9411
+ config = addCursorHook(config, CURSOR_EVENT);
9412
+ config = addCursorHook(config, CURSOR_END_EVENT);
9413
+ writeHookConfig(configPath(), config);
9426
9414
  },
9427
9415
  disable: () => {
9428
- writeHookConfig(configPath(), removeCursorHook(readHookConfig(configPath()), CURSOR_EVENT));
9429
- }
9416
+ let config = readHookConfig(configPath());
9417
+ config = removeCursorHook(config, CURSOR_EVENT);
9418
+ config = removeCursorHook(config, CURSOR_END_EVENT);
9419
+ writeHookConfig(configPath(), config);
9420
+ },
9421
+ statusNote: () => has(CURSOR_END_EVENT) ? "" : "The sessionEnd hook is missing, so sessions ship only once quiet; 'dosu knowledge hooks enable cursor' adds it."
9430
9422
  };
9431
9423
  }
9432
9424
  function claudeAgent() {
@@ -9503,7 +9495,7 @@ function refreshEnabledHooks() {
9503
9495
  }
9504
9496
  return refreshed;
9505
9497
  }
9506
- var CURSOR_EVENT = "stop";
9498
+ var CURSOR_EVENT = "stop", CURSOR_END_EVENT = "sessionEnd";
9507
9499
  var init_agents2 = __esm(() => {
9508
9500
  init_logger();
9509
9501
  init_agents();
@@ -16201,6 +16193,9 @@ var init_ask = __esm(() => {
16201
16193
  });
16202
16194
 
16203
16195
  // src/tui/layout.ts
16196
+ function activeLayoutMargin() {
16197
+ return activeMargin;
16198
+ }
16204
16199
  function contentWidth(columns = process.stdout.columns ?? 80) {
16205
16200
  return Math.min(columns, CONTENT_WIDTH);
16206
16201
  }
@@ -16308,6 +16303,7 @@ function installCenteredLayout(stream = process.stdout) {
16308
16303
  if (margin === 0)
16309
16304
  return () => {};
16310
16305
  active = true;
16306
+ activeMargin = margin;
16311
16307
  const pad = " ".repeat(margin);
16312
16308
  const original = stream.write;
16313
16309
  const state = { atLineStart: true };
@@ -16320,9 +16316,10 @@ function installCenteredLayout(stream = process.stdout) {
16320
16316
  return () => {
16321
16317
  stream.write = original;
16322
16318
  active = false;
16319
+ activeMargin = 0;
16323
16320
  };
16324
16321
  }
16325
- var import_picocolors8, ESC2, CONTENT_WIDTH = 64, TOKEN_PATTERN, COLUMN_RESET_FINALS, active = false, ANSI_PATTERN2, TAB_CELL_PAD = 2;
16322
+ var import_picocolors8, ESC2, CONTENT_WIDTH = 64, TOKEN_PATTERN, COLUMN_RESET_FINALS, active = false, activeMargin = 0, ANSI_PATTERN2, TAB_CELL_PAD = 2;
16326
16323
  var init_layout = __esm(() => {
16327
16324
  init_styles();
16328
16325
  import_picocolors8 = __toESM(require_picocolors(), 1);
@@ -16614,15 +16611,18 @@ function runInteractive(controller, io = {}) {
16614
16611
  output.write(`${ESC4}[${frameLines}A${ESC4}[0J`);
16615
16612
  frameLines = 0;
16616
16613
  };
16614
+ const rowsFor = (line) => {
16615
+ const columns = output.columns || 80;
16616
+ return Math.max(1, Math.ceil((activeLayoutMargin() + visibleWidth(line)) / columns));
16617
+ };
16617
16618
  const draw = () => {
16618
- const frame = controller.render().flatMap((line) => line.split(`
16619
- `)).map((line) => `${brand(BAR)} ${line}`).join(`
16620
- `);
16619
+ const lines = controller.render().flatMap((line) => line.split(`
16620
+ `)).map((line) => `${brand(BAR)} ${line}`);
16621
16621
  erase();
16622
- output.write(`${frame}
16622
+ output.write(`${lines.join(`
16623
+ `)}
16623
16624
  `);
16624
- frameLines = frame.split(`
16625
- `).length;
16625
+ frameLines = lines.reduce((total, line) => total + rowsFor(line), 0);
16626
16626
  };
16627
16627
  output.write(HIDE_CURSOR2);
16628
16628
  draw();
@@ -16732,7 +16732,11 @@ function multiselect2(opts, io = {}) {
16732
16732
  let top = 0;
16733
16733
  let error;
16734
16734
  const picked = new Set(opts.initialValues ?? []);
16735
- const maxLabel = Math.max(16, contentWidth(output.columns || 80) - 8);
16735
+ const suffixWidth = Math.max(0, ...opts.options.map((option) => {
16736
+ const texts = opts.statusFor ? [opts.statusFor(option.value, true), opts.statusFor(option.value, false)] : [option.hint];
16737
+ return Math.max(0, ...texts.map((text) => text ? visibleWidth(text) + 3 : 0));
16738
+ }));
16739
+ const maxLabel = Math.max(16, contentWidth(output.columns || 80) - 8 - suffixWidth);
16736
16740
  const clipLabel = (text) => text.length <= maxLabel ? text : `…${text.slice(text.length - maxLabel + 1)}`;
16737
16741
  const labelWidth = Math.max(...opts.options.map((o) => clipLabel(optionLabel(o)).length));
16738
16742
  const pickedValues = () => opts.options.filter((option) => picked.has(option.value)).map((option) => option.value);
@@ -19817,14 +19821,18 @@ function recordCapturedSession(key, update, configDir = getConfigDir(), now = ne
19817
19821
  return false;
19818
19822
  }
19819
19823
  }
19824
+ function cursorSessionId(hook) {
19825
+ const id = typeof hook.transcript_path === "string" && hook.transcript_path.endsWith(".jsonl") ? basename7(hook.transcript_path, ".jsonl") : hook.conversation_id;
19826
+ return typeof id === "string" ? id : null;
19827
+ }
19820
19828
  function captureCursorStop(payload, deps = {}) {
19821
19829
  if (typeof payload !== "object" || payload === null)
19822
19830
  return false;
19823
19831
  const hook = payload;
19824
19832
  if (hook.cursor_version === undefined)
19825
19833
  return false;
19826
- const id = typeof hook.transcript_path === "string" && hook.transcript_path.endsWith(".jsonl") ? basename7(hook.transcript_path, ".jsonl") : hook.conversation_id;
19827
- if (typeof id !== "string")
19834
+ const id = cursorSessionId(hook);
19835
+ if (id === null)
19828
19836
  return false;
19829
19837
  const roots = hook.workspace_roots;
19830
19838
  const dir = Array.isArray(roots) && typeof roots[0] === "string" ? roots[0] : undefined;
@@ -19905,6 +19913,17 @@ function piSessionShutdown(hook) {
19905
19913
  return null;
19906
19914
  return { harness: "pi", id, path };
19907
19915
  }
19916
+ function cursorSessionEnd(hook) {
19917
+ if (hook.hook_event_name !== "sessionEnd" || hook.cursor_version === undefined)
19918
+ return null;
19919
+ const path = hook.transcript_path;
19920
+ if (typeof path !== "string" || !path.startsWith("/") || !path.endsWith(".jsonl"))
19921
+ return null;
19922
+ const id = basename7(path, ".jsonl");
19923
+ if (!SAFE_SEGMENT.test(id))
19924
+ return null;
19925
+ return { harness: "cursor", id, path };
19926
+ }
19908
19927
  function endedSessionOf(payload) {
19909
19928
  if (typeof payload !== "object" || payload === null)
19910
19929
  return null;
@@ -19958,6 +19977,7 @@ var init_capture = __esm(() => {
19958
19977
  END_EVENT_READERS = [
19959
19978
  claudeSessionEnd,
19960
19979
  codexSessionEnd,
19980
+ cursorSessionEnd,
19961
19981
  piSessionShutdown
19962
19982
  ];
19963
19983
  ENDED_VALUE = /^([a-z]+):([A-Za-z0-9._-]+)(?:=(\/.*))?$/s;
@@ -22215,7 +22235,7 @@ var init_backlog = __esm(() => {
22215
22235
  });
22216
22236
 
22217
22237
  // src/telemetry/debug-id.ts
22218
- var BUNDLE_DEBUG_ID_PLACEHOLDER = "b28c8070-bfe4-35bd-6475-6e2164756e21";
22238
+ var BUNDLE_DEBUG_ID_PLACEHOLDER = "cc966720-b10b-7059-6475-6e2164756e21";
22219
22239
 
22220
22240
  // src/telemetry/telemetry.ts
22221
22241
  import { randomUUID as randomUUID2 } from "node:crypto";
@@ -27058,8 +27078,6 @@ function linkedSkillsDir(agent) {
27058
27078
  const claudeConfigDir = process.env.CLAUDE_CONFIG_DIR?.trim() || join24(homedir9(), ".claude");
27059
27079
  return join24(claudeConfigDir, "skills");
27060
27080
  }
27061
- if (agent === "windsurf")
27062
- return join24(homedir9(), ".codeium", "windsurf", "skills");
27063
27081
  return null;
27064
27082
  }
27065
27083
  function skillInstallTargetForProvider(providerID) {
@@ -27210,7 +27228,10 @@ function removeSkills() {
27210
27228
  const names = new Set([...BUNDLED_SKILLS.map((skill) => skill.name), ...legacy]);
27211
27229
  const dirs = [
27212
27230
  universalSkillsDir(),
27213
- ...new Set(SUPPORTED_SKILL_AGENTS.map(linkedSkillsDir).filter((dir) => !!dir))
27231
+ ...new Set([
27232
+ ...SUPPORTED_SKILL_AGENTS.map(linkedSkillsDir).filter((dir) => !!dir),
27233
+ ...LEGACY_LINKED_SKILLS_DIRS.map((dir) => dir())
27234
+ ])
27214
27235
  ];
27215
27236
  const removed = [];
27216
27237
  for (const dir of dirs) {
@@ -27276,7 +27297,7 @@ Failed to update skill.`));
27276
27297
  });
27277
27298
  return cmd;
27278
27299
  }
27279
- var import_picocolors31, SKILL_NAME = "dosu", LEGACY_SKILL_SOURCE = "dosu-ai/dosu-skill", INSTALL_STATE_FILENAME = "skill-install.json", LEGACY_CACHE_FILENAME = "skill-update-check.json", SUPPORTED_SKILL_AGENTS, SKILL_AGENT_BY_PROVIDER;
27300
+ var import_picocolors31, SKILL_NAME = "dosu", LEGACY_SKILL_SOURCE = "dosu-ai/dosu-skill", INSTALL_STATE_FILENAME = "skill-install.json", LEGACY_CACHE_FILENAME = "skill-update-check.json", SUPPORTED_SKILL_AGENTS, SKILL_AGENT_BY_PROVIDER, LEGACY_LINKED_SKILLS_DIRS;
27280
27301
  var init_skill = __esm(() => {
27281
27302
  init_commander();
27282
27303
  init_config();
@@ -27288,27 +27309,20 @@ var init_skill = __esm(() => {
27288
27309
  "cursor",
27289
27310
  "gemini-cli",
27290
27311
  "codex",
27291
- "windsurf",
27292
- "zed",
27293
- "cline",
27294
27312
  "github-copilot",
27295
- "opencode",
27296
- "antigravity"
27313
+ "opencode"
27297
27314
  ];
27298
27315
  SKILL_AGENT_BY_PROVIDER = {
27299
27316
  claude: "claude-code",
27300
27317
  cursor: "cursor",
27301
- vscode: "github-copilot",
27302
27318
  gemini: "gemini-cli",
27303
27319
  codex: "codex",
27304
- windsurf: "windsurf",
27305
- zed: "zed",
27306
- cline: "cline",
27307
- "cline-cli": "cline",
27308
27320
  copilot: "github-copilot",
27309
- opencode: "opencode",
27310
- antigravity: "antigravity"
27321
+ opencode: "opencode"
27311
27322
  };
27323
+ LEGACY_LINKED_SKILLS_DIRS = [
27324
+ () => join24(homedir9(), ".codeium", "windsurf", "skills")
27325
+ ];
27312
27326
  });
27313
27327
 
27314
27328
  // src/commands/sources.ts
@@ -28138,24 +28152,6 @@ var init_base = __esm(() => {
28138
28152
  init_shape();
28139
28153
  });
28140
28154
 
28141
- // src/mcp/providers/antigravity.ts
28142
- var AntigravityProvider = () => createJSONProvider({
28143
- providerName: "Antigravity",
28144
- providerID: "antigravity",
28145
- local: false,
28146
- priorityValue: 15,
28147
- paths: ["~/.gemini"],
28148
- globalPath: "~/.gemini/antigravity/mcp_config.json",
28149
- topKey: "mcpServers",
28150
- buildServer: ({ url, headers }) => ({
28151
- serverUrl: url,
28152
- headers
28153
- })
28154
- });
28155
- var init_antigravity = __esm(() => {
28156
- init_base();
28157
- });
28158
-
28159
28155
  // src/mcp/providers/claude.ts
28160
28156
  import { join as join26 } from "node:path";
28161
28157
  var ClaudeProvider = () => ({
@@ -28179,111 +28175,16 @@ var init_claude = __esm(() => {
28179
28175
  init_base();
28180
28176
  });
28181
28177
 
28182
- // src/mcp/providers/claude-desktop.ts
28183
- import { join as join27 } from "node:path";
28184
- function configPath2() {
28185
- return join27(appSupportDir(), "Claude", "claude_desktop_config.json");
28186
- }
28187
- var ClaudeDesktopProvider = () => ({
28188
- name: () => "Claude Desktop",
28189
- id: () => "claude-desktop",
28190
- supportsLocal: () => false,
28191
- priority: () => 2,
28192
- detectPaths: () => [join27(appSupportDir(), "Claude")],
28193
- isInstalled: () => isInstalled([join27(appSupportDir(), "Claude")]),
28194
- globalConfigPath: () => configPath2(),
28195
- isConfigured: () => isJSONKeyConfigured(configPath2(), "mcpServers"),
28196
- isCurrent: (cfg) => {
28197
- const proxy = proxyCommandShape("claude-desktop");
28198
- return entryHasShape(proxy ? stdioServer(proxy) : npxRemoteEntry(shapeEndpoint(cfg), ANY, ANY, ANY), readJSONServer(configPath2(), "mcpServers"));
28199
- },
28200
- install(cfg, global) {
28201
- if (!global)
28202
- throw new Error("Claude Desktop does not support local installation");
28203
- const url = mcpEndpoint(cfg);
28204
- const proxy = proxyCommand("claude-desktop");
28205
- if (proxy) {
28206
- mcpHeaders(cfg.active_account?.target?.api_key);
28207
- installJSONServer(configPath2(), "mcpServers", stdioServer(proxy));
28208
- return;
28209
- }
28210
- const npx = findNpx();
28211
- installJSONServer(configPath2(), "mcpServers", npxRemoteEntry(url, cfg.active_account?.target?.api_key, npx, launcherPathEnv(npx)));
28212
- },
28213
- remove(global) {
28214
- if (!global)
28215
- throw new Error("Claude Desktop does not support local removal");
28216
- removeJSONServer(configPath2(), "mcpServers");
28217
- }
28218
- });
28219
- var init_claude_desktop = __esm(() => {
28220
- init_config_helpers();
28221
- init_detect();
28222
- init_proxy_entry();
28223
- init_shape();
28224
- });
28225
-
28226
- // src/mcp/providers/cline.ts
28227
- import { join as join28 } from "node:path";
28228
- var extensionDir = () => join28(appSupportDir(), "Code", "User", "globalStorage", "saoudrizwan.claude-dev"), ClineProvider = () => createJSONProvider({
28229
- providerName: "Cline",
28230
- providerID: "cline",
28231
- local: false,
28232
- priorityValue: 11,
28233
- paths: [extensionDir()],
28234
- globalPath: join28(extensionDir(), "settings", "cline_mcp_settings.json"),
28235
- topKey: "mcpServers",
28236
- buildStdioServer: (proxy) => ({ type: "stdio", ...stdioServer(proxy), disabled: false }),
28237
- buildServer: ({ url, headers }) => ({
28238
- url,
28239
- type: "streamableHttp",
28240
- disabled: false,
28241
- headers
28242
- })
28243
- });
28244
- var init_cline = __esm(() => {
28245
- init_detect();
28246
- init_proxy_entry();
28247
- init_base();
28248
- });
28249
-
28250
- // src/mcp/providers/cline-cli.ts
28251
- import { join as join29 } from "node:path";
28252
- function clineDir() {
28253
- return process.env.CLINE_DIR ?? expandHome("~/.cline");
28254
- }
28255
- var ClineCliProvider = () => createJSONProvider({
28256
- providerName: "Cline CLI",
28257
- providerID: "cline-cli",
28258
- local: false,
28259
- priorityValue: 12,
28260
- paths: [clineDir()],
28261
- globalPath: join29(clineDir(), "data", "settings", "cline_mcp_settings.json"),
28262
- topKey: "mcpServers",
28263
- buildStdioServer: (proxy) => ({ type: "stdio", ...stdioServer(proxy), disabled: false }),
28264
- buildServer: ({ url, headers }) => ({
28265
- url,
28266
- type: "streamableHttp",
28267
- disabled: false,
28268
- headers
28269
- })
28270
- });
28271
- var init_cline_cli = __esm(() => {
28272
- init_detect();
28273
- init_proxy_entry();
28274
- init_base();
28275
- });
28276
-
28277
28178
  // src/mcp/providers/codex.ts
28278
28179
  import { existsSync as existsSync22, readFileSync as readFileSync30 } from "node:fs";
28279
- import { dirname as dirname9, join as join30 } from "node:path";
28180
+ import { dirname as dirname9, join as join27 } from "node:path";
28280
28181
  function codexHome4() {
28281
28182
  return process.env.CODEX_HOME || expandHome("~/.codex");
28282
28183
  }
28283
28184
  function getConfigPath2(global) {
28284
28185
  if (global)
28285
- return join30(codexHome4(), "config.toml");
28286
- return join30(process.cwd(), ".codex", "config.toml");
28186
+ return join27(codexHome4(), "config.toml");
28187
+ return join27(process.cwd(), ".codex", "config.toml");
28287
28188
  }
28288
28189
  function readTOML(path) {
28289
28190
  if (!existsSync22(path))
@@ -28483,14 +28384,14 @@ function projectConfigPaths() {
28483
28384
  const chain = [];
28484
28385
  for (let dir = cwd;; ) {
28485
28386
  chain.push(dir);
28486
- if (existsSync22(join30(dir, ".git")))
28387
+ if (existsSync22(join27(dir, ".git")))
28487
28388
  break;
28488
28389
  const parent = dirname9(dir);
28489
28390
  if (parent === dir)
28490
- return [join30(cwd, ".codex", "config.toml")];
28391
+ return [join27(cwd, ".codex", "config.toml")];
28491
28392
  dir = parent;
28492
28393
  }
28493
- return chain.reverse().map((dir) => join30(dir, ".codex", "config.toml"));
28394
+ return chain.reverse().map((dir) => join27(dir, ".codex", "config.toml"));
28494
28395
  }
28495
28396
  function pruneLegacyRemoteEntry(path) {
28496
28397
  if (!existsSync22(path))
@@ -28507,12 +28408,12 @@ var FORWARDED_ENV, DOSU_TABLE = "mcp_servers.dosu", REMOTE_HTTP_KEY, CodexProvid
28507
28408
  priority: () => 8,
28508
28409
  detectPaths: () => ["~/.codex"],
28509
28410
  isInstalled: codexInstalled,
28510
- globalConfigPath: () => join30(codexHome4(), "config.toml"),
28411
+ globalConfigPath: () => join27(codexHome4(), "config.toml"),
28511
28412
  isConfigured: () => {
28512
- const content = readTOML(join30(codexHome4(), "config.toml"));
28413
+ const content = readTOML(join27(codexHome4(), "config.toml"));
28513
28414
  return content.includes("[mcp_servers.dosu]");
28514
28415
  },
28515
- isCurrent: (cfg) => entryHasShape(codexServer(cfg, true), readDosuEntry(readTOML(join30(codexHome4(), "config.toml")))),
28416
+ isCurrent: (cfg) => entryHasShape(codexServer(cfg, true), readDosuEntry(readTOML(join27(codexHome4(), "config.toml")))),
28516
28417
  install(cfg, global) {
28517
28418
  if (cfg.mode !== MODE_OSS && !cfg.active_account?.target?.deployment_id)
28518
28419
  throw new Error("deployment ID is required");
@@ -28545,7 +28446,7 @@ var init_codex3 = __esm(() => {
28545
28446
  });
28546
28447
 
28547
28448
  // src/mcp/providers/copilot.ts
28548
- import { join as join31 } from "node:path";
28449
+ import { join as join28 } from "node:path";
28549
28450
  function globalServer(url, apiKey, proxy) {
28550
28451
  if (proxy)
28551
28452
  return { type: "local", ...stdioServer(proxy), tools: ["*"] };
@@ -28553,7 +28454,7 @@ function globalServer(url, apiKey, proxy) {
28553
28454
  }
28554
28455
  function globalPath() {
28555
28456
  if (process.env.XDG_CONFIG_HOME) {
28556
- return join31(process.env.XDG_CONFIG_HOME, "mcp-config.json");
28457
+ return join28(process.env.XDG_CONFIG_HOME, "mcp-config.json");
28557
28458
  }
28558
28459
  return expandHome("~/.copilot/mcp-config.json");
28559
28460
  }
@@ -28574,7 +28475,7 @@ var CopilotProvider = () => ({
28574
28475
  if (global) {
28575
28476
  installJSONServer(globalPath(), "mcpServers", globalServer(url, cfg.active_account?.target?.api_key, proxy));
28576
28477
  } else {
28577
- const configPath = join31(process.cwd(), ".vscode", "mcp.json");
28478
+ const configPath = join28(process.cwd(), ".vscode", "mcp.json");
28578
28479
  const server = proxy ? { type: "stdio", ...stdioServer(proxy) } : { type: "http", url, headers };
28579
28480
  installJSONServer(configPath, "servers", server);
28580
28481
  }
@@ -28583,7 +28484,7 @@ var CopilotProvider = () => ({
28583
28484
  if (global) {
28584
28485
  removeJSONServer(globalPath(), "mcpServers");
28585
28486
  } else {
28586
- const configPath = join31(process.cwd(), ".vscode", "mcp.json");
28487
+ const configPath = join28(process.cwd(), ".vscode", "mcp.json");
28587
28488
  removeJSONServer(configPath, "servers");
28588
28489
  }
28589
28490
  }
@@ -28596,7 +28497,7 @@ var init_copilot = __esm(() => {
28596
28497
  });
28597
28498
 
28598
28499
  // src/mcp/providers/cursor.ts
28599
- import { join as join32 } from "node:path";
28500
+ import { join as join29 } from "node:path";
28600
28501
  var CursorProvider = () => createJSONProvider({
28601
28502
  providerName: "Cursor",
28602
28503
  providerID: "cursor",
@@ -28609,14 +28510,14 @@ var CursorProvider = () => createJSONProvider({
28609
28510
  url,
28610
28511
  headers
28611
28512
  }),
28612
- localConfigPath: (cwd) => join32(cwd, ".cursor", "mcp.json")
28513
+ localConfigPath: (cwd) => join29(cwd, ".cursor", "mcp.json")
28613
28514
  });
28614
28515
  var init_cursor2 = __esm(() => {
28615
28516
  init_base();
28616
28517
  });
28617
28518
 
28618
28519
  // src/mcp/providers/factory.ts
28619
- import { join as join33 } from "node:path";
28520
+ import { join as join30 } from "node:path";
28620
28521
  var FactoryProvider = () => createJSONProvider({
28621
28522
  providerName: "Factory",
28622
28523
  providerID: "factory",
@@ -28626,7 +28527,7 @@ var FactoryProvider = () => createJSONProvider({
28626
28527
  globalPath: "~/.factory/mcp.json",
28627
28528
  topKey: "mcpServers",
28628
28529
  buildStdioServer: (proxy) => ({ type: "stdio", ...stdioServer(proxy) }),
28629
- localConfigPath: (cwd) => join33(cwd, ".factory", "mcp.json")
28530
+ localConfigPath: (cwd) => join30(cwd, ".factory", "mcp.json")
28630
28531
  });
28631
28532
  var init_factory = __esm(() => {
28632
28533
  init_proxy_entry();
@@ -28634,7 +28535,7 @@ var init_factory = __esm(() => {
28634
28535
  });
28635
28536
 
28636
28537
  // src/mcp/providers/gemini.ts
28637
- import { join as join34 } from "node:path";
28538
+ import { join as join31 } from "node:path";
28638
28539
  var GeminiProvider = () => createJSONProvider({
28639
28540
  providerName: "Gemini CLI",
28640
28541
  providerID: "gemini",
@@ -28643,7 +28544,7 @@ var GeminiProvider = () => createJSONProvider({
28643
28544
  paths: ["~/.gemini"],
28644
28545
  globalPath: "~/.gemini/settings.json",
28645
28546
  topKey: "mcpServers",
28646
- localConfigPath: (cwd) => join34(cwd, ".gemini", "settings.json")
28547
+ localConfigPath: (cwd) => join31(cwd, ".gemini", "settings.json")
28647
28548
  });
28648
28549
  var init_gemini = __esm(() => {
28649
28550
  init_base();
@@ -28688,53 +28589,8 @@ var init_manual = __esm(() => {
28688
28589
  init_config_helpers();
28689
28590
  });
28690
28591
 
28691
- // src/mcp/providers/mcporter.ts
28692
- import { existsSync as existsSync23 } from "node:fs";
28693
- import { join as join35 } from "node:path";
28694
- function server(url, apiKey, proxy) {
28695
- if (proxy)
28696
- return stdioServer(proxy);
28697
- return { type: "http", url, headers: mcpHeaders(apiKey) };
28698
- }
28699
- function resolveGlobalConfigPath() {
28700
- const jsonPath = expandHome("~/.mcporter/mcporter.json");
28701
- if (existsSync23(jsonPath))
28702
- return jsonPath;
28703
- const jsoncPath = expandHome("~/.mcporter/mcporter.jsonc");
28704
- if (existsSync23(jsoncPath))
28705
- return jsoncPath;
28706
- return jsonPath;
28707
- }
28708
- var MCPorterProvider = () => ({
28709
- name: () => "MCPorter",
28710
- id: () => "mcporter",
28711
- supportsLocal: () => true,
28712
- priority: () => 16,
28713
- detectPaths: () => ["~/.mcporter"],
28714
- isInstalled: () => isInstalled(["~/.mcporter"]),
28715
- globalConfigPath: () => resolveGlobalConfigPath(),
28716
- isConfigured: () => isJSONKeyConfigured(resolveGlobalConfigPath(), "mcpServers"),
28717
- isCurrent: (cfg) => entryHasShape(server(shapeEndpoint(cfg), ANY, proxyCommandShape("mcporter")), readJSONServer(resolveGlobalConfigPath(), "mcpServers")),
28718
- install(cfg, global) {
28719
- const configPath = global ? resolveGlobalConfigPath() : join35(process.cwd(), "config", "mcporter.json");
28720
- const url = mcpEndpoint(cfg);
28721
- const proxy = proxyCommand("mcporter");
28722
- installJSONServer(configPath, "mcpServers", server(url, cfg.active_account?.target?.api_key, proxy));
28723
- },
28724
- remove(global) {
28725
- const configPath = global ? resolveGlobalConfigPath() : join35(process.cwd(), "config", "mcporter.json");
28726
- removeJSONServer(configPath, "mcpServers");
28727
- }
28728
- });
28729
- var init_mcporter = __esm(() => {
28730
- init_config_helpers();
28731
- init_detect();
28732
- init_proxy_entry();
28733
- init_shape();
28734
- });
28735
-
28736
28592
  // src/mcp/providers/opencode.ts
28737
- import { join as join36 } from "node:path";
28593
+ import { join as join32 } from "node:path";
28738
28594
  var jsonProvider = () => createJSONProvider({
28739
28595
  providerName: "OpenCode",
28740
28596
  providerID: "opencode",
@@ -28755,7 +28611,7 @@ var jsonProvider = () => createJSONProvider({
28755
28611
  enabled: true,
28756
28612
  headers
28757
28613
  }),
28758
- localConfigPath: (cwd) => join36(cwd, "opencode.json")
28614
+ localConfigPath: (cwd) => join32(cwd, "opencode.json")
28759
28615
  }), OpenCodeProvider = () => {
28760
28616
  const provider = jsonProvider();
28761
28617
  return { ...provider, isInstalled: () => provider.isInstalled() || isOnPath("opencode") };
@@ -28789,133 +28645,15 @@ var init_pi4 = __esm(() => {
28789
28645
  init_pi3();
28790
28646
  });
28791
28647
 
28792
- // src/mcp/providers/vscode.ts
28793
- import { join as join37 } from "node:path";
28794
- var VSCodeProvider = () => createJSONProvider({
28795
- providerName: "VS Code",
28796
- providerID: "vscode",
28797
- local: true,
28798
- priorityValue: 6,
28799
- paths: [join37(appSupportDir(), "Code")],
28800
- globalPath: join37(appSupportDir(), "Code", "User", "mcp.json"),
28801
- topKey: "servers",
28802
- buildStdioServer: (proxy) => ({ type: "stdio", ...stdioServer(proxy) }),
28803
- localConfigPath: (cwd) => join37(cwd, ".vscode", "mcp.json")
28804
- });
28805
- var init_vscode = __esm(() => {
28806
- init_detect();
28807
- init_proxy_entry();
28808
- init_base();
28809
- });
28810
-
28811
- // src/mcp/providers/windsurf.ts
28812
- import { homedir as homedir10 } from "node:os";
28813
- import { join as join38 } from "node:path";
28814
- var WindsurfProvider = () => createJSONProvider({
28815
- providerName: "Windsurf",
28816
- providerID: "windsurf",
28817
- local: false,
28818
- priorityValue: 9,
28819
- paths: [join38(homedir10(), ".codeium", "windsurf")],
28820
- globalPath: join38(homedir10(), ".codeium", "windsurf", "mcp_config.json"),
28821
- topKey: "mcpServers"
28822
- });
28823
- var init_windsurf = __esm(() => {
28824
- init_base();
28825
- });
28826
-
28827
- // src/mcp/providers/zed.ts
28828
- import { rmSync as rmSync5 } from "node:fs";
28829
- import { homedir as homedir11, platform as platform4 } from "node:os";
28830
- import { join as join39 } from "node:path";
28831
- function zedConfigDir() {
28832
- const os = platform4();
28833
- if (os === "win32")
28834
- return join39(appSupportDir(), "Zed");
28835
- if (os === "darwin")
28836
- return join39(homedir11(), ".config", "zed");
28837
- return join39(appSupportDir(), "zed");
28838
- }
28839
- function zedDataDir() {
28840
- const os = platform4();
28841
- if (os === "darwin")
28842
- return join39(appSupportDir(), "Zed");
28843
- if (os === "win32")
28844
- return join39(process.env.LOCALAPPDATA ?? "", "Zed");
28845
- return join39(process.env.XDG_DATA_HOME ?? join39(homedir11(), ".local", "share"), "zed");
28846
- }
28847
- function legacyDarwinSettingsPath() {
28848
- return platform4() === "darwin" ? join39(appSupportDir(), "Zed", "settings.json") : null;
28849
- }
28850
- function removeLegacyDosuEntry(path) {
28851
- let cfg;
28852
- try {
28853
- cfg = readJSONConfig(path);
28854
- } catch {
28855
- return;
28856
- }
28857
- const servers = cfg.context_servers;
28858
- if (typeof servers !== "object" || servers === null || !("dosu" in servers))
28859
- return;
28860
- delete servers.dosu;
28861
- const nothingElse = Object.keys(cfg).length === 1 && Object.keys(servers).length === 0;
28862
- if (nothingElse)
28863
- rmSync5(path, { force: true });
28864
- else
28865
- saveJSONConfig(path, cfg);
28866
- }
28867
- var ZedProvider = (legacyPath = legacyDarwinSettingsPath()) => {
28868
- const provider = createJSONProvider({
28869
- providerName: "Zed",
28870
- providerID: "zed",
28871
- local: true,
28872
- priorityValue: 10,
28873
- paths: [zedConfigDir(), zedDataDir()],
28874
- globalPath: join39(zedConfigDir(), "settings.json"),
28875
- topKey: "context_servers",
28876
- buildServer: ({ url, headers }) => ({ url, headers }),
28877
- localConfigPath: (cwd) => join39(cwd, ".zed", "settings.json")
28878
- });
28879
- if (!legacyPath)
28880
- return provider;
28881
- return {
28882
- ...provider,
28883
- isCurrent: (cfg) => provider.isCurrent(cfg) && readJSONServer(legacyPath, "context_servers") === undefined,
28884
- install(cfg, global) {
28885
- provider.install(cfg, global);
28886
- if (global)
28887
- removeLegacyDosuEntry(legacyPath);
28888
- },
28889
- remove(global) {
28890
- provider.remove(global);
28891
- if (global)
28892
- removeLegacyDosuEntry(legacyPath);
28893
- }
28894
- };
28895
- };
28896
- var init_zed = __esm(() => {
28897
- init_config_helpers();
28898
- init_detect();
28899
- init_base();
28900
- });
28901
-
28902
28648
  // src/mcp/providers.ts
28903
28649
  function allProviders() {
28904
28650
  return [
28905
28651
  ClaudeProvider(),
28906
- ClaudeDesktopProvider(),
28907
28652
  CursorProvider(),
28908
- VSCodeProvider(),
28909
28653
  GeminiProvider(),
28910
28654
  CodexProvider(),
28911
- WindsurfProvider(),
28912
- ZedProvider(),
28913
- ClineProvider(),
28914
- ClineCliProvider(),
28915
28655
  CopilotProvider(),
28916
28656
  OpenCodeProvider(),
28917
- AntigravityProvider(),
28918
- MCPorterProvider(),
28919
28657
  FactoryProvider(),
28920
28658
  PiProvider(),
28921
28659
  ManualProvider()
@@ -28932,23 +28670,15 @@ function getProvider(toolID) {
28932
28670
  return provider;
28933
28671
  }
28934
28672
  var init_providers = __esm(() => {
28935
- init_antigravity();
28936
28673
  init_claude();
28937
- init_claude_desktop();
28938
- init_cline();
28939
- init_cline_cli();
28940
28674
  init_codex3();
28941
28675
  init_copilot();
28942
28676
  init_cursor2();
28943
28677
  init_factory();
28944
28678
  init_gemini();
28945
28679
  init_manual();
28946
- init_mcporter();
28947
28680
  init_opencode4();
28948
28681
  init_pi4();
28949
- init_vscode();
28950
- init_windsurf();
28951
- init_zed();
28952
28682
  });
28953
28683
 
28954
28684
  // src/mcp/refresh.ts
@@ -28997,22 +28727,22 @@ var init_refresh = __esm(() => {
28997
28727
  import { spawn as spawn2 } from "node:child_process";
28998
28728
  import {
28999
28729
  closeSync as closeSync8,
29000
- existsSync as existsSync24,
28730
+ existsSync as existsSync23,
29001
28731
  mkdirSync as mkdirSync14,
29002
28732
  openSync as openSync8,
29003
28733
  readFileSync as readFileSync31,
29004
- rmSync as rmSync6,
28734
+ rmSync as rmSync5,
29005
28735
  statSync as statSync11,
29006
28736
  writeFileSync as writeFileSync15,
29007
28737
  writeSync
29008
28738
  } from "node:fs";
29009
- import { homedir as homedir12 } from "node:os";
29010
- import { join as join40 } from "node:path";
28739
+ import { homedir as homedir10 } from "node:os";
28740
+ import { join as join33 } from "node:path";
29011
28741
  function statePath() {
29012
- return join40(getConfigDir(), STATE_FILENAME2);
28742
+ return join33(getConfigDir(), STATE_FILENAME2);
29013
28743
  }
29014
28744
  function lockPath2() {
29015
- return join40(getConfigDir(), LOCK_FILENAME2);
28745
+ return join33(getConfigDir(), LOCK_FILENAME2);
29016
28746
  }
29017
28747
  function isValidVersion(value) {
29018
28748
  return typeof value === "string" && VERSION_PATTERN.test(value);
@@ -29038,7 +28768,7 @@ function readState() {
29038
28768
  function writeState(state) {
29039
28769
  try {
29040
28770
  const dir = getConfigDir();
29041
- if (!existsSync24(dir))
28771
+ if (!existsSync23(dir))
29042
28772
  mkdirSync14(dir, { recursive: true, mode: 448 });
29043
28773
  writeFileSync15(statePath(), `${JSON.stringify(state, null, 2)}
29044
28774
  `, { mode: 384 });
@@ -29095,7 +28825,7 @@ function claimLock(version, now) {
29095
28825
  try {
29096
28826
  mkdirSync14(getConfigDir(), { recursive: true, mode: 448 });
29097
28827
  if (!lockIsFresh(now))
29098
- rmSync6(lockPath2(), { force: true });
28828
+ rmSync5(lockPath2(), { force: true });
29099
28829
  const fd = openSync8(lockPath2(), "wx", 384);
29100
28830
  try {
29101
28831
  writeSync(fd, version);
@@ -29109,7 +28839,7 @@ function claimLock(version, now) {
29109
28839
  }
29110
28840
  function releaseLock() {
29111
28841
  try {
29112
- rmSync6(lockPath2(), { force: true });
28842
+ rmSync5(lockPath2(), { force: true });
29113
28843
  } catch {}
29114
28844
  }
29115
28845
  function readLockVersion() {
@@ -29141,7 +28871,7 @@ function startAutoUpdate(version, options = {}) {
29141
28871
  return claim === "held" ? "in_progress" : "unavailable";
29142
28872
  try {
29143
28873
  const child = spawn2(invocation.command, invocation.args, {
29144
- cwd: homedir12(),
28874
+ cwd: homedir10(),
29145
28875
  detached: true,
29146
28876
  stdio: "ignore",
29147
28877
  windowsHide: true,
@@ -29188,15 +28918,15 @@ var init_auto_update = __esm(() => {
29188
28918
  });
29189
28919
 
29190
28920
  // src/version/mcp-refresh-check.ts
29191
- import { existsSync as existsSync25, mkdirSync as mkdirSync15, readFileSync as readFileSync32, writeFileSync as writeFileSync16 } from "node:fs";
29192
- import { join as join41 } from "node:path";
28921
+ import { existsSync as existsSync24, mkdirSync as mkdirSync15, readFileSync as readFileSync32, writeFileSync as writeFileSync16 } from "node:fs";
28922
+ import { join as join34 } from "node:path";
29193
28923
  function getCachePath2() {
29194
- return join41(getConfigDir(), CACHE_FILENAME3);
28924
+ return join34(getConfigDir(), CACHE_FILENAME3);
29195
28925
  }
29196
28926
  function readMcpRefreshCache() {
29197
28927
  try {
29198
28928
  const path = getCachePath2();
29199
- if (!existsSync25(path))
28929
+ if (!existsSync24(path))
29200
28930
  return null;
29201
28931
  const data = JSON.parse(readFileSync32(path, "utf-8"));
29202
28932
  if (typeof data?.version === "string")
@@ -29209,7 +28939,7 @@ function readMcpRefreshCache() {
29209
28939
  function writeMcpRefreshCache(cache) {
29210
28940
  try {
29211
28941
  const dir = getConfigDir();
29212
- if (!existsSync25(dir)) {
28942
+ if (!existsSync24(dir)) {
29213
28943
  mkdirSync15(dir, { recursive: true, mode: 448 });
29214
28944
  }
29215
28945
  writeFileSync16(getCachePath2(), JSON.stringify(cache), { mode: 384 });
@@ -29352,11 +29082,11 @@ function createLogFollower(path, emit) {
29352
29082
  var init_follow = () => {};
29353
29083
 
29354
29084
  // src/sessions/session-title.ts
29355
- import { existsSync as existsSync26, mkdirSync as mkdirSync16, readFileSync as readFileSync33, renameSync as renameSync6, statSync as statSync13, writeFileSync as writeFileSync17 } from "node:fs";
29356
- import { homedir as homedir13 } from "node:os";
29357
- import { join as join42 } from "node:path";
29085
+ import { existsSync as existsSync25, mkdirSync as mkdirSync16, readFileSync as readFileSync33, renameSync as renameSync6, statSync as statSync13, writeFileSync as writeFileSync17 } from "node:fs";
29086
+ import { homedir as homedir11 } from "node:os";
29087
+ import { join as join35 } from "node:path";
29358
29088
  function cachePath2(configDir) {
29359
- return join42(configDir, CACHE_FILENAME4);
29089
+ return join35(configDir, CACHE_FILENAME4);
29360
29090
  }
29361
29091
  function loadCacheFile2(configDir) {
29362
29092
  try {
@@ -29370,7 +29100,7 @@ function loadCacheFile2(configDir) {
29370
29100
  }
29371
29101
  function saveCacheFile2(configDir, entries) {
29372
29102
  try {
29373
- if (!existsSync26(configDir))
29103
+ if (!existsSync25(configDir))
29374
29104
  mkdirSync16(configDir, { recursive: true, mode: 448 });
29375
29105
  const path = cachePath2(configDir);
29376
29106
  const tmp = `${path}.${process.pid}.tmp`;
@@ -29408,15 +29138,15 @@ function claudeSummaryFromHead(text) {
29408
29138
  }
29409
29139
  return null;
29410
29140
  }
29411
- function reconstructSession(harness, id, slug, home = homedir13(), exists = existsSync26) {
29141
+ function reconstructSession(harness, id, slug, home = homedir11(), exists = existsSync25) {
29412
29142
  if (!slug)
29413
29143
  return null;
29414
29144
  const candidates = [];
29415
29145
  if (harness === "claude") {
29416
- candidates.push(join42(home, ".claude", "projects", slug, `${id}.jsonl`));
29146
+ candidates.push(join35(home, ".claude", "projects", slug, `${id}.jsonl`));
29417
29147
  } else if (harness === "cursor") {
29418
- const project = join42(home, ".cursor", "projects", slug);
29419
- candidates.push(join42(project, "agent-transcripts", id, `${id}.jsonl`), join42(project, "agent-transcripts", `${id}.jsonl`));
29148
+ const project = join35(home, ".cursor", "projects", slug);
29149
+ candidates.push(join35(project, "agent-transcripts", id, `${id}.jsonl`), join35(project, "agent-transcripts", `${id}.jsonl`));
29420
29150
  } else {
29421
29151
  return null;
29422
29152
  }
@@ -29508,7 +29238,7 @@ var init_alt_screen = __esm(() => {
29508
29238
  });
29509
29239
 
29510
29240
  // src/tui/activity-view.ts
29511
- import { existsSync as existsSync27, readFileSync as readFileSync34 } from "node:fs";
29241
+ import { existsSync as existsSync26, readFileSync as readFileSync34 } from "node:fs";
29512
29242
  import { basename as basename11 } from "node:path";
29513
29243
  function reduceActivityViewKey(key) {
29514
29244
  if (key === "q" || key === ESC7 || key === CTRL_C4)
@@ -29795,7 +29525,7 @@ function createRowNamer() {
29795
29525
  names.titles[key] = t;
29796
29526
  };
29797
29527
  for (const s of [...backlog.queued, ...backlog.open]) {
29798
- if (!existsSync27(s.path))
29528
+ if (!existsSync26(s.path))
29799
29529
  continue;
29800
29530
  const key = `${s.harness}/${s.id}`;
29801
29531
  const dir = dirs.resolve(s);
@@ -30052,14 +29782,14 @@ var init_activity_view = __esm(() => {
30052
29782
  });
30053
29783
 
30054
29784
  // src/rules/installer.ts
30055
- import { existsSync as existsSync28, mkdirSync as mkdirSync17, readFileSync as readFileSync35, unlinkSync as unlinkSync7, writeFileSync as writeFileSync18 } from "node:fs";
30056
- import { homedir as homedir14 } from "node:os";
30057
- import { dirname as dirname10, join as join43 } from "node:path";
29785
+ import { existsSync as existsSync27, mkdirSync as mkdirSync17, readFileSync as readFileSync35, unlinkSync as unlinkSync7, writeFileSync as writeFileSync18 } from "node:fs";
29786
+ import { homedir as homedir12 } from "node:os";
29787
+ import { dirname as dirname10, join as join36 } from "node:path";
30058
29788
  function claudeConfigDir4() {
30059
- return process.env.CLAUDE_CONFIG_DIR || join43(homedir14(), ".claude");
29789
+ return process.env.CLAUDE_CONFIG_DIR || join36(homedir12(), ".claude");
30060
29790
  }
30061
29791
  function codexHome5() {
30062
- return process.env.CODEX_HOME || join43(homedir14(), ".codex");
29792
+ return process.env.CODEX_HOME || join36(homedir12(), ".codex");
30063
29793
  }
30064
29794
  function isRuleAgent(agent) {
30065
29795
  return Object.hasOwn(RULE_TARGETS, agent);
@@ -30088,7 +29818,7 @@ function ensureParent(path) {
30088
29818
  mkdirSync17(dirname10(path), { recursive: true });
30089
29819
  }
30090
29820
  function writeIfChanged2(path, content) {
30091
- if (!existsSync28(path)) {
29821
+ if (!existsSync27(path)) {
30092
29822
  ensureParent(path);
30093
29823
  writeFileSync18(path, content, "utf-8");
30094
29824
  return "created";
@@ -30121,7 +29851,7 @@ function buildSection(content, lineEnding = `
30121
29851
  return `${DOSU_RULE_SECTION_START}${lineEnding}${body}${lineEnding}${DOSU_RULE_SECTION_END}`;
30122
29852
  }
30123
29853
  function upsertSection(path, content) {
30124
- if (!existsSync28(path)) {
29854
+ if (!existsSync27(path)) {
30125
29855
  const section = buildSection(content);
30126
29856
  ensureParent(path);
30127
29857
  writeFileSync18(path, `${section}
@@ -30158,7 +29888,7 @@ function removeRuleForAgent(agent) {
30158
29888
  return null;
30159
29889
  const target = RULE_TARGETS[agent];
30160
29890
  const path = target.path();
30161
- if (!existsSync28(path))
29891
+ if (!existsSync27(path))
30162
29892
  return { agent, path, action: "not_found" };
30163
29893
  if (target.kind === "file") {
30164
29894
  unlinkSync7(path);
@@ -30201,36 +29931,32 @@ var init_installer = __esm(() => {
30201
29931
  RULE_TARGETS = {
30202
29932
  claude: {
30203
29933
  kind: "file",
30204
- path: () => join43(claudeConfigDir4(), "rules", "dosu.md")
29934
+ path: () => join36(claudeConfigDir4(), "rules", "dosu.md")
30205
29935
  },
30206
29936
  cursor: {
30207
29937
  kind: "file",
30208
- path: () => join43(homedir14(), ".cursor", "rules", "dosu.mdc"),
29938
+ path: () => join36(homedir12(), ".cursor", "rules", "dosu.mdc"),
30209
29939
  cursorFrontmatter: true
30210
29940
  },
30211
29941
  codex: {
30212
29942
  kind: "section",
30213
- path: () => join43(codexHome5(), "AGENTS.md")
29943
+ path: () => join36(codexHome5(), "AGENTS.md")
30214
29944
  },
30215
29945
  opencode: {
30216
29946
  kind: "section",
30217
- path: () => join43(homedir14(), ".config", "opencode", "AGENTS.md")
29947
+ path: () => join36(homedir12(), ".config", "opencode", "AGENTS.md")
30218
29948
  },
30219
29949
  gemini: {
30220
29950
  kind: "section",
30221
- path: () => join43(homedir14(), ".gemini", "GEMINI.md")
30222
- },
30223
- antigravity: {
30224
- kind: "section",
30225
- path: () => join43(homedir14(), ".gemini", "GEMINI.md")
29951
+ path: () => join36(homedir12(), ".gemini", "GEMINI.md")
30226
29952
  }
30227
29953
  };
30228
29954
  });
30229
29955
 
30230
29956
  // src/setup/agents-md-step.ts
30231
29957
  import { execSync as execSync2 } from "node:child_process";
30232
- import { existsSync as existsSync29, readFileSync as readFileSync36, writeFileSync as writeFileSync19 } from "node:fs";
30233
- import { join as join44 } from "node:path";
29958
+ import { existsSync as existsSync28, readFileSync as readFileSync36, writeFileSync as writeFileSync19 } from "node:fs";
29959
+ import { join as join37 } from "node:path";
30234
29960
  function inGitWorkTree(cwd = process.cwd()) {
30235
29961
  try {
30236
29962
  const stdout = execSync2("git rev-parse --is-inside-work-tree", {
@@ -30244,8 +29970,8 @@ function inGitWorkTree(cwd = process.cwd()) {
30244
29970
  }
30245
29971
  function dosuAgentsSectionState(cwd = process.cwd()) {
30246
29972
  try {
30247
- const path = join44(cwd, "AGENTS.md");
30248
- if (!existsSync29(path))
29973
+ const path = join37(cwd, "AGENTS.md");
29974
+ if (!existsSync28(path))
30249
29975
  return "missing";
30250
29976
  const content = readFileSync36(path, "utf-8");
30251
29977
  const startMatch = content.match(SECTION_START_RE);
@@ -30282,8 +30008,8 @@ function findSection2(content) {
30282
30008
  return { start, end };
30283
30009
  }
30284
30010
  function upsertDosuAgentsSection(cwd = process.cwd(), content = FALLBACK_DOSU_RULE) {
30285
- const path = join44(cwd, "AGENTS.md");
30286
- if (!existsSync29(path)) {
30011
+ const path = join37(cwd, "AGENTS.md");
30012
+ if (!existsSync28(path)) {
30287
30013
  const section = buildDosuAgentsSection(content);
30288
30014
  writeFileSync19(path, `${section}
30289
30015
  `);
@@ -32032,7 +31758,7 @@ var init_flow2 = __esm(() => {
32032
31758
  // src/commands/upgrade.ts
32033
31759
  import { spawnSync as spawnSync2 } from "node:child_process";
32034
31760
  import { realpathSync as realpathSync4 } from "node:fs";
32035
- import { homedir as homedir15 } from "node:os";
31761
+ import { homedir as homedir13 } from "node:os";
32036
31762
  import { posix, win32 } from "node:path";
32037
31763
  function installSpec(version = VERSION) {
32038
31764
  return `${PACKAGE_NAME}@${releaseTag(version)}`;
@@ -32089,7 +31815,7 @@ function packageRoots(manager, platform, comSpec, env, cwd) {
32089
31815
  manager === "npm" ? path.join(lines[0], "@dosu", "cli") : path.join(lines[0], "node_modules", "@dosu", "cli")
32090
31816
  ];
32091
31817
  }
32092
- function owningPackageManager(entrypoint, platform, comSpec, env = process.env, cwd = homedir15()) {
31818
+ function owningPackageManager(entrypoint, platform, comSpec, env = process.env, cwd = homedir13()) {
32093
31819
  const path = platform === "win32" ? win32 : posix;
32094
31820
  if (!entrypoint || !path.isAbsolute(entrypoint))
32095
31821
  return null;
@@ -32147,7 +31873,7 @@ function runUpgrade(channel = INSTALL_CHANNEL, options = {}) {
32147
31873
  }
32148
31874
  const platform = options.platform ?? process.platform;
32149
31875
  const env = options.env ?? process.env;
32150
- const cwd = options.cwd ?? homedir15();
31876
+ const cwd = options.cwd ?? homedir13();
32151
31877
  let manager = null;
32152
31878
  if (channel === "npm") {
32153
31879
  if (isNpxInvocation(channel, env)) {
@@ -32214,7 +31940,7 @@ function finishWithNewBinary(channel, options) {
32214
31940
  return;
32215
31941
  }
32216
31942
  const result = spawnSync2(invocation.command, invocation.args, {
32217
- cwd: options.cwd ?? homedir15(),
31943
+ cwd: options.cwd ?? homedir13(),
32218
31944
  shell: false,
32219
31945
  stdio: "inherit"
32220
31946
  });
@@ -32332,14 +32058,14 @@ var init_upgrade = __esm(() => {
32332
32058
  });
32333
32059
 
32334
32060
  // src/version/incognito-backfill-check.ts
32335
- import { existsSync as existsSync30, mkdirSync as mkdirSync18, writeFileSync as writeFileSync20 } from "node:fs";
32336
- import { join as join45 } from "node:path";
32061
+ import { existsSync as existsSync29, mkdirSync as mkdirSync18, writeFileSync as writeFileSync20 } from "node:fs";
32062
+ import { join as join38 } from "node:path";
32337
32063
  function markerPath() {
32338
- return join45(getConfigDir(), MARKER_FILENAME);
32064
+ return join38(getConfigDir(), MARKER_FILENAME);
32339
32065
  }
32340
32066
  function writeMarker() {
32341
32067
  const dir = getConfigDir();
32342
- if (!existsSync30(dir))
32068
+ if (!existsSync29(dir))
32343
32069
  mkdirSync18(dir, { recursive: true, mode: 448 });
32344
32070
  writeFileSync20(markerPath(), JSON.stringify({ done: true }), { mode: 384 });
32345
32071
  }
@@ -32352,7 +32078,7 @@ ${import_picocolors40.default.green(`✓ Dosu: added the incognito command to ${
32352
32078
  function checkForIncognitoBackfill(options = {}) {
32353
32079
  const notify = options.notify ?? true;
32354
32080
  try {
32355
- if (existsSync30(markerPath()))
32081
+ if (existsSync29(markerPath()))
32356
32082
  return;
32357
32083
  const added = [];
32358
32084
  let failed = false;
@@ -32389,8 +32115,8 @@ var init_incognito_backfill_check = __esm(() => {
32389
32115
  });
32390
32116
 
32391
32117
  // src/version/update-check.ts
32392
- import { existsSync as existsSync31, mkdirSync as mkdirSync19, readFileSync as readFileSync37, writeFileSync as writeFileSync21 } from "node:fs";
32393
- import { join as join46 } from "node:path";
32118
+ import { existsSync as existsSync30, mkdirSync as mkdirSync19, readFileSync as readFileSync37, writeFileSync as writeFileSync21 } from "node:fs";
32119
+ import { join as join39 } from "node:path";
32394
32120
  function isValidVersion2(value) {
32395
32121
  return typeof value === "string" && SEMVER_PATTERN.test(value);
32396
32122
  }
@@ -32443,12 +32169,12 @@ function isNewerRelease(candidate, current) {
32443
32169
  return false;
32444
32170
  }
32445
32171
  function getCachePath3() {
32446
- return join46(getConfigDir(), CACHE_FILENAME5);
32172
+ return join39(getConfigDir(), CACHE_FILENAME5);
32447
32173
  }
32448
32174
  function readCache() {
32449
32175
  try {
32450
32176
  const path = getCachePath3();
32451
- if (!existsSync31(path))
32177
+ if (!existsSync30(path))
32452
32178
  return null;
32453
32179
  const data = JSON.parse(readFileSync37(path, "utf-8"));
32454
32180
  if (typeof data.lastCheck === "number" && isValidVersion2(data.latestVersion)) {
@@ -32462,7 +32188,7 @@ function readCache() {
32462
32188
  function writeCache(cache) {
32463
32189
  try {
32464
32190
  const dir = getConfigDir();
32465
- if (!existsSync31(dir)) {
32191
+ if (!existsSync30(dir)) {
32466
32192
  mkdirSync19(dir, { recursive: true, mode: 448 });
32467
32193
  }
32468
32194
  writeFileSync21(getCachePath3(), JSON.stringify(cache), { mode: 384 });
@@ -34977,4 +34703,4 @@ main().catch((err) => {
34977
34703
  process.exit(1);
34978
34704
  });
34979
34705
 
34980
- //# debugId=b28c8070-bfe4-35bd-6475-6e2164756e21
34706
+ //# debugId=cc966720-b10b-7059-6475-6e2164756e21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dosu/cli",
3
- "version": "0.67.0-beta.3",
3
+ "version": "0.67.0-beta.5",
4
4
  "type": "module",
5
5
  "description": "Dosu CLI - Set up Dosu MCP for AI tools and work with Dosu Libraries, docs, and reviews",
6
6
  "license": "MIT",