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

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 +124 -410
  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.4", 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();
@@ -19817,14 +19809,18 @@ function recordCapturedSession(key, update, configDir = getConfigDir(), now = ne
19817
19809
  return false;
19818
19810
  }
19819
19811
  }
19812
+ function cursorSessionId(hook) {
19813
+ const id = typeof hook.transcript_path === "string" && hook.transcript_path.endsWith(".jsonl") ? basename7(hook.transcript_path, ".jsonl") : hook.conversation_id;
19814
+ return typeof id === "string" ? id : null;
19815
+ }
19820
19816
  function captureCursorStop(payload, deps = {}) {
19821
19817
  if (typeof payload !== "object" || payload === null)
19822
19818
  return false;
19823
19819
  const hook = payload;
19824
19820
  if (hook.cursor_version === undefined)
19825
19821
  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")
19822
+ const id = cursorSessionId(hook);
19823
+ if (id === null)
19828
19824
  return false;
19829
19825
  const roots = hook.workspace_roots;
19830
19826
  const dir = Array.isArray(roots) && typeof roots[0] === "string" ? roots[0] : undefined;
@@ -19905,6 +19901,17 @@ function piSessionShutdown(hook) {
19905
19901
  return null;
19906
19902
  return { harness: "pi", id, path };
19907
19903
  }
19904
+ function cursorSessionEnd(hook) {
19905
+ if (hook.hook_event_name !== "sessionEnd" || hook.cursor_version === undefined)
19906
+ return null;
19907
+ const path = hook.transcript_path;
19908
+ if (typeof path !== "string" || !path.startsWith("/") || !path.endsWith(".jsonl"))
19909
+ return null;
19910
+ const id = basename7(path, ".jsonl");
19911
+ if (!SAFE_SEGMENT.test(id))
19912
+ return null;
19913
+ return { harness: "cursor", id, path };
19914
+ }
19908
19915
  function endedSessionOf(payload) {
19909
19916
  if (typeof payload !== "object" || payload === null)
19910
19917
  return null;
@@ -19958,6 +19965,7 @@ var init_capture = __esm(() => {
19958
19965
  END_EVENT_READERS = [
19959
19966
  claudeSessionEnd,
19960
19967
  codexSessionEnd,
19968
+ cursorSessionEnd,
19961
19969
  piSessionShutdown
19962
19970
  ];
19963
19971
  ENDED_VALUE = /^([a-z]+):([A-Za-z0-9._-]+)(?:=(\/.*))?$/s;
@@ -22215,7 +22223,7 @@ var init_backlog = __esm(() => {
22215
22223
  });
22216
22224
 
22217
22225
  // src/telemetry/debug-id.ts
22218
- var BUNDLE_DEBUG_ID_PLACEHOLDER = "b28c8070-bfe4-35bd-6475-6e2164756e21";
22226
+ var BUNDLE_DEBUG_ID_PLACEHOLDER = "dabff5ff-72af-9bac-6475-6e2164756e21";
22219
22227
 
22220
22228
  // src/telemetry/telemetry.ts
22221
22229
  import { randomUUID as randomUUID2 } from "node:crypto";
@@ -27058,8 +27066,6 @@ function linkedSkillsDir(agent) {
27058
27066
  const claudeConfigDir = process.env.CLAUDE_CONFIG_DIR?.trim() || join24(homedir9(), ".claude");
27059
27067
  return join24(claudeConfigDir, "skills");
27060
27068
  }
27061
- if (agent === "windsurf")
27062
- return join24(homedir9(), ".codeium", "windsurf", "skills");
27063
27069
  return null;
27064
27070
  }
27065
27071
  function skillInstallTargetForProvider(providerID) {
@@ -27210,7 +27216,10 @@ function removeSkills() {
27210
27216
  const names = new Set([...BUNDLED_SKILLS.map((skill) => skill.name), ...legacy]);
27211
27217
  const dirs = [
27212
27218
  universalSkillsDir(),
27213
- ...new Set(SUPPORTED_SKILL_AGENTS.map(linkedSkillsDir).filter((dir) => !!dir))
27219
+ ...new Set([
27220
+ ...SUPPORTED_SKILL_AGENTS.map(linkedSkillsDir).filter((dir) => !!dir),
27221
+ ...LEGACY_LINKED_SKILLS_DIRS.map((dir) => dir())
27222
+ ])
27214
27223
  ];
27215
27224
  const removed = [];
27216
27225
  for (const dir of dirs) {
@@ -27276,7 +27285,7 @@ Failed to update skill.`));
27276
27285
  });
27277
27286
  return cmd;
27278
27287
  }
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;
27288
+ 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
27289
  var init_skill = __esm(() => {
27281
27290
  init_commander();
27282
27291
  init_config();
@@ -27288,27 +27297,20 @@ var init_skill = __esm(() => {
27288
27297
  "cursor",
27289
27298
  "gemini-cli",
27290
27299
  "codex",
27291
- "windsurf",
27292
- "zed",
27293
- "cline",
27294
27300
  "github-copilot",
27295
- "opencode",
27296
- "antigravity"
27301
+ "opencode"
27297
27302
  ];
27298
27303
  SKILL_AGENT_BY_PROVIDER = {
27299
27304
  claude: "claude-code",
27300
27305
  cursor: "cursor",
27301
- vscode: "github-copilot",
27302
27306
  gemini: "gemini-cli",
27303
27307
  codex: "codex",
27304
- windsurf: "windsurf",
27305
- zed: "zed",
27306
- cline: "cline",
27307
- "cline-cli": "cline",
27308
27308
  copilot: "github-copilot",
27309
- opencode: "opencode",
27310
- antigravity: "antigravity"
27309
+ opencode: "opencode"
27311
27310
  };
27311
+ LEGACY_LINKED_SKILLS_DIRS = [
27312
+ () => join24(homedir9(), ".codeium", "windsurf", "skills")
27313
+ ];
27312
27314
  });
27313
27315
 
27314
27316
  // src/commands/sources.ts
@@ -28138,24 +28140,6 @@ var init_base = __esm(() => {
28138
28140
  init_shape();
28139
28141
  });
28140
28142
 
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
28143
  // src/mcp/providers/claude.ts
28160
28144
  import { join as join26 } from "node:path";
28161
28145
  var ClaudeProvider = () => ({
@@ -28179,111 +28163,16 @@ var init_claude = __esm(() => {
28179
28163
  init_base();
28180
28164
  });
28181
28165
 
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
28166
  // src/mcp/providers/codex.ts
28278
28167
  import { existsSync as existsSync22, readFileSync as readFileSync30 } from "node:fs";
28279
- import { dirname as dirname9, join as join30 } from "node:path";
28168
+ import { dirname as dirname9, join as join27 } from "node:path";
28280
28169
  function codexHome4() {
28281
28170
  return process.env.CODEX_HOME || expandHome("~/.codex");
28282
28171
  }
28283
28172
  function getConfigPath2(global) {
28284
28173
  if (global)
28285
- return join30(codexHome4(), "config.toml");
28286
- return join30(process.cwd(), ".codex", "config.toml");
28174
+ return join27(codexHome4(), "config.toml");
28175
+ return join27(process.cwd(), ".codex", "config.toml");
28287
28176
  }
28288
28177
  function readTOML(path) {
28289
28178
  if (!existsSync22(path))
@@ -28483,14 +28372,14 @@ function projectConfigPaths() {
28483
28372
  const chain = [];
28484
28373
  for (let dir = cwd;; ) {
28485
28374
  chain.push(dir);
28486
- if (existsSync22(join30(dir, ".git")))
28375
+ if (existsSync22(join27(dir, ".git")))
28487
28376
  break;
28488
28377
  const parent = dirname9(dir);
28489
28378
  if (parent === dir)
28490
- return [join30(cwd, ".codex", "config.toml")];
28379
+ return [join27(cwd, ".codex", "config.toml")];
28491
28380
  dir = parent;
28492
28381
  }
28493
- return chain.reverse().map((dir) => join30(dir, ".codex", "config.toml"));
28382
+ return chain.reverse().map((dir) => join27(dir, ".codex", "config.toml"));
28494
28383
  }
28495
28384
  function pruneLegacyRemoteEntry(path) {
28496
28385
  if (!existsSync22(path))
@@ -28507,12 +28396,12 @@ var FORWARDED_ENV, DOSU_TABLE = "mcp_servers.dosu", REMOTE_HTTP_KEY, CodexProvid
28507
28396
  priority: () => 8,
28508
28397
  detectPaths: () => ["~/.codex"],
28509
28398
  isInstalled: codexInstalled,
28510
- globalConfigPath: () => join30(codexHome4(), "config.toml"),
28399
+ globalConfigPath: () => join27(codexHome4(), "config.toml"),
28511
28400
  isConfigured: () => {
28512
- const content = readTOML(join30(codexHome4(), "config.toml"));
28401
+ const content = readTOML(join27(codexHome4(), "config.toml"));
28513
28402
  return content.includes("[mcp_servers.dosu]");
28514
28403
  },
28515
- isCurrent: (cfg) => entryHasShape(codexServer(cfg, true), readDosuEntry(readTOML(join30(codexHome4(), "config.toml")))),
28404
+ isCurrent: (cfg) => entryHasShape(codexServer(cfg, true), readDosuEntry(readTOML(join27(codexHome4(), "config.toml")))),
28516
28405
  install(cfg, global) {
28517
28406
  if (cfg.mode !== MODE_OSS && !cfg.active_account?.target?.deployment_id)
28518
28407
  throw new Error("deployment ID is required");
@@ -28545,7 +28434,7 @@ var init_codex3 = __esm(() => {
28545
28434
  });
28546
28435
 
28547
28436
  // src/mcp/providers/copilot.ts
28548
- import { join as join31 } from "node:path";
28437
+ import { join as join28 } from "node:path";
28549
28438
  function globalServer(url, apiKey, proxy) {
28550
28439
  if (proxy)
28551
28440
  return { type: "local", ...stdioServer(proxy), tools: ["*"] };
@@ -28553,7 +28442,7 @@ function globalServer(url, apiKey, proxy) {
28553
28442
  }
28554
28443
  function globalPath() {
28555
28444
  if (process.env.XDG_CONFIG_HOME) {
28556
- return join31(process.env.XDG_CONFIG_HOME, "mcp-config.json");
28445
+ return join28(process.env.XDG_CONFIG_HOME, "mcp-config.json");
28557
28446
  }
28558
28447
  return expandHome("~/.copilot/mcp-config.json");
28559
28448
  }
@@ -28574,7 +28463,7 @@ var CopilotProvider = () => ({
28574
28463
  if (global) {
28575
28464
  installJSONServer(globalPath(), "mcpServers", globalServer(url, cfg.active_account?.target?.api_key, proxy));
28576
28465
  } else {
28577
- const configPath = join31(process.cwd(), ".vscode", "mcp.json");
28466
+ const configPath = join28(process.cwd(), ".vscode", "mcp.json");
28578
28467
  const server = proxy ? { type: "stdio", ...stdioServer(proxy) } : { type: "http", url, headers };
28579
28468
  installJSONServer(configPath, "servers", server);
28580
28469
  }
@@ -28583,7 +28472,7 @@ var CopilotProvider = () => ({
28583
28472
  if (global) {
28584
28473
  removeJSONServer(globalPath(), "mcpServers");
28585
28474
  } else {
28586
- const configPath = join31(process.cwd(), ".vscode", "mcp.json");
28475
+ const configPath = join28(process.cwd(), ".vscode", "mcp.json");
28587
28476
  removeJSONServer(configPath, "servers");
28588
28477
  }
28589
28478
  }
@@ -28596,7 +28485,7 @@ var init_copilot = __esm(() => {
28596
28485
  });
28597
28486
 
28598
28487
  // src/mcp/providers/cursor.ts
28599
- import { join as join32 } from "node:path";
28488
+ import { join as join29 } from "node:path";
28600
28489
  var CursorProvider = () => createJSONProvider({
28601
28490
  providerName: "Cursor",
28602
28491
  providerID: "cursor",
@@ -28609,14 +28498,14 @@ var CursorProvider = () => createJSONProvider({
28609
28498
  url,
28610
28499
  headers
28611
28500
  }),
28612
- localConfigPath: (cwd) => join32(cwd, ".cursor", "mcp.json")
28501
+ localConfigPath: (cwd) => join29(cwd, ".cursor", "mcp.json")
28613
28502
  });
28614
28503
  var init_cursor2 = __esm(() => {
28615
28504
  init_base();
28616
28505
  });
28617
28506
 
28618
28507
  // src/mcp/providers/factory.ts
28619
- import { join as join33 } from "node:path";
28508
+ import { join as join30 } from "node:path";
28620
28509
  var FactoryProvider = () => createJSONProvider({
28621
28510
  providerName: "Factory",
28622
28511
  providerID: "factory",
@@ -28626,7 +28515,7 @@ var FactoryProvider = () => createJSONProvider({
28626
28515
  globalPath: "~/.factory/mcp.json",
28627
28516
  topKey: "mcpServers",
28628
28517
  buildStdioServer: (proxy) => ({ type: "stdio", ...stdioServer(proxy) }),
28629
- localConfigPath: (cwd) => join33(cwd, ".factory", "mcp.json")
28518
+ localConfigPath: (cwd) => join30(cwd, ".factory", "mcp.json")
28630
28519
  });
28631
28520
  var init_factory = __esm(() => {
28632
28521
  init_proxy_entry();
@@ -28634,7 +28523,7 @@ var init_factory = __esm(() => {
28634
28523
  });
28635
28524
 
28636
28525
  // src/mcp/providers/gemini.ts
28637
- import { join as join34 } from "node:path";
28526
+ import { join as join31 } from "node:path";
28638
28527
  var GeminiProvider = () => createJSONProvider({
28639
28528
  providerName: "Gemini CLI",
28640
28529
  providerID: "gemini",
@@ -28643,7 +28532,7 @@ var GeminiProvider = () => createJSONProvider({
28643
28532
  paths: ["~/.gemini"],
28644
28533
  globalPath: "~/.gemini/settings.json",
28645
28534
  topKey: "mcpServers",
28646
- localConfigPath: (cwd) => join34(cwd, ".gemini", "settings.json")
28535
+ localConfigPath: (cwd) => join31(cwd, ".gemini", "settings.json")
28647
28536
  });
28648
28537
  var init_gemini = __esm(() => {
28649
28538
  init_base();
@@ -28688,53 +28577,8 @@ var init_manual = __esm(() => {
28688
28577
  init_config_helpers();
28689
28578
  });
28690
28579
 
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
28580
  // src/mcp/providers/opencode.ts
28737
- import { join as join36 } from "node:path";
28581
+ import { join as join32 } from "node:path";
28738
28582
  var jsonProvider = () => createJSONProvider({
28739
28583
  providerName: "OpenCode",
28740
28584
  providerID: "opencode",
@@ -28755,7 +28599,7 @@ var jsonProvider = () => createJSONProvider({
28755
28599
  enabled: true,
28756
28600
  headers
28757
28601
  }),
28758
- localConfigPath: (cwd) => join36(cwd, "opencode.json")
28602
+ localConfigPath: (cwd) => join32(cwd, "opencode.json")
28759
28603
  }), OpenCodeProvider = () => {
28760
28604
  const provider = jsonProvider();
28761
28605
  return { ...provider, isInstalled: () => provider.isInstalled() || isOnPath("opencode") };
@@ -28789,133 +28633,15 @@ var init_pi4 = __esm(() => {
28789
28633
  init_pi3();
28790
28634
  });
28791
28635
 
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
28636
  // src/mcp/providers.ts
28903
28637
  function allProviders() {
28904
28638
  return [
28905
28639
  ClaudeProvider(),
28906
- ClaudeDesktopProvider(),
28907
28640
  CursorProvider(),
28908
- VSCodeProvider(),
28909
28641
  GeminiProvider(),
28910
28642
  CodexProvider(),
28911
- WindsurfProvider(),
28912
- ZedProvider(),
28913
- ClineProvider(),
28914
- ClineCliProvider(),
28915
28643
  CopilotProvider(),
28916
28644
  OpenCodeProvider(),
28917
- AntigravityProvider(),
28918
- MCPorterProvider(),
28919
28645
  FactoryProvider(),
28920
28646
  PiProvider(),
28921
28647
  ManualProvider()
@@ -28932,23 +28658,15 @@ function getProvider(toolID) {
28932
28658
  return provider;
28933
28659
  }
28934
28660
  var init_providers = __esm(() => {
28935
- init_antigravity();
28936
28661
  init_claude();
28937
- init_claude_desktop();
28938
- init_cline();
28939
- init_cline_cli();
28940
28662
  init_codex3();
28941
28663
  init_copilot();
28942
28664
  init_cursor2();
28943
28665
  init_factory();
28944
28666
  init_gemini();
28945
28667
  init_manual();
28946
- init_mcporter();
28947
28668
  init_opencode4();
28948
28669
  init_pi4();
28949
- init_vscode();
28950
- init_windsurf();
28951
- init_zed();
28952
28670
  });
28953
28671
 
28954
28672
  // src/mcp/refresh.ts
@@ -28997,22 +28715,22 @@ var init_refresh = __esm(() => {
28997
28715
  import { spawn as spawn2 } from "node:child_process";
28998
28716
  import {
28999
28717
  closeSync as closeSync8,
29000
- existsSync as existsSync24,
28718
+ existsSync as existsSync23,
29001
28719
  mkdirSync as mkdirSync14,
29002
28720
  openSync as openSync8,
29003
28721
  readFileSync as readFileSync31,
29004
- rmSync as rmSync6,
28722
+ rmSync as rmSync5,
29005
28723
  statSync as statSync11,
29006
28724
  writeFileSync as writeFileSync15,
29007
28725
  writeSync
29008
28726
  } from "node:fs";
29009
- import { homedir as homedir12 } from "node:os";
29010
- import { join as join40 } from "node:path";
28727
+ import { homedir as homedir10 } from "node:os";
28728
+ import { join as join33 } from "node:path";
29011
28729
  function statePath() {
29012
- return join40(getConfigDir(), STATE_FILENAME2);
28730
+ return join33(getConfigDir(), STATE_FILENAME2);
29013
28731
  }
29014
28732
  function lockPath2() {
29015
- return join40(getConfigDir(), LOCK_FILENAME2);
28733
+ return join33(getConfigDir(), LOCK_FILENAME2);
29016
28734
  }
29017
28735
  function isValidVersion(value) {
29018
28736
  return typeof value === "string" && VERSION_PATTERN.test(value);
@@ -29038,7 +28756,7 @@ function readState() {
29038
28756
  function writeState(state) {
29039
28757
  try {
29040
28758
  const dir = getConfigDir();
29041
- if (!existsSync24(dir))
28759
+ if (!existsSync23(dir))
29042
28760
  mkdirSync14(dir, { recursive: true, mode: 448 });
29043
28761
  writeFileSync15(statePath(), `${JSON.stringify(state, null, 2)}
29044
28762
  `, { mode: 384 });
@@ -29095,7 +28813,7 @@ function claimLock(version, now) {
29095
28813
  try {
29096
28814
  mkdirSync14(getConfigDir(), { recursive: true, mode: 448 });
29097
28815
  if (!lockIsFresh(now))
29098
- rmSync6(lockPath2(), { force: true });
28816
+ rmSync5(lockPath2(), { force: true });
29099
28817
  const fd = openSync8(lockPath2(), "wx", 384);
29100
28818
  try {
29101
28819
  writeSync(fd, version);
@@ -29109,7 +28827,7 @@ function claimLock(version, now) {
29109
28827
  }
29110
28828
  function releaseLock() {
29111
28829
  try {
29112
- rmSync6(lockPath2(), { force: true });
28830
+ rmSync5(lockPath2(), { force: true });
29113
28831
  } catch {}
29114
28832
  }
29115
28833
  function readLockVersion() {
@@ -29141,7 +28859,7 @@ function startAutoUpdate(version, options = {}) {
29141
28859
  return claim === "held" ? "in_progress" : "unavailable";
29142
28860
  try {
29143
28861
  const child = spawn2(invocation.command, invocation.args, {
29144
- cwd: homedir12(),
28862
+ cwd: homedir10(),
29145
28863
  detached: true,
29146
28864
  stdio: "ignore",
29147
28865
  windowsHide: true,
@@ -29188,15 +28906,15 @@ var init_auto_update = __esm(() => {
29188
28906
  });
29189
28907
 
29190
28908
  // 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";
28909
+ import { existsSync as existsSync24, mkdirSync as mkdirSync15, readFileSync as readFileSync32, writeFileSync as writeFileSync16 } from "node:fs";
28910
+ import { join as join34 } from "node:path";
29193
28911
  function getCachePath2() {
29194
- return join41(getConfigDir(), CACHE_FILENAME3);
28912
+ return join34(getConfigDir(), CACHE_FILENAME3);
29195
28913
  }
29196
28914
  function readMcpRefreshCache() {
29197
28915
  try {
29198
28916
  const path = getCachePath2();
29199
- if (!existsSync25(path))
28917
+ if (!existsSync24(path))
29200
28918
  return null;
29201
28919
  const data = JSON.parse(readFileSync32(path, "utf-8"));
29202
28920
  if (typeof data?.version === "string")
@@ -29209,7 +28927,7 @@ function readMcpRefreshCache() {
29209
28927
  function writeMcpRefreshCache(cache) {
29210
28928
  try {
29211
28929
  const dir = getConfigDir();
29212
- if (!existsSync25(dir)) {
28930
+ if (!existsSync24(dir)) {
29213
28931
  mkdirSync15(dir, { recursive: true, mode: 448 });
29214
28932
  }
29215
28933
  writeFileSync16(getCachePath2(), JSON.stringify(cache), { mode: 384 });
@@ -29352,11 +29070,11 @@ function createLogFollower(path, emit) {
29352
29070
  var init_follow = () => {};
29353
29071
 
29354
29072
  // 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";
29073
+ import { existsSync as existsSync25, mkdirSync as mkdirSync16, readFileSync as readFileSync33, renameSync as renameSync6, statSync as statSync13, writeFileSync as writeFileSync17 } from "node:fs";
29074
+ import { homedir as homedir11 } from "node:os";
29075
+ import { join as join35 } from "node:path";
29358
29076
  function cachePath2(configDir) {
29359
- return join42(configDir, CACHE_FILENAME4);
29077
+ return join35(configDir, CACHE_FILENAME4);
29360
29078
  }
29361
29079
  function loadCacheFile2(configDir) {
29362
29080
  try {
@@ -29370,7 +29088,7 @@ function loadCacheFile2(configDir) {
29370
29088
  }
29371
29089
  function saveCacheFile2(configDir, entries) {
29372
29090
  try {
29373
- if (!existsSync26(configDir))
29091
+ if (!existsSync25(configDir))
29374
29092
  mkdirSync16(configDir, { recursive: true, mode: 448 });
29375
29093
  const path = cachePath2(configDir);
29376
29094
  const tmp = `${path}.${process.pid}.tmp`;
@@ -29408,15 +29126,15 @@ function claudeSummaryFromHead(text) {
29408
29126
  }
29409
29127
  return null;
29410
29128
  }
29411
- function reconstructSession(harness, id, slug, home = homedir13(), exists = existsSync26) {
29129
+ function reconstructSession(harness, id, slug, home = homedir11(), exists = existsSync25) {
29412
29130
  if (!slug)
29413
29131
  return null;
29414
29132
  const candidates = [];
29415
29133
  if (harness === "claude") {
29416
- candidates.push(join42(home, ".claude", "projects", slug, `${id}.jsonl`));
29134
+ candidates.push(join35(home, ".claude", "projects", slug, `${id}.jsonl`));
29417
29135
  } 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`));
29136
+ const project = join35(home, ".cursor", "projects", slug);
29137
+ candidates.push(join35(project, "agent-transcripts", id, `${id}.jsonl`), join35(project, "agent-transcripts", `${id}.jsonl`));
29420
29138
  } else {
29421
29139
  return null;
29422
29140
  }
@@ -29508,7 +29226,7 @@ var init_alt_screen = __esm(() => {
29508
29226
  });
29509
29227
 
29510
29228
  // src/tui/activity-view.ts
29511
- import { existsSync as existsSync27, readFileSync as readFileSync34 } from "node:fs";
29229
+ import { existsSync as existsSync26, readFileSync as readFileSync34 } from "node:fs";
29512
29230
  import { basename as basename11 } from "node:path";
29513
29231
  function reduceActivityViewKey(key) {
29514
29232
  if (key === "q" || key === ESC7 || key === CTRL_C4)
@@ -29795,7 +29513,7 @@ function createRowNamer() {
29795
29513
  names.titles[key] = t;
29796
29514
  };
29797
29515
  for (const s of [...backlog.queued, ...backlog.open]) {
29798
- if (!existsSync27(s.path))
29516
+ if (!existsSync26(s.path))
29799
29517
  continue;
29800
29518
  const key = `${s.harness}/${s.id}`;
29801
29519
  const dir = dirs.resolve(s);
@@ -30052,14 +29770,14 @@ var init_activity_view = __esm(() => {
30052
29770
  });
30053
29771
 
30054
29772
  // 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";
29773
+ import { existsSync as existsSync27, mkdirSync as mkdirSync17, readFileSync as readFileSync35, unlinkSync as unlinkSync7, writeFileSync as writeFileSync18 } from "node:fs";
29774
+ import { homedir as homedir12 } from "node:os";
29775
+ import { dirname as dirname10, join as join36 } from "node:path";
30058
29776
  function claudeConfigDir4() {
30059
- return process.env.CLAUDE_CONFIG_DIR || join43(homedir14(), ".claude");
29777
+ return process.env.CLAUDE_CONFIG_DIR || join36(homedir12(), ".claude");
30060
29778
  }
30061
29779
  function codexHome5() {
30062
- return process.env.CODEX_HOME || join43(homedir14(), ".codex");
29780
+ return process.env.CODEX_HOME || join36(homedir12(), ".codex");
30063
29781
  }
30064
29782
  function isRuleAgent(agent) {
30065
29783
  return Object.hasOwn(RULE_TARGETS, agent);
@@ -30088,7 +29806,7 @@ function ensureParent(path) {
30088
29806
  mkdirSync17(dirname10(path), { recursive: true });
30089
29807
  }
30090
29808
  function writeIfChanged2(path, content) {
30091
- if (!existsSync28(path)) {
29809
+ if (!existsSync27(path)) {
30092
29810
  ensureParent(path);
30093
29811
  writeFileSync18(path, content, "utf-8");
30094
29812
  return "created";
@@ -30121,7 +29839,7 @@ function buildSection(content, lineEnding = `
30121
29839
  return `${DOSU_RULE_SECTION_START}${lineEnding}${body}${lineEnding}${DOSU_RULE_SECTION_END}`;
30122
29840
  }
30123
29841
  function upsertSection(path, content) {
30124
- if (!existsSync28(path)) {
29842
+ if (!existsSync27(path)) {
30125
29843
  const section = buildSection(content);
30126
29844
  ensureParent(path);
30127
29845
  writeFileSync18(path, `${section}
@@ -30158,7 +29876,7 @@ function removeRuleForAgent(agent) {
30158
29876
  return null;
30159
29877
  const target = RULE_TARGETS[agent];
30160
29878
  const path = target.path();
30161
- if (!existsSync28(path))
29879
+ if (!existsSync27(path))
30162
29880
  return { agent, path, action: "not_found" };
30163
29881
  if (target.kind === "file") {
30164
29882
  unlinkSync7(path);
@@ -30201,36 +29919,32 @@ var init_installer = __esm(() => {
30201
29919
  RULE_TARGETS = {
30202
29920
  claude: {
30203
29921
  kind: "file",
30204
- path: () => join43(claudeConfigDir4(), "rules", "dosu.md")
29922
+ path: () => join36(claudeConfigDir4(), "rules", "dosu.md")
30205
29923
  },
30206
29924
  cursor: {
30207
29925
  kind: "file",
30208
- path: () => join43(homedir14(), ".cursor", "rules", "dosu.mdc"),
29926
+ path: () => join36(homedir12(), ".cursor", "rules", "dosu.mdc"),
30209
29927
  cursorFrontmatter: true
30210
29928
  },
30211
29929
  codex: {
30212
29930
  kind: "section",
30213
- path: () => join43(codexHome5(), "AGENTS.md")
29931
+ path: () => join36(codexHome5(), "AGENTS.md")
30214
29932
  },
30215
29933
  opencode: {
30216
29934
  kind: "section",
30217
- path: () => join43(homedir14(), ".config", "opencode", "AGENTS.md")
29935
+ path: () => join36(homedir12(), ".config", "opencode", "AGENTS.md")
30218
29936
  },
30219
29937
  gemini: {
30220
29938
  kind: "section",
30221
- path: () => join43(homedir14(), ".gemini", "GEMINI.md")
30222
- },
30223
- antigravity: {
30224
- kind: "section",
30225
- path: () => join43(homedir14(), ".gemini", "GEMINI.md")
29939
+ path: () => join36(homedir12(), ".gemini", "GEMINI.md")
30226
29940
  }
30227
29941
  };
30228
29942
  });
30229
29943
 
30230
29944
  // src/setup/agents-md-step.ts
30231
29945
  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";
29946
+ import { existsSync as existsSync28, readFileSync as readFileSync36, writeFileSync as writeFileSync19 } from "node:fs";
29947
+ import { join as join37 } from "node:path";
30234
29948
  function inGitWorkTree(cwd = process.cwd()) {
30235
29949
  try {
30236
29950
  const stdout = execSync2("git rev-parse --is-inside-work-tree", {
@@ -30244,8 +29958,8 @@ function inGitWorkTree(cwd = process.cwd()) {
30244
29958
  }
30245
29959
  function dosuAgentsSectionState(cwd = process.cwd()) {
30246
29960
  try {
30247
- const path = join44(cwd, "AGENTS.md");
30248
- if (!existsSync29(path))
29961
+ const path = join37(cwd, "AGENTS.md");
29962
+ if (!existsSync28(path))
30249
29963
  return "missing";
30250
29964
  const content = readFileSync36(path, "utf-8");
30251
29965
  const startMatch = content.match(SECTION_START_RE);
@@ -30282,8 +29996,8 @@ function findSection2(content) {
30282
29996
  return { start, end };
30283
29997
  }
30284
29998
  function upsertDosuAgentsSection(cwd = process.cwd(), content = FALLBACK_DOSU_RULE) {
30285
- const path = join44(cwd, "AGENTS.md");
30286
- if (!existsSync29(path)) {
29999
+ const path = join37(cwd, "AGENTS.md");
30000
+ if (!existsSync28(path)) {
30287
30001
  const section = buildDosuAgentsSection(content);
30288
30002
  writeFileSync19(path, `${section}
30289
30003
  `);
@@ -32032,7 +31746,7 @@ var init_flow2 = __esm(() => {
32032
31746
  // src/commands/upgrade.ts
32033
31747
  import { spawnSync as spawnSync2 } from "node:child_process";
32034
31748
  import { realpathSync as realpathSync4 } from "node:fs";
32035
- import { homedir as homedir15 } from "node:os";
31749
+ import { homedir as homedir13 } from "node:os";
32036
31750
  import { posix, win32 } from "node:path";
32037
31751
  function installSpec(version = VERSION) {
32038
31752
  return `${PACKAGE_NAME}@${releaseTag(version)}`;
@@ -32089,7 +31803,7 @@ function packageRoots(manager, platform, comSpec, env, cwd) {
32089
31803
  manager === "npm" ? path.join(lines[0], "@dosu", "cli") : path.join(lines[0], "node_modules", "@dosu", "cli")
32090
31804
  ];
32091
31805
  }
32092
- function owningPackageManager(entrypoint, platform, comSpec, env = process.env, cwd = homedir15()) {
31806
+ function owningPackageManager(entrypoint, platform, comSpec, env = process.env, cwd = homedir13()) {
32093
31807
  const path = platform === "win32" ? win32 : posix;
32094
31808
  if (!entrypoint || !path.isAbsolute(entrypoint))
32095
31809
  return null;
@@ -32147,7 +31861,7 @@ function runUpgrade(channel = INSTALL_CHANNEL, options = {}) {
32147
31861
  }
32148
31862
  const platform = options.platform ?? process.platform;
32149
31863
  const env = options.env ?? process.env;
32150
- const cwd = options.cwd ?? homedir15();
31864
+ const cwd = options.cwd ?? homedir13();
32151
31865
  let manager = null;
32152
31866
  if (channel === "npm") {
32153
31867
  if (isNpxInvocation(channel, env)) {
@@ -32214,7 +31928,7 @@ function finishWithNewBinary(channel, options) {
32214
31928
  return;
32215
31929
  }
32216
31930
  const result = spawnSync2(invocation.command, invocation.args, {
32217
- cwd: options.cwd ?? homedir15(),
31931
+ cwd: options.cwd ?? homedir13(),
32218
31932
  shell: false,
32219
31933
  stdio: "inherit"
32220
31934
  });
@@ -32332,14 +32046,14 @@ var init_upgrade = __esm(() => {
32332
32046
  });
32333
32047
 
32334
32048
  // 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";
32049
+ import { existsSync as existsSync29, mkdirSync as mkdirSync18, writeFileSync as writeFileSync20 } from "node:fs";
32050
+ import { join as join38 } from "node:path";
32337
32051
  function markerPath() {
32338
- return join45(getConfigDir(), MARKER_FILENAME);
32052
+ return join38(getConfigDir(), MARKER_FILENAME);
32339
32053
  }
32340
32054
  function writeMarker() {
32341
32055
  const dir = getConfigDir();
32342
- if (!existsSync30(dir))
32056
+ if (!existsSync29(dir))
32343
32057
  mkdirSync18(dir, { recursive: true, mode: 448 });
32344
32058
  writeFileSync20(markerPath(), JSON.stringify({ done: true }), { mode: 384 });
32345
32059
  }
@@ -32352,7 +32066,7 @@ ${import_picocolors40.default.green(`✓ Dosu: added the incognito command to ${
32352
32066
  function checkForIncognitoBackfill(options = {}) {
32353
32067
  const notify = options.notify ?? true;
32354
32068
  try {
32355
- if (existsSync30(markerPath()))
32069
+ if (existsSync29(markerPath()))
32356
32070
  return;
32357
32071
  const added = [];
32358
32072
  let failed = false;
@@ -32389,8 +32103,8 @@ var init_incognito_backfill_check = __esm(() => {
32389
32103
  });
32390
32104
 
32391
32105
  // 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";
32106
+ import { existsSync as existsSync30, mkdirSync as mkdirSync19, readFileSync as readFileSync37, writeFileSync as writeFileSync21 } from "node:fs";
32107
+ import { join as join39 } from "node:path";
32394
32108
  function isValidVersion2(value) {
32395
32109
  return typeof value === "string" && SEMVER_PATTERN.test(value);
32396
32110
  }
@@ -32443,12 +32157,12 @@ function isNewerRelease(candidate, current) {
32443
32157
  return false;
32444
32158
  }
32445
32159
  function getCachePath3() {
32446
- return join46(getConfigDir(), CACHE_FILENAME5);
32160
+ return join39(getConfigDir(), CACHE_FILENAME5);
32447
32161
  }
32448
32162
  function readCache() {
32449
32163
  try {
32450
32164
  const path = getCachePath3();
32451
- if (!existsSync31(path))
32165
+ if (!existsSync30(path))
32452
32166
  return null;
32453
32167
  const data = JSON.parse(readFileSync37(path, "utf-8"));
32454
32168
  if (typeof data.lastCheck === "number" && isValidVersion2(data.latestVersion)) {
@@ -32462,7 +32176,7 @@ function readCache() {
32462
32176
  function writeCache(cache) {
32463
32177
  try {
32464
32178
  const dir = getConfigDir();
32465
- if (!existsSync31(dir)) {
32179
+ if (!existsSync30(dir)) {
32466
32180
  mkdirSync19(dir, { recursive: true, mode: 448 });
32467
32181
  }
32468
32182
  writeFileSync21(getCachePath3(), JSON.stringify(cache), { mode: 384 });
@@ -34977,4 +34691,4 @@ main().catch((err) => {
34977
34691
  process.exit(1);
34978
34692
  });
34979
34693
 
34980
- //# debugId=b28c8070-bfe4-35bd-6475-6e2164756e21
34694
+ //# debugId=dabff5ff-72af-9bac-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.4",
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",