@sublang/slc 0.5.0 → 0.6.0
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/dist/app.d.ts +20 -20
- package/dist/app.js +29 -29
- package/dist/app.js.map +1 -1
- package/dist/artifacts.d.ts +6 -6
- package/dist/artifacts.d.ts.map +1 -1
- package/dist/artifacts.js +9 -9
- package/dist/artifacts.js.map +1 -1
- package/dist/cli.js +3 -3
- package/dist/cligent-agent.d.ts +1 -1
- package/dist/cligent-agent.js +5 -5
- package/dist/compiled-executor.d.ts +14 -6
- package/dist/compiled-executor.d.ts.map +1 -1
- package/dist/compiled-executor.js +133 -31
- package/dist/compiled-executor.js.map +1 -1
- package/dist/config-file.d.ts +6 -6
- package/dist/config-file.js +5 -5
- package/dist/config.d.ts +17 -15
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +26 -16
- package/dist/config.js.map +1 -1
- package/dist/emitted-imports.d.ts +14 -0
- package/dist/emitted-imports.d.ts.map +1 -1
- package/dist/emitted-imports.js +63 -7
- package/dist/emitted-imports.js.map +1 -1
- package/dist/entry-module.d.ts +5 -3
- package/dist/entry-module.d.ts.map +1 -1
- package/dist/entry-module.js +41 -13
- package/dist/entry-module.js.map +1 -1
- package/dist/execution.d.ts +10 -10
- package/dist/execution.d.ts.map +1 -1
- package/dist/execution.js +13 -13
- package/dist/execution.js.map +1 -1
- package/dist/hash.js +2 -2
- package/dist/host-capabilities.d.ts +115 -0
- package/dist/host-capabilities.d.ts.map +1 -0
- package/dist/host-capabilities.js +507 -0
- package/dist/host-capabilities.js.map +1 -0
- package/dist/interpreter.d.ts +2 -2
- package/dist/interpreter.d.ts.map +1 -1
- package/dist/interpreter.js +7 -7
- package/dist/invocation.d.ts +6 -6
- package/dist/invocation.d.ts.map +1 -1
- package/dist/invocation.js +1 -1
- package/dist/link.d.ts +4 -4
- package/dist/link.d.ts.map +1 -1
- package/dist/link.js +11 -11
- package/dist/link.js.map +1 -1
- package/dist/phase-runner.d.ts +4 -4
- package/dist/phase-runner.js +9 -9
- package/dist/phase.d.ts +4 -4
- package/dist/phase.d.ts.map +1 -1
- package/dist/phase.js +7 -7
- package/dist/phase.js.map +1 -1
- package/dist/pin-closure.d.ts +35 -7
- package/dist/pin-closure.d.ts.map +1 -1
- package/dist/pin-closure.js +135 -21
- package/dist/pin-closure.js.map +1 -1
- package/dist/pin-currency.d.ts +9 -4
- package/dist/pin-currency.d.ts.map +1 -1
- package/dist/pin-currency.js +57 -20
- package/dist/pin-currency.js.map +1 -1
- package/dist/pin-generate.d.ts +7 -7
- package/dist/pin-generate.d.ts.map +1 -1
- package/dist/pin-generate.js +14 -8
- package/dist/pin-generate.js.map +1 -1
- package/dist/pin-inputs.d.ts +41 -0
- package/dist/pin-inputs.d.ts.map +1 -0
- package/dist/pin-inputs.js +179 -0
- package/dist/pin-inputs.js.map +1 -0
- package/dist/pin-paths.d.ts +1 -1
- package/dist/pin-paths.js +4 -4
- package/dist/pin-paths.js.map +1 -1
- package/dist/pins.d.ts +4 -4
- package/dist/pins.d.ts.map +1 -1
- package/dist/pins.js +5 -5
- package/dist/pins.js.map +1 -1
- package/dist/pipeline.d.ts +5 -5
- package/dist/pipeline.js +10 -10
- package/dist/playbook-contract.d.ts +53 -5
- package/dist/playbook-contract.d.ts.map +1 -1
- package/dist/playbook-contract.js +70 -21
- package/dist/playbook-contract.js.map +1 -1
- package/dist/playbook-ports.d.ts +9 -9
- package/dist/playbook-ports.d.ts.map +1 -1
- package/dist/playbook-ports.js +3 -3
- package/dist/playbook-ports.js.map +1 -1
- package/dist/progress.d.ts +8 -9
- package/dist/progress.d.ts.map +1 -1
- package/dist/progress.js +3 -3
- package/dist/progress.js.map +1 -1
- package/dist/resolver.d.ts +9 -9
- package/dist/resolver.d.ts.map +1 -1
- package/dist/resolver.js +12 -12
- package/dist/resolver.js.map +1 -1
- package/dist/runner.d.ts +1 -1
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +195 -80
- package/dist/runner.js.map +1 -1
- package/dist/verify-coverage.d.ts +4 -3
- package/dist/verify-coverage.d.ts.map +1 -1
- package/dist/verify-coverage.js +509 -71
- package/dist/verify-coverage.js.map +1 -1
- package/dist/verify.d.ts +111 -15
- package/dist/verify.d.ts.map +1 -1
- package/dist/verify.js +656 -59
- package/dist/verify.js.map +1 -1
- package/package.json +3 -3
package/dist/link.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare class LinkError extends Error {
|
|
|
22
22
|
constructor(code: LinkErrorCode, message: string);
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
* Parses a `link.md` definition (
|
|
25
|
+
* Parses a `link.md` definition (pipeline-11, pipeline-19).
|
|
26
26
|
*
|
|
27
27
|
* `## Link Targets` is required, except when the linked target format is the
|
|
28
28
|
* Playbook-owned `playbook` format, whose target validation Playbook owns and
|
|
@@ -35,11 +35,11 @@ export declare class LinkError extends Error {
|
|
|
35
35
|
* missing for a non-`playbook` linked format.
|
|
36
36
|
*/
|
|
37
37
|
export declare function parseLinkPhase(content: string): LinkPhase;
|
|
38
|
-
/** Reads and parses a `link.md` file from disk (
|
|
38
|
+
/** Reads and parses a `link.md` file from disk (pipeline-11). */
|
|
39
39
|
export declare function loadLinkFile(path: string): Promise<LinkPhase>;
|
|
40
40
|
/**
|
|
41
|
-
* Computes the linked-artifact path for a full-pipeline link (
|
|
42
|
-
* direct `.link` invocation (
|
|
41
|
+
* Computes the linked-artifact path for a full-pipeline link (pipeline-15) or a
|
|
42
|
+
* direct `.link` invocation (pipeline-18).
|
|
43
43
|
*
|
|
44
44
|
* @throws {LinkError} with code `output-required` for a multi-object `.link`
|
|
45
45
|
* without `-o`.
|
package/dist/link.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../src/link.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,KAAK,UAAU,EAAe,MAAM,YAAY,CAA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Aa,GACrB,iBAAiB,GACjB,mBAAmB,GACnB,cAAc,GACd,sBAAsB,GACtB,yBAAyB,GACzB,iBAAiB,CAAC;AAEtB,qFAAqF;AACrF,qBAAa,SAAU,SAAQ,KAAK;IAClC,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;gBAEjB,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM;CAKjD;AAQD;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CA2CzD;AAED,iEAAiE;AACjE,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAEnE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EACA;IACE,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,GACD;IACE,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,iEAAiE;IACjE,GAAG,EAAE,MAAM,CAAC;CACb,GACJ,MAAM,CA6BR"}
|
package/dist/link.js
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Link phase loading and linked-artifact paths (DR-002).
|
|
5
5
|
*
|
|
6
|
-
* Implements
|
|
7
|
-
* required and the rest optional),
|
|
6
|
+
* Implements pipeline-11 (read `## Formats` and `## Link Targets`, target-form table
|
|
7
|
+
* required and the rest optional), pipeline-19 (refuse a linked format token equal
|
|
8
8
|
* to the object source token; object count/compatibility is the link phase's
|
|
9
|
-
* job),
|
|
9
|
+
* job), pipeline-15 (full-pipeline linked-artifact path, honoring `-o`), and pipeline-18
|
|
10
10
|
* (direct `.link` path: source-adjacent for one object, `-o`-required for many).
|
|
11
|
-
* Discovery and exclusion from chain inference (
|
|
12
|
-
* See specs/
|
|
11
|
+
* Discovery and exclusion from chain inference (pipeline-10) live in pipeline.ts.
|
|
12
|
+
* See specs/packages/pipeline.md.
|
|
13
13
|
*/
|
|
14
14
|
import { readFile } from 'node:fs/promises';
|
|
15
15
|
import { basename as pathBasename, dirname } from 'node:path';
|
|
@@ -31,7 +31,7 @@ export class LinkError extends Error {
|
|
|
31
31
|
*/
|
|
32
32
|
const PLAYBOOK_LINKED_FORMAT = 'playbook';
|
|
33
33
|
/**
|
|
34
|
-
* Parses a `link.md` definition (
|
|
34
|
+
* Parses a `link.md` definition (pipeline-11, pipeline-19).
|
|
35
35
|
*
|
|
36
36
|
* `## Link Targets` is required, except when the linked target format is the
|
|
37
37
|
* Playbook-owned `playbook` format, whose target validation Playbook owns and
|
|
@@ -51,7 +51,7 @@ export function parseLinkPhase(content) {
|
|
|
51
51
|
throw new LinkError('linked-format-collision', `linked format token "${target.format}" must differ from the object source format token`);
|
|
52
52
|
}
|
|
53
53
|
// Playbook owns target validation for its `playbook` linked format, so a
|
|
54
|
-
// `link.md` emitting it carries no ## Link Targets (DR-002, DR-009,
|
|
54
|
+
// `link.md` emitting it carries no ## Link Targets (DR-002, DR-009, pipeline-11).
|
|
55
55
|
const relaxed = target.format === PLAYBOOK_LINKED_FORMAT;
|
|
56
56
|
const section = findSection(content, 'Link Targets');
|
|
57
57
|
if (section === null) {
|
|
@@ -73,13 +73,13 @@ export function parseLinkPhase(content) {
|
|
|
73
73
|
}
|
|
74
74
|
return { source, target, targetForms, requiredSymbols, options, validation };
|
|
75
75
|
}
|
|
76
|
-
/** Reads and parses a `link.md` file from disk (
|
|
76
|
+
/** Reads and parses a `link.md` file from disk (pipeline-11). */
|
|
77
77
|
export async function loadLinkFile(path) {
|
|
78
78
|
return parseLinkPhase(await readFile(path, 'utf8'));
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
81
|
-
* Computes the linked-artifact path for a full-pipeline link (
|
|
82
|
-
* direct `.link` invocation (
|
|
81
|
+
* Computes the linked-artifact path for a full-pipeline link (pipeline-15) or a
|
|
82
|
+
* direct `.link` invocation (pipeline-18).
|
|
83
83
|
*
|
|
84
84
|
* @throws {LinkError} with code `output-required` for a multi-object `.link`
|
|
85
85
|
* without `-o`.
|
|
@@ -156,7 +156,7 @@ function listItems(lines) {
|
|
|
156
156
|
}
|
|
157
157
|
return items;
|
|
158
158
|
}
|
|
159
|
-
/** Derives a basename and directory from a single object, leniently (
|
|
159
|
+
/** Derives a basename and directory from a single object, leniently (pipeline-18, pipeline-19). */
|
|
160
160
|
function deriveObjectBasename(objectPath, source) {
|
|
161
161
|
const name = pathBasename(objectPath);
|
|
162
162
|
const dir = dirname(objectPath);
|
package/dist/link.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.js","sourceRoot":"","sources":["../src/link.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,0EAA0E;AAE1E;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAmB,WAAW,EAAE,MAAM,YAAY,CAAC;AA2B1D,qFAAqF;AACrF,MAAM,OAAO,SAAU,SAAQ,KAAK;IACzB,IAAI,CAAgB;IAE7B,YAAY,IAAmB,EAAE,OAAe;QAC9C,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QACxB,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AAC;IACT,MAAM,SAAS,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;IACtC,IAAI,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QAC7B,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AACjC,CAAC"}
|
package/dist/phase-runner.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export interface PhaseResult {
|
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* Maps a compiled phase's {@link PhaseResult} onto the DR-003 execution-boundary
|
|
21
|
-
* outcome consumed by `runPhase` (
|
|
21
|
+
* outcome consumed by `runPhase` (phase-execution-24).
|
|
22
22
|
*
|
|
23
23
|
* The facade result (owned by the DR-005 artifact contract) and the executor
|
|
24
24
|
* result (owned by the DR-003 boundary) are distinct types, so the compiled
|
|
@@ -37,7 +37,7 @@ export declare function mapPhaseResult(result: PhaseResult): ExecutorResult;
|
|
|
37
37
|
export declare function resolvesToPlaybook(source: string): boolean;
|
|
38
38
|
/**
|
|
39
39
|
* Seeds a phase request into the single non-interactive Boss turn `slc` hands
|
|
40
|
-
* the runtime through `handleBossInput` (
|
|
40
|
+
* the runtime through `handleBossInput` (phase-execution-29; DR-005).
|
|
41
41
|
*
|
|
42
42
|
* The settled SLC-to-runtime seeding contract: one Boss turn whose text states
|
|
43
43
|
* the request kind in prose — so any compiled playbook's judge-backed classifier
|
|
@@ -49,12 +49,12 @@ export declare function resolvesToPlaybook(source: string): boolean;
|
|
|
49
49
|
export declare function seedPhaseTurn(input: PhaseInput): string;
|
|
50
50
|
/**
|
|
51
51
|
* Composes the host workspace contract a transformation-performing direct
|
|
52
|
-
* Captain call carries (
|
|
52
|
+
* Captain call carries (phase-execution-34; DR-005, DR-012).
|
|
53
53
|
*
|
|
54
54
|
* A linked `playbook` artifact composes host-agnostic Captain prompts — the
|
|
55
55
|
* GEARS-derived domain body plus typed runtime evidence — and is forbidden from
|
|
56
56
|
* appending workspace specifics, which only the host owns. Mirroring the
|
|
57
|
-
* interpreted agent contract (
|
|
57
|
+
* interpreted agent contract (phase-execution-14), the host therefore supplies the
|
|
58
58
|
* request's absolute workspace paths and write-scope rules at its transport
|
|
59
59
|
* boundary, so the acting Captain writes exactly the declared target instead
|
|
60
60
|
* of merely emitting the artifact in its reply. Routing-only Captain calls
|
package/dist/phase-runner.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
// SPDX-FileCopyrightText: 2026 SubLang International <https://sublang.ai>
|
|
3
3
|
/**
|
|
4
|
-
* SLC phase-runner facade for compiled `playbook` artifacts (
|
|
5
|
-
*
|
|
4
|
+
* SLC phase-runner facade for compiled `playbook` artifacts (phase-execution-23,
|
|
5
|
+
* phase-execution-24; DR-005).
|
|
6
6
|
*
|
|
7
7
|
* A compiled `playbook` artifact default-exports a `PlaybookRuntimeFactory`
|
|
8
8
|
* (`createPlaybookRuntime`). `slc` drives it host-side — `init` with the
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
* The non-interactive driving lives in the compiled executor; this module owns
|
|
17
17
|
* the shared facade types, the static `playbook`-format recognition the
|
|
18
18
|
* pin-currency validator uses, the seeding of a phase request into the
|
|
19
|
-
* runtime's single Boss turn (
|
|
20
|
-
* transformation-performing direct Captain call carries (
|
|
21
|
-
* specs/
|
|
19
|
+
* runtime's single Boss turn (phase-execution-29), and the host workspace contract a
|
|
20
|
+
* transformation-performing direct Captain call carries (phase-execution-34). See
|
|
21
|
+
* specs/packages/phase-execution.md.
|
|
22
22
|
*/
|
|
23
23
|
import ts from 'typescript';
|
|
24
24
|
/**
|
|
25
25
|
* Maps a compiled phase's {@link PhaseResult} onto the DR-003 execution-boundary
|
|
26
|
-
* outcome consumed by `runPhase` (
|
|
26
|
+
* outcome consumed by `runPhase` (phase-execution-24).
|
|
27
27
|
*
|
|
28
28
|
* The facade result (owned by the DR-005 artifact contract) and the executor
|
|
29
29
|
* result (owned by the DR-003 boundary) are distinct types, so the compiled
|
|
@@ -262,7 +262,7 @@ function unwrapExpression(expression) {
|
|
|
262
262
|
}
|
|
263
263
|
/**
|
|
264
264
|
* Seeds a phase request into the single non-interactive Boss turn `slc` hands
|
|
265
|
-
* the runtime through `handleBossInput` (
|
|
265
|
+
* the runtime through `handleBossInput` (phase-execution-29; DR-005).
|
|
266
266
|
*
|
|
267
267
|
* The settled SLC-to-runtime seeding contract: one Boss turn whose text states
|
|
268
268
|
* the request kind in prose — so any compiled playbook's judge-backed classifier
|
|
@@ -279,12 +279,12 @@ export function seedPhaseTurn(input) {
|
|
|
279
279
|
}
|
|
280
280
|
/**
|
|
281
281
|
* Composes the host workspace contract a transformation-performing direct
|
|
282
|
-
* Captain call carries (
|
|
282
|
+
* Captain call carries (phase-execution-34; DR-005, DR-012).
|
|
283
283
|
*
|
|
284
284
|
* A linked `playbook` artifact composes host-agnostic Captain prompts — the
|
|
285
285
|
* GEARS-derived domain body plus typed runtime evidence — and is forbidden from
|
|
286
286
|
* appending workspace specifics, which only the host owns. Mirroring the
|
|
287
|
-
* interpreted agent contract (
|
|
287
|
+
* interpreted agent contract (phase-execution-14), the host therefore supplies the
|
|
288
288
|
* request's absolute workspace paths and write-scope rules at its transport
|
|
289
289
|
* boundary, so the acting Captain writes exactly the declared target instead
|
|
290
290
|
* of merely emitting the artifact in its reply. Routing-only Captain calls
|
package/dist/phase.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export declare class PhaseError extends Error {
|
|
|
33
33
|
export declare function isPortablePhaseName(value: string): boolean;
|
|
34
34
|
/**
|
|
35
35
|
* Reads the authoritative `## Formats` table into its source and target
|
|
36
|
-
* declarations (
|
|
36
|
+
* declarations (pipeline-1), shared by the phase and link loaders.
|
|
37
37
|
*
|
|
38
38
|
* Refusals are reported through `fail` so each loader can raise its own error
|
|
39
39
|
* type; `fail` must not return.
|
|
@@ -46,17 +46,17 @@ export declare function readFormats(content: string, fail: (code: FormatsErrorCo
|
|
|
46
46
|
* Parses and validates a phase definition from its filename and content.
|
|
47
47
|
*
|
|
48
48
|
* @throws {PhaseError} when the `## Formats` table is missing or malformed, or
|
|
49
|
-
* when the filename does not match the declared tokens (
|
|
49
|
+
* when the filename does not match the declared tokens (pipeline-1, pipeline-2).
|
|
50
50
|
*/
|
|
51
51
|
export declare function parsePhase(file: {
|
|
52
52
|
name: string;
|
|
53
53
|
content: string;
|
|
54
54
|
}): Phase;
|
|
55
|
-
/** Reads a phase definition file from disk and parses it (
|
|
55
|
+
/** Reads a phase definition file from disk and parses it (pipeline-1, pipeline-2). */
|
|
56
56
|
export declare function loadPhaseFile(path: string): Promise<Phase>;
|
|
57
57
|
/**
|
|
58
58
|
* Refuses a set of phases that declare conflicting extensions for the same
|
|
59
|
-
* format token (
|
|
59
|
+
* format token (pipeline-3).
|
|
60
60
|
*
|
|
61
61
|
* @throws {PhaseError} with code `extension-conflict` on the first conflict.
|
|
62
62
|
*/
|
package/dist/phase.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phase.d.ts","sourceRoot":"","sources":["../src/phase.ts"],"names":[],"mappings":"AAkBA,4DAA4D;AAC5D,MAAM,WAAW,UAAU;IACzB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,GAAG,EAAE,MAAM,CAAC;CACb;AAED,uEAAuE;AACvE,MAAM,WAAW,KAAK;IACpB,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,MAAM,EAAE,UAAU,CAAC;IACnB,4BAA4B;IAC5B,MAAM,EAAE,UAAU,CAAC;IACnB;;;;OAIG;IACH,IAAI,EAAE,OAAO,CAAC;CACf;AAED,gEAAgE;AAChE,MAAM,MAAM,gBAAgB,GACxB,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AAc,CAAC;AAEnB,mDAAmD;AACnD,MAAM,MAAM,cAAc,GACtB,gBAAgB,GAChB,mBAAmB,GACnB,oBAAoB,CAAC;AAEzB,8DAA8D;AAC9D,qBAAa,UAAW,SAAQ,KAAK;IACnC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;gBAElB,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM;CAKlD;AAKD,2EAA2E;AAC3E,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAU1D;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,KAAK,KAAK,GACvD;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAE,CAwC5C;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,KAAK,CA2BzE;AAED,sFAAsF;AACtF,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAGhE;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,SAAS,KAAK,EAAE,GAAG,IAAI,CAgBxE"}
|
package/dist/phase.js
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Phase model and `## Formats` parsing (DR-001).
|
|
5
5
|
*
|
|
6
|
-
* Implements
|
|
6
|
+
* Implements pipeline-1 (read the authoritative `## Formats` table), pipeline-2 (refuse
|
|
7
7
|
* a phase whose `<source-format>2<target-format>.md` filename does not match its
|
|
8
|
-
* table), and
|
|
8
|
+
* table), and pipeline-3 (refuse phases declaring conflicting extensions for the
|
|
9
9
|
* same format token). The `## Formats` reader is shared with the link loader.
|
|
10
|
-
* See specs/
|
|
10
|
+
* See specs/packages/pipeline.md.
|
|
11
11
|
*/
|
|
12
12
|
import { readFile } from 'node:fs/promises';
|
|
13
13
|
import { basename } from 'node:path';
|
|
@@ -35,7 +35,7 @@ export function isPortablePhaseName(value) {
|
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* Reads the authoritative `## Formats` table into its source and target
|
|
38
|
-
* declarations (
|
|
38
|
+
* declarations (pipeline-1), shared by the phase and link loaders.
|
|
39
39
|
*
|
|
40
40
|
* Refusals are reported through `fail` so each loader can raise its own error
|
|
41
41
|
* type; `fail` must not return.
|
|
@@ -75,7 +75,7 @@ export function readFormats(content, fail) {
|
|
|
75
75
|
* Parses and validates a phase definition from its filename and content.
|
|
76
76
|
*
|
|
77
77
|
* @throws {PhaseError} when the `## Formats` table is missing or malformed, or
|
|
78
|
-
* when the filename does not match the declared tokens (
|
|
78
|
+
* when the filename does not match the declared tokens (pipeline-1, pipeline-2).
|
|
79
79
|
*/
|
|
80
80
|
export function parsePhase(file) {
|
|
81
81
|
const { source, target } = readFormats(file.content, (code, message) => {
|
|
@@ -98,14 +98,14 @@ export function parsePhase(file) {
|
|
|
98
98
|
}
|
|
99
99
|
return { name: file.name.slice(0, -'.md'.length), source, target, pass };
|
|
100
100
|
}
|
|
101
|
-
/** Reads a phase definition file from disk and parses it (
|
|
101
|
+
/** Reads a phase definition file from disk and parses it (pipeline-1, pipeline-2). */
|
|
102
102
|
export async function loadPhaseFile(path) {
|
|
103
103
|
const content = await readFile(path, 'utf8');
|
|
104
104
|
return parsePhase({ name: basename(path), content });
|
|
105
105
|
}
|
|
106
106
|
/**
|
|
107
107
|
* Refuses a set of phases that declare conflicting extensions for the same
|
|
108
|
-
* format token (
|
|
108
|
+
* format token (pipeline-3).
|
|
109
109
|
*
|
|
110
110
|
* @throws {PhaseError} with code `extension-conflict` on the first conflict.
|
|
111
111
|
*/
|
package/dist/phase.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
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2
|
+
import { PinError, type PinRecord } from './pins.js';
|
|
3
|
+
/** A derived closure together with the declaration form that supplied it. */
|
|
4
|
+
export interface DerivedClosure {
|
|
5
|
+
paths: Set<string>;
|
|
6
|
+
declaration: 'sidecar' | 'inline';
|
|
7
|
+
}
|
|
8
|
+
/** A complete closure or the safely resolved subset of an incomplete one. */
|
|
9
|
+
export interface InspectedClosure {
|
|
10
|
+
paths: Set<string>;
|
|
11
|
+
declaration?: 'sidecar' | 'inline';
|
|
12
|
+
complete: boolean;
|
|
13
|
+
issue?: PinError;
|
|
14
|
+
}
|
|
2
15
|
/** Extracts the inline-code paths cited by a `## Pin Inputs` section (DR-007). */
|
|
3
16
|
export declare function parsePinInputs(content: string): string[];
|
|
4
17
|
/**
|
|
5
18
|
* Derives the semantic-input closure of `definitionPath` as a set of resolved
|
|
6
|
-
* absolute paths
|
|
7
|
-
*
|
|
19
|
+
* absolute paths (pinning-2, pinning-4, pinning-17).
|
|
20
|
+
*
|
|
21
|
+
* `phase` selects that phase's authoritative flattened sidecar entry when one
|
|
22
|
+
* exists. Omitting `phase` always selects inline transitive derivation, which is
|
|
23
|
+
* required for explicit Markdown references that are not the phase definition.
|
|
8
24
|
*
|
|
9
25
|
* @throws {import('./pins.js').PinError} when a cited path is absolute or escapes
|
|
10
|
-
* the recorded boundary (
|
|
26
|
+
* the recorded boundary (pinning-5).
|
|
27
|
+
*/
|
|
28
|
+
export declare function deriveClosure(pipelineDir: string, boundary: string, definitionPath: string, phase?: string, observePath?: (path: string) => void, pinInputs?: LoadedPinInputs): Promise<Set<string>>;
|
|
29
|
+
/** Derives a closure and reports whether a matching sidecar entry supplied it. */
|
|
30
|
+
export declare function deriveClosureWithDeclaration(pipelineDir: string, boundary: string, definitionPath: string, phase?: string, observePath?: (path: string) => void, pinInputs?: LoadedPinInputs): Promise<DerivedClosure>;
|
|
31
|
+
/**
|
|
32
|
+
* Inspects closure derivation without discarding independently safe members.
|
|
33
|
+
*
|
|
34
|
+
* Strict generation and currency callers use {@link deriveClosureWithDeclaration},
|
|
35
|
+
* which throws the first issue. Runtime protection consumes this structured
|
|
36
|
+
* result even when `complete` is false, while incremental identity does not.
|
|
11
37
|
*/
|
|
12
|
-
export declare function
|
|
38
|
+
export declare function inspectClosureWithDeclaration(pipelineDir: string, boundary: string, definitionPath: string, phase?: string, observePath?: (path: string) => void, pinInputs?: LoadedPinInputs): Promise<InspectedClosure>;
|
|
13
39
|
/**
|
|
14
40
|
* Reports whether the closure derived from `record.definition` matches the
|
|
15
41
|
* recorded definition plus semanticInputs, compared as sets of resolved paths
|
|
16
|
-
* (
|
|
42
|
+
* (pinning-4).
|
|
17
43
|
*/
|
|
18
|
-
export declare function closureMatchesRecord(pipelineDir: string, boundary: string, record: PinRecord, observePath?: (path: string) => void): Promise<boolean>;
|
|
44
|
+
export declare function closureMatchesRecord(pipelineDir: string, boundary: string, record: PinRecord, phase?: string, observePath?: (path: string) => void, pinInputs?: LoadedPinInputs): Promise<boolean>;
|
|
45
|
+
/** Compares one already-derived closure with the paths recorded by a pin. */
|
|
46
|
+
export declare function derivedClosureMatchesRecord(pipelineDir: string, boundary: string, record: PinRecord, derived: ReadonlySet<string>): boolean;
|
|
19
47
|
//# sourceMappingURL=pin-closure.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pin-closure.d.ts","sourceRoot":"","sources":["../src/pin-closure.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pin-closure.d.ts","sourceRoot":"","sources":["../src/pin-closure.ts"],"names":[],"mappings":"AAoBA,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAKrD,6EAA6E;AAC7E,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACnB,WAAW,EAAE,SAAS,GAAG,QAAQ,CAAC;CACnC;AAED,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,EACjB,KAAK,CAAC,EAAE,MAAM,EACd,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,EACpC,SAAS,CAAC,EAAE,eAAe,GAC1B,OAAO,CAAC,OAAO,CAAC,CAUlB;AAED,6EAA6E;AAC7E,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,GAC3B,OAAO,CAgBT"}
|
package/dist/pin-closure.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
// SPDX-FileCopyrightText: 2026 SubLang International <https://sublang.ai>
|
|
3
3
|
/**
|
|
4
|
-
* Semantic-input closure derivation for
|
|
5
|
-
* DR-
|
|
4
|
+
* Semantic-input closure derivation for pin generation, currency, incremental
|
|
5
|
+
* identity, and protected-input discovery (pinning-17, pinning-21; DR-026).
|
|
6
6
|
*
|
|
7
|
-
* A pinned phase's semantic-input closure is
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* definition plus semanticInputs; any difference is a stale verdict (PIN-4). See
|
|
16
|
-
* specs/dev/pinning.md.
|
|
7
|
+
* A pinned phase's semantic-input closure is its definition plus the complete
|
|
8
|
+
* flattened paths in a matching `slc.pin-inputs.json` entry, when present.
|
|
9
|
+
* Without that entry, the legacy declaration remains every local file
|
|
10
|
+
* transitively cited by inline `## Pin Inputs` sections. Explicit Markdown
|
|
11
|
+
* references select no phase entry and therefore always retain inline
|
|
12
|
+
* transitive derivation (pinning-17). Strict callers reject an incomplete
|
|
13
|
+
* closure; protected-input discovery can retain its independently resolved
|
|
14
|
+
* in-boundary members (phase-execution-50). See specs/packages/pinning.md.
|
|
17
15
|
*/
|
|
18
16
|
import { readFile } from 'node:fs/promises';
|
|
19
17
|
import { findSection } from './markdown.js';
|
|
18
|
+
import { inspectPinInputsFile, PIN_INPUTS_FILE, } from './pin-inputs.js';
|
|
20
19
|
import { resolvePinPath } from './pin-paths.js';
|
|
20
|
+
import { PinError } from './pins.js';
|
|
21
21
|
const PIN_INPUT_FIELD = 'pin input path';
|
|
22
22
|
const INLINE_CODE = /`([^`]+)`/g;
|
|
23
23
|
/** Extracts the inline-code paths cited by a `## Pin Inputs` section (DR-007). */
|
|
@@ -36,23 +36,123 @@ export function parsePinInputs(content) {
|
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
38
|
* Derives the semantic-input closure of `definitionPath` as a set of resolved
|
|
39
|
-
* absolute paths
|
|
40
|
-
*
|
|
39
|
+
* absolute paths (pinning-2, pinning-4, pinning-17).
|
|
40
|
+
*
|
|
41
|
+
* `phase` selects that phase's authoritative flattened sidecar entry when one
|
|
42
|
+
* exists. Omitting `phase` always selects inline transitive derivation, which is
|
|
43
|
+
* required for explicit Markdown references that are not the phase definition.
|
|
41
44
|
*
|
|
42
45
|
* @throws {import('./pins.js').PinError} when a cited path is absolute or escapes
|
|
43
|
-
* the recorded boundary (
|
|
46
|
+
* the recorded boundary (pinning-5).
|
|
44
47
|
*/
|
|
45
|
-
export async function deriveClosure(pipelineDir, boundary, definitionPath, observePath) {
|
|
48
|
+
export async function deriveClosure(pipelineDir, boundary, definitionPath, phase, observePath, pinInputs) {
|
|
49
|
+
return (await deriveClosureWithDeclaration(pipelineDir, boundary, definitionPath, phase, observePath, pinInputs)).paths;
|
|
50
|
+
}
|
|
51
|
+
/** Derives a closure and reports whether a matching sidecar entry supplied it. */
|
|
52
|
+
export async function deriveClosureWithDeclaration(pipelineDir, boundary, definitionPath, phase, observePath, pinInputs) {
|
|
53
|
+
const inspected = await inspectClosureWithDeclaration(pipelineDir, boundary, definitionPath, phase, observePath, pinInputs);
|
|
54
|
+
if (inspected.issue !== undefined) {
|
|
55
|
+
throw inspected.issue;
|
|
56
|
+
}
|
|
57
|
+
if (inspected.declaration === undefined) {
|
|
58
|
+
throw new Error('complete closure inspection has no declaration');
|
|
59
|
+
}
|
|
60
|
+
return { paths: inspected.paths, declaration: inspected.declaration };
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Inspects closure derivation without discarding independently safe members.
|
|
64
|
+
*
|
|
65
|
+
* Strict generation and currency callers use {@link deriveClosureWithDeclaration},
|
|
66
|
+
* which throws the first issue. Runtime protection consumes this structured
|
|
67
|
+
* result even when `complete` is false, while incremental identity does not.
|
|
68
|
+
*/
|
|
69
|
+
export async function inspectClosureWithDeclaration(pipelineDir, boundary, definitionPath, phase, observePath, pinInputs) {
|
|
70
|
+
let inspectedPinInputs;
|
|
71
|
+
let sidecarIssue;
|
|
72
|
+
let loaded = pinInputs;
|
|
73
|
+
if (phase !== undefined) {
|
|
74
|
+
if (loaded === undefined) {
|
|
75
|
+
try {
|
|
76
|
+
inspectedPinInputs = await inspectPinInputsFile(pipelineDir, boundary);
|
|
77
|
+
loaded = inspectedPinInputs;
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
if (!(error instanceof PinError))
|
|
81
|
+
throw error;
|
|
82
|
+
// The sidecar structure cannot be trusted, but the definition's inline
|
|
83
|
+
// tree remains independently discoverable for conservative protection.
|
|
84
|
+
sidecarIssue = error;
|
|
85
|
+
loaded = {};
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (loaded.file !== undefined &&
|
|
89
|
+
Object.hasOwn(loaded.file.closures, phase)) {
|
|
90
|
+
if (loaded.path !== undefined) {
|
|
91
|
+
observePath?.(loaded.path);
|
|
92
|
+
}
|
|
93
|
+
const closure = new Set();
|
|
94
|
+
let issue = inspectedPinInputs?.issue;
|
|
95
|
+
try {
|
|
96
|
+
addResolvedPath(closure, pipelineDir, boundary, definitionPath, 'definition.path', observePath);
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
if (!(error instanceof PinError))
|
|
100
|
+
throw error;
|
|
101
|
+
issue ??= error;
|
|
102
|
+
}
|
|
103
|
+
const declared = loaded.file.closures[phase];
|
|
104
|
+
const inspectedMembers = inspectedPinInputs?.resolvedClosures[phase];
|
|
105
|
+
for (let index = 0; index < declared.length; index++) {
|
|
106
|
+
const field = `${PIN_INPUTS_FILE}.closures.${phase}[${index}]`;
|
|
107
|
+
let resolved = inspectedMembers?.[index];
|
|
108
|
+
if (inspectedMembers === undefined) {
|
|
109
|
+
try {
|
|
110
|
+
resolved = resolvePinPath(pipelineDir, boundary, declared[index], field);
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
if (!(error instanceof PinError))
|
|
114
|
+
throw error;
|
|
115
|
+
issue ??= error;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if (resolved === undefined)
|
|
119
|
+
continue;
|
|
120
|
+
if (closure.has(resolved)) {
|
|
121
|
+
issue ??= new PinError('pin-invalid', `${field} resolves to the definition or another closure member`);
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
closure.add(resolved);
|
|
125
|
+
}
|
|
126
|
+
observePath?.(resolved);
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
paths: closure,
|
|
130
|
+
declaration: 'sidecar',
|
|
131
|
+
complete: issue === undefined,
|
|
132
|
+
...(issue === undefined ? {} : { issue }),
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
}
|
|
46
136
|
const closure = new Set();
|
|
47
137
|
const seen = new Set();
|
|
48
138
|
const queue = [definitionPath];
|
|
139
|
+
let issue = sidecarIssue ?? inspectedPinInputs?.issue;
|
|
49
140
|
while (queue.length > 0) {
|
|
50
141
|
const rel = queue.shift();
|
|
51
142
|
if (seen.has(rel)) {
|
|
52
143
|
continue;
|
|
53
144
|
}
|
|
54
145
|
seen.add(rel);
|
|
55
|
-
|
|
146
|
+
let resolved;
|
|
147
|
+
try {
|
|
148
|
+
resolved = resolvePinPath(pipelineDir, boundary, rel, PIN_INPUT_FIELD);
|
|
149
|
+
}
|
|
150
|
+
catch (error) {
|
|
151
|
+
if (!(error instanceof PinError))
|
|
152
|
+
throw error;
|
|
153
|
+
issue ??= error;
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
56
156
|
closure.add(resolved);
|
|
57
157
|
observePath?.(resolved);
|
|
58
158
|
// Recurse only into Markdown inputs that declare their own ## Pin Inputs;
|
|
@@ -70,15 +170,24 @@ export async function deriveClosure(pipelineDir, boundary, definitionPath, obser
|
|
|
70
170
|
}
|
|
71
171
|
}
|
|
72
172
|
}
|
|
73
|
-
return
|
|
173
|
+
return {
|
|
174
|
+
paths: closure,
|
|
175
|
+
declaration: 'inline',
|
|
176
|
+
complete: issue === undefined,
|
|
177
|
+
...(issue === undefined ? {} : { issue }),
|
|
178
|
+
};
|
|
74
179
|
}
|
|
75
180
|
/**
|
|
76
181
|
* Reports whether the closure derived from `record.definition` matches the
|
|
77
182
|
* recorded definition plus semanticInputs, compared as sets of resolved paths
|
|
78
|
-
* (
|
|
183
|
+
* (pinning-4).
|
|
79
184
|
*/
|
|
80
|
-
export async function closureMatchesRecord(pipelineDir, boundary, record, observePath) {
|
|
81
|
-
const derived = await deriveClosure(pipelineDir, boundary, record.definition.path, observePath);
|
|
185
|
+
export async function closureMatchesRecord(pipelineDir, boundary, record, phase, observePath, pinInputs) {
|
|
186
|
+
const derived = await deriveClosure(pipelineDir, boundary, record.definition.path, phase, observePath, pinInputs);
|
|
187
|
+
return derivedClosureMatchesRecord(pipelineDir, boundary, record, derived);
|
|
188
|
+
}
|
|
189
|
+
/** Compares one already-derived closure with the paths recorded by a pin. */
|
|
190
|
+
export function derivedClosureMatchesRecord(pipelineDir, boundary, record, derived) {
|
|
82
191
|
const recorded = new Set();
|
|
83
192
|
recorded.add(resolvePinPath(pipelineDir, boundary, record.definition.path, 'definition.path'));
|
|
84
193
|
for (const input of record.semanticInputs) {
|
|
@@ -86,6 +195,11 @@ export async function closureMatchesRecord(pipelineDir, boundary, record, observ
|
|
|
86
195
|
}
|
|
87
196
|
return setsEqual(derived, recorded);
|
|
88
197
|
}
|
|
198
|
+
function addResolvedPath(closure, pipelineDir, boundary, path, field, observePath) {
|
|
199
|
+
const resolved = resolvePinPath(pipelineDir, boundary, path, field);
|
|
200
|
+
closure.add(resolved);
|
|
201
|
+
observePath?.(resolved);
|
|
202
|
+
}
|
|
89
203
|
function isMarkdown(path) {
|
|
90
204
|
return path.toLowerCase().endsWith('.md');
|
|
91
205
|
}
|
package/dist/pin-closure.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pin-closure.js","sourceRoot":"","sources":["../src/pin-closure.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,0EAA0E;AAE1E
|
|
1
|
+
{"version":3,"file":"pin-closure.js","sourceRoot":"","sources":["../src/pin-closure.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,0EAA0E;AAE1E;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EACL,oBAAoB,EACpB,eAAe,GAGhB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAkB,MAAM,WAAW,CAAC;AAErD,MAAM,eAAe,GAAG,gBAAgB,CAAC;AACzC,MAAM,WAAW,GAAG,YAAY,CAAC;AAgBjC,kFAAkF;AAClF,MAAM,UAAU,cAAc,CAAC,OAAe;IAC5C,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IACjD,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,KA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