@12ui/design 0.2.91 → 0.2.93
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 +16 -0
- package/dist/branch-client.d.ts.map +1 -1
- package/dist/branch-client.js +1 -0
- package/dist/branch-client.js.map +1 -1
- package/dist/branch-completion.d.ts +2 -0
- package/dist/branch-completion.d.ts.map +1 -1
- package/dist/branch-completion.js +1 -1
- package/dist/branch-completion.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 +92 -0
- package/dist/branch-core/branch-planner.d.ts.map +1 -0
- package/dist/branch-core/branch-planner.js +483 -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/branch-scope.d.ts +73 -0
- package/dist/branch-core/branch-scope.d.ts.map +1 -0
- package/dist/branch-core/branch-scope.js +88 -0
- package/dist/branch-core/branch-scope.js.map +1 -0
- package/dist/branch-core/index.d.ts +18 -0
- package/dist/branch-core/index.d.ts.map +1 -0
- package/dist/branch-core/index.js +20 -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 +16 -3
- package/dist/branch-execution.d.ts.map +1 -1
- package/dist/branch-execution.js +83 -17
- package/dist/branch-execution.js.map +1 -1
- package/dist/branch-identity.d.ts +22 -1
- package/dist/branch-identity.d.ts.map +1 -1
- package/dist/branch-identity.js +23 -4
- package/dist/branch-identity.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 +478 -0
- package/dist/branch-local-client.js.map +1 -0
- package/dist/branch-local-plan.d.ts +67 -0
- package/dist/branch-local-plan.d.ts.map +1 -0
- package/dist/branch-local-plan.js +282 -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-page-conversion.js +1 -1
- package/dist/branch-page-conversion.js.map +1 -1
- package/dist/branch-page-rollover.js +2 -2
- package/dist/branch-page-rollover.js.map +1 -1
- package/dist/branch-plan.d.ts +9 -0
- package/dist/branch-plan.d.ts.map +1 -1
- package/dist/branch-plan.js +3 -0
- package/dist/branch-plan.js.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-outcome.d.ts +24 -0
- package/dist/branch-run-outcome.d.ts.map +1 -0
- package/dist/branch-run-outcome.js +31 -0
- package/dist/branch-run-outcome.js.map +1 -0
- package/dist/branch-run-record.d.ts +21 -0
- package/dist/branch-run-record.d.ts.map +1 -1
- package/dist/branch-run-record.js.map +1 -1
- package/dist/branch-run-supersede.d.ts +41 -0
- package/dist/branch-run-supersede.d.ts.map +1 -0
- package/dist/branch-run-supersede.js +64 -0
- package/dist/branch-run-supersede.js.map +1 -0
- package/dist/branch-schedule.d.ts +1 -1
- package/dist/branch-schedule.js +1 -1
- package/dist/cli-arguments.d.ts.map +1 -1
- package/dist/cli-arguments.js +1 -0
- package/dist/cli-arguments.js.map +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 +74 -17
- package/dist/cli-branch-command.js.map +1 -1
- package/dist/cli-help/design.d.ts +2 -2
- package/dist/cli-help/design.d.ts.map +1 -1
- package/dist/cli-help/design.js +3 -1
- package/dist/cli-help/design.js.map +1 -1
- package/dist/cli-help/index.d.ts +2 -2
- 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/mcp-slate-ui-copy.d.ts +16 -6
- package/dist/mcp-slate-ui-copy.d.ts.map +1 -1
- package/dist/mcp-slate-ui-copy.js +11 -4
- package/dist/mcp-slate-ui-copy.js.map +1 -1
- package/dist/mcp-slate-ui-locales/de-DE.d.ts.map +1 -1
- package/dist/mcp-slate-ui-locales/de-DE.js +8 -3
- package/dist/mcp-slate-ui-locales/de-DE.js.map +1 -1
- package/dist/mcp-slate-ui-locales/es-419.d.ts.map +1 -1
- package/dist/mcp-slate-ui-locales/es-419.js +8 -3
- package/dist/mcp-slate-ui-locales/es-419.js.map +1 -1
- package/dist/mcp-slate-ui-locales/es-ES.d.ts.map +1 -1
- package/dist/mcp-slate-ui-locales/es-ES.js +8 -3
- package/dist/mcp-slate-ui-locales/es-ES.js.map +1 -1
- package/dist/mcp-slate-ui-locales/fr-FR.d.ts.map +1 -1
- package/dist/mcp-slate-ui-locales/fr-FR.js +8 -3
- package/dist/mcp-slate-ui-locales/fr-FR.js.map +1 -1
- package/dist/mcp-slate-ui-locales/hi-IN.d.ts.map +1 -1
- package/dist/mcp-slate-ui-locales/hi-IN.js +8 -3
- package/dist/mcp-slate-ui-locales/hi-IN.js.map +1 -1
- package/dist/mcp-slate-ui-locales/it-IT.d.ts.map +1 -1
- package/dist/mcp-slate-ui-locales/it-IT.js +7 -2
- package/dist/mcp-slate-ui-locales/it-IT.js.map +1 -1
- package/dist/mcp-slate-ui-locales/ja-JP.d.ts.map +1 -1
- package/dist/mcp-slate-ui-locales/ja-JP.js +7 -2
- package/dist/mcp-slate-ui-locales/ja-JP.js.map +1 -1
- package/dist/mcp-slate-ui-locales/ko-KR.d.ts.map +1 -1
- package/dist/mcp-slate-ui-locales/ko-KR.js +8 -3
- package/dist/mcp-slate-ui-locales/ko-KR.js.map +1 -1
- package/dist/mcp-slate-ui-locales/pt-BR.d.ts.map +1 -1
- package/dist/mcp-slate-ui-locales/pt-BR.js +8 -3
- package/dist/mcp-slate-ui-locales/pt-BR.js.map +1 -1
- package/dist/mcp-slate-ui-locales/zh-CN.d.ts.map +1 -1
- package/dist/mcp-slate-ui-locales/zh-CN.js +8 -3
- package/dist/mcp-slate-ui-locales/zh-CN.js.map +1 -1
- package/dist/mcp-slate-ui-locales/zh-TW.d.ts.map +1 -1
- package/dist/mcp-slate-ui-locales/zh-TW.js +8 -3
- package/dist/mcp-slate-ui-locales/zh-TW.js.map +1 -1
- package/dist/mcp-slate-ui-script-designs.d.ts.map +1 -1
- package/dist/mcp-slate-ui-script-designs.js +25 -4
- package/dist/mcp-slate-ui-script-designs.js.map +1 -1
- package/dist/mcp-slate-ui-script-remote.js +2 -2
- package/dist/mcp-slate-ui-script-viewer.d.ts +4 -3
- package/dist/mcp-slate-ui-script-viewer.d.ts.map +1 -1
- package/dist/mcp-slate-ui-script-viewer.js +13 -4
- package/dist/mcp-slate-ui-script-viewer.js.map +1 -1
- package/dist/mcp-slate-ui-styles-designs.d.ts.map +1 -1
- package/dist/mcp-slate-ui-styles-designs.js +7 -0
- package/dist/mcp-slate-ui-styles-designs.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 +40 -7
- 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-retry.d.ts +2 -1
- package/dist/slate-retry.d.ts.map +1 -1
- package/dist/slate-retry.js +32 -0
- package/dist/slate-retry.js.map +1 -1
- package/dist/slate-run-action.js +9 -4
- package/dist/slate-run-action.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/slate-view-contract.d.ts +9 -1
- package/dist/slate-view-contract.d.ts.map +1 -1
- package/dist/slate-view-contract.js +3 -1
- package/dist/slate-view-contract.js.map +1 -1
- package/dist/slate-view.d.ts.map +1 -1
- package/dist/slate-view.js +1 -0
- package/dist/slate-view.js.map +1 -1
- package/dist/slate-workspace-parse.d.ts.map +1 -1
- package/dist/slate-workspace-parse.js +4 -0
- package/dist/slate-workspace-parse.js.map +1 -1
- package/dist/slate-workspace-types.d.ts +8 -0
- package/dist/slate-workspace-types.d.ts.map +1 -1
- package/dist/workspace-draw-branch.d.ts +7 -3
- package/dist/workspace-draw-branch.d.ts.map +1 -1
- package/dist/workspace-draw-branch.js +42 -27
- package/dist/workspace-draw-branch.js.map +1 -1
- package/dist/workspace-draw-client.d.ts +1 -0
- package/dist/workspace-draw-client.d.ts.map +1 -1
- package/dist/workspace-draw-client.js +6 -3
- package/dist/workspace-draw-client.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-messages.d.ts +13 -0
- package/dist/workspace-draw-messages.d.ts.map +1 -1
- package/dist/workspace-draw-messages.js +17 -0
- package/dist/workspace-draw-messages.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/dist/workspace-draw-types.d.ts +1 -0
- package/dist/workspace-draw-types.d.ts.map +1 -1
- package/dist/workspace-draw-types.js +2 -0
- package/dist/workspace-draw-types.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,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A local branch call whose `codex exec` child was spawned but whose process group never reached a record: the
|
|
3
|
+
* `branch execute` that dispatched it died between the spawn and the write (a screen's `onSpawn` into run.json, the
|
|
4
|
+
* planner's `persistMetadata` into the call's state). The child leads its own process group and runs on, but the
|
|
5
|
+
* resume has no group to wait on, so without this it would settle the call at once: a screen whose session is still
|
|
6
|
+
* being drawn finds nothing and fails for good, and a planner whose answer is moments away tells the person to start
|
|
7
|
+
* over, while the orphan's paid answer lands afterwards.
|
|
8
|
+
*
|
|
9
|
+
* Such a call is treated as possibly running. Its spawn time is the `startedAt` of its `invocation.json` (written as
|
|
10
|
+
* the last step before the spawn: a call without one was never spawned and is not waited for). The resume polls the
|
|
11
|
+
* call's own proof of completion (`finished`: the screen's session in the Codex home, the planner's answer file) until
|
|
12
|
+
* it shows, or until the window a call is allowed (`startedAt` + the call's timeout + the executor's stop grace)
|
|
13
|
+
* closes, and only then settles the call by the store's rule as before. Each wait is recorded in the call's folder
|
|
14
|
+
* (`call-wait.json`: `waiting` while it runs, then how it ended).
|
|
15
|
+
*/
|
|
16
|
+
export declare const CALL_WAIT_FILE = "call-wait.json";
|
|
17
|
+
/** The executor stops a call at its timeout with SIGTERM and SIGKILLs it 5 s later; the window allows that too. */
|
|
18
|
+
export declare const CALL_STOP_GRACE_MS = 5000;
|
|
19
|
+
export type CallWait = {
|
|
20
|
+
callId: string;
|
|
21
|
+
/** From the call's spawn to the end of the window it is allowed. */
|
|
22
|
+
window: {
|
|
23
|
+
from: string;
|
|
24
|
+
until: string;
|
|
25
|
+
};
|
|
26
|
+
waitStartedAt: string;
|
|
27
|
+
/** `finished`: the call's completion showed; `window-elapsed`: it never did inside the window. */
|
|
28
|
+
outcome: 'waiting' | 'finished' | 'window-elapsed';
|
|
29
|
+
/** What showed the call finished. */
|
|
30
|
+
signal?: string;
|
|
31
|
+
waitEndedAt?: string;
|
|
32
|
+
};
|
|
33
|
+
export type UnrecordedCallWait = {
|
|
34
|
+
callDir: string;
|
|
35
|
+
/** The call's timeout: how long its executor lets it run. */
|
|
36
|
+
timeoutMs: number;
|
|
37
|
+
/** The call's own proof that it finished (what showed it), or null while it may still be running. */
|
|
38
|
+
finished: (context: {
|
|
39
|
+
startedAt: string;
|
|
40
|
+
}) => Promise<string | null>;
|
|
41
|
+
pollMs?: number;
|
|
42
|
+
now?: () => number;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Waits for a dispatched call that has no recorded process group. Null when there is nothing to wait for: no call,
|
|
46
|
+
* one already settled or never dispatched, one whose dispatching process saw it end (`completion.json`), or one never
|
|
47
|
+
* spawned (no `invocation.json`).
|
|
48
|
+
*/
|
|
49
|
+
export declare const waitForUnrecordedCall: (options: UnrecordedCallWait) => Promise<CallWait | null>;
|
|
50
|
+
/**
|
|
51
|
+
* The proof a screen's image call finished: its session in the call's Codex home (by the thread id its events
|
|
52
|
+
* announced, else found by the call's own inputs, as the adoption finds it) records the generation's end or the
|
|
53
|
+
* turn's end.
|
|
54
|
+
*/
|
|
55
|
+
export declare const imageCallFinished: (callDir: string) => ({ startedAt }: {
|
|
56
|
+
startedAt: string;
|
|
57
|
+
}) => Promise<string | null>;
|
|
58
|
+
//# sourceMappingURL=branch-local-call-wait.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branch-local-call-wait.d.ts","sourceRoot":"","sources":["../src/branch-local-call-wait.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAC/C,mHAAmH;AACnH,eAAO,MAAM,kBAAkB,OAAQ,CAAC;AAGxC,MAAM,MAAM,QAAQ,GAAG;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,aAAa,EAAE,MAAM,CAAC;IACtB,kGAAkG;IAClG,OAAO,EAAE,SAAS,GAAG,UAAU,GAAG,gBAAgB,CAAC;IACnD,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAgBF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,SAAS,EAAE,MAAM,CAAC;IAClB,qGAAqG;IACrG,QAAQ,EAAE,CAAC,OAAO,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAU,SAAS,kBAAkB,KAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAyBhG,CAAC;AAsCF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,SAAS,MAAM,MAAY,eAAe;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,KAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAaxH,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { readFile, writeFile } from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
4
|
+
import { unannouncedSessionFiles } from './branch-local-session-adoption.js';
|
|
5
|
+
/**
|
|
6
|
+
* A local branch call whose `codex exec` child was spawned but whose process group never reached a record: the
|
|
7
|
+
* `branch execute` that dispatched it died between the spawn and the write (a screen's `onSpawn` into run.json, the
|
|
8
|
+
* planner's `persistMetadata` into the call's state). The child leads its own process group and runs on, but the
|
|
9
|
+
* resume has no group to wait on, so without this it would settle the call at once: a screen whose session is still
|
|
10
|
+
* being drawn finds nothing and fails for good, and a planner whose answer is moments away tells the person to start
|
|
11
|
+
* over, while the orphan's paid answer lands afterwards.
|
|
12
|
+
*
|
|
13
|
+
* Such a call is treated as possibly running. Its spawn time is the `startedAt` of its `invocation.json` (written as
|
|
14
|
+
* the last step before the spawn: a call without one was never spawned and is not waited for). The resume polls the
|
|
15
|
+
* call's own proof of completion (`finished`: the screen's session in the Codex home, the planner's answer file) until
|
|
16
|
+
* it shows, or until the window a call is allowed (`startedAt` + the call's timeout + the executor's stop grace)
|
|
17
|
+
* closes, and only then settles the call by the store's rule as before. Each wait is recorded in the call's folder
|
|
18
|
+
* (`call-wait.json`: `waiting` while it runs, then how it ended).
|
|
19
|
+
*/
|
|
20
|
+
export const CALL_WAIT_FILE = 'call-wait.json';
|
|
21
|
+
/** The executor stops a call at its timeout with SIGTERM and SIGKILLs it 5 s later; the window allows that too. */
|
|
22
|
+
export const CALL_STOP_GRACE_MS = 5_000;
|
|
23
|
+
const POLL_MS = 1_000;
|
|
24
|
+
const readJson = async (file) => {
|
|
25
|
+
try {
|
|
26
|
+
return JSON.parse(await readFile(file, 'utf8'));
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
if (error.code === 'ENOENT')
|
|
30
|
+
return null;
|
|
31
|
+
throw error;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const record = async (callDir, wait) => {
|
|
35
|
+
await writeFile(path.join(callDir, CALL_WAIT_FILE), `${JSON.stringify(wait, null, 2)}\n`, { mode: 0o600 });
|
|
36
|
+
return wait;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Waits for a dispatched call that has no recorded process group. Null when there is nothing to wait for: no call,
|
|
40
|
+
* one already settled or never dispatched, one whose dispatching process saw it end (`completion.json`), or one never
|
|
41
|
+
* spawned (no `invocation.json`).
|
|
42
|
+
*/
|
|
43
|
+
export const waitForUnrecordedCall = async (options) => {
|
|
44
|
+
const now = options.now ?? Date.now;
|
|
45
|
+
const { callDir } = options;
|
|
46
|
+
const state = await readJson(path.join(callDir, 'state.json'));
|
|
47
|
+
if (state?.status !== 'dispatched')
|
|
48
|
+
return null;
|
|
49
|
+
if (await readJson(path.join(callDir, 'completion.json')))
|
|
50
|
+
return null;
|
|
51
|
+
const startedAt = (await readJson(path.join(callDir, 'invocation.json')))?.startedAt;
|
|
52
|
+
const from = typeof startedAt === 'string' ? Date.parse(startedAt) : Number.NaN;
|
|
53
|
+
if (Number.isNaN(from))
|
|
54
|
+
return null;
|
|
55
|
+
const until = from + options.timeoutMs + CALL_STOP_GRACE_MS;
|
|
56
|
+
const base = { callId: String(state.id), window: { from: startedAt, until: new Date(until).toISOString() }, waitStartedAt: new Date(now()).toISOString() };
|
|
57
|
+
let wait = await record(callDir, { ...base, outcome: 'waiting' });
|
|
58
|
+
for (;;) {
|
|
59
|
+
const signal = await options.finished({ startedAt: startedAt });
|
|
60
|
+
if (signal) {
|
|
61
|
+
wait = { ...base, outcome: 'finished', signal, waitEndedAt: new Date(now()).toISOString() };
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
if (now() >= until) {
|
|
65
|
+
wait = { ...base, outcome: 'window-elapsed', waitEndedAt: new Date(now()).toISOString() };
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
await new Promise((resolve) => { setTimeout(resolve, Math.max(0, Math.min(options.pollMs ?? POLL_MS, until - now()))); });
|
|
69
|
+
}
|
|
70
|
+
return record(callDir, wait);
|
|
71
|
+
};
|
|
72
|
+
const importRuntime = async () => {
|
|
73
|
+
const base = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', 'runtime', 'codex-conversion', 'src');
|
|
74
|
+
const load = async (file) => await import(pathToFileURL(path.join(base, file)).href);
|
|
75
|
+
const modules = await Promise.all(['codex/caller-home.mjs', 'images/native-records.mjs'].map(load));
|
|
76
|
+
return Object.assign({}, ...modules);
|
|
77
|
+
};
|
|
78
|
+
/** Codex's own end-of-turn records in a session (`event_msg` payloads). */
|
|
79
|
+
const TURN_END_EVENTS = new Set(['task_complete', 'turn_aborted']);
|
|
80
|
+
/** A session is over once its image generation completed (with or without an image) or its turn ended. */
|
|
81
|
+
const sessionEnded = (runtime, text) => {
|
|
82
|
+
try {
|
|
83
|
+
if (runtime.parseNativeRecords(text).generations.length > 0)
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
// Conflicting completions: the session is over, and the store's recovery reports it.
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
return text.split('\n').some((line) => {
|
|
91
|
+
if (!line.includes('"payload"'))
|
|
92
|
+
return false;
|
|
93
|
+
try {
|
|
94
|
+
return TURN_END_EVENTS.has(String(JSON.parse(line).payload?.type));
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* The proof a screen's image call finished: its session in the call's Codex home (by the thread id its events
|
|
103
|
+
* announced, else found by the call's own inputs, as the adoption finds it) records the generation's end or the
|
|
104
|
+
* turn's end.
|
|
105
|
+
*/
|
|
106
|
+
export const imageCallFinished = (callDir) => async ({ startedAt }) => {
|
|
107
|
+
const runtime = await importRuntime();
|
|
108
|
+
const state = await readJson(path.join(callDir, 'state.json'));
|
|
109
|
+
const home = state?.metadata?.home;
|
|
110
|
+
if (typeof home !== 'string')
|
|
111
|
+
return null;
|
|
112
|
+
const threadId = typeof state?.metadata?.threadId === 'string'
|
|
113
|
+
? state.metadata.threadId
|
|
114
|
+
: await runtime.threadIdOf(path.join(callDir, 'events.jsonl'));
|
|
115
|
+
const files = threadId ? await runtime.callRollouts(home, threadId, [startedAt, Date.now()]) : await unannouncedSessionFiles(callDir);
|
|
116
|
+
for (const file of files) {
|
|
117
|
+
if (sessionEnded(runtime, await readFile(file, 'utf8')))
|
|
118
|
+
return 'session-ended';
|
|
119
|
+
}
|
|
120
|
+
return null;
|
|
121
|
+
};
|
|
122
|
+
//# sourceMappingURL=branch-local-call-wait.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branch-local-call-wait.js","sourceRoot":"","sources":["../src/branch-local-call-wait.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EA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,EAAE,IAAI,CAAC;IACnC,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC1C,MAAM,QAAQ,GAAG,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,KAAK,QAAQ;QAC5D,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAkB;QACnC,CAAC,CAAC,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC;IACjE,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,uBAAuB,CAAC,OAAO,CAAC,CAAC;IACtI,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,YAAY,CAAC,OAAO,EAAE,MAAM,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YAAE,OAAO,eAAe,CAAC;IAClF,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { type BranchCell, type BranchPlan, type BranchReferenceRole } from './branch-core/index.js';
|
|
2
|
+
import { type BranchRunClient, type BranchRunEnvelope } from './branch-client.js';
|
|
3
|
+
import { type CodexProcessOptions } from './slate-image-executor.js';
|
|
4
|
+
/**
|
|
5
|
+
* The branch build process on the person's own Codex, behind the same four
|
|
6
|
+
* methods the hosted client answers (`BranchRunClient`), so `executeBranchRun`,
|
|
7
|
+
* the dispatch loop, the records and both workspaces' followers run unchanged.
|
|
8
|
+
* Every decision is the hosted one, from the shared branch core: the planner
|
|
9
|
+
* call (branch-local-plan.ts) and its parse with the bounded retry, the trim,
|
|
10
|
+
* derived chrome, canvases and slots, the dispatch gates (a continuation waits
|
|
11
|
+
* for its preceding viewport, a footer for the footer seed unless the seed
|
|
12
|
+
* failed), the reference order (approved design, preceding viewport, footer
|
|
13
|
+
* seed) and the per-screen prompt rebuilt from the references that arrived.
|
|
14
|
+
* Each screen is one native Codex image call through the workspace's own
|
|
15
|
+
* executor (`drawOptionWithCodex`: the prompt copied verbatim into the image
|
|
16
|
+
* tool, one more sample only when the tool refused the first).
|
|
17
|
+
*
|
|
18
|
+
* State lives in `<branchDir>/local/`: `run.json` (the ledger: plan, cells and
|
|
19
|
+
* every slot's status, call id, prompt and references), `winner.<ext>`,
|
|
20
|
+
* `screens/<slot>.png` (each delivered screen: the bytes the board receives
|
|
21
|
+
* and the bytes a later screen is conditioned on) and `calls/` (the run-store
|
|
22
|
+
* custody of every Codex call). Call ids are stable (`branch-plan:<run>:<n>`,
|
|
23
|
+
* `branch:<run>:<slot>`), so a resumed run settles each call by the store's
|
|
24
|
+
* rule — an answer that landed is reused, a dispatched call is recovered from
|
|
25
|
+
* its own session or refused — and never pays for one twice.
|
|
26
|
+
*/
|
|
27
|
+
export declare const LOCAL_BRANCH_DIRECTORY = "local";
|
|
28
|
+
type SlotStatus = 'pending' | 'dispatched' | 'succeeded' | 'failed';
|
|
29
|
+
type LocalSlot = {
|
|
30
|
+
status: SlotStatus;
|
|
31
|
+
callId?: string;
|
|
32
|
+
/** The image prompt this slot's call sends, as built at its first dispatch. */
|
|
33
|
+
prompt?: string;
|
|
34
|
+
/** The references that call sends, in order: `winner`, then slots. */
|
|
35
|
+
references?: Array<{
|
|
36
|
+
role: BranchReferenceRole;
|
|
37
|
+
key: string;
|
|
38
|
+
}>;
|
|
39
|
+
pgid?: number;
|
|
40
|
+
/** The call `pgid` belongs to (the slot's first call or its one retry). */
|
|
41
|
+
pgidCallId?: string;
|
|
42
|
+
dispatchedAt?: string;
|
|
43
|
+
settledAt?: string;
|
|
44
|
+
error?: {
|
|
45
|
+
code: string;
|
|
46
|
+
message: string;
|
|
47
|
+
};
|
|
48
|
+
screen?: {
|
|
49
|
+
sha256: string;
|
|
50
|
+
width: number;
|
|
51
|
+
height: number;
|
|
52
|
+
};
|
|
53
|
+
codex?: Record<string, unknown>;
|
|
54
|
+
};
|
|
55
|
+
export type LocalBranchRun = {
|
|
56
|
+
version: 1;
|
|
57
|
+
engine: 'codex';
|
|
58
|
+
runId: string;
|
|
59
|
+
runKey: string;
|
|
60
|
+
concept: string;
|
|
61
|
+
aspect: 'landscape' | 'portrait' | 'square';
|
|
62
|
+
maxScreens?: number;
|
|
63
|
+
createdAt: string;
|
|
64
|
+
winner: {
|
|
65
|
+
file: string;
|
|
66
|
+
sha256: string;
|
|
67
|
+
mediaType: string;
|
|
68
|
+
width: number;
|
|
69
|
+
height: number;
|
|
70
|
+
};
|
|
71
|
+
planner: {
|
|
72
|
+
calls: Array<{
|
|
73
|
+
callId: string;
|
|
74
|
+
reused: boolean;
|
|
75
|
+
parseError?: string;
|
|
76
|
+
}>;
|
|
77
|
+
};
|
|
78
|
+
plan: BranchPlan;
|
|
79
|
+
cells: BranchCell[];
|
|
80
|
+
footerSeedSlot: string | null;
|
|
81
|
+
slots: Record<string, LocalSlot>;
|
|
82
|
+
};
|
|
83
|
+
export declare const localBranchRunId: (runKey: string) => string;
|
|
84
|
+
export declare const localBranchCallId: (runId: string, slot: string) => string;
|
|
85
|
+
export declare const localBranchDirectory: (branchDir: string) => string;
|
|
86
|
+
/** The run as the hosted create route projects it (workers/api/src/create/runEnvelope.ts). */
|
|
87
|
+
export declare const localBranchEnvelope: (run: LocalBranchRun, inFlight?: ReadonlySet<string>) => BranchRunEnvelope;
|
|
88
|
+
/** The recorded run of a local branch, read only (`12ui next` refreshes a codex run from it). */
|
|
89
|
+
export declare const readLocalBranchEnvelope: (branchDir: string) => Promise<BranchRunEnvelope | null>;
|
|
90
|
+
export type LocalBranchClientOptions = {
|
|
91
|
+
/** The branch run's folder (`<run-dir>/branch`). */
|
|
92
|
+
branchDir: string;
|
|
93
|
+
/** The environment Codex is resolved from (`CODEX_HOME`, `TWELVE_UI_CODEX_BIN`, `PATH`); never passed to it whole. */
|
|
94
|
+
env: NodeJS.ProcessEnv;
|
|
95
|
+
processOptions?: CodexProcessOptions;
|
|
96
|
+
/** How long one call may run before it is stopped: the planner's turn and each screen's image call. */
|
|
97
|
+
timeouts?: {
|
|
98
|
+
planMs?: number;
|
|
99
|
+
imageMs?: number;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
export type LocalBranchClient = BranchRunClient & {
|
|
103
|
+
/** Releases the run folder's lock (also released when the process exits). */
|
|
104
|
+
close: () => void;
|
|
105
|
+
};
|
|
106
|
+
export declare const createLocalBranchClient: (options: LocalBranchClientOptions) => LocalBranchClient;
|
|
107
|
+
export {};
|
|
108
|
+
//# sourceMappingURL=branch-local-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branch-local-client.d.ts","sourceRoot":"","sources":["../src/branch-local-client.ts"],"names":[],"mappings":"AAMA,OAAO,EAeL,KAAK,UAAU,EAEf,KAAK,UAAU,EACf,KAAK,mBAAmB,EACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,iBAAiB,EAEvB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAyB,KAAK,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAM5F;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,eAAO,MAAM,sBAAsB,UAAU,CAAC;AAI9C,KAAK,UAAU,GAAG,SAAS,GAAG,YAAY,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEpE,KAAK,SAAS,GAAG;IACf,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+EAA+E;IAC/E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,UAAU,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,mBAAmB,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE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