@12ui/design 0.2.11 → 0.2.13
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 +9 -0
- 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-capabilities.d.ts +13 -0
- package/dist/cli-capabilities.d.ts.map +1 -1
- package/dist/cli-capabilities.js +16 -0
- package/dist/cli-capabilities.js.map +1 -1
- package/dist/cli-image-batch-command.d.ts.map +1 -1
- package/dist/cli-image-batch-command.js +104 -53
- package/dist/cli-image-batch-command.js.map +1 -1
- package/dist/cli-image-batch-materialize.d.ts +27 -0
- package/dist/cli-image-batch-materialize.d.ts.map +1 -0
- package/dist/cli-image-batch-materialize.js +41 -0
- package/dist/cli-image-batch-materialize.js.map +1 -0
- package/dist/cli-image-batch-resume.d.ts +27 -0
- package/dist/cli-image-batch-resume.d.ts.map +1 -0
- package/dist/cli-image-batch-resume.js +158 -0
- package/dist/cli-image-batch-resume.js.map +1 -0
- package/dist/cli-image-command.d.ts.map +1 -1
- package/dist/cli-image-command.js +14 -2
- package/dist/cli-image-command.js.map +1 -1
- package/dist/cli-progress.d.ts +44 -0
- package/dist/cli-progress.d.ts.map +1 -0
- package/dist/cli-progress.js +83 -0
- package/dist/cli-progress.js.map +1 -0
- package/dist/cli.js +92 -6
- package/dist/cli.js.map +1 -1
- package/dist/conversion-client.d.ts +32 -12
- package/dist/conversion-client.d.ts.map +1 -1
- package/dist/conversion-client.js +14 -0
- package/dist/conversion-client.js.map +1 -1
- package/dist/image-generation-batch-attempt.d.ts +28 -0
- package/dist/image-generation-batch-attempt.d.ts.map +1 -0
- package/dist/image-generation-batch-attempt.js +48 -0
- package/dist/image-generation-batch-attempt.js.map +1 -0
- package/dist/image-generation-completion.d.ts +43 -0
- package/dist/image-generation-completion.d.ts.map +1 -0
- package/dist/image-generation-completion.js +54 -0
- package/dist/image-generation-completion.js.map +1 -0
- package/dist/image-generation-fs.d.ts +3 -0
- package/dist/image-generation-fs.d.ts.map +1 -0
- package/dist/image-generation-fs.js +23 -0
- package/dist/image-generation-fs.js.map +1 -0
- package/dist/image-generation-request.d.ts +13 -3
- package/dist/image-generation-request.d.ts.map +1 -1
- package/dist/image-generation-request.js +21 -19
- package/dist/image-generation-request.js.map +1 -1
- package/dist/image-generation-resume.d.ts +36 -0
- package/dist/image-generation-resume.d.ts.map +1 -0
- package/dist/image-generation-resume.js +83 -0
- package/dist/image-generation-resume.js.map +1 -0
- package/dist/image-generation-run.d.ts +11 -0
- package/dist/image-generation-run.d.ts.map +1 -1
- package/dist/image-generation-run.js +23 -9
- package/dist/image-generation-run.js.map +1 -1
- package/dist/image-generation-staging.d.ts +25 -0
- package/dist/image-generation-staging.d.ts.map +1 -0
- package/dist/image-generation-staging.js +80 -0
- package/dist/image-generation-staging.js.map +1 -0
- package/dist/legacy-skill-catalog.d.ts.map +1 -1
- package/dist/legacy-skill-catalog.js +34 -0
- package/dist/legacy-skill-catalog.js.map +1 -1
- package/package.json +1 -1
- package/skills/design/SKILL.md +54 -7
- package/skills/design/references/selection-contract.md +16 -0
- package/skills/design-convert/SKILL.md +55 -2
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type ImageGenerationAttempt } from './image-generation-evidence.js';
|
|
2
|
+
/**
|
|
3
|
+
* What a resume is allowed to do with one candidate, decided only from durable
|
|
4
|
+
* evidence. The single invariant every disposition serves: a resume may finish
|
|
5
|
+
* delivering work that was already bought, and may start work that provably was
|
|
6
|
+
* not, but it may never buy the same candidate twice.
|
|
7
|
+
*/
|
|
8
|
+
export type ImageGenerationResumeDisposition =
|
|
9
|
+
/** PNG and evidence are already in their destination. Nothing to do, nothing to buy. */
|
|
10
|
+
'materialized'
|
|
11
|
+
/** The paid bytes are already on disk in staging. Move them into place; no provider call. */
|
|
12
|
+
| 'stageable'
|
|
13
|
+
/** Provably unbilled, or billed under a key the provider itself deduplicates. */
|
|
14
|
+
| 'redispatchable'
|
|
15
|
+
/** Billed and lost, with no free way to ask for it again. Refuse rather than re-buy. */
|
|
16
|
+
| 'unrecoverable';
|
|
17
|
+
export type ImageGenerationResumeState = {
|
|
18
|
+
candidateId?: string;
|
|
19
|
+
outputPath: string;
|
|
20
|
+
attemptFile: string;
|
|
21
|
+
disposition: ImageGenerationResumeDisposition;
|
|
22
|
+
reason: string;
|
|
23
|
+
attempt?: ImageGenerationAttempt;
|
|
24
|
+
};
|
|
25
|
+
export declare const classifyImageGenerationResume: (args: {
|
|
26
|
+
outputPath: string;
|
|
27
|
+
candidateId?: string;
|
|
28
|
+
}) => Promise<ImageGenerationResumeState>;
|
|
29
|
+
export declare const resumeStateSummary: (states: readonly ImageGenerationResumeState[]) => {
|
|
30
|
+
materialized: number;
|
|
31
|
+
stageable: number;
|
|
32
|
+
redispatchable: number;
|
|
33
|
+
unrecoverable: number;
|
|
34
|
+
};
|
|
35
|
+
export declare const describeResumeState: (state: ImageGenerationResumeState) => string;
|
|
36
|
+
//# sourceMappingURL=image-generation-resume.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-generation-resume.d.ts","sourceRoot":"","sources":["../src/image-generation-resume.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAO/F;;;;;GAKG;AACH,MAAM,MAAM,gCAAgC;AAC1C,wFAAwF;AACtF,cAAc;AAChB,6FAA6F;GAC3F,WAAW;AACb,iFAAiF;GAC/E,gBAAgB;AAClB,wFAAwF;GACtF,eAAe,CAAC;AAEpB,MAAM,MAAM,0BAA0B,GAAG;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,gCAAgC,CAAC;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,sBAAsB,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,6BAA6B,GAAU,MAAM;IACxD,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,KAAG,OAAO,CAAC,0BAA0B,CAuErC,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,QAAQ,SAAS,0BAA0B,EAAE,KAAG;IACjF,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;CAMtB,CAAC;AAEH,eAAO,MAAM,mBAAmB,GAAI,OAAO,0BAA0B,KAAG,MAEvE,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { imageAttemptPath } from './image-generation-evidence.js';
|
|
2
|
+
import { imageGenerationPathExists } from './image-generation-fs.js';
|
|
3
|
+
import { imageGenerationStagedPaths, readImageGenerationAttemptFile, } from './image-generation-staging.js';
|
|
4
|
+
export const classifyImageGenerationResume = async (args) => {
|
|
5
|
+
const attemptFile = imageAttemptPath(args.outputPath);
|
|
6
|
+
const staged = imageGenerationStagedPaths(args.outputPath);
|
|
7
|
+
const [outputExists, stagedOutputExists, finalAttempt, stagedAttempt] = await Promise.all([
|
|
8
|
+
imageGenerationPathExists(args.outputPath),
|
|
9
|
+
imageGenerationPathExists(staged.stagedOutputPath),
|
|
10
|
+
readImageGenerationAttemptFile(attemptFile),
|
|
11
|
+
readImageGenerationAttemptFile(staged.stagedAttemptFile),
|
|
12
|
+
]);
|
|
13
|
+
const attempt = stagedAttempt ?? finalAttempt;
|
|
14
|
+
const base = {
|
|
15
|
+
...(args.candidateId ? { candidateId: args.candidateId } : {}),
|
|
16
|
+
outputPath: args.outputPath,
|
|
17
|
+
attemptFile,
|
|
18
|
+
...(attempt ? { attempt } : {}),
|
|
19
|
+
};
|
|
20
|
+
const stagingRemnant = stagedOutputExists || stagedAttempt !== undefined;
|
|
21
|
+
if (outputExists && finalAttempt && !stagingRemnant) {
|
|
22
|
+
return {
|
|
23
|
+
...base,
|
|
24
|
+
disposition: 'materialized',
|
|
25
|
+
reason: 'the candidate and its evidence are already in place',
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
// Bytes on disk mean the call was already paid for and only delivery is
|
|
29
|
+
// outstanding — either the PNG is still staged, or it landed and its ledger
|
|
30
|
+
// entry did not.
|
|
31
|
+
if (stagedOutputExists || (outputExists && stagingRemnant)) {
|
|
32
|
+
return {
|
|
33
|
+
...base,
|
|
34
|
+
disposition: 'stageable',
|
|
35
|
+
reason: 'the generated image is already on disk and only needs moving into place',
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
if (!attempt) {
|
|
39
|
+
return {
|
|
40
|
+
...base,
|
|
41
|
+
disposition: 'redispatchable',
|
|
42
|
+
reason: 'no attempt evidence exists, so no provider call was ever reserved for it',
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
if (!attempt.providerStartedAt) {
|
|
46
|
+
return {
|
|
47
|
+
...base,
|
|
48
|
+
disposition: 'redispatchable',
|
|
49
|
+
reason: 'the provider call was never started, so nothing was billed for it',
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
if (attempt.status === 'failed') {
|
|
53
|
+
return {
|
|
54
|
+
...base,
|
|
55
|
+
disposition: 'unrecoverable',
|
|
56
|
+
reason: `the provider call failed after dispatch (${attempt.error ?? 'no recorded error'});`
|
|
57
|
+
+ ' repeating it would be a second paid call',
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
if (attempt.providerIdempotencyEnforced) {
|
|
61
|
+
return {
|
|
62
|
+
...base,
|
|
63
|
+
disposition: 'redispatchable',
|
|
64
|
+
reason: 'the provider enforces idempotency on the recorded key, so re-requesting the same'
|
|
65
|
+
+ ' identity returns the same result without a second charge',
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
...base,
|
|
70
|
+
disposition: 'unrecoverable',
|
|
71
|
+
reason: `the ${attempt.provider} call was dispatched and its result was lost, and that provider`
|
|
72
|
+
+ ' does not enforce idempotency on the recorded key, so re-requesting it would be a second'
|
|
73
|
+
+ ' paid call; give this candidate a new output path and idempotency key to buy it again',
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
export const resumeStateSummary = (states) => ({
|
|
77
|
+
materialized: states.filter((state) => state.disposition === 'materialized').length,
|
|
78
|
+
stageable: states.filter((state) => state.disposition === 'stageable').length,
|
|
79
|
+
redispatchable: states.filter((state) => state.disposition === 'redispatchable').length,
|
|
80
|
+
unrecoverable: states.filter((state) => state.disposition === 'unrecoverable').length,
|
|
81
|
+
});
|
|
82
|
+
export const describeResumeState = (state) => (`${state.candidateId ?? state.outputPath}: ${state.disposition} — ${state.reason}`);
|
|
83
|
+
//# sourceMappingURL=image-generation-resume.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-generation-resume.js","sourceRoot":"","sources":["../src/image-generation-resume.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAA+B,MAAM,gCAAgC,CAAC;AAC/F,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EACL,0BAA0B,EAC1B,8BAA8B,GAC/B,MAAM,+BAA+B,CAAC;AA2BvC,MAAM,CAAC,MAAM,6BAA6B,GAAG,KAAK,EAAE,IAGnD,EAAuC,EAAE;IACxC,MAAM,WAAW,GAAG,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACtD,MAAM,MAAM,GAAG,0BAA0B,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC3D,MAAM,CAAC,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,aAAa,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACxF,yBAAyB,CAAC,IAAI,CAAC,UAAU,CAAC;QAC1C,yBAAyB,CAAC,MAAM,CAAC,gBAAgB,CAAC;QAClD,8BAA8B,C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,EAAE,CACnF,CAAC"}
|
|
@@ -18,6 +18,7 @@ export type ImageGenerationResult = {
|
|
|
18
18
|
model: ImageGenerationAttempt['model'];
|
|
19
19
|
outputPath: string;
|
|
20
20
|
outputSha256: string;
|
|
21
|
+
outputBytes: number;
|
|
21
22
|
attemptFile: string;
|
|
22
23
|
providerStartedAt: string;
|
|
23
24
|
completedAt: string;
|
|
@@ -29,6 +30,16 @@ export declare const reserveImageGeneration: (args: {
|
|
|
29
30
|
batch?: ImageGenerationAttempt["batch"];
|
|
30
31
|
dependencies?: ImageGenerationDependencies;
|
|
31
32
|
}) => Promise<ReservedImageGeneration>;
|
|
33
|
+
/**
|
|
34
|
+
* Re-enter an existing candidate identity without minting a new ledger entry.
|
|
35
|
+
* The caller must already have proved, from that entry, that redispatching it
|
|
36
|
+
* cannot double-spend.
|
|
37
|
+
*/
|
|
38
|
+
export declare const resumeReservedImageGeneration: (args: {
|
|
39
|
+
request: PreparedImageGenerationRequest;
|
|
40
|
+
preflight: ImageProviderPreflight;
|
|
41
|
+
attempt: ImageGenerationAttempt;
|
|
42
|
+
}) => ReservedImageGeneration;
|
|
32
43
|
export declare const markImageGenerationDispatched: (reserved: ReservedImageGeneration, dependencies?: ImageGenerationDependencies) => Promise<void>;
|
|
33
44
|
export declare const failImageGenerationBeforeDispatch: (reserved: ReservedImageGeneration, error: string, dependencies?: ImageGenerationDependencies) => Promise<void>;
|
|
34
45
|
export declare const dispatchImageGeneration: (reserved: ReservedImageGeneration, dependencies?: ImageGenerationDependencies) => Promise<ImageGenerationResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-generation-run.d.ts","sourceRoot":"","sources":["../src/image-generation-run.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,aAAa,EAGd,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,gCAAgC,CAAC;AAMxC,OAAO,EAEL,KAAK,8BAA8B,EACpC,MAAM,+BAA+B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S,EAAE,sBAAsB,CAAC;IAClC,KAAK,CAAC,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAC;IACxC,YAAY,CAAC,EAAE,2BAA2B,CAAC;CAC5C,KAAG,OAAO,CAAC,uBAAuB,CAmClC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,GAAI,MAAM;IAClD,OAAO,EAAE,8BAA8B,CAAC;IACxC,SAAS,EAAE,sBAAsB,CAAC;IAClC,OAAO,EAAE,sBAAsB,CAAC;CACjC,KAAG,uBAIF,CAAC;AAEH,eAAO,MAAM,6BAA6B,GACxC,UAAU,uBAAuB,EACjC,eAAc,2BAAgC,KAC7C,OAAO,CAAC,IAAI,CAId,CAAC;AAEF,eAAO,MAAM,iCAAiC,GAC5C,UAAU,uBAAuB,EACjC,OAAO,MAAM,EACb,eAAc,2BAAgC,KAC7C,OAAO,CAAC,IAAI,CAKd,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,UAAU,uBAAuB,EACjC,eAAc,2BAAgC,KAC7C,OAAO,CAAC,qBAAqB,CAiG/B,CAAC"}
|
|
@@ -31,9 +31,9 @@ export const reserveImageGeneration = async (args) => {
|
|
|
31
31
|
preparedAt: timestamp(dependencies),
|
|
32
32
|
...(args.batch ? { batch: args.batch } : {}),
|
|
33
33
|
};
|
|
34
|
-
await writeImageGenerationAttempt(args.request.
|
|
34
|
+
await writeImageGenerationAttempt(args.request.stagedAttemptFile, attempt, true).catch((error) => {
|
|
35
35
|
if (error.code === 'EEXIST') {
|
|
36
|
-
throw new Error(`Image attempt evidence already exists at ${args.request.
|
|
36
|
+
throw new Error(`Image attempt evidence already exists at ${args.request.stagedAttemptFile}. Refusing to`
|
|
37
37
|
+ ' redispatch an ambiguous or completed request; inspect it and use a new output/'
|
|
38
38
|
+ 'idempotency key.');
|
|
39
39
|
}
|
|
@@ -41,22 +41,32 @@ export const reserveImageGeneration = async (args) => {
|
|
|
41
41
|
});
|
|
42
42
|
return { request: args.request, preflight: args.preflight, attempt };
|
|
43
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* Re-enter an existing candidate identity without minting a new ledger entry.
|
|
46
|
+
* The caller must already have proved, from that entry, that redispatching it
|
|
47
|
+
* cannot double-spend.
|
|
48
|
+
*/
|
|
49
|
+
export const resumeReservedImageGeneration = (args) => ({
|
|
50
|
+
request: args.request,
|
|
51
|
+
preflight: args.preflight,
|
|
52
|
+
attempt: { ...args.attempt, status: 'prepared', error: undefined },
|
|
53
|
+
});
|
|
44
54
|
export const markImageGenerationDispatched = async (reserved, dependencies = {}) => {
|
|
45
55
|
reserved.attempt.status = 'dispatched';
|
|
46
56
|
reserved.attempt.dispatchedAt = timestamp(dependencies);
|
|
47
|
-
await writeImageGenerationAttempt(reserved.request.
|
|
57
|
+
await writeImageGenerationAttempt(reserved.request.stagedAttemptFile, reserved.attempt);
|
|
48
58
|
};
|
|
49
59
|
export const failImageGenerationBeforeDispatch = async (reserved, error, dependencies = {}) => {
|
|
50
60
|
reserved.attempt.status = 'failed';
|
|
51
61
|
reserved.attempt.completedAt = timestamp(dependencies);
|
|
52
62
|
reserved.attempt.error = error;
|
|
53
|
-
await writeImageGenerationAttempt(reserved.request.
|
|
63
|
+
await writeImageGenerationAttempt(reserved.request.stagedAttemptFile, reserved.attempt);
|
|
54
64
|
};
|
|
55
65
|
export const dispatchImageGeneration = async (reserved, dependencies = {}) => {
|
|
56
66
|
const { request, preflight, attempt } = reserved;
|
|
57
67
|
let providerRequestId;
|
|
58
68
|
attempt.providerStartedAt = timestamp(dependencies);
|
|
59
|
-
await writeImageGenerationAttempt(request.
|
|
69
|
+
await writeImageGenerationAttempt(request.stagedAttemptFile, attempt);
|
|
60
70
|
try {
|
|
61
71
|
const agent = {
|
|
62
72
|
agent_id: `12ui-image-${imageGenerationSha256(request.idempotencyKey).slice(0, 16)}`,
|
|
@@ -101,24 +111,28 @@ export const dispatchImageGeneration = async (reserved, dependencies = {}) => {
|
|
|
101
111
|
});
|
|
102
112
|
if (providerRequestId)
|
|
103
113
|
attempt.providerRequestId = providerRequestId;
|
|
104
|
-
await writeImageGenerationAttempt(request.
|
|
114
|
+
await writeImageGenerationAttempt(request.stagedAttemptFile, attempt);
|
|
105
115
|
if (captured.outcome.status === 'rejected')
|
|
106
116
|
throw captured.outcome.reason;
|
|
107
117
|
if (!Array.isArray(generated) || generated.length !== 1 || typeof generated[0] !== 'string') {
|
|
108
118
|
throw new Error('Image provider did not return exactly one image');
|
|
109
119
|
}
|
|
110
120
|
const bytes = await generatedPngBytes(generated[0]);
|
|
111
|
-
|
|
121
|
+
// Staged, not delivered. The caller materializes every candidate together
|
|
122
|
+
// once the batch is terminal, so no directory listing can catch a
|
|
123
|
+
// half-written set of candidates.
|
|
124
|
+
await writeFile(request.stagedOutputPath, bytes, { flag: 'wx' });
|
|
112
125
|
attempt.status = 'succeeded';
|
|
113
126
|
attempt.completedAt = timestamp(dependencies);
|
|
114
127
|
attempt.outputSha256 = imageGenerationSha256(bytes);
|
|
115
|
-
await writeImageGenerationAttempt(request.
|
|
128
|
+
await writeImageGenerationAttempt(request.stagedAttemptFile, attempt);
|
|
116
129
|
return {
|
|
117
130
|
...(request.candidateId ? { candidateId: request.candidateId } : {}),
|
|
118
131
|
provider: attempt.provider,
|
|
119
132
|
model: attempt.model,
|
|
120
133
|
outputPath: request.outputPath,
|
|
121
134
|
outputSha256: attempt.outputSha256,
|
|
135
|
+
outputBytes: bytes.byteLength,
|
|
122
136
|
attemptFile: request.attemptFile,
|
|
123
137
|
providerStartedAt: attempt.providerStartedAt,
|
|
124
138
|
completedAt: attempt.completedAt,
|
|
@@ -136,7 +150,7 @@ export const dispatchImageGeneration = async (reserved, dependencies = {}) => {
|
|
|
136
150
|
attempt.status = 'failed';
|
|
137
151
|
attempt.completedAt = timestamp(dependencies);
|
|
138
152
|
attempt.error = imageGenerationErrorMessage(error);
|
|
139
|
-
await writeImageGenerationAttempt(request.
|
|
153
|
+
await writeImageGenerationAttempt(request.stagedAttemptFile, attempt);
|
|
140
154
|
throw new Error(`Image generation failed after dispatch with ${attempt.provider}; no provider fallback`
|
|
141
155
|
+ ` was attempted. Evidence: ${request.attemptFile}. ${attempt.error}`, { cause: error });
|
|
142
156
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-generation-run.js","sourceRoot":"","sources":["../src/image-generation-run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EACL,aAAa,GAGd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAE7E,OAAO,EACL,2BAA2B,GAE5B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,2BAA2B,EAC3B,gCAAgC,GACjC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EACL,qBAAqB,GAEtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,GAE7B,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"image-generation-run.js","sourceRoot":"","sources":["../src/image-generation-run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EACL,aAAa,GAGd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAE7E,OAAO,EACL,2BAA2B,GAE5B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,2BAA2B,EAC3B,gCAAgC,GACjC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EACL,qBAAqB,GAEtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,GAE7B,MAAM,6BAA6B,CAAC;AA2BrC,MAAM,S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,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type ImageGenerationAttempt } from './image-generation-evidence.js';
|
|
2
|
+
export declare const IMAGE_STAGING_DIRECTORY_NAME = ".12ui-image-staging";
|
|
3
|
+
export type ImageGenerationStagedPaths = {
|
|
4
|
+
stagingDirectory: string;
|
|
5
|
+
stagedOutputPath: string;
|
|
6
|
+
stagedAttemptFile: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const imageGenerationStagedPaths: (outputPath: string) => ImageGenerationStagedPaths;
|
|
9
|
+
export declare const ensureImageGenerationStaging: (outputPath: string) => Promise<void>;
|
|
10
|
+
export declare const readStagedImageGenerationAttempt: (outputPath: string) => Promise<ImageGenerationAttempt | undefined>;
|
|
11
|
+
export declare const readImageGenerationAttemptFile: (file: string) => Promise<ImageGenerationAttempt | undefined>;
|
|
12
|
+
export type ImageGenerationMaterialization = {
|
|
13
|
+
outputPath: string;
|
|
14
|
+
attemptFile: string;
|
|
15
|
+
movedOutput: boolean;
|
|
16
|
+
movedAttempt: boolean;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Move one candidate's staged artifacts into their destination. The PNG lands
|
|
20
|
+
* before its evidence so that a crash between the two renames leaves the
|
|
21
|
+
* staged ledger in place, which is what lets a later resume prove the work was
|
|
22
|
+
* already paid for instead of buying it again.
|
|
23
|
+
*/
|
|
24
|
+
export declare const materializeImageGeneration: (outputPath: string) => Promise<ImageGenerationMaterialization>;
|
|
25
|
+
//# sourceMappingURL=image-generation-staging.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-generation-staging.d.ts","sourceRoot":"","sources":["../src/image-generation-staging.ts"],"names":[],"mappings":"AAIA,OAAO,EAAoB,KAAK,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAW/F,eAAO,MAAM,4BAA4B,wBAAwB,CAAC;AAElE,MAAM,MAAM,0BAA0B,GAAG;IACvC,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,YAAY,MAAM,KAAG,0BAQ/D,CAAC;AAEF,eAAO,MAAM,4BAA4B,GAAU,YAAY,MAAM,KAAG,OAAO,CAAC,IAAI,CAEnF,CAAC;AAEF,eAAO,MAAM,gCAAgC,GAC3C,YAAY,MAAM,KACjB,OAAO,CAAC,sBAAsB,GAAG,SAAS,CAE5C,CAAC;AAEF,eAAO,MAAM,8BAA8B,GACzC,MAAM,MAAM,KACX,OAAO,CAAC,sBAAsB,GAAG,SAAS,CAkB5C,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,GACrC,YAAY,MAAM,KACjB,OAAO,CAAC,8BAA8B,CA0BxC,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { mkdir, readFile, rename, rmdir } from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { imageGenerationPathExists } from './image-generation-fs.js';
|
|
4
|
+
import { imageAttemptPath } from './image-generation-evidence.js';
|
|
5
|
+
// Every in-flight candidate — its PNG bytes and its attempt ledger — is written
|
|
6
|
+
// inside a hidden staging directory and moved into the destination directory
|
|
7
|
+
// only once the batch is terminal. A caller listing the candidates directory
|
|
8
|
+
// therefore never observes the half-written state that made eleven benchmark
|
|
9
|
+
// runs declare failure roughly thirty seconds before valid candidates landed.
|
|
10
|
+
//
|
|
11
|
+
// The staging directory is a child of the destination directory on purpose:
|
|
12
|
+
// same-directory renames are same-filesystem, so materialization is atomic and
|
|
13
|
+
// can never fail with EXDEV the way a system-temp staging path could.
|
|
14
|
+
export const IMAGE_STAGING_DIRECTORY_NAME = '.12ui-image-staging';
|
|
15
|
+
export const imageGenerationStagedPaths = (outputPath) => {
|
|
16
|
+
const stagingDirectory = path.join(path.dirname(outputPath), IMAGE_STAGING_DIRECTORY_NAME);
|
|
17
|
+
const base = path.basename(outputPath);
|
|
18
|
+
return {
|
|
19
|
+
stagingDirectory,
|
|
20
|
+
stagedOutputPath: path.join(stagingDirectory, `${base}.part`),
|
|
21
|
+
stagedAttemptFile: path.join(stagingDirectory, `${base}.attempt.json`),
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export const ensureImageGenerationStaging = async (outputPath) => {
|
|
25
|
+
await mkdir(imageGenerationStagedPaths(outputPath).stagingDirectory, { recursive: true });
|
|
26
|
+
};
|
|
27
|
+
export const readStagedImageGenerationAttempt = async (outputPath) => (readImageGenerationAttemptFile(imageGenerationStagedPaths(outputPath).stagedAttemptFile));
|
|
28
|
+
export const readImageGenerationAttemptFile = async (file) => {
|
|
29
|
+
let source;
|
|
30
|
+
try {
|
|
31
|
+
source = await readFile(file, 'utf8');
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
if (error.code === 'ENOENT')
|
|
35
|
+
return undefined;
|
|
36
|
+
throw error;
|
|
37
|
+
}
|
|
38
|
+
try {
|
|
39
|
+
const value = JSON.parse(source);
|
|
40
|
+
if (typeof value !== 'object' || value === null)
|
|
41
|
+
return undefined;
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
// Unreadable evidence is still evidence that a request was reserved here.
|
|
46
|
+
// Callers must treat it as "something happened" rather than "nothing did",
|
|
47
|
+
// so surface a minimal record instead of pretending the file is absent.
|
|
48
|
+
return { status: 'dispatched' };
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Move one candidate's staged artifacts into their destination. The PNG lands
|
|
53
|
+
* before its evidence so that a crash between the two renames leaves the
|
|
54
|
+
* staged ledger in place, which is what lets a later resume prove the work was
|
|
55
|
+
* already paid for instead of buying it again.
|
|
56
|
+
*/
|
|
57
|
+
export const materializeImageGeneration = async (outputPath) => {
|
|
58
|
+
const attemptFile = imageAttemptPath(outputPath);
|
|
59
|
+
const { stagingDirectory, stagedOutputPath, stagedAttemptFile } = (imageGenerationStagedPaths(outputPath));
|
|
60
|
+
let movedOutput = false;
|
|
61
|
+
let movedAttempt = false;
|
|
62
|
+
if (await imageGenerationPathExists(stagedOutputPath)) {
|
|
63
|
+
if (await imageGenerationPathExists(outputPath)) {
|
|
64
|
+
throw new Error(`Refusing to overwrite an existing candidate at ${outputPath} with staged bytes from`
|
|
65
|
+
+ ` ${stagedOutputPath}; inspect both before continuing.`);
|
|
66
|
+
}
|
|
67
|
+
await rename(stagedOutputPath, outputPath);
|
|
68
|
+
movedOutput = true;
|
|
69
|
+
}
|
|
70
|
+
if (await imageGenerationPathExists(stagedAttemptFile)) {
|
|
71
|
+
await rename(stagedAttemptFile, attemptFile);
|
|
72
|
+
movedAttempt = true;
|
|
73
|
+
}
|
|
74
|
+
// Leave nothing behind once the last candidate in this directory is
|
|
75
|
+
// delivered. Anything still staged means work that is not delivered yet, and
|
|
76
|
+
// rmdir refuses a non-empty directory, so the check is the guarantee.
|
|
77
|
+
await rmdir(stagingDirectory).catch(() => undefined);
|
|
78
|
+
return { outputPath, attemptFile, movedOutput, movedAttempt };
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=image-generation-staging.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-generation-staging.js","sourceRoot":"","sources":["../src/image-generation-staging.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAA+B,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,CAAC;QAC7C,YAAY,GAAG,IAAI,CAAC;IACtB,CAAC;IACD,oEAAoE;IACpE,6EAA6E;IAC7E,sEAAsE;IACtE,MAAM,KAAK,CAAC,gBAAgB,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;IACrD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;AAChE,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacy-skill-catalog.d.ts","sourceRoot":"","sources":["../src/legacy-skill-catalog.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,kBAAkB,gHAYrB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAChE,eAAO,MAAM,qBAAqB,yFAMxB,CAAC;AASX,eAAO,MAAM,mBAAmB,EAAE,SAAS,eAAe,EACuB,CAAC;
|
|
1
|
+
{"version":3,"file":"legacy-skill-catalog.d.ts","sourceRoot":"","sources":["../src/legacy-skill-catalog.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,kBAAkB,gHAYrB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAChE,eAAO,MAAM,qBAAqB,yFAMxB,CAAC;AASX,eAAO,MAAM,mBAAmB,EAAE,SAAS,eAAe,EACuB,CAAC;AAmSlF,eAAO,MAAM,wBAAwB,GACnC,WAAW,MAAM,KAChB,OAAO,CAAC,MAAM,EAAE,CAiBlB,CAAC;AAEF,eAAO,MAAM,2BAA2B,GACtC,WAAW,MAAM,KAChB,OAAO,CAAC,SAAS,GAAG,YAAY,GAAG,SAAS,CAW9C,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAC1C,WAAW,MAAM,KAChB,OAAO,CAAC,SAAS,GAAG,YAAY,GAAG,SAAS,CAoB9C,CAAC"}
|
|
@@ -122,6 +122,25 @@ const variants = {
|
|
|
122
122
|
'references/continuation-contract.md': '24ea3ab3906f04985572e5665206fef7a3390fa88d0480b8ecca271791ae6b5c',
|
|
123
123
|
'references/selection-contract.md': '6a2b0a24fcb03495240dd15b63394d7b6de9d9c52eb411cd3ff1b02f3ba22578',
|
|
124
124
|
},
|
|
125
|
+
// Fused convert+export guidance and realistic conversion durations.
|
|
126
|
+
{
|
|
127
|
+
'SKILL.md': '88e23da2f157153735eb21ae3d12edf5abffe115b3c8aeace0da7606a2609581',
|
|
128
|
+
'agents/openai.yaml': '543726a0ac4b976c897c95ce18324ed7610ae2b5f9584cc8b7b2e3df5c16980c',
|
|
129
|
+
'assets/large-logo.svg': 'bf877913dc00515b7f714a48851f9fdc6d42c4ca5ad4a1c7bc36d926c23f9b6d',
|
|
130
|
+
'assets/small-400px.png': '2c045201a83e54afe733e199af02ab8fbcdb9f50e6b3e0281078fdffca9b3b03',
|
|
131
|
+
'references/continuation-contract.md': '24ea3ab3906f04985572e5665206fef7a3390fa88d0480b8ecca271791ae6b5c',
|
|
132
|
+
'references/selection-contract.md': '6a2b0a24fcb03495240dd15b63394d7b6de9d9c52eb411cd3ff1b02f3ba22578',
|
|
133
|
+
},
|
|
134
|
+
// Batch completion sentinel and --resume, the recommended-candidate
|
|
135
|
+
// selection shape, and adopting the export as the deliverable page.
|
|
136
|
+
{
|
|
137
|
+
'SKILL.md': '5c3c51d9ce74408ccb0277e559ebadd8fd0d4b48f74272de864699ed68091dcb',
|
|
138
|
+
'agents/openai.yaml': '543726a0ac4b976c897c95ce18324ed7610ae2b5f9584cc8b7b2e3df5c16980c',
|
|
139
|
+
'assets/large-logo.svg': 'bf877913dc00515b7f714a48851f9fdc6d42c4ca5ad4a1c7bc36d926c23f9b6d',
|
|
140
|
+
'assets/small-400px.png': '2c045201a83e54afe733e199af02ab8fbcdb9f50e6b3e0281078fdffca9b3b03',
|
|
141
|
+
'references/continuation-contract.md': '24ea3ab3906f04985572e5665206fef7a3390fa88d0480b8ecca271791ae6b5c',
|
|
142
|
+
'references/selection-contract.md': '0d42af12cfe7f616a2eb036a4babfe28c4468843471a90c37ab970f48d8e11ed',
|
|
143
|
+
},
|
|
125
144
|
],
|
|
126
145
|
'design-search': [
|
|
127
146
|
{
|
|
@@ -186,6 +205,21 @@ const variants = {
|
|
|
186
205
|
'assets/large-logo.svg': 'ddf9f51a8c9163d64bc19126fedbfdae050f3a7bad7cdf314efacd10dd7ff447',
|
|
187
206
|
'assets/small-400px.png': '97817fa2d4e5f5ad1cac77bac925bafbdd04519621c5e45fd95c6a6ad5e846f7',
|
|
188
207
|
},
|
|
208
|
+
// Fused `12ui convert --export html` and realistic conversion durations.
|
|
209
|
+
{
|
|
210
|
+
'SKILL.md': '2998fb5f868868e2d7f2004374d10217d6c95f4ef680e081bb34855aa0992dde',
|
|
211
|
+
'agents/openai.yaml': 'bbe5ed44c7f41920aaa92a86a06b18125f13b00ea67b100559358953986f9933',
|
|
212
|
+
'assets/large-logo.svg': 'ddf9f51a8c9163d64bc19126fedbfdae050f3a7bad7cdf314efacd10dd7ff447',
|
|
213
|
+
'assets/small-400px.png': '97817fa2d4e5f5ad1cac77bac925bafbdd04519621c5e45fd95c6a6ad5e846f7',
|
|
214
|
+
},
|
|
215
|
+
// The exported page is the deliverable, adapted and composed rather than
|
|
216
|
+
// mined for assets and re-authored.
|
|
217
|
+
{
|
|
218
|
+
'SKILL.md': 'a6ce44347192edb96862ec42f0a5f190ab6eef0dc76c1523606d6f163f8cb857',
|
|
219
|
+
'agents/openai.yaml': 'bbe5ed44c7f41920aaa92a86a06b18125f13b00ea67b100559358953986f9933',
|
|
220
|
+
'assets/large-logo.svg': 'ddf9f51a8c9163d64bc19126fedbfdae050f3a7bad7cdf314efacd10dd7ff447',
|
|
221
|
+
'assets/small-400px.png': '97817fa2d4e5f5ad1cac77bac925bafbdd04519621c5e45fd95c6a6ad5e846f7',
|
|
222
|
+
},
|
|
189
223
|
],
|
|
190
224
|
// The one shipped design-create bundle (0.2.10), retained so 0.2.11 retires an
|
|
191
225
|
// untouched installed copy when design-draft replaces it.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacy-skill-catalog.js","sourceRoot":"","sources":["../src/legacy-skill-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,6EAA6E;AAC7E,wEAAwE;AACxE,6DAA6D;AAC7D,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,oBAAoB;IACpB,qBAAqB;IACrB,MAAM;IACN,cAAc;IACd,aAAa;IACb,4EAA4E;IAC5E,8EAA8E;IAC9E,8EAA8E;IAC9E,8EAA8E;IAC9E,gCAAgC;IAChC,eAAe;CACP,CAAC;AAGX,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,QAAQ;IACR,eAAe;IACf,cAAc;IACd,eAAe;IACf,gBAAgB;CACR,CAAC;AAIX,+EAA+E;AAC/E,6EAA6E;AAC7E,2EAA2E;AAC3E,+EAA+E;AAC/E,mDAAmD;AACnD,MAAM,CAAC,MAAM,mBAAmB,GAA+B,kBAAkB;KAC9E,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAE,qBAA2C,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;AAElF,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAA2B,EAAE,CAAC,CACnE,mBAAyC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAC1D,CAAC;AAIF,MAAM,QAAQ,GAAwE;IACpF,oBAAoB,EAAE,CAAC;YACrB,UAAU,EAAE,kEAAkE;YAC9E,oBAAoB,EAAE,kEAAkE;SACzF,CAAC;IACF,qBAAqB,EAAE,CAAC;YACtB,UAAU,EAAE,kEAAkE;YAC9E,oBAAoB,EAAE,kEAAkE;YAC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AC;QACxC,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,IAAI,QAAQ,CAAC,cAAc,EAAE;YAAE,OAAO,SAAS,CAAC;IAC7E,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAK,KAA+B,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,SAAS,CAAC;QACzE,MAAM,KAAK,CAAC;IACd,CAAC;IACD,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IACtC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC;QAAE,OAAO,SAAS,CAAC;IACrD,MAAM,MAAM,GAAG,MAAM,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACpD,MAAM,KAAK,GAAG,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;IACjC,KAAK,MAAM,OAAO,IAAI,QAAQ,CAAC,IAA2B,CAAC,EAAE,CAAC;QAC5D,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;QAC7C,IAAI,QAAQ,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,KAAK,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;YAC9F,SAAS;QACX,CAAC;QACD,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;YAAE,OAAO,YAAY,CAAC;IACrF,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC"}
|
package/package.json
CHANGED
package/skills/design/SKILL.md
CHANGED
|
@@ -177,11 +177,37 @@ from one host task: that tool path may queue them serially. Never retry a failed
|
|
|
177
177
|
or ambiguous candidate, switch providers after dispatch, use cached samples, or
|
|
178
178
|
leave generation in detached background work.
|
|
179
179
|
|
|
180
|
+
Expect about **90 seconds** of blocking for four candidates. The command has not
|
|
181
|
+
hung: never kill it, never background it, and never list the candidates
|
|
182
|
+
directory to decide whether it worked. Nothing lands there until the batch is
|
|
183
|
+
terminal, and then everything appears at once — the four PNGs, their attempt
|
|
184
|
+
evidence, and `<run-dir>/candidates/generation.complete.json`. Poll that
|
|
185
|
+
sentinel if you must poll anything. It is written only at a terminal state and
|
|
186
|
+
records each candidate's status, sha256, and byte count; its absence means
|
|
187
|
+
still running, never failed.
|
|
188
|
+
|
|
189
|
+
If the command was interrupted, re-run the identical command with `--resume`. A
|
|
190
|
+
resume delivers candidates that were already generated and re-requests only
|
|
191
|
+
those the provider provably never billed, so it can never buy a candidate
|
|
192
|
+
twice. It refuses a batch that already completed, and its refusal names the
|
|
193
|
+
candidates already on disk — read those rather than generating again.
|
|
194
|
+
|
|
180
195
|
### 3. Select
|
|
181
196
|
|
|
182
|
-
Inspect all candidates at original detail.
|
|
183
|
-
|
|
184
|
-
|
|
197
|
+
Inspect all candidates at original detail. Looking at them is not optional: your
|
|
198
|
+
judgment is the channel through which anything the run could not compute gets
|
|
199
|
+
into the decision.
|
|
200
|
+
|
|
201
|
+
If the run indicates a recommended candidate, prefer it. Overriding the
|
|
202
|
+
recommendation is legitimate and expected when the context warrants — an
|
|
203
|
+
explicit user preference, a brief or steering directive the recommendation could
|
|
204
|
+
not see, or a visible defect in the recommended image are all good reasons — and
|
|
205
|
+
an override must state its reason. If no recommendation is indicated, select on
|
|
206
|
+
the criteria below as usual.
|
|
207
|
+
|
|
208
|
+
Choose the best eligible direction for the brief, hierarchy, usability,
|
|
209
|
+
personality, accessibility, feasibility, and ability to extend into the rest of
|
|
210
|
+
the product.
|
|
185
211
|
|
|
186
212
|
Treat common model palettes as neutral, not evidence of quality. Neon lime on
|
|
187
213
|
dark and orange on light should win only when the brief or paired reference
|
|
@@ -193,7 +219,10 @@ Write `<run-dir>/selection.json` using
|
|
|
193
219
|
[the selection contract](references/selection-contract.md). Record exact
|
|
194
220
|
prompts, original/prepared redesign-source paths and hashes, preserve/change contract, design mode,
|
|
195
221
|
reference policy, corpus directions, candidate paths and hashes, winner,
|
|
196
|
-
specific rejection reasons, and visible rationale.
|
|
222
|
+
specific rejection reasons, and visible rationale. Record whether the
|
|
223
|
+
recommendation was followed or overridden, and for an override the reason. When
|
|
224
|
+
the flow also writes a `design-run.json`, record the same pair there, the reason
|
|
225
|
+
under `selection_override_reason`, alongside its existing selection fields.
|
|
197
226
|
|
|
198
227
|
### 4. Extend and convert
|
|
199
228
|
|
|
@@ -217,6 +246,22 @@ generation overlaps the base conversion. Inspect every result before accepting
|
|
|
217
246
|
it. Convert accepted continuation images concurrently with distinct stable
|
|
218
247
|
idempotency keys; never retry or replace an ambiguous generation.
|
|
219
248
|
|
|
249
|
+
Budget about 4 minutes per conversion at `--model standard`. When a surface also
|
|
250
|
+
needs responsive HTML, ask for it in the same command with `--export html`
|
|
251
|
+
rather than exporting afterwards — the export then overlaps the conversion and
|
|
252
|
+
the pair costs about 5 minutes instead of about 8, at the same price. One
|
|
253
|
+
blocking command replaces the create-then-poll-then-export sequence. Both
|
|
254
|
+
commands block for those durations and stream progress; neither has hung.
|
|
255
|
+
|
|
256
|
+
The exported HTML is the deliverable page. Adapt and compose it: keep its
|
|
257
|
+
document, structure, classes, and anchor bindings, and build the surface around
|
|
258
|
+
that document — routing, real copy, state, interactions, and the later sections
|
|
259
|
+
the first-viewport prompt deliberately omitted. Do not mine the export for its
|
|
260
|
+
images and re-author the markup: that discards the design you just chose and
|
|
261
|
+
paid to convert, and the page lands back on generic defaults. Fix defects in the
|
|
262
|
+
export's own markup. Rebuild from scratch only when the export cannot carry the
|
|
263
|
+
surface at all, and report it explicitly when you do.
|
|
264
|
+
|
|
220
265
|
For ordered viewports of one continuous page, use the conversion package API
|
|
221
266
|
to preserve page order. Integrate independent web routes, app states, or mobile
|
|
222
267
|
screens as separate surfaces. Record the run in `<run-dir>/continuations.json`
|
|
@@ -229,9 +274,11 @@ with the same idempotency key; do not convert another candidate as a shortcut.
|
|
|
229
274
|
|
|
230
275
|
Inspect generated files before merging the smallest coherent set into the
|
|
231
276
|
project. Preserve routing, components, tokens, accessibility, dependencies,
|
|
232
|
-
and unrelated changes.
|
|
233
|
-
|
|
234
|
-
|
|
277
|
+
and unrelated changes. The converted export goes in as the page; integration is
|
|
278
|
+
adapting it to the project, not replacing it. Add the exact copy, interactions,
|
|
279
|
+
responsive behavior, later sections, and routes intentionally omitted from the
|
|
280
|
+
first-viewport prompt while extending the visual system from the winner and
|
|
281
|
+
accepted continuations.
|
|
235
282
|
|
|
236
283
|
Run focused checks, launch the real interface, exercise interactions, and
|
|
237
284
|
compare it with the winner at the source viewport plus representative narrower
|