@docyrus/docyrus 0.0.23 → 0.0.25
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/main.js +113 -45
- package/main.js.map +3 -3
- package/package.json +1 -1
- package/resources/pi-agent/skills/diffity-diff/SKILL.md +28 -0
- package/resources/pi-agent/skills/diffity-resolve/SKILL.md +69 -0
- package/resources/pi-agent/skills/diffity-review/SKILL.md +175 -0
- package/server-loader.js +421 -24
- package/server-loader.js.map +2 -2
package/main.js
CHANGED
|
@@ -87851,7 +87851,7 @@ var require_snapshot_recorder = __commonJS({
|
|
|
87851
87851
|
"../../node_modules/.pnpm/undici@7.22.0/node_modules/undici/lib/mock/snapshot-recorder.js"(exports2, module2) {
|
|
87852
87852
|
"use strict";
|
|
87853
87853
|
var { writeFile: writeFile5, readFile: readFile6, mkdir: mkdir5 } = require("node:fs/promises");
|
|
87854
|
-
var { dirname:
|
|
87854
|
+
var { dirname: dirname7, resolve } = require("node:path");
|
|
87855
87855
|
var { setTimeout: setTimeout2, clearTimeout: clearTimeout2 } = require("node:timers");
|
|
87856
87856
|
var { InvalidArgumentError, UndiciError } = require_errors3();
|
|
87857
87857
|
var { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = require_snapshot_utils();
|
|
@@ -88082,7 +88082,7 @@ var require_snapshot_recorder = __commonJS({
|
|
|
88082
88082
|
throw new InvalidArgumentError("Snapshot path is required");
|
|
88083
88083
|
}
|
|
88084
88084
|
const resolvedPath = resolve(path3);
|
|
88085
|
-
await mkdir5(
|
|
88085
|
+
await mkdir5(dirname7(resolvedPath), { recursive: true });
|
|
88086
88086
|
const data = Array.from(this.#snapshots.entries()).map(([hash3, snapshot]) => ({
|
|
88087
88087
|
hash: hash3,
|
|
88088
88088
|
snapshot
|
|
@@ -92068,10 +92068,10 @@ var require_headers = __commonJS({
|
|
|
92068
92068
|
const lowercaseName = isLowerCase ? name : name.toLowerCase();
|
|
92069
92069
|
const exists = this.headersMap.get(lowercaseName);
|
|
92070
92070
|
if (exists) {
|
|
92071
|
-
const
|
|
92071
|
+
const delimiter2 = lowercaseName === "cookie" ? "; " : ", ";
|
|
92072
92072
|
this.headersMap.set(lowercaseName, {
|
|
92073
92073
|
name: exists.name,
|
|
92074
|
-
value: `${exists.value}${
|
|
92074
|
+
value: `${exists.value}${delimiter2}${value}`
|
|
92075
92075
|
});
|
|
92076
92076
|
} else {
|
|
92077
92077
|
this.headersMap.set(lowercaseName, { name, value });
|
|
@@ -100413,8 +100413,8 @@ function emoji() {
|
|
|
100413
100413
|
}
|
|
100414
100414
|
var ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
|
|
100415
100415
|
var ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;
|
|
100416
|
-
var mac = (
|
|
100417
|
-
const escapedDelim = escapeRegex(
|
|
100416
|
+
var mac = (delimiter2) => {
|
|
100417
|
+
const escapedDelim = escapeRegex(delimiter2 ?? ":");
|
|
100418
100418
|
return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);
|
|
100419
100419
|
};
|
|
100420
100420
|
var cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/;
|
|
@@ -112755,7 +112755,7 @@ function isValidUnquotedKey(key) {
|
|
|
112755
112755
|
function isIdentifierSegment(key) {
|
|
112756
112756
|
return /^[A-Z_]\w*$/i.test(key);
|
|
112757
112757
|
}
|
|
112758
|
-
function isSafeUnquoted(value,
|
|
112758
|
+
function isSafeUnquoted(value, delimiter2 = DEFAULT_DELIMITER) {
|
|
112759
112759
|
if (!value) return false;
|
|
112760
112760
|
if (value !== value.trim()) return false;
|
|
112761
112761
|
if (isBooleanOrNullLiteral(value) || isNumericLike(value)) return false;
|
|
@@ -112763,7 +112763,7 @@ function isSafeUnquoted(value, delimiter = DEFAULT_DELIMITER) {
|
|
|
112763
112763
|
if (value.includes('"') || value.includes("\\")) return false;
|
|
112764
112764
|
if (/[[\]{}]/.test(value)) return false;
|
|
112765
112765
|
if (/[\n\r\t]/.test(value)) return false;
|
|
112766
|
-
if (value.includes(
|
|
112766
|
+
if (value.includes(delimiter2)) return false;
|
|
112767
112767
|
if (value.startsWith(LIST_ITEM_MARKER)) return false;
|
|
112768
112768
|
return true;
|
|
112769
112769
|
}
|
|
@@ -112813,33 +112813,33 @@ function collectSingleKeyChain(startKey, startValue, maxDepth) {
|
|
|
112813
112813
|
function buildFoldedKey(segments) {
|
|
112814
112814
|
return segments.join(DOT);
|
|
112815
112815
|
}
|
|
112816
|
-
function encodePrimitive(value,
|
|
112816
|
+
function encodePrimitive(value, delimiter2) {
|
|
112817
112817
|
if (value === null) return NULL_LITERAL;
|
|
112818
112818
|
if (typeof value === "boolean") return String(value);
|
|
112819
112819
|
if (typeof value === "number") return String(value);
|
|
112820
|
-
return encodeStringLiteral(value,
|
|
112820
|
+
return encodeStringLiteral(value, delimiter2);
|
|
112821
112821
|
}
|
|
112822
|
-
function encodeStringLiteral(value,
|
|
112823
|
-
if (isSafeUnquoted(value,
|
|
112822
|
+
function encodeStringLiteral(value, delimiter2 = DEFAULT_DELIMITER) {
|
|
112823
|
+
if (isSafeUnquoted(value, delimiter2)) return value;
|
|
112824
112824
|
return `${DOUBLE_QUOTE}${escapeString(value)}${DOUBLE_QUOTE}`;
|
|
112825
112825
|
}
|
|
112826
112826
|
function encodeKey(key) {
|
|
112827
112827
|
if (isValidUnquotedKey(key)) return key;
|
|
112828
112828
|
return `${DOUBLE_QUOTE}${escapeString(key)}${DOUBLE_QUOTE}`;
|
|
112829
112829
|
}
|
|
112830
|
-
function encodeAndJoinPrimitives(values,
|
|
112831
|
-
return values.map((v) => encodePrimitive(v,
|
|
112830
|
+
function encodeAndJoinPrimitives(values, delimiter2 = DEFAULT_DELIMITER) {
|
|
112831
|
+
return values.map((v) => encodePrimitive(v, delimiter2)).join(delimiter2);
|
|
112832
112832
|
}
|
|
112833
112833
|
function formatHeader(length, options2) {
|
|
112834
112834
|
const key = options2?.key;
|
|
112835
112835
|
const fields = options2?.fields;
|
|
112836
|
-
const
|
|
112836
|
+
const delimiter2 = options2?.delimiter ?? COMMA;
|
|
112837
112837
|
let header = "";
|
|
112838
112838
|
if (key) header += encodeKey(key);
|
|
112839
|
-
header += `[${length}${
|
|
112839
|
+
header += `[${length}${delimiter2 !== DEFAULT_DELIMITER ? delimiter2 : ""}]`;
|
|
112840
112840
|
if (fields) {
|
|
112841
112841
|
const quotedFields = fields.map((f) => encodeKey(f));
|
|
112842
|
-
header += `{${quotedFields.join(
|
|
112842
|
+
header += `{${quotedFields.join(delimiter2)}}`;
|
|
112843
112843
|
}
|
|
112844
112844
|
header += ":";
|
|
112845
112845
|
return header;
|
|
@@ -112932,12 +112932,12 @@ function* encodeArrayOfArraysAsListItemsLines(prefix, values, depth, options2) {
|
|
|
112932
112932
|
yield indentedListItem(depth + 1, arrayLine, options2.indent);
|
|
112933
112933
|
}
|
|
112934
112934
|
}
|
|
112935
|
-
function encodeInlineArrayLine(values,
|
|
112935
|
+
function encodeInlineArrayLine(values, delimiter2, prefix) {
|
|
112936
112936
|
const header = formatHeader(values.length, {
|
|
112937
112937
|
key: prefix,
|
|
112938
|
-
delimiter
|
|
112938
|
+
delimiter: delimiter2
|
|
112939
112939
|
});
|
|
112940
|
-
const joinedValue = encodeAndJoinPrimitives(values,
|
|
112940
|
+
const joinedValue = encodeAndJoinPrimitives(values, delimiter2);
|
|
112941
112941
|
if (values.length === 0) return header;
|
|
112942
112942
|
return `${header} ${joinedValue}`;
|
|
112943
112943
|
}
|
|
@@ -124678,7 +124678,7 @@ function buildInputSchema(args, env2, options2) {
|
|
|
124678
124678
|
// package.json
|
|
124679
124679
|
var package_default = {
|
|
124680
124680
|
name: "@docyrus/docyrus",
|
|
124681
|
-
version: "0.0.
|
|
124681
|
+
version: "0.0.25",
|
|
124682
124682
|
private: false,
|
|
124683
124683
|
description: "Docyrus API CLI",
|
|
124684
124684
|
main: "./main.js",
|
|
@@ -125757,12 +125757,12 @@ function summarizeFailure(result) {
|
|
|
125757
125757
|
}
|
|
125758
125758
|
function resolveChromeToolsResourceRoot(options2 = {}) {
|
|
125759
125759
|
const cwd = options2.cwd ?? process.cwd();
|
|
125760
|
-
const
|
|
125760
|
+
const dirname7 = options2.dirname ?? __dirname;
|
|
125761
125761
|
const fileExists = options2.existsSyncFn ?? import_node_fs3.existsSync;
|
|
125762
125762
|
const candidates = options2.candidatePaths ?? [
|
|
125763
125763
|
(0, import_node_path4.resolve)(cwd, "apps/api-cli/resources/chrome-tools"),
|
|
125764
|
-
(0, import_node_path4.resolve)(
|
|
125765
|
-
(0, import_node_path4.resolve)(
|
|
125764
|
+
(0, import_node_path4.resolve)(dirname7, "../resources/chrome-tools"),
|
|
125765
|
+
(0, import_node_path4.resolve)(dirname7, "resources/chrome-tools"),
|
|
125766
125766
|
(0, import_node_path4.resolve)(cwd, "dist/apps/api-cli/resources/chrome-tools")
|
|
125767
125767
|
];
|
|
125768
125768
|
const resolved = candidates.find((candidate) => fileExists(candidate));
|
|
@@ -127935,16 +127935,16 @@ function resolveCliScriptPath() {
|
|
|
127935
127935
|
}
|
|
127936
127936
|
function resolveOpenTuiEntryPath(options2 = {}) {
|
|
127937
127937
|
const cwd = options2.cwd ?? process.cwd();
|
|
127938
|
-
const
|
|
127938
|
+
const dirname7 = options2.dirname ?? __dirname;
|
|
127939
127939
|
const fileExists = options2.existsSyncFn ?? import_node_fs4.existsSync;
|
|
127940
127940
|
const candidates = [
|
|
127941
127941
|
// Source/dev mode in monorepo. Prefer this first so Bun resolves deps via
|
|
127942
127942
|
// apps/api-cli/node_modules in workspace runs (e.g. `pnpm docyrus tui`).
|
|
127943
127943
|
(0, import_node_path7.resolve)(cwd, "apps/api-cli/src/tui/opentuiMain.tsx"),
|
|
127944
|
-
(0, import_node_path7.resolve)(
|
|
127944
|
+
(0, import_node_path7.resolve)(dirname7, "../tui/opentuiMain.tsx"),
|
|
127945
127945
|
// Dist mode (bundled command runtime)
|
|
127946
|
-
(0, import_node_path7.resolve)(
|
|
127947
|
-
(0, import_node_path7.resolve)(
|
|
127946
|
+
(0, import_node_path7.resolve)(dirname7, "tui.mjs"),
|
|
127947
|
+
(0, import_node_path7.resolve)(dirname7, "../tui.mjs"),
|
|
127948
127948
|
(0, import_node_path7.resolve)(cwd, "dist/apps/api-cli/tui.mjs")
|
|
127949
127949
|
];
|
|
127950
127950
|
const resolved = candidates.find((candidate) => fileExists(candidate));
|
|
@@ -129238,6 +129238,7 @@ var DOCYRUS_EXTERNAL_SKILL_AGENT_IDS = [
|
|
|
129238
129238
|
"windsurf"
|
|
129239
129239
|
];
|
|
129240
129240
|
var DOCYRUS_EXTERNAL_SKILL_MARKER_FILE = ".docyrus-external-skills-installed.json";
|
|
129241
|
+
var DOCYRUS_DIFFITY_PACKAGE_SPEC = "diffity@0.5.3";
|
|
129241
129242
|
function summarizeFailure3(result) {
|
|
129242
129243
|
const stderr = result.stderr?.toString().trim();
|
|
129243
129244
|
if (stderr && stderr.length > 0) {
|
|
@@ -129253,12 +129254,12 @@ function summarizeFailure3(result) {
|
|
|
129253
129254
|
}
|
|
129254
129255
|
function resolvePackagedPiResourceRoot(options2 = {}) {
|
|
129255
129256
|
const cwd = options2.cwd ?? process.cwd();
|
|
129256
|
-
const
|
|
129257
|
+
const dirname7 = options2.dirname ?? __dirname;
|
|
129257
129258
|
const fileExists = options2.existsSyncFn ?? import_node_fs5.existsSync;
|
|
129258
129259
|
const candidates = [
|
|
129259
129260
|
(0, import_node_path10.resolve)(cwd, "apps/api-cli/resources/pi-agent"),
|
|
129260
|
-
(0, import_node_path10.resolve)(
|
|
129261
|
-
(0, import_node_path10.resolve)(
|
|
129261
|
+
(0, import_node_path10.resolve)(dirname7, "../resources/pi-agent"),
|
|
129262
|
+
(0, import_node_path10.resolve)(dirname7, "resources/pi-agent"),
|
|
129262
129263
|
(0, import_node_path10.resolve)(cwd, "dist/apps/api-cli/resources/pi-agent")
|
|
129263
129264
|
];
|
|
129264
129265
|
const resolved = candidates.find((candidate) => fileExists(candidate));
|
|
@@ -129269,7 +129270,7 @@ function resolvePackagedPiResourceRoot(options2 = {}) {
|
|
|
129269
129270
|
}
|
|
129270
129271
|
function resolveDocyrusPiLoaderEntryPath(options2 = {}) {
|
|
129271
129272
|
const cwd = options2.cwd ?? process.cwd();
|
|
129272
|
-
const
|
|
129273
|
+
const dirname7 = options2.dirname ?? __dirname;
|
|
129273
129274
|
const fileExists = options2.existsSyncFn ?? import_node_fs5.existsSync;
|
|
129274
129275
|
const seen = /* @__PURE__ */ new Set();
|
|
129275
129276
|
const candidates = options2.candidatePaths ?? [];
|
|
@@ -129295,10 +129296,10 @@ function resolveDocyrusPiLoaderEntryPath(options2 = {}) {
|
|
|
129295
129296
|
}
|
|
129296
129297
|
};
|
|
129297
129298
|
addCandidate((0, import_node_path10.resolve)(cwd, "dist/apps/api-cli/agent-loader.js"));
|
|
129298
|
-
addCandidate((0, import_node_path10.resolve)(
|
|
129299
|
-
addCandidate((0, import_node_path10.resolve)(
|
|
129299
|
+
addCandidate((0, import_node_path10.resolve)(dirname7, "../agent-loader.js"));
|
|
129300
|
+
addCandidate((0, import_node_path10.resolve)(dirname7, "agent-loader.js"));
|
|
129300
129301
|
collectAncestorCandidates(cwd);
|
|
129301
|
-
collectAncestorCandidates(
|
|
129302
|
+
collectAncestorCandidates(dirname7);
|
|
129302
129303
|
const resolved = candidates.find((candidate) => fileExists(candidate));
|
|
129303
129304
|
if (!resolved) {
|
|
129304
129305
|
throw new UserInputError(`Unable to locate Docyrus pi loader entry file. Checked: ${candidates.join(", ")}`);
|
|
@@ -129307,7 +129308,7 @@ function resolveDocyrusPiLoaderEntryPath(options2 = {}) {
|
|
|
129307
129308
|
}
|
|
129308
129309
|
function resolveDocyrusCliEntryPath(options2 = {}) {
|
|
129309
129310
|
const cwd = options2.cwd ?? process.cwd();
|
|
129310
|
-
const
|
|
129311
|
+
const dirname7 = options2.dirname ?? __dirname;
|
|
129311
129312
|
const argv = options2.argv ?? process.argv;
|
|
129312
129313
|
const fileExists = options2.existsSyncFn ?? import_node_fs5.existsSync;
|
|
129313
129314
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -129328,8 +129329,8 @@ function resolveDocyrusCliEntryPath(options2 = {}) {
|
|
|
129328
129329
|
addCandidate(normalizedArgvScript);
|
|
129329
129330
|
}
|
|
129330
129331
|
addCandidate((0, import_node_path10.resolve)(cwd, "dist/apps/api-cli/main.js"));
|
|
129331
|
-
addCandidate((0, import_node_path10.resolve)(
|
|
129332
|
-
addCandidate((0, import_node_path10.resolve)(
|
|
129332
|
+
addCandidate((0, import_node_path10.resolve)(dirname7, "../main.js"));
|
|
129333
|
+
addCandidate((0, import_node_path10.resolve)(dirname7, "main.js"));
|
|
129333
129334
|
if (normalizedArgvScript) {
|
|
129334
129335
|
addCandidate(normalizedArgvScript);
|
|
129335
129336
|
}
|
|
@@ -129341,7 +129342,7 @@ function resolveDocyrusCliEntryPath(options2 = {}) {
|
|
|
129341
129342
|
}
|
|
129342
129343
|
function resolveInstalledPiPackageRootPath(options2 = {}) {
|
|
129343
129344
|
const cwd = options2.cwd ?? process.cwd();
|
|
129344
|
-
const
|
|
129345
|
+
const dirname7 = options2.dirname ?? __dirname;
|
|
129345
129346
|
const fileExists = options2.existsSyncFn ?? import_node_fs5.existsSync;
|
|
129346
129347
|
const seen = /* @__PURE__ */ new Set();
|
|
129347
129348
|
const candidates = options2.candidatePaths ?? [];
|
|
@@ -129366,8 +129367,9 @@ function resolveInstalledPiPackageRootPath(options2 = {}) {
|
|
|
129366
129367
|
}
|
|
129367
129368
|
};
|
|
129368
129369
|
addCandidate((0, import_node_path10.resolve)(cwd, "apps/api-cli/node_modules/@mariozechner/pi-coding-agent/package.json"));
|
|
129370
|
+
addCandidate((0, import_node_path10.resolve)(dirname7, "../../../apps/api-cli/node_modules/@mariozechner/pi-coding-agent/package.json"));
|
|
129369
129371
|
collectAncestorCandidates(cwd);
|
|
129370
|
-
collectAncestorCandidates(
|
|
129372
|
+
collectAncestorCandidates(dirname7);
|
|
129371
129373
|
const resolvedPackageJson = candidates.find((candidate) => fileExists(candidate));
|
|
129372
129374
|
if (!resolvedPackageJson) {
|
|
129373
129375
|
throw new UserInputError(`Unable to locate the installed pi package root. Checked: ${candidates.join(", ")}`);
|
|
@@ -129456,6 +129458,26 @@ async function writeRuntimeSkill(params) {
|
|
|
129456
129458
|
function resolveNpxCommand() {
|
|
129457
129459
|
return process.platform === "win32" ? "npx.cmd" : "npx";
|
|
129458
129460
|
}
|
|
129461
|
+
function resolveNpmCommand() {
|
|
129462
|
+
return process.platform === "win32" ? "npm.cmd" : "npm";
|
|
129463
|
+
}
|
|
129464
|
+
function resolveManagedDiffityInstallRoot(agentRootPath) {
|
|
129465
|
+
return (0, import_node_path10.join)(agentRootPath, "tools", "diffity");
|
|
129466
|
+
}
|
|
129467
|
+
function resolveManagedDiffityExecutablePath(agentRootPath) {
|
|
129468
|
+
return (0, import_node_path10.join)(
|
|
129469
|
+
resolveManagedDiffityInstallRoot(agentRootPath),
|
|
129470
|
+
"node_modules",
|
|
129471
|
+
".bin",
|
|
129472
|
+
process.platform === "win32" ? "diffity.cmd" : "diffity"
|
|
129473
|
+
);
|
|
129474
|
+
}
|
|
129475
|
+
function prependPathEntry(entry, existingPath) {
|
|
129476
|
+
const values = existingPath ? existingPath.split(import_node_path10.delimiter).filter((value) => value.trim().length > 0) : [];
|
|
129477
|
+
const normalizedEntry = entry.trim();
|
|
129478
|
+
const remaining = values.filter((value) => value !== normalizedEntry);
|
|
129479
|
+
return [normalizedEntry, ...remaining].join(import_node_path10.delimiter);
|
|
129480
|
+
}
|
|
129459
129481
|
function createDocyrusSkillsInstallArgs(scope) {
|
|
129460
129482
|
const args = [
|
|
129461
129483
|
"skills",
|
|
@@ -129523,6 +129545,46 @@ async function installExternalDocyrusSkillsOnce(params) {
|
|
|
129523
129545
|
mode: 384
|
|
129524
129546
|
});
|
|
129525
129547
|
}
|
|
129548
|
+
async function ensureManagedDiffityInstalled(params) {
|
|
129549
|
+
const executablePath = resolveManagedDiffityExecutablePath(params.agentRootPath);
|
|
129550
|
+
const binDir = (0, import_node_path10.dirname)(executablePath);
|
|
129551
|
+
if ((0, import_node_fs5.existsSync)(executablePath)) {
|
|
129552
|
+
return {
|
|
129553
|
+
available: true,
|
|
129554
|
+
executablePath,
|
|
129555
|
+
binDir
|
|
129556
|
+
};
|
|
129557
|
+
}
|
|
129558
|
+
const installRoot = resolveManagedDiffityInstallRoot(params.agentRootPath);
|
|
129559
|
+
const result = params.spawnCommand(
|
|
129560
|
+
resolveNpmCommand(),
|
|
129561
|
+
["install", "--prefix", installRoot, DOCYRUS_DIFFITY_PACKAGE_SPEC],
|
|
129562
|
+
{
|
|
129563
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
129564
|
+
encoding: "utf8",
|
|
129565
|
+
cwd: params.cwd,
|
|
129566
|
+
env: {
|
|
129567
|
+
...process.env
|
|
129568
|
+
}
|
|
129569
|
+
}
|
|
129570
|
+
);
|
|
129571
|
+
if (result.error || result.status !== 0) {
|
|
129572
|
+
process.stderr.write(
|
|
129573
|
+
`[docyrus] Automatic diffity install failed. Continuing without it: ${result.error?.message || summarizeFailure3(result)}
|
|
129574
|
+
`
|
|
129575
|
+
);
|
|
129576
|
+
return {
|
|
129577
|
+
available: false,
|
|
129578
|
+
executablePath,
|
|
129579
|
+
binDir
|
|
129580
|
+
};
|
|
129581
|
+
}
|
|
129582
|
+
return {
|
|
129583
|
+
available: true,
|
|
129584
|
+
executablePath,
|
|
129585
|
+
binDir
|
|
129586
|
+
};
|
|
129587
|
+
}
|
|
129526
129588
|
function resolvePackagedDocyrusPlatformSkillPath(resourceRoot) {
|
|
129527
129589
|
return (0, import_node_path10.join)(resourceRoot, "skills", DOCYRUS_PACKAGED_PLATFORM_SKILL_NAME);
|
|
129528
129590
|
}
|
|
@@ -129607,6 +129669,11 @@ function createPiAgentLauncher(options2) {
|
|
|
129607
129669
|
scope: options2.settingsPaths.scope,
|
|
129608
129670
|
spawnCommand
|
|
129609
129671
|
});
|
|
129672
|
+
const diffity = await ensureManagedDiffityInstalled({
|
|
129673
|
+
agentRootPath,
|
|
129674
|
+
cwd,
|
|
129675
|
+
spawnCommand
|
|
129676
|
+
});
|
|
129610
129677
|
const loaderEntryPath = resolveLoaderPath({ cwd });
|
|
129611
129678
|
const cliEntryPath = resolveCliEntryPath({ cwd });
|
|
129612
129679
|
const piPackageRoot = resolvePiPackageRoot({ cwd });
|
|
@@ -129622,7 +129689,8 @@ function createPiAgentLauncher(options2) {
|
|
|
129622
129689
|
DOCYRUS_PI_VERSION: options2.version || "dev",
|
|
129623
129690
|
DOCYRUS_CLI_EXECUTABLE: processExecPath,
|
|
129624
129691
|
DOCYRUS_CLI_ENTRY: cliEntryPath,
|
|
129625
|
-
DOCYRUS_CLI_SCOPE: options2.settingsPaths.scope
|
|
129692
|
+
DOCYRUS_CLI_SCOPE: options2.settingsPaths.scope,
|
|
129693
|
+
PATH: diffity.available ? prependPathEntry(diffity.binDir, process.env.PATH) : process.env.PATH
|
|
129626
129694
|
}
|
|
129627
129695
|
});
|
|
129628
129696
|
if (result.error) {
|
|
@@ -129641,7 +129709,7 @@ var import_node_child_process5 = require("node:child_process");
|
|
|
129641
129709
|
var import_node_fs6 = require("node:fs");
|
|
129642
129710
|
var import_node_path11 = require("node:path");
|
|
129643
129711
|
var import_node_child_process6 = require("node:child_process");
|
|
129644
|
-
function resolveServerLoaderEntryPath(cwd,
|
|
129712
|
+
function resolveServerLoaderEntryPath(cwd, dirname7) {
|
|
129645
129713
|
const seen = /* @__PURE__ */ new Set();
|
|
129646
129714
|
const candidates = [];
|
|
129647
129715
|
const addCandidate = (candidate) => {
|
|
@@ -129666,10 +129734,10 @@ function resolveServerLoaderEntryPath(cwd, dirname6) {
|
|
|
129666
129734
|
}
|
|
129667
129735
|
};
|
|
129668
129736
|
addCandidate((0, import_node_path11.resolve)(cwd, "dist/apps/api-cli/server-loader.js"));
|
|
129669
|
-
addCandidate((0, import_node_path11.resolve)(
|
|
129670
|
-
addCandidate((0, import_node_path11.resolve)(
|
|
129737
|
+
addCandidate((0, import_node_path11.resolve)(dirname7, "../server-loader.js"));
|
|
129738
|
+
addCandidate((0, import_node_path11.resolve)(dirname7, "server-loader.js"));
|
|
129671
129739
|
collectAncestorCandidates(cwd);
|
|
129672
|
-
collectAncestorCandidates(
|
|
129740
|
+
collectAncestorCandidates(dirname7);
|
|
129673
129741
|
const resolved = candidates.find((candidate) => (0, import_node_fs6.existsSync)(candidate));
|
|
129674
129742
|
if (!resolved) {
|
|
129675
129743
|
throw new UserInputError(`Unable to locate Docyrus pi server loader entry file. Checked: ${candidates.join(", ")}`);
|