@astrosheep/keiyaku 4.5.20 → 4.5.21
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 +4 -4
- package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku/SKILL.md +3 -3
- package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-akuma/SKILL.md +22 -8
- package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-akuma/references/automation.md +237 -0
- package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-bind/SKILL.md +6 -7
- package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-task/SKILL.md +2 -3
- package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-workflow/SKILL.md +3 -3
- package/build/src/akuma/akuma-handle.d.ts +5 -1
- package/build/src/akuma/akuma-handle.js +4 -1
- package/build/src/akuma/akuma-instance.d.ts +7 -2
- package/build/src/akuma/akuma-instance.js +14 -7
- package/build/src/akuma/akuma-observe.d.ts +11 -0
- package/build/src/akuma/akuma-observe.js +22 -0
- package/build/src/akuma/akuma-product.d.ts +1 -0
- package/build/src/akuma/akuma-product.js +3 -0
- package/build/src/akuma/akuma.d.ts +1 -0
- package/build/src/akuma/body.d.ts +25 -5
- package/build/src/akuma/body.js +65 -8
- package/build/src/akuma/call-request.d.ts +2 -0
- package/build/src/akuma/call-request.js +2 -0
- package/build/src/akuma/fleet-execution.d.ts +28 -0
- package/build/src/akuma/fleet-execution.js +36 -4
- package/build/src/akuma/fleet-request.d.ts +10 -0
- package/build/src/akuma/fleet-request.js +11 -2
- package/build/src/akuma/heart/facts.d.ts +2 -0
- package/build/src/akuma/heart/index.d.ts +1 -0
- package/build/src/akuma/heart/index.js +4 -1
- package/build/src/akuma/heart/rows.d.ts +2 -0
- package/build/src/akuma/heart/rows.js +7 -5
- package/build/src/akuma/heart/schema.d.ts +1 -1
- package/build/src/akuma/heart/schema.js +3 -1
- package/build/src/akuma/heart/tells.js +6 -5
- package/build/src/akuma/heart/timeline.js +1 -1
- package/build/src/akuma/provider.d.ts +1 -1
- package/build/src/akuma/provider.js +1 -1
- package/build/src/akuma/providers/acp/core.js +3 -6
- package/build/src/akuma/providers/claude/index.js +9 -12
- package/build/src/akuma/providers/codex-app-server/index.js +4 -11
- package/build/src/akuma/providers/execution-environment.d.ts +6 -0
- package/build/src/akuma/providers/execution-environment.js +24 -0
- package/build/src/akuma/providers/opencode-sdk/index.js +30 -23
- package/build/src/akuma/providers/opencode-sdk/session.d.ts +8 -1
- package/build/src/akuma/providers/opencode-sdk/session.js +6 -5
- package/build/src/akuma/providers/pi/events.js +7 -2
- package/build/src/akuma/providers/pi/index.js +3 -2
- package/build/src/akuma/request-rendezvous.js +8 -3
- package/build/src/akuma/turn-drive.d.ts +1 -0
- package/build/src/akuma/turn-drive.js +2 -0
- package/build/src/akuma-body.js +2 -0
- package/build/src/body/amend.js +6 -4
- package/build/src/body/decode.d.ts +3 -1
- package/build/src/body/decode.js +53 -17
- package/build/src/body/region.d.ts +9 -1
- package/build/src/body/region.js +87 -12
- package/build/src/body/render.js +1 -1
- package/build/src/body/verification.d.ts +3 -1
- package/build/src/body/verification.js +4 -1
- package/build/src/cli/accepted.js +19 -2
- package/build/src/cli/commands/akuma-invoke.d.ts +2 -0
- package/build/src/cli/commands/akuma-invoke.js +133 -13
- package/build/src/cli/commands/akuma.js +11 -4
- package/build/src/cli/commands/contract-help.js +17 -4
- package/build/src/cli/commands/contract.js +6 -4
- package/build/src/cli/commands/status-set.js +15 -24
- package/build/src/cli/main.js +5 -0
- package/build/src/cli/parse.d.ts +2 -0
- package/build/src/cli/parse.js +5 -0
- package/build/src/cli/render/akuma-activity.d.ts +99 -2
- package/build/src/cli/render/akuma-activity.js +484 -40
- package/build/src/cli/render/akuma.d.ts +10 -0
- package/build/src/cli/render/akuma.js +28 -21
- package/build/src/cli/render/audit.js +1 -1
- package/build/src/cli/render/board.js +1 -1
- package/build/src/cli/render/catalog.js +16 -13
- package/build/src/cli/render/contract-history.js +39 -10
- package/build/src/cli/render/contract-observation.js +10 -6
- package/build/src/cli/render/contract.js +109 -106
- package/build/src/cli/render/execution-progress.d.ts +23 -1
- package/build/src/cli/render/execution-progress.js +151 -28
- package/build/src/cli/render/kanshi-akuma.js +27 -39
- package/build/src/cli/render/kanshi.js +33 -26
- package/build/src/cli/render/nuke.js +1 -1
- package/build/src/cli/render/receipt.d.ts +1 -1
- package/build/src/cli/render/receipt.js +5 -5
- package/build/src/cli/render/refusal.js +10 -7
- package/build/src/cli/render/region.js +1 -1
- package/build/src/cli/render/settings.js +12 -2
- package/build/src/cli/render/status-line.d.ts +30 -0
- package/build/src/cli/render/status-line.js +58 -0
- package/build/src/cli/render/status-set.js +1 -1
- package/build/src/cli/render/task.d.ts +2 -0
- package/build/src/cli/render/task.js +11 -7
- package/build/src/cli/render/terminal.d.ts +0 -1
- package/build/src/cli/render/terminal.js +47 -15
- package/build/src/cli/result.d.ts +1 -0
- package/build/src/cli/runtime.d.ts +2 -0
- package/build/src/cli/runtime.js +13 -7
- package/build/src/cli/usage.js +2 -2
- package/build/src/cli/version.d.ts +1 -0
- package/build/src/cli/version.js +25 -0
- package/build/src/git/workspace.d.ts +1 -1
- package/build/src/git/workspace.js +1 -1
- package/build/src/identity/mint.d.ts +13 -0
- package/build/src/identity/mint.js +26 -0
- package/build/src/identity/normalize.d.ts +4 -0
- package/build/src/identity/normalize.js +30 -0
- package/build/src/index.d.ts +2 -0
- package/build/src/index.js +1 -0
- package/build/src/kanshi/read.js +17 -4
- package/build/src/kanshi/report.d.ts +1 -0
- package/build/src/library/akuma-creation.d.ts +2 -0
- package/build/src/library/akuma-creation.js +33 -17
- package/build/src/library/bind.js +18 -16
- package/build/src/library/contract-bind.d.ts +3 -1
- package/build/src/library/contract-bind.js +5 -3
- package/build/src/library/contract-operations.d.ts +2 -2
- package/build/src/library/contract-operations.js +1 -1
- package/build/src/library/contract-types.d.ts +1 -0
- package/build/src/library/fleet.d.ts +4 -1
- package/build/src/library/fleet.js +32 -8
- package/build/src/plugin/akuma-signals.d.ts +6 -0
- package/build/src/plugin/akuma-signals.js +8 -0
- package/build/src/plugin/public.d.ts +4 -0
- package/build/src/plugin/runtime.js +4 -1
- package/build/src/protocol/amend.js +4 -3
- package/build/src/protocol/attempt.d.ts +2 -0
- package/build/src/protocol/bind.js +41 -14
- package/build/src/protocol/completion.d.ts +3 -0
- package/build/src/protocol/completion.js +7 -1
- package/build/src/protocol/deliver.js +165 -92
- package/build/src/protocol/execution-observation.d.ts +0 -4
- package/build/src/protocol/intent.d.ts +15 -20
- package/build/src/protocol/intent.js +29 -17
- package/build/src/protocol/operations.d.ts +2 -0
- package/build/src/protocol/placement.js +5 -1
- package/build/src/protocol/read/status.d.ts +1 -0
- package/build/src/protocol/read/status.js +10 -2
- package/build/src/protocol/reintegrate.d.ts +1 -1
- package/build/src/protocol/reintegrate.js +70 -43
- package/build/src/protocol/result-codec.js +9 -7
- package/build/src/protocol/review.js +53 -30
- package/build/src/protocol/run.d.ts +83 -36
- package/build/src/protocol/run.js +90 -75
- package/build/src/runtime/proc/windows-launch.exe +0 -0
- package/build/src/settings.js +5 -14
- package/build/src/task/document.d.ts +5 -1
- package/build/src/task/document.js +6 -1
- package/build/src/verification/execution.d.ts +0 -1
- package/build/src/verification/execution.js +0 -24
- package/build/src/verification/observation.d.ts +0 -4
- package/build/src/verification/observation.js +1 -2
- package/package.json +3 -1
- package/build/src/git/verification-environment.d.ts +0 -10
- package/build/src/git/verification-environment.js +0 -281
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
import { constants } from "node:fs";
|
|
2
|
-
import { lstat, mkdir, open, readdir, readlink, realpath, symlink } from "node:fs/promises";
|
|
3
|
-
import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
4
|
-
import { runGit } from "./process.js";
|
|
5
|
-
/** A source or destination filesystem shape that cannot safely be inherited. */
|
|
6
|
-
export class VerificationEnvironmentError extends Error {
|
|
7
|
-
constructor(message) {
|
|
8
|
-
super(message);
|
|
9
|
-
this.name = "VerificationEnvironmentError";
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
function cancelled(signal) {
|
|
13
|
-
if (signal?.aborted === true)
|
|
14
|
-
throw new VerificationEnvironmentError("verification environment inheritance cancelled");
|
|
15
|
-
}
|
|
16
|
-
function repositoryWithSignal(repository, signal) {
|
|
17
|
-
if (signal === undefined || signal === repository.signal)
|
|
18
|
-
return repository;
|
|
19
|
-
return { ...repository, signal };
|
|
20
|
-
}
|
|
21
|
-
function fingerprint(value) {
|
|
22
|
-
return {
|
|
23
|
-
dev: value.dev,
|
|
24
|
-
ino: value.ino,
|
|
25
|
-
size: value.size,
|
|
26
|
-
mtimeMs: value.mtimeMs,
|
|
27
|
-
ctimeMs: value.ctimeMs,
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
function sameFingerprint(left, right) {
|
|
31
|
-
return (left.dev === right.dev &&
|
|
32
|
-
left.ino === right.ino &&
|
|
33
|
-
left.size === right.size &&
|
|
34
|
-
left.mtimeMs === right.mtimeMs &&
|
|
35
|
-
left.ctimeMs === right.ctimeMs);
|
|
36
|
-
}
|
|
37
|
-
function isDescendant(root, path) {
|
|
38
|
-
const value = relative(root, path);
|
|
39
|
-
return value !== "" && value !== ".." && !value.startsWith(`..${sep}`) && !isAbsolute(value);
|
|
40
|
-
}
|
|
41
|
-
function sourcePath(root, path) {
|
|
42
|
-
if (path.length === 0 ||
|
|
43
|
-
isAbsolute(path) ||
|
|
44
|
-
path.split("/").some((part) => part === "" || part === "." || part === "..")) {
|
|
45
|
-
throw new VerificationEnvironmentError(`Git returned an unsafe environment path: ${JSON.stringify(path)}`);
|
|
46
|
-
}
|
|
47
|
-
return join(root, ...path.split("/"));
|
|
48
|
-
}
|
|
49
|
-
function isKeiyakuAuthorityPath(path) {
|
|
50
|
-
const parts = path.split("/");
|
|
51
|
-
return parts.includes(".git") || parts[0] === ".keiyaku" || path === "KEIYAKU.md";
|
|
52
|
-
}
|
|
53
|
-
function hasCandidateDescendant(candidatePaths, path) {
|
|
54
|
-
const prefix = `${path}/`;
|
|
55
|
-
for (const candidate of candidatePaths)
|
|
56
|
-
if (candidate.startsWith(prefix))
|
|
57
|
-
return true;
|
|
58
|
-
return false;
|
|
59
|
-
}
|
|
60
|
-
async function gitPaths(repository, worktree, args) {
|
|
61
|
-
const output = await runGit(repository, ["-C", worktree, ...args]);
|
|
62
|
-
return new Set(output
|
|
63
|
-
.toString("utf8")
|
|
64
|
-
.split("\0")
|
|
65
|
-
.filter(Boolean)
|
|
66
|
-
.map((path) => (path.endsWith("/") ? path.slice(0, -1) : path)));
|
|
67
|
-
}
|
|
68
|
-
async function existingDirectory(path, label) {
|
|
69
|
-
let state;
|
|
70
|
-
try {
|
|
71
|
-
state = await lstat(path);
|
|
72
|
-
}
|
|
73
|
-
catch {
|
|
74
|
-
throw new VerificationEnvironmentError(`${label} does not exist: ${path}`);
|
|
75
|
-
}
|
|
76
|
-
if (state.isSymbolicLink() || !state.isDirectory()) {
|
|
77
|
-
throw new VerificationEnvironmentError(`${label} is not a real directory: ${path}`);
|
|
78
|
-
}
|
|
79
|
-
return await realpath(path);
|
|
80
|
-
}
|
|
81
|
-
async function destinationDirectory(root, path, candidatePaths) {
|
|
82
|
-
const relativePath = relative(root, path);
|
|
83
|
-
if (!isDescendant(root, path) && path !== root)
|
|
84
|
-
throw new VerificationEnvironmentError(`destination escapes candidate: ${path}`);
|
|
85
|
-
try {
|
|
86
|
-
const state = await lstat(path);
|
|
87
|
-
if (state.isSymbolicLink() || !state.isDirectory()) {
|
|
88
|
-
if (candidatePaths.has(relativePath))
|
|
89
|
-
return false;
|
|
90
|
-
throw new VerificationEnvironmentError(`destination ancestor is not a real directory: ${path}`);
|
|
91
|
-
}
|
|
92
|
-
return true;
|
|
93
|
-
}
|
|
94
|
-
catch (error) {
|
|
95
|
-
if (error.code !== "ENOENT")
|
|
96
|
-
throw error;
|
|
97
|
-
await mkdir(path, { mode: 0o755 });
|
|
98
|
-
const made = await lstat(path);
|
|
99
|
-
if (made.isSymbolicLink() || !made.isDirectory()) {
|
|
100
|
-
throw new VerificationEnvironmentError(`destination ancestor is not a real directory: ${path}`);
|
|
101
|
-
}
|
|
102
|
-
return true;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
async function prepareDestination(root, path, candidatePaths) {
|
|
106
|
-
if (!isDescendant(root, path))
|
|
107
|
-
throw new VerificationEnvironmentError(`destination escapes candidate: ${path}`);
|
|
108
|
-
const relativePath = relative(root, path);
|
|
109
|
-
if (candidatePaths.has(relativePath))
|
|
110
|
-
return false;
|
|
111
|
-
const parents = relativePath.split(sep).slice(0, -1);
|
|
112
|
-
let current = root;
|
|
113
|
-
for (const part of parents) {
|
|
114
|
-
current = join(current, part);
|
|
115
|
-
if (!(await destinationDirectory(root, current, candidatePaths)))
|
|
116
|
-
return false;
|
|
117
|
-
}
|
|
118
|
-
try {
|
|
119
|
-
await lstat(path);
|
|
120
|
-
throw new VerificationEnvironmentError(`destination environment path already exists: ${path}`);
|
|
121
|
-
}
|
|
122
|
-
catch (error) {
|
|
123
|
-
if (error.code === "ENOENT")
|
|
124
|
-
return true;
|
|
125
|
-
throw error;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
async function copyRegularFile(source, destination, signal) {
|
|
129
|
-
cancelled(signal);
|
|
130
|
-
const before = await lstat(source);
|
|
131
|
-
if (!before.isFile() || before.isSymbolicLink())
|
|
132
|
-
throw new VerificationEnvironmentError(`source changed while reading: ${source}`);
|
|
133
|
-
const beforeFingerprint = fingerprint(before);
|
|
134
|
-
const input = await open(source, constants.O_RDONLY | constants.O_NOFOLLOW);
|
|
135
|
-
let bytes;
|
|
136
|
-
try {
|
|
137
|
-
const opened = await input.stat();
|
|
138
|
-
if (!opened.isFile() || !sameFingerprint(beforeFingerprint, fingerprint(opened))) {
|
|
139
|
-
throw new VerificationEnvironmentError(`source changed while reading: ${source}`);
|
|
140
|
-
}
|
|
141
|
-
bytes = await input.readFile();
|
|
142
|
-
const afterRead = await input.stat();
|
|
143
|
-
if (!sameFingerprint(beforeFingerprint, fingerprint(afterRead))) {
|
|
144
|
-
throw new VerificationEnvironmentError(`source changed while reading: ${source}`);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
finally {
|
|
148
|
-
await input.close();
|
|
149
|
-
}
|
|
150
|
-
cancelled(signal);
|
|
151
|
-
const after = await lstat(source);
|
|
152
|
-
if (!after.isFile() || after.isSymbolicLink() || !sameFingerprint(beforeFingerprint, fingerprint(after))) {
|
|
153
|
-
throw new VerificationEnvironmentError(`source changed while reading: ${source}`);
|
|
154
|
-
}
|
|
155
|
-
const output = await open(destination, constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL | constants.O_NOFOLLOW, before.mode & 0o777);
|
|
156
|
-
try {
|
|
157
|
-
await output.writeFile(bytes);
|
|
158
|
-
}
|
|
159
|
-
finally {
|
|
160
|
-
await output.close();
|
|
161
|
-
}
|
|
162
|
-
cancelled(signal);
|
|
163
|
-
}
|
|
164
|
-
async function copyLink(input) {
|
|
165
|
-
const { sourceRoot, sourceAlias, destinationRoot, source, destination, signal } = input;
|
|
166
|
-
cancelled(signal);
|
|
167
|
-
const before = await lstat(source);
|
|
168
|
-
if (!before.isSymbolicLink())
|
|
169
|
-
throw new VerificationEnvironmentError(`source changed while reading link: ${source}`);
|
|
170
|
-
const target = await readlink(source);
|
|
171
|
-
const resolvedSourceTarget = resolve(dirname(source), target);
|
|
172
|
-
const targetPath = isDescendant(sourceRoot, resolvedSourceTarget)
|
|
173
|
-
? relative(sourceRoot, resolvedSourceTarget).split(sep).join("/")
|
|
174
|
-
: isAbsolute(target) && isDescendant(sourceAlias, target)
|
|
175
|
-
? relative(sourceAlias, target).split(sep).join("/")
|
|
176
|
-
: null;
|
|
177
|
-
if (targetPath === null) {
|
|
178
|
-
throw new VerificationEnvironmentError(`environment link escapes source appointment: ${source}`);
|
|
179
|
-
}
|
|
180
|
-
if (isKeiyakuAuthorityPath(targetPath)) {
|
|
181
|
-
throw new VerificationEnvironmentError(`environment link targets Keiyaku authority: ${source}`);
|
|
182
|
-
}
|
|
183
|
-
const after = await lstat(source);
|
|
184
|
-
if (!after.isSymbolicLink() || !sameFingerprint(fingerprint(before), fingerprint(after))) {
|
|
185
|
-
throw new VerificationEnvironmentError(`source changed while reading link: ${source}`);
|
|
186
|
-
}
|
|
187
|
-
const relocated = isAbsolute(target) ? join(destinationRoot, ...targetPath.split("/")) : target;
|
|
188
|
-
await symlink(relocated, destination);
|
|
189
|
-
cancelled(signal);
|
|
190
|
-
}
|
|
191
|
-
async function copyEntry(input) {
|
|
192
|
-
const { sourceRoot, sourceAlias, destinationRoot, relativePath, sourceTracked, candidatePaths, signal } = input;
|
|
193
|
-
cancelled(signal);
|
|
194
|
-
if (relativePath.split("/").includes(".git")) {
|
|
195
|
-
throw new VerificationEnvironmentError(`environment contains nested repository state: ${relativePath}`);
|
|
196
|
-
}
|
|
197
|
-
if (isKeiyakuAuthorityPath(relativePath) || sourceTracked.has(relativePath) || candidatePaths.has(relativePath))
|
|
198
|
-
return;
|
|
199
|
-
const source = sourcePath(sourceRoot, relativePath);
|
|
200
|
-
const destination = sourcePath(destinationRoot, relativePath);
|
|
201
|
-
const state = await lstat(source);
|
|
202
|
-
if (state.isSymbolicLink()) {
|
|
203
|
-
if (hasCandidateDescendant(candidatePaths, relativePath))
|
|
204
|
-
return;
|
|
205
|
-
if (!(await prepareDestination(destinationRoot, destination, candidatePaths)))
|
|
206
|
-
return;
|
|
207
|
-
await copyLink({ sourceRoot, sourceAlias, destinationRoot, source, destination, signal });
|
|
208
|
-
return;
|
|
209
|
-
}
|
|
210
|
-
if (state.isFile()) {
|
|
211
|
-
if (hasCandidateDescendant(candidatePaths, relativePath))
|
|
212
|
-
return;
|
|
213
|
-
if (!(await prepareDestination(destinationRoot, destination, candidatePaths)))
|
|
214
|
-
return;
|
|
215
|
-
await copyRegularFile(source, destination, signal);
|
|
216
|
-
return;
|
|
217
|
-
}
|
|
218
|
-
if (!state.isDirectory())
|
|
219
|
-
throw new VerificationEnvironmentError(`unsupported environment special file: ${source}`);
|
|
220
|
-
if (hasCandidateDescendant(candidatePaths, relativePath)) {
|
|
221
|
-
const destinationState = await lstat(destination);
|
|
222
|
-
if (destinationState.isSymbolicLink() || !destinationState.isDirectory())
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
else if (!(await prepareDestination(destinationRoot, destination, candidatePaths))) {
|
|
226
|
-
return;
|
|
227
|
-
}
|
|
228
|
-
const children = (await readdir(source)).sort();
|
|
229
|
-
for (const child of children) {
|
|
230
|
-
await copyEntry({ ...input, relativePath: `${relativePath}/${child}` });
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* Copy the selected appointment's ignored and untracked execution state into a
|
|
235
|
-
* materialized candidate without changing either Git worktree's authority.
|
|
236
|
-
*/
|
|
237
|
-
export async function inheritVerificationEnvironment(repository, source, destination, signal) {
|
|
238
|
-
const activeSignal = signal === undefined
|
|
239
|
-
? repository.signal
|
|
240
|
-
: repository.signal === undefined
|
|
241
|
-
? signal
|
|
242
|
-
: AbortSignal.any([repository.signal, signal]);
|
|
243
|
-
const activeRepository = repositoryWithSignal(repository, activeSignal);
|
|
244
|
-
cancelled(activeSignal);
|
|
245
|
-
const sourceAlias = resolve(source);
|
|
246
|
-
const sourceRoot = await existingDirectory(source, "verification environment source");
|
|
247
|
-
const destinationRoot = await existingDirectory(destination, "verification environment destination");
|
|
248
|
-
if (sourceRoot === destinationRoot ||
|
|
249
|
-
isDescendant(sourceRoot, destinationRoot) ||
|
|
250
|
-
isDescendant(destinationRoot, sourceRoot)) {
|
|
251
|
-
throw new VerificationEnvironmentError("verification environment source and destination must be independent directories");
|
|
252
|
-
}
|
|
253
|
-
const [sourceTracked, candidatePaths, untracked, ignored] = await Promise.all([
|
|
254
|
-
gitPaths(activeRepository, sourceRoot, ["ls-files", "--cached", "-z"]),
|
|
255
|
-
gitPaths(activeRepository, destinationRoot, ["ls-files", "--cached", "-z"]),
|
|
256
|
-
gitPaths(activeRepository, sourceRoot, ["ls-files", "--others", "--exclude-standard", "-z"]),
|
|
257
|
-
gitPaths(activeRepository, sourceRoot, [
|
|
258
|
-
"ls-files",
|
|
259
|
-
"--others",
|
|
260
|
-
"--ignored",
|
|
261
|
-
"--exclude-standard",
|
|
262
|
-
"--directory",
|
|
263
|
-
"-z",
|
|
264
|
-
]),
|
|
265
|
-
]);
|
|
266
|
-
const environmentPaths = [...new Set([...untracked, ...ignored])];
|
|
267
|
-
const roots = environmentPaths
|
|
268
|
-
.filter((path) => !environmentPaths.some((other) => other !== path && path.startsWith(`${other}/`)))
|
|
269
|
-
.sort();
|
|
270
|
-
for (const relativePath of roots) {
|
|
271
|
-
await copyEntry({
|
|
272
|
-
sourceRoot,
|
|
273
|
-
sourceAlias,
|
|
274
|
-
destinationRoot,
|
|
275
|
-
relativePath,
|
|
276
|
-
sourceTracked,
|
|
277
|
-
candidatePaths,
|
|
278
|
-
signal: activeSignal,
|
|
279
|
-
});
|
|
280
|
-
}
|
|
281
|
-
}
|