@dosu/cli 0.53.0-beta.3 → 0.53.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.
- package/bin/dosu.js +109 -157
- package/package.json +1 -1
package/bin/dosu.js
CHANGED
|
@@ -5006,7 +5006,7 @@ function isNpxInvocation(channel = INSTALL_CHANNEL, env = process.env) {
|
|
|
5006
5006
|
function getVersionString() {
|
|
5007
5007
|
return `v${VERSION}`;
|
|
5008
5008
|
}
|
|
5009
|
-
var VERSION = "0.53.0-beta.
|
|
5009
|
+
var VERSION = "0.53.0-beta.4", INSTALL_CHANNEL = "npm";
|
|
5010
5010
|
|
|
5011
5011
|
// src/debug/logger.ts
|
|
5012
5012
|
import {
|
|
@@ -9420,20 +9420,12 @@ Read each session with read_session, decide what (if anything) is durable per yo
|
|
|
9420
9420
|
}
|
|
9421
9421
|
|
|
9422
9422
|
// src/miner/prompt-core.ts
|
|
9423
|
-
function extractMinerCore(markdown) {
|
|
9424
|
-
const start = markdown.indexOf(MINER_CORE_START);
|
|
9425
|
-
const end = markdown.indexOf(MINER_CORE_END);
|
|
9426
|
-
if (start === -1 || end === -1 || end <= start) {
|
|
9427
|
-
throw new Error(`miner-core markers not found (expected ${MINER_CORE_START} … ${MINER_CORE_END})`);
|
|
9428
|
-
}
|
|
9429
|
-
return markdown.slice(start + MINER_CORE_START.length, end).trim();
|
|
9430
|
-
}
|
|
9431
|
-
var MINER_CORE_START = "<!-- dosu:miner-core:start -->", MINER_CORE_END = "<!-- dosu:miner-core:end -->";
|
|
9432
|
-
|
|
9433
|
-
// src/miner/prompt-core.generated.ts
|
|
9434
9423
|
var MINER_CORE_RULES = `Rules — non-negotiable:
|
|
9435
|
-
1. Before writing anything, call read_knowledge with the candidate topic
|
|
9436
|
-
|
|
9424
|
+
1. Before writing anything, call read_knowledge with the candidate topic. If the same fact is
|
|
9425
|
+
already recorded, skip it — never write a duplicate or near-duplicate. If the topic exists but
|
|
9426
|
+
the session shows it has changed or been superseded, do write: a note stating the current state
|
|
9427
|
+
and what changed. Only restatements of already-recorded facts are duplicates; an update to an
|
|
9428
|
+
existing topic is not.
|
|
9437
9429
|
2. Write ONLY durable, non-obvious knowledge:
|
|
9438
9430
|
- decisions and their rationale (chose A over B because ...)
|
|
9439
9431
|
- non-obvious constraints (API, schema, RLS, feature flags, deploy quirks)
|
|
@@ -9461,43 +9453,6 @@ verified, omit both.
|
|
|
9461
9453
|
long verbatim transcript spans. Summarize in your own words.
|
|
9462
9454
|
9. A trivial session with no real user query is normal: skip it silently.`;
|
|
9463
9455
|
|
|
9464
|
-
// src/miner/prompt-source.ts
|
|
9465
|
-
import { readFileSync as readFileSync15 } from "node:fs";
|
|
9466
|
-
import { homedir as homedir5 } from "node:os";
|
|
9467
|
-
import { join as join14 } from "node:path";
|
|
9468
|
-
function candidateSkillPromptPaths(env = process.env) {
|
|
9469
|
-
const paths = [];
|
|
9470
|
-
if (env.DOSU_SKILL_REPO?.trim()) {
|
|
9471
|
-
paths.push(join14(env.DOSU_SKILL_REPO.trim(), "skills", SKILL_PROMPT_RELPATH));
|
|
9472
|
-
}
|
|
9473
|
-
paths.push(join14(homedir5(), ".agents", "skills", SKILL_PROMPT_RELPATH));
|
|
9474
|
-
const claudeConfigDir = env.CLAUDE_CONFIG_DIR?.trim() || join14(homedir5(), ".claude");
|
|
9475
|
-
paths.push(join14(claudeConfigDir, "skills", SKILL_PROMPT_RELPATH));
|
|
9476
|
-
paths.push(join14(homedir5(), ".codeium", "windsurf", "skills", SKILL_PROMPT_RELPATH));
|
|
9477
|
-
return paths;
|
|
9478
|
-
}
|
|
9479
|
-
function resolveMinerCoreRules(env = process.env) {
|
|
9480
|
-
for (const path3 of candidateSkillPromptPaths(env)) {
|
|
9481
|
-
let markdown;
|
|
9482
|
-
try {
|
|
9483
|
-
markdown = readFileSync15(path3, "utf-8");
|
|
9484
|
-
} catch {
|
|
9485
|
-
continue;
|
|
9486
|
-
}
|
|
9487
|
-
try {
|
|
9488
|
-
return { rules: extractMinerCore(markdown), source: path3 };
|
|
9489
|
-
} catch (err) {
|
|
9490
|
-
logger.debug("miner", `skipping unusable skill rules at ${path3}: ${err}`);
|
|
9491
|
-
}
|
|
9492
|
-
}
|
|
9493
|
-
return { rules: MINER_CORE_RULES, source: "bundled" };
|
|
9494
|
-
}
|
|
9495
|
-
var SKILL_PROMPT_RELPATH;
|
|
9496
|
-
var init_prompt_source = __esm(() => {
|
|
9497
|
-
init_logger();
|
|
9498
|
-
SKILL_PROMPT_RELPATH = join14("log-to-dosu-knowledge", "references", "miner-system-prompt.md");
|
|
9499
|
-
});
|
|
9500
|
-
|
|
9501
9456
|
// node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs
|
|
9502
9457
|
var exports_sdk = {};
|
|
9503
9458
|
__export(exports_sdk, {
|
|
@@ -71410,13 +71365,11 @@ async function runMiner(options) {
|
|
|
71410
71365
|
cliVersion: getVersionString(),
|
|
71411
71366
|
deploymentID: options.deploymentID
|
|
71412
71367
|
});
|
|
71413
|
-
const coreRules = resolveMinerCoreRules();
|
|
71414
|
-
logger.debug("miner", `write-knowledge rules source: ${coreRules.source}`);
|
|
71415
71368
|
try {
|
|
71416
71369
|
const run2 = query({
|
|
71417
71370
|
prompt: buildMinerPrompt(options.sessions),
|
|
71418
71371
|
options: {
|
|
71419
|
-
systemPrompt: buildMinerSystemPrompt(
|
|
71372
|
+
systemPrompt: buildMinerSystemPrompt(MINER_CORE_RULES),
|
|
71420
71373
|
env,
|
|
71421
71374
|
abortController: abort,
|
|
71422
71375
|
maxTurns: options.maxTurns ?? DEFAULT_MAX_TURNS,
|
|
@@ -71517,7 +71470,6 @@ var init_runner = __esm(() => {
|
|
|
71517
71470
|
init_conflicts();
|
|
71518
71471
|
init_env();
|
|
71519
71472
|
init_executable();
|
|
71520
|
-
init_prompt_source();
|
|
71521
71473
|
init_tools();
|
|
71522
71474
|
DEFAULT_TIMEOUT_MS2 = 30 * 60 * 1000;
|
|
71523
71475
|
GATEWAY_ERRORS = {
|
|
@@ -71537,17 +71489,17 @@ var init_runner = __esm(() => {
|
|
|
71537
71489
|
});
|
|
71538
71490
|
|
|
71539
71491
|
// src/version/skill-update-check.ts
|
|
71540
|
-
import { existsSync as existsSync17, mkdirSync as mkdirSync9, readFileSync as
|
|
71541
|
-
import { join as
|
|
71492
|
+
import { existsSync as existsSync17, mkdirSync as mkdirSync9, readFileSync as readFileSync17, writeFileSync as writeFileSync10 } from "node:fs";
|
|
71493
|
+
import { join as join19 } from "node:path";
|
|
71542
71494
|
function getCachePath2() {
|
|
71543
|
-
return
|
|
71495
|
+
return join19(getConfigDir(), CACHE_FILENAME3);
|
|
71544
71496
|
}
|
|
71545
71497
|
function readSkillCache() {
|
|
71546
71498
|
try {
|
|
71547
71499
|
const path3 = getCachePath2();
|
|
71548
71500
|
if (!existsSync17(path3))
|
|
71549
71501
|
return null;
|
|
71550
|
-
const data = JSON.parse(
|
|
71502
|
+
const data = JSON.parse(readFileSync17(path3, "utf-8"));
|
|
71551
71503
|
if (typeof data.lastCheck === "number" && typeof data.latestSha === "string" && typeof data.installedSha === "string") {
|
|
71552
71504
|
return data;
|
|
71553
71505
|
}
|
|
@@ -71635,8 +71587,8 @@ var init_skill_update_check = __esm(() => {
|
|
|
71635
71587
|
|
|
71636
71588
|
// src/commands/skill.ts
|
|
71637
71589
|
import { exec as exec2, execSync as execSync2 } from "node:child_process";
|
|
71638
|
-
import { homedir as
|
|
71639
|
-
import { join as
|
|
71590
|
+
import { homedir as homedir6 } from "node:os";
|
|
71591
|
+
import { join as join20 } from "node:path";
|
|
71640
71592
|
function skillAgentIDsForProviders(providerIDs) {
|
|
71641
71593
|
return [
|
|
71642
71594
|
...new Set(providerIDs.map((providerID) => SKILL_AGENT_BY_PROVIDER[providerID]).filter((agent) => Boolean(agent)))
|
|
@@ -71647,17 +71599,17 @@ function skillInstallTargetForProvider(providerID) {
|
|
|
71647
71599
|
if (!agentID)
|
|
71648
71600
|
return null;
|
|
71649
71601
|
if (agentID === "claude-code") {
|
|
71650
|
-
const claudeConfigDir = process.env.CLAUDE_CONFIG_DIR?.trim() ||
|
|
71651
|
-
return { path:
|
|
71602
|
+
const claudeConfigDir = process.env.CLAUDE_CONFIG_DIR?.trim() || join20(homedir6(), ".claude");
|
|
71603
|
+
return { path: join20(claudeConfigDir, "skills", SKILL_NAME), symlink: true };
|
|
71652
71604
|
}
|
|
71653
71605
|
if (agentID === "windsurf") {
|
|
71654
71606
|
return {
|
|
71655
|
-
path:
|
|
71607
|
+
path: join20(homedir6(), ".codeium", "windsurf", "skills", SKILL_NAME),
|
|
71656
71608
|
symlink: true
|
|
71657
71609
|
};
|
|
71658
71610
|
}
|
|
71659
71611
|
return {
|
|
71660
|
-
path:
|
|
71612
|
+
path: join20(homedir6(), ".agents", "skills", SKILL_NAME),
|
|
71661
71613
|
symlink: false
|
|
71662
71614
|
};
|
|
71663
71615
|
}
|
|
@@ -71819,14 +71771,14 @@ import {
|
|
|
71819
71771
|
existsSync as existsSync18,
|
|
71820
71772
|
lstatSync as lstatSync2,
|
|
71821
71773
|
mkdirSync as mkdirSync10,
|
|
71822
|
-
readFileSync as
|
|
71774
|
+
readFileSync as readFileSync18,
|
|
71823
71775
|
renameSync as renameSync5,
|
|
71824
71776
|
unlinkSync as unlinkSync3,
|
|
71825
71777
|
writeFileSync as writeFileSync11
|
|
71826
71778
|
} from "node:fs";
|
|
71827
|
-
import { join as
|
|
71779
|
+
import { join as join21 } from "node:path";
|
|
71828
71780
|
function getTelemetrySettingsPath() {
|
|
71829
|
-
return
|
|
71781
|
+
return join21(getConfigDir(), TELEMETRY_SETTINGS_FILENAME);
|
|
71830
71782
|
}
|
|
71831
71783
|
function loadTelemetrySettings() {
|
|
71832
71784
|
return readTelemetrySettings().settings;
|
|
@@ -71894,7 +71846,7 @@ function readTelemetrySettings() {
|
|
|
71894
71846
|
}
|
|
71895
71847
|
let content;
|
|
71896
71848
|
try {
|
|
71897
|
-
content =
|
|
71849
|
+
content = readFileSync18(path3, "utf-8");
|
|
71898
71850
|
} catch {
|
|
71899
71851
|
return { status: "error", settings: disabledTelemetrySettings() };
|
|
71900
71852
|
}
|
|
@@ -71972,7 +71924,7 @@ var init_settings = __esm(() => {
|
|
|
71972
71924
|
});
|
|
71973
71925
|
|
|
71974
71926
|
// src/telemetry/debug-id.ts
|
|
71975
|
-
var BUNDLE_DEBUG_ID_PLACEHOLDER = "
|
|
71927
|
+
var BUNDLE_DEBUG_ID_PLACEHOLDER = "6c656d2d-4b9b-0be3-6475-6e2164756e21";
|
|
71976
71928
|
|
|
71977
71929
|
// src/telemetry/telemetry.ts
|
|
71978
71930
|
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
@@ -72840,7 +72792,7 @@ var init_antigravity = __esm(() => {
|
|
|
72840
72792
|
});
|
|
72841
72793
|
|
|
72842
72794
|
// src/mcp/providers/claude.ts
|
|
72843
|
-
import { join as
|
|
72795
|
+
import { join as join22 } from "node:path";
|
|
72844
72796
|
var ClaudeProvider = () => createJSONProvider({
|
|
72845
72797
|
providerName: "Claude Code",
|
|
72846
72798
|
providerID: "claude",
|
|
@@ -72849,24 +72801,24 @@ var ClaudeProvider = () => createJSONProvider({
|
|
|
72849
72801
|
paths: ["~/.claude"],
|
|
72850
72802
|
globalPath: "~/.claude.json",
|
|
72851
72803
|
topKey: "mcpServers",
|
|
72852
|
-
localConfigPath: (cwd) =>
|
|
72804
|
+
localConfigPath: (cwd) => join22(cwd, ".mcp.json")
|
|
72853
72805
|
});
|
|
72854
72806
|
var init_claude = __esm(() => {
|
|
72855
72807
|
init_base();
|
|
72856
72808
|
});
|
|
72857
72809
|
|
|
72858
72810
|
// src/mcp/providers/claude-desktop.ts
|
|
72859
|
-
import { join as
|
|
72811
|
+
import { join as join23 } from "node:path";
|
|
72860
72812
|
function configPath() {
|
|
72861
|
-
return
|
|
72813
|
+
return join23(appSupportDir(), "Claude", "claude_desktop_config.json");
|
|
72862
72814
|
}
|
|
72863
72815
|
var ClaudeDesktopProvider = () => ({
|
|
72864
72816
|
name: () => "Claude Desktop",
|
|
72865
72817
|
id: () => "claude-desktop",
|
|
72866
72818
|
supportsLocal: () => false,
|
|
72867
72819
|
priority: () => 2,
|
|
72868
|
-
detectPaths: () => [
|
|
72869
|
-
isInstalled: () => isInstalled([
|
|
72820
|
+
detectPaths: () => [join23(appSupportDir(), "Claude")],
|
|
72821
|
+
isInstalled: () => isInstalled([join23(appSupportDir(), "Claude")]),
|
|
72870
72822
|
globalConfigPath: () => configPath(),
|
|
72871
72823
|
isConfigured: () => isJSONKeyConfigured(configPath(), "mcpServers"),
|
|
72872
72824
|
install(cfg, global2) {
|
|
@@ -72896,14 +72848,14 @@ var init_claude_desktop = __esm(() => {
|
|
|
72896
72848
|
});
|
|
72897
72849
|
|
|
72898
72850
|
// src/mcp/providers/cline.ts
|
|
72899
|
-
import { join as
|
|
72900
|
-
var extensionDir = () =>
|
|
72851
|
+
import { join as join24 } from "node:path";
|
|
72852
|
+
var extensionDir = () => join24(appSupportDir(), "Code", "User", "globalStorage", "saoudrizwan.claude-dev"), ClineProvider = () => createJSONProvider({
|
|
72901
72853
|
providerName: "Cline",
|
|
72902
72854
|
providerID: "cline",
|
|
72903
72855
|
local: false,
|
|
72904
72856
|
priorityValue: 11,
|
|
72905
72857
|
paths: [extensionDir()],
|
|
72906
|
-
globalPath:
|
|
72858
|
+
globalPath: join24(extensionDir(), "settings", "cline_mcp_settings.json"),
|
|
72907
72859
|
topKey: "mcpServers",
|
|
72908
72860
|
buildServer: (cfg) => ({
|
|
72909
72861
|
url: mcpURL(cfg.active_account.target.deployment_id),
|
|
@@ -72919,7 +72871,7 @@ var init_cline = __esm(() => {
|
|
|
72919
72871
|
});
|
|
72920
72872
|
|
|
72921
72873
|
// src/mcp/providers/cline-cli.ts
|
|
72922
|
-
import { join as
|
|
72874
|
+
import { join as join25 } from "node:path";
|
|
72923
72875
|
function clineDir() {
|
|
72924
72876
|
return process.env.CLINE_DIR ?? expandHome("~/.cline");
|
|
72925
72877
|
}
|
|
@@ -72929,7 +72881,7 @@ var ClineCliProvider = () => createJSONProvider({
|
|
|
72929
72881
|
local: false,
|
|
72930
72882
|
priorityValue: 12,
|
|
72931
72883
|
paths: [clineDir()],
|
|
72932
|
-
globalPath:
|
|
72884
|
+
globalPath: join25(clineDir(), "data", "settings", "cline_mcp_settings.json"),
|
|
72933
72885
|
topKey: "mcpServers",
|
|
72934
72886
|
buildServer: (cfg) => ({
|
|
72935
72887
|
url: mcpURL(cfg.active_account.target.deployment_id),
|
|
@@ -72945,20 +72897,20 @@ var init_cline_cli = __esm(() => {
|
|
|
72945
72897
|
});
|
|
72946
72898
|
|
|
72947
72899
|
// src/mcp/providers/codex.ts
|
|
72948
|
-
import { existsSync as existsSync20, readFileSync as
|
|
72949
|
-
import { join as
|
|
72900
|
+
import { existsSync as existsSync20, readFileSync as readFileSync19 } from "node:fs";
|
|
72901
|
+
import { join as join26 } from "node:path";
|
|
72950
72902
|
function codexHome2() {
|
|
72951
72903
|
return process.env.CODEX_HOME ?? expandHome("~/.codex");
|
|
72952
72904
|
}
|
|
72953
72905
|
function getConfigPath2(global2) {
|
|
72954
72906
|
if (global2)
|
|
72955
|
-
return
|
|
72956
|
-
return
|
|
72907
|
+
return join26(codexHome2(), "config.toml");
|
|
72908
|
+
return join26(process.cwd(), ".codex", "config.toml");
|
|
72957
72909
|
}
|
|
72958
72910
|
function readTOML(path3) {
|
|
72959
72911
|
if (!existsSync20(path3))
|
|
72960
72912
|
return "";
|
|
72961
|
-
return
|
|
72913
|
+
return readFileSync19(path3, "utf-8");
|
|
72962
72914
|
}
|
|
72963
72915
|
function writeTOML(path3, content) {
|
|
72964
72916
|
writeSecureFile(path3, content);
|
|
@@ -73021,9 +72973,9 @@ var CodexProvider = () => ({
|
|
|
73021
72973
|
priority: () => 8,
|
|
73022
72974
|
detectPaths: () => ["~/.codex"],
|
|
73023
72975
|
isInstalled: () => isInstalled(["~/.codex"]),
|
|
73024
|
-
globalConfigPath: () =>
|
|
72976
|
+
globalConfigPath: () => join26(codexHome2(), "config.toml"),
|
|
73025
72977
|
isConfigured: () => {
|
|
73026
|
-
const content = readTOML(
|
|
72978
|
+
const content = readTOML(join26(codexHome2(), "config.toml"));
|
|
73027
72979
|
return content.includes("[mcp_servers.dosu]");
|
|
73028
72980
|
},
|
|
73029
72981
|
install(cfg, global2) {
|
|
@@ -73045,10 +72997,10 @@ var init_codex = __esm(() => {
|
|
|
73045
72997
|
});
|
|
73046
72998
|
|
|
73047
72999
|
// src/mcp/providers/copilot.ts
|
|
73048
|
-
import { join as
|
|
73000
|
+
import { join as join27 } from "node:path";
|
|
73049
73001
|
function globalPath() {
|
|
73050
73002
|
if (process.env.XDG_CONFIG_HOME) {
|
|
73051
|
-
return
|
|
73003
|
+
return join27(process.env.XDG_CONFIG_HOME, "mcp-config.json");
|
|
73052
73004
|
}
|
|
73053
73005
|
return expandHome("~/.copilot/mcp-config.json");
|
|
73054
73006
|
}
|
|
@@ -73079,7 +73031,7 @@ var CopilotProvider = () => ({
|
|
|
73079
73031
|
};
|
|
73080
73032
|
installJSONServer(globalPath(), "mcpServers", server);
|
|
73081
73033
|
} else {
|
|
73082
|
-
const configPath2 =
|
|
73034
|
+
const configPath2 = join27(process.cwd(), ".vscode", "mcp.json");
|
|
73083
73035
|
const server = {
|
|
73084
73036
|
type: "http",
|
|
73085
73037
|
url: url2,
|
|
@@ -73092,7 +73044,7 @@ var CopilotProvider = () => ({
|
|
|
73092
73044
|
if (global2) {
|
|
73093
73045
|
removeJSONServer(globalPath(), "mcpServers");
|
|
73094
73046
|
} else {
|
|
73095
|
-
const configPath2 =
|
|
73047
|
+
const configPath2 = join27(process.cwd(), ".vscode", "mcp.json");
|
|
73096
73048
|
removeJSONServer(configPath2, "servers");
|
|
73097
73049
|
}
|
|
73098
73050
|
}
|
|
@@ -73104,7 +73056,7 @@ var init_copilot = __esm(() => {
|
|
|
73104
73056
|
});
|
|
73105
73057
|
|
|
73106
73058
|
// src/mcp/providers/cursor.ts
|
|
73107
|
-
import { join as
|
|
73059
|
+
import { join as join28 } from "node:path";
|
|
73108
73060
|
var CursorProvider = () => createJSONProvider({
|
|
73109
73061
|
providerName: "Cursor",
|
|
73110
73062
|
providerID: "cursor",
|
|
@@ -73117,7 +73069,7 @@ var CursorProvider = () => createJSONProvider({
|
|
|
73117
73069
|
url: mcpURL(cfg.active_account.target.deployment_id),
|
|
73118
73070
|
headers: mcpHeaders(cfg.active_account.target.api_key)
|
|
73119
73071
|
}),
|
|
73120
|
-
localConfigPath: (cwd) =>
|
|
73072
|
+
localConfigPath: (cwd) => join28(cwd, ".cursor", "mcp.json")
|
|
73121
73073
|
});
|
|
73122
73074
|
var init_cursor = __esm(() => {
|
|
73123
73075
|
init_config_helpers();
|
|
@@ -73125,7 +73077,7 @@ var init_cursor = __esm(() => {
|
|
|
73125
73077
|
});
|
|
73126
73078
|
|
|
73127
73079
|
// src/mcp/providers/factory.ts
|
|
73128
|
-
import { join as
|
|
73080
|
+
import { join as join29 } from "node:path";
|
|
73129
73081
|
var FactoryProvider = () => createJSONProvider({
|
|
73130
73082
|
providerName: "Factory",
|
|
73131
73083
|
providerID: "factory",
|
|
@@ -73134,14 +73086,14 @@ var FactoryProvider = () => createJSONProvider({
|
|
|
73134
73086
|
paths: ["~/.factory"],
|
|
73135
73087
|
globalPath: "~/.factory/mcp.json",
|
|
73136
73088
|
topKey: "mcpServers",
|
|
73137
|
-
localConfigPath: (cwd) =>
|
|
73089
|
+
localConfigPath: (cwd) => join29(cwd, ".factory", "mcp.json")
|
|
73138
73090
|
});
|
|
73139
73091
|
var init_factory = __esm(() => {
|
|
73140
73092
|
init_base();
|
|
73141
73093
|
});
|
|
73142
73094
|
|
|
73143
73095
|
// src/mcp/providers/gemini.ts
|
|
73144
|
-
import { join as
|
|
73096
|
+
import { join as join30 } from "node:path";
|
|
73145
73097
|
var GeminiProvider = () => createJSONProvider({
|
|
73146
73098
|
providerName: "Gemini CLI",
|
|
73147
73099
|
providerID: "gemini",
|
|
@@ -73150,7 +73102,7 @@ var GeminiProvider = () => createJSONProvider({
|
|
|
73150
73102
|
paths: ["~/.gemini"],
|
|
73151
73103
|
globalPath: "~/.gemini/settings.json",
|
|
73152
73104
|
topKey: "mcpServers",
|
|
73153
|
-
localConfigPath: (cwd) =>
|
|
73105
|
+
localConfigPath: (cwd) => join30(cwd, ".gemini", "settings.json")
|
|
73154
73106
|
});
|
|
73155
73107
|
var init_gemini = __esm(() => {
|
|
73156
73108
|
init_base();
|
|
@@ -73201,7 +73153,7 @@ var init_manual = __esm(() => {
|
|
|
73201
73153
|
|
|
73202
73154
|
// src/mcp/providers/mcporter.ts
|
|
73203
73155
|
import { existsSync as existsSync21 } from "node:fs";
|
|
73204
|
-
import { join as
|
|
73156
|
+
import { join as join31 } from "node:path";
|
|
73205
73157
|
function resolveGlobalConfigPath() {
|
|
73206
73158
|
const jsonPath = expandHome("~/.mcporter/mcporter.json");
|
|
73207
73159
|
if (existsSync21(jsonPath))
|
|
@@ -73228,7 +73180,7 @@ var MCPorterProvider = () => ({
|
|
|
73228
73180
|
globalConfigPath: () => resolveGlobalConfigPath(),
|
|
73229
73181
|
isConfigured: () => isJSONKeyConfigured(resolveGlobalConfigPath(), "mcpServers"),
|
|
73230
73182
|
install(cfg, global2) {
|
|
73231
|
-
const configPath2 = global2 ? resolveGlobalConfigPath() :
|
|
73183
|
+
const configPath2 = global2 ? resolveGlobalConfigPath() : join31(process.cwd(), "config", "mcporter.json");
|
|
73232
73184
|
const server = {
|
|
73233
73185
|
type: "http",
|
|
73234
73186
|
url: mcpEndpoint4(cfg),
|
|
@@ -73237,7 +73189,7 @@ var MCPorterProvider = () => ({
|
|
|
73237
73189
|
installJSONServer(configPath2, "mcpServers", server);
|
|
73238
73190
|
},
|
|
73239
73191
|
remove(global2) {
|
|
73240
|
-
const configPath2 = global2 ? resolveGlobalConfigPath() :
|
|
73192
|
+
const configPath2 = global2 ? resolveGlobalConfigPath() : join31(process.cwd(), "config", "mcporter.json");
|
|
73241
73193
|
removeJSONServer(configPath2, "mcpServers");
|
|
73242
73194
|
}
|
|
73243
73195
|
});
|
|
@@ -73248,7 +73200,7 @@ var init_mcporter = __esm(() => {
|
|
|
73248
73200
|
});
|
|
73249
73201
|
|
|
73250
73202
|
// src/mcp/providers/opencode.ts
|
|
73251
|
-
import { join as
|
|
73203
|
+
import { join as join32 } from "node:path";
|
|
73252
73204
|
var OpenCodeProvider = () => createJSONProvider({
|
|
73253
73205
|
providerName: "OpenCode",
|
|
73254
73206
|
providerID: "opencode",
|
|
@@ -73263,7 +73215,7 @@ var OpenCodeProvider = () => createJSONProvider({
|
|
|
73263
73215
|
enabled: true,
|
|
73264
73216
|
headers: mcpHeaders(cfg.active_account.target.api_key)
|
|
73265
73217
|
}),
|
|
73266
|
-
localConfigPath: (cwd) =>
|
|
73218
|
+
localConfigPath: (cwd) => join32(cwd, "opencode.json")
|
|
73267
73219
|
});
|
|
73268
73220
|
var init_opencode = __esm(() => {
|
|
73269
73221
|
init_config_helpers();
|
|
@@ -73271,16 +73223,16 @@ var init_opencode = __esm(() => {
|
|
|
73271
73223
|
});
|
|
73272
73224
|
|
|
73273
73225
|
// src/mcp/providers/vscode.ts
|
|
73274
|
-
import { join as
|
|
73226
|
+
import { join as join33 } from "node:path";
|
|
73275
73227
|
var VSCodeProvider = () => createJSONProvider({
|
|
73276
73228
|
providerName: "VS Code",
|
|
73277
73229
|
providerID: "vscode",
|
|
73278
73230
|
local: true,
|
|
73279
73231
|
priorityValue: 6,
|
|
73280
|
-
paths: [
|
|
73281
|
-
globalPath:
|
|
73232
|
+
paths: [join33(appSupportDir(), "Code")],
|
|
73233
|
+
globalPath: join33(appSupportDir(), "Code", "User", "mcp.json"),
|
|
73282
73234
|
topKey: "servers",
|
|
73283
|
-
localConfigPath: (cwd) =>
|
|
73235
|
+
localConfigPath: (cwd) => join33(cwd, ".vscode", "mcp.json")
|
|
73284
73236
|
});
|
|
73285
73237
|
var init_vscode = __esm(() => {
|
|
73286
73238
|
init_detect();
|
|
@@ -73288,15 +73240,15 @@ var init_vscode = __esm(() => {
|
|
|
73288
73240
|
});
|
|
73289
73241
|
|
|
73290
73242
|
// src/mcp/providers/windsurf.ts
|
|
73291
|
-
import { homedir as
|
|
73292
|
-
import { join as
|
|
73243
|
+
import { homedir as homedir8 } from "node:os";
|
|
73244
|
+
import { join as join34 } from "node:path";
|
|
73293
73245
|
var WindsurfProvider = () => createJSONProvider({
|
|
73294
73246
|
providerName: "Windsurf",
|
|
73295
73247
|
providerID: "windsurf",
|
|
73296
73248
|
local: false,
|
|
73297
73249
|
priorityValue: 9,
|
|
73298
|
-
paths: [
|
|
73299
|
-
globalPath:
|
|
73250
|
+
paths: [join34(homedir8(), ".codeium", "windsurf")],
|
|
73251
|
+
globalPath: join34(homedir8(), ".codeium", "windsurf", "mcp_config.json"),
|
|
73300
73252
|
topKey: "mcpServers"
|
|
73301
73253
|
});
|
|
73302
73254
|
var init_windsurf = __esm(() => {
|
|
@@ -73305,12 +73257,12 @@ var init_windsurf = __esm(() => {
|
|
|
73305
73257
|
|
|
73306
73258
|
// src/mcp/providers/zed.ts
|
|
73307
73259
|
import { platform as platform3 } from "node:os";
|
|
73308
|
-
import { join as
|
|
73260
|
+
import { join as join35 } from "node:path";
|
|
73309
73261
|
function zedConfigDir() {
|
|
73310
73262
|
const os3 = platform3();
|
|
73311
73263
|
if (os3 === "darwin" || os3 === "win32")
|
|
73312
|
-
return
|
|
73313
|
-
return
|
|
73264
|
+
return join35(appSupportDir(), "Zed");
|
|
73265
|
+
return join35(appSupportDir(), "zed");
|
|
73314
73266
|
}
|
|
73315
73267
|
var ZedProvider = () => createJSONProvider({
|
|
73316
73268
|
providerName: "Zed",
|
|
@@ -73318,7 +73270,7 @@ var ZedProvider = () => createJSONProvider({
|
|
|
73318
73270
|
local: true,
|
|
73319
73271
|
priorityValue: 10,
|
|
73320
73272
|
paths: [zedConfigDir()],
|
|
73321
|
-
globalPath:
|
|
73273
|
+
globalPath: join35(zedConfigDir(), "settings.json"),
|
|
73322
73274
|
topKey: "context_servers",
|
|
73323
73275
|
buildServer: (cfg) => ({
|
|
73324
73276
|
source: "custom",
|
|
@@ -73326,7 +73278,7 @@ var ZedProvider = () => createJSONProvider({
|
|
|
73326
73278
|
url: mcpURL(cfg.active_account.target.deployment_id),
|
|
73327
73279
|
headers: mcpHeaders(cfg.active_account.target.api_key)
|
|
73328
73280
|
}),
|
|
73329
|
-
localConfigPath: (cwd) =>
|
|
73281
|
+
localConfigPath: (cwd) => join35(cwd, ".zed", "settings.json")
|
|
73330
73282
|
});
|
|
73331
73283
|
var init_zed = __esm(() => {
|
|
73332
73284
|
init_config_helpers();
|
|
@@ -73385,8 +73337,8 @@ var init_providers = __esm(() => {
|
|
|
73385
73337
|
});
|
|
73386
73338
|
|
|
73387
73339
|
// src/version/update-check.ts
|
|
73388
|
-
import { existsSync as existsSync22, mkdirSync as mkdirSync11, readFileSync as
|
|
73389
|
-
import { join as
|
|
73340
|
+
import { existsSync as existsSync22, mkdirSync as mkdirSync11, readFileSync as readFileSync20, writeFileSync as writeFileSync12 } from "node:fs";
|
|
73341
|
+
import { join as join36 } from "node:path";
|
|
73390
73342
|
function isValidVersion(value) {
|
|
73391
73343
|
return typeof value === "string" && SEMVER_PATTERN.test(value);
|
|
73392
73344
|
}
|
|
@@ -73408,14 +73360,14 @@ function isNewerVersion(latest, current) {
|
|
|
73408
73360
|
return false;
|
|
73409
73361
|
}
|
|
73410
73362
|
function getCachePath3() {
|
|
73411
|
-
return
|
|
73363
|
+
return join36(getConfigDir(), CACHE_FILENAME4);
|
|
73412
73364
|
}
|
|
73413
73365
|
function readCache() {
|
|
73414
73366
|
try {
|
|
73415
73367
|
const path3 = getCachePath3();
|
|
73416
73368
|
if (!existsSync22(path3))
|
|
73417
73369
|
return null;
|
|
73418
|
-
const data = JSON.parse(
|
|
73370
|
+
const data = JSON.parse(readFileSync20(path3, "utf-8"));
|
|
73419
73371
|
if (typeof data.lastCheck === "number" && isValidVersion(data.latestVersion)) {
|
|
73420
73372
|
return data;
|
|
73421
73373
|
}
|
|
@@ -73540,14 +73492,14 @@ var init_update_check = __esm(() => {
|
|
|
73540
73492
|
});
|
|
73541
73493
|
|
|
73542
73494
|
// src/rules/installer.ts
|
|
73543
|
-
import { existsSync as existsSync23, mkdirSync as mkdirSync12, readFileSync as
|
|
73544
|
-
import { homedir as
|
|
73545
|
-
import { dirname as dirname8, join as
|
|
73495
|
+
import { existsSync as existsSync23, mkdirSync as mkdirSync12, readFileSync as readFileSync21, unlinkSync as unlinkSync4, writeFileSync as writeFileSync13 } from "node:fs";
|
|
73496
|
+
import { homedir as homedir9 } from "node:os";
|
|
73497
|
+
import { dirname as dirname8, join as join37 } from "node:path";
|
|
73546
73498
|
function claudeConfigDir() {
|
|
73547
|
-
return process.env.CLAUDE_CONFIG_DIR ||
|
|
73499
|
+
return process.env.CLAUDE_CONFIG_DIR || join37(homedir9(), ".claude");
|
|
73548
73500
|
}
|
|
73549
73501
|
function codexHome3() {
|
|
73550
|
-
return process.env.CODEX_HOME ||
|
|
73502
|
+
return process.env.CODEX_HOME || join37(homedir9(), ".codex");
|
|
73551
73503
|
}
|
|
73552
73504
|
function isRuleAgent(agent) {
|
|
73553
73505
|
return Object.hasOwn(RULE_TARGETS, agent);
|
|
@@ -73581,7 +73533,7 @@ function writeIfChanged(path3, content) {
|
|
|
73581
73533
|
writeFileSync13(path3, content, "utf-8");
|
|
73582
73534
|
return "created";
|
|
73583
73535
|
}
|
|
73584
|
-
if (
|
|
73536
|
+
if (readFileSync21(path3, "utf-8") === content)
|
|
73585
73537
|
return "unchanged";
|
|
73586
73538
|
writeFileSync13(path3, content, "utf-8");
|
|
73587
73539
|
return "updated";
|
|
@@ -73616,7 +73568,7 @@ function upsertSection(path3, content) {
|
|
|
73616
73568
|
`, "utf-8");
|
|
73617
73569
|
return "created";
|
|
73618
73570
|
}
|
|
73619
|
-
const existing =
|
|
73571
|
+
const existing = readFileSync21(path3, "utf-8");
|
|
73620
73572
|
const lineEnding = lineEndingFor(existing);
|
|
73621
73573
|
const section = buildSection(content, lineEnding);
|
|
73622
73574
|
const location = findSection(existing);
|
|
@@ -73652,7 +73604,7 @@ function removeRuleForAgent(agent) {
|
|
|
73652
73604
|
unlinkSync4(path3);
|
|
73653
73605
|
return { agent, path: path3, action: "removed" };
|
|
73654
73606
|
}
|
|
73655
|
-
const existing =
|
|
73607
|
+
const existing = readFileSync21(path3, "utf-8");
|
|
73656
73608
|
const lineEnding = lineEndingFor(existing);
|
|
73657
73609
|
const location = findSection(existing);
|
|
73658
73610
|
if (!location)
|
|
@@ -73689,36 +73641,36 @@ var init_installer = __esm(() => {
|
|
|
73689
73641
|
RULE_TARGETS = {
|
|
73690
73642
|
claude: {
|
|
73691
73643
|
kind: "file",
|
|
73692
|
-
path: () =>
|
|
73644
|
+
path: () => join37(claudeConfigDir(), "rules", "dosu.md")
|
|
73693
73645
|
},
|
|
73694
73646
|
cursor: {
|
|
73695
73647
|
kind: "file",
|
|
73696
|
-
path: () =>
|
|
73648
|
+
path: () => join37(homedir9(), ".cursor", "rules", "dosu.mdc"),
|
|
73697
73649
|
cursorFrontmatter: true
|
|
73698
73650
|
},
|
|
73699
73651
|
codex: {
|
|
73700
73652
|
kind: "section",
|
|
73701
|
-
path: () =>
|
|
73653
|
+
path: () => join37(codexHome3(), "AGENTS.md")
|
|
73702
73654
|
},
|
|
73703
73655
|
opencode: {
|
|
73704
73656
|
kind: "section",
|
|
73705
|
-
path: () =>
|
|
73657
|
+
path: () => join37(homedir9(), ".config", "opencode", "AGENTS.md")
|
|
73706
73658
|
},
|
|
73707
73659
|
gemini: {
|
|
73708
73660
|
kind: "section",
|
|
73709
|
-
path: () =>
|
|
73661
|
+
path: () => join37(homedir9(), ".gemini", "GEMINI.md")
|
|
73710
73662
|
},
|
|
73711
73663
|
antigravity: {
|
|
73712
73664
|
kind: "section",
|
|
73713
|
-
path: () =>
|
|
73665
|
+
path: () => join37(homedir9(), ".gemini", "GEMINI.md")
|
|
73714
73666
|
}
|
|
73715
73667
|
};
|
|
73716
73668
|
});
|
|
73717
73669
|
|
|
73718
73670
|
// src/setup/agents-md-step.ts
|
|
73719
73671
|
import { execSync as execSync3 } from "node:child_process";
|
|
73720
|
-
import { existsSync as existsSync24, readFileSync as
|
|
73721
|
-
import { join as
|
|
73672
|
+
import { existsSync as existsSync24, readFileSync as readFileSync22, writeFileSync as writeFileSync14 } from "node:fs";
|
|
73673
|
+
import { join as join38 } from "node:path";
|
|
73722
73674
|
function inGitWorkTree(cwd = process.cwd()) {
|
|
73723
73675
|
try {
|
|
73724
73676
|
const stdout2 = execSync3("git rev-parse --is-inside-work-tree", {
|
|
@@ -73732,10 +73684,10 @@ function inGitWorkTree(cwd = process.cwd()) {
|
|
|
73732
73684
|
}
|
|
73733
73685
|
function dosuAgentsSectionState(cwd = process.cwd()) {
|
|
73734
73686
|
try {
|
|
73735
|
-
const path3 =
|
|
73687
|
+
const path3 = join38(cwd, "AGENTS.md");
|
|
73736
73688
|
if (!existsSync24(path3))
|
|
73737
73689
|
return "missing";
|
|
73738
|
-
const content =
|
|
73690
|
+
const content = readFileSync22(path3, "utf-8");
|
|
73739
73691
|
const startMatch = content.match(SECTION_START_RE);
|
|
73740
73692
|
if (!startMatch || !content.includes(DOSU_SECTION_END))
|
|
73741
73693
|
return "missing";
|
|
@@ -73770,14 +73722,14 @@ function findSection2(content) {
|
|
|
73770
73722
|
return { start, end };
|
|
73771
73723
|
}
|
|
73772
73724
|
function upsertDosuAgentsSection(cwd = process.cwd(), content = FALLBACK_DOSU_RULE) {
|
|
73773
|
-
const path3 =
|
|
73725
|
+
const path3 = join38(cwd, "AGENTS.md");
|
|
73774
73726
|
if (!existsSync24(path3)) {
|
|
73775
73727
|
const section2 = buildDosuAgentsSection(content);
|
|
73776
73728
|
writeFileSync14(path3, `${section2}
|
|
73777
73729
|
`);
|
|
73778
73730
|
return { path: path3, action: "created" };
|
|
73779
73731
|
}
|
|
73780
|
-
const existing =
|
|
73732
|
+
const existing = readFileSync22(path3, "utf-8");
|
|
73781
73733
|
const lineEnding = lineEndingFor2(existing);
|
|
73782
73734
|
const section = renderDosuAgentsSection(content, lineEnding);
|
|
73783
73735
|
const location = findSection2(existing);
|
|
@@ -73871,7 +73823,7 @@ var init_alt_screen = __esm(() => {
|
|
|
73871
73823
|
});
|
|
73872
73824
|
|
|
73873
73825
|
// src/tui/activity-view.ts
|
|
73874
|
-
import { readFileSync as
|
|
73826
|
+
import { readFileSync as readFileSync23 } from "node:fs";
|
|
73875
73827
|
function reduceActivityViewKey(key) {
|
|
73876
73828
|
if (key === "q" || key === ESC7 || key === CTRL_C4)
|
|
73877
73829
|
return "back";
|
|
@@ -74116,7 +74068,7 @@ function renderActivityFrame(status, activity, width, backlog = null, pane = DEF
|
|
|
74116
74068
|
}
|
|
74117
74069
|
function defaultReadLog2() {
|
|
74118
74070
|
try {
|
|
74119
|
-
return
|
|
74071
|
+
return readFileSync23(logger.getLogPath(), "utf-8");
|
|
74120
74072
|
} catch {
|
|
74121
74073
|
return "";
|
|
74122
74074
|
}
|
|
@@ -76586,7 +76538,7 @@ __export(exports_tui, {
|
|
|
76586
76538
|
runTUI: () => runTUI,
|
|
76587
76539
|
handleLogout: () => handleLogout
|
|
76588
76540
|
});
|
|
76589
|
-
import { homedir as
|
|
76541
|
+
import { homedir as homedir10 } from "node:os";
|
|
76590
76542
|
import { basename as basename4 } from "node:path";
|
|
76591
76543
|
function bannerContext(cfg) {
|
|
76592
76544
|
let webAppHost = "app.dosu.dev";
|
|
@@ -76812,7 +76764,7 @@ async function runSettings(cfg) {
|
|
|
76812
76764
|
}
|
|
76813
76765
|
}
|
|
76814
76766
|
function displayDir(dir) {
|
|
76815
|
-
const home =
|
|
76767
|
+
const home = homedir10();
|
|
76816
76768
|
return dir === home ? "~" : dir.startsWith(`${home}/`) ? `~${dir.slice(home.length)}` : dir;
|
|
76817
76769
|
}
|
|
76818
76770
|
function discoverProjectDirs() {
|
|
@@ -77552,7 +77504,7 @@ import {
|
|
|
77552
77504
|
constants as constants3,
|
|
77553
77505
|
fstatSync,
|
|
77554
77506
|
openSync as openSync5,
|
|
77555
|
-
readFileSync as
|
|
77507
|
+
readFileSync as readFileSync24,
|
|
77556
77508
|
readSync as readSync4,
|
|
77557
77509
|
unlinkSync as unlinkSync5
|
|
77558
77510
|
} from "node:fs";
|
|
@@ -80687,8 +80639,8 @@ init_status();
|
|
|
80687
80639
|
init_sync();
|
|
80688
80640
|
var import_picocolors18 = __toESM(require_picocolors(), 1);
|
|
80689
80641
|
import { existsSync as existsSync16 } from "node:fs";
|
|
80690
|
-
import { homedir as
|
|
80691
|
-
import { delimiter as delimiter4, join as
|
|
80642
|
+
import { homedir as homedir5 } from "node:os";
|
|
80643
|
+
import { delimiter as delimiter4, join as join18 } from "node:path";
|
|
80692
80644
|
function requireConfig7() {
|
|
80693
80645
|
const cfg = requireLoginConfig();
|
|
80694
80646
|
if (!cfg.active_account?.target?.org_id || !cfg.active_account?.target?.space_id) {
|
|
@@ -80835,7 +80787,7 @@ function printSyncStatus(status, now = new Date) {
|
|
|
80835
80787
|
const wm2 = status.state.watermark;
|
|
80836
80788
|
console.log(` Mined through: ${wm2 ? `${wm2} (${formatAge(wm2, now)})` : "nothing mined yet"}`);
|
|
80837
80789
|
if (status.state.project_filter?.length) {
|
|
80838
|
-
const home =
|
|
80790
|
+
const home = homedir5();
|
|
80839
80791
|
const scope = status.state.project_filter.map((dir) => dir.startsWith(`${home}/`) ? `~${dir.slice(home.length)}` : dir).join(", ");
|
|
80840
80792
|
console.log(` Mining scope: ${scope}`);
|
|
80841
80793
|
}
|
|
@@ -81003,7 +80955,7 @@ function reportHookFailure(agent, err) {
|
|
|
81003
80955
|
}
|
|
81004
80956
|
function dosuOnPath() {
|
|
81005
80957
|
const bin = process.platform === "win32" ? "dosu.cmd" : "dosu";
|
|
81006
|
-
return (process.env.PATH ?? "").split(delimiter4).some((dir) => dir !== "" && existsSync16(
|
|
80958
|
+
return (process.env.PATH ?? "").split(delimiter4).some((dir) => dir !== "" && existsSync16(join18(dir, bin)));
|
|
81007
80959
|
}
|
|
81008
80960
|
|
|
81009
80961
|
// src/commands/libraries.ts
|
|
@@ -81343,7 +81295,7 @@ init_dist();
|
|
|
81343
81295
|
init_commander();
|
|
81344
81296
|
init_trpc();
|
|
81345
81297
|
var import_picocolors22 = __toESM(require_picocolors(), 1);
|
|
81346
|
-
import { readFileSync as
|
|
81298
|
+
import { readFileSync as readFileSync16 } from "node:fs";
|
|
81347
81299
|
function requireConfig10() {
|
|
81348
81300
|
return requireLoginConfig();
|
|
81349
81301
|
}
|
|
@@ -81519,7 +81471,7 @@ function reviewCommand() {
|
|
|
81519
81471
|
let body = opts.body;
|
|
81520
81472
|
if (opts.bodyFile) {
|
|
81521
81473
|
try {
|
|
81522
|
-
body =
|
|
81474
|
+
body = readFileSync16(opts.bodyFile, "utf-8");
|
|
81523
81475
|
} catch (err) {
|
|
81524
81476
|
console.error(import_picocolors22.default.red(`Failed to read --body-file: ${err.message}`));
|
|
81525
81477
|
process.exit(1);
|
|
@@ -82017,7 +81969,7 @@ init_skill();
|
|
|
82017
81969
|
var import_picocolors28 = __toESM(require_picocolors(), 1);
|
|
82018
81970
|
import { spawnSync } from "node:child_process";
|
|
82019
81971
|
import { realpathSync as realpathSync2 } from "node:fs";
|
|
82020
|
-
import { homedir as
|
|
81972
|
+
import { homedir as homedir7 } from "node:os";
|
|
82021
81973
|
import { posix, win32 as win322 } from "node:path";
|
|
82022
81974
|
var PACKAGE_NAME = "@dosu/cli";
|
|
82023
81975
|
var LATEST_PACKAGE = `${PACKAGE_NAME}@latest`;
|
|
@@ -82094,7 +82046,7 @@ function packageRoots(manager, platform3, comSpec, env, cwd) {
|
|
|
82094
82046
|
manager === "npm" ? path3.join(lines[0], "@dosu", "cli") : path3.join(lines[0], "node_modules", "@dosu", "cli")
|
|
82095
82047
|
];
|
|
82096
82048
|
}
|
|
82097
|
-
function owningPackageManager(entrypoint, platform3, comSpec, env = process.env, cwd =
|
|
82049
|
+
function owningPackageManager(entrypoint, platform3, comSpec, env = process.env, cwd = homedir7()) {
|
|
82098
82050
|
const path3 = platform3 === "win32" ? win322 : posix;
|
|
82099
82051
|
if (!entrypoint || !path3.isAbsolute(entrypoint))
|
|
82100
82052
|
return null;
|
|
@@ -82147,7 +82099,7 @@ Or install Dosu globally with your package manager:`);
|
|
|
82147
82099
|
function runUpgrade(channel = INSTALL_CHANNEL, options = {}) {
|
|
82148
82100
|
const platform3 = options.platform ?? process.platform;
|
|
82149
82101
|
const env = options.env ?? process.env;
|
|
82150
|
-
const cwd = options.cwd ??
|
|
82102
|
+
const cwd = options.cwd ?? homedir7();
|
|
82151
82103
|
let manager = null;
|
|
82152
82104
|
if (channel === "npm") {
|
|
82153
82105
|
if (isNpxInvocation(channel, env)) {
|
|
@@ -82663,7 +82615,7 @@ Use 'dosu mcp add <agent>' to add Dosu MCP to a tool.`);
|
|
|
82663
82615
|
}
|
|
82664
82616
|
if (opts.follow) {
|
|
82665
82617
|
try {
|
|
82666
|
-
const lines =
|
|
82618
|
+
const lines = readFileSync24(logPath, "utf-8").split(`
|
|
82667
82619
|
`);
|
|
82668
82620
|
if (lines.at(-1) === "")
|
|
82669
82621
|
lines.pop();
|
|
@@ -82679,7 +82631,7 @@ Use 'dosu mcp add <agent>' to add Dosu MCP to a tool.`);
|
|
|
82679
82631
|
if (opts.tail !== undefined) {
|
|
82680
82632
|
const n5 = typeof opts.tail === "string" ? parseInt(opts.tail, 10) || 50 : 50;
|
|
82681
82633
|
try {
|
|
82682
|
-
const content =
|
|
82634
|
+
const content = readFileSync24(logPath, "utf-8");
|
|
82683
82635
|
const lines = content.split(`
|
|
82684
82636
|
`);
|
|
82685
82637
|
console.log(lines.slice(-n5).join(`
|
|
@@ -82750,4 +82702,4 @@ execute().catch((err) => {
|
|
|
82750
82702
|
process.exit(1);
|
|
82751
82703
|
});
|
|
82752
82704
|
|
|
82753
|
-
//# debugId=
|
|
82705
|
+
//# debugId=6c656d2d-4b9b-0be3-6475-6e2164756e21
|