@12ui/design 0.2.54 → 0.2.56
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/SKILL.md +1 -1
- package/dist/cli-arguments.d.ts.map +1 -1
- package/dist/cli-arguments.js +2 -0
- package/dist/cli-arguments.js.map +1 -1
- package/dist/cli-conversion-derivation.d.ts +2 -1
- package/dist/cli-conversion-derivation.d.ts.map +1 -1
- package/dist/cli-conversion-derivation.js +9 -1
- package/dist/cli-conversion-derivation.js.map +1 -1
- package/dist/cli-convert-command.js +1 -1
- package/dist/cli-convert-command.js.map +1 -1
- package/dist/cli-draft-command.d.ts +11 -0
- package/dist/cli-draft-command.d.ts.map +1 -1
- package/dist/cli-draft-command.js +10 -1
- package/dist/cli-draft-command.js.map +1 -1
- package/dist/cli-help/design.d.ts +1 -1
- package/dist/cli-help/design.d.ts.map +1 -1
- package/dist/cli-help/design.js +8 -0
- package/dist/cli-help/design.js.map +1 -1
- package/dist/cli-help/index.d.ts +1 -1
- package/dist/cli-improve-command.d.ts.map +1 -1
- package/dist/cli-improve-command.js +257 -57
- package/dist/cli-improve-command.js.map +1 -1
- package/dist/cli-next-command.d.ts.map +1 -1
- package/dist/cli-next-command.js +44 -4
- package/dist/cli-next-command.js.map +1 -1
- package/dist/cli-usage.js +1 -1
- package/dist/improve-conversion-attempts.d.ts +92 -0
- package/dist/improve-conversion-attempts.d.ts.map +1 -0
- package/dist/improve-conversion-attempts.js +88 -0
- package/dist/improve-conversion-attempts.js.map +1 -0
- package/dist/improve-conversion-stage.d.ts +35 -0
- package/dist/improve-conversion-stage.d.ts.map +1 -0
- package/dist/improve-conversion-stage.js +381 -0
- package/dist/improve-conversion-stage.js.map +1 -0
- package/dist/improve-convert-resilience.d.ts +148 -0
- package/dist/improve-convert-resilience.d.ts.map +1 -0
- package/dist/improve-convert-resilience.js +266 -0
- package/dist/improve-convert-resilience.js.map +1 -0
- package/dist/improve-delivery-stages.d.ts +0 -6
- package/dist/improve-delivery-stages.d.ts.map +1 -1
- package/dist/improve-delivery-stages.js +5 -103
- package/dist/improve-delivery-stages.js.map +1 -1
- package/dist/improve-dom-diff.d.ts +2 -0
- package/dist/improve-dom-diff.d.ts.map +1 -1
- package/dist/improve-dom-diff.js +7 -0
- package/dist/improve-dom-diff.js.map +1 -1
- package/dist/improve-dom-gate.d.ts +7 -0
- package/dist/improve-dom-gate.d.ts.map +1 -1
- package/dist/improve-dom-gate.js +13 -0
- package/dist/improve-dom-gate.js.map +1 -1
- package/dist/improve-generation-stages.d.ts +3 -0
- package/dist/improve-generation-stages.d.ts.map +1 -1
- package/dist/improve-generation-stages.js +24 -7
- package/dist/improve-generation-stages.js.map +1 -1
- package/dist/improve-kit-assets.d.ts +129 -0
- package/dist/improve-kit-assets.d.ts.map +1 -0
- package/dist/improve-kit-assets.js +333 -0
- package/dist/improve-kit-assets.js.map +1 -0
- package/dist/improve-kit-readme.d.ts +11 -2
- package/dist/improve-kit-readme.d.ts.map +1 -1
- package/dist/improve-kit-readme.js +192 -21
- package/dist/improve-kit-readme.js.map +1 -1
- package/dist/improve-kit-stall.d.ts +67 -0
- package/dist/improve-kit-stall.d.ts.map +1 -0
- package/dist/improve-kit-stall.js +159 -0
- package/dist/improve-kit-stall.js.map +1 -0
- package/dist/improve-kit-status.d.ts +69 -0
- package/dist/improve-kit-status.d.ts.map +1 -0
- package/dist/improve-kit-status.js +145 -0
- package/dist/improve-kit-status.js.map +1 -0
- package/dist/improve-options.d.ts +13 -1
- package/dist/improve-options.d.ts.map +1 -1
- package/dist/improve-options.js +77 -15
- package/dist/improve-options.js.map +1 -1
- package/dist/improve-plan-annotated-render.d.ts +33 -0
- package/dist/improve-plan-annotated-render.d.ts.map +1 -0
- package/dist/improve-plan-annotated-render.js +175 -0
- package/dist/improve-plan-annotated-render.js.map +1 -0
- package/dist/improve-plan-annotator.d.ts +2 -1
- package/dist/improve-plan-annotator.d.ts.map +1 -1
- package/dist/improve-plan-annotator.js +21 -45
- package/dist/improve-plan-annotator.js.map +1 -1
- package/dist/improve-raster-layers-section.d.ts +21 -0
- package/dist/improve-raster-layers-section.d.ts.map +1 -0
- package/dist/improve-raster-layers-section.js +45 -0
- package/dist/improve-raster-layers-section.js.map +1 -0
- package/dist/improve-reset.d.ts +122 -0
- package/dist/improve-reset.d.ts.map +1 -0
- package/dist/improve-reset.js +141 -0
- package/dist/improve-reset.js.map +1 -0
- package/dist/improve-run-summary.d.ts +35 -0
- package/dist/improve-run-summary.d.ts.map +1 -0
- package/dist/improve-run-summary.js +134 -0
- package/dist/improve-run-summary.js.map +1 -0
- package/dist/improve-stage-runners.d.ts +2 -1
- package/dist/improve-stage-runners.d.ts.map +1 -1
- package/dist/improve-stage-runners.js +2 -1
- package/dist/improve-stage-runners.js.map +1 -1
- package/dist/improve-stage-shared.d.ts +6 -0
- package/dist/improve-stage-shared.d.ts.map +1 -1
- package/dist/improve-stage-shared.js.map +1 -1
- package/dist/improve-stop-handler.d.ts +73 -0
- package/dist/improve-stop-handler.d.ts.map +1 -0
- package/dist/improve-stop-handler.js +126 -0
- package/dist/improve-stop-handler.js.map +1 -0
- package/dist/improve-terminal-event.d.ts +118 -0
- package/dist/improve-terminal-event.d.ts.map +1 -0
- package/dist/improve-terminal-event.js +81 -0
- package/dist/improve-terminal-event.js.map +1 -0
- package/dist/improve-workspace.d.ts +25 -0
- package/dist/improve-workspace.d.ts.map +1 -1
- package/dist/improve-workspace.js +14 -0
- package/dist/improve-workspace.js.map +1 -1
- package/dist/legacy-skill-catalog.d.ts.map +1 -1
- package/dist/legacy-skill-catalog.js +23 -3
- package/dist/legacy-skill-catalog.js.map +1 -1
- package/dist/redesign-capture.d.ts +16 -0
- package/dist/redesign-capture.d.ts.map +1 -1
- package/dist/redesign-capture.js +49 -3
- package/dist/redesign-capture.js.map +1 -1
- package/dist/run-journal-unfinished.d.ts +56 -0
- package/dist/run-journal-unfinished.d.ts.map +1 -0
- package/dist/run-journal-unfinished.js +126 -0
- package/dist/run-journal-unfinished.js.map +1 -0
- package/dist/run-journal.d.ts +25 -1
- package/dist/run-journal.d.ts.map +1 -1
- package/dist/run-journal.js +15 -1
- package/dist/run-journal.js.map +1 -1
- package/open-design.json +2 -2
- package/package.json +1 -1
- package/skills/12ui-design/SKILL.md +2 -0
- package/skills/12ui-design/improve.md +68 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"improve-plan-annotated-render.js","sourceRoot":"","sources":["../src/improve-plan-annotated-render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,uBAAuB,GAGxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAmB,MAAM,2BAA2B,CAAC;AAoBrF,qFAAqF;AACrF,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,CAAC;AAE3C,+EAA+E;AAC/E,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC;AAE7C,MAAM,YAAY,GAAoC;IACpD,cAAc,EAAE,wEAAwE;IACxF,mBAAmB,EAAE,wEAAwE;UACzF,qEAAqE;IACzE,UAAU,EAAE,4EAA4E;UACpF,oCAAoC;CACzC,CAAC;AAEF,MAAM,OAAO,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;AAE1E,MAAM,MAAM,GAAG,CAAC,IAIf,EAAY,EAAE,CAAC;IACd,iCAAiC;IACjC,EAAE;IACF,0BAA0B;IAC1B,EAAE;IACF,aAAa,IAAI,CAAC,IAAI,QAAQ,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;IACvD,cAAc,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,eAAe;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U,EAAE;KAChB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ImprovePlanMode } from './improve-plan-annotated-render.js';
|
|
1
2
|
import type { ImproveDomDiff } from './improve-dom-diff.js';
|
|
2
3
|
export declare const writeImproveAnnotatedPlan: (args: {
|
|
3
4
|
computed: ImproveDomDiff;
|
|
@@ -5,7 +6,7 @@ export declare const writeImproveAnnotatedPlan: (args: {
|
|
|
5
6
|
targetPath: string;
|
|
6
7
|
outDir: string;
|
|
7
8
|
repo?: string;
|
|
8
|
-
mode:
|
|
9
|
+
mode: ImprovePlanMode;
|
|
9
10
|
}) => Promise<{
|
|
10
11
|
planPath: string;
|
|
11
12
|
tokenPath: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"improve-plan-annotator.d.ts","sourceRoot":"","sources":["../src/improve-plan-annotator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"improve-plan-annotator.d.ts","sourceRoot":"","sources":["../src/improve-plan-annotator.ts"],"names":[],"mappings":"AAKA,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,oCAAoC,CAAC;AAO5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,eAAO,MAAM,yBAAyB,GAAU,MAAM;IACpD,QAAQ,EAAE,cAAc,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,eAAe,CAAC;CACvB,KAAG,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAA;CAAE,CAuDvE,CAAC"}
|
|
@@ -1,42 +1,10 @@
|
|
|
1
1
|
import { mkdir, writeFile } from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { buildImproveAddedElementSpecs } from './improve-added-specs.js';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { readImproveKitAssets } from './improve-kit-assets.js';
|
|
5
|
+
import { renderImproveAnnotatedPlan, } from './improve-plan-annotated-render.js';
|
|
6
|
+
import { indexImproveSourceRepo, resolveImproveSourceHint, } from './improve-source-hints.js';
|
|
6
7
|
import { buildImproveTokenPatch } from './improve-token-patch.js';
|
|
7
|
-
const renderAnnotatedPlan = (args) => {
|
|
8
|
-
const lines = [
|
|
9
|
-
'# Annotated implementation plan', '',
|
|
10
|
-
`- Mode: **${args.mode}**`,
|
|
11
|
-
`- Coverage: ${(args.computed.domCoverage * 100).toFixed(1)}% before-side; ${(args.computed.designCoverage * 100).toFixed(1)}% target-side`,
|
|
12
|
-
`- Source repository: ${args.repo ? `\`${args.repo}\`` : 'not supplied; file hints are unresolved'}`, '',
|
|
13
|
-
'## Tokens — apply once', '',
|
|
14
|
-
'- Apply `token-patch.css` through the existing global token or theme entry point.',
|
|
15
|
-
];
|
|
16
|
-
if (args.tokenPatch.tokens.length === 0) {
|
|
17
|
-
lines.push('- No recurring CSS-capable delta reached the two-node threshold.');
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
lines.push(...args.tokenPatch.tokens.map((token) => (`- \`${token.name}: ${token.value}\` — ${token.count} matched changes; selectors: ${token.selectors.join(', ')}.`)));
|
|
21
|
-
}
|
|
22
|
-
lines.push('', '## Matched changes', '');
|
|
23
|
-
const changed = args.entries.filter((entry) => entry.changed || (entry.impliedPadding?.length ?? 0) > 0);
|
|
24
|
-
lines.push(...(changed.length > 0 ? changed.map((entry) => {
|
|
25
|
-
const leaf = args.computed.beforeLeaves[entry.beforeIndex];
|
|
26
|
-
const changes = [
|
|
27
|
-
...entry.deltas.map((delta) => `${delta.field} ${JSON.stringify(delta.before)}→${JSON.stringify(delta.after)}`),
|
|
28
|
-
...(entry.impliedPadding ?? []).map((delta) => `${delta.field} ${delta.before}px→${delta.after}px (${delta.basis})`),
|
|
29
|
-
];
|
|
30
|
-
return `- ${selectorLabel(leaf)} — ${formatImproveSourceHint(entry.sourceHint)}: ${changes.join(', ')}`;
|
|
31
|
-
}) : ['_No actionable matched changes._']));
|
|
32
|
-
lines.push('', '## Added elements — full target specs', '');
|
|
33
|
-
if (args.addedSpecs.length === 0)
|
|
34
|
-
lines.push('_None._');
|
|
35
|
-
else
|
|
36
|
-
args.addedSpecs.forEach((spec) => lines.push(spec.markdown, ''));
|
|
37
|
-
lines.push('## Implementation guardrails', '', '- Preserve all real content, data, and controls. Do not fabricate product features or copy.', '- In Tailwind v4, verify arbitrary custom-property forms against the installed compiler before using them.', '- Quote CSS `url(...)` values when paths contain punctuation or whitespace.', '- Update the page content-security policy before introducing any data URI.', '- Implement silently. Log only adapted or skipped items and the reason.', '');
|
|
38
|
-
return lines.join('\n');
|
|
39
|
-
};
|
|
40
8
|
export const writeImproveAnnotatedPlan = async (args) => {
|
|
41
9
|
await mkdir(args.outDir, { recursive: true });
|
|
42
10
|
const sourceIndex = args.repo ? indexImproveSourceRepo(args.repo) : { files: [] };
|
|
@@ -45,24 +13,32 @@ export const writeImproveAnnotatedPlan = async (args) => {
|
|
|
45
13
|
sourceHint: resolveImproveSourceHint(args.computed.beforeLeaves[entry.beforeIndex], sourceIndex, args.computed.beforeLeaves),
|
|
46
14
|
}));
|
|
47
15
|
const tokenPatch = buildImproveTokenPatch(entries, args.computed.beforeLeaves, args.computed.targetLeaves);
|
|
48
|
-
const addedSpecs = await
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
16
|
+
const [addedSpecs, index] = await Promise.all([
|
|
17
|
+
buildImproveAddedElementSpecs({
|
|
18
|
+
targetDoc: args.targetDoc,
|
|
19
|
+
designPath: args.targetPath,
|
|
20
|
+
normalizedTarget: args.computed.targetLeaves,
|
|
21
|
+
before: args.computed.beforeLeaves,
|
|
22
|
+
canvas: args.computed.beforeCanvas,
|
|
23
|
+
diff: args.computed.result,
|
|
24
|
+
outDir: args.outDir,
|
|
25
|
+
}),
|
|
26
|
+
readImproveKitAssets({
|
|
27
|
+
runDir: path.dirname(args.outDir),
|
|
28
|
+
layerDocPath: args.targetPath,
|
|
29
|
+
document: args.targetDoc,
|
|
30
|
+
}),
|
|
31
|
+
]);
|
|
57
32
|
const planPath = path.join(args.outDir, 'plan-annotated.md');
|
|
58
33
|
const tokenPath = path.join(args.outDir, 'token-patch.css');
|
|
59
34
|
await Promise.all([
|
|
60
35
|
writeFile(tokenPath, tokenPatch.css, 'utf8'),
|
|
61
|
-
writeFile(planPath,
|
|
36
|
+
writeFile(planPath, renderImproveAnnotatedPlan({
|
|
62
37
|
computed: args.computed,
|
|
63
38
|
entries,
|
|
64
39
|
tokenPatch,
|
|
65
40
|
addedSpecs,
|
|
41
|
+
index,
|
|
66
42
|
...(args.repo ? { repo: args.repo } : {}),
|
|
67
43
|
mode: args.mode,
|
|
68
44
|
}), 'utf8'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"improve-plan-annotator.js","sourceRoot":"","sources":["../src/improve-plan-annotator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"improve-plan-annotator.js","sourceRoot":"","sources":["../src/improve-plan-annotator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,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C,CAAC,EAAE,CAAC;SAC3E;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ImproveRasterLayer } from './improve-kit-assets.js';
|
|
2
|
+
/**
|
|
3
|
+
* "Raster layers to carry" — the section that has to come first.
|
|
4
|
+
*
|
|
5
|
+
* A hero can be a single raster plate. When it is, the only correct action is
|
|
6
|
+
* to copy that file into the repository and reference it; a lane that reads
|
|
7
|
+
* thirty token lines before it reaches the hero has already started drawing
|
|
8
|
+
* gradients. So this renders ahead of tokens in the plan, and it is also the
|
|
9
|
+
* one section a stalled run can still emit from a LayerDoc alone.
|
|
10
|
+
*
|
|
11
|
+
* "Never skip one" binds every line it prints, so an alternate backdrop — a
|
|
12
|
+
* plate the README says to use only if its layer is omitted — is filtered out
|
|
13
|
+
* here rather than contradicted two files apart.
|
|
14
|
+
*/
|
|
15
|
+
export declare const IMPROVE_RASTER_SECTION_TITLE = "Raster layers to carry";
|
|
16
|
+
export declare const renderImproveRasterLayers: (args: {
|
|
17
|
+
layers: readonly ImproveRasterLayer[];
|
|
18
|
+
/** Where the layer lands in the page, when the diff anchored it to a selector. */
|
|
19
|
+
placement?: (layer: ImproveRasterLayer) => string | undefined;
|
|
20
|
+
}) => string[];
|
|
21
|
+
//# sourceMappingURL=improve-raster-layers-section.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"improve-raster-layers-section.d.ts","sourceRoot":"","sources":["../src/improve-raster-layers-section.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,4BAA4B,2BAA2B,CAAC;AAErE,eAAO,MAAM,yBAAyB,GAAI,MAAM;IAC9C,MAAM,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACtC,kFAAkF;IAClF,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,MAAM,GAAG,SAAS,CAAC;CAC/D,KAAG,MAAM,EAkCT,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { formatImproveBounds, improveCarriedRasterLayers, isImproveAlternateBackdrop, } from './improve-kit-assets.js';
|
|
2
|
+
/**
|
|
3
|
+
* "Raster layers to carry" — the section that has to come first.
|
|
4
|
+
*
|
|
5
|
+
* A hero can be a single raster plate. When it is, the only correct action is
|
|
6
|
+
* to copy that file into the repository and reference it; a lane that reads
|
|
7
|
+
* thirty token lines before it reaches the hero has already started drawing
|
|
8
|
+
* gradients. So this renders ahead of tokens in the plan, and it is also the
|
|
9
|
+
* one section a stalled run can still emit from a LayerDoc alone.
|
|
10
|
+
*
|
|
11
|
+
* "Never skip one" binds every line it prints, so an alternate backdrop — a
|
|
12
|
+
* plate the README says to use only if its layer is omitted — is filtered out
|
|
13
|
+
* here rather than contradicted two files apart.
|
|
14
|
+
*/
|
|
15
|
+
export const IMPROVE_RASTER_SECTION_TITLE = 'Raster layers to carry';
|
|
16
|
+
export const renderImproveRasterLayers = (args) => {
|
|
17
|
+
const lines = [
|
|
18
|
+
`## ${IMPROVE_RASTER_SECTION_TITLE}`,
|
|
19
|
+
'',
|
|
20
|
+
'Copy each file into the repository and reference it at its bounds.'
|
|
21
|
+
+ ' Never redraw one of these in CSS, and never skip one.',
|
|
22
|
+
'',
|
|
23
|
+
];
|
|
24
|
+
const layers = improveCarriedRasterLayers(args.layers);
|
|
25
|
+
if (layers.length === 0) {
|
|
26
|
+
lines.push('_The target LayerDoc declares no raster layer._', '');
|
|
27
|
+
return lines;
|
|
28
|
+
}
|
|
29
|
+
for (const layer of layers) {
|
|
30
|
+
const placement = args.placement?.(layer);
|
|
31
|
+
lines.push(`- **${layer.kind}** — ${layer.name}${layer.hero ? ' (hero imagery)' : ''}`, layer.asset
|
|
32
|
+
? ` - Asset: \`${layer.asset.file}\` — ${layer.asset.roleLabel}`
|
|
33
|
+
: ' - Asset: declared by the LayerDoc but not present in this kit; resume the run before coding.', ` - Bounds: ${formatImproveBounds(layer.bounds)}`, ` - Place at: ${placement ?? 'new element — place it at the bounds above'}`, ...(() => {
|
|
34
|
+
const alternates = layer.alternates.filter((asset) => !isImproveAlternateBackdrop(asset));
|
|
35
|
+
return alternates.length > 0
|
|
36
|
+
? [` - Also available: ${alternates
|
|
37
|
+
.map((asset) => `\`${asset.file}\` (${asset.roleLabel})`)
|
|
38
|
+
.join(', ')} — pick one resolution.`]
|
|
39
|
+
: [];
|
|
40
|
+
})());
|
|
41
|
+
}
|
|
42
|
+
lines.push('');
|
|
43
|
+
return lines;
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=improve-raster-layers-section.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"improve-raster-layers-section.js","sourceRoot":"","sources":["../src/improve-raster-layers-section.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,0BAA0B,GAE3B,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;;GAYG;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG,wBAAwB,CAAC;AAErE,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,IAIzC,EAAY,EAAE;IACb,MAAM,KAAK,GAAG;QACZ,MAAM,4BAA4B,EAAE;QACpC,EAAE;QACF,oEAAoE;cAClE,wDAAwD;QAC1D,EAAE;KACH,CAAC;IACF,MAAM,MAAM,GAAG,0BAA0B,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,KAAK,CAAC,IAAI,CAAC,iDAAiD,EAAE,EAAE,CAAC,CAAC;QAClE,OAAO,KAAK,CAAC;IACf,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,CAAC;QAC1C,KAAK,CAAC,IAAI,CACR,OAAO,KAAK,CAAC,IAAI,QAAQ,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,EAAE,EAC3E,KAAK,CAAC,KAAK;YACT,CAAC,CAAC,gBAAgB,KAAK,CAAC,KAAK,CAAC,IAAI,QAAQ,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE;YACjE,CAAC,CAAC,gGAAgG,EACpG,eAAe,mBAAmB,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,EAClD,iBAAiB,SAAS,IAAI,4CAA4C,EAAE,EAC5E,GAAG,CAAC,GAAG,EAAE;YACP,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC,CAAC;YAC1F,OAAO,UAAU,CAAC,MAAM,GAAG,CAAC;gBAC1B,CAAC,CAAC,CAAC,uBAAuB,UAAU;yBACjC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,SAAS,GAAG,CAAC;yBACxD,IAAI,CAAC,IAAI,CAAC,yBAAyB,CAAC;gBACvC,CAAC,CAAC,EAAE,CAAC;QACT,CAAC,CAAC,EAAE,CACL,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { type ImproveConversionAttempt } from './improve-conversion-attempts.js';
|
|
2
|
+
import { type ImproveRecord, type ImproveStage } from './improve-workspace.js';
|
|
3
|
+
/**
|
|
4
|
+
* What improve throws away, and what it writes down before it does.
|
|
5
|
+
*
|
|
6
|
+
* Three paths discard work that was already dispatched — `--fresh`, the
|
|
7
|
+
* asset-stage stall retry, and a re-pick that changes the winner — and each one
|
|
8
|
+
* used to discard it a slightly different way. They now share this module, so
|
|
9
|
+
* the ownership rule is stated once: a conversion the CLI walks away from is
|
|
10
|
+
* recorded in `improve.json` by id, with the reason, before anything is
|
|
11
|
+
* deleted.
|
|
12
|
+
*
|
|
13
|
+
* THE MONEY TRUTH, stated plainly because the opposite reading is tempting.
|
|
14
|
+
* The hosted conversion API has no cancel or abort verb: `GET
|
|
15
|
+
* /api/v1/convert/{id}` is the whole item surface, and the one DELETE on the
|
|
16
|
+
* family hides a history row for a principal. So the CLI cannot stop an
|
|
17
|
+
* abandoned run, and stopping the poll saves nothing — the polls are free
|
|
18
|
+
* authenticated reads. The abandoned conversion runs to completion server-side
|
|
19
|
+
* and bills either way. What actually saves money is not dispatching a
|
|
20
|
+
* conversion nobody chose, which is why `--pick` is now required before the
|
|
21
|
+
* convert stage. Everything here is bookkeeping so the owner can SEE what was
|
|
22
|
+
* paid for and dropped.
|
|
23
|
+
*/
|
|
24
|
+
export type ImproveAbandonedConversion = NonNullable<ImproveRecord['abandonedConversions']>[number];
|
|
25
|
+
/** Append one abandonment, deduped by id — two writers can name the same run. */
|
|
26
|
+
export declare const noteAbandonedConversion: (record: ImproveRecord, entry: ImproveAbandonedConversion) => ImproveRecord;
|
|
27
|
+
/** One wording for "this kit walked away from a conversion that keeps billing". */
|
|
28
|
+
export declare const abandonedConversionLine: (args: {
|
|
29
|
+
id: string;
|
|
30
|
+
reason: string;
|
|
31
|
+
}) => string;
|
|
32
|
+
/**
|
|
33
|
+
* Record the conversion this record is about to stop caring about, if the run
|
|
34
|
+
* ever told us its id. It may not have: a stall before the first status read
|
|
35
|
+
* leaves `improve.json` with no convert block and the journal with no run id,
|
|
36
|
+
* and the kit has to be able to say "a conversion may still be running; its id
|
|
37
|
+
* was not recorded" rather than implying nothing was bought.
|
|
38
|
+
*/
|
|
39
|
+
export declare const abandonImproveConversion: (args: {
|
|
40
|
+
record: ImproveRecord;
|
|
41
|
+
reason: string;
|
|
42
|
+
/** The id the caller already holds — an attempt's run id, say. */
|
|
43
|
+
id?: string;
|
|
44
|
+
warn?: (line: string) => void;
|
|
45
|
+
}) => Promise<{
|
|
46
|
+
record: ImproveRecord;
|
|
47
|
+
id?: string;
|
|
48
|
+
}>;
|
|
49
|
+
/**
|
|
50
|
+
* Attempts a caller has already closed in `conversionAttempts` also belong in
|
|
51
|
+
* `abandonedConversions` — the ledger the owner reads for what is still billing
|
|
52
|
+
* — whenever the kit ever learned their id. An attempt that never reported one
|
|
53
|
+
* is recorded by key alone, which is the honest record: there is nothing to name.
|
|
54
|
+
*/
|
|
55
|
+
export declare const noteAbandonedAttempts: (args: {
|
|
56
|
+
record: ImproveRecord;
|
|
57
|
+
attempts: readonly ImproveConversionAttempt[];
|
|
58
|
+
reason: string;
|
|
59
|
+
warn?: (line: string) => void;
|
|
60
|
+
}) => ImproveRecord;
|
|
61
|
+
/**
|
|
62
|
+
* The same abandonment, extended to every attempt the kit still had open.
|
|
63
|
+
*
|
|
64
|
+
* A path that discards the WINNER — a redraw, a re-pick, a stall — discards the
|
|
65
|
+
* conversions of it too, and those are recorded by key in `conversionAttempts`
|
|
66
|
+
* (`improve-conversion-attempts.ts`) as well as by id here. Leaving one open
|
|
67
|
+
* would point the next resume at a conversion of a design nobody chose.
|
|
68
|
+
*
|
|
69
|
+
* `--fresh` is deliberately NOT a caller: it closes the attempt it replaces at
|
|
70
|
+
* dispatch, where the key it is about to use is known and can be spared. Doing
|
|
71
|
+
* it here instead would close that same key on the stage replay the
|
|
72
|
+
* temporarily-unavailable retry performs.
|
|
73
|
+
*/
|
|
74
|
+
export declare const abandonImproveConversions: (args: {
|
|
75
|
+
record: ImproveRecord;
|
|
76
|
+
reason: string;
|
|
77
|
+
id?: string;
|
|
78
|
+
warn?: (line: string) => void;
|
|
79
|
+
}) => Promise<{
|
|
80
|
+
record: ImproveRecord;
|
|
81
|
+
id?: string;
|
|
82
|
+
}>;
|
|
83
|
+
/**
|
|
84
|
+
* What the owner has to be able to SEE: every conversion this kit paid for and
|
|
85
|
+
* walked away from, by id, with why. There is no cancel, so each of these is
|
|
86
|
+
* still running and still billing somewhere.
|
|
87
|
+
*/
|
|
88
|
+
export declare const improveAbandonedLines: (record: ImproveRecord) => string[];
|
|
89
|
+
/** Drop the named stages from the record and from its settlement ledger. */
|
|
90
|
+
export declare const withoutImproveStages: (record: ImproveRecord, stages: readonly ImproveStage[]) => ImproveRecord;
|
|
91
|
+
/**
|
|
92
|
+
* What a redraw is allowed to change about the draw it is replacing. Only the
|
|
93
|
+
* fields the caller passed explicitly appear here: a redraw that quietly reset
|
|
94
|
+
* `--candidates` to the default because the flag was absent would buy a
|
|
95
|
+
* different draw than the one asked for.
|
|
96
|
+
*/
|
|
97
|
+
export type ImproveRedraw = Partial<Pick<ImproveRecord, 'direction' | 'concept' | 'candidates' | 'retain' | 'retainFlag'>>;
|
|
98
|
+
export declare const REDRAW_ABANDON_REASON = "redraw discarded the draw this conversion was made from";
|
|
99
|
+
/**
|
|
100
|
+
* `--redraw`: buy a whole new draw of candidates from the same capture.
|
|
101
|
+
*
|
|
102
|
+
* `--fresh` rotates the conversion key and nothing else — it re-buys ONE
|
|
103
|
+
* conversion of the same settled winner. A caller who wanted different
|
|
104
|
+
* candidates had no flag at all, and `--fresh` was the nearest-looking one. The
|
|
105
|
+
* old draw is renamed rather than deleted: a reader may still want the
|
|
106
|
+
* candidate they were about to pick, and a destroyed directory cannot be got
|
|
107
|
+
* back for the price of a rename.
|
|
108
|
+
*
|
|
109
|
+
* This was the fourth path that walked away from paid work and the only one
|
|
110
|
+
* that did not write it down: it removed `target/` while
|
|
111
|
+
* `convert.sourceConversionId` was still in hand, so a settled conversion the
|
|
112
|
+
* kit had bought vanished from the ledger the module header above declares.
|
|
113
|
+
*/
|
|
114
|
+
export declare const resetImproveDraw: (args: {
|
|
115
|
+
record: ImproveRecord;
|
|
116
|
+
draw?: ImproveRedraw;
|
|
117
|
+
warn?: (line: string) => void;
|
|
118
|
+
}) => Promise<{
|
|
119
|
+
record: ImproveRecord;
|
|
120
|
+
abandonedId?: string;
|
|
121
|
+
}>;
|
|
122
|
+
//# sourceMappingURL=improve-reset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"improve-reset.d.ts","sourceRoot":"","sources":["../src/improve-reset.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAgB,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE7F;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,MAAM,0BAA0B,GAAG,WAAW,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpG,iFAAiF;AACjF,eAAO,MAAM,uBAAuB,GAClC,QAAQ,aAAa,EACrB,OAAO,0BAA0B,KAChC,aAKF,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,uBAAuB,GAAI,MAAM;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,KAAG,MAE9E,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,GAAU,MAAM;IACnD,MAAM,EAAE,aAAa,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B,KAAG,OAAO,CAAC;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAUjD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,MAAM;IAC1C,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,SAAS,wBAAwB,EAAE,CAAC;IAC9C,MAAM,EAAE,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veConversionAttempts, } from './improve-conversion-attempts.js';
|
|
3
|
+
import { recordedImproveConversionId } from './improve-convert-resilience.js';
|
|
4
|
+
import { improvePaths } from './improve-workspace.js';
|
|
5
|
+
/** Append one abandonment, deduped by id — two writers can name the same run. */
|
|
6
|
+
export const noteAbandonedConversion = (record, entry) => {
|
|
7
|
+
const abandoned = [...(record.abandonedConversions ?? [])];
|
|
8
|
+
if (abandoned.some((existing) => existing.id === entry.id))
|
|
9
|
+
return record;
|
|
10
|
+
abandoned.push(entry);
|
|
11
|
+
return { ...record, abandonedConversions: abandoned };
|
|
12
|
+
};
|
|
13
|
+
/** One wording for "this kit walked away from a conversion that keeps billing". */
|
|
14
|
+
export const abandonedConversionLine = (args) => (`[abandon] convert: ${args.reason}; conversion ${args.id} keeps running and keeps billing`);
|
|
15
|
+
/**
|
|
16
|
+
* Record the conversion this record is about to stop caring about, if the run
|
|
17
|
+
* ever told us its id. It may not have: a stall before the first status read
|
|
18
|
+
* leaves `improve.json` with no convert block and the journal with no run id,
|
|
19
|
+
* and the kit has to be able to say "a conversion may still be running; its id
|
|
20
|
+
* was not recorded" rather than implying nothing was bought.
|
|
21
|
+
*/
|
|
22
|
+
export const abandonImproveConversion = async (args) => {
|
|
23
|
+
const id = args.id ?? await recordedImproveConversionId(args.record);
|
|
24
|
+
if (!id)
|
|
25
|
+
return { record: args.record };
|
|
26
|
+
const record = noteAbandonedConversion(args.record, {
|
|
27
|
+
id,
|
|
28
|
+
abandonedAt: new Date().toISOString(),
|
|
29
|
+
reason: args.reason,
|
|
30
|
+
});
|
|
31
|
+
if (record !== args.record)
|
|
32
|
+
args.warn?.(abandonedConversionLine({ id, reason: args.reason }));
|
|
33
|
+
return { record, id };
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Attempts a caller has already closed in `conversionAttempts` also belong in
|
|
37
|
+
* `abandonedConversions` — the ledger the owner reads for what is still billing
|
|
38
|
+
* — whenever the kit ever learned their id. An attempt that never reported one
|
|
39
|
+
* is recorded by key alone, which is the honest record: there is nothing to name.
|
|
40
|
+
*/
|
|
41
|
+
export const noteAbandonedAttempts = (args) => args.attempts.reduce((carried, attempt) => {
|
|
42
|
+
if (!attempt.conversionId)
|
|
43
|
+
return carried;
|
|
44
|
+
const reason = attempt.abandonedReason ?? args.reason;
|
|
45
|
+
const noted = noteAbandonedConversion(carried, {
|
|
46
|
+
id: attempt.conversionId,
|
|
47
|
+
abandonedAt: attempt.abandonedAt ?? new Date().toISOString(),
|
|
48
|
+
reason,
|
|
49
|
+
});
|
|
50
|
+
if (noted !== carried)
|
|
51
|
+
args.warn?.(abandonedConversionLine({ id: attempt.conversionId, reason }));
|
|
52
|
+
return noted;
|
|
53
|
+
}, args.record);
|
|
54
|
+
/**
|
|
55
|
+
* The same abandonment, extended to every attempt the kit still had open.
|
|
56
|
+
*
|
|
57
|
+
* A path that discards the WINNER — a redraw, a re-pick, a stall — discards the
|
|
58
|
+
* conversions of it too, and those are recorded by key in `conversionAttempts`
|
|
59
|
+
* (`improve-conversion-attempts.ts`) as well as by id here. Leaving one open
|
|
60
|
+
* would point the next resume at a conversion of a design nobody chose.
|
|
61
|
+
*
|
|
62
|
+
* `--fresh` is deliberately NOT a caller: it closes the attempt it replaces at
|
|
63
|
+
* dispatch, where the key it is about to use is known and can be spared. Doing
|
|
64
|
+
* it here instead would close that same key on the stage replay the
|
|
65
|
+
* temporarily-unavailable retry performs.
|
|
66
|
+
*/
|
|
67
|
+
export const abandonImproveConversions = async (args) => {
|
|
68
|
+
const abandoned = await abandonImproveConversion(args);
|
|
69
|
+
const closed = abandonImproveConversionAttempts(abandoned.record, { reason: args.reason });
|
|
70
|
+
const record = noteAbandonedAttempts({
|
|
71
|
+
record: closed.record,
|
|
72
|
+
attempts: closed.abandoned,
|
|
73
|
+
reason: args.reason,
|
|
74
|
+
...(args.warn ? { warn: args.warn } : {}),
|
|
75
|
+
});
|
|
76
|
+
return { record, ...(abandoned.id ? { id: abandoned.id } : {}) };
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* What the owner has to be able to SEE: every conversion this kit paid for and
|
|
80
|
+
* walked away from, by id, with why. There is no cancel, so each of these is
|
|
81
|
+
* still running and still billing somewhere.
|
|
82
|
+
*/
|
|
83
|
+
export const improveAbandonedLines = (record) => {
|
|
84
|
+
const abandoned = record.abandonedConversions ?? [];
|
|
85
|
+
if (abandoned.length === 0)
|
|
86
|
+
return [];
|
|
87
|
+
return [
|
|
88
|
+
`- Abandoned ${abandoned.length} conversion${abandoned.length === 1 ? '' : 's'}`
|
|
89
|
+
+ ' (each keeps running and keeps billing; there is no cancel):',
|
|
90
|
+
...abandoned.map((entry) => ` - \`${entry.id}\` — ${entry.reason}`),
|
|
91
|
+
];
|
|
92
|
+
};
|
|
93
|
+
/** Drop the named stages from the record and from its settlement ledger. */
|
|
94
|
+
export const withoutImproveStages = (record, stages) => ({
|
|
95
|
+
...record,
|
|
96
|
+
...(stages.includes('draft') ? { draft: undefined } : {}),
|
|
97
|
+
...(stages.includes('pick') ? { pick: undefined } : {}),
|
|
98
|
+
...(stages.includes('convert') ? { convert: undefined } : {}),
|
|
99
|
+
...(stages.includes('plan') ? { plan: undefined } : {}),
|
|
100
|
+
stages: Object.fromEntries(Object.entries(record.stages).filter(([stage]) => !stages.includes(stage))),
|
|
101
|
+
});
|
|
102
|
+
export const REDRAW_ABANDON_REASON = 'redraw discarded the draw this conversion was made from';
|
|
103
|
+
/**
|
|
104
|
+
* `--redraw`: buy a whole new draw of candidates from the same capture.
|
|
105
|
+
*
|
|
106
|
+
* `--fresh` rotates the conversion key and nothing else — it re-buys ONE
|
|
107
|
+
* conversion of the same settled winner. A caller who wanted different
|
|
108
|
+
* candidates had no flag at all, and `--fresh` was the nearest-looking one. The
|
|
109
|
+
* old draw is renamed rather than deleted: a reader may still want the
|
|
110
|
+
* candidate they were about to pick, and a destroyed directory cannot be got
|
|
111
|
+
* back for the price of a rename.
|
|
112
|
+
*
|
|
113
|
+
* This was the fourth path that walked away from paid work and the only one
|
|
114
|
+
* that did not write it down: it removed `target/` while
|
|
115
|
+
* `convert.sourceConversionId` was still in hand, so a settled conversion the
|
|
116
|
+
* kit had bought vanished from the ledger the module header above declares.
|
|
117
|
+
*/
|
|
118
|
+
export const resetImproveDraw = async (args) => {
|
|
119
|
+
const paths = improvePaths(args.record.runDir);
|
|
120
|
+
const abandoned = await abandonImproveConversions({
|
|
121
|
+
record: args.record,
|
|
122
|
+
reason: REDRAW_ABANDON_REASON,
|
|
123
|
+
...(args.warn ? { warn: args.warn } : {}),
|
|
124
|
+
});
|
|
125
|
+
const previous = `${paths.candidatesDir}.previous`;
|
|
126
|
+
if (await stat(paths.candidatesDir).catch(() => undefined)) {
|
|
127
|
+
await rm(previous, { recursive: true, force: true });
|
|
128
|
+
await rename(paths.candidatesDir, previous);
|
|
129
|
+
}
|
|
130
|
+
await Promise.all([
|
|
131
|
+
rm(paths.winnerImage, { force: true }),
|
|
132
|
+
rm(paths.targetDir, { recursive: true, force: true }),
|
|
133
|
+
rm(paths.planDir, { recursive: true, force: true }),
|
|
134
|
+
]);
|
|
135
|
+
const carried = withoutImproveStages(abandoned.record, ['draft', 'pick', 'convert', 'plan']);
|
|
136
|
+
return {
|
|
137
|
+
record: { ...carried, ...args.draw },
|
|
138
|
+
...(abandoned.id ? { abandonedId: abandoned.id } : {}),
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
//# sourceMappingURL=improve-reset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"improve-reset.js","sourceRoot":"","sources":["../src/improve-reset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EACL,gCAAgC,GAEjC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAyC,MAAM,wBAAwB,CAA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C,CAAC;QACrD,MAAM,MAAM,CAAC,KAAK,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;IAC9C,CAAC;IACD,MAAM,OAAO,CAAC,GAAG,CAAC;QAChB,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QACtC,EAAE,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QACrD,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;KACpD,CAAC,CAAC;IACH,MAAM,OAAO,GAAG,oBAAoB,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;IAC7F,OAAO;QACL,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE;QACpC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACvD,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type ImproveKitAssetIndex } from './improve-kit-assets.js';
|
|
2
|
+
import { type ImproveKitStatus } from './improve-kit-status.js';
|
|
3
|
+
import type { ImproveOptions } from './improve-options.js';
|
|
4
|
+
import { type ImproveRecord, type ImproveStage } from './improve-workspace.js';
|
|
5
|
+
/**
|
|
6
|
+
* What a run prints when the draw is ready and nobody has chosen.
|
|
7
|
+
*
|
|
8
|
+
* This is the whole point of the dispatch-discipline change, so it has to leave
|
|
9
|
+
* the reader with two things and nothing else: where the candidates are, and
|
|
10
|
+
* the one command that continues from here. It is a finished run, not a
|
|
11
|
+
* failure — the stages that were asked for and could run, ran.
|
|
12
|
+
*/
|
|
13
|
+
export declare const awaitingImprovePick: (args: {
|
|
14
|
+
record: ImproveRecord;
|
|
15
|
+
options: Pick<ImproveOptions, "paths" | "input">;
|
|
16
|
+
}) => string;
|
|
17
|
+
export declare const renderImproveRunSummary: (args: {
|
|
18
|
+
record: ImproveRecord;
|
|
19
|
+
status: ImproveKitStatus;
|
|
20
|
+
index: ImproveKitAssetIndex;
|
|
21
|
+
}) => string;
|
|
22
|
+
export declare const buildImproveRunSummary: (args: {
|
|
23
|
+
record: ImproveRecord;
|
|
24
|
+
requestedTo?: ImproveStage;
|
|
25
|
+
}) => Promise<string>;
|
|
26
|
+
/**
|
|
27
|
+
* Put the summary AFTER the failure text.
|
|
28
|
+
*
|
|
29
|
+
* `cli.ts` prints `error.message` last, so a summary written to stdout before
|
|
30
|
+
* the throw leaves the reader's final line as the error rather than
|
|
31
|
+
* "Next: read <kit>/README.md" — which is the line the summary exists to
|
|
32
|
+
* leave there. Carrying it in the message is what keeps the order right.
|
|
33
|
+
*/
|
|
34
|
+
export declare const improveStallErrorWithSummary: (error: unknown, summary: string) => unknown;
|
|
35
|
+
//# sourceMappingURL=improve-run-summary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"improve-run-summary.d.ts","sourceRoot":"","sources":["../src/improve-run-summary.ts"],"names":[],"mappings":"AAEA,OAAO,EAAwB,KAAK,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAML,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAgB,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAsC7F;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAAI,MAAM;IACxC,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC;CAClD,KAAG,MAcH,CAAC;AASF,eAAO,MAAM,uBAAuB,GAAI,MAAM;IAC5C,MAAM,EAAE,aAAa,CAAC;IACtB,MAAM,EAAE,gBAAgB,CAAC;IACzB,KAAK,EAAE,oBAAoB,CAAC;CAC7B,KAAG,MAiCH,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAU,MAAM;IACjD,MAAM,EAAE,aAAa,CAAC;IACtB,WAAW,CAAC,EAAE,YAAY,CAAC;CAC5B,KAAG,OAAO,CAAC,MAAM,CAUjB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,GAAI,OAAO,OAAO,EAAE,SAAS,MAAM,KAAG,OAM9E,CAAC"}
|