@leitwerk-dev/worker 0.1.9 → 0.2.1
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/dist/automatic-turn-executor.d.ts +1 -0
- package/dist/automatic-turn-executor.d.ts.map +1 -1
- package/dist/{chunk-O6332GRG.js → chunk-2LLFMCR6.js} +1511 -1071
- package/dist/chunk-2LLFMCR6.js.map +1 -0
- package/dist/connection-diagnostics.d.ts +5 -0
- package/dist/connection-diagnostics.d.ts.map +1 -0
- package/dist/container-entry-main.d.ts +2 -0
- package/dist/container-entry-main.d.ts.map +1 -0
- package/dist/container-entry-main.js +232 -0
- package/dist/container-entry-main.js.map +1 -0
- package/dist/container-entry.d.ts +14 -0
- package/dist/container-entry.d.ts.map +1 -0
- package/dist/development-tool-environment.d.ts +84 -0
- package/dist/development-tool-environment.d.ts.map +1 -0
- package/dist/diagnostics.d.ts +4 -0
- package/dist/diagnostics.d.ts.map +1 -1
- package/dist/docker-registry-credentials.d.ts +8 -0
- package/dist/docker-registry-credentials.d.ts.map +1 -0
- package/dist/entry-runtime.d.ts +19 -0
- package/dist/entry-runtime.d.ts.map +1 -1
- package/dist/index.d.ts +3 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -5
- package/dist/index.js.map +1 -1
- package/dist/input-consumer.d.ts +7 -11
- package/dist/input-consumer.d.ts.map +1 -1
- package/dist/ipc.d.ts +10 -0
- package/dist/ipc.d.ts.map +1 -1
- package/dist/logical-prompt-runner.d.ts.map +1 -1
- package/dist/managed-pi-agent-dir.d.ts +8 -1
- package/dist/managed-pi-agent-dir.d.ts.map +1 -1
- package/dist/managed-pi-bootstrap.d.ts +1 -0
- package/dist/managed-pi-bootstrap.d.ts.map +1 -1
- package/dist/missing-tool-recovery-runner.d.ts +4 -3
- package/dist/missing-tool-recovery-runner.d.ts.map +1 -1
- package/dist/pi-adapter.d.ts +88 -1
- package/dist/pi-adapter.d.ts.map +1 -1
- package/dist/pi-event-reporter.d.ts.map +1 -1
- package/dist/pi-resource-bundle.d.ts +17 -1
- package/dist/pi-resource-bundle.d.ts.map +1 -1
- package/dist/pre-turn-targeted-inputs.d.ts +8 -7
- package/dist/pre-turn-targeted-inputs.d.ts.map +1 -1
- package/dist/prompt-guards.d.ts +6 -0
- package/dist/prompt-guards.d.ts.map +1 -1
- package/dist/repository-bash-tool.d.ts +4 -0
- package/dist/repository-bash-tool.d.ts.map +1 -0
- package/dist/resource-loader-factory.d.ts +1 -2
- package/dist/resource-loader-factory.d.ts.map +1 -1
- package/dist/result-image-upload.d.ts.map +1 -1
- package/dist/runtime/adapters.d.ts +38 -0
- package/dist/runtime/adapters.d.ts.map +1 -1
- package/dist/runtime/bootstrap-session.d.ts +9 -5
- package/dist/runtime/bootstrap-session.d.ts.map +1 -1
- package/dist/runtime/bootstrap.d.ts +38 -18
- package/dist/runtime/bootstrap.d.ts.map +1 -1
- package/dist/runtime/failure-policy.d.ts +1 -0
- package/dist/runtime/failure-policy.d.ts.map +1 -1
- package/dist/runtime/index.d.ts +4 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/lifecycle-reducer.d.ts.map +1 -1
- package/dist/runtime/llm-turn-execution.d.ts +3 -8
- package/dist/runtime/llm-turn-execution.d.ts.map +1 -1
- package/dist/runtime/turn-execution.d.ts +2 -9
- package/dist/runtime/turn-execution.d.ts.map +1 -1
- package/dist/session-snapshot-exchange.d.ts +10 -4
- package/dist/session-snapshot-exchange.d.ts.map +1 -1
- package/dist/turn-continuation.d.ts.map +1 -1
- package/dist/turn-execution-error.d.ts +1 -1
- package/dist/turn-execution-error.d.ts.map +1 -1
- package/dist/turn-execution-result.d.ts +1 -0
- package/dist/turn-execution-result.d.ts.map +1 -1
- package/dist/turn-outcome-tool-session.d.ts +0 -2
- package/dist/turn-outcome-tool-session.d.ts.map +1 -1
- package/dist/turn-result-markdown.d.ts +2 -1
- package/dist/turn-result-markdown.d.ts.map +1 -1
- package/dist/turn-tree-strategy.d.ts +0 -1
- package/dist/turn-tree-strategy.d.ts.map +1 -1
- package/dist/worker-entry.js +16 -4
- package/dist/worker-entry.js.map +1 -1
- package/dist/worker-ipc-reporter.d.ts.map +1 -1
- package/dist/workspace/manifest.d.ts +4 -7
- package/dist/workspace/manifest.d.ts.map +1 -1
- package/dist/workspace/node-run-root-git-ops.d.ts +2 -2
- package/dist/workspace/node-run-root-git-ops.d.ts.map +1 -1
- package/dist/workspace/resource-aggregator.d.ts.map +1 -1
- package/dist/workspace/run-root.d.ts +21 -20
- package/dist/workspace/run-root.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/automatic-turn-executor.ts +2 -0
- package/src/connection-diagnostics.ts +27 -0
- package/src/container-entry-main.ts +24 -0
- package/src/container-entry.ts +246 -0
- package/src/development-tool-environment.ts +490 -0
- package/src/diagnostics.ts +1 -0
- package/src/docker-registry-credentials.ts +65 -0
- package/src/entry-runtime.ts +29 -5
- package/src/index.ts +1 -39
- package/src/input-consumer.ts +8 -29
- package/src/ipc.ts +50 -2
- package/src/logical-prompt-runner.ts +23 -29
- package/src/managed-pi-agent-dir.ts +8 -1
- package/src/managed-pi-bootstrap.ts +4 -3
- package/src/missing-tool-recovery-runner.ts +4 -18
- package/src/pi-adapter.ts +125 -56
- package/src/pi-event-reporter.ts +16 -38
- package/src/pi-resource-bundle.ts +77 -3
- package/src/pre-turn-targeted-inputs.ts +9 -11
- package/src/prompt-guards.ts +50 -75
- package/src/repository-bash-tool.ts +15 -0
- package/src/resource-loader-factory.ts +1 -18
- package/src/result-image-upload.ts +16 -27
- package/src/runtime/adapters.ts +46 -4
- package/src/runtime/bootstrap-session.ts +70 -39
- package/src/runtime/bootstrap.ts +184 -101
- package/src/runtime/failure-policy.ts +36 -42
- package/src/runtime/index.ts +47 -15
- package/src/runtime/lifecycle-reducer.ts +71 -173
- package/src/runtime/llm-turn-execution.ts +13 -30
- package/src/runtime/turn-execution.ts +78 -31
- package/src/session-snapshot-exchange.ts +46 -68
- package/src/turn-continuation.ts +9 -17
- package/src/turn-execution-error.ts +3 -11
- package/src/turn-execution-result.ts +1 -0
- package/src/turn-outcome-tool-session.ts +25 -21
- package/src/turn-result-markdown.ts +31 -34
- package/src/turn-tree-strategy.ts +6 -19
- package/src/worker-entry.ts +8 -0
- package/src/worker-ipc-reporter.ts +8 -16
- package/src/workspace/manifest.ts +5 -7
- package/src/workspace/node-run-root-git-ops.ts +65 -25
- package/src/workspace/resource-aggregator.ts +5 -16
- package/src/workspace/run-root.ts +50 -89
- package/dist/automatic-turn-executor.js +0 -58
- package/dist/automatic-turn-executor.js.map +0 -1
- package/dist/chunk-O6332GRG.js.map +0 -1
- package/dist/diagnostics.js +0 -51
- package/dist/diagnostics.js.map +0 -1
- package/dist/entry-runtime.js +0 -160
- package/dist/entry-runtime.js.map +0 -1
- package/dist/event-translator.js +0 -12
- package/dist/event-translator.js.map +0 -1
- package/dist/extension-entry-roots.js +0 -41
- package/dist/extension-entry-roots.js.map +0 -1
- package/dist/identified-pi-entry.js +0 -125
- package/dist/identified-pi-entry.js.map +0 -1
- package/dist/input-consumer.js +0 -34
- package/dist/input-consumer.js.map +0 -1
- package/dist/integration-tool-bridge.js +0 -53
- package/dist/integration-tool-bridge.js.map +0 -1
- package/dist/ipc.js +0 -192
- package/dist/ipc.js.map +0 -1
- package/dist/logical-prompt-runner.js +0 -225
- package/dist/logical-prompt-runner.js.map +0 -1
- package/dist/managed-pi-agent-dir.js +0 -66
- package/dist/managed-pi-agent-dir.js.map +0 -1
- package/dist/managed-pi-bootstrap.js +0 -135
- package/dist/managed-pi-bootstrap.js.map +0 -1
- package/dist/missing-tool-recovery-runner.js +0 -73
- package/dist/missing-tool-recovery-runner.js.map +0 -1
- package/dist/pi-adapter.js +0 -1648
- package/dist/pi-adapter.js.map +0 -1
- package/dist/pi-branch-guard.js +0 -75
- package/dist/pi-branch-guard.js.map +0 -1
- package/dist/pi-event-reporter.js +0 -136
- package/dist/pi-event-reporter.js.map +0 -1
- package/dist/pi-resource-bundle.js +0 -58
- package/dist/pi-resource-bundle.js.map +0 -1
- package/dist/pre-turn-targeted-inputs.js +0 -101
- package/dist/pre-turn-targeted-inputs.js.map +0 -1
- package/dist/prompt-guards.js +0 -318
- package/dist/prompt-guards.js.map +0 -1
- package/dist/question-bridge.js +0 -24
- package/dist/question-bridge.js.map +0 -1
- package/dist/question-tool.js +0 -54
- package/dist/question-tool.js.map +0 -1
- package/dist/replaying-request-bridge.js +0 -71
- package/dist/replaying-request-bridge.js.map +0 -1
- package/dist/resource-loader-factory.js +0 -87
- package/dist/resource-loader-factory.js.map +0 -1
- package/dist/result-image-upload.js +0 -183
- package/dist/result-image-upload.js.map +0 -1
- package/dist/runtime/adapters.js +0 -15
- package/dist/runtime/adapters.js.map +0 -1
- package/dist/runtime/bootstrap-session.js +0 -199
- package/dist/runtime/bootstrap-session.js.map +0 -1
- package/dist/runtime/bootstrap.js +0 -440
- package/dist/runtime/bootstrap.js.map +0 -1
- package/dist/runtime/failure-policy.js +0 -182
- package/dist/runtime/failure-policy.js.map +0 -1
- package/dist/runtime/index.js +0 -339
- package/dist/runtime/index.js.map +0 -1
- package/dist/runtime/lifecycle-reducer.js +0 -1142
- package/dist/runtime/lifecycle-reducer.js.map +0 -1
- package/dist/runtime/llm-turn-execution.js +0 -494
- package/dist/runtime/llm-turn-execution.js.map +0 -1
- package/dist/runtime/settings.js +0 -24
- package/dist/runtime/settings.js.map +0 -1
- package/dist/runtime/snapshot-policy.js +0 -16
- package/dist/runtime/snapshot-policy.js.map +0 -1
- package/dist/runtime/turn-execution.js +0 -151
- package/dist/runtime/turn-execution.js.map +0 -1
- package/dist/session-snapshot-exchange.js +0 -102
- package/dist/session-snapshot-exchange.js.map +0 -1
- package/dist/test-helpers/fake-websocket.js +0 -40
- package/dist/test-helpers/fake-websocket.js.map +0 -1
- package/dist/test-helpers/ipc-harness.d.ts +0 -11
- package/dist/test-helpers/ipc-harness.d.ts.map +0 -1
- package/dist/test-helpers/ipc-harness.js +0 -17
- package/dist/test-helpers/ipc-harness.js.map +0 -1
- package/dist/turn-continuation.js +0 -80
- package/dist/turn-continuation.js.map +0 -1
- package/dist/turn-execution-error.js +0 -64
- package/dist/turn-execution-error.js.map +0 -1
- package/dist/turn-execution-result.js +0 -21
- package/dist/turn-execution-result.js.map +0 -1
- package/dist/turn-outcome-tool-session.js +0 -210
- package/dist/turn-outcome-tool-session.js.map +0 -1
- package/dist/turn-record-id.js +0 -10
- package/dist/turn-record-id.js.map +0 -1
- package/dist/turn-result-markdown.js +0 -263
- package/dist/turn-result-markdown.js.map +0 -1
- package/dist/turn-tree-strategy.js +0 -80
- package/dist/turn-tree-strategy.js.map +0 -1
- package/dist/worker-http.js +0 -9
- package/dist/worker-http.js.map +0 -1
- package/dist/worker-ipc-reporter.js +0 -58
- package/dist/worker-ipc-reporter.js.map +0 -1
- package/dist/worker-payloads.js +0 -66
- package/dist/worker-payloads.js.map +0 -1
- package/dist/worker-start-payload.js +0 -5
- package/dist/worker-start-payload.js.map +0 -1
- package/dist/workspace/manifest.js +0 -79
- package/dist/workspace/manifest.js.map +0 -1
- package/dist/workspace/node-run-root-git-ops.js +0 -96
- package/dist/workspace/node-run-root-git-ops.js.map +0 -1
- package/dist/workspace/resource-aggregator.js +0 -39
- package/dist/workspace/resource-aggregator.js.map +0 -1
- package/dist/workspace/run-root.js +0 -209
- package/dist/workspace/run-root.js.map +0 -1
- package/src/test-helpers/ipc-harness.ts +0 -19
package/src/worker-entry.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { createWorkerEntryRuntime } from "./entry-runtime.js";
|
|
2
2
|
|
|
3
3
|
const runtime = createWorkerEntryRuntime();
|
|
4
|
+
for (const signal of ["SIGTERM", "SIGINT"] as const) {
|
|
5
|
+
process.once(signal, () => {
|
|
6
|
+
void runtime.stop(signal).then(
|
|
7
|
+
() => process.exit(0),
|
|
8
|
+
() => process.exit(1),
|
|
9
|
+
);
|
|
10
|
+
});
|
|
11
|
+
}
|
|
4
12
|
|
|
5
13
|
void runtime.start().catch((e) => {
|
|
6
14
|
console.error(e);
|
|
@@ -77,24 +77,16 @@ export function createWorkerIpcReporter(options: {
|
|
|
77
77
|
options.emitExtensionEvent?.("worker.event", payload);
|
|
78
78
|
return payload;
|
|
79
79
|
};
|
|
80
|
+
const diagnosticReporter =
|
|
81
|
+
(eventType: "worker.trace" | "worker.error") =>
|
|
82
|
+
(input: WorkerDiagnosticPayload, selectedTurnId: string | null = null): void => {
|
|
83
|
+
const payload = workerEvent(eventType, buildWorkerDiagnosticPayload(input), selectedTurnId);
|
|
84
|
+
options.emitExtensionEvent?.(eventType, payload);
|
|
85
|
+
};
|
|
80
86
|
return {
|
|
81
87
|
project,
|
|
82
88
|
workerEvent,
|
|
83
|
-
workerTrace(
|
|
84
|
-
|
|
85
|
-
"worker.trace",
|
|
86
|
-
buildWorkerDiagnosticPayload(input),
|
|
87
|
-
selectedTurnId,
|
|
88
|
-
);
|
|
89
|
-
options.emitExtensionEvent?.("worker.trace", payload);
|
|
90
|
-
},
|
|
91
|
-
workerError(input, selectedTurnId = null) {
|
|
92
|
-
const payload = workerEvent(
|
|
93
|
-
"worker.error",
|
|
94
|
-
buildWorkerDiagnosticPayload(input),
|
|
95
|
-
selectedTurnId,
|
|
96
|
-
);
|
|
97
|
-
options.emitExtensionEvent?.("worker.error", payload);
|
|
98
|
-
},
|
|
89
|
+
workerTrace: diagnosticReporter("worker.trace"),
|
|
90
|
+
workerError: diagnosticReporter("worker.error"),
|
|
99
91
|
};
|
|
100
92
|
}
|
|
@@ -7,11 +7,14 @@ export interface ComponentManifest {
|
|
|
7
7
|
components: ComponentManifestEntry[];
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export interface
|
|
10
|
+
export interface ComponentCheckoutPlan {
|
|
11
11
|
key: string;
|
|
12
12
|
repoLocator: string;
|
|
13
13
|
baseBranch: string;
|
|
14
14
|
workBranch: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface ComponentManifestEntry extends ComponentCheckoutPlan {
|
|
15
18
|
clonedAt: string;
|
|
16
19
|
headSha: string;
|
|
17
20
|
}
|
|
@@ -84,12 +87,7 @@ export function deserializeManifest(
|
|
|
84
87
|
|
|
85
88
|
export function diffManifest(
|
|
86
89
|
existing: ComponentManifest,
|
|
87
|
-
serverProjects:
|
|
88
|
-
key: string;
|
|
89
|
-
repoLocator: string;
|
|
90
|
-
baseBranch: string;
|
|
91
|
-
workBranch: string;
|
|
92
|
-
}>,
|
|
90
|
+
serverProjects: ComponentCheckoutPlan[],
|
|
93
91
|
): ManifestDiff {
|
|
94
92
|
const stale: string[] = [];
|
|
95
93
|
const missing: string[] = [];
|
|
@@ -10,49 +10,71 @@ import {
|
|
|
10
10
|
import { tmpdir } from "node:os";
|
|
11
11
|
import path from "node:path";
|
|
12
12
|
import {
|
|
13
|
+
clearRepositoryGitHttpsHelpers,
|
|
13
14
|
clearRepositoryGitSshWrappers,
|
|
14
15
|
repositoryGitArgs,
|
|
15
16
|
repositoryGitSubprocessEnv,
|
|
17
|
+
repositoryHttpsUrl,
|
|
18
|
+
setRepositoryGitHttpsHelper,
|
|
16
19
|
setRepositoryGitSshWrapper,
|
|
17
20
|
} from "@leitwerk-dev/process-sdk";
|
|
18
21
|
import { resolveGitBinary } from "@leitwerk-dev/process-sdk/git-binary";
|
|
19
|
-
import type {
|
|
22
|
+
import type { WorkerRepositoryCredential } from "@leitwerk-dev/worker-protocol";
|
|
20
23
|
import { execa } from "execa";
|
|
21
24
|
import fg from "fast-glob";
|
|
22
25
|
import type { RunRootGitOps } from "./run-root.js";
|
|
23
26
|
|
|
24
|
-
function toAbsolute(targetPath: string): string {
|
|
25
|
-
return path.resolve(targetPath);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
27
|
export class NodeRunRootGitOps implements RunRootGitOps {
|
|
29
28
|
#credentialDir: string | null = null;
|
|
30
29
|
|
|
31
|
-
configureRepositoryCredentials(credentials: readonly
|
|
30
|
+
configureRepositoryCredentials(credentials: readonly WorkerRepositoryCredential[]): void {
|
|
32
31
|
this.cleanupRepositoryCredentials();
|
|
33
32
|
if (credentials.length === 0) return;
|
|
34
33
|
const root = mkdtempSync(path.join(tmpdir(), "leitwerk-repo-auth-"));
|
|
35
34
|
chmodSync(root, 0o700);
|
|
36
35
|
this.#credentialDir = root;
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
36
|
+
try {
|
|
37
|
+
for (const credential of credentials) {
|
|
38
|
+
const dir = path.join(root, encodeURIComponent(credential.projectKey));
|
|
39
|
+
mkdirSync(dir, { mode: 0o700 });
|
|
40
|
+
if (credential.kind === "git_https") {
|
|
41
|
+
const url = repositoryHttpsUrl(credential.repositoryUrl);
|
|
42
|
+
writeFileSync(
|
|
43
|
+
path.join(dir, "credential.json"),
|
|
44
|
+
JSON.stringify({
|
|
45
|
+
host: url.host,
|
|
46
|
+
path: url.pathname.slice(1),
|
|
47
|
+
username: credential.username,
|
|
48
|
+
password: credential.password,
|
|
49
|
+
}),
|
|
50
|
+
{ mode: 0o600 },
|
|
51
|
+
);
|
|
52
|
+
const helper = path.join(dir, "credential.cjs");
|
|
53
|
+
writeFileSync(helper, HTTPS_CREDENTIAL_HELPER, { mode: 0o700 });
|
|
54
|
+
setRepositoryGitHttpsHelper(credential.projectKey, helper);
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
const key = path.join(dir, "identity");
|
|
58
|
+
const hosts = path.join(dir, "known_hosts");
|
|
59
|
+
const wrapper = path.join(dir, "ssh");
|
|
60
|
+
writeFileSync(key, `${credential.privateKey.trim()}\n`, { mode: 0o600 });
|
|
61
|
+
writeFileSync(hosts, `${credential.knownHosts.trim()}\n`, { mode: 0o600 });
|
|
62
|
+
writeFileSync(
|
|
63
|
+
wrapper,
|
|
64
|
+
`#!/bin/sh\nexec ssh -F /dev/null -o IdentitiesOnly=yes -o IdentityFile="${key}" -o UserKnownHostsFile="${hosts}" -o StrictHostKeyChecking=yes -o BatchMode=yes "$@"\n`,
|
|
65
|
+
{ mode: 0o700 },
|
|
66
|
+
);
|
|
67
|
+
setRepositoryGitSshWrapper(credential.projectKey, wrapper);
|
|
68
|
+
}
|
|
69
|
+
} catch (error) {
|
|
70
|
+
this.cleanupRepositoryCredentials();
|
|
71
|
+
throw error;
|
|
51
72
|
}
|
|
52
73
|
}
|
|
53
74
|
|
|
54
75
|
cleanupRepositoryCredentials(): void {
|
|
55
76
|
clearRepositoryGitSshWrappers();
|
|
77
|
+
clearRepositoryGitHttpsHelpers();
|
|
56
78
|
if (this.#credentialDir) rmSync(this.#credentialDir, { recursive: true, force: true });
|
|
57
79
|
this.#credentialDir = null;
|
|
58
80
|
}
|
|
@@ -63,7 +85,7 @@ export class NodeRunRootGitOps implements RunRootGitOps {
|
|
|
63
85
|
projectKey?: string,
|
|
64
86
|
): Promise<string> {
|
|
65
87
|
const result = await execa(resolveGitBinary(), repositoryGitArgs(args), {
|
|
66
|
-
...(cwd ? { cwd:
|
|
88
|
+
...(cwd ? { cwd: path.resolve(cwd) } : {}),
|
|
67
89
|
env: repositoryGitSubprocessEnv(projectKey ?? "", { GIT_TERMINAL_PROMPT: "0" }),
|
|
68
90
|
extendEnv: false,
|
|
69
91
|
stdin: "ignore",
|
|
@@ -72,13 +94,13 @@ export class NodeRunRootGitOps implements RunRootGitOps {
|
|
|
72
94
|
}
|
|
73
95
|
|
|
74
96
|
async writeFile(repoDir: string, filePath: string, content: string): Promise<void> {
|
|
75
|
-
const absolutePath =
|
|
97
|
+
const absolutePath = path.resolve(path.join(repoDir, filePath));
|
|
76
98
|
mkdirSync(path.dirname(absolutePath), { recursive: true });
|
|
77
99
|
writeFileSync(absolutePath, content, "utf8");
|
|
78
100
|
}
|
|
79
101
|
|
|
80
102
|
async readFile(repoDir: string, filePath: string): Promise<string | null> {
|
|
81
|
-
const absolutePath =
|
|
103
|
+
const absolutePath = path.resolve(path.join(repoDir, filePath));
|
|
82
104
|
if (!existsSync(absolutePath)) {
|
|
83
105
|
return null;
|
|
84
106
|
}
|
|
@@ -86,7 +108,7 @@ export class NodeRunRootGitOps implements RunRootGitOps {
|
|
|
86
108
|
}
|
|
87
109
|
|
|
88
110
|
async clone(repoLocator: string, targetDir: string): Promise<void> {
|
|
89
|
-
const absoluteTargetDir =
|
|
111
|
+
const absoluteTargetDir = path.resolve(targetDir);
|
|
90
112
|
rmSync(absoluteTargetDir, { recursive: true, force: true });
|
|
91
113
|
mkdirSync(path.dirname(absoluteTargetDir), { recursive: true });
|
|
92
114
|
await this.runGit(
|
|
@@ -121,7 +143,7 @@ export class NodeRunRootGitOps implements RunRootGitOps {
|
|
|
121
143
|
}
|
|
122
144
|
|
|
123
145
|
async listFiles(repoDir: string, pattern: string): Promise<string[]> {
|
|
124
|
-
const absoluteRoot =
|
|
146
|
+
const absoluteRoot = path.resolve(repoDir);
|
|
125
147
|
if (!existsSync(absoluteRoot)) {
|
|
126
148
|
return [];
|
|
127
149
|
}
|
|
@@ -135,3 +157,21 @@ export class NodeRunRootGitOps implements RunRootGitOps {
|
|
|
135
157
|
).sort((a, b) => a.localeCompare(b));
|
|
136
158
|
}
|
|
137
159
|
}
|
|
160
|
+
|
|
161
|
+
// The secret is read only by this short-lived helper, never embedded in its source or argv.
|
|
162
|
+
const HTTPS_CREDENTIAL_HELPER = `const fs = require('node:fs');
|
|
163
|
+
if (process.argv[2] !== 'get') process.exit(0);
|
|
164
|
+
const input = fs.readFileSync(0, 'utf8');
|
|
165
|
+
const fields = Object.create(null);
|
|
166
|
+
for (const line of input.split('\\n')) {
|
|
167
|
+
const i = line.indexOf('=');
|
|
168
|
+
if (i < 0) continue;
|
|
169
|
+
const key = line.slice(0, i);
|
|
170
|
+
if (Object.hasOwn(fields, key)) process.exit(0);
|
|
171
|
+
fields[key] = line.slice(i + 1);
|
|
172
|
+
}
|
|
173
|
+
const c = JSON.parse(fs.readFileSync(require('node:path').join(__dirname, 'credential.json'), 'utf8'));
|
|
174
|
+
if (fields.protocol !== 'https' || fields.host !== c.host || fields.path !== c.path ||
|
|
175
|
+
(fields.username && fields.username !== c.username)) process.exit(0);
|
|
176
|
+
process.stdout.write('username=' + c.username + '\\npassword=' + c.password + '\\n\\n');
|
|
177
|
+
`;
|
|
@@ -21,23 +21,12 @@ export function aggregateAgentsMd(
|
|
|
21
21
|
export function collectSkills(
|
|
22
22
|
sources: Array<{ componentKey: string; skillId: string; content: string }>,
|
|
23
23
|
): Map<string, { content: string; source: string }> {
|
|
24
|
-
const byId = new Map<string, Array<{ componentKey: string; skillId: string; content: string }>>();
|
|
25
|
-
for (const s of sources) {
|
|
26
|
-
const list = byId.get(s.skillId);
|
|
27
|
-
if (list) {
|
|
28
|
-
list.push(s);
|
|
29
|
-
} else {
|
|
30
|
-
byId.set(s.skillId, [s]);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
24
|
const out = new Map<string, { content: string; source: string }>();
|
|
34
|
-
for (const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
source: winner.componentKey,
|
|
40
|
-
});
|
|
25
|
+
for (const { skillId, componentKey, content } of sources) {
|
|
26
|
+
const winner = out.get(skillId);
|
|
27
|
+
if (!winner || componentKey.localeCompare(winner.source) < 0) {
|
|
28
|
+
out.set(skillId, { content, source: componentKey });
|
|
29
|
+
}
|
|
41
30
|
}
|
|
42
31
|
return out;
|
|
43
32
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
+
import { isPathInside } from "@leitwerk-dev/process-sdk";
|
|
2
3
|
import {
|
|
4
|
+
type ComponentCheckoutPlan,
|
|
3
5
|
type ComponentManifest,
|
|
4
6
|
type ComponentManifestEntry,
|
|
5
7
|
deserializeManifest,
|
|
@@ -9,33 +11,40 @@ import {
|
|
|
9
11
|
} from "./manifest.js";
|
|
10
12
|
import { aggregateAgentsMd, collectSkills } from "./resource-aggregator.js";
|
|
11
13
|
|
|
14
|
+
/** @internal */
|
|
12
15
|
export interface GitOps {
|
|
16
|
+
/** @internal */
|
|
13
17
|
clone(repoLocator: string, targetDir: string): Promise<void>;
|
|
18
|
+
/** @internal */
|
|
14
19
|
checkout(repoDir: string, branch: string): Promise<void>;
|
|
20
|
+
/** @internal */
|
|
15
21
|
createBranch(repoDir: string, branchName: string, startPoint: string): Promise<void>;
|
|
22
|
+
/** @internal */
|
|
16
23
|
branchExists(repoDir: string, branchName: string): Promise<boolean>;
|
|
24
|
+
/** @internal */
|
|
17
25
|
getHeadSha(repoDir: string): Promise<string>;
|
|
26
|
+
/** @internal */
|
|
18
27
|
readFile(repoDir: string, filePath: string): Promise<string | null>;
|
|
28
|
+
/** @internal */
|
|
19
29
|
listFiles(repoDir: string, pattern: string): Promise<string[]>;
|
|
20
30
|
}
|
|
21
31
|
|
|
32
|
+
/** @internal */
|
|
22
33
|
export type RunRootGitOps = GitOps & {
|
|
34
|
+
/** @internal */
|
|
23
35
|
writeFile(repoDir: string, filePath: string, content: string): Promise<void>;
|
|
36
|
+
/** @internal */
|
|
24
37
|
configureRepositoryCredentials?(
|
|
25
|
-
credentials: readonly import("@leitwerk-dev/worker-protocol").
|
|
38
|
+
credentials: readonly import("@leitwerk-dev/worker-protocol").WorkerRepositoryCredential[],
|
|
26
39
|
): void;
|
|
40
|
+
/** @internal */
|
|
27
41
|
cleanupRepositoryCredentials?(): void;
|
|
28
42
|
};
|
|
29
43
|
|
|
30
44
|
export interface RunRootPlan {
|
|
31
45
|
workspaceRoot: string;
|
|
32
46
|
instanceId: string;
|
|
33
|
-
components:
|
|
34
|
-
key: string;
|
|
35
|
-
repoLocator: string;
|
|
36
|
-
baseBranch: string;
|
|
37
|
-
workBranch: string;
|
|
38
|
-
}>;
|
|
47
|
+
components: ComponentCheckoutPlan[];
|
|
39
48
|
}
|
|
40
49
|
|
|
41
50
|
export interface MaterializeResult {
|
|
@@ -52,6 +61,16 @@ export interface ValidationResult {
|
|
|
52
61
|
existingManifest: ComponentManifest | null;
|
|
53
62
|
}
|
|
54
63
|
|
|
64
|
+
export class RunRootPreparationError extends Error {
|
|
65
|
+
readonly errors: readonly string[];
|
|
66
|
+
|
|
67
|
+
constructor(errors: readonly string[]) {
|
|
68
|
+
super(`Workspace preparation failed: ${errors.join("; ")}`);
|
|
69
|
+
this.name = "RunRootPreparationError";
|
|
70
|
+
this.errors = [...errors];
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
55
74
|
const MANIFEST_REL = path.join(".leitwerk", "components.json");
|
|
56
75
|
const AGGREGATED_AGENTS_REL = "AGENTS.md";
|
|
57
76
|
const SKILLS_DIR_REL = path.join(".leitwerk", "skills");
|
|
@@ -59,17 +78,7 @@ const SKILLS_DIR_REL = path.join(".leitwerk", "skills");
|
|
|
59
78
|
const SKILL_GLOB = "**/.cursor/skills/**/SKILL.md";
|
|
60
79
|
const AGENTS_GLOB = "**/AGENTS.md";
|
|
61
80
|
|
|
62
|
-
function
|
|
63
|
-
const relative = path.relative(parent, child);
|
|
64
|
-
return (
|
|
65
|
-
relative !== "" &&
|
|
66
|
-
relative !== ".." &&
|
|
67
|
-
!relative.startsWith(`..${path.sep}`) &&
|
|
68
|
-
!path.isAbsolute(relative)
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function safeJoinInsideWorkspace(workspaceRoot: string, childPath: string): string {
|
|
81
|
+
function componentDir(workspaceRoot: string, childPath: string): string {
|
|
73
82
|
const root = path.resolve(workspaceRoot);
|
|
74
83
|
const target = path.resolve(root, childPath);
|
|
75
84
|
if (!isPathInside(root, target)) {
|
|
@@ -78,10 +87,6 @@ function safeJoinInsideWorkspace(workspaceRoot: string, childPath: string): stri
|
|
|
78
87
|
return target;
|
|
79
88
|
}
|
|
80
89
|
|
|
81
|
-
function componentDir(workspaceRoot: string, key: string): string {
|
|
82
|
-
return safeJoinInsideWorkspace(workspaceRoot, key);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
90
|
function skillIdFromSkillPath(filePath: string): string | null {
|
|
86
91
|
const normalized = filePath.replace(/\\/g, "/");
|
|
87
92
|
const m = normalized.match(/\.cursor\/skills\/([^/]+)\/SKILL\.md$/);
|
|
@@ -91,12 +96,7 @@ function skillIdFromSkillPath(filePath: string): string | null {
|
|
|
91
96
|
export function planRunRoot(
|
|
92
97
|
workspaceRoot: string,
|
|
93
98
|
instanceId: string,
|
|
94
|
-
projectSnapshots:
|
|
95
|
-
key: string;
|
|
96
|
-
repoLocator: string;
|
|
97
|
-
baseBranch: string;
|
|
98
|
-
workBranch: string;
|
|
99
|
-
}>,
|
|
99
|
+
projectSnapshots: ComponentCheckoutPlan[],
|
|
100
100
|
): RunRootPlan {
|
|
101
101
|
return {
|
|
102
102
|
workspaceRoot,
|
|
@@ -113,12 +113,10 @@ async function materializeComponentEntry(
|
|
|
113
113
|
const dir = componentDir(plan.workspaceRoot, comp.key);
|
|
114
114
|
await git.clone(comp.repoLocator, dir);
|
|
115
115
|
await git.checkout(dir, comp.baseBranch);
|
|
116
|
-
if (await git.branchExists(dir, comp.workBranch)) {
|
|
117
|
-
await git.checkout(dir, comp.workBranch);
|
|
118
|
-
} else {
|
|
116
|
+
if (!(await git.branchExists(dir, comp.workBranch))) {
|
|
119
117
|
await git.createBranch(dir, comp.workBranch, comp.baseBranch);
|
|
120
|
-
await git.checkout(dir, comp.workBranch);
|
|
121
118
|
}
|
|
119
|
+
await git.checkout(dir, comp.workBranch);
|
|
122
120
|
return {
|
|
123
121
|
key: comp.key,
|
|
124
122
|
repoLocator: comp.repoLocator,
|
|
@@ -232,7 +230,7 @@ async function finalizeRunRoot(
|
|
|
232
230
|
git: RunRootGitOps,
|
|
233
231
|
entries: ComponentManifestEntry[],
|
|
234
232
|
errors: string[],
|
|
235
|
-
) {
|
|
233
|
+
): Promise<MaterializeResult> {
|
|
236
234
|
const manifest: ComponentManifest = {
|
|
237
235
|
version: 1,
|
|
238
236
|
instanceId: plan.instanceId,
|
|
@@ -249,7 +247,20 @@ async function finalizeRunRoot(
|
|
|
249
247
|
errors.push(`write: ${e instanceof Error ? e.message : String(e)}`);
|
|
250
248
|
}
|
|
251
249
|
|
|
252
|
-
|
|
250
|
+
const expectedKeys = new Set(plan.components.map((component) => component.key));
|
|
251
|
+
const hasAllExpectedEntries =
|
|
252
|
+
entries.length === expectedKeys.size &&
|
|
253
|
+
[...expectedKeys].every((key) => entries.some((entry) => entry.key === key));
|
|
254
|
+
if (errors.length > 0 || !hasAllExpectedEntries) {
|
|
255
|
+
throw new RunRootPreparationError(errors);
|
|
256
|
+
}
|
|
257
|
+
return {
|
|
258
|
+
ok: true,
|
|
259
|
+
manifest,
|
|
260
|
+
aggregatedAgentsMdSources,
|
|
261
|
+
loadedSkills,
|
|
262
|
+
errors,
|
|
263
|
+
};
|
|
253
264
|
}
|
|
254
265
|
|
|
255
266
|
export async function materializeRunRoot(
|
|
@@ -258,48 +269,17 @@ export async function materializeRunRoot(
|
|
|
258
269
|
): Promise<MaterializeResult> {
|
|
259
270
|
const errors: string[] = [];
|
|
260
271
|
const entries = await collectMaterializedEntries(plan, git, errors);
|
|
261
|
-
|
|
262
|
-
plan,
|
|
263
|
-
git,
|
|
264
|
-
entries,
|
|
265
|
-
errors,
|
|
266
|
-
);
|
|
267
|
-
|
|
268
|
-
const ok = errors.length === 0 && plan.components.length === entries.length;
|
|
269
|
-
return {
|
|
270
|
-
ok,
|
|
271
|
-
manifest,
|
|
272
|
-
aggregatedAgentsMdSources,
|
|
273
|
-
loadedSkills,
|
|
274
|
-
errors,
|
|
275
|
-
};
|
|
272
|
+
return finalizeRunRoot(plan, git, entries, errors);
|
|
276
273
|
}
|
|
277
274
|
|
|
278
275
|
export async function validateRunRoot(
|
|
279
276
|
workspaceRoot: string,
|
|
280
|
-
serverProjects:
|
|
281
|
-
key: string;
|
|
282
|
-
repoLocator: string;
|
|
283
|
-
baseBranch: string;
|
|
284
|
-
workBranch: string;
|
|
285
|
-
}>,
|
|
277
|
+
serverProjects: ComponentCheckoutPlan[],
|
|
286
278
|
git: GitOps,
|
|
287
279
|
): Promise<ValidationResult> {
|
|
288
280
|
const raw = await git.readFile(workspaceRoot, MANIFEST_REL);
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
valid: false,
|
|
292
|
-
diff: {
|
|
293
|
-
stale: [],
|
|
294
|
-
missing: serverProjects.map((p) => p.key),
|
|
295
|
-
extra: [],
|
|
296
|
-
unchanged: [],
|
|
297
|
-
},
|
|
298
|
-
existingManifest: null,
|
|
299
|
-
};
|
|
300
|
-
}
|
|
301
|
-
const parsed = deserializeManifest(raw);
|
|
302
|
-
if (!parsed.ok) {
|
|
281
|
+
const parsed = raw === null ? null : deserializeManifest(raw);
|
|
282
|
+
if (!parsed?.ok) {
|
|
303
283
|
return {
|
|
304
284
|
valid: false,
|
|
305
285
|
diff: {
|
|
@@ -338,24 +318,5 @@ export async function repairRunRoot(
|
|
|
338
318
|
null,
|
|
339
319
|
);
|
|
340
320
|
|
|
341
|
-
|
|
342
|
-
plan,
|
|
343
|
-
git,
|
|
344
|
-
manifestEntries,
|
|
345
|
-
errors,
|
|
346
|
-
);
|
|
347
|
-
|
|
348
|
-
const expectedKeys = new Set(plan.components.map((c) => c.key));
|
|
349
|
-
const ok =
|
|
350
|
-
errors.length === 0 &&
|
|
351
|
-
manifestEntries.length === plan.components.length &&
|
|
352
|
-
[...expectedKeys].every((k) => manifestEntries.some((e) => e.key === k));
|
|
353
|
-
|
|
354
|
-
return {
|
|
355
|
-
ok,
|
|
356
|
-
manifest,
|
|
357
|
-
aggregatedAgentsMdSources,
|
|
358
|
-
loadedSkills,
|
|
359
|
-
errors,
|
|
360
|
-
};
|
|
321
|
+
return finalizeRunRoot(plan, git, manifestEntries, errors);
|
|
361
322
|
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { classifyRuntimeError, TurnExecutionError } from "./turn-execution-error.js";
|
|
2
|
-
import { TurnExecutionFailure } from "./turn-execution-result.js";
|
|
3
|
-
import { resolveTurnRecordIdForExecution } from "./turn-record-id.js";
|
|
4
|
-
import { resolveRootEntryIdFromHandle } from "./turn-tree-strategy.js";
|
|
5
|
-
import { readProcessSemanticEntryRefs } from "./worker-payloads.js";
|
|
6
|
-
export function createAutomaticTurnExecutor(input) {
|
|
7
|
-
const turnType = "automatic";
|
|
8
|
-
const pathType = "primary";
|
|
9
|
-
const turnRecordId = resolveTurnRecordIdForExecution(input.processSnapshot, input.currentTurnId, input.acceptedTurnRecordId);
|
|
10
|
-
let result = null;
|
|
11
|
-
const failure = (error) => {
|
|
12
|
-
const classified = classifyRuntimeError(error);
|
|
13
|
-
const turnError = error instanceof TurnExecutionError
|
|
14
|
-
? error
|
|
15
|
-
: new TurnExecutionError(input.currentTurnId, classified.errorClass, classified.message);
|
|
16
|
-
return new TurnExecutionFailure({
|
|
17
|
-
turnRecordId,
|
|
18
|
-
turnId: input.currentTurnId,
|
|
19
|
-
turnType,
|
|
20
|
-
pathType,
|
|
21
|
-
failure: turnError,
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
return {
|
|
25
|
-
turnRecordId,
|
|
26
|
-
get result() {
|
|
27
|
-
return result;
|
|
28
|
-
},
|
|
29
|
-
async complete(completeInput) {
|
|
30
|
-
if (result) {
|
|
31
|
-
throw new TurnExecutionError(input.currentTurnId, "protocol_error", `Automatic turn '${input.currentTurnId}' completed more than once`);
|
|
32
|
-
}
|
|
33
|
-
result = {
|
|
34
|
-
turnId: input.currentTurnId,
|
|
35
|
-
outcome: completeInput.outcome,
|
|
36
|
-
params: completeInput.params ?? {},
|
|
37
|
-
meta: {
|
|
38
|
-
turnRecordId,
|
|
39
|
-
turnType,
|
|
40
|
-
pathType,
|
|
41
|
-
forkPiEntryId: null,
|
|
42
|
-
resultPiEntryId: null,
|
|
43
|
-
turnResultMarkdown: completeInput.markdown ?? null,
|
|
44
|
-
rootEntryId: input.piHandle
|
|
45
|
-
? resolveRootEntryIdFromHandle(input.piHandle)
|
|
46
|
-
: (readProcessSemanticEntryRefs(input.state)?.rootEntry?.entryId ?? null),
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
},
|
|
50
|
-
failure,
|
|
51
|
-
assertCompletedUnlessParked(parked) {
|
|
52
|
-
if (!result && !parked) {
|
|
53
|
-
throw failure(new TurnExecutionError(input.currentTurnId, "protocol_error", `Automatic turn '${input.currentTurnId}' returned without calling run.complete()`));
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
//# sourceMappingURL=automatic-turn-executor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"automatic-turn-executor.js","sourceRoot":"","sources":["../src/automatic-turn-executor.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAA0B,MAAM,4BAA4B,CAAC;AAC1F,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAqBpE,MAAM,UAAU,2BAA2B,CAAC,KAM3C;IACA,MAAM,QAAQ,GAAoB,WAAW,CAAC;IAC9C,MAAM,QAAQ,GAA8B,SAAS,CAAC;IACtD,MAAM,YAAY,GAAG,+BAA+B,CACnD,KAAK,CAAC,eAAe,EACrB,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,oBAAoB,CAC1B,CAAC;IACF,IAAI,MAAM,GAA+B,IAAI,CAAC;IAE9C,MAAM,OAAO,GAAG,CAAC,KAAc,EAAwB,EAAE;QACxD,MAAM,UAAU,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;QAC/C,MAAM,SAAS,GACd,KAAK,YAAY,kBAAkB;YAClC,CAAC,CAAC,KAAK;YACP,CAAC,CAAC,IAAI,kBAAkB,CAAC,KAAK,CAAC,aAAa,EAAE,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;QAC3F,OAAO,IAAI,oBAAoB,CAAC;YAC/B,YAAY;YACZ,MAAM,EAAE,KAAK,CAAC,aAAa;YAC3B,QAAQ;YACR,QAAQ;YACR,OAAO,EAAE,SAAS;SAClB,CAAC,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO;QACN,YAAY;QACZ,IAAI,MAAM;YACT,OAAO,MAAM,CAAC;QACf,CAAC;QACD,KAAK,CAAC,QAAQ,CAAC,aAAa;YAC3B,IAAI,MAAM,EAAE,CAAC;gBACZ,MAAM,IAAI,kBAAkB,CAC3B,KAAK,CAAC,aAAa,EACnB,gBAAgB,EAChB,mBAAmB,KAAK,CAAC,aAAa,4BAA4B,CAClE,CAAC;YACH,CAAC;YACD,MAAM,GAAG;gBACR,MAAM,EAAE,KAAK,CAAC,aAAa;gBAC3B,OAAO,EAAE,aAAa,CAAC,OAAO;gBAC9B,MAAM,EAAE,aAAa,CAAC,MAAM,IAAI,EAAE;gBAClC,IAAI,EAAE;oBACL,YAAY;oBACZ,QAAQ;oBACR,QAAQ;oBACR,aAAa,EAAE,IAAI;oBACnB,eAAe,EAAE,IAAI;oBACrB,kBAAkB,EAAE,aAAa,CAAC,QAAQ,IAAI,IAAI;oBAClD,WAAW,EAAE,KAAK,CAAC,QAAQ;wBAC1B,CAAC,CAAC,4BAA4B,CAAC,KAAK,CAAC,QAAQ,CAAC;wBAC9C,CAAC,CAAC,CAAC,4BAA4B,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,IAAI,IAAI,CAAC;iBAC1E;aACD,CAAC;QACH,CAAC;QACD,OAAO;QACP,2BAA2B,CAAC,MAAM;YACjC,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC;gBACxB,MAAM,OAAO,CACZ,IAAI,kBAAkB,CACrB,KAAK,CAAC,aAAa,EACnB,gBAAgB,EAChB,mBAAmB,KAAK,CAAC,aAAa,2CAA2C,CACjF,CACD,CAAC;YACH,CAAC;QACF,CAAC;KACD,CAAC;AACH,CAAC"}
|