@12ui/design 0.2.91 → 0.2.92
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/codex-plugin/plugin.json +14 -14
- package/dist/branch-client.d.ts +8 -0
- package/dist/branch-client.d.ts.map +1 -1
- package/dist/branch-client.js.map +1 -1
- package/dist/branch-core/branch-canvas.d.ts +41 -0
- package/dist/branch-core/branch-canvas.d.ts.map +1 -0
- package/dist/branch-core/branch-canvas.js +87 -0
- package/dist/branch-core/branch-canvas.js.map +1 -0
- package/dist/branch-core/branch-gates.d.ts +62 -0
- package/dist/branch-core/branch-gates.d.ts.map +1 -0
- package/dist/branch-core/branch-gates.js +56 -0
- package/dist/branch-core/branch-gates.js.map +1 -0
- package/dist/branch-core/branch-plan-model.d.ts +115 -0
- package/dist/branch-core/branch-plan-model.d.ts.map +1 -0
- package/dist/branch-core/branch-plan-model.js +75 -0
- package/dist/branch-core/branch-plan-model.js.map +1 -0
- package/dist/branch-core/branch-planner.d.ts +78 -0
- package/dist/branch-core/branch-planner.d.ts.map +1 -0
- package/dist/branch-core/branch-planner.js +441 -0
- package/dist/branch-core/branch-planner.js.map +1 -0
- package/dist/branch-core/branch-prompt.d.ts +40 -0
- package/dist/branch-core/branch-prompt.d.ts.map +1 -0
- package/dist/branch-core/branch-prompt.js +180 -0
- package/dist/branch-core/branch-prompt.js.map +1 -0
- package/dist/branch-core/index.d.ts +17 -0
- package/dist/branch-core/index.d.ts.map +1 -0
- package/dist/branch-core/index.js +19 -0
- package/dist/branch-core/index.js.map +1 -0
- package/dist/branch-dispatch-loop.d.ts +2 -2
- package/dist/branch-dispatch-loop.d.ts.map +1 -1
- package/dist/branch-dispatch-loop.js +4 -0
- package/dist/branch-dispatch-loop.js.map +1 -1
- package/dist/branch-downloads.d.ts +2 -2
- package/dist/branch-downloads.d.ts.map +1 -1
- package/dist/branch-engine.d.ts +61 -0
- package/dist/branch-engine.d.ts.map +1 -0
- package/dist/branch-engine.js +94 -0
- package/dist/branch-engine.js.map +1 -0
- package/dist/branch-execution-types.d.ts +5 -0
- package/dist/branch-execution-types.d.ts.map +1 -1
- package/dist/branch-execution.d.ts +2 -2
- package/dist/branch-execution.d.ts.map +1 -1
- package/dist/branch-execution.js +27 -4
- package/dist/branch-execution.js.map +1 -1
- package/dist/branch-local-call-wait.d.ts +58 -0
- package/dist/branch-local-call-wait.d.ts.map +1 -0
- package/dist/branch-local-call-wait.js +122 -0
- package/dist/branch-local-call-wait.js.map +1 -0
- package/dist/branch-local-client.d.ts +108 -0
- package/dist/branch-local-client.d.ts.map +1 -0
- package/dist/branch-local-client.js +477 -0
- package/dist/branch-local-client.js.map +1 -0
- package/dist/branch-local-plan.d.ts +64 -0
- package/dist/branch-local-plan.d.ts.map +1 -0
- package/dist/branch-local-plan.js +281 -0
- package/dist/branch-local-plan.js.map +1 -0
- package/dist/branch-local-session-adoption.d.ts +35 -0
- package/dist/branch-local-session-adoption.d.ts.map +1 -0
- package/dist/branch-local-session-adoption.js +185 -0
- package/dist/branch-local-session-adoption.js.map +1 -0
- package/dist/branch-materialize.d.ts +2 -2
- package/dist/branch-materialize.d.ts.map +1 -1
- package/dist/branch-run-observation.d.ts +2 -2
- package/dist/branch-run-observation.d.ts.map +1 -1
- package/dist/branch-run-observation.js.map +1 -1
- package/dist/branch-run-record.d.ts +8 -0
- package/dist/branch-run-record.d.ts.map +1 -1
- package/dist/branch-run-record.js.map +1 -1
- package/dist/branch-schedule.d.ts +1 -1
- package/dist/branch-schedule.js +1 -1
- package/dist/cli-branch-command.d.ts +9 -2
- package/dist/cli-branch-command.d.ts.map +1 -1
- package/dist/cli-branch-command.js +61 -16
- package/dist/cli-branch-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 +1 -0
- package/dist/cli-help/design.js.map +1 -1
- package/dist/cli-help/index.d.ts +1 -1
- package/dist/cli-local-dispatch.d.ts.map +1 -1
- package/dist/cli-local-dispatch.js +6 -2
- package/dist/cli-local-dispatch.js.map +1 -1
- package/dist/cli-next-command.d.ts.map +1 -1
- package/dist/cli-next-command.js +3 -1
- package/dist/cli-next-command.js.map +1 -1
- package/dist/cli-usage.js +1 -1
- package/dist/legacy-skill-catalog.d.ts.map +1 -1
- package/dist/legacy-skill-catalog.js +10 -0
- package/dist/legacy-skill-catalog.js.map +1 -1
- package/dist/slate-branch-runner.d.ts +9 -3
- package/dist/slate-branch-runner.d.ts.map +1 -1
- package/dist/slate-branch-runner.js +22 -6
- package/dist/slate-branch-runner.js.map +1 -1
- package/dist/slate-image-executor.d.ts +1 -0
- package/dist/slate-image-executor.d.ts.map +1 -1
- package/dist/slate-image-executor.js +1 -1
- package/dist/slate-image-executor.js.map +1 -1
- package/dist/slate-runner-context.d.ts +6 -0
- package/dist/slate-runner-context.d.ts.map +1 -1
- package/dist/slate-runner-context.js.map +1 -1
- package/dist/slate-runner-main.d.ts +3 -0
- package/dist/slate-runner-main.d.ts.map +1 -1
- package/dist/slate-runner-main.js +4 -0
- package/dist/slate-runner-main.js.map +1 -1
- package/dist/workspace-draw-branch.d.ts +5 -2
- package/dist/workspace-draw-branch.d.ts.map +1 -1
- package/dist/workspace-draw-branch.js +28 -22
- package/dist/workspace-draw-branch.js.map +1 -1
- package/dist/workspace-draw-codex.d.ts +5 -1
- package/dist/workspace-draw-codex.d.ts.map +1 -1
- package/dist/workspace-draw-codex.js +1 -0
- package/dist/workspace-draw-codex.js.map +1 -1
- package/dist/workspace-draw-run.d.ts +2 -1
- package/dist/workspace-draw-run.d.ts.map +1 -1
- package/dist/workspace-draw-run.js +7 -2
- package/dist/workspace-draw-run.js.map +1 -1
- package/open-design.json +2 -2
- package/package.json +1 -1
- package/skills/12ui-design/outputs.md +1 -1
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
// GENERATED — do not edit. Copied verbatim from
|
|
2
|
+
// packages/layerdoc/src/branch-core by scripts/sync-improve-core.mjs.
|
|
3
|
+
const CONTENT_HEADING = 'This screen should contain:';
|
|
4
|
+
const READING_LAYOUT_HEADING = 'Reading layout:';
|
|
5
|
+
const CHROME_HEADING = 'Header and footer:';
|
|
6
|
+
const STRUCTURE_HEADING = 'Screen structure:';
|
|
7
|
+
const GENERATION_CONTRACT = 'Generate the complete new screen from scratch.';
|
|
8
|
+
const isWebPage = (input) => input.surfaceType === 'web_page';
|
|
9
|
+
const isFinalScreen = (input) => (input.pageEndsHere || input.viewportOrdinal === input.lastViewportOrdinal);
|
|
10
|
+
const footerImageNumber = (input) => (2 + Number(input.hasDependencyReference));
|
|
11
|
+
const referenceContract = (input) => {
|
|
12
|
+
const references = [
|
|
13
|
+
`Image 1 is the complete approved source design and defines the whole ${input.surfaceType === 'web_page' ? 'site' : 'product'}.`,
|
|
14
|
+
];
|
|
15
|
+
if (input.hasDependencyReference) {
|
|
16
|
+
if (input.surfaceType === 'web_page') {
|
|
17
|
+
references.push('Image 2 is the complete preceding part of this page and is now entirely above the new screen.');
|
|
18
|
+
}
|
|
19
|
+
else if (input.surfaceType === 'mobile_app') {
|
|
20
|
+
references.push('Image 2 is the complete immediately preceding mobile application state.');
|
|
21
|
+
}
|
|
22
|
+
else if (input.surfaceType === 'immersive') {
|
|
23
|
+
references.push('Image 2 is the complete immediately preceding state of this immersive experience.');
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
references.push('Image 2 is the complete immediately preceding application state.');
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if (input.hasFooterReference) {
|
|
30
|
+
references.push(`Image ${footerImageNumber(input)} is a complete page ending from this site and shows how its footer belongs within a full page.`);
|
|
31
|
+
}
|
|
32
|
+
return references.join(' ');
|
|
33
|
+
};
|
|
34
|
+
const stateLocation = (input) => {
|
|
35
|
+
const stateKind = input.surfaceType === 'mobile_app'
|
|
36
|
+
? 'mobile application state'
|
|
37
|
+
: input.surfaceType === 'immersive'
|
|
38
|
+
? 'immersive experience state'
|
|
39
|
+
: 'application state';
|
|
40
|
+
const screenKind = input.surfaceType === 'mobile_app'
|
|
41
|
+
? 'mobile application screen'
|
|
42
|
+
: input.surfaceType === 'immersive'
|
|
43
|
+
? 'immersive experience screen'
|
|
44
|
+
: 'application screen';
|
|
45
|
+
if (input.hasDependencyReference) {
|
|
46
|
+
return `Create the next complete ${stateKind} for the “${input.pageTitle}” route. Preserve the named selection and entered context from Image 2, but show the new state instead of copying the preceding screen.`;
|
|
47
|
+
}
|
|
48
|
+
if (input.pageKind === 'source') {
|
|
49
|
+
return `Create the next complete ${stateKind} after the approved source for the “${input.pageTitle}” route. Preserve only context that is genuinely meant to continue; do not reproduce the approved screen.`;
|
|
50
|
+
}
|
|
51
|
+
return `Create one complete ${screenKind} for the “${input.pageTitle}” route. This is a new route in the same product, not content placed below Image 1.`;
|
|
52
|
+
};
|
|
53
|
+
const webpageLocation = (input) => {
|
|
54
|
+
const final = isFinalScreen(input);
|
|
55
|
+
if (!input.hasDependencyReference && input.pageKind === 'source') {
|
|
56
|
+
return `This screen continues the approved “${input.pageTitle}” page below the complete source in Image 1. Everything visible in Image 1 is entirely above this new screen. Begin with the next content in the page; do not repeat the previous section or show any overlap from above.`;
|
|
57
|
+
}
|
|
58
|
+
if (!input.hasDependencyReference && final) {
|
|
59
|
+
return `This is the complete short “${input.pageTitle}” page. It begins here and reaches its natural ending within this screen.`;
|
|
60
|
+
}
|
|
61
|
+
if (!input.hasDependencyReference) {
|
|
62
|
+
return `This is the top visible part of the new “${input.pageTitle}” page. Other parts of the page will continue below this screen.`;
|
|
63
|
+
}
|
|
64
|
+
if (final) {
|
|
65
|
+
return `This is the final visible part lower down the “${input.pageTitle}” page. The complete preceding part is entirely above this screen. Begin after that content without repeating its bottom edge or any section from above.`;
|
|
66
|
+
}
|
|
67
|
+
return `This is a later visible part lower down the “${input.pageTitle}” page. The complete preceding part is entirely above this screen, and more of the page will follow below. Begin after the prior content without repeating it.`;
|
|
68
|
+
};
|
|
69
|
+
const chromeContract = (input) => {
|
|
70
|
+
if (!isWebPage(input))
|
|
71
|
+
return null;
|
|
72
|
+
const firstNewPageScreen = input.pageKind === 'additional' && !input.hasDependencyReference;
|
|
73
|
+
const header = typeof input.header === 'boolean' ? input.header : firstNewPageScreen;
|
|
74
|
+
const footer = typeof input.footer === 'boolean' ? input.footer : isFinalScreen(input);
|
|
75
|
+
const headerText = header
|
|
76
|
+
? 'Include the site header, interpreting it from the complete approved source in Image 1.'
|
|
77
|
+
: 'Do not include a header - this screen follows an earlier part of the page which already includes it.';
|
|
78
|
+
const footerText = footer
|
|
79
|
+
? input.hasFooterReference
|
|
80
|
+
? `Include a footer. Use the complete page in Image ${footerImageNumber(input)} as context for how the footer belongs to this site, then interpret it for the current page.`
|
|
81
|
+
: 'Include a footer that feels native to the same site, interpreting the complete approved source as a whole.'
|
|
82
|
+
: 'Do not include a footer - a later part of the page will include it.';
|
|
83
|
+
return `${headerText} ${footerText}`;
|
|
84
|
+
};
|
|
85
|
+
const stateShellContract = (input) => {
|
|
86
|
+
if (input.surfaceType === 'web_app') {
|
|
87
|
+
return 'Treat this as a complete desktop application state. Preserve recurring application navigation or shell elements established by the approved source where they belong; do not add a conventional webpage footer.';
|
|
88
|
+
}
|
|
89
|
+
if (input.surfaceType === 'mobile_app') {
|
|
90
|
+
return 'Treat this as a complete mobile application state. Preserve recurring mobile navigation established by the approved source where it belongs; do not add a conventional webpage header or footer.';
|
|
91
|
+
}
|
|
92
|
+
if (input.surfaceType === 'immersive') {
|
|
93
|
+
return 'Treat this as a complete immersive experience state. Do not assume conventional website or application chrome; include only controls that belong to the experience.';
|
|
94
|
+
}
|
|
95
|
+
return null;
|
|
96
|
+
};
|
|
97
|
+
const openingContract = (surface) => {
|
|
98
|
+
if (surface === 'web_page')
|
|
99
|
+
return 'You are creating another page for the same website shown in Image 1.';
|
|
100
|
+
if (surface === 'mobile_app')
|
|
101
|
+
return 'You are creating another mobile application screen or state for the same product shown in Image 1.';
|
|
102
|
+
if (surface === 'immersive')
|
|
103
|
+
return 'You are creating another screen or state for the same immersive product experience shown in Image 1.';
|
|
104
|
+
return 'You are creating another application screen or state for the same product shown in Image 1.';
|
|
105
|
+
};
|
|
106
|
+
const returnContract = (surface) => {
|
|
107
|
+
if (surface === 'mobile_app')
|
|
108
|
+
return 'Return one complete mobile application screen.';
|
|
109
|
+
if (surface === 'immersive')
|
|
110
|
+
return 'Return one complete immersive experience screen.';
|
|
111
|
+
if (surface === 'web_app')
|
|
112
|
+
return 'Return one complete desktop application screen.';
|
|
113
|
+
return 'Return one complete desktop webpage screen.';
|
|
114
|
+
};
|
|
115
|
+
const proseLines = (targetWords) => {
|
|
116
|
+
const words = Number.isSafeInteger(targetWords) && targetWords > 0
|
|
117
|
+
? targetWords
|
|
118
|
+
: 400;
|
|
119
|
+
return Math.max(12, Math.min(60, Math.round(words / 10)));
|
|
120
|
+
};
|
|
121
|
+
const readingLayoutContract = (input) => {
|
|
122
|
+
if (!input.slotType || input.slotType === 'other')
|
|
123
|
+
return null;
|
|
124
|
+
const lines = proseLines(input.targetWords);
|
|
125
|
+
if (input.slotType === 'text-column') {
|
|
126
|
+
return `Use one wide reading column under a single section heading, with roughly ${lines} lines of body copy in the site's text style and generous margins. Keep it as one uninterrupted prose region with no cards, grid, callouts, or supporting graphic. The copy may be neutral placeholder prose, but do not print instructions, word counts, replacement labels, or empty frames.`;
|
|
127
|
+
}
|
|
128
|
+
if (input.slotType === 'text-with-graphic') {
|
|
129
|
+
return `Use roughly two-thirds of the screen for one continuous body-copy region of about ${lines} lines and one-third for a single clear diagram of the concrete subject described above. The diagram must depict those specific facts, not generic decoration. Do not turn the section into cards, a dashboard, a grid, or a collection of callouts. The copy may be neutral placeholder prose, but do not print instructions, word counts, replacement labels, or empty frames.`;
|
|
130
|
+
}
|
|
131
|
+
return `Use a closing paragraph of about ${lines} lines, then one restrained summary graphic of the concrete subject described above, then the site footer. Keep that order and do not split the conclusion into cards, a dashboard, a grid, or callouts. The copy may be neutral placeholder prose, but do not print instructions, word counts, replacement labels, or empty frames.`;
|
|
132
|
+
};
|
|
133
|
+
const naturalContent = (input) => {
|
|
134
|
+
const content = input.content.trim();
|
|
135
|
+
if (!input.slotType || input.slotType === 'other')
|
|
136
|
+
return content;
|
|
137
|
+
return content
|
|
138
|
+
.replace(/\b(?:slot|target)\s*:[^;.\n]*(?:[;.]|$)/giu, '')
|
|
139
|
+
.replace(/\s+/gu, ' ')
|
|
140
|
+
.trim();
|
|
141
|
+
};
|
|
142
|
+
export const buildBranchGenerationPrompt = (input) => {
|
|
143
|
+
const chrome = chromeContract(input);
|
|
144
|
+
const shell = stateShellContract(input);
|
|
145
|
+
const readingLayout = readingLayoutContract(input);
|
|
146
|
+
return [
|
|
147
|
+
`${openingContract(input.surfaceType)} Understand the complete approved source as a whole: what the product is doing, its atmosphere, visual language, hierarchy, typography, imagery, interaction language, and level of polish. Create a screen that unmistakably belongs to this same ${input.surfaceType === 'web_page' ? 'site' : 'product'} while interpreting the design for its own purpose. Do not turn it into a different brand or a generic template.`,
|
|
148
|
+
`Product purpose: ${input.productPurpose}\nCurrent page purpose: ${input.pagePurpose}`,
|
|
149
|
+
referenceContract(input),
|
|
150
|
+
isWebPage(input) ? webpageLocation(input) : stateLocation(input),
|
|
151
|
+
`${CONTENT_HEADING}\n${naturalContent(input)}`,
|
|
152
|
+
readingLayout ? `${READING_LAYOUT_HEADING}\n${readingLayout}` : null,
|
|
153
|
+
chrome ? `${CHROME_HEADING}\n${chrome}` : null,
|
|
154
|
+
shell ? `${STRUCTURE_HEADING}\n${shell}` : null,
|
|
155
|
+
`${GENERATION_CONTRACT} The complete reference images provide product and continuity context; do not paste, crop, extend, or composite them into the result. Do not reproduce the approved composition. Create new page-specific body imagery and examples. If a subject necessarily recurs, create a genuinely new depiction rather than copying reference pixels.`,
|
|
156
|
+
`Decide how this screen should look. ${returnContract(input.surfaceType)}`,
|
|
157
|
+
].filter((section) => Boolean(section)).join('\n\n');
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* One branch screen's image prompt from the plan and its placement. The
|
|
161
|
+
* reference flags say which images actually arrive with the call, so the
|
|
162
|
+
* dispatcher rebuilds this from the references the gate released.
|
|
163
|
+
*/
|
|
164
|
+
export const branchPromptFor = (plan, placement, references) => buildBranchGenerationPrompt({
|
|
165
|
+
content: placement.content,
|
|
166
|
+
...(placement.slotType ? { slotType: placement.slotType } : {}),
|
|
167
|
+
...(placement.targetWords !== undefined ? { targetWords: placement.targetWords } : {}),
|
|
168
|
+
productPurpose: plan.sitePurpose,
|
|
169
|
+
pagePurpose: placement.pagePurpose,
|
|
170
|
+
pageKind: placement.pageKind,
|
|
171
|
+
pageTitle: placement.pageTitle,
|
|
172
|
+
surfaceType: placement.surfaceType,
|
|
173
|
+
viewportOrdinal: placement.viewportOrdinal,
|
|
174
|
+
lastViewportOrdinal: placement.lastViewportOrdinal,
|
|
175
|
+
pageEndsHere: placement.pageEndsHere,
|
|
176
|
+
header: placement.header,
|
|
177
|
+
footer: placement.footer,
|
|
178
|
+
...references,
|
|
179
|
+
});
|
|
180
|
+
//# sourceMappingURL=branch-prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branch-prompt.js","sourceRoot":"","sources":["../../src/branch-core/branch-prompt.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,sEAAsE;AAuCtE,MAAM,eAAe,GAAG,6BAA6B,CAAC;AACtD,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;AACjD,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAC5C,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAC9C,MAAM,mBAAmB,GAAG,gDAAgD,CAAC;AAE7E,MAAM,SAAS,GAAG,CAAC,KAAkC,EAAW,EAAE,CAAC,KAAK,CAAC,WAAW,KAAK,UAAU,CAAC;AAEpG,MAAM,aAAa,GAAG,CAAC,KAAkC,EAAW,EAAE,CAAC,CACrE,KAAK,CAAC,YAAY,IAAI,KAAK,CA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AM;IACxB,GAAG,UAAU;CACd,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The branch build process as one source: the planner's system text, prompt,
|
|
3
|
+
* schema and deterministic parse; the plan model and its slot cells; the canvas
|
|
4
|
+
* mapping; the dispatch gates; and the per-screen image prompt.
|
|
5
|
+
*
|
|
6
|
+
* Pure and Worker-safe (no node imports; `tsconfig.branch-core.json` proves it).
|
|
7
|
+
* The hosted create route imports it through `@just-every/layerdoc/core`; the
|
|
8
|
+
* CLI, which runs the same process on a person's own Codex, carries a generated,
|
|
9
|
+
* git-ignored copy (`scripts/sync-improve-core.mjs` vendors it beside
|
|
10
|
+
* improve-core). Prompt text lives here and nowhere else.
|
|
11
|
+
*/
|
|
12
|
+
export { BRANCH_PAGE_TYPES, BRANCH_PLAN_SCHEMA_VERSION, BRANCH_SURFACE_TYPES, BRANCH_VIEWPORT_SLOT_TYPES, BUILD_SLOTS, branchContentSlotId, branchPlanCells, type BranchCell, type BranchCellPlacement, type BranchPageType, type BranchPlan, type BranchPlanPage, type BranchPlanViewport, type BranchSurfaceType, type BranchViewportSlotType, type BuildSlot, } from './branch-plan-model.js';
|
|
13
|
+
export { CREATE_ASPECT_SIZES, branchAspectForCanvas, branchCanvasDecision, branchProviderCanvas, parseBranchCanvasDecision, resolveBranchPlanCanvases, type BranchAspect, type BranchCanvas, type BranchCanvasDecision, } from './branch-canvas.js';
|
|
14
|
+
export { BRANCH_PLANNER_SYSTEM_PROMPT, BUILD_PLAN_MODEL, MAX_BRANCH_ADDITIONAL_PAGES, MAX_BRANCH_CELLS, MAX_BRANCH_SOURCE_CONTINUATIONS, MAX_BRANCH_VIEWPORTS, MAX_EDITORIAL_BRANCH_SOURCE_CONTINUATIONS, MIN_BRANCH_ADDITIONAL_PAGES, MIN_BRANCH_VIEWPORTS, branchBriefRequestsLongFormSamePage, branchConceptText, branchPlanParseOptions, branchPlanResponseSchema, branchScreenCap, buildBranchPlannerPrompt, parseBranchPlan, } from './branch-planner.js';
|
|
15
|
+
export { branchPromptFor, buildBranchGenerationPrompt, type BranchGenerationPromptInput, } from './branch-prompt.js';
|
|
16
|
+
export { branchFooterSeedSlot, branchGenerationSourceKeys, evaluateBranchDispatchGate, type BranchCandidateState, type BranchDispatchGate, type BranchReferenceRole, type BranchReferenceSlotInputs, } from './branch-gates.js';
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/branch-core/index.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,OAAO,EACL,iBAAiB,EACjB,0BAA0B,EAC1B,oBAAoB,EACpB,0BAA0B,EAC1B,WAAW,EACX,mBAAmB,EACnB,eAAe,EACf,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,SAAS,GACf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,EACzB,yBAAyB,EACzB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,oBAAoB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,4BAA4B,EAC5B,gBAAgB,EAChB,2BAA2B,EAC3B,gBAAgB,EAChB,+BAA+B,EAC/B,oBAAoB,EACpB,yCAAyC,EACzC,2BAA2B,EAC3B,oBAAoB,EACpB,mCAAmC,EACnC,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACxB,eAAe,EACf,wBAAwB,EACxB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,eAAe,EACf,2BAA2B,EAC3B,KAAK,2BAA2B,GACjC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,0BAA0B,EAC1B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,GAC/B,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// GENERATED — do not edit. Copied verbatim from
|
|
2
|
+
// packages/layerdoc/src/branch-core by scripts/sync-improve-core.mjs.
|
|
3
|
+
/**
|
|
4
|
+
* The branch build process as one source: the planner's system text, prompt,
|
|
5
|
+
* schema and deterministic parse; the plan model and its slot cells; the canvas
|
|
6
|
+
* mapping; the dispatch gates; and the per-screen image prompt.
|
|
7
|
+
*
|
|
8
|
+
* Pure and Worker-safe (no node imports; `tsconfig.branch-core.json` proves it).
|
|
9
|
+
* The hosted create route imports it through `@just-every/layerdoc/core`; the
|
|
10
|
+
* CLI, which runs the same process on a person's own Codex, carries a generated,
|
|
11
|
+
* git-ignored copy (`scripts/sync-improve-core.mjs` vendors it beside
|
|
12
|
+
* improve-core). Prompt text lives here and nowhere else.
|
|
13
|
+
*/
|
|
14
|
+
export { BRANCH_PAGE_TYPES, BRANCH_PLAN_SCHEMA_VERSION, BRANCH_SURFACE_TYPES, BRANCH_VIEWPORT_SLOT_TYPES, BUILD_SLOTS, branchContentSlotId, branchPlanCells, } from './branch-plan-model.js';
|
|
15
|
+
export { CREATE_ASPECT_SIZES, branchAspectForCanvas, branchCanvasDecision, branchProviderCanvas, parseBranchCanvasDecision, resolveBranchPlanCanvases, } from './branch-canvas.js';
|
|
16
|
+
export { BRANCH_PLANNER_SYSTEM_PROMPT, BUILD_PLAN_MODEL, MAX_BRANCH_ADDITIONAL_PAGES, MAX_BRANCH_CELLS, MAX_BRANCH_SOURCE_CONTINUATIONS, MAX_BRANCH_VIEWPORTS, MAX_EDITORIAL_BRANCH_SOURCE_CONTINUATIONS, MIN_BRANCH_ADDITIONAL_PAGES, MIN_BRANCH_VIEWPORTS, branchBriefRequestsLongFormSamePage, branchConceptText, branchPlanParseOptions, branchPlanResponseSchema, branchScreenCap, buildBranchPlannerPrompt, parseBranchPlan, } from './branch-planner.js';
|
|
17
|
+
export { branchPromptFor, buildBranchGenerationPrompt, } from './branch-prompt.js';
|
|
18
|
+
export { branchFooterSeedSlot, branchGenerationSourceKeys, evaluateBranchDispatchGate, } from './branch-gates.js';
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/branch-core/index.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,sEAAsE;AAEtE;;;;;;;;;;GAUG;AACH,OAAO,EACL,iBAAiB,EACjB,0BAA0B,EAC1B,oBAAoB,EACpB,0BAA0B,EAC1B,WAAW,EACX,mBAAmB,EACnB,eAAe,GAUhB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,EACzB,yBAAyB,GAI1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,4BAA4B,EAC5B,gBAAgB,EAChB,2BAA2B,EAC3B,gBAAgB,EAChB,+BAA+B,EAC/B,oBAAoB,EACpB,yCAAyC,EACzC,2BAA2B,EAC3B,oBAAoB,EACpB,mCAAmC,EACnC,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACxB,eAAe,EACf,wBAAwB,EACxB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,eAAe,EACf,2BAA2B,GAE5B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,0BAA0B,GAK3B,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type BranchRunClient } from './branch-client.js';
|
|
2
2
|
import { type BranchNormalizedPlan } from './branch-plan.js';
|
|
3
3
|
/**
|
|
4
4
|
* The dispatch driver: the scheduler decides WHICH screens may run, this decides
|
|
@@ -68,7 +68,7 @@ export type BranchDispatchTuning = {
|
|
|
68
68
|
timeoutMs?: number;
|
|
69
69
|
};
|
|
70
70
|
export declare const runBranchDispatch: (args: {
|
|
71
|
-
client:
|
|
71
|
+
client: BranchRunClient;
|
|
72
72
|
plan: BranchNormalizedPlan;
|
|
73
73
|
onEvent?: (event: BranchDispatchEvent) => void;
|
|
74
74
|
/** Called on every loop turn, changed or not, so a poller always sees motion. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branch-dispatch-loop.d.ts","sourceRoot":"","sources":["../src/branch-dispatch-loop.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,KAAK,
|
|
1
|
+
{"version":3,"file":"branch-dispatch-loop.d.ts","sourceRoot":"","sources":["../src/branch-dispatch-loop.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAO1E,OAAO,EAAuB,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAElF;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,uBAAuB,OAAQ,CAAC;AAC7C,eAAO,MAAM,uBAAuB,OAAQ,CAAC;AAC7C,eAAO,MAAM,sBAAsB,OAAQ,CAAC;AAC5C,kFAAkF;AAClF,eAAO,MAAM,qBAAqB,QAAc,CAAC;AAuBjD,MAAM,MAAM,mBAAmB,GAC3B;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACpC;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC/D;IAAE,IAAI,EAAE,MAAM,CAAC;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AE,oBAAoB,CAAC;IAC3B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC/C,iFAAiF;IACjF,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,sBAAsB,KAAK,IAAI,CAAC;IACxD,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,KAAG,OAAO,CAAC,oBAAoB,CA+O/B,CAAC"}
|
|
@@ -33,6 +33,10 @@ const TERMINAL_CODES = new Set([
|
|
|
33
33
|
// identically forever, so holding the slot would spin. Stop the run.
|
|
34
34
|
'idempotency_key_required',
|
|
35
35
|
'run_state_invalid',
|
|
36
|
+
// The local engine only (branch-local-client.ts): the person's Codex stopped
|
|
37
|
+
// being able to draw (signed out, binary gone, stopped by a signal). Every
|
|
38
|
+
// other screen would fail the same way, so the run stops; it stays resumable.
|
|
39
|
+
'codex_unavailable',
|
|
36
40
|
]);
|
|
37
41
|
const scheduleView = (plan) => (plan.screens.map((screen) => ({
|
|
38
42
|
slot: screen.slot,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branch-dispatch-loop.js","sourceRoot":"","sources":["../src/branch-dispatch-loop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAA6B,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,gBAAgB,GAEjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,mBAAm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hidden staging directory and moved into
|
|
4
4
|
* `screens/` in one pass once the run is terminal, exactly as
|
|
@@ -38,7 +38,7 @@ export declare const stageBranchScreenBytes: (args: {
|
|
|
38
38
|
*/
|
|
39
39
|
export declare const readBranchScreenBytes: (screen: BranchDownloadedScreen) => Promise<Uint8Array>;
|
|
40
40
|
export declare const stageBranchScreen: (args: {
|
|
41
|
-
client:
|
|
41
|
+
client: BranchRunClient;
|
|
42
42
|
runId: string;
|
|
43
43
|
slot: string;
|
|
44
44
|
screensDirectory: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branch-downloads.d.ts","sourceRoot":"","sources":["../src/branch-downloads.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"branch-downloads.d.ts","sourceRoot":"","sources":["../src/branch-downloads.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAG1D;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,6BAA6B,yBAAyB,CAAC;AAEpE,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,kBAAkB,MAAM,EAAE,MAAM,MAAM,KAAG,MAEzE,CAAC;AAgBF,+EAA+E;AAC/E,eAAO,MAAM,sBAAsB,GACjC,kBAAkB,MAAM,EACxB,MAAM,MAAM,KACX,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAiBvC,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAU,MAAM;IACjD,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,UAAU,CAAC;CACnB,KAAG,OAAO,CAAC,sBAAsB,CAcjC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,GAChC,QAAQ,sBAAsB,KAC7B,OAAO,CAAC,UAAU,CASpB,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAU,MAAM;IAC5C,MAAM,EAAE,eAAe,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,KAAG,OAAO,CAAC,sBAAsB,CAOjC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GACnC,kBAAkB,MAAM,EACxB,OAAO,SAAS,MAAM,EAAE,KACvB,OAAO,CAAC,IAAI,CAgBd,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { OPTION_FAILURES } from './workspace-draw-messages.js';
|
|
2
|
+
import type { ReadinessProbe } from './workspace-draw-engine.js';
|
|
3
|
+
/**
|
|
4
|
+
* THE engine policy for Branch, one module for the CLI and both workspaces
|
|
5
|
+
* (owner decision, 2026-10-03): a branch runs on the person's own Codex
|
|
6
|
+
* whenever Codex can run it — signed in to 12ui or not — and on the hosted
|
|
7
|
+
* branch service only when Codex cannot and a 12ui sign-in exists. With
|
|
8
|
+
* neither, a workspace request fails with `draw_branch_signin` and starts
|
|
9
|
+
* nothing.
|
|
10
|
+
*
|
|
11
|
+
* Codex can run a branch when the draw readiness probe passes (binary, ChatGPT
|
|
12
|
+
* sign-in, flags, image generation) AND the home's model cache lists the
|
|
13
|
+
* planner's model (gpt-6.1-sol) at low effort. A saved run keeps the engine it
|
|
14
|
+
* started on; `--engine codex|api` forces a side.
|
|
15
|
+
*/
|
|
16
|
+
export type BranchEngine = 'codex' | 'api';
|
|
17
|
+
export type BranchEngineRequest = 'auto' | BranchEngine;
|
|
18
|
+
export type BranchEngineChoice = {
|
|
19
|
+
engine: BranchEngine;
|
|
20
|
+
reason: string;
|
|
21
|
+
};
|
|
22
|
+
export type BranchCodexReadiness = {
|
|
23
|
+
ready: boolean;
|
|
24
|
+
reason: string;
|
|
25
|
+
};
|
|
26
|
+
/** `--engine` is strict; `TWELVE_UI_ENGINE` counts when it names auto, codex or api. */
|
|
27
|
+
export declare const parseBranchEngineRequest: (flag: string | undefined, env: NodeJS.ProcessEnv) => BranchEngineRequest;
|
|
28
|
+
/** Whether a Codex home's model cache lists `model` at `effort`. */
|
|
29
|
+
export declare const codexHomeListsModel: (home: string, model: string, effort: string) => Promise<boolean>;
|
|
30
|
+
export declare const branchCodexReadiness: (args: {
|
|
31
|
+
env: NodeJS.ProcessEnv;
|
|
32
|
+
probe?: ReadinessProbe;
|
|
33
|
+
}) => Promise<BranchCodexReadiness>;
|
|
34
|
+
/** `12ui branch execute` / `resume`: which side draws this run. Refusals name the way in and buy nothing. */
|
|
35
|
+
export declare const chooseBranchEngine: (args: {
|
|
36
|
+
requested: BranchEngineRequest;
|
|
37
|
+
/** The engine a saved attempt started on (attempts recorded before engines existed are hosted). */
|
|
38
|
+
saved?: BranchEngine;
|
|
39
|
+
winner: "image" | "run";
|
|
40
|
+
env: NodeJS.ProcessEnv;
|
|
41
|
+
probe?: ReadinessProbe;
|
|
42
|
+
}) => Promise<BranchEngineChoice>;
|
|
43
|
+
export type WorkspaceBranchDecision = {
|
|
44
|
+
ok: true;
|
|
45
|
+
engine: BranchEngine;
|
|
46
|
+
reason: string;
|
|
47
|
+
} | {
|
|
48
|
+
ok: false;
|
|
49
|
+
failure: typeof OPTION_FAILURES.branchSignin;
|
|
50
|
+
reason: string;
|
|
51
|
+
};
|
|
52
|
+
/** A workspace's Branch request (hosted Design workspace or the local plugin's runner). */
|
|
53
|
+
export declare const workspaceBranchEngine: (args: {
|
|
54
|
+
codex: () => Promise<BranchCodexReadiness>;
|
|
55
|
+
signedIn: () => boolean;
|
|
56
|
+
}) => Promise<WorkspaceBranchDecision>;
|
|
57
|
+
/** A credential file this CLI cannot read is no sign-in either: `12ui auth login` writes a fresh one. */
|
|
58
|
+
export declare const hasTwelveUiSignIn: () => boolean;
|
|
59
|
+
/** The real decision for a workspace on this computer: its Codex, else its 12ui sign-in. */
|
|
60
|
+
export declare const defaultWorkspaceBranchEngine: (env: NodeJS.ProcessEnv, probe?: ReadinessProbe) => () => Promise<WorkspaceBranchDecision>;
|
|
61
|
+
//# sourceMappingURL=branch-engine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branch-engine.d.ts","sourceRoot":"","sources":["../src/branch-engine.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,KAAK,CAAC;AAC3C,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,YAAY,CAAC;AACxD,MAAM,MAAM,kBAAkB,GAAG;IAAE,MAAM,EAAE,YAAY,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAC1E,MAAM,MAAM,oBAAoB,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAItE,wFAAwF;AACxF,eAAO,MAAM,wBAAwB,GAAI,MAAM,MAAM,GAAG,SAAS,EAAE,KAAK,MAAM,CAAC,UAAU,KAAG,mBAQ3F,CAAC;AAEF,oEAAoE;AACpE,eAAO,MAAM,mBAAmB,GAAU,MAAM,MAAM,EAAE,OAAO,MAAM,EAAE,QAAQ,MAAM,KAAG,OAAO,CAAC,OAAO,CAStG,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAU,MAAM;IAAE,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IAAC,KAAK,CAAC,EAAE,cAAc,CAAA;CAAE,KAAG,OAAO,CAAC,oBAAoB,CAWjI,CAAC;AAEF,6GAA6G;AAC7G,eAAO,MAAM,kBAAkB,GAAU,MAAM;IAC7C,SAAS,EAAE,mBAAmB,CAAC;IAC/B,mGAAmG;IACnG,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,MAAM,EAAE,OAAO,GAAG,KAAK,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IACvB,KAAK,CAAC,EAAE,cAAc,CAAC;CACxB,KAAG,OAAO,CAAC,kBAAkB,CAkB7B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAC/B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,YAAY,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAClD;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,OAAO,eAAe,CAAC,YAAY,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhF,2FAA2F;AAC3F,eAAO,MAAM,qBAAqB,GAAU,MAAM;IAChD,KAAK,EAAE,MAAM,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC3C,QAAQ,EAAE,MAAM,OAAO,CAAC;CACzB,KAAG,OAAO,CAAC,uBAAuB,CAKlC,CAAC;AAEF,yGAAyG;AACzG,eAAO,MAAM,iBAAiB,QAAO,OAMpC,CAAC;AAEF,4FAA4F;AAC5F,eAAO,MAAM,4BAA4B,GAAI,KAAK,MAAM,CAAC,UAAU,EAAE,QAAQ,cAAc,KAAG,MAAM,OAAO,CAAC,uBAAuB,CAKlI,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { BUILD_PLAN_MODEL } from './branch-core/index.js';
|
|
4
|
+
import { BRANCH_PLAN_EFFORT } from './branch-local-plan.js';
|
|
5
|
+
import { probeCodexReadiness } from './cli-codex-readiness.js';
|
|
6
|
+
import { CliRefusal } from './cli-refusal.js';
|
|
7
|
+
import { hasConfiguredConversionCredential } from './config.js';
|
|
8
|
+
import { locateCodexBinary, NO_CODEX_BINARY_REASON } from './codex-binary.js';
|
|
9
|
+
import { OPTION_FAILURES } from './workspace-draw-messages.js';
|
|
10
|
+
const isRequest = (value) => value === 'auto' || value === 'codex' || value === 'api';
|
|
11
|
+
/** `--engine` is strict; `TWELVE_UI_ENGINE` counts when it names auto, codex or api. */
|
|
12
|
+
export const parseBranchEngineRequest = (flag, env) => {
|
|
13
|
+
if (flag !== undefined) {
|
|
14
|
+
const value = flag.trim();
|
|
15
|
+
if (!isRequest(value))
|
|
16
|
+
throw new CliRefusal('--engine must be auto, codex, or api', 'engine_invalid');
|
|
17
|
+
return value;
|
|
18
|
+
}
|
|
19
|
+
const fromEnv = env.TWELVE_UI_ENGINE?.trim() ?? '';
|
|
20
|
+
return isRequest(fromEnv) ? fromEnv : 'auto';
|
|
21
|
+
};
|
|
22
|
+
/** Whether a Codex home's model cache lists `model` at `effort`. */
|
|
23
|
+
export const codexHomeListsModel = async (home, model, effort) => {
|
|
24
|
+
try {
|
|
25
|
+
const cache = JSON.parse(await readFile(path.join(home, 'models_cache.json'), 'utf8'));
|
|
26
|
+
return Array.isArray(cache.models) && cache.models.some((entry) => entry?.slug === model
|
|
27
|
+
&& Array.isArray(entry.supported_reasoning_levels)
|
|
28
|
+
&& entry.supported_reasoning_levels.some((level) => level?.effort === effort));
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
export const branchCodexReadiness = async (args) => {
|
|
35
|
+
if (!args.probe && !locateCodexBinary(args.env))
|
|
36
|
+
return { ready: false, reason: NO_CODEX_BINARY_REASON };
|
|
37
|
+
const readiness = await (args.probe ?? ((options) => probeCodexReadiness(options)))({ env: args.env });
|
|
38
|
+
if (!readiness.ready)
|
|
39
|
+
return { ready: false, reason: readiness.reason };
|
|
40
|
+
if (!(await codexHomeListsModel(readiness.codexHome, BUILD_PLAN_MODEL, BRANCH_PLAN_EFFORT))) {
|
|
41
|
+
return {
|
|
42
|
+
ready: false,
|
|
43
|
+
reason: `The Codex model cache in ${readiness.codexHome} does not list ${BUILD_PLAN_MODEL} with ${BRANCH_PLAN_EFFORT} reasoning, which plans a branch. Open Codex once to refresh it.`,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
return { ready: true, reason: `Codex ${readiness.version ?? ''} signed in with ChatGPT in ${readiness.codexHome}`.replace(/\s+/gu, ' ') };
|
|
47
|
+
};
|
|
48
|
+
/** `12ui branch execute` / `resume`: which side draws this run. Refusals name the way in and buy nothing. */
|
|
49
|
+
export const chooseBranchEngine = async (args) => {
|
|
50
|
+
if (args.saved) {
|
|
51
|
+
if (args.requested !== 'auto' && args.requested !== args.saved) {
|
|
52
|
+
throw new CliRefusal(`This saved branch run draws on ${args.saved}; resume it with --engine ${args.saved} or without --engine.`, 'engine_conflict');
|
|
53
|
+
}
|
|
54
|
+
return { engine: args.saved, reason: 'saved branch run' };
|
|
55
|
+
}
|
|
56
|
+
if (args.requested === 'api')
|
|
57
|
+
return { engine: 'api', reason: 'explicit selection' };
|
|
58
|
+
if (args.winner === 'run') {
|
|
59
|
+
if (args.requested === 'codex') {
|
|
60
|
+
throw new CliRefusal('A branch from a hosted draft run reads its approved design from 12ui. Start from the image itself (--start <image.png>) to branch on Codex.', 'engine_unsupported');
|
|
61
|
+
}
|
|
62
|
+
return { engine: 'api', reason: 'the approved design is a hosted draft run' };
|
|
63
|
+
}
|
|
64
|
+
const readiness = await branchCodexReadiness({ env: args.env, ...(args.probe ? { probe: args.probe } : {}) });
|
|
65
|
+
if (readiness.ready)
|
|
66
|
+
return { engine: 'codex', reason: readiness.reason };
|
|
67
|
+
if (args.requested === 'codex')
|
|
68
|
+
throw new CliRefusal(readiness.reason, 'codex_unavailable');
|
|
69
|
+
return { engine: 'api', reason: readiness.reason };
|
|
70
|
+
};
|
|
71
|
+
/** A workspace's Branch request (hosted Design workspace or the local plugin's runner). */
|
|
72
|
+
export const workspaceBranchEngine = async (args) => {
|
|
73
|
+
const codex = await args.codex();
|
|
74
|
+
if (codex.ready)
|
|
75
|
+
return { ok: true, engine: 'codex', reason: codex.reason };
|
|
76
|
+
if (args.signedIn())
|
|
77
|
+
return { ok: true, engine: 'api', reason: `12ui sign-in; ${codex.reason}` };
|
|
78
|
+
return { ok: false, failure: OPTION_FAILURES.branchSignin, reason: codex.reason };
|
|
79
|
+
};
|
|
80
|
+
/** A credential file this CLI cannot read is no sign-in either: `12ui auth login` writes a fresh one. */
|
|
81
|
+
export const hasTwelveUiSignIn = () => {
|
|
82
|
+
try {
|
|
83
|
+
return hasConfiguredConversionCredential();
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
/** The real decision for a workspace on this computer: its Codex, else its 12ui sign-in. */
|
|
90
|
+
export const defaultWorkspaceBranchEngine = (env, probe) => (() => workspaceBranchEngine({
|
|
91
|
+
codex: () => branchCodexReadiness({ env, ...(probe ? { probe } : {}) }),
|
|
92
|
+
signedIn: hasTwelveUiSignIn,
|
|
93
|
+
}));
|
|
94
|
+
//# sourceMappingURL=branch-engine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branch-engine.js","sourceRoot":"","sources":["../src/branch-engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,k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,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IACvE,QAAQ,EAAE,iBAAiB;CAC5B,CAAC,CACH,CAAC"}
|
|
@@ -37,6 +37,11 @@ export type BranchExecutionInputs = {
|
|
|
37
37
|
/** Apply the opt-in deterministic polish stage before prototype runtime gates. */
|
|
38
38
|
polish?: true;
|
|
39
39
|
idempotencyKey?: string;
|
|
40
|
+
/** Which side draws the screens: the person's own Codex, or the hosted branch service. Absent means hosted. */
|
|
41
|
+
generation?: {
|
|
42
|
+
engine: 'codex' | 'api';
|
|
43
|
+
reason: string;
|
|
44
|
+
};
|
|
40
45
|
};
|
|
41
46
|
export type BranchExecutionEvent = BranchDispatchEvent | {
|
|
42
47
|
kind: 'phase';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branch-execution-types.d.ts","sourceRoot":"","sources":["../src/branch-execution-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAEpE;;;;GAIG;AAEH,MAAM,MAAM,iBAAiB,GACzB;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC5C;IACA,IAAI,EAAE,OAAO,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CAAC;IAAC,QAAQ,EAAE,oBAAoB,CAAA;CAAE,CAAC;AAExE,MAAM,MAAM,qBAAqB,GAAG;IAClC,UAAU,EAAE,gBAAgB,CAAC;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,+EAA+E;IAC/E,OAAO,EAAE,KAAK,GAAG,IAAI,CAAC;CACvB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type BranchRunClient } from './branch-client.js';
|
|
2
2
|
import { type BranchNormalizedPlan } from './branch-plan.js';
|
|
3
3
|
import { type BranchDispatchTuning } from './branch-dispatch-loop.js';
|
|
4
4
|
import type { TwelveUiConversionPackageClient } from './package-client.js';
|
|
@@ -25,7 +25,7 @@ export type { BranchExecutionEvent, BranchExecutionInputs, BranchExecutionResult
|
|
|
25
25
|
export declare const describeBranchPlan: (plan: BranchNormalizedPlan) => string;
|
|
26
26
|
export declare const deriveBranchRunKey: (inputs: BranchExecutionInputs) => string;
|
|
27
27
|
export declare const executeBranchRun: (args: {
|
|
28
|
-
branchClient:
|
|
28
|
+
branchClient: BranchRunClient;
|
|
29
29
|
packageClient?: TwelveUiConversionPackageClient;
|
|
30
30
|
inputs: BranchExecutionInputs;
|
|
31
31
|
origin: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branch-execution.d.ts","sourceRoot":"","sources":["../src/branch-execution.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,
|
|
1
|
+
{"version":3,"file":"branch-execution.d.ts","sourceRoot":"","sources":["../src/branch-execution.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,oBAAoB,CAAC;AAwB5B,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,kBAAkB,CAAC;AAU1B,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,2BAA2B,CAAC;AAgBnC,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC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