@danmoisan/drm-copilot-mcp 1.0.9 → 1.0.11
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/out/mcp-server.js +230 -225
- package/package.json +1 -1
- package/resources/claude-customizations/.claude/hooks/enforce-pr-author-skill.ps1 +2 -41
- package/resources/claude-customizations/.claude/hooks/validate-orchestrator-output.ps1 +26 -5
- package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorState.psm1 +485 -0
- package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorStateCompletion.psm1 +243 -0
- package/resources/claude-customizations/.claude/skills/epic-orchestrate/SKILL.md +7 -0
- package/resources/claude-customizations/.claude/skills/orchestrate/SKILL.md +2 -0
- package/resources/claude-customizations/pack-manifests/core.json +3 -1
- package/resources/config/orchestration-routing.json +1 -1
package/out/mcp-server.js
CHANGED
|
@@ -3231,8 +3231,8 @@ var require_utils = __commonJS({
|
|
|
3231
3231
|
}
|
|
3232
3232
|
return ind;
|
|
3233
3233
|
}
|
|
3234
|
-
function removeDotSegments(
|
|
3235
|
-
let input =
|
|
3234
|
+
function removeDotSegments(path11) {
|
|
3235
|
+
let input = path11;
|
|
3236
3236
|
const output = [];
|
|
3237
3237
|
let nextSlash = -1;
|
|
3238
3238
|
let len = 0;
|
|
@@ -3484,8 +3484,8 @@ var require_schemes = __commonJS({
|
|
|
3484
3484
|
wsComponent.secure = void 0;
|
|
3485
3485
|
}
|
|
3486
3486
|
if (wsComponent.resourceName) {
|
|
3487
|
-
const [
|
|
3488
|
-
wsComponent.path =
|
|
3487
|
+
const [path11, query] = wsComponent.resourceName.split("?");
|
|
3488
|
+
wsComponent.path = path11 && path11 !== "/" ? path11 : void 0;
|
|
3489
3489
|
wsComponent.query = query;
|
|
3490
3490
|
wsComponent.resourceName = void 0;
|
|
3491
3491
|
}
|
|
@@ -6907,7 +6907,7 @@ __export(mcp_server_exports, {
|
|
|
6907
6907
|
});
|
|
6908
6908
|
module.exports = __toCommonJS(mcp_server_exports);
|
|
6909
6909
|
var fs8 = __toESM(require("node:fs"));
|
|
6910
|
-
var
|
|
6910
|
+
var path10 = __toESM(require("node:path"));
|
|
6911
6911
|
|
|
6912
6912
|
// node_modules/zod/v4/core/core.js
|
|
6913
6913
|
var _a;
|
|
@@ -7149,10 +7149,10 @@ function mergeDefs(...defs) {
|
|
|
7149
7149
|
function cloneDef(schema) {
|
|
7150
7150
|
return mergeDefs(schema._zod.def);
|
|
7151
7151
|
}
|
|
7152
|
-
function getElementAtPath(obj,
|
|
7153
|
-
if (!
|
|
7152
|
+
function getElementAtPath(obj, path11) {
|
|
7153
|
+
if (!path11)
|
|
7154
7154
|
return obj;
|
|
7155
|
-
return
|
|
7155
|
+
return path11.reduce((acc, key) => acc?.[key], obj);
|
|
7156
7156
|
}
|
|
7157
7157
|
function promiseAllObject(promisesObj) {
|
|
7158
7158
|
const keys = Object.keys(promisesObj);
|
|
@@ -7561,11 +7561,11 @@ function explicitlyAborted(x, startIndex = 0) {
|
|
|
7561
7561
|
}
|
|
7562
7562
|
return false;
|
|
7563
7563
|
}
|
|
7564
|
-
function prefixIssues(
|
|
7564
|
+
function prefixIssues(path11, issues) {
|
|
7565
7565
|
return issues.map((iss) => {
|
|
7566
7566
|
var _a3;
|
|
7567
7567
|
(_a3 = iss).path ?? (_a3.path = []);
|
|
7568
|
-
iss.path.unshift(
|
|
7568
|
+
iss.path.unshift(path11);
|
|
7569
7569
|
return iss;
|
|
7570
7570
|
});
|
|
7571
7571
|
}
|
|
@@ -7712,16 +7712,16 @@ function flattenError(error2, mapper = (issue2) => issue2.message) {
|
|
|
7712
7712
|
}
|
|
7713
7713
|
function formatError(error2, mapper = (issue2) => issue2.message) {
|
|
7714
7714
|
const fieldErrors = { _errors: [] };
|
|
7715
|
-
const processError = (error3,
|
|
7715
|
+
const processError = (error3, path11 = []) => {
|
|
7716
7716
|
for (const issue2 of error3.issues) {
|
|
7717
7717
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
7718
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
7718
|
+
issue2.errors.map((issues) => processError({ issues }, [...path11, ...issue2.path]));
|
|
7719
7719
|
} else if (issue2.code === "invalid_key") {
|
|
7720
|
-
processError({ issues: issue2.issues }, [...
|
|
7720
|
+
processError({ issues: issue2.issues }, [...path11, ...issue2.path]);
|
|
7721
7721
|
} else if (issue2.code === "invalid_element") {
|
|
7722
|
-
processError({ issues: issue2.issues }, [...
|
|
7722
|
+
processError({ issues: issue2.issues }, [...path11, ...issue2.path]);
|
|
7723
7723
|
} else {
|
|
7724
|
-
const fullpath = [...
|
|
7724
|
+
const fullpath = [...path11, ...issue2.path];
|
|
7725
7725
|
if (fullpath.length === 0) {
|
|
7726
7726
|
fieldErrors._errors.push(mapper(issue2));
|
|
7727
7727
|
} else {
|
|
@@ -15471,38 +15471,12 @@ var StdioServerTransport = class {
|
|
|
15471
15471
|
|
|
15472
15472
|
// ../../extensions/drm-copilot/src/command-runtime.ts
|
|
15473
15473
|
var cp = __toESM(require("node:child_process"));
|
|
15474
|
+
var path2 = __toESM(require("node:path"));
|
|
15475
|
+
var vscode = __toESM(require_vscode());
|
|
15476
|
+
|
|
15477
|
+
// ../../extensions/drm-copilot/src/runtime-detection.ts
|
|
15474
15478
|
var fs = __toESM(require("node:fs"));
|
|
15475
15479
|
var path = __toESM(require("node:path"));
|
|
15476
|
-
var vscode = __toESM(require_vscode());
|
|
15477
|
-
var CommandExecutionError = class extends Error {
|
|
15478
|
-
executable;
|
|
15479
|
-
args;
|
|
15480
|
-
cwd;
|
|
15481
|
-
exitCode;
|
|
15482
|
-
stdout;
|
|
15483
|
-
stderr;
|
|
15484
|
-
constructor(input) {
|
|
15485
|
-
super(`Command exited with code ${input.exitCode ?? "unknown"}.`);
|
|
15486
|
-
this.name = "CommandExecutionError";
|
|
15487
|
-
this.executable = input.executable;
|
|
15488
|
-
this.args = input.args;
|
|
15489
|
-
this.cwd = input.cwd;
|
|
15490
|
-
this.exitCode = input.exitCode;
|
|
15491
|
-
this.stdout = input.stdout;
|
|
15492
|
-
this.stderr = input.stderr;
|
|
15493
|
-
}
|
|
15494
|
-
};
|
|
15495
|
-
function createBufferedOutput() {
|
|
15496
|
-
const lines = [];
|
|
15497
|
-
return {
|
|
15498
|
-
output: {
|
|
15499
|
-
appendLine(line) {
|
|
15500
|
-
lines.push(line);
|
|
15501
|
-
}
|
|
15502
|
-
},
|
|
15503
|
-
lines
|
|
15504
|
-
};
|
|
15505
|
-
}
|
|
15506
15480
|
function executableExists(executable) {
|
|
15507
15481
|
return findExecutableOnPath(executable) !== void 0;
|
|
15508
15482
|
}
|
|
@@ -15556,13 +15530,44 @@ function detectRuntime(runtimeKind) {
|
|
|
15556
15530
|
"PowerShell runtime not found. Expected 'pwsh' or 'powershell' on PATH."
|
|
15557
15531
|
);
|
|
15558
15532
|
}
|
|
15533
|
+
|
|
15534
|
+
// ../../extensions/drm-copilot/src/command-runtime.ts
|
|
15535
|
+
var CommandExecutionError = class extends Error {
|
|
15536
|
+
executable;
|
|
15537
|
+
args;
|
|
15538
|
+
cwd;
|
|
15539
|
+
exitCode;
|
|
15540
|
+
stdout;
|
|
15541
|
+
stderr;
|
|
15542
|
+
constructor(input) {
|
|
15543
|
+
super(`Command exited with code ${input.exitCode ?? "unknown"}.`);
|
|
15544
|
+
this.name = "CommandExecutionError";
|
|
15545
|
+
this.executable = input.executable;
|
|
15546
|
+
this.args = input.args;
|
|
15547
|
+
this.cwd = input.cwd;
|
|
15548
|
+
this.exitCode = input.exitCode;
|
|
15549
|
+
this.stdout = input.stdout;
|
|
15550
|
+
this.stderr = input.stderr;
|
|
15551
|
+
}
|
|
15552
|
+
};
|
|
15553
|
+
function createBufferedOutput() {
|
|
15554
|
+
const lines = [];
|
|
15555
|
+
return {
|
|
15556
|
+
output: {
|
|
15557
|
+
appendLine(line) {
|
|
15558
|
+
lines.push(line);
|
|
15559
|
+
}
|
|
15560
|
+
},
|
|
15561
|
+
lines
|
|
15562
|
+
};
|
|
15563
|
+
}
|
|
15559
15564
|
function resolveBundledScriptPath(extensionRoot, bundledRelativePath) {
|
|
15560
15565
|
const normalizedExtensionRoot = extensionRoot.replace(/\\/g, "/");
|
|
15561
15566
|
const normalizedBundledRelativePath = bundledRelativePath.replace(/\\/g, "/").replace(/^\/+/, "");
|
|
15562
15567
|
if (/^[A-Za-z]:\//.test(normalizedExtensionRoot)) {
|
|
15563
15568
|
return `${normalizedExtensionRoot.replace(/\/+$/, "")}/${normalizedBundledRelativePath}`;
|
|
15564
15569
|
}
|
|
15565
|
-
return
|
|
15570
|
+
return path2.resolve(extensionRoot, bundledRelativePath).replace(/\\/g, "/");
|
|
15566
15571
|
}
|
|
15567
15572
|
function runCommandWithOutput(output, executable, args, cwd) {
|
|
15568
15573
|
return new Promise((resolve4, reject) => {
|
|
@@ -15715,7 +15720,7 @@ var claudePushDownSelectionProperties = {
|
|
|
15715
15720
|
};
|
|
15716
15721
|
|
|
15717
15722
|
// ../../extensions/drm-copilot/src/workflow-command-arguments.ts
|
|
15718
|
-
var
|
|
15723
|
+
var path3 = __toESM(require("node:path"));
|
|
15719
15724
|
var SHORT_NAME_PATTERN = /^[a-z0-9]+(-[a-z0-9]+)*$/;
|
|
15720
15725
|
var FEATURE_NAME_PATTERN = /^[a-z0-9]+(?:[-_][a-z0-9]+)*$/;
|
|
15721
15726
|
var POTENTIAL_PROMOTION_TYPES = [
|
|
@@ -15820,7 +15825,7 @@ function isAbsolutePathLike(filePath) {
|
|
|
15820
15825
|
}
|
|
15821
15826
|
function normalizeWorkspaceDestinationPath(value, workspaceRoot, fieldName) {
|
|
15822
15827
|
const targetPath = normalizeRequiredText(value, fieldName);
|
|
15823
|
-
const resolvedPath = isAbsolutePathLike(targetPath) ? targetPath :
|
|
15828
|
+
const resolvedPath = isAbsolutePathLike(targetPath) ? targetPath : path3.join(workspaceRoot, targetPath);
|
|
15824
15829
|
return resolvedPath.replace(/\\/g, "/");
|
|
15825
15830
|
}
|
|
15826
15831
|
|
|
@@ -16838,7 +16843,7 @@ function isRepoAutomationToolName(name) {
|
|
|
16838
16843
|
}
|
|
16839
16844
|
|
|
16840
16845
|
// ../../extensions/drm-copilot/src/repo-automation-service-support.ts
|
|
16841
|
-
var
|
|
16846
|
+
var path4 = __toESM(require("node:path"));
|
|
16842
16847
|
|
|
16843
16848
|
// ../../extensions/drm-copilot/src/lib/collect-commit-context.ts
|
|
16844
16849
|
var nodePath = __toESM(require("node:path"));
|
|
@@ -17010,7 +17015,7 @@ function normalizeGeneratedPath(filePath) {
|
|
|
17010
17015
|
return filePath.replace(/\\/g, "/");
|
|
17011
17016
|
}
|
|
17012
17017
|
function runCollectCommitContext(input) {
|
|
17013
|
-
const outputPath =
|
|
17018
|
+
const outputPath = path4.join(
|
|
17014
17019
|
input.workspaceRoot,
|
|
17015
17020
|
"artifacts/commit_context.txt"
|
|
17016
17021
|
);
|
|
@@ -17115,9 +17120,9 @@ var RealPushDownFileSystem = class {
|
|
|
17115
17120
|
* @param path Path to inspect.
|
|
17116
17121
|
* @returns True when `path` exists and is a directory.
|
|
17117
17122
|
*/
|
|
17118
|
-
isDir(
|
|
17123
|
+
isDir(path11) {
|
|
17119
17124
|
try {
|
|
17120
|
-
return fs2.statSync(
|
|
17125
|
+
return fs2.statSync(path11).isDirectory();
|
|
17121
17126
|
} catch {
|
|
17122
17127
|
return false;
|
|
17123
17128
|
}
|
|
@@ -17126,9 +17131,9 @@ var RealPushDownFileSystem = class {
|
|
|
17126
17131
|
* @param path Path to inspect.
|
|
17127
17132
|
* @returns True when `path` exists and is a regular file.
|
|
17128
17133
|
*/
|
|
17129
|
-
isFile(
|
|
17134
|
+
isFile(path11) {
|
|
17130
17135
|
try {
|
|
17131
|
-
return fs2.statSync(
|
|
17136
|
+
return fs2.statSync(path11).isFile();
|
|
17132
17137
|
} catch {
|
|
17133
17138
|
return false;
|
|
17134
17139
|
}
|
|
@@ -17137,8 +17142,8 @@ var RealPushDownFileSystem = class {
|
|
|
17137
17142
|
* @param path File to read.
|
|
17138
17143
|
* @returns The file content decoded as UTF-8.
|
|
17139
17144
|
*/
|
|
17140
|
-
readTextFile(
|
|
17141
|
-
return fs2.readFileSync(
|
|
17145
|
+
readTextFile(path11) {
|
|
17146
|
+
return fs2.readFileSync(path11, "utf8");
|
|
17142
17147
|
}
|
|
17143
17148
|
/**
|
|
17144
17149
|
* Write UTF-8 text to a file path, creating parent directories first.
|
|
@@ -17150,19 +17155,19 @@ var RealPushDownFileSystem = class {
|
|
|
17150
17155
|
* @param path Destination file path.
|
|
17151
17156
|
* @param content UTF-8 text to write.
|
|
17152
17157
|
*/
|
|
17153
|
-
writeTextFile(
|
|
17154
|
-
const parent = nodePath2.dirname(
|
|
17158
|
+
writeTextFile(path11, content) {
|
|
17159
|
+
const parent = nodePath2.dirname(path11);
|
|
17155
17160
|
fs2.mkdirSync(parent, { recursive: true });
|
|
17156
17161
|
const lfNormalized = content.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
17157
|
-
fs2.writeFileSync(
|
|
17162
|
+
fs2.writeFileSync(path11, lfNormalized, "utf8");
|
|
17158
17163
|
}
|
|
17159
17164
|
/**
|
|
17160
17165
|
* Ensure a directory exists, creating any missing parents.
|
|
17161
17166
|
*
|
|
17162
17167
|
* @param path Directory path to create.
|
|
17163
17168
|
*/
|
|
17164
|
-
ensureDir(
|
|
17165
|
-
fs2.mkdirSync(
|
|
17169
|
+
ensureDir(path11) {
|
|
17170
|
+
fs2.mkdirSync(path11, { recursive: true });
|
|
17166
17171
|
}
|
|
17167
17172
|
};
|
|
17168
17173
|
|
|
@@ -17299,8 +17304,8 @@ function joinPosix2(root, relative2) {
|
|
|
17299
17304
|
}
|
|
17300
17305
|
return `${normalizedRoot}/${normalizedRelative}`;
|
|
17301
17306
|
}
|
|
17302
|
-
function relativeToPosix(
|
|
17303
|
-
const normalizedPath = toPosixPath(
|
|
17307
|
+
function relativeToPosix(path11, root) {
|
|
17308
|
+
const normalizedPath = toPosixPath(path11).replace(/\/+$/, "");
|
|
17304
17309
|
const normalizedRoot = toPosixPath(root).replace(/\/+$/, "");
|
|
17305
17310
|
if (normalizedPath === normalizedRoot) {
|
|
17306
17311
|
return "";
|
|
@@ -17664,8 +17669,8 @@ function computePublishedPaths(selectedPackNames, manifests) {
|
|
|
17664
17669
|
`No loaded Codex manifest for selected pack '${name}'.`
|
|
17665
17670
|
);
|
|
17666
17671
|
}
|
|
17667
|
-
for (const
|
|
17668
|
-
published.add(
|
|
17672
|
+
for (const path11 of manifest.paths) {
|
|
17673
|
+
published.add(path11);
|
|
17669
17674
|
}
|
|
17670
17675
|
}
|
|
17671
17676
|
return published;
|
|
@@ -17706,8 +17711,8 @@ function joinPosix4(root, relative2) {
|
|
|
17706
17711
|
const normalizedRelative = relative2.replace(/\\/g, "/").replace(/^\/+/, "");
|
|
17707
17712
|
return normalizedRoot === "" ? normalizedRelative : `${normalizedRoot}/${normalizedRelative}`;
|
|
17708
17713
|
}
|
|
17709
|
-
function relativeToPosix2(
|
|
17710
|
-
const normalizedPath = normalizePosix(
|
|
17714
|
+
function relativeToPosix2(path11, root) {
|
|
17715
|
+
const normalizedPath = normalizePosix(path11);
|
|
17711
17716
|
const normalizedRoot = normalizePosix(root);
|
|
17712
17717
|
if (normalizedPath === normalizedRoot) {
|
|
17713
17718
|
return "";
|
|
@@ -17728,44 +17733,44 @@ var CodexFilteringFileSystem = class {
|
|
|
17728
17733
|
bundleRoot;
|
|
17729
17734
|
publishedPaths;
|
|
17730
17735
|
csharpVariant;
|
|
17731
|
-
sourceRelative(
|
|
17732
|
-
return relativeToPosix2(
|
|
17736
|
+
sourceRelative(path11) {
|
|
17737
|
+
return relativeToPosix2(path11, this.sourceRoot);
|
|
17733
17738
|
}
|
|
17734
|
-
isPackIncluded(
|
|
17739
|
+
isPackIncluded(path11) {
|
|
17735
17740
|
if (this.publishedPaths === null) {
|
|
17736
17741
|
return true;
|
|
17737
17742
|
}
|
|
17738
|
-
const relative2 = this.sourceRelative(
|
|
17743
|
+
const relative2 = this.sourceRelative(path11);
|
|
17739
17744
|
return relative2 === null || this.publishedPaths.has(relative2);
|
|
17740
17745
|
}
|
|
17741
|
-
resolveReadSource(
|
|
17746
|
+
resolveReadSource(path11) {
|
|
17742
17747
|
if (this.csharpVariant !== "legacy") {
|
|
17743
|
-
return
|
|
17748
|
+
return path11;
|
|
17744
17749
|
}
|
|
17745
|
-
const relative2 = this.sourceRelative(
|
|
17750
|
+
const relative2 = this.sourceRelative(path11);
|
|
17746
17751
|
if (relative2 === null) {
|
|
17747
|
-
return
|
|
17752
|
+
return path11;
|
|
17748
17753
|
}
|
|
17749
17754
|
const routed = resolveVariantSourcePath(relative2, "legacy");
|
|
17750
|
-
return routed === relative2 ?
|
|
17755
|
+
return routed === relative2 ? path11 : joinPosix4(this.bundleRoot, routed);
|
|
17751
17756
|
}
|
|
17752
17757
|
listFiles(root) {
|
|
17753
|
-
return this.inner.listFiles(root).filter((
|
|
17758
|
+
return this.inner.listFiles(root).filter((path11) => this.isPackIncluded(path11));
|
|
17754
17759
|
}
|
|
17755
|
-
isDir(
|
|
17756
|
-
return this.inner.isDir(
|
|
17760
|
+
isDir(path11) {
|
|
17761
|
+
return this.inner.isDir(path11);
|
|
17757
17762
|
}
|
|
17758
|
-
isFile(
|
|
17759
|
-
return this.inner.isFile(
|
|
17763
|
+
isFile(path11) {
|
|
17764
|
+
return this.inner.isFile(path11);
|
|
17760
17765
|
}
|
|
17761
|
-
readTextFile(
|
|
17762
|
-
return this.inner.readTextFile(this.resolveReadSource(
|
|
17766
|
+
readTextFile(path11) {
|
|
17767
|
+
return this.inner.readTextFile(this.resolveReadSource(path11));
|
|
17763
17768
|
}
|
|
17764
|
-
writeTextFile(
|
|
17765
|
-
this.inner.writeTextFile(
|
|
17769
|
+
writeTextFile(path11, content) {
|
|
17770
|
+
this.inner.writeTextFile(path11, content);
|
|
17766
17771
|
}
|
|
17767
|
-
ensureDir(
|
|
17768
|
-
this.inner.ensureDir(
|
|
17772
|
+
ensureDir(path11) {
|
|
17773
|
+
this.inner.ensureDir(path11);
|
|
17769
17774
|
}
|
|
17770
17775
|
};
|
|
17771
17776
|
function resolvePublishedPaths(packs, csharpVariant, bundleRoot, fs9) {
|
|
@@ -18000,8 +18005,8 @@ function joinPosix6(root, relative2) {
|
|
|
18000
18005
|
}
|
|
18001
18006
|
return `${normalizedRoot}/${normalizedRelative}`;
|
|
18002
18007
|
}
|
|
18003
|
-
function relativeToPosix3(
|
|
18004
|
-
const normalizedPath = normalizePosix3(
|
|
18008
|
+
function relativeToPosix3(path11, root) {
|
|
18009
|
+
const normalizedPath = normalizePosix3(path11);
|
|
18005
18010
|
const normalizedRoot = normalizePosix3(root);
|
|
18006
18011
|
if (normalizedPath === normalizedRoot) {
|
|
18007
18012
|
return "";
|
|
@@ -18048,8 +18053,8 @@ var ExcludingFileSystem = class {
|
|
|
18048
18053
|
* @param path An absolute candidate POSIX path from the inner adapter.
|
|
18049
18054
|
* @returns The source-relative POSIX path, or `null`.
|
|
18050
18055
|
*/
|
|
18051
|
-
sourceRelativePosix(
|
|
18052
|
-
return relativeToPosix3(
|
|
18056
|
+
sourceRelativePosix(path11) {
|
|
18057
|
+
return relativeToPosix3(path11, this.sourceRoot);
|
|
18053
18058
|
}
|
|
18054
18059
|
/**
|
|
18055
18060
|
* Return whether a candidate path is in the active published set.
|
|
@@ -18057,11 +18062,11 @@ var ExcludingFileSystem = class {
|
|
|
18057
18062
|
* @param path An absolute candidate POSIX path.
|
|
18058
18063
|
* @returns True when no pack filter is active or the path is published.
|
|
18059
18064
|
*/
|
|
18060
|
-
isPackIncluded(
|
|
18065
|
+
isPackIncluded(path11) {
|
|
18061
18066
|
if (this.publishedPaths === null) {
|
|
18062
18067
|
return true;
|
|
18063
18068
|
}
|
|
18064
|
-
const relative2 = this.sourceRelativePosix(
|
|
18069
|
+
const relative2 = this.sourceRelativePosix(path11);
|
|
18065
18070
|
if (relative2 === null) {
|
|
18066
18071
|
return true;
|
|
18067
18072
|
}
|
|
@@ -18075,15 +18080,15 @@ var ExcludingFileSystem = class {
|
|
|
18075
18080
|
* @param path An absolute candidate POSIX path.
|
|
18076
18081
|
* @returns True when the file is outside the memory subtree or general-scoped.
|
|
18077
18082
|
*/
|
|
18078
|
-
isScopeIncluded(
|
|
18079
|
-
const relativePath = relativeToPosix3(
|
|
18083
|
+
isScopeIncluded(path11) {
|
|
18084
|
+
const relativePath = relativeToPosix3(path11, this.repoRoot);
|
|
18080
18085
|
if (relativePath === null) {
|
|
18081
18086
|
return true;
|
|
18082
18087
|
}
|
|
18083
18088
|
if (!isUnderAgentMemory(relativePath)) {
|
|
18084
18089
|
return true;
|
|
18085
18090
|
}
|
|
18086
|
-
const content = this.readText(
|
|
18091
|
+
const content = this.readText(path11);
|
|
18087
18092
|
return isGeneralMemoryFile(relativePath, content);
|
|
18088
18093
|
}
|
|
18089
18094
|
/**
|
|
@@ -18092,8 +18097,8 @@ var ExcludingFileSystem = class {
|
|
|
18092
18097
|
* @param path An absolute candidate POSIX path.
|
|
18093
18098
|
* @returns True when the file should be published under the active mode.
|
|
18094
18099
|
*/
|
|
18095
|
-
isMemoryModeIncluded(
|
|
18096
|
-
const relative2 = this.sourceRelativePosix(
|
|
18100
|
+
isMemoryModeIncluded(path11) {
|
|
18101
|
+
const relative2 = this.sourceRelativePosix(path11);
|
|
18097
18102
|
if (relative2 === null) {
|
|
18098
18103
|
return true;
|
|
18099
18104
|
}
|
|
@@ -18121,13 +18126,13 @@ var ExcludingFileSystem = class {
|
|
|
18121
18126
|
* @param path The absolute POSIX path the engine asked to read.
|
|
18122
18127
|
* @returns The redirected legacy source path, or the original path.
|
|
18123
18128
|
*/
|
|
18124
|
-
resolveReadSource(
|
|
18129
|
+
resolveReadSource(path11) {
|
|
18125
18130
|
if (this.csharpVariant !== "legacy") {
|
|
18126
|
-
return
|
|
18131
|
+
return path11;
|
|
18127
18132
|
}
|
|
18128
|
-
const relative2 = this.sourceRelativePosix(
|
|
18133
|
+
const relative2 = this.sourceRelativePosix(path11);
|
|
18129
18134
|
if (relative2 === null || !CSHARP_CANONICAL_PATHS2.includes(relative2)) {
|
|
18130
|
-
return
|
|
18135
|
+
return path11;
|
|
18131
18136
|
}
|
|
18132
18137
|
const redirectedRelative = resolveVariantSourcePath2(relative2, "legacy");
|
|
18133
18138
|
return joinPosix6(this.variantRoot, redirectedRelative);
|
|
@@ -18137,23 +18142,23 @@ var ExcludingFileSystem = class {
|
|
|
18137
18142
|
(p) => !this.excluded.has(normalizePosix3(p)) && this.isPackIncluded(p) && this.isScopeIncluded(p) && this.isMemoryModeIncluded(p)
|
|
18138
18143
|
);
|
|
18139
18144
|
}
|
|
18140
|
-
isDir(
|
|
18141
|
-
return this.inner.isDir(
|
|
18145
|
+
isDir(path11) {
|
|
18146
|
+
return this.inner.isDir(path11);
|
|
18142
18147
|
}
|
|
18143
|
-
isFile(
|
|
18144
|
-
return this.inner.isFile(
|
|
18148
|
+
isFile(path11) {
|
|
18149
|
+
return this.inner.isFile(path11);
|
|
18145
18150
|
}
|
|
18146
|
-
readText(
|
|
18147
|
-
return this.inner.readTextFile(this.resolveReadSource(
|
|
18151
|
+
readText(path11) {
|
|
18152
|
+
return this.inner.readTextFile(this.resolveReadSource(path11));
|
|
18148
18153
|
}
|
|
18149
|
-
readTextFile(
|
|
18150
|
-
return this.readText(
|
|
18154
|
+
readTextFile(path11) {
|
|
18155
|
+
return this.readText(path11);
|
|
18151
18156
|
}
|
|
18152
|
-
writeTextFile(
|
|
18153
|
-
this.inner.writeTextFile(
|
|
18157
|
+
writeTextFile(path11, content) {
|
|
18158
|
+
this.inner.writeTextFile(path11, content);
|
|
18154
18159
|
}
|
|
18155
|
-
ensureDir(
|
|
18156
|
-
this.inner.ensureDir(
|
|
18160
|
+
ensureDir(path11) {
|
|
18161
|
+
this.inner.ensureDir(path11);
|
|
18157
18162
|
}
|
|
18158
18163
|
};
|
|
18159
18164
|
|
|
@@ -18364,11 +18369,11 @@ function runPushDownClaudeCustomizations(input, deps) {
|
|
|
18364
18369
|
}
|
|
18365
18370
|
|
|
18366
18371
|
// ../../extensions/drm-copilot/src/repo-automation-service-workflows.ts
|
|
18367
|
-
var
|
|
18372
|
+
var path7 = __toESM(require("node:path"));
|
|
18368
18373
|
|
|
18369
18374
|
// ../../extensions/drm-copilot/src/policy-audit-template-assets.ts
|
|
18370
18375
|
var fs3 = __toESM(require("node:fs"));
|
|
18371
|
-
var
|
|
18376
|
+
var path5 = __toESM(require("node:path"));
|
|
18372
18377
|
var POLICY_AUDIT_TEMPLATE_ASSET_METADATA = {
|
|
18373
18378
|
template: {
|
|
18374
18379
|
assetId: "policy_audit.template",
|
|
@@ -18393,7 +18398,7 @@ function normalizeRepoPath(filePath) {
|
|
|
18393
18398
|
function resolveBundledPolicyAuditTemplateAsset(extensionRoot, asset) {
|
|
18394
18399
|
const assetMetadata = POLICY_AUDIT_TEMPLATE_ASSET_METADATA[asset];
|
|
18395
18400
|
const bundledSourcePath = normalizeRepoPath(
|
|
18396
|
-
|
|
18401
|
+
path5.join(
|
|
18397
18402
|
extensionRoot,
|
|
18398
18403
|
"resources",
|
|
18399
18404
|
"templates",
|
|
@@ -18411,13 +18416,13 @@ function copyBundledPolicyAuditTemplateAsset(bundledSourcePath, targetPath) {
|
|
|
18411
18416
|
if (normalizedTargetPath === bundledSourcePath) {
|
|
18412
18417
|
return normalizedTargetPath;
|
|
18413
18418
|
}
|
|
18414
|
-
fs3.mkdirSync(
|
|
18419
|
+
fs3.mkdirSync(path5.dirname(normalizedTargetPath), { recursive: true });
|
|
18415
18420
|
fs3.copyFileSync(bundledSourcePath, normalizedTargetPath);
|
|
18416
18421
|
return normalizedTargetPath;
|
|
18417
18422
|
}
|
|
18418
18423
|
|
|
18419
18424
|
// ../../extensions/drm-copilot/src/lib/resolve/resolve-prompts-service-call.ts
|
|
18420
|
-
var
|
|
18425
|
+
var path6 = __toESM(require("node:path"));
|
|
18421
18426
|
|
|
18422
18427
|
// ../../extensions/drm-copilot/src/lib/file-system.ts
|
|
18423
18428
|
var fs4 = __toESM(require("node:fs"));
|
|
@@ -18512,9 +18517,9 @@ var RealFileSystem = class {
|
|
|
18512
18517
|
* @param path Path to test.
|
|
18513
18518
|
* @returns True when `path` exists and is a regular file.
|
|
18514
18519
|
*/
|
|
18515
|
-
isFile(
|
|
18520
|
+
isFile(path11) {
|
|
18516
18521
|
try {
|
|
18517
|
-
return fs4.statSync(
|
|
18522
|
+
return fs4.statSync(path11).isFile();
|
|
18518
18523
|
} catch {
|
|
18519
18524
|
return false;
|
|
18520
18525
|
}
|
|
@@ -18523,16 +18528,16 @@ var RealFileSystem = class {
|
|
|
18523
18528
|
* @param path Path to test.
|
|
18524
18529
|
* @returns True when `path` exists; false on any access error.
|
|
18525
18530
|
*/
|
|
18526
|
-
exists(
|
|
18527
|
-
return fs4.existsSync(
|
|
18531
|
+
exists(path11) {
|
|
18532
|
+
return fs4.existsSync(path11);
|
|
18528
18533
|
}
|
|
18529
18534
|
/**
|
|
18530
18535
|
* @param path Path to test.
|
|
18531
18536
|
* @returns True when `path` exists and is a directory; false otherwise.
|
|
18532
18537
|
*/
|
|
18533
|
-
isDirectory(
|
|
18538
|
+
isDirectory(path11) {
|
|
18534
18539
|
try {
|
|
18535
|
-
return fs4.statSync(
|
|
18540
|
+
return fs4.statSync(path11).isDirectory();
|
|
18536
18541
|
} catch {
|
|
18537
18542
|
return false;
|
|
18538
18543
|
}
|
|
@@ -18542,9 +18547,9 @@ var RealFileSystem = class {
|
|
|
18542
18547
|
* @returns Sorted child names; an empty array when `path` is not a readable
|
|
18543
18548
|
* directory.
|
|
18544
18549
|
*/
|
|
18545
|
-
listDirectory(
|
|
18550
|
+
listDirectory(path11) {
|
|
18546
18551
|
try {
|
|
18547
|
-
return fs4.readdirSync(
|
|
18552
|
+
return fs4.readdirSync(path11).sort((left, right) => left.localeCompare(right));
|
|
18548
18553
|
} catch {
|
|
18549
18554
|
return [];
|
|
18550
18555
|
}
|
|
@@ -18553,15 +18558,15 @@ var RealFileSystem = class {
|
|
|
18553
18558
|
* @param path File to read.
|
|
18554
18559
|
* @returns The file content decoded as UTF-8.
|
|
18555
18560
|
*/
|
|
18556
|
-
readTextFile(
|
|
18557
|
-
return fs4.readFileSync(
|
|
18561
|
+
readTextFile(path11) {
|
|
18562
|
+
return fs4.readFileSync(path11, "utf8");
|
|
18558
18563
|
}
|
|
18559
18564
|
/**
|
|
18560
18565
|
* @param path File to write.
|
|
18561
18566
|
* @param content Text content to write as UTF-8.
|
|
18562
18567
|
*/
|
|
18563
|
-
writeTextFile(
|
|
18564
|
-
fs4.writeFileSync(
|
|
18568
|
+
writeTextFile(path11, content) {
|
|
18569
|
+
fs4.writeFileSync(path11, content, "utf8");
|
|
18565
18570
|
}
|
|
18566
18571
|
/**
|
|
18567
18572
|
* Create the directory at `path`, including any missing parents.
|
|
@@ -18572,8 +18577,8 @@ var RealFileSystem = class {
|
|
|
18572
18577
|
*
|
|
18573
18578
|
* @param path Directory path to create.
|
|
18574
18579
|
*/
|
|
18575
|
-
ensureDir(
|
|
18576
|
-
fs4.mkdirSync(
|
|
18580
|
+
ensureDir(path11) {
|
|
18581
|
+
fs4.mkdirSync(path11, { recursive: true });
|
|
18577
18582
|
}
|
|
18578
18583
|
};
|
|
18579
18584
|
|
|
@@ -18806,8 +18811,8 @@ function resolveOutputPath(output, workspaceRoot) {
|
|
|
18806
18811
|
}
|
|
18807
18812
|
return joinPosix9(toPosixPath2(workspaceRoot), output);
|
|
18808
18813
|
}
|
|
18809
|
-
function tryRelativeToWorkspace(
|
|
18810
|
-
const normalizedPath = toPosixPath2(
|
|
18814
|
+
function tryRelativeToWorkspace(path11, workspaceRoot) {
|
|
18815
|
+
const normalizedPath = toPosixPath2(path11).replace(/\/+$/, "");
|
|
18811
18816
|
const normalizedRoot = toPosixPath2(workspaceRoot).replace(/\/+$/, "");
|
|
18812
18817
|
if (normalizedPath === normalizedRoot) {
|
|
18813
18818
|
return "";
|
|
@@ -18931,8 +18936,8 @@ function stripFrontMatter(content) {
|
|
|
18931
18936
|
function splitPathPlatformAgnostic(pathStr) {
|
|
18932
18937
|
return pathStr.split(/[\\/]+/).filter((part) => part.length > 0);
|
|
18933
18938
|
}
|
|
18934
|
-
function tryRelativeToWorkspace2(
|
|
18935
|
-
const normalizedPath = toPosixPath2(
|
|
18939
|
+
function tryRelativeToWorkspace2(path11, workspaceRoot) {
|
|
18940
|
+
const normalizedPath = toPosixPath2(path11).replace(/\/+$/, "");
|
|
18936
18941
|
const normalizedRoot = toPosixPath2(workspaceRoot).replace(/\/+$/, "");
|
|
18937
18942
|
if (normalizedPath === normalizedRoot) {
|
|
18938
18943
|
return "";
|
|
@@ -19114,7 +19119,7 @@ function resolveExecuteHardLockPromptServiceCall(input) {
|
|
|
19114
19119
|
);
|
|
19115
19120
|
}
|
|
19116
19121
|
const templateRoot = toPosixPath2(
|
|
19117
|
-
|
|
19122
|
+
path6.join(
|
|
19118
19123
|
input.extensionRoot,
|
|
19119
19124
|
"resources",
|
|
19120
19125
|
"customizations",
|
|
@@ -19146,7 +19151,7 @@ ${emittedLines.join("\n")}`
|
|
|
19146
19151
|
}
|
|
19147
19152
|
const artifacts = input.output === void 0 ? void 0 : [
|
|
19148
19153
|
normalizeGeneratedPath(
|
|
19149
|
-
isAbsolutePathLike(input.output) ? input.output :
|
|
19154
|
+
isAbsolutePathLike(input.output) ? input.output : path6.join(input.workspaceRoot, input.output)
|
|
19150
19155
|
)
|
|
19151
19156
|
];
|
|
19152
19157
|
return {
|
|
@@ -19158,7 +19163,7 @@ ${emittedLines.join("\n")}`
|
|
|
19158
19163
|
}
|
|
19159
19164
|
function resolveAtomicPlanPromptServiceCall(input) {
|
|
19160
19165
|
const templatePath = toPosixPath2(
|
|
19161
|
-
|
|
19166
|
+
path6.join(
|
|
19162
19167
|
input.extensionRoot,
|
|
19163
19168
|
"resources",
|
|
19164
19169
|
"customizations",
|
|
@@ -19167,7 +19172,7 @@ function resolveAtomicPlanPromptServiceCall(input) {
|
|
|
19167
19172
|
"generate-atomic-plan.prompt.md"
|
|
19168
19173
|
)
|
|
19169
19174
|
);
|
|
19170
|
-
const targetPath = isAbsolutePathLike(input.target) ? toPosixPath2(input.target) : toPosixPath2(
|
|
19175
|
+
const targetPath = isAbsolutePathLike(input.target) ? toPosixPath2(input.target) : toPosixPath2(path6.join(input.workspaceRoot, input.target));
|
|
19171
19176
|
const emittedLines = [];
|
|
19172
19177
|
const log = (message) => {
|
|
19173
19178
|
emittedLines.push(message);
|
|
@@ -19216,7 +19221,7 @@ function resolvePolicyAuditTemplateAssetResult(extensionRoot, input) {
|
|
|
19216
19221
|
}
|
|
19217
19222
|
function buildTemplateRoot(extensionRoot) {
|
|
19218
19223
|
return normalizeGeneratedPath(
|
|
19219
|
-
|
|
19224
|
+
path7.join(extensionRoot, "resources", "feature-templates")
|
|
19220
19225
|
);
|
|
19221
19226
|
}
|
|
19222
19227
|
function runResolveExecuteHardLockPrompt(deps, input) {
|
|
@@ -19241,7 +19246,7 @@ function runResolveAtomicPlanPrompt(deps, input) {
|
|
|
19241
19246
|
}
|
|
19242
19247
|
|
|
19243
19248
|
// ../../extensions/drm-copilot/src/lib/codex-native-converter/codex-native-converter-service-call.ts
|
|
19244
|
-
var
|
|
19249
|
+
var path8 = __toESM(require("node:path"));
|
|
19245
19250
|
|
|
19246
19251
|
// ../../extensions/drm-copilot/src/lib/codex-native-converter/models-intermediate.ts
|
|
19247
19252
|
var TargetRole = {
|
|
@@ -21697,7 +21702,7 @@ function resolveAgainstWorkspace(workspaceRoot, value) {
|
|
|
21697
21702
|
return normalizedValue.replace(/\/+$/, "");
|
|
21698
21703
|
}
|
|
21699
21704
|
return toPosixPath2(
|
|
21700
|
-
|
|
21705
|
+
path8.posix.join(toPosixPath2(workspaceRoot), normalizedValue)
|
|
21701
21706
|
).replace(/\/+$/, "");
|
|
21702
21707
|
}
|
|
21703
21708
|
function reportParent(conversionReportPath) {
|
|
@@ -21784,7 +21789,7 @@ var SubprocessRunner = class {
|
|
|
21784
21789
|
};
|
|
21785
21790
|
|
|
21786
21791
|
// ../../extensions/drm-copilot/src/lib/validate/validate-orchestration-service-call.ts
|
|
21787
|
-
var
|
|
21792
|
+
var path9 = __toESM(require("node:path"));
|
|
21788
21793
|
|
|
21789
21794
|
// ../../extensions/drm-copilot/src/lib/validate/epic-orchestrator-state-core.ts
|
|
21790
21795
|
var REQUIRED_BASELINE_KEYS = [
|
|
@@ -22283,8 +22288,8 @@ function isObject6(value) {
|
|
|
22283
22288
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
22284
22289
|
}
|
|
22285
22290
|
function loadRoutingMatrix(fs9, root) {
|
|
22286
|
-
const
|
|
22287
|
-
return JSON.parse(fs9.readTextFile(
|
|
22291
|
+
const path11 = `${toPosixPath2(root).replace(/\/+$/, "")}/${ROUTING_MATRIX_RELATIVE_PATH}`;
|
|
22292
|
+
return JSON.parse(fs9.readTextFile(path11));
|
|
22288
22293
|
}
|
|
22289
22294
|
function stringList(value) {
|
|
22290
22295
|
if (!Array.isArray(value)) {
|
|
@@ -23114,7 +23119,7 @@ function validateArtifact(input) {
|
|
|
23114
23119
|
// ../../extensions/drm-copilot/src/lib/validate/validate-orchestration-service-call.ts
|
|
23115
23120
|
function validateOrchestrationServiceCall(input) {
|
|
23116
23121
|
const artifactFullPath = toPosixPath2(
|
|
23117
|
-
|
|
23122
|
+
path9.join(input.workspaceRoot, input.artifactPath)
|
|
23118
23123
|
);
|
|
23119
23124
|
const text = input.fileSystem.readTextFile(artifactFullPath);
|
|
23120
23125
|
const errors = validateArtifact({
|
|
@@ -23990,13 +23995,13 @@ var GhClient = class {
|
|
|
23990
23995
|
* @param path Repo-relative file path.
|
|
23991
23996
|
* @returns The decoded file content, or `null`.
|
|
23992
23997
|
*/
|
|
23993
|
-
fetchRepoFile(
|
|
23998
|
+
fetchRepoFile(path11) {
|
|
23994
23999
|
this.ensureAvailable();
|
|
23995
24000
|
const repo = this.repoName();
|
|
23996
24001
|
if (!repo) {
|
|
23997
24002
|
return null;
|
|
23998
24003
|
}
|
|
23999
|
-
const apiPath = `repos/${repo}/contents/${
|
|
24004
|
+
const apiPath = `repos/${repo}/contents/${path11.replace(/^\/+/u, "")}`;
|
|
24000
24005
|
let payload;
|
|
24001
24006
|
try {
|
|
24002
24007
|
payload = this.requestJson([this.ghExecutable, "api", apiPath], {
|
|
@@ -24611,8 +24616,8 @@ function resolveFeatureDir2(fs9, baseDir, feature) {
|
|
|
24611
24616
|
}
|
|
24612
24617
|
return null;
|
|
24613
24618
|
}
|
|
24614
|
-
function readText(fs9,
|
|
24615
|
-
return fs9.exists(
|
|
24619
|
+
function readText(fs9, path11) {
|
|
24620
|
+
return fs9.exists(path11) ? fs9.readTextFile(path11) : "";
|
|
24616
24621
|
}
|
|
24617
24622
|
function latestGlobPath(fs9, directory, pattern) {
|
|
24618
24623
|
const matches = [...fs9.glob(directory, pattern)].sort(compareCodePoint4);
|
|
@@ -24670,9 +24675,9 @@ function resolveReadinessSignal(fs9, featureDir) {
|
|
|
24670
24675
|
}
|
|
24671
24676
|
return [null, null];
|
|
24672
24677
|
}
|
|
24673
|
-
function relativeToPosix4(root,
|
|
24678
|
+
function relativeToPosix4(root, path11) {
|
|
24674
24679
|
const normalizedRoot = toPosixPath2(root).replace(/\/+$/u, "");
|
|
24675
|
-
const normalized = toPosixPath2(
|
|
24680
|
+
const normalized = toPosixPath2(path11);
|
|
24676
24681
|
if (normalized.startsWith(`${normalizedRoot}/`)) {
|
|
24677
24682
|
return normalized.slice(normalizedRoot.length + 1);
|
|
24678
24683
|
}
|
|
@@ -24974,9 +24979,9 @@ function buildExcerpt(feature, storyParts, specParts, planSection, verificationB
|
|
|
24974
24979
|
function buildContextFiles(params) {
|
|
24975
24980
|
const { fs: fs9, root, feature, candidatePaths, readinessSource } = params;
|
|
24976
24981
|
const contextFiles = [];
|
|
24977
|
-
for (const
|
|
24978
|
-
if (fs9.exists(
|
|
24979
|
-
contextFiles.push(relativeToPosix4(root,
|
|
24982
|
+
for (const path11 of candidatePaths) {
|
|
24983
|
+
if (fs9.exists(path11)) {
|
|
24984
|
+
contextFiles.push(relativeToPosix4(root, path11));
|
|
24980
24985
|
}
|
|
24981
24986
|
}
|
|
24982
24987
|
if (readinessSource !== null) {
|
|
@@ -25186,13 +25191,13 @@ function parseNameStatusMap(nameStatusText) {
|
|
|
25186
25191
|
continue;
|
|
25187
25192
|
}
|
|
25188
25193
|
const status = parts[0].trim();
|
|
25189
|
-
const
|
|
25190
|
-
mapping.set(
|
|
25194
|
+
const path11 = formatDiffPath2(parts[parts.length - 1].trim());
|
|
25195
|
+
mapping.set(path11, status);
|
|
25191
25196
|
}
|
|
25192
25197
|
return mapping;
|
|
25193
25198
|
}
|
|
25194
|
-
function isScopingDoc(
|
|
25195
|
-
const lowered =
|
|
25199
|
+
function isScopingDoc(path11) {
|
|
25200
|
+
const lowered = path11.toLowerCase();
|
|
25196
25201
|
return lowered.startsWith("docs/features/") && (lowered.endsWith("/spec.md") || lowered.endsWith("/plan.md") || lowered.endsWith("/bug-remediation-plan.md") || lowered.endsWith("/user-story.md") || lowered.endsWith("/readme.md"));
|
|
25197
25202
|
}
|
|
25198
25203
|
function scopingDocChanges(options) {
|
|
@@ -25202,11 +25207,11 @@ function scopingDocChanges(options) {
|
|
|
25202
25207
|
}
|
|
25203
25208
|
const changes = [];
|
|
25204
25209
|
const nameStatusMap = parseNameStatusMap(nameStatusText);
|
|
25205
|
-
for (const [
|
|
25206
|
-
if (!isScopingDoc(
|
|
25210
|
+
for (const [path11, status] of nameStatusMap) {
|
|
25211
|
+
if (!isScopingDoc(path11)) {
|
|
25207
25212
|
continue;
|
|
25208
25213
|
}
|
|
25209
|
-
const [additions, deletions] = numstatDetails.get(
|
|
25214
|
+
const [additions, deletions] = numstatDetails.get(path11) ?? [0, 0];
|
|
25210
25215
|
const reasons = [];
|
|
25211
25216
|
let material = false;
|
|
25212
25217
|
if (status.startsWith("A")) {
|
|
@@ -25222,7 +25227,7 @@ function scopingDocChanges(options) {
|
|
|
25222
25227
|
mergeBase,
|
|
25223
25228
|
headSha,
|
|
25224
25229
|
"--",
|
|
25225
|
-
|
|
25230
|
+
path11
|
|
25226
25231
|
]);
|
|
25227
25232
|
let headingTouched = false;
|
|
25228
25233
|
for (const line of splitLines2(diffText)) {
|
|
@@ -25251,7 +25256,7 @@ function scopingDocChanges(options) {
|
|
|
25251
25256
|
}
|
|
25252
25257
|
}
|
|
25253
25258
|
let excerpt = null;
|
|
25254
|
-
const docPath = `${stripTrailingSlash(root)}/${
|
|
25259
|
+
const docPath = `${stripTrailingSlash(root)}/${path11}`;
|
|
25255
25260
|
if (material && fs9.exists(docPath)) {
|
|
25256
25261
|
const content = fs9.readTextFile(docPath);
|
|
25257
25262
|
const excerptParts = [];
|
|
@@ -25265,7 +25270,7 @@ ${truncateLines(sectionText, 40)}`);
|
|
|
25265
25270
|
excerpt = excerptParts.length > 0 ? excerptParts.slice(0, 3).join("\n\n") : null;
|
|
25266
25271
|
}
|
|
25267
25272
|
changes.push({
|
|
25268
|
-
path:
|
|
25273
|
+
path: path11,
|
|
25269
25274
|
additions,
|
|
25270
25275
|
deletions,
|
|
25271
25276
|
changeType: status,
|
|
@@ -25285,7 +25290,7 @@ function bucketText(name, entries) {
|
|
|
25285
25290
|
);
|
|
25286
25291
|
const lines = [
|
|
25287
25292
|
`${name}: ${entries.length} files`,
|
|
25288
|
-
...sortedEntries.slice(0, 10).map(([
|
|
25293
|
+
...sortedEntries.slice(0, 10).map(([path11, [adds, dels]]) => `- ${path11} (+${adds}/-${dels})`)
|
|
25289
25294
|
];
|
|
25290
25295
|
return lines.join("\n");
|
|
25291
25296
|
}
|
|
@@ -25363,7 +25368,7 @@ function collectPrContext(options) {
|
|
|
25363
25368
|
const changedPaths = extractChangedPaths(contextResult.text);
|
|
25364
25369
|
const featureDocs = gatherFeatureExcerpts2(fs9, resolvedRoot, changedPaths);
|
|
25365
25370
|
const additionalContextFiles = sortedSet3(
|
|
25366
|
-
featureDocs.flatMap((doc) => doc.contextFiles).filter((
|
|
25371
|
+
featureDocs.flatMap((doc) => doc.contextFiles).filter((path11) => path11)
|
|
25367
25372
|
);
|
|
25368
25373
|
const featureIssueRefs = sortedSet3(
|
|
25369
25374
|
featureDocs.flatMap((doc) => doc.issueRefs).filter((ref) => ref.trim())
|
|
@@ -25499,14 +25504,14 @@ function collectPrContext(options) {
|
|
|
25499
25504
|
const bucketCore = [];
|
|
25500
25505
|
const bucketRenames = [];
|
|
25501
25506
|
const bucketDocs = [];
|
|
25502
|
-
for (const [
|
|
25503
|
-
const stats = perFileStats.get(
|
|
25507
|
+
for (const [path11, status] of statusMap) {
|
|
25508
|
+
const stats = perFileStats.get(path11) ?? [0, 0];
|
|
25504
25509
|
if (status.startsWith("R")) {
|
|
25505
|
-
bucketRenames.push([
|
|
25506
|
-
} else if (
|
|
25507
|
-
bucketCore.push([
|
|
25508
|
-
} else if (
|
|
25509
|
-
bucketDocs.push([
|
|
25510
|
+
bucketRenames.push([path11, stats]);
|
|
25511
|
+
} else if (path11.endsWith(".py") || path11.endsWith(".ps1")) {
|
|
25512
|
+
bucketCore.push([path11, stats]);
|
|
25513
|
+
} else if (path11.startsWith("docs/") || path11.startsWith(".github") || path11.includes("AGENTS")) {
|
|
25514
|
+
bucketDocs.push([path11, stats]);
|
|
25510
25515
|
}
|
|
25511
25516
|
}
|
|
25512
25517
|
return {
|
|
@@ -25819,9 +25824,9 @@ function buildScopingSummaryLines(collected) {
|
|
|
25819
25824
|
const lines = [];
|
|
25820
25825
|
if (collected.materialScoping.length > 0) {
|
|
25821
25826
|
lines.push("Scoping docs changed (material):");
|
|
25822
|
-
for (const { path:
|
|
25827
|
+
for (const { path: path11, reasons, excerpt } of collected.materialScoping) {
|
|
25823
25828
|
const reasonText = `Reasons: ${reasons.length > 0 ? reasons.join(", ") : "(unspecified)"}`;
|
|
25824
|
-
lines.push(`- ${
|
|
25829
|
+
lines.push(`- ${path11} (${reasonText})`);
|
|
25825
25830
|
if (excerpt) {
|
|
25826
25831
|
lines.push(truncateLines(excerpt, 40));
|
|
25827
25832
|
}
|
|
@@ -25829,9 +25834,9 @@ function buildScopingSummaryLines(collected) {
|
|
|
25829
25834
|
}
|
|
25830
25835
|
if (collected.nonMaterialScoping.length > 0) {
|
|
25831
25836
|
lines.push("Scoping docs changed (non-material):");
|
|
25832
|
-
for (const { path:
|
|
25837
|
+
for (const { path: path11, reasons } of collected.nonMaterialScoping.slice(0, 5)) {
|
|
25833
25838
|
const reasonText = `Reasons: ${reasons.length > 0 ? reasons.join(", ") : "(unspecified)"}`;
|
|
25834
|
-
lines.push(`- ${
|
|
25839
|
+
lines.push(`- ${path11} (${reasonText})`);
|
|
25835
25840
|
}
|
|
25836
25841
|
}
|
|
25837
25842
|
if (lines.length === 0) {
|
|
@@ -25855,8 +25860,8 @@ function buildCloseCandidatesSectionFromCollected(collected) {
|
|
|
25855
25860
|
authorReason: collected.authorReason
|
|
25856
25861
|
});
|
|
25857
25862
|
}
|
|
25858
|
-
function parentDir(
|
|
25859
|
-
const normalized = toPosixPath2(
|
|
25863
|
+
function parentDir(path11) {
|
|
25864
|
+
const normalized = toPosixPath2(path11);
|
|
25860
25865
|
const index = normalized.lastIndexOf("/");
|
|
25861
25866
|
return index <= 0 ? "" : normalized.slice(0, index);
|
|
25862
25867
|
}
|
|
@@ -26236,20 +26241,20 @@ var RealPotentialFileSystem = class {
|
|
|
26236
26241
|
return nodePath6.resolve(expanded);
|
|
26237
26242
|
}
|
|
26238
26243
|
/** @returns True when `path` exists. */
|
|
26239
|
-
exists(
|
|
26240
|
-
return fs6.existsSync(
|
|
26244
|
+
exists(path11) {
|
|
26245
|
+
return fs6.existsSync(path11);
|
|
26241
26246
|
}
|
|
26242
26247
|
/** @returns The UTF-8 file content. */
|
|
26243
|
-
readText(
|
|
26244
|
-
return fs6.readFileSync(
|
|
26248
|
+
readText(path11) {
|
|
26249
|
+
return fs6.readFileSync(path11, "utf8");
|
|
26245
26250
|
}
|
|
26246
26251
|
/** Write `lines` joined with `\n` as UTF-8 text. */
|
|
26247
|
-
writeLines(
|
|
26248
|
-
fs6.writeFileSync(
|
|
26252
|
+
writeLines(path11, lines) {
|
|
26253
|
+
fs6.writeFileSync(path11, lines.join("\n"), "utf8");
|
|
26249
26254
|
}
|
|
26250
26255
|
/** Create `path` and any missing parents (idempotent). */
|
|
26251
|
-
ensureDir(
|
|
26252
|
-
fs6.mkdirSync(
|
|
26256
|
+
ensureDir(path11) {
|
|
26257
|
+
fs6.mkdirSync(path11, { recursive: true });
|
|
26253
26258
|
}
|
|
26254
26259
|
/** Move `src` to `dest`, ensuring the destination parent exists first. */
|
|
26255
26260
|
move(src, dest) {
|
|
@@ -26533,8 +26538,8 @@ var RealFolderFileSystem = class {
|
|
|
26533
26538
|
* @param path Path to test.
|
|
26534
26539
|
* @returns True when `path` exists (file or directory).
|
|
26535
26540
|
*/
|
|
26536
|
-
exists(
|
|
26537
|
-
return nodeFs.existsSync(
|
|
26541
|
+
exists(path11) {
|
|
26542
|
+
return nodeFs.existsSync(path11);
|
|
26538
26543
|
}
|
|
26539
26544
|
/**
|
|
26540
26545
|
* Create `path` including missing parents.
|
|
@@ -26544,8 +26549,8 @@ var RealFolderFileSystem = class {
|
|
|
26544
26549
|
*
|
|
26545
26550
|
* @param path Directory path to create.
|
|
26546
26551
|
*/
|
|
26547
|
-
ensureDir(
|
|
26548
|
-
nodeFs.mkdirSync(
|
|
26552
|
+
ensureDir(path11) {
|
|
26553
|
+
nodeFs.mkdirSync(path11, { recursive: true });
|
|
26549
26554
|
}
|
|
26550
26555
|
/**
|
|
26551
26556
|
* Copy the file bytes from `src` to `dest`.
|
|
@@ -26597,15 +26602,15 @@ var RealFolderFileSystem = class {
|
|
|
26597
26602
|
* @returns Forward-slash file paths directly under `path`, or `[]` when the
|
|
26598
26603
|
* directory is missing.
|
|
26599
26604
|
*/
|
|
26600
|
-
listFiles(
|
|
26601
|
-
if (!nodeFs.existsSync(
|
|
26605
|
+
listFiles(path11) {
|
|
26606
|
+
if (!nodeFs.existsSync(path11)) {
|
|
26602
26607
|
return [];
|
|
26603
26608
|
}
|
|
26604
|
-
const entries = nodeFs.readdirSync(
|
|
26609
|
+
const entries = nodeFs.readdirSync(path11, { withFileTypes: true });
|
|
26605
26610
|
const files = [];
|
|
26606
26611
|
for (const entry of entries) {
|
|
26607
26612
|
if (entry.isFile()) {
|
|
26608
|
-
files.push(joinPosix13(toPosixPath2(
|
|
26613
|
+
files.push(joinPosix13(toPosixPath2(path11), entry.name));
|
|
26609
26614
|
}
|
|
26610
26615
|
}
|
|
26611
26616
|
return files;
|
|
@@ -26614,8 +26619,8 @@ var RealFolderFileSystem = class {
|
|
|
26614
26619
|
* @param path File to read.
|
|
26615
26620
|
* @returns The file content decoded as UTF-8.
|
|
26616
26621
|
*/
|
|
26617
|
-
readText(
|
|
26618
|
-
return nodeFs.readFileSync(
|
|
26622
|
+
readText(path11) {
|
|
26623
|
+
return nodeFs.readFileSync(path11, "utf8");
|
|
26619
26624
|
}
|
|
26620
26625
|
/**
|
|
26621
26626
|
* Write `content` to `path`, creating the parent directory first.
|
|
@@ -26623,10 +26628,10 @@ var RealFolderFileSystem = class {
|
|
|
26623
26628
|
* @param path File to write.
|
|
26624
26629
|
* @param content Text content to write as UTF-8.
|
|
26625
26630
|
*/
|
|
26626
|
-
writeText(
|
|
26627
|
-
const parent = toPosixPath2(nodePath8.dirname(
|
|
26631
|
+
writeText(path11, content) {
|
|
26632
|
+
const parent = toPosixPath2(nodePath8.dirname(path11));
|
|
26628
26633
|
nodeFs.mkdirSync(parent, { recursive: true });
|
|
26629
|
-
nodeFs.writeFileSync(
|
|
26634
|
+
nodeFs.writeFileSync(path11, content, "utf8");
|
|
26630
26635
|
}
|
|
26631
26636
|
/**
|
|
26632
26637
|
* Move `src` to `dest`, replacing an existing destination file.
|
|
@@ -26969,22 +26974,22 @@ function defaultCodeLauncher2(files, deps = {
|
|
|
26969
26974
|
}
|
|
26970
26975
|
|
|
26971
26976
|
// ../../extensions/drm-copilot/src/lib/new-active-feature-folder/io.ts
|
|
26972
|
-
function baseName(
|
|
26973
|
-
const normalized = toPosixPath2(
|
|
26977
|
+
function baseName(path11) {
|
|
26978
|
+
const normalized = toPosixPath2(path11).replace(/\/+$/, "");
|
|
26974
26979
|
const slash = normalized.lastIndexOf("/");
|
|
26975
26980
|
return slash === -1 ? normalized : normalized.slice(slash + 1);
|
|
26976
26981
|
}
|
|
26977
|
-
function suffix(
|
|
26978
|
-
const name = baseName(
|
|
26982
|
+
function suffix(path11) {
|
|
26983
|
+
const name = baseName(path11);
|
|
26979
26984
|
const dot = name.lastIndexOf(".");
|
|
26980
26985
|
if (dot <= 0) {
|
|
26981
26986
|
return "";
|
|
26982
26987
|
}
|
|
26983
26988
|
return name.slice(dot);
|
|
26984
26989
|
}
|
|
26985
|
-
function stem(
|
|
26986
|
-
const name = baseName(
|
|
26987
|
-
const ext = suffix(
|
|
26990
|
+
function stem(path11) {
|
|
26991
|
+
const name = baseName(path11);
|
|
26992
|
+
const ext = suffix(path11);
|
|
26988
26993
|
return ext ? name.slice(0, name.length - ext.length) : name;
|
|
26989
26994
|
}
|
|
26990
26995
|
function findPotentialFile(featureName, workspace2, fs9) {
|
|
@@ -27121,11 +27126,11 @@ function defaultIssueFetcher(issueNumber, runner, ghLookup = defaultGhLookup) {
|
|
|
27121
27126
|
}
|
|
27122
27127
|
|
|
27123
27128
|
// ../../extensions/drm-copilot/src/lib/new-active-feature-folder/docs.ts
|
|
27124
|
-
function applyHeaderAndSections(
|
|
27125
|
-
if (!fs9.exists(
|
|
27129
|
+
function applyHeaderAndSections(path11, featureName, issueField, ownerField, updatedField, parentField, statusField, versionField, fs9, updates) {
|
|
27130
|
+
if (!fs9.exists(path11)) {
|
|
27126
27131
|
return;
|
|
27127
27132
|
}
|
|
27128
|
-
let content = fs9.readText(
|
|
27133
|
+
let content = fs9.readText(path11);
|
|
27129
27134
|
content = setHeaderPlaceholder(
|
|
27130
27135
|
content,
|
|
27131
27136
|
featureName,
|
|
@@ -27139,7 +27144,7 @@ function applyHeaderAndSections(path10, featureName, issueField, ownerField, upd
|
|
|
27139
27144
|
for (const [sectionName, body] of updates) {
|
|
27140
27145
|
content = setSection(content, sectionName, body);
|
|
27141
27146
|
}
|
|
27142
|
-
fs9.writeText(
|
|
27147
|
+
fs9.writeText(path11, content);
|
|
27143
27148
|
}
|
|
27144
27149
|
function updateFeatureDocs(featureType, featureName, targetDir, issueField, ownerField, updatedField, parentField, statusField, versionField, planUpdatedField, fs9, sections, planPath) {
|
|
27145
27150
|
const filesToOpen = [];
|
|
@@ -27561,7 +27566,7 @@ function createActiveFolder(options) {
|
|
|
27561
27566
|
emit(`Fallback reason: ${fallbackReason}`);
|
|
27562
27567
|
}
|
|
27563
27568
|
if (filesToOpen.length > 0) {
|
|
27564
|
-
const existing = filesToOpen.filter((
|
|
27569
|
+
const existing = filesToOpen.filter((path11) => filesystem.exists(path11));
|
|
27565
27570
|
if (potentialIssuePath) {
|
|
27566
27571
|
existing.push(potentialIssuePath);
|
|
27567
27572
|
}
|
|
@@ -27569,8 +27574,8 @@ function createActiveFolder(options) {
|
|
|
27569
27574
|
const opened = codeLauncher(existing);
|
|
27570
27575
|
if (!opened) {
|
|
27571
27576
|
emit("VS Code 'code' command not found. Files to edit:");
|
|
27572
|
-
for (const
|
|
27573
|
-
emit(` ${
|
|
27577
|
+
for (const path11 of existing) {
|
|
27578
|
+
emit(` ${path11}`);
|
|
27574
27579
|
}
|
|
27575
27580
|
}
|
|
27576
27581
|
}
|
|
@@ -27581,21 +27586,21 @@ function createActiveFolder(options) {
|
|
|
27581
27586
|
potentialIssuePath: potentialIssuePath ?? null
|
|
27582
27587
|
};
|
|
27583
27588
|
}
|
|
27584
|
-
function isAbsolutePosix(
|
|
27585
|
-
return
|
|
27589
|
+
function isAbsolutePosix(path11) {
|
|
27590
|
+
return path11.startsWith("/") || /^[A-Za-z]:\//.test(path11);
|
|
27586
27591
|
}
|
|
27587
27592
|
function isRelativeTo(child, root) {
|
|
27588
27593
|
const normalizedChild = toPosixPath2(child);
|
|
27589
27594
|
const normalizedRoot = toPosixPath2(root);
|
|
27590
27595
|
return normalizedChild === normalizedRoot || normalizedChild.startsWith(`${normalizedRoot}/`);
|
|
27591
27596
|
}
|
|
27592
|
-
function posixBaseName(
|
|
27593
|
-
const normalized = toPosixPath2(
|
|
27597
|
+
function posixBaseName(path11) {
|
|
27598
|
+
const normalized = toPosixPath2(path11).replace(/\/+$/, "");
|
|
27594
27599
|
const slash = normalized.lastIndexOf("/");
|
|
27595
27600
|
return slash === -1 ? normalized : normalized.slice(slash + 1);
|
|
27596
27601
|
}
|
|
27597
|
-
function posixStem2(
|
|
27598
|
-
const name = posixBaseName(
|
|
27602
|
+
function posixStem2(path11) {
|
|
27603
|
+
const name = posixBaseName(path11);
|
|
27599
27604
|
const dot = name.lastIndexOf(".");
|
|
27600
27605
|
return dot <= 0 ? name : name.slice(0, dot);
|
|
27601
27606
|
}
|
|
@@ -27820,10 +27825,10 @@ function createRepoAutomationService(options) {
|
|
|
27820
27825
|
|
|
27821
27826
|
// ../../extensions/drm-copilot/src/mcp-server.ts
|
|
27822
27827
|
function resolveExtensionRoot() {
|
|
27823
|
-
return
|
|
27828
|
+
return path10.resolve(__dirname, "..");
|
|
27824
27829
|
}
|
|
27825
27830
|
function readPackageVersion(extensionRoot) {
|
|
27826
|
-
const packageJsonPath =
|
|
27831
|
+
const packageJsonPath = path10.join(extensionRoot, "package.json");
|
|
27827
27832
|
try {
|
|
27828
27833
|
const packageJson = JSON.parse(
|
|
27829
27834
|
fs8.readFileSync(packageJsonPath, "utf-8")
|