@12ui/design 0.2.81 → 0.2.82

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.
Files changed (53) hide show
  1. package/README.md +7 -6
  2. package/SKILL.md +1 -1
  3. package/dist/cli-capabilities.d.ts +2 -2
  4. package/dist/cli-capabilities.js +2 -2
  5. package/dist/cli-capabilities.js.map +1 -1
  6. package/dist/cli-help/index.d.ts +2 -2
  7. package/dist/cli-help/workflow.d.ts +2 -2
  8. package/dist/cli-help/workflow.js +4 -4
  9. package/dist/cli-help/workflow.js.map +1 -1
  10. package/dist/cli-usage.d.ts.map +1 -1
  11. package/dist/cli-usage.js +5 -4
  12. package/dist/cli-usage.js.map +1 -1
  13. package/dist/mcp-workflow-tools.js +2 -2
  14. package/dist/mcp-workflow-tools.js.map +1 -1
  15. package/dist/review-files-server.d.ts +8 -0
  16. package/dist/review-files-server.d.ts.map +1 -0
  17. package/dist/review-files-server.js +133 -0
  18. package/dist/review-files-server.js.map +1 -0
  19. package/dist/review-page-assets.d.ts +1 -1
  20. package/dist/review-page-assets.d.ts.map +1 -1
  21. package/dist/review-page-assets.js +3 -1
  22. package/dist/review-page-assets.js.map +1 -1
  23. package/dist/review-page.d.ts +8 -1
  24. package/dist/review-page.d.ts.map +1 -1
  25. package/dist/review-page.js +32 -21
  26. package/dist/review-page.js.map +1 -1
  27. package/dist/review-server-guard.d.ts +33 -0
  28. package/dist/review-server-guard.d.ts.map +1 -0
  29. package/dist/review-server-guard.js +65 -0
  30. package/dist/review-server-guard.js.map +1 -0
  31. package/dist/review-server.d.ts +2 -0
  32. package/dist/review-server.d.ts.map +1 -1
  33. package/dist/review-server.js +45 -74
  34. package/dist/review-server.js.map +1 -1
  35. package/dist/workflow/adapter-12ui.js +1 -1
  36. package/dist/workflow/adapter-12ui.js.map +1 -1
  37. package/dist/workflow/adapters.d.ts.map +1 -1
  38. package/dist/workflow/adapters.js +3 -3
  39. package/dist/workflow/adapters.js.map +1 -1
  40. package/dist/workflow/providers.js +2 -2
  41. package/dist/workflow/providers.js.map +1 -1
  42. package/dist/workflow/routing.d.ts +8 -1
  43. package/dist/workflow/routing.d.ts.map +1 -1
  44. package/dist/workflow/routing.js +9 -2
  45. package/dist/workflow/routing.js.map +1 -1
  46. package/dist/workflow/types.d.ts +5 -2
  47. package/dist/workflow/types.d.ts.map +1 -1
  48. package/dist/workflow/types.js.map +1 -1
  49. package/dist/workflow-transport.d.ts.map +1 -1
  50. package/dist/workflow-transport.js +4 -2
  51. package/dist/workflow-transport.js.map +1 -1
  52. package/open-design.json +2 -2
  53. package/package.json +1 -1
package/README.md CHANGED
@@ -208,18 +208,19 @@ providers. Preparation, imports and registration do not need a 12ui account.
208
208
  interruption behavior.
209
209
 
210
210
  Provider routing considers a host session that declared text or code first, then
211
- eligible Codex and Claude subscription CLI capabilities, then explicitly authorized
212
- OpenAI API and 12ui providers. Image, image-edit and convert work never routes to
211
+ eligible Codex and Claude subscription CLI capabilities, then the OpenAI API when
212
+ the user opts in, then the 12ui API on the 12ui sign-in. Image, image-edit and convert work never routes to
213
213
  a session. Codex text/code subprocess execution requires
214
214
  `--trust-codex-config`: explicit trust in the existing user's CLI configuration,
215
- including tools and hooks beyond the command sandbox. This does not authorize
216
- paid fallback and does not apply to the current session's tools. Claude requires
215
+ including tools and hooks beyond the command sandbox. This does not opt in to
216
+ the OpenAI API and does not apply to the current session's tools. Claude requires
217
217
  supported safe mode, edits code with a fixed file-tool set without shell tests,
218
218
  and currently cannot attach images to text requests. Run checks in the parent
219
219
  session. Image capability is never inferred from a text CLI's presence.
220
220
  Session capabilities (text or code) must be
221
- explicitly declared from available tools. Key presence alone does not authorize paid work;
222
- `--allow-paid` is required for a funded route. An ambiguous dispatched operation
221
+ explicitly declared from available tools. 12ui credit use needs no permission. The
222
+ OpenAI API spends on the user's own key and runs only with `--allow-paid openai`; key
223
+ presence alone never enables it. An ambiguous dispatched operation
223
224
  requires reconciliation and cannot silently replay on another provider.
224
225
  An accepted job with a failed download, or a completed response with malformed
225
226
  output, stays in reconciliation under the same operation and attempt. Recover
package/SKILL.md CHANGED
@@ -23,7 +23,7 @@ candidates.
23
23
  Use `12ui` when it is available on `PATH`. Otherwise invoke the pinned CLI that
24
24
  the plugin's `open-design.json` MCP entry uses:
25
25
 
26
- npx -y @12ui/design@0.2.81 <command> ...
26
+ npx -y @12ui/design@0.2.82 <command> ...
27
27
 
28
28
  Run `12ui auth status --json` (or its pinned `npx` equivalent) first. A desktop user can authenticate with `12ui auth login`; a headless
29
29
  run supplies `TWELVE_UI_API_KEY`. Never put a credential into project files,
@@ -9,8 +9,8 @@ export declare const CLI_CAPABILITIES: {
9
9
  readonly preparation: "Prepare and recipe commands record work without model dispatch; execute chooses a provider.";
10
10
  readonly session: "Declare session capabilities explicitly (text or code only); execute returns a handoff and register records its result with the exact --attempt number.";
11
11
  readonly generation: "image, image-edit and convert always run through the 12ui CLI's own providers, never a host session.";
12
- readonly codexConfiguration: "Codex child execution requires --trust-codex-config, including trust in configured tools and hooks. This does not authorize paid fallbacks.";
13
- readonly paidProviders: "openai and 12ui require explicit --allow-paid permission; available credentials do not authorize spending.";
12
+ readonly codexConfiguration: "Codex child execution requires --trust-codex-config, including trust in configured tools and hooks. This does not opt in to the OpenAI API.";
13
+ readonly paidProviders: "12ui runs on the 12ui sign-in. openai spends on the user's own key and runs only with --allow-paid openai; an available key does not enable it.";
14
14
  readonly recovery: "Ambiguous dispatched work requires reconciliation and never silently falls through to another provider.";
15
15
  readonly authentication: "Local operations and MCP startup do not require 12ui credentials.";
16
16
  readonly layerdoc: "Read completed native LayerDoc and verified local raster mappings without HTTP or inference; sidecar bundles are not hosted conversion uploads.";
@@ -17,8 +17,8 @@ export const CLI_CAPABILITIES = {
17
17
  preparation: 'Prepare and recipe commands record work without model dispatch; execute chooses a provider.',
18
18
  session: 'Declare session capabilities explicitly (text or code only); execute returns a handoff and register records its result with the exact --attempt number.',
19
19
  generation: 'image, image-edit and convert always run through the 12ui CLI\'s own providers, never a host session.',
20
- codexConfiguration: 'Codex child execution requires --trust-codex-config, including trust in configured tools and hooks. This does not authorize paid fallbacks.',
21
- paidProviders: 'openai and 12ui require explicit --allow-paid permission; available credentials do not authorize spending.',
20
+ codexConfiguration: 'Codex child execution requires --trust-codex-config, including trust in configured tools and hooks. This does not opt in to the OpenAI API.',
21
+ paidProviders: '12ui runs on the 12ui sign-in. openai spends on the user\'s own key and runs only with --allow-paid openai; an available key does not enable it.',
22
22
  recovery: 'Ambiguous dispatched work requires reconciliation and never silently falls through to another provider.',
23
23
  authentication: 'Local operations and MCP startup do not require 12ui credentials.',
24
24
  layerdoc: 'Read completed native LayerDoc and verified local raster mappings without HTTP or inference; sidecar bundles are not hosted conversion uploads.',
@@ -1 +1 @@
1
- {"version":3,"file":"cli-capabilities.js","sourceRoot":"","sources":["../src/cli-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EACL,sBAAsB,EACtB,6BAA6B,GAC9B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,QAAQ,EAAE;QACR,MAAM,EAAE,iBAAiB;QACzB,QAAQ,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,c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GG;QACH,eAAe,EAAE;YACf,IAAI,EAAE,oBAAoB;YAC1B,OAAO,EAAE,+BAA+B;YACxC,OAAO,EAAE,EAAE;SACZ;QACD,sBAAsB,EAAE,wBAAwB,CAAC,aAAa;KAC/D;IACD,SAAS,EAAE;QACT,OAAO,EAAE,0BAA0B;QACnC,UAAU,EAAE,uCAAuC;QACnD,UAAU,EAAE,2DAA2D;QACvE,MAAM,EAAE,4CAA4C;QACpD,WAAW,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,CAAC;QACtD,UAAU,EAAE,yOAAyO;QACrP,UAAU,EAAE,mGAAmG;QAC/G,SAAS,EAAE,CAAC,kBAAkB,EAAE,+DAA+D,CAAC;KACjG;CACO,CAAC"}
@@ -108,7 +108,7 @@ export declare const CLI_HELP_CONTEXTS: {
108
108
  readonly summary: "Run design work through one persistent local workflow shared by the CLI, SDK, and MCP.";
109
109
  readonly sections: readonly [{
110
110
  readonly heading: "Flow";
111
- readonly items: readonly ["Import local files, prepare a request or recipe, execute the returned operation, then inspect its status. Recipe commands prepare only.", "Image, image-edit and convert work always runs through the 12ui CLI's own providers (the 12ui API, or the OpenAI API for images), never a host session.", "A declared host session receives a handoff for text or code with its own tools; register the resulting JSON or files against that same operation and attempt number.", "Local Codex/Claude execution uses the user’s plan. OpenAI API and 12ui fallbacks require explicit --allow-paid authorization; credentials alone do not enable spending.", "An ambiguous dispatch stops for reconciliation. Repeating execute never silently buys the same work through another provider."];
111
+ readonly items: readonly ["Import local files, prepare a request or recipe, execute the returned operation, then inspect its status. Recipe commands prepare only.", "Image, image-edit and convert work always runs through the 12ui CLI's own providers (the 12ui API, or the OpenAI API for images), never a host session.", "A declared host session receives a handoff for text or code with its own tools; register the resulting JSON or files against that same operation and attempt number.", "Local Codex/Claude execution uses the user’s plan. The 12ui API runs on the 12ui sign-in. The OpenAI API spends on the user’s own key and runs only with --allow-paid openai; a key alone does not enable it.", "An ambiguous dispatch stops for reconciliation. Repeating execute never silently buys the same work through another provider."];
112
112
  }];
113
113
  };
114
114
  readonly 'workflow prepare': {
@@ -122,7 +122,7 @@ export declare const CLI_HELP_CONTEXTS: {
122
122
  readonly summary: "Execute an existing operation through eligible providers in the requested preference order.";
123
123
  readonly sections: readonly [{
124
124
  readonly heading: "Routing";
125
- readonly items: readonly ["--providers is an ordered comma-separated subset of session,codex,claude,openai,12ui. Declare only text or code with --session-capabilities: a session never generates images or converts.", "--allow-paid openai,12ui authorizes those paid fallbacks. Omit a provider to withhold that permission. User-plan execution still consumes the user’s allowance.", "--trust-codex-config permits launching the existing Codex CLI configuration, including configured tools and hooks. Codex child execution is unavailable without it. This does not authorize paid API or 12ui fallbacks.", "Session execution (text or code only) returns a handoff, not completed output. Fulfill it using the calling client, then run workflow register with the result and the exact handoff attemptNumber as --attempt."];
125
+ readonly items: readonly ["--providers is an ordered comma-separated subset of session,codex,claude,openai,12ui. Declare only text or code with --session-capabilities: a session never generates images or converts.", "--allow-paid openai opts in to the OpenAI API on the user’s own key. 12ui credit use needs no flag. User-plan execution still consumes the user’s allowance.", "--trust-codex-config permits launching the existing Codex CLI configuration, including configured tools and hooks. Codex child execution is unavailable without it. This does not opt in to the OpenAI API.", "Session execution (text or code only) returns a handoff, not completed output. Fulfill it using the calling client, then run workflow register with the result and the exact handoff attemptNumber as --attempt."];
126
126
  }];
127
127
  };
128
128
  readonly 'workflow register': {
@@ -4,7 +4,7 @@ export declare const WORKFLOW_HELP: {
4
4
  readonly summary: "Run design work through one persistent local workflow shared by the CLI, SDK, and MCP.";
5
5
  readonly sections: readonly [{
6
6
  readonly heading: "Flow";
7
- readonly items: readonly ["Import local files, prepare a request or recipe, execute the returned operation, then inspect its status. Recipe commands prepare only.", "Image, image-edit and convert work always runs through the 12ui CLI's own providers (the 12ui API, or the OpenAI API for images), never a host session.", "A declared host session receives a handoff for text or code with its own tools; register the resulting JSON or files against that same operation and attempt number.", "Local Codex/Claude execution uses the user’s plan. OpenAI API and 12ui fallbacks require explicit --allow-paid authorization; credentials alone do not enable spending.", "An ambiguous dispatch stops for reconciliation. Repeating execute never silently buys the same work through another provider."];
7
+ readonly items: readonly ["Import local files, prepare a request or recipe, execute the returned operation, then inspect its status. Recipe commands prepare only.", "Image, image-edit and convert work always runs through the 12ui CLI's own providers (the 12ui API, or the OpenAI API for images), never a host session.", "A declared host session receives a handoff for text or code with its own tools; register the resulting JSON or files against that same operation and attempt number.", "Local Codex/Claude execution uses the user’s plan. The 12ui API runs on the 12ui sign-in. The OpenAI API spends on the user’s own key and runs only with --allow-paid openai; a key alone does not enable it.", "An ambiguous dispatch stops for reconciliation. Repeating execute never silently buys the same work through another provider."];
8
8
  }];
9
9
  };
10
10
  readonly 'workflow prepare': {
@@ -18,7 +18,7 @@ export declare const WORKFLOW_HELP: {
18
18
  readonly summary: "Execute an existing operation through eligible providers in the requested preference order.";
19
19
  readonly sections: readonly [{
20
20
  readonly heading: "Routing";
21
- readonly items: readonly ["--providers is an ordered comma-separated subset of session,codex,claude,openai,12ui. Declare only text or code with --session-capabilities: a session never generates images or converts.", "--allow-paid openai,12ui authorizes those paid fallbacks. Omit a provider to withhold that permission. User-plan execution still consumes the user’s allowance.", "--trust-codex-config permits launching the existing Codex CLI configuration, including configured tools and hooks. Codex child execution is unavailable without it. This does not authorize paid API or 12ui fallbacks.", "Session execution (text or code only) returns a handoff, not completed output. Fulfill it using the calling client, then run workflow register with the result and the exact handoff attemptNumber as --attempt."];
21
+ readonly items: readonly ["--providers is an ordered comma-separated subset of session,codex,claude,openai,12ui. Declare only text or code with --session-capabilities: a session never generates images or converts.", "--allow-paid openai opts in to the OpenAI API on the user’s own key. 12ui credit use needs no flag. User-plan execution still consumes the user’s allowance.", "--trust-codex-config permits launching the existing Codex CLI configuration, including configured tools and hooks. Codex child execution is unavailable without it. This does not opt in to the OpenAI API.", "Session execution (text or code only) returns a handoff, not completed output. Fulfill it using the calling client, then run workflow register with the result and the exact handoff attemptNumber as --attempt."];
22
22
  }];
23
23
  };
24
24
  readonly 'workflow register': {
@@ -3,7 +3,7 @@ const recipe = {
3
3
  sections: [{ heading: 'Continue', items: [
4
4
  'Use a persistent --workspace and stable --key. Keep the returned operation id; execute it through the same workflow service from CLI or MCP.',
5
5
  'Supply local source/reference paths in the input JSON. The recipe imports and hashes the files before execution.',
6
- 'Provider discovery and --allow-paid belong to workflow execute. Preparing a recipe does not authorize model calls.',
6
+ 'Provider discovery and --allow-paid openai belong to workflow execute. Preparing a recipe does not dispatch model calls.',
7
7
  ] }],
8
8
  };
9
9
  export const WORKFLOW_HELP = {
@@ -13,7 +13,7 @@ export const WORKFLOW_HELP = {
13
13
  'Import local files, prepare a request or recipe, execute the returned operation, then inspect its status. Recipe commands prepare only.',
14
14
  'Image, image-edit and convert work always runs through the 12ui CLI\'s own providers (the 12ui API, or the OpenAI API for images), never a host session.',
15
15
  'A declared host session receives a handoff for text or code with its own tools; register the resulting JSON or files against that same operation and attempt number.',
16
- 'Local Codex/Claude execution uses the user’s plan. OpenAI API and 12ui fallbacks require explicit --allow-paid authorization; credentials alone do not enable spending.',
16
+ 'Local Codex/Claude execution uses the user’s plan. The 12ui API runs on the 12ui sign-in. The OpenAI API spends on the user’s own key and runs only with --allow-paid openai; a key alone does not enable it.',
17
17
  'An ambiguous dispatch stops for reconciliation. Repeating execute never silently buys the same work through another provider.',
18
18
  ] }],
19
19
  },
@@ -28,8 +28,8 @@ export const WORKFLOW_HELP = {
28
28
  summary: 'Execute an existing operation through eligible providers in the requested preference order.',
29
29
  sections: [{ heading: 'Routing', items: [
30
30
  '--providers is an ordered comma-separated subset of session,codex,claude,openai,12ui. Declare only text or code with --session-capabilities: a session never generates images or converts.',
31
- '--allow-paid openai,12ui authorizes those paid fallbacks. Omit a provider to withhold that permission. User-plan execution still consumes the user’s allowance.',
32
- '--trust-codex-config permits launching the existing Codex CLI configuration, including configured tools and hooks. Codex child execution is unavailable without it. This does not authorize paid API or 12ui fallbacks.',
31
+ '--allow-paid openai opts in to the OpenAI API on the user’s own key. 12ui credit use needs no flag. User-plan execution still consumes the user’s allowance.',
32
+ '--trust-codex-config permits launching the existing Codex CLI configuration, including configured tools and hooks. Codex child execution is unavailable without it. This does not opt in to the OpenAI API.',
33
33
  'Session execution (text or code only) returns a handoff, not completed output. Fulfill it using the calling client, then run workflow register with the result and the exact handoff attemptNumber as --attempt.',
34
34
  ] }],
35
35
  },
@@ -1 +1 @@
1
- {"version":3,"file":"workflow.js","sourceRoot":"","sources":["../../src/cli-help/workflow.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAmB;IAC7B,OAAO,EAAE,oFAAoF;IAC7F,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE;gBACvC,8IAA8I;gBAC9I,kHAAkH;gBAClH,oHAAoH;aACrH,EAAE,CAAC;CACL,CAAC;AACF,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,QAAQ,EAAE;QACR,OAAO,EAAE,wFAAwF;QACjG,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE;oBACnC,yIAAyI;oBACzI,0JAA0J;oBAC1J,sKAAsK;oBACtK,yKAAyK;oBACzK,+HAA+H;iBAChI,EAAE,CAAC;KACL;IACD,kBAAkB,EAAE;QAClB,OAAO,EAAE,yFAAyF;QAClG,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE;oBACtC,mQAAmQ;oBACnQ,6IAA6I;iBAC9I,EAAE,CAAC;KACL;IACD,kBAAkB,EAAE;QAClB,OAAO,EAAE,6FAA6F;QACtG,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE;oBACtC,4LAA4L;oBAC5L,iKAAiK;oBACjK,yNAAyN;oBACzN,kNAAkN;iBACnN,EAAE,CAAC;KACL;IACD,mBAAmB,EAAE;QACnB,OAAO,EAAE,2DAA2D;QACpE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,aAA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EAAyE;AACzE,eAAO,MAAM,YAAY,GAAI,GAAG,MAAM,SAAS,MAAM,EAAE,KAAG,MAEzD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,GAAI,GAAG,MAAM,SAAS,MAAM,EAAE,KAAG,MAaxD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,MAAM;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;CACzB,KAAG,UAGH,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,WAAW,GAAI,MAAM;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;CACzB,KAAG,KAEH,CAAC;AAEF,2FAA2F;AAC3F,eAAO,MAAM,UAAU,GAAI,UAAS,SAAS,MAAM,EAAO,KAAG,IAE5D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,KAAK,QAAO,KAExB,CAAC"}
package/dist/cli-usage.js CHANGED
@@ -48,7 +48,7 @@ import { CLI_CONVERSION_OUTPUTS } from './conversion-outputs.js';
48
48
  const CONCEPT_PLACEHOLDER = `<text>`;
49
49
  export const CLI_USAGE = `Usage:
50
50
  12ui workflow prepare <request.json> --workspace <directory> --key <stable-key>
51
- 12ui workflow execute <operation-id> --workspace <directory> [--providers session,codex,claude,openai,12ui] [--allow-paid openai,12ui] [--session-capabilities text,code] [--trust-codex-config]
51
+ 12ui workflow execute <operation-id> --workspace <directory> [--providers session,codex,claude,openai,12ui] [--allow-paid openai] [--session-capabilities text,code] [--trust-codex-config]
52
52
  12ui workflow register <operation-id> --workspace <directory> --attempt <number> --result <result.json>
53
53
  12ui workflow continue <operation-id> --workspace <directory>
54
54
  12ui workflow fail <operation-id> --workspace <directory> --attempt <number> --failure <failure.json>
@@ -134,12 +134,13 @@ retained deterministic polish rules before runtime verification; it is opt-in.
134
134
  Workflow prepare and recipe commands do not dispatch models. Execute selects a
135
135
  capable provider. Images, image edits and conversion always run through the 12ui
136
136
  CLI's own providers, never a host session. A host session may declare text or
137
- code to receive a handoff, then register its outputs with the handoff's --attempt number. --allow-paid explicitly permits OpenAI API or 12ui credit
138
- spend. Credentials alone never enable a paid workflow fallback. Local execution
137
+ code to receive a handoff, then register its outputs with the handoff's --attempt number. The 12ui API runs on
138
+ the 12ui sign-in. --allow-paid openai opts in to the OpenAI API on the user's own key;
139
+ a key alone never enables it. Local execution
139
140
  can consume the user's model plan and hardware. Keep the same workspace and key
140
141
  for recovery; uncertain dispatched work never silently moves to another provider.
141
142
  Codex child execution requires --trust-codex-config because existing configured
142
- tools and hooks may run. This trust does not authorize paid API or 12ui fallback.
143
+ tools and hooks may run. This trust does not opt in to the OpenAI API.
143
144
 
144
145
  Hosted work accepts --origin <url> and --api-key <key> (defaulting to
145
146
  TWELVE_UI_ORIGIN / TWELVE_UI_API_KEY, then \`12ui auth login\`). Local next, resume,
@@ -1 +1 @@
1
- {"version":3,"file":"cli-usage.js","sourceRoot":"","sources":["../src/cli-usage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH;;;;;;;;;;GAUG;AACH,MAAM,mBAAmB,GAAG,QAAQ,CAAC;AAErC,MAAM,CAAC,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBA+BA,mBAAmB;0DACc,mBAAmB;;;oCAGzC,mBAAmB;;;;;;;;;;6DAUM,sBAAsB,CAAC,IAAI,CAAC,GAAG,CAAC;2DAClC,sBAAsB,CAAC,IAAI,CA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GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AAC1E,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,GAAU,EAAE;IAC/B,MAAM,IAAI,UAAU,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AAC/C,CAAC,CAAC"}
@@ -34,11 +34,11 @@ export const MCP_WORKFLOW_TOOL_DEFINITIONS = [
34
34
  },
35
35
  {
36
36
  name: 'design.workflow.execute',
37
- description: 'Route a prepared operation. Image, image-edit and convert work runs only through the 12ui CLI\'s own providers (the 12ui API, or the OpenAI API for images, each with explicit allowPaid), never a host session. Text and code may go to a declared session (a handoff to complete with host tools, then register), a local CLI, or an explicitly authorized paid provider. Ambiguous dispatched work is not retried on another provider.',
37
+ description: 'Route a prepared operation. Image, image-edit and convert work runs only through the 12ui CLI\'s own providers (the 12ui API on the 12ui sign-in, or the OpenAI API for images when the user opts in with allowPaid), never a host session. Text and code may go to a declared session (a handoff to complete with host tools, then register), a local CLI, the 12ui API, or the OpenAI API under allowPaid. Ambiguous dispatched work is not retried on another provider.',
38
38
  inputSchema: object({
39
39
  workspace, operationId: string,
40
40
  providers: { type: 'array', minItems: 1, uniqueItems: true, items: { enum: [...PROVIDERS] }, description: 'Provider preference order. A session is eligible only for explicitly declared capabilities.' },
41
- allowPaid: { type: 'array', uniqueItems: true, items: { enum: ['openai', '12ui'] }, description: 'Explicit permission for providers funded by API keys or 12ui credits. Key presence is not permission.' },
41
+ allowPaid: { type: 'array', uniqueItems: true, items: { enum: ['openai', '12ui'] }, description: 'The user\'s opt-in to spend on their own OpenAI API key ("openai"). Key presence is not that opt-in. 12ui credit use needs no permission; a "12ui" entry changes nothing.' },
42
42
  sessionCapabilities: capabilityList,
43
43
  trustCodexConfig,
44
44
  }, ['workspace', 'operationId']),
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-workflow-tools.js","sourceRoot":"","sources":["../src/mcp-workflow-tools.ts"],"names":[],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CAAC,KAAK,CAAC,kBAAkB,CAAC,MAAM,CAAmB,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AACxG,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { ReviewModel } from './review-types.js';
2
+ export type ReviewFilesServer = {
3
+ port: number;
4
+ close: () => Promise<void>;
5
+ };
6
+ /** Serves `/files/<run>/<path>` for the runs `model()` currently lists, read-only, on its own loopback port. */
7
+ export declare const startReviewFilesServer: (model: () => ReviewModel) => Promise<ReviewFilesServer>;
8
+ //# sourceMappingURL=review-files-server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review-files-server.d.ts","sourceRoot":"","sources":["../src/review-files-server.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAkFrD,MAAM,MAAM,iBAAiB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC;AAE7E,gHAAgH;AAChH,eAAO,MAAM,sBAAsB,GAAU,OAAO,MAAM,WAAW,KAAG,OAAO,CAAC,iBAAiB,CA6ChG,CAAC"}
@@ -0,0 +1,133 @@
1
+ import { createReadStream } from 'node:fs';
2
+ import { realpath, stat } from 'node:fs/promises';
3
+ import http from 'node:http';
4
+ import path from 'node:path';
5
+ import { assertReviewFileAccess } from './review-server-guard.js';
6
+ /**
7
+ * THE RUN FILES' OWN ORIGIN. `12ui review` serves a run's files (its HTML, scripts, fonts, images) from a second
8
+ * loopback port, not the review page's: a run's HTML opened from the page, or framed in it, is then a normal page at
9
+ * an origin that holds no session token and takes no request that changes anything (`assertReviewFileAccess`). It
10
+ * runs as it would anywhere (module scripts, fetches of its own files, local `@font-face`, storage), and the browser's
11
+ * same-origin policy keeps it from reading the review page, whose server refuses its requests by Origin
12
+ * (`assertReviewAccess`).
13
+ */
14
+ const CONTENT_TYPES = {
15
+ '.avif': 'image/avif',
16
+ '.css': 'text/css; charset=utf-8',
17
+ '.gif': 'image/gif',
18
+ '.htm': 'text/html; charset=utf-8',
19
+ '.html': 'text/html; charset=utf-8',
20
+ '.ico': 'image/x-icon',
21
+ '.jpeg': 'image/jpeg',
22
+ '.jpg': 'image/jpeg',
23
+ '.js': 'text/javascript; charset=utf-8',
24
+ '.json': 'application/json; charset=utf-8',
25
+ '.map': 'application/json; charset=utf-8',
26
+ '.mjs': 'text/javascript; charset=utf-8',
27
+ '.otf': 'font/otf',
28
+ '.png': 'image/png',
29
+ '.svg': 'image/svg+xml',
30
+ '.ttf': 'font/ttf',
31
+ '.txt': 'text/plain; charset=utf-8',
32
+ '.wasm': 'application/wasm',
33
+ '.webmanifest': 'application/manifest+json',
34
+ '.webp': 'image/webp',
35
+ '.woff': 'font/woff',
36
+ '.woff2': 'font/woff2',
37
+ };
38
+ const serveRunFile = async (args) => {
39
+ const segments = args.pathname.split('/').slice(2).map((segment) => decodeURIComponent(segment));
40
+ const runId = segments.shift();
41
+ const run = args.model.runs.find((candidate) => candidate.id === runId);
42
+ if (!run || segments.length === 0 || segments.some((segment) => (!segment
43
+ || segment === '.'
44
+ || segment === '..'
45
+ || segment.startsWith('.')
46
+ || segment.includes('/')
47
+ || segment.includes('\\')))) {
48
+ args.response.writeHead(404).end('not found');
49
+ return;
50
+ }
51
+ const root = await realpath(run.root).catch(() => null);
52
+ const candidate = path.resolve(run.root, ...segments);
53
+ const file = await realpath(candidate).catch(() => null);
54
+ if (!root || !file || (file !== root && !file.startsWith(`${root}${path.sep}`))) {
55
+ args.response.writeHead(403).end('forbidden');
56
+ return;
57
+ }
58
+ if (path.relative(root, file).split(path.sep).some((segment) => segment.startsWith('.'))) {
59
+ args.response.writeHead(404).end('not found');
60
+ return;
61
+ }
62
+ const details = await stat(file).catch(() => null);
63
+ if (!details?.isFile()) {
64
+ args.response.writeHead(404).end('not found');
65
+ return;
66
+ }
67
+ args.response.writeHead(200, {
68
+ 'content-type': CONTENT_TYPES[path.extname(file).toLowerCase()] ?? 'application/octet-stream',
69
+ 'content-length': details.size,
70
+ 'cache-control': 'no-store',
71
+ 'x-content-type-options': 'nosniff',
72
+ });
73
+ if (args.method === 'HEAD')
74
+ args.response.end();
75
+ else
76
+ createReadStream(file).pipe(args.response);
77
+ };
78
+ /** Serves `/files/<run>/<path>` for the runs `model()` currently lists, read-only, on its own loopback port. */
79
+ export const startReviewFilesServer = async (model) => {
80
+ let port = 0;
81
+ const server = http.createServer(async (request, response) => {
82
+ const method = request.method ?? 'GET';
83
+ try {
84
+ assertReviewFileAccess(request, { port });
85
+ }
86
+ catch (error) {
87
+ const refused = error;
88
+ response.writeHead(refused.status, { 'content-type': 'text/plain; charset=utf-8', allow: 'GET, HEAD' }).end(refused.message);
89
+ return;
90
+ }
91
+ let pathname;
92
+ try {
93
+ pathname = new URL(request.url ?? '/', 'http://127.0.0.1').pathname;
94
+ }
95
+ catch {
96
+ response.writeHead(400).end('bad request');
97
+ return;
98
+ }
99
+ if (!pathname.startsWith('/files/')) {
100
+ response.writeHead(404).end('not found');
101
+ return;
102
+ }
103
+ try {
104
+ await serveRunFile({ model: model(), pathname, method, response });
105
+ }
106
+ catch {
107
+ if (!response.headersSent)
108
+ response.writeHead(400).end('bad request');
109
+ else
110
+ response.destroy();
111
+ }
112
+ });
113
+ await new Promise((resolve, reject) => {
114
+ server.once('error', reject);
115
+ server.listen(0, '127.0.0.1', () => resolve());
116
+ });
117
+ const address = server.address();
118
+ if (!address || typeof address === 'string') {
119
+ await new Promise((resolve) => server.close(() => resolve()));
120
+ throw new Error('Review file server did not bind a local TCP port');
121
+ }
122
+ port = address.port;
123
+ return {
124
+ port,
125
+ close: () => new Promise((resolve, reject) => {
126
+ server.close((error) => { if (error)
127
+ reject(error);
128
+ else
129
+ resolve(); });
130
+ }),
131
+ };
132
+ };
133
+ //# sourceMappingURL=review-files-server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review-files-server.js","sourceRoot":"","sources":["../src/review-files-server.ts"],"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,EAAE,EAAE;QAC1C,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC7B,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;IACH,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;IACjC,IAAI,CAAC,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAC5C,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACpE,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;IACtE,CAAC;IACD,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IACpB,OAAO;QACL,IAAI;QACJ,KAAK,EAAE,GAAG,EAAE,CAAC,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACjD,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,GAAG,IAAI,KAAK;gBAAE,MAAM,CAAC,KAAK,CAAC,CAAC;;gBAAM,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACzE,CAAC,CAAC;KACH,CAAC;AACJ,CAAC,CAAC"}
@@ -1,3 +1,3 @@
1
1
  export declare const REVIEW_PAGE_STYLES = "\n :root{color-scheme:light;--paper:#f7f3ed;--panel:#fffdf8;--ink:#143b33;--text:#202523;--muted:#6a706c;--line:#d9d4ca;--signal:#ef6b22;--soft:#e8eee9;--shadow:0 18px 50px rgba(31,45,39,.08)}\n *{box-sizing:border-box}html{background:var(--paper);scroll-behavior:smooth}body{margin:0;color:var(--text);font:15px/1.45 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,\"Segoe UI\",sans-serif;background:radial-gradient(circle at 8% 16%,rgba(239,107,34,.08),transparent 24rem),var(--paper)}\n button,textarea{font:inherit}button,a{touch-action:manipulation}.mast{padding:28px clamp(20px,4vw,64px);border-bottom:1px solid var(--line);background:rgba(247,243,237,.92);backdrop-filter:blur(12px);position:sticky;top:0;z-index:20;display:flex;align-items:flex-end;justify-content:space-between;gap:24px}.brand{display:flex;align-items:center;gap:14px}.brand-mark{width:42px;height:42px;border-radius:50%;background:var(--ink);color:var(--paper);display:grid;place-items:center;font:700 18px Georgia,serif}.mast h1,.run h2{font-family:Georgia,\"Times New Roman\",serif;color:var(--ink);margin:0;font-weight:500}.mast h1{font-size:clamp(28px,4vw,46px);line-height:1}.mast p{margin:6px 0 0;color:var(--muted)}.summary{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.summary span,.count,.mark-chip,.edit-mode{border:1px solid var(--line);border-radius:999px;padding:7px 11px;background:var(--panel);white-space:nowrap}.mark-chip{text-transform:capitalize;color:var(--ink);border-color:#9fb5a8;background:var(--soft);font-size:12px}.shell{width:min(1760px,100%);margin:0 auto;padding:36px clamp(16px,3vw,48px) 100px}.empty{max-width:680px;margin:14vh auto;padding:48px;border:1px solid var(--line);border-radius:22px;background:var(--panel);box-shadow:var(--shadow)}.empty h2{font:500 38px/1.1 Georgia,serif;color:var(--ink);margin:0 0 12px}.run{margin-bottom:64px}.run-head{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;padding:0 4px 20px;border-bottom:1px solid var(--ink)}.run h2{font-size:clamp(28px,3vw,42px);line-height:1.05;max-width:1080px}.run-head p{margin:8px 0 0;color:var(--muted);overflow-wrap:anywhere}.run-purpose{max-width:920px;color:var(--text)!important}.eyebrow{margin:0 0 7px!important;color:var(--signal)!important;letter-spacing:.08em;font-size:11px;font-weight:800}.site-nav{display:flex;gap:8px;overflow:auto;padding:14px 2px 0}.site-nav a{flex:0 0 auto;color:var(--ink);text-decoration:none;border:1px solid var(--line);border-radius:999px;padding:7px 12px;background:var(--panel);font-size:12px;font-weight:750}.group{padding-top:26px}.group>h3{font:500 22px Georgia,serif;color:var(--ink);margin:0 0 14px}.items{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));gap:18px}.group--pages .items,.group--conversions .items{grid-template-columns:repeat(auto-fit,minmax(min(100%,580px),1fr))}.group--branch-pages .items{display:grid;grid-template-columns:1fr;gap:28px}.item{min-width:0;border:1px solid var(--line);border-radius:18px;background:rgba(255,253,248,.92);overflow:hidden;box-shadow:0 6px 24px rgba(31,45,39,.04);scroll-margin-top:130px}.item-head{min-height:80px;padding:18px 20px 14px;display:flex;justify-content:space-between;gap:14px;align-items:flex-start}.item-head h4{font:500 21px/1.15 Georgia,serif;color:var(--ink);margin:0}.item-head p{margin:6px 0 0;color:var(--muted);font-size:13px}.item-badges{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}.edit-mode{padding:5px 9px;font-size:11px;color:var(--muted)}.preview{position:relative;display:block;width:100%;background:#e7e4dc;border-block:1px solid var(--line)}.preview--image{aspect-ratio:16/10;overflow:hidden}.preview--image img{display:block;width:100%;height:100%;object-fit:contain}.preview--html{height:520px;min-height:280px;max-height:1100px;resize:vertical;overflow:auto}.preview--html iframe{display:block;width:100%;height:100%;border:0;background:white}.open{position:absolute;right:10px;top:10px;border:1px solid rgba(20,59,51,.28);border-radius:999px;padding:7px 12px;background:rgba(255,253,248,.93);color:var(--ink);text-decoration:none;font-size:12px;font-weight:700}.preview--layerdoc{min-height:250px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--muted);gap:8px}.preview--layerdoc strong{font:500 24px Georgia,serif;color:var(--ink)}.layerdoc-mark{font:500 38px Georgia,serif;color:var(--signal)}.published-page>p{padding:12px 16px;margin:0!important;background:#f3f0e9}.screen-sequence{padding:18px 0;border-block:1px solid var(--line);background:#f0eee8}.screen-sequence>p{padding:0 20px}.sequence-track{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(min(82vw,420px),1fr);gap:14px;overflow-x:auto;padding:0 20px 8px;scroll-snap-type:x proximity}.screen{margin:0;border:1px solid var(--line);border-radius:13px;overflow:hidden;background:var(--panel);scroll-snap-align:start}.screen .preview{border-top:0}.screen figcaption{padding:13px 15px 15px}.screen h5{font:500 17px/1.2 Georgia,serif;margin:0;color:var(--ink)}.screen figcaption p{font-size:12px;color:var(--muted);margin:7px 0 0}.comparison{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--line);border-block:1px solid var(--line)}.comparison section{background:var(--panel);min-width:0}.comparison .eyebrow{padding:10px 14px;margin:0!important}.comparison .preview{border-bottom:0}.edit-receipt{padding:10px 18px;margin:0;color:var(--muted);font-size:12px;border-bottom:1px solid var(--line)}.diff-strip{display:flex;gap:10px;overflow-x:auto;padding:12px 18px;border-bottom:1px solid var(--line);background:#fff8ef}.diff-region{flex:0 0 min(340px,82vw);border-left:3px solid var(--signal);padding:8px 10px;background:var(--panel)}.diff-region strong{display:block;color:var(--ink);font-size:12px}.diff-region span{display:block;color:var(--muted);font-size:11px;margin-top:3px}.diff-region del,.diff-region ins{display:block;font-size:12px;text-decoration:none;margin-top:5px}.diff-region del{color:#8f3a2f}.diff-region ins{color:#1f6955}.controls{display:grid;grid-template-columns:minmax(0,1fr);gap:0}.feedback,.edit{padding:18px 20px}.edit{border-top:1px solid var(--line);background:#f3f4ef}.edit--disabled p,.edit-note{margin:0;color:var(--muted)}label{display:grid;gap:7px;color:var(--ink);font-weight:700;font-size:13px}textarea{width:100%;min-height:82px;resize:vertical;border:1px solid #bbb9b1;border-radius:10px;padding:11px 12px;background:#fff;color:var(--text);outline:none}textarea:focus{border-color:var(--ink);box-shadow:0 0 0 3px rgba(20,59,51,.12)}.mark-row,.save-row{display:flex;align-items:center;gap:8px}.mark-row{margin-bottom:14px;flex-wrap:wrap}.mark-row button,.save,.apply{border:1px solid var(--ink);border-radius:999px;background:transparent;color:var(--ink);padding:8px 13px;font-weight:750;cursor:pointer}.mark-row button.active,.save,.apply{background:var(--ink);color:white}.mark-row .clear{border-color:transparent;color:var(--muted)}.save-row{margin-top:11px;min-height:36px}.save,.apply{border-radius:9px;padding:9px 18px}.apply{background:var(--signal);border-color:var(--signal)}button:disabled{cursor:wait;opacity:.55}.status{font-size:12px;color:var(--muted)}.cost{margin:10px 0 0;color:var(--muted);font-size:12px}.cost strong{color:var(--signal)}.history{border-top:1px solid var(--line);padding:12px 20px}.history summary{cursor:pointer;color:var(--ink);font-weight:750}.history ol{margin:10px 0 0;padding-left:22px}.history li{padding:5px 0;color:var(--muted);font-size:12px}.history a{color:var(--ink)}code{font:12px ui-monospace,SFMono-Regular,Menlo,monospace;background:#e9e5dc;padding:2px 5px;border-radius:4px}\n .prototype-panel{margin-top:24px;border:1px solid var(--line);border-radius:18px;background:rgba(255,253,248,.92);overflow:hidden;box-shadow:0 6px 24px rgba(31,45,39,.04)}.prototype-panel--empty,.prototype-copy{padding:20px;display:flex;align-items:flex-end;justify-content:space-between;gap:22px}.prototype-panel h3{font:500 24px Georgia,serif;color:var(--ink);margin:0}.prototype-panel p{margin:7px 0 0;color:var(--muted);max-width:880px}.prototype-action{display:flex;align-items:center;gap:10px;flex:0 0 auto}.prototype-action--disabled{font-size:12px}.prototype-panel>.preview--html{height:680px;border-bottom:0}.prototype-holdings{padding:24px;border-top:1px solid var(--line);background:#f3f0e9}.prototype-holdings>header{margin-bottom:16px}.holding-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,440px),1fr));gap:16px}.holding-card{min-width:0;background:var(--panel);border:1px solid var(--line);border-radius:15px;overflow:hidden}.holding-card .preview--html{height:360px}.holding-card .edit{border-top:0}\n @media(max-width:760px){.mast{position:static;align-items:flex-start;flex-direction:column}.summary{justify-content:flex-start}.shell{padding-top:24px}.run-head,.prototype-panel--empty,.prototype-copy{flex-direction:column;align-items:flex-start}.comparison{grid-template-columns:1fr}.preview--html{height:400px}.item-head{min-height:0}.screen{flex-basis:86vw}}\n";
2
- export declare const REVIEW_PAGE_SCRIPT = "\n const post = async (url, body) => {\n const response = await fetch(url, {method:'POST',headers:{'content-type':'application/json'},body:JSON.stringify(body)});\n const payload = await response.json().catch(() => ({error:'The server returned no detail.'}));\n if (!response.ok) throw new Error(payload.error || 'The request failed.');\n return payload;\n };\n for (const form of document.querySelectorAll('[data-feedback]')) {\n const status = form.querySelector('.status');\n const save = async () => {\n status.textContent = 'Saving\u2026';\n try {\n await post('/api/feedback', {runId:form.dataset.run,itemId:form.dataset.item,note:form.elements.note.value,mark:form.dataset.mark || null});\n status.textContent = 'Saved';\n } catch (error) { status.textContent = error.message; }\n };\n form.addEventListener('submit', (event) => { event.preventDefault(); save(); });\n for (const button of form.querySelectorAll('[data-mark]')) button.addEventListener('click', () => {\n form.dataset.mark = button.dataset.mark;\n for (const peer of form.querySelectorAll('[data-mark]')) {\n const active = Boolean(peer.dataset.mark) && peer.dataset.mark === form.dataset.mark;\n peer.classList.toggle('active', active); peer.setAttribute('aria-pressed', String(active));\n }\n save();\n });\n }\n for (const form of document.querySelectorAll('[data-edit]')) form.addEventListener('submit', async (event) => {\n event.preventDefault();\n const button = form.querySelector('.apply'); const status = form.querySelector('.status');\n button.disabled = true; status.textContent = form.dataset.mode === 'convert-then-edit' ? 'Converting, then editing\u2026' : 'Applying\u2026';\n try {\n await post('/api/edit', {runId:form.dataset.run,itemId:form.dataset.item,prompt:form.elements.prompt.value});\n status.textContent = 'Applied'; window.location.reload();\n } catch (error) { status.textContent = error.message; button.disabled = false; }\n });\n for (const form of document.querySelectorAll('[data-prototype]')) form.addEventListener('submit', async (event) => {\n event.preventDefault();\n const button = form.querySelector('.apply'); const status = form.querySelector('.status');\n button.disabled = true; status.textContent = 'Building prototype\u2026';\n try {\n await post('/api/prototype', {runId:form.dataset.run});\n status.textContent = 'Built'; window.location.reload();\n } catch (error) { status.textContent = error.message; button.disabled = false; }\n });\n for (const form of document.querySelectorAll('[data-fill-gap]')) form.addEventListener('submit', async (event) => {\n event.preventDefault();\n const button = form.querySelector('.apply'); const status = form.querySelector('.status');\n button.disabled = true; status.textContent = 'Generating, converting, then rebuilding\u2026';\n try {\n await post('/api/prototype/fill', {runId:form.dataset.run,holding:form.dataset.holding});\n status.textContent = 'Filled'; window.location.reload();\n } catch (error) { status.textContent = error.message; button.disabled = false; }\n });\n";
2
+ export declare const REVIEW_PAGE_SCRIPT = "\n const token = document.querySelector('meta[name=\"12ui-review-token\"]').content;\n const post = async (url, body) => {\n const response = await fetch(url, {method:'POST',headers:{'content-type':'application/json','x-12ui-token':token},body:JSON.stringify(body)});\n const payload = await response.json().catch(() => ({error:'The server returned no detail.'}));\n if (!response.ok) throw new Error(payload.error || 'The request failed.');\n return payload;\n };\n for (const form of document.querySelectorAll('[data-feedback]')) {\n const status = form.querySelector('.status');\n const save = async () => {\n status.textContent = 'Saving\u2026';\n try {\n await post('/api/feedback', {runId:form.dataset.run,itemId:form.dataset.item,note:form.elements.note.value,mark:form.dataset.mark || null});\n status.textContent = 'Saved';\n } catch (error) { status.textContent = error.message; }\n };\n form.addEventListener('submit', (event) => { event.preventDefault(); save(); });\n for (const button of form.querySelectorAll('[data-mark]')) button.addEventListener('click', () => {\n form.dataset.mark = button.dataset.mark;\n for (const peer of form.querySelectorAll('[data-mark]')) {\n const active = Boolean(peer.dataset.mark) && peer.dataset.mark === form.dataset.mark;\n peer.classList.toggle('active', active); peer.setAttribute('aria-pressed', String(active));\n }\n save();\n });\n }\n for (const form of document.querySelectorAll('[data-edit]')) form.addEventListener('submit', async (event) => {\n event.preventDefault();\n const button = form.querySelector('.apply'); const status = form.querySelector('.status');\n button.disabled = true; status.textContent = form.dataset.mode === 'convert-then-edit' ? 'Converting, then editing\u2026' : 'Applying\u2026';\n try {\n await post('/api/edit', {runId:form.dataset.run,itemId:form.dataset.item,prompt:form.elements.prompt.value});\n status.textContent = 'Applied'; window.location.reload();\n } catch (error) { status.textContent = error.message; button.disabled = false; }\n });\n for (const form of document.querySelectorAll('[data-prototype]')) form.addEventListener('submit', async (event) => {\n event.preventDefault();\n const button = form.querySelector('.apply'); const status = form.querySelector('.status');\n button.disabled = true; status.textContent = 'Building prototype\u2026';\n try {\n await post('/api/prototype', {runId:form.dataset.run});\n status.textContent = 'Built'; window.location.reload();\n } catch (error) { status.textContent = error.message; button.disabled = false; }\n });\n for (const form of document.querySelectorAll('[data-fill-gap]')) form.addEventListener('submit', async (event) => {\n event.preventDefault();\n const button = form.querySelector('.apply'); const status = form.querySelector('.status');\n button.disabled = true; status.textContent = 'Generating, converting, then rebuilding\u2026';\n try {\n await post('/api/prototype/fill', {runId:form.dataset.run,holding:form.dataset.holding});\n status.textContent = 'Filled'; window.location.reload();\n } catch (error) { status.textContent = error.message; button.disabled = false; }\n });\n";
3
3
  //# sourceMappingURL=review-page-assets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"review-page-assets.d.ts","sourceRoot":"","sources":["../src/review-page-assets.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,m7RAM9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,upGAqD9B,CAAC"}
1
+ {"version":3,"file":"review-page-assets.d.ts","sourceRoot":"","sources":["../src/review-page-assets.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,m7RAM9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,iwGAsD9B,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { REVIEW_TOKEN_HEADER } from './review-server-guard.js';
1
2
  export const REVIEW_PAGE_STYLES = `
2
3
  :root{color-scheme:light;--paper:#f7f3ed;--panel:#fffdf8;--ink:#143b33;--text:#202523;--muted:#6a706c;--line:#d9d4ca;--signal:#ef6b22;--soft:#e8eee9;--shadow:0 18px 50px rgba(31,45,39,.08)}
3
4
  *{box-sizing:border-box}html{background:var(--paper);scroll-behavior:smooth}body{margin:0;color:var(--text);font:15px/1.45 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:radial-gradient(circle at 8% 16%,rgba(239,107,34,.08),transparent 24rem),var(--paper)}
@@ -6,8 +7,9 @@ export const REVIEW_PAGE_STYLES = `
6
7
  @media(max-width:760px){.mast{position:static;align-items:flex-start;flex-direction:column}.summary{justify-content:flex-start}.shell{padding-top:24px}.run-head,.prototype-panel--empty,.prototype-copy{flex-direction:column;align-items:flex-start}.comparison{grid-template-columns:1fr}.preview--html{height:400px}.item-head{min-height:0}.screen{flex-basis:86vw}}
7
8
  `;
8
9
  export const REVIEW_PAGE_SCRIPT = `
10
+ const token = document.querySelector('meta[name="12ui-review-token"]').content;
9
11
  const post = async (url, body) => {
10
- const response = await fetch(url, {method:'POST',headers:{'content-type':'application/json'},body:JSON.stringify(body)});
12
+ const response = await fetch(url, {method:'POST',headers:{'content-type':'application/json','${REVIEW_TOKEN_HEADER}':token},body:JSON.stringify(body)});
11
13
  const payload = await response.json().catch(() => ({error:'The server returned no detail.'}));
12
14
  if (!response.ok) throw new Error(payload.error || 'The request failed.');
13
15
  return payload;
@@ -1 +1 @@
1
- {"version":3,"file":"review-page-assets.js","sourceRoot":"","sources":["../src/review-page-assets.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;CAMjC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqDjC,CAAC"}
1
+ {"version":3,"file":"review-page-assets.js","sourceRoot":"","sources":["../src/review-page-assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;CAMjC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;mGAGiE,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDrH,CAAC"}
@@ -1,3 +1,10 @@
1
1
  import type { ReviewModel } from './review-types.js';
2
- export declare const renderReviewPage: (model: ReviewModel) => string;
2
+ /**
3
+ * `token` is the serving session's secret (`review-server-guard.ts`): the page's actions send it with every POST.
4
+ * `files` is the origin the run files are served from (`review-files-server.ts`), never this page's own.
5
+ */
6
+ export declare const renderReviewPage: (model: ReviewModel, session: {
7
+ token: string;
8
+ files: string;
9
+ }) => string;
3
10
  //# sourceMappingURL=review-page.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"review-page.d.ts","sourceRoot":"","sources":["../src/review-page.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAIV,WAAW,EAEZ,MAAM,mBAAmB,CAAC;AAyQ3B,eAAO,MAAM,gBAAgB,GAAI,OAAO,WAAW,KAAG,MAoBrD,CAAC"}
1
+ {"version":3,"file":"review-page.d.ts","sourceRoot":"","sources":["../src/review-page.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAIV,WAAW,EAEZ,MAAM,mBAAmB,CAAC;AAiR3B;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,WAAW,EAAE,SAAS;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,KAAG,MAoBhG,CAAC"}