@shapeshift-labs/frontier-swarm-codex 0.5.123 → 0.5.125
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/README.md +8 -2
- package/dist/apply.d.ts.map +1 -1
- package/dist/apply.js +269 -237
- package/dist/apply.js.map +1 -1
- package/dist/cli-args.d.ts +2 -2
- package/dist/codex-workspace-changes.d.ts +6 -17
- package/dist/codex-workspace-changes.d.ts.map +1 -1
- package/dist/codex-workspace-changes.js +13 -82
- package/dist/codex-workspace-changes.js.map +1 -1
- package/dist/codex-workspace.d.ts +3 -3
- package/dist/codex-workspace.d.ts.map +1 -1
- package/dist/codex-workspace.js +16 -241
- package/dist/codex-workspace.js.map +1 -1
- package/dist/collect-bundle-staleness.d.ts.map +1 -1
- package/dist/collect-bundle-staleness.js +18 -15
- package/dist/collect-bundle-staleness.js.map +1 -1
- package/dist/collect-workspace-proof.js +2 -2
- package/dist/collect-workspace-proof.js.map +1 -1
- package/dist/common.d.ts +0 -7
- package/dist/common.d.ts.map +1 -1
- package/dist/common.js +0 -15
- package/dist/common.js.map +1 -1
- package/dist/score.d.ts.map +1 -1
- package/dist/score.js +16 -10
- package/dist/score.js.map +1 -1
- package/dist/semantic-import-base.d.ts.map +1 -1
- package/dist/semantic-import-base.js +12 -15
- package/dist/semantic-import-base.js.map +1 -1
- package/dist/types-apply-lease.d.ts +2 -25
- package/dist/types-apply-lease.d.ts.map +1 -1
- package/dist/types-collection.d.ts +12 -3
- package/dist/types-collection.d.ts.map +1 -1
- package/dist/types-workspace.d.ts +12 -126
- package/dist/types-workspace.d.ts.map +1 -1
- package/dist/workspace-link-repair.d.ts.map +1 -1
- package/dist/workspace-link-repair.js +2 -161
- package/dist/workspace-link-repair.js.map +1 -1
- package/package.json +4 -2
- package/dist/codex-workspace-change-paths.d.ts +0 -20
- package/dist/codex-workspace-change-paths.d.ts.map +0 -1
- package/dist/codex-workspace-change-paths.js +0 -215
- package/dist/codex-workspace-change-paths.js.map +0 -1
- package/dist/codex-workspace-restore.d.ts +0 -15
- package/dist/codex-workspace-restore.d.ts.map +0 -1
- package/dist/codex-workspace-restore.js +0 -66
- package/dist/codex-workspace-restore.js.map +0 -1
- package/dist/codex-workspace-write-fence.d.ts +0 -21
- package/dist/codex-workspace-write-fence.d.ts.map +0 -1
- package/dist/codex-workspace-write-fence.js +0 -155
- package/dist/codex-workspace-write-fence.js.map +0 -1
|
@@ -1,129 +1,15 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
strategy: string;
|
|
14
|
-
guardRoot?: string;
|
|
15
|
-
allowedWritePolicy: Required<FrontierCodexAllowedWritePolicyOptions>;
|
|
16
|
-
linkNodeModules: boolean;
|
|
17
|
-
replace: boolean;
|
|
18
|
-
skipGitRepoCheck: boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface FrontierCodexWorkspaceManifest {
|
|
21
|
-
kind: typeof FRONTIER_SWARM_CODEX_WORKSPACE_MANIFEST_KIND;
|
|
22
|
-
version: typeof FRONTIER_SWARM_CODEX_WORKSPACE_MANIFEST_VERSION;
|
|
23
|
-
id: string;
|
|
24
|
-
mode: FrontierCodexSwarmWorkspaceMode;
|
|
25
|
-
root: string;
|
|
26
|
-
path: string;
|
|
27
|
-
includes: string[];
|
|
28
|
-
excludes: string[];
|
|
29
|
-
artifactIncludes: string[];
|
|
30
|
-
linkPaths: string[];
|
|
31
|
-
requiredIncludes: string[];
|
|
32
|
-
optionalIncludes: string[];
|
|
33
|
-
strategy: string;
|
|
34
|
-
guardRoot?: string;
|
|
35
|
-
allowedWritePolicy: Required<FrontierCodexAllowedWritePolicyOptions>;
|
|
36
|
-
linkNodeModules: boolean;
|
|
37
|
-
skipGitRepoCheck: boolean;
|
|
38
|
-
}
|
|
39
|
-
export type FrontierCodexWorkspaceIgnoredChangedPathReasonCode = 'git_metadata' | 'cache' | 'node_modules' | 'build_output' | 'coverage' | 'frontier_framework' | 'agent_runs' | 'tsbuildinfo' | 'generated_setup' | 'workspace_exclude' | 'artifact_include' | 'linked_path' | 'empty_directory_marker';
|
|
40
|
-
export interface FrontierCodexWorkspaceIgnoredChangedPathReason {
|
|
41
|
-
path: string;
|
|
42
|
-
reasonCode: FrontierCodexWorkspaceIgnoredChangedPathReasonCode;
|
|
43
|
-
}
|
|
44
|
-
export interface FrontierCodexWorkspaceWriteFenceSummary {
|
|
45
|
-
mode: 'none' | 'chmod-readonly';
|
|
46
|
-
applied: boolean;
|
|
47
|
-
skippedReason?: string;
|
|
48
|
-
lockedPathCount: number;
|
|
49
|
-
restoredPathCount: number;
|
|
50
|
-
failedRestoreCount: number;
|
|
51
|
-
sampleLockedPaths: string[];
|
|
52
|
-
writableRoots: string[];
|
|
53
|
-
limitations: string[];
|
|
54
|
-
}
|
|
55
|
-
export interface FrontierCodexWorkspaceProof {
|
|
56
|
-
kind: typeof FRONTIER_SWARM_CODEX_WORKSPACE_PROOF_KIND;
|
|
57
|
-
version: typeof FRONTIER_SWARM_CODEX_WORKSPACE_PROOF_VERSION;
|
|
58
|
-
id: string;
|
|
59
|
-
generatedAt: number;
|
|
60
|
-
manifest: FrontierCodexWorkspaceManifest;
|
|
61
|
-
writePolicy?: FrontierCodexAllowedWritePolicyContract;
|
|
62
|
-
copiedPaths: string[];
|
|
63
|
-
linkedPaths: string[];
|
|
64
|
-
missingRequired: string[];
|
|
65
|
-
missingOptional: string[];
|
|
66
|
-
ignoredChangedPaths: string[];
|
|
67
|
-
ignoredChangedPathReasons: FrontierCodexWorkspaceIgnoredChangedPathReason[];
|
|
68
|
-
observedChangedPaths: string[];
|
|
69
|
-
reportedChangedPaths: string[];
|
|
70
|
-
quarantinedChangedPaths?: string[];
|
|
71
|
-
restoredSourcePaths?: string[];
|
|
72
|
-
preExecWriteFence?: FrontierCodexWorkspaceWriteFenceSummary;
|
|
73
|
-
summary: {
|
|
74
|
-
copiedCount: number;
|
|
75
|
-
linkedCount: number;
|
|
76
|
-
missingRequiredCount: number;
|
|
77
|
-
missingOptionalCount: number;
|
|
78
|
-
ignoredChangedPathCount: number;
|
|
79
|
-
ignoredChangedPathReasonCounts: Record<string, number>;
|
|
80
|
-
observedChangedPathCount: number;
|
|
81
|
-
reportedChangedPathCount: number;
|
|
82
|
-
quarantinedChangedPathCount?: number;
|
|
83
|
-
restoredSourcePathCount?: number;
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
export type FrontierCodexWorkspacePackageLinkStatus = 'already-linked' | 'planned' | 'linked' | 'replaced' | 'excluded' | 'missing-local-package' | 'conflict';
|
|
87
|
-
export interface FrontierCodexWorkspacePackageLinkRepairInput {
|
|
88
|
-
root?: string;
|
|
89
|
-
packageRoots?: readonly string[];
|
|
90
|
-
scope?: string;
|
|
91
|
-
packages?: readonly string[];
|
|
92
|
-
excludePackages?: readonly string[];
|
|
93
|
-
write?: boolean;
|
|
94
|
-
replace?: boolean;
|
|
95
|
-
outFile?: string;
|
|
96
|
-
}
|
|
97
|
-
export interface FrontierCodexWorkspacePackageLinkEntry {
|
|
98
|
-
packageName: string;
|
|
99
|
-
dependencyRange?: string;
|
|
100
|
-
linkPath: string;
|
|
101
|
-
targetPath?: string;
|
|
102
|
-
status: FrontierCodexWorkspacePackageLinkStatus;
|
|
103
|
-
reason?: string;
|
|
104
|
-
}
|
|
105
|
-
export interface FrontierCodexWorkspacePackageLinkRepairResult {
|
|
106
|
-
kind: typeof FRONTIER_SWARM_CODEX_LINK_REPAIR_KIND;
|
|
107
|
-
version: typeof FRONTIER_SWARM_CODEX_LINK_REPAIR_VERSION;
|
|
108
|
-
generatedAt: number;
|
|
109
|
-
root: string;
|
|
110
|
-
scope: string;
|
|
111
|
-
packageRoots: string[];
|
|
112
|
-
write: boolean;
|
|
113
|
-
replace: boolean;
|
|
114
|
-
entries: FrontierCodexWorkspacePackageLinkEntry[];
|
|
115
|
-
summary: {
|
|
116
|
-
total: number;
|
|
117
|
-
planned: number;
|
|
118
|
-
linked: number;
|
|
119
|
-
replaced: number;
|
|
120
|
-
alreadyLinked: number;
|
|
121
|
-
excluded: number;
|
|
122
|
-
missingLocalPackage: number;
|
|
123
|
-
conflicts: number;
|
|
124
|
-
};
|
|
125
|
-
outFile?: string;
|
|
126
|
-
}
|
|
1
|
+
import type { FRONTIER_SWARM_CODEX_PID_MANIFEST_KIND, FRONTIER_SWARM_CODEX_PID_MANIFEST_VERSION } from './constants.js';
|
|
2
|
+
import type { FrontierSwarmGitWorkspaceIgnoredChangedPathReason, FrontierSwarmGitWorkspaceIgnoredChangedPathReasonCode, FrontierSwarmGitWorkspaceManifest, FrontierSwarmGitWorkspacePackageLinkEntry, FrontierSwarmGitWorkspacePackageLinkRepairInput, FrontierSwarmGitWorkspacePackageLinkRepairResult, FrontierSwarmGitWorkspacePackageLinkStatus, FrontierSwarmGitWorkspacePlan, FrontierSwarmGitWorkspaceProof, FrontierSwarmGitWorkspaceWriteFenceSummary } from '@shapeshift-labs/frontier-swarm-git';
|
|
3
|
+
export type FrontierCodexWorkspacePlan = FrontierSwarmGitWorkspacePlan;
|
|
4
|
+
export type FrontierCodexWorkspaceManifest = FrontierSwarmGitWorkspaceManifest;
|
|
5
|
+
export type FrontierCodexWorkspaceIgnoredChangedPathReasonCode = FrontierSwarmGitWorkspaceIgnoredChangedPathReasonCode;
|
|
6
|
+
export type FrontierCodexWorkspaceIgnoredChangedPathReason = FrontierSwarmGitWorkspaceIgnoredChangedPathReason;
|
|
7
|
+
export type FrontierCodexWorkspaceWriteFenceSummary = FrontierSwarmGitWorkspaceWriteFenceSummary;
|
|
8
|
+
export type FrontierCodexWorkspaceProof = FrontierSwarmGitWorkspaceProof;
|
|
9
|
+
export type FrontierCodexWorkspacePackageLinkStatus = FrontierSwarmGitWorkspacePackageLinkStatus;
|
|
10
|
+
export type FrontierCodexWorkspacePackageLinkRepairInput = FrontierSwarmGitWorkspacePackageLinkRepairInput;
|
|
11
|
+
export type FrontierCodexWorkspacePackageLinkEntry = FrontierSwarmGitWorkspacePackageLinkEntry;
|
|
12
|
+
export type FrontierCodexWorkspacePackageLinkRepairResult = FrontierSwarmGitWorkspacePackageLinkRepairResult;
|
|
127
13
|
export interface FrontierCodexPidEntry {
|
|
128
14
|
pid: number;
|
|
129
15
|
role: 'parent' | 'codex' | string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-workspace.d.ts","sourceRoot":"","sources":["../src/types-workspace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"types-workspace.d.ts","sourceRoot":"","sources":["../src/types-workspace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sCAAsC,EACtC,yCAAyC,EAC1C,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EACV,iDAAiD,EACjD,qDAAqD,EACrD,iCAAiC,EACjC,yCAAyC,EACzC,+CAA+C,EAC/C,gDAAgD,EAChD,0CAA0C,EAC1C,6BAA6B,EAC7B,8BAA8B,EAC9B,0CAA0C,EAC3C,MAAM,qCAAqC,CAAC;AAE7C,MAAM,MAAM,0BAA0B,GAAG,6BAA6B,CAAC;AACvE,MAAM,MAAM,8BAA8B,GAAG,iCAAiC,CAAC;AAC/E,MAAM,MAAM,kDAAkD,GAAG,qDAAqD,CAAC;AACvH,MAAM,MAAM,8CAA8C,GAAG,iDAAiD,CAAC;AAC/G,MAAM,MAAM,uCAAuC,GAAG,0CAA0C,CAAC;AACjG,MAAM,MAAM,2BAA2B,GAAG,8BAA8B,CAAC;AACzE,MAAM,MAAM,uCAAuC,GAAG,0CAA0C,CAAC;AACjG,MAAM,MAAM,4CAA4C,GAAG,+CAA+C,CAAC;AAC3G,MAAM,MAAM,sCAAsC,GAAG,yCAAyC,CAAC;AAC/F,MAAM,MAAM,6CAA6C,GAAG,gDAAgD,CAAC;AAE7G,MAAM,WAAW,qBAAqB;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,OAAO,sCAAsC,CAAC;IACpD,OAAO,EAAE,OAAO,yCAAyC,CAAC;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,qBAAqB,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,OAAO,CAAC;IACZ,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-link-repair.d.ts","sourceRoot":"","sources":["../src/workspace-link-repair.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workspace-link-repair.d.ts","sourceRoot":"","sources":["../src/workspace-link-repair.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,4CAA4C,EAC5C,6CAA6C,EAC9C,MAAM,YAAY,CAAC;AAEpB,wBAAsB,gCAAgC,CACpD,KAAK,GAAE,4CAAiD,GACvD,OAAO,CAAC,6CAA6C,CAAC,CAExD"}
|
|
@@ -1,164 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import { FRONTIER_SWARM_CODEX_LINK_REPAIR_KIND, FRONTIER_SWARM_CODEX_LINK_REPAIR_VERSION } from './constants.js';
|
|
4
|
-
import { isObject, uniqueStrings } from './common.js';
|
|
1
|
+
import { repairSwarmGitWorkspacePackageLinks } from '@shapeshift-labs/frontier-swarm-git';
|
|
5
2
|
export async function repairCodexWorkspacePackageLinks(input = {}) {
|
|
6
|
-
|
|
7
|
-
const scope = input.scope ?? '@shapeshift-labs';
|
|
8
|
-
const write = input.write ?? false;
|
|
9
|
-
const replace = input.replace ?? false;
|
|
10
|
-
const packageRoots = (input.packageRoots?.length ? input.packageRoots : [path.join(root, 'packages'), path.dirname(root)])
|
|
11
|
-
.map((entry) => path.resolve(root, entry));
|
|
12
|
-
const excludes = new Set(input.excludePackages ?? []);
|
|
13
|
-
const dependencies = input.packages?.length
|
|
14
|
-
? new Map(input.packages.map((name) => [name, undefined]))
|
|
15
|
-
: await readWorkspaceScopedDependencies(root, scope);
|
|
16
|
-
const localPackages = await discoverLocalWorkspacePackages(packageRoots, scope);
|
|
17
|
-
const entries = [];
|
|
18
|
-
for (const [packageName, dependencyRange] of Array.from(dependencies.entries()).sort(([a], [b]) => a.localeCompare(b))) {
|
|
19
|
-
const linkPath = path.join(root, 'node_modules', ...packageName.split('/'));
|
|
20
|
-
if (excludes.has(packageName)) {
|
|
21
|
-
entries.push({ packageName, dependencyRange, linkPath, status: 'excluded', reason: 'package excluded from local repair' });
|
|
22
|
-
continue;
|
|
23
|
-
}
|
|
24
|
-
const targetPath = localPackages.get(packageName);
|
|
25
|
-
if (!targetPath) {
|
|
26
|
-
entries.push({ packageName, dependencyRange, linkPath, status: 'missing-local-package', reason: 'no matching local package was found' });
|
|
27
|
-
continue;
|
|
28
|
-
}
|
|
29
|
-
entries.push(await planOrRepairWorkspacePackageLink({
|
|
30
|
-
packageName,
|
|
31
|
-
dependencyRange,
|
|
32
|
-
linkPath,
|
|
33
|
-
targetPath,
|
|
34
|
-
write,
|
|
35
|
-
replace
|
|
36
|
-
}));
|
|
37
|
-
}
|
|
38
|
-
const result = {
|
|
39
|
-
kind: FRONTIER_SWARM_CODEX_LINK_REPAIR_KIND,
|
|
40
|
-
version: FRONTIER_SWARM_CODEX_LINK_REPAIR_VERSION,
|
|
41
|
-
generatedAt: Date.now(),
|
|
42
|
-
root,
|
|
43
|
-
scope,
|
|
44
|
-
packageRoots,
|
|
45
|
-
write,
|
|
46
|
-
replace,
|
|
47
|
-
entries,
|
|
48
|
-
summary: {
|
|
49
|
-
total: entries.length,
|
|
50
|
-
planned: entries.filter((entry) => entry.status === 'planned').length,
|
|
51
|
-
linked: entries.filter((entry) => entry.status === 'linked').length,
|
|
52
|
-
replaced: entries.filter((entry) => entry.status === 'replaced').length,
|
|
53
|
-
alreadyLinked: entries.filter((entry) => entry.status === 'already-linked').length,
|
|
54
|
-
excluded: entries.filter((entry) => entry.status === 'excluded').length,
|
|
55
|
-
missingLocalPackage: entries.filter((entry) => entry.status === 'missing-local-package').length,
|
|
56
|
-
conflicts: entries.filter((entry) => entry.status === 'conflict').length
|
|
57
|
-
},
|
|
58
|
-
...(input.outFile ? { outFile: path.resolve(root, input.outFile) } : {})
|
|
59
|
-
};
|
|
60
|
-
if (result.outFile) {
|
|
61
|
-
await fs.mkdir(path.dirname(result.outFile), { recursive: true });
|
|
62
|
-
await fs.writeFile(result.outFile, JSON.stringify(result, null, 2) + '\n');
|
|
63
|
-
}
|
|
64
|
-
return result;
|
|
65
|
-
}
|
|
66
|
-
async function readWorkspaceScopedDependencies(root, scope) {
|
|
67
|
-
const packageJson = await readJsonObject(path.join(root, 'package.json'));
|
|
68
|
-
const dependencies = new Map();
|
|
69
|
-
for (const section of ['dependencies', 'devDependencies', 'optionalDependencies', 'peerDependencies']) {
|
|
70
|
-
const value = packageJson?.[section];
|
|
71
|
-
if (!isObject(value))
|
|
72
|
-
continue;
|
|
73
|
-
for (const [name, range] of Object.entries(value)) {
|
|
74
|
-
if (name === scope || name.startsWith(scope + '/'))
|
|
75
|
-
dependencies.set(name, typeof range === 'string' ? range : undefined);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
return dependencies;
|
|
79
|
-
}
|
|
80
|
-
async function discoverLocalWorkspacePackages(packageRoots, scope) {
|
|
81
|
-
const packages = new Map();
|
|
82
|
-
for (const root of uniqueStrings(packageRoots)) {
|
|
83
|
-
await addLocalWorkspacePackage(packages, root, scope);
|
|
84
|
-
const entries = await fs.readdir(root, { withFileTypes: true }).catch(() => []);
|
|
85
|
-
for (const entry of entries) {
|
|
86
|
-
if (!entry.isDirectory() || entry.name === 'node_modules' || entry.name === '.git')
|
|
87
|
-
continue;
|
|
88
|
-
const child = path.join(root, entry.name);
|
|
89
|
-
if (entry.name.startsWith('@')) {
|
|
90
|
-
const scopedEntries = await fs.readdir(child, { withFileTypes: true }).catch(() => []);
|
|
91
|
-
for (const scopedEntry of scopedEntries) {
|
|
92
|
-
if (scopedEntry.isDirectory())
|
|
93
|
-
await addLocalWorkspacePackage(packages, path.join(child, scopedEntry.name), scope);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
await addLocalWorkspacePackage(packages, child, scope);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
return packages;
|
|
102
|
-
}
|
|
103
|
-
async function addLocalWorkspacePackage(packages, packageDir, scope) {
|
|
104
|
-
const packageJson = await readJsonObject(path.join(packageDir, 'package.json'));
|
|
105
|
-
const name = typeof packageJson?.name === 'string' ? packageJson.name : undefined;
|
|
106
|
-
if (!name || name !== scope && !name.startsWith(scope + '/'))
|
|
107
|
-
return;
|
|
108
|
-
if (!packages.has(name))
|
|
109
|
-
packages.set(name, path.resolve(packageDir));
|
|
110
|
-
}
|
|
111
|
-
async function readJsonObject(file) {
|
|
112
|
-
try {
|
|
113
|
-
const parsed = JSON.parse(await fs.readFile(file, 'utf8'));
|
|
114
|
-
return isObject(parsed) ? parsed : undefined;
|
|
115
|
-
}
|
|
116
|
-
catch {
|
|
117
|
-
return undefined;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
async function planOrRepairWorkspacePackageLink(input) {
|
|
121
|
-
const base = {
|
|
122
|
-
packageName: input.packageName,
|
|
123
|
-
dependencyRange: input.dependencyRange,
|
|
124
|
-
linkPath: input.linkPath,
|
|
125
|
-
targetPath: input.targetPath
|
|
126
|
-
};
|
|
127
|
-
const stat = await fs.lstat(input.linkPath).catch(() => undefined);
|
|
128
|
-
const relativeTarget = path.relative(path.dirname(input.linkPath), input.targetPath) || '.';
|
|
129
|
-
if (stat?.isSymbolicLink()) {
|
|
130
|
-
const currentTarget = path.resolve(path.dirname(input.linkPath), await fs.readlink(input.linkPath));
|
|
131
|
-
if (currentTarget === input.targetPath)
|
|
132
|
-
return { ...base, status: 'already-linked' };
|
|
133
|
-
if (!input.write)
|
|
134
|
-
return { ...base, status: 'planned', reason: 'existing symlink points at a different package' };
|
|
135
|
-
await fs.unlink(input.linkPath);
|
|
136
|
-
await fs.symlink(relativeTarget, input.linkPath, 'dir');
|
|
137
|
-
return { ...base, status: 'linked', reason: 'updated existing symlink' };
|
|
138
|
-
}
|
|
139
|
-
if (stat) {
|
|
140
|
-
if (!input.replace)
|
|
141
|
-
return { ...base, status: 'conflict', reason: 'existing node_modules entry is not a symlink' };
|
|
142
|
-
if (!input.write)
|
|
143
|
-
return { ...base, status: 'planned', reason: 'would replace existing node_modules entry' };
|
|
144
|
-
await fs.rm(input.linkPath, { recursive: true, force: true });
|
|
145
|
-
await fs.mkdir(path.dirname(input.linkPath), { recursive: true });
|
|
146
|
-
await fs.symlink(relativeTarget, input.linkPath, 'dir');
|
|
147
|
-
return { ...base, status: 'replaced', reason: 'replaced existing node_modules entry with a symlink' };
|
|
148
|
-
}
|
|
149
|
-
if (!input.write)
|
|
150
|
-
return { ...base, status: 'planned', reason: 'missing symlink' };
|
|
151
|
-
await fs.mkdir(path.dirname(input.linkPath), { recursive: true });
|
|
152
|
-
await fs.symlink(relativeTarget, input.linkPath, 'dir');
|
|
153
|
-
return { ...base, status: 'linked', reason: 'created symlink' };
|
|
154
|
-
}
|
|
155
|
-
async function resolvePidManifestPath(runPath) {
|
|
156
|
-
const absolute = path.resolve(runPath);
|
|
157
|
-
const stat = await fs.lstat(absolute).catch(() => undefined);
|
|
158
|
-
if (stat?.isDirectory())
|
|
159
|
-
return path.join(absolute, 'pids.json');
|
|
160
|
-
if (path.basename(absolute) === 'swarm-results.json')
|
|
161
|
-
return path.join(path.dirname(absolute), 'pids.json');
|
|
162
|
-
return absolute;
|
|
3
|
+
return repairSwarmGitWorkspacePackageLinks(input);
|
|
163
4
|
}
|
|
164
5
|
//# sourceMappingURL=workspace-link-repair.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-link-repair.js","sourceRoot":"","sources":["../src/workspace-link-repair.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"workspace-link-repair.js","sourceRoot":"","sources":["../src/workspace-link-repair.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mCAAmC,EAAE,MAAM,qCAAqC,CAAC;AAM1F,MAAM,CAAC,KAAK,UAAU,gCAAgC,CACpD,QAAsD,EAAE;IAExD,OAAO,mCAAmC,CAAC,KAAK,CAA2D,CAAC;AAC9G,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shapeshift-labs/frontier-swarm-codex",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.125",
|
|
4
4
|
"description": "Node Codex CLI runner adapter for Frontier swarm plans with resource allocation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -64,7 +64,9 @@
|
|
|
64
64
|
],
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@shapeshift-labs/frontier-run": "0.1.0",
|
|
67
|
-
"@shapeshift-labs/frontier-swarm": "0.5.
|
|
67
|
+
"@shapeshift-labs/frontier-swarm": "0.5.26",
|
|
68
|
+
"@shapeshift-labs/frontier-swarm-git": "0.1.2",
|
|
69
|
+
"@shapeshift-labs/frontier-test": "0.1.2"
|
|
68
70
|
},
|
|
69
71
|
"optionalDependencies": {
|
|
70
72
|
"@shapeshift-labs/frontier-lang": "0.4.89"
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { FrontierCodexSwarmRunOptions, FrontierCodexWorkspaceIgnoredChangedPathReason, FrontierCodexWorkspaceIgnoredChangedPathReasonCode, FrontierCodexWorkspacePlan } from './index.js';
|
|
2
|
-
export type FrontierCodexWorkspaceFileSnapshot = Map<string, string>;
|
|
3
|
-
export interface FrontierCodexChangedPathCollection {
|
|
4
|
-
observedChangedPaths: string[];
|
|
5
|
-
changedPaths: string[];
|
|
6
|
-
ignoredChangedPaths: string[];
|
|
7
|
-
ignoredChangedPathReasons: FrontierCodexWorkspaceIgnoredChangedPathReason[];
|
|
8
|
-
}
|
|
9
|
-
export declare function emptyChangedPathCollection(): FrontierCodexChangedPathCollection;
|
|
10
|
-
export declare function shouldSnapshotWorkspaceChanges(plan: FrontierCodexWorkspacePlan, options: FrontierCodexSwarmRunOptions): boolean;
|
|
11
|
-
export declare function snapshotWorkspaceFiles(root: string): Promise<FrontierCodexWorkspaceFileSnapshot>;
|
|
12
|
-
export declare function collectChangedPaths(cwd: string, baseline: FrontierCodexWorkspaceFileSnapshot | undefined, plan: FrontierCodexWorkspacePlan): Promise<FrontierCodexChangedPathCollection>;
|
|
13
|
-
export declare function filterWorkspaceChangedPaths(paths: readonly string[], plan: FrontierCodexWorkspacePlan): FrontierCodexChangedPathCollection;
|
|
14
|
-
export declare function mergeWorkspaceChangedPathCollections(collections: readonly FrontierCodexChangedPathCollection[]): FrontierCodexChangedPathCollection;
|
|
15
|
-
export declare function createIgnoredWorkspaceChangedPathReasons(paths: readonly string[], plan: FrontierCodexWorkspacePlan): FrontierCodexWorkspaceIgnoredChangedPathReason[];
|
|
16
|
-
export declare function getIgnoredWorkspaceChangedPathReason(file: string, plan: FrontierCodexWorkspacePlan): FrontierCodexWorkspaceIgnoredChangedPathReasonCode | undefined;
|
|
17
|
-
export declare function normalizeWorkspaceChangedPath(file: string, plan: FrontierCodexWorkspacePlan): string | undefined;
|
|
18
|
-
export declare function uniqueWorkspaceChangedPaths(paths: readonly string[], plan: FrontierCodexWorkspacePlan): string[];
|
|
19
|
-
export declare function snapshotContainsWorkspacePath(snapshot: FrontierCodexWorkspaceFileSnapshot, file: string): boolean;
|
|
20
|
-
//# sourceMappingURL=codex-workspace-change-paths.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codex-workspace-change-paths.d.ts","sourceRoot":"","sources":["../src/codex-workspace-change-paths.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,4BAA4B,EAC5B,8CAA8C,EAC9C,kDAAkD,EAClD,0BAA0B,EAC3B,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,kCAAkC,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAErE,MAAM,WAAW,kCAAkC;IACjD,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,yBAAyB,EAAE,8CAA8C,EAAE,CAAC;CAC7E;AAED,wBAAgB,0BAA0B,IAAI,kCAAkC,CAO/E;AAED,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,0BAA0B,EAAE,OAAO,EAAE,4BAA4B,GAAG,OAAO,CAE/H;AAED,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,kCAAkC,CAAC,CAItG;AAED,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,kCAAkC,GAAG,SAAS,EACxD,IAAI,EAAE,0BAA0B,GAC/B,OAAO,CAAC,kCAAkC,CAAC,CAI7C;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,IAAI,EAAE,0BAA0B,GAC/B,kCAAkC,CAEpC;AAED,wBAAgB,oCAAoC,CAClD,WAAW,EAAE,SAAS,kCAAkC,EAAE,GACzD,kCAAkC,CAapC;AAED,wBAAgB,wCAAwC,CACtD,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,IAAI,EAAE,0BAA0B,GAC/B,8CAA8C,EAAE,CAOlD;AAED,wBAAgB,oCAAoC,CAClD,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,0BAA0B,GAC/B,kDAAkD,GAAG,SAAS,CAShE;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,0BAA0B,GAAG,MAAM,GAAG,SAAS,CAOhH;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,0BAA0B,GAAG,MAAM,EAAE,CAUhH;AAED,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,kCAAkC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAOjH"}
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import { createHash } from 'node:crypto';
|
|
2
|
-
import fs from 'node:fs/promises';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
import { getWorkspaceNoisePathReason, isWorkspaceNoisePath, normalizeWorkspacePath, runProcess, workspacePathMatches, uniqueWorkspacePaths } from './common.js';
|
|
5
|
-
export function emptyChangedPathCollection() {
|
|
6
|
-
return {
|
|
7
|
-
observedChangedPaths: [],
|
|
8
|
-
changedPaths: [],
|
|
9
|
-
ignoredChangedPaths: [],
|
|
10
|
-
ignoredChangedPathReasons: []
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
export function shouldSnapshotWorkspaceChanges(plan, options) {
|
|
14
|
-
return options.collectGitStatus !== false && (plan.mode === 'copy' || plan.mode === 'snapshot');
|
|
15
|
-
}
|
|
16
|
-
export async function snapshotWorkspaceFiles(root) {
|
|
17
|
-
const snapshot = new Map();
|
|
18
|
-
await walkWorkspaceFiles(root, root, snapshot);
|
|
19
|
-
return snapshot;
|
|
20
|
-
}
|
|
21
|
-
export async function collectChangedPaths(cwd, baseline, plan) {
|
|
22
|
-
if (!baseline)
|
|
23
|
-
return filterWorkspaceChangedPaths(await gitChangedPaths(cwd), plan);
|
|
24
|
-
const after = await snapshotWorkspaceFiles(cwd);
|
|
25
|
-
return filterWorkspaceChangedPathsFromSnapshots(diffWorkspaceFiles(baseline, after), plan, baseline, after);
|
|
26
|
-
}
|
|
27
|
-
export function filterWorkspaceChangedPaths(paths, plan) {
|
|
28
|
-
return filterWorkspaceChangedPathsWithEmptyMarkers(paths, plan, new Set());
|
|
29
|
-
}
|
|
30
|
-
export function mergeWorkspaceChangedPathCollections(collections) {
|
|
31
|
-
const ignoredReasonByKey = new Map();
|
|
32
|
-
for (const collection of collections) {
|
|
33
|
-
for (const reason of collection.ignoredChangedPathReasons) {
|
|
34
|
-
ignoredReasonByKey.set(`${reason.path}:${reason.reasonCode}`, reason);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return {
|
|
38
|
-
observedChangedPaths: uniqueWorkspacePaths(collections.flatMap((collection) => collection.observedChangedPaths)),
|
|
39
|
-
changedPaths: uniqueWorkspacePaths(collections.flatMap((collection) => collection.changedPaths)),
|
|
40
|
-
ignoredChangedPaths: uniqueWorkspacePaths(collections.flatMap((collection) => collection.ignoredChangedPaths)),
|
|
41
|
-
ignoredChangedPathReasons: Array.from(ignoredReasonByKey.values())
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
export function createIgnoredWorkspaceChangedPathReasons(paths, plan) {
|
|
45
|
-
const reasons = [];
|
|
46
|
-
for (const file of uniqueWorkspaceChangedPaths(paths, plan)) {
|
|
47
|
-
const reasonCode = getIgnoredWorkspaceChangedPathReason(file, plan);
|
|
48
|
-
if (reasonCode)
|
|
49
|
-
reasons.push({ path: file, reasonCode });
|
|
50
|
-
}
|
|
51
|
-
return reasons;
|
|
52
|
-
}
|
|
53
|
-
export function getIgnoredWorkspaceChangedPathReason(file, plan) {
|
|
54
|
-
if (plan.mode !== 'copy' && plan.mode !== 'snapshot')
|
|
55
|
-
return undefined;
|
|
56
|
-
const noiseReason = getWorkspaceNoisePathReason(file);
|
|
57
|
-
if (noiseReason)
|
|
58
|
-
return noiseReason;
|
|
59
|
-
if (isGeneratedWorkspaceSetupFile(file) && !isExplicitWorkspaceInput(file, plan))
|
|
60
|
-
return 'generated_setup';
|
|
61
|
-
if (plan.excludes.some((entry) => workspacePathMatches(file, entry)))
|
|
62
|
-
return 'workspace_exclude';
|
|
63
|
-
if (plan.artifactIncludes.some((entry) => workspacePathMatches(file, entry)))
|
|
64
|
-
return 'artifact_include';
|
|
65
|
-
if (plan.linkPaths.some((entry) => workspacePathMatches(file, entry)))
|
|
66
|
-
return 'linked_path';
|
|
67
|
-
return undefined;
|
|
68
|
-
}
|
|
69
|
-
export function normalizeWorkspaceChangedPath(file, plan) {
|
|
70
|
-
const value = String(file ?? '').trim();
|
|
71
|
-
if (!value)
|
|
72
|
-
return undefined;
|
|
73
|
-
if (path.isAbsolute(value)) {
|
|
74
|
-
return normalizeWorkspacePath(path.relative(plan.path, value).replace(/\\/g, '/'));
|
|
75
|
-
}
|
|
76
|
-
return normalizeWorkspacePath(value);
|
|
77
|
-
}
|
|
78
|
-
export function uniqueWorkspaceChangedPaths(paths, plan) {
|
|
79
|
-
const out = [];
|
|
80
|
-
const seen = new Set();
|
|
81
|
-
for (const file of paths) {
|
|
82
|
-
const normalized = normalizeWorkspaceChangedPath(file, plan);
|
|
83
|
-
if (!normalized || seen.has(normalized))
|
|
84
|
-
continue;
|
|
85
|
-
seen.add(normalized);
|
|
86
|
-
out.push(normalized);
|
|
87
|
-
}
|
|
88
|
-
return out;
|
|
89
|
-
}
|
|
90
|
-
export function snapshotContainsWorkspacePath(snapshot, file) {
|
|
91
|
-
if (snapshot.has(file))
|
|
92
|
-
return true;
|
|
93
|
-
const prefix = file.replace(/\/$/, '') + '/';
|
|
94
|
-
for (const entry of snapshot.keys()) {
|
|
95
|
-
if (entry.startsWith(prefix))
|
|
96
|
-
return true;
|
|
97
|
-
}
|
|
98
|
-
return false;
|
|
99
|
-
}
|
|
100
|
-
function filterWorkspaceChangedPathsFromSnapshots(paths, plan, before, after) {
|
|
101
|
-
return filterWorkspaceChangedPathsWithEmptyMarkers(paths, plan, deletedChildEmptyDirectoryMarkers(paths, before, after));
|
|
102
|
-
}
|
|
103
|
-
function filterWorkspaceChangedPathsWithEmptyMarkers(paths, plan, emptyDirectoryMarkers) {
|
|
104
|
-
const observedChangedPaths = uniqueWorkspaceChangedPaths(paths, plan);
|
|
105
|
-
const changedPaths = [];
|
|
106
|
-
const ignoredChangedPaths = [];
|
|
107
|
-
const ignoredChangedPathReasons = [];
|
|
108
|
-
for (const file of observedChangedPaths) {
|
|
109
|
-
const reasonCode = emptyDirectoryMarkers.has(file)
|
|
110
|
-
? 'empty_directory_marker'
|
|
111
|
-
: getIgnoredWorkspaceChangedPathReason(file, plan);
|
|
112
|
-
if (reasonCode) {
|
|
113
|
-
ignoredChangedPaths.push(file);
|
|
114
|
-
ignoredChangedPathReasons.push({ path: file, reasonCode });
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
changedPaths.push(file);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
return { observedChangedPaths, changedPaths, ignoredChangedPaths, ignoredChangedPathReasons };
|
|
121
|
-
}
|
|
122
|
-
function deletedChildEmptyDirectoryMarkers(paths, before, after) {
|
|
123
|
-
const out = new Set();
|
|
124
|
-
const changed = uniqueWorkspacePaths(paths);
|
|
125
|
-
const beforePaths = Array.from(before.keys());
|
|
126
|
-
for (const file of changed) {
|
|
127
|
-
const marker = after.get(file);
|
|
128
|
-
if (!marker?.startsWith('empty-dir'))
|
|
129
|
-
continue;
|
|
130
|
-
if (before.has(file))
|
|
131
|
-
continue;
|
|
132
|
-
const prefix = file.replace(/\/+$/, '') + '/';
|
|
133
|
-
if (beforePaths.some((candidate) => candidate.startsWith(prefix)))
|
|
134
|
-
out.add(file);
|
|
135
|
-
}
|
|
136
|
-
return out;
|
|
137
|
-
}
|
|
138
|
-
async function gitChangedPaths(cwd) {
|
|
139
|
-
const result = await runProcess('git', ['status', '--porcelain'], { cwd, allowFailure: true });
|
|
140
|
-
if (result.status !== 0)
|
|
141
|
-
return [];
|
|
142
|
-
return result.stdout.split(/\r?\n/).filter(Boolean).flatMap((line) => {
|
|
143
|
-
const value = line.slice(3);
|
|
144
|
-
return value.includes(' -> ') ? value.split(' -> ') : [value];
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
function isGeneratedWorkspaceSetupFile(file) {
|
|
148
|
-
return file === 'loom.json' || file === '.loomignore' || file === '.gitignore';
|
|
149
|
-
}
|
|
150
|
-
function isExplicitWorkspaceInput(file, plan) {
|
|
151
|
-
const inputs = [...plan.includes, ...plan.artifactIncludes, ...plan.requiredIncludes, ...plan.optionalIncludes];
|
|
152
|
-
return inputs.some((entry) => file === entry || file.startsWith(entry.replace(/\/$/, '') + '/'));
|
|
153
|
-
}
|
|
154
|
-
async function walkWorkspaceFiles(root, current, snapshot) {
|
|
155
|
-
let entries;
|
|
156
|
-
try {
|
|
157
|
-
entries = await fs.readdir(current);
|
|
158
|
-
}
|
|
159
|
-
catch {
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
for (const entry of entries) {
|
|
163
|
-
const absolute = path.join(current, entry);
|
|
164
|
-
const relative = path.relative(root, absolute).replace(/\\/g, '/');
|
|
165
|
-
const stat = await fs.lstat(absolute).catch(() => undefined);
|
|
166
|
-
if (!stat)
|
|
167
|
-
continue;
|
|
168
|
-
if (stat.isSymbolicLink()) {
|
|
169
|
-
const target = await fs.readlink(absolute).catch(() => '');
|
|
170
|
-
snapshot.set(relative, `link:${target}`);
|
|
171
|
-
continue;
|
|
172
|
-
}
|
|
173
|
-
if (stat.isDirectory()) {
|
|
174
|
-
if (isWorkspaceNoisePath(relative)) {
|
|
175
|
-
snapshot.set(relative, snapshotMarker('ignored-dir'));
|
|
176
|
-
continue;
|
|
177
|
-
}
|
|
178
|
-
const beforeSize = snapshot.size;
|
|
179
|
-
await walkWorkspaceFiles(root, absolute, snapshot);
|
|
180
|
-
if (relative && snapshot.size === beforeSize)
|
|
181
|
-
snapshot.set(relative, snapshotMarker('empty-dir'));
|
|
182
|
-
continue;
|
|
183
|
-
}
|
|
184
|
-
if (stat.isFile()) {
|
|
185
|
-
snapshot.set(relative, isWorkspaceNoisePath(relative)
|
|
186
|
-
? await snapshotFileMarker('ignored-file', absolute, stat)
|
|
187
|
-
: await snapshotFileMarker('file', absolute, stat));
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
async function snapshotFileMarker(kind, absolute, stat) {
|
|
192
|
-
try {
|
|
193
|
-
const hash = createHash('sha256').update(await fs.readFile(absolute)).digest('hex');
|
|
194
|
-
return `${kind}:${stat.size}:${hash}`;
|
|
195
|
-
}
|
|
196
|
-
catch {
|
|
197
|
-
return `${kind}:${stat.size}:unreadable`;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
function snapshotMarker(kind) {
|
|
201
|
-
return kind;
|
|
202
|
-
}
|
|
203
|
-
function diffWorkspaceFiles(before, after) {
|
|
204
|
-
const changed = new Set();
|
|
205
|
-
for (const [file, marker] of after) {
|
|
206
|
-
if (before.get(file) !== marker)
|
|
207
|
-
changed.add(file);
|
|
208
|
-
}
|
|
209
|
-
for (const file of before.keys()) {
|
|
210
|
-
if (!after.has(file))
|
|
211
|
-
changed.add(file);
|
|
212
|
-
}
|
|
213
|
-
return Array.from(changed).sort();
|
|
214
|
-
}
|
|
215
|
-
//# sourceMappingURL=codex-workspace-change-paths.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codex-workspace-change-paths.js","sourceRoot":"","sources":["../src/codex-workspace-change-paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACL,2BAA2B,EAC3B,oBAAoB,EACpB,sBAAsB,EACtB,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,aAAa,CAAC;AAiBrB,MAAM,UAAU,0BAA0B;IACxC,OAAO;QACL,oBAAoB,EAAE,EAAE;QACxB,YAAY,EAAE,EAAE;QAChB,mBAAmB,EAAE,EAAE;QACvB,yBAAyB,EAAE,EAAE;KAC9B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,8BAA8B,CAAC,IAAgC,EAAE,OAAqC;IACpH,OAAO,OAAO,CAAC,gBAAgB,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC;AAClG,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,IAAY;IACvD,MAAM,QAAQ,GAAuC,IAAI,GAAG,EAAE,CAAC;IAC/D,MAAM,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC/C,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,GAAW,EACX,QAAwD,EACxD,IAAgC;IAEhC,IAAI,CAAC,QAAQ;QAAE,OAAO,2BAA2B,CAAC,MAAM,eAAe,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;IACpF,MAAM,KAAK,GAAG,MAAM,sBAAsB,CAAC,GAAG,CAAC,CAAC;IAChD,OAAO,wCAAwC,C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