@runeditrun/rer 0.2.78 → 0.2.80

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 (116) hide show
  1. package/README.md +17 -3
  2. package/cli/README.md +25 -13
  3. package/cli/authoring.mjs +14 -0
  4. package/cli/contract.mjs +25 -5
  5. package/cli/demo-host.mjs +4 -2
  6. package/cli/dev-identity.mjs +2 -2
  7. package/cli/export.mjs +1 -1
  8. package/cli/inspect.mjs +38 -2
  9. package/cli/main.mjs +8 -2
  10. package/cli/managed-server.mjs +1 -1
  11. package/cli/parse.mjs +7 -6
  12. package/cli/portability-worker.mjs +2 -1
  13. package/cli/portability.mjs +6 -2
  14. package/cli/production-auth.mjs +2 -1
  15. package/cli/production-mail.mjs +36 -9
  16. package/cli/project.mjs +5 -14
  17. package/cli/release.mjs +2 -1
  18. package/cli/server-proxy.mjs +30 -8
  19. package/cli/site-preview.mjs +4 -1
  20. package/cli/site.mjs +3 -2
  21. package/cli/upstream-agent.mjs +14 -0
  22. package/edition-authoring/adopt.mjs +39 -0
  23. package/edition-authoring/base-acknowledgements.mjs +24 -0
  24. package/edition-authoring/base-copies.mjs +418 -0
  25. package/edition-authoring/cli.mjs +85 -0
  26. package/edition-authoring/copy-checkout.mjs +69 -0
  27. package/edition-authoring/files.mjs +15 -2
  28. package/edition-authoring/lock.mjs +48 -0
  29. package/edition-authoring/offline-git.mjs +28 -0
  30. package/edition-authoring/parent-comparison.mjs +77 -0
  31. package/edition-authoring/projection-lock.mjs +38 -0
  32. package/edition-authoring/release.mjs +48 -0
  33. package/edition-authoring/sources.mjs +114 -0
  34. package/edition-authoring/updates.mjs +105 -0
  35. package/global/CHANGELOG.md +17 -0
  36. package/global/README.md +17 -3
  37. package/global/cli/install.mjs +3 -1
  38. package/global/main.mjs +9 -12
  39. package/modules/container/build.mjs +1 -1
  40. package/modules/d1-transport/index.mjs +68 -21
  41. package/modules/demo/README.md +8 -2
  42. package/modules/demo/declaration.mjs +21 -0
  43. package/modules/demo/input-path.mjs +18 -0
  44. package/modules/demo/label.d.mts +1 -1
  45. package/modules/demo/label.mjs +10 -5
  46. package/modules/demo/navigation.mjs +32 -0
  47. package/modules/demo/run-url.mjs +9 -0
  48. package/modules/demo/vite.d.mts +7 -2
  49. package/modules/demo/vite.mjs +17 -2
  50. package/modules/demo-host/README.md +5 -3
  51. package/modules/demo-host/native/visitor.mjs +1 -1
  52. package/modules/demo-host/page-style.mjs +2 -2
  53. package/modules/demo-host/pages.mjs +3 -3
  54. package/modules/demo-host/plan.mjs +6 -4
  55. package/modules/demo-host/theme.mjs +5 -2
  56. package/modules/deploy-kit/README.md +19 -15
  57. package/modules/deploy-kit/owner-cli.mjs +1 -1
  58. package/modules/deploy-kit/readiness-window.mjs +3 -3
  59. package/modules/erasure/README.md +10 -5
  60. package/modules/import-kit/src/d1/README.md +15 -9
  61. package/modules/import-kit/src/d1/apply.ts +10 -6
  62. package/modules/import-kit/src/d1/atomic-prefix.ts +64 -0
  63. package/modules/import-kit/src/d1/budget.ts +48 -26
  64. package/modules/import-kit/src/d1/compressed-plan.ts +9 -2
  65. package/modules/import-kit/src/d1/database.ts +2 -1
  66. package/modules/import-kit/src/d1/jobs.ts +2 -1
  67. package/modules/import-kit/src/d1/plans.ts +4 -2
  68. package/modules/import-kit/src/d1/verified-plan.ts +63 -0
  69. package/modules/integrations/core/README.md +2 -2
  70. package/modules/mail/README.md +4 -3
  71. package/modules/mail/pnpm-lock.yaml +16 -0
  72. package/modules/operator-auth/accounts/native.mjs +3 -1
  73. package/modules/operator-auth/accounts/provider-control.mjs +7 -4
  74. package/modules/operator-auth/accounts/provider-setup.mjs +34 -0
  75. package/modules/operator-auth/accounts/settings-page.mjs +13 -4
  76. package/modules/operator-auth/conformance/README.md +1 -1
  77. package/modules/operator-auth/dev/index.mjs +22 -4
  78. package/modules/operator-auth/dev/refusal.mjs +19 -0
  79. package/modules/operator-auth/docs/README.md +6 -5
  80. package/modules/operator-auth/docs/tanstack-start.md +1 -1
  81. package/modules/operator-auth/docs/vite-spa.md +5 -6
  82. package/modules/operator-auth/index.d.mts +1 -1
  83. package/modules/operator-auth/page.mjs +14 -0
  84. package/modules/operator-auth/representation.mjs +83 -0
  85. package/modules/operator-auth/routes.mjs +25 -2
  86. package/modules/portability/README.md +91 -14
  87. package/modules/portability/bookkeeping.mjs +3 -3
  88. package/modules/portability/bridge.mjs +5 -4
  89. package/modules/portability/catalogue.mjs +12 -8
  90. package/modules/portability/cli.mjs +5 -1
  91. package/modules/portability/export.mjs +5 -11
  92. package/modules/portability/format.mjs +7 -1
  93. package/modules/portability/http-errors.mjs +51 -0
  94. package/modules/portability/http.mjs +4 -1
  95. package/modules/portability/import-lease.mjs +13 -2
  96. package/modules/portability/import.mjs +10 -0
  97. package/modules/portability/index.d.mts +3 -0
  98. package/modules/portability/references.mjs +20 -0
  99. package/modules/portability/schema-identity.mjs +13 -0
  100. package/modules/portability/schema-legacy.mjs +21 -0
  101. package/modules/portability/sqlite-tokens.mjs +121 -0
  102. package/modules/release/README.md +20 -9
  103. package/modules/release/github-verify.mjs +30 -9
  104. package/modules/site/docs-search/search.css +1 -1
  105. package/onboarding/README.md +16 -4
  106. package/onboarding/adapter.mjs +5 -1
  107. package/onboarding/schema/SETUP.schema.json +26 -1
  108. package/onboarding/schema/business-field-inputs.mjs +37 -0
  109. package/onboarding/schema/json-schema.mjs +6 -2
  110. package/onboarding/schema/setup-validation.mjs +20 -3
  111. package/onboarding/server.mjs +1 -1
  112. package/onboarding/setup-manifest.mjs +2 -0
  113. package/onboarding/start-origin-diagnostic.mjs +24 -0
  114. package/onboarding/ui/style.css +9 -9
  115. package/package.json +1 -1
  116. package/scripts/publish-check/README.md +1 -1
@@ -0,0 +1,121 @@
1
+ import { insist } from './storage.mjs';
2
+
3
+ // SQLite's public-domain sqlite3GetToken (src/tokenize.c). Scan original
4
+ // characters once: never strip trivia before deciding where a token ends.
5
+ // Unknown or deliberately unsupported syntax is a schema refusal, not a token.
6
+ const digit = c => c !== undefined && c >= '0' && c <= '9';
7
+ const hex = c => digit(c) || (c !== undefined && ((c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F')));
8
+ const letter = c => c !== undefined && ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'));
9
+ const id = c => letter(c) || digit(c) || c === '_' || c === '$' || (c !== undefined && c.charCodeAt(0) >= 128);
10
+ const space = c => c !== undefined && ' \t\n\f\r'.includes(c);
11
+ const refuse = () => insist(false, 'schema_mismatch:unsupported_sql', 409);
12
+ export const asciiFold = text => text.replace(/[A-Z]/g, c => c.toLowerCase());
13
+
14
+ // Only grammar-reserved keywords can be folded without parsing. SQLite's
15
+ // fallback/JOIN/window keywords can instead be identifiers or DEFAULT strings.
16
+ // Keep their original spelling, as well as every ordinary identifier.
17
+ const reserved = new Set(`add all alter and as autoincrement between case check collate commit constraint create default deferrable delete distinct drop else escape exists foreign from group having in index insert intersect into is isnull join limit not notnull null on or order primary references returning select set table then to transaction union unique update using values when where`.split(' '));
18
+ const keywords = new Set(`abort action add after all alter always analyze and as asc attach autoincrement before begin between by cascade case cast check collate column commit conflict constraint create cross current current_date current_time current_timestamp database default deferrable deferred delete desc detach distinct do drop each else end escape except exclude exclusive exists explain fail filter first following for foreign from full generated glob group groups having if ignore immediate in index indexed initially inner insert instead intersect into is isnull join key last left like limit match materialized natural no not nothing notnull null nulls of offset on or order others outer over partition plan pragma preceding primary query raise range recursive references regexp reindex release rename replace restrict returning right rollback row rows savepoint select set table temp temporary then ties to transaction trigger unbounded union unique update using vacuum values view virtual when where window with without`.split(' '));
19
+ const operators = new Set(['||','->','->>','<=','>=','<>','!=','<<','>>','==']);
20
+
21
+ function digits(sql, at, accepts) {
22
+ let i = at;
23
+ while (accepts(sql[i]) || sql[i] === '_') {
24
+ if (sql[i] === '_' && (!accepts(sql[i-1]) || !accepts(sql[i+1]))) refuse();
25
+ i++;
26
+ }
27
+ return i;
28
+ }
29
+ function number(sql, start) {
30
+ let i = start, type = 'integer';
31
+ if (sql[i] === '0' && ['x','X'].includes(sql[i+1]) && hex(sql[i+2])) {
32
+ i = digits(sql, i+2, hex); type = 'hex';
33
+ } else {
34
+ i = digits(sql, i, digit);
35
+ if (sql[i] === '.') { type = 'float'; i = digits(sql, i+1, digit); }
36
+ if (['e','E'].includes(sql[i])) {
37
+ type = 'float'; i++;
38
+ if (['+','-'].includes(sql[i])) i++;
39
+ if (!digit(sql[i])) refuse();
40
+ i = digits(sql, i, digit);
41
+ }
42
+ }
43
+ if (id(sql[i])) refuse();
44
+ return { end: i, type };
45
+ }
46
+ function variable(sql, start) {
47
+ let i = start+1, count = 0;
48
+ if (sql[start] === '?') { while (digit(sql[i])) i++; return i; }
49
+ while (i < sql.length) {
50
+ if (id(sql[i])) { count++; i++; }
51
+ else if (sql.startsWith('::', i)) i += 2;
52
+ else if (sql[i] === '(' && count) {
53
+ i++;
54
+ while (i < sql.length && !space(sql[i]) && sql[i] !== '\v' && sql[i] !== ')') i++;
55
+ if (sql[i] !== ')') refuse();
56
+ i++; break;
57
+ } else break;
58
+ }
59
+ if (!count) refuse();
60
+ return i;
61
+ }
62
+ export function sqliteTokens(sql, { trivia = false } = {}) {
63
+ if (typeof sql !== 'string' || sql.includes('\0') || !sql.isWellFormed()) refuse();
64
+ const result = [];
65
+ for (let i = 0; i < sql.length;) {
66
+ const start = i, c = sql[i]; let type;
67
+ if (space(c)) { while (space(sql[i])) i++; type = 'space'; }
68
+ else if (c === '\v' || c === '\ufeff') refuse();
69
+ else if (sql.startsWith('--', i)) { i = sql.indexOf('\n', i+2); if (i < 0) i = sql.length; type = 'comment'; }
70
+ else if (sql.startsWith('/*', i)) {
71
+ const end = sql.indexOf('*/', i+2); if (end < 0) refuse();
72
+ i = end+2; type = 'comment';
73
+ } else if ((c === 'x' || c === 'X') && sql[i+1] === "'") {
74
+ i += 2; const first = i;
75
+ while (hex(sql[i])) i++;
76
+ if (sql[i] !== "'" || (i-first)%2) refuse();
77
+ i++; type = 'blob';
78
+ } else if ('\'"`['.includes(c)) {
79
+ const close = c === '[' ? ']' : c; i++; let closed = false;
80
+ while (i < sql.length) {
81
+ if (sql[i++] !== close) continue;
82
+ if (c !== '[' && sql[i] === close) { i++; continue; }
83
+ closed = true; break;
84
+ }
85
+ if (!closed) refuse();
86
+ type = c === "'" ? 'string' : 'quoted-identifier';
87
+ } else if (digit(c) || (c === '.' && digit(sql[i+1]))) {
88
+ const numeric = number(sql, i); i = numeric.end; type = numeric.type;
89
+ } else if ('?@:$#'.includes(c)) { i = variable(sql, i); type = 'variable'; }
90
+ else if (letter(c) || c === '_' || c.charCodeAt(0) >= 128) {
91
+ while (id(sql[++i])) { /* longest identifier */ }
92
+ type = keywords.has(asciiFold(sql.slice(start,i))) ? 'keyword' : 'identifier';
93
+ } else {
94
+ const three = sql.slice(i,i+3), two = sql.slice(i,i+2);
95
+ if (operators.has(three)) i += 3;
96
+ else if (operators.has(two)) i += 2;
97
+ else if ('+-*/%<>=&|~();,.'.includes(c)) i++;
98
+ else refuse();
99
+ type = 'operator';
100
+ }
101
+ const text = sql.slice(start,i);
102
+ if (trivia || (type !== 'space' && type !== 'comment')) result.push({type,text,start,end:i,
103
+ value:type === 'keyword' && reserved.has(asciiFold(text)) ? asciiFold(text) : text});
104
+ }
105
+ return result;
106
+ }
107
+ const spelling = list => JSON.stringify(list.map(({type,text}) => [type,text]));
108
+ // One lexer defines the boundary rule, including comment creation, doubled
109
+ // quotes, numeric prefixes, variables and longest-match operators.
110
+ export function significantBoundary(left, right) {
111
+ try { return spelling(sqliteTokens(left.text+right.text)) !== spelling([left,right]); }
112
+ catch { return true; }
113
+ }
114
+ export function canonicalTokens(sql) {
115
+ const tokens = sqliteTokens(sql), canonical = tokens.map(t => ({...t,text:t.value}));
116
+ const joined = canonical.map((t,i) => (i && significantBoundary(canonical[i-1],t) ? ' ' : '')+t.text).join('');
117
+ // Check the entire stream too: a lookahead spanning more than one boundary
118
+ // must never silently collapse. Unsupported cases refuse at the public door.
119
+ if (spelling(sqliteTokens(joined)) !== spelling(canonical)) refuse();
120
+ return {tokens:tokens.map(({type,value}) => [type,value]),sql:joined};
121
+ }
@@ -63,11 +63,19 @@ For a GitHub source, the producer uses the operator's existing `gh` authenticati
63
63
  to resolve the source repository's **Verify** workflow for the exact selected
64
64
  commit. The source identity comes from its GitHub `origin` (HTTPS or SSH), or the
65
65
  committed `rer-project.json.sourceRepository` when no GitHub origin is present;
66
- it is independent of the publication destination. Only a completed successful
67
- `push` or `workflow_dispatch` run on the default branch or the version's release
68
- tag qualifies. The run and head repository must both match the source repository,
69
- and a release tag must resolve remotely to the exact source commit. PR merge runs,
70
- other SHAs, repositories, branches and unsuccessful runs cannot authorize release.
66
+ it is independent of the publication destination. A completed successful run of
67
+ the selected workflow qualifies when its `head_sha` equals the source commit
68
+ exactly, both `repository.full_name` and `head_repository.full_name` match the
69
+ source repository, and its event is `push` or `workflow_dispatch`. Any branch
70
+ of that repository can qualify. These events run that commit's own workflow
71
+ file on that commit's tree. Pull-request runs test a merge ref and cannot serve
72
+ as exact-SHA evidence, even for a same-repository PR. Fork runs and other events
73
+ cannot authorize release. A run on the version's release tag still requires
74
+ that tag to resolve remotely to the source commit. A failed tag lookup
75
+ disqualifies that tag run; a separate qualifying run can still authorize release.
76
+ When several runs qualify, the highest run ID is selected. Failed or unfinished
77
+ duplicates do not invalidate a qualifying success; the receipt records them as
78
+ informational entries, including their run identities and outcomes.
71
79
  `gates.verify` records the source repository and commit, `workflowId`,
72
80
  `workflowFile`, `workflowName`, `runId`,
73
81
  `runUrl`, event, branch and conclusion in both receipt and site provenance.
@@ -87,15 +95,18 @@ script, when declared, in a disposable clone. `gates.verify.install` and
87
95
  `gates.verify.build` record those local results; failure or a tracked-source
88
96
  mutation blocks release. Publication/history/annotation scans, exact-source
89
97
  packaging, package integrity checks and the separate signing commands still run
90
- locally. A missing green Verify blocks with the exact SHA and instructions to
91
- push or re-run it. API/authentication failures also block, without substituting
92
- local verification.
98
+ locally. A missing green Verify blocks with the exact SHA and the rejected run
99
+ details; an unfinished run is named. Push the exact commit to any branch of the
100
+ source repository and wait for its selected Verify workflow to complete
101
+ successfully. If the required GitHub evidence cannot be resolved, release
102
+ blocks without substituting local verification.
93
103
 
94
104
  Pass **`--local-verify`** to explicitly retain the previous behavior: frozen
95
105
  installation, `pnpm run verify`, then the committed `pnpm run verify:release`
96
106
  when declared, with its result in `gates.verify.release`. Sources without a
97
107
  GitHub origin or committed source identity also retain this behavior. This local
98
- path needs the seed's browser prerequisites and any resources its verification
108
+ path is appropriate only when the repository's verification policy permits it
109
+ and needs the seed's browser prerequisites and any resources its verification
99
110
  requires. Routine CI and default verification do not invoke the release-only
100
111
  script.
101
112
 
@@ -43,7 +43,7 @@ function tagCommit(repository, tag) {
43
43
  export function githubVerify(source, repository, selector) {
44
44
  const result = { status: 'FAIL', provider: 'github', repository, commit: source.commit,
45
45
  reason: 'github-verify-not-successful',
46
- message: `No successful Verify run exists for ${repository} at exact source commit ${source.commit}. Push this commit to the default branch or release tag, or re-run Verify for this SHA with workflow_dispatch. Use --local-verify to run verification locally.` };
46
+ message: `No successful Verify run exists for ${repository} at exact source commit ${source.commit}. To obtain qualifying evidence, push the exact commit to any branch of ${repository} and wait for its Verify run to complete successfully. Check the run details below. --local-verify runs local verification instead, only when the repository's verification policy permits it.` };
47
47
  try {
48
48
  const metadata = api(`repos/${repository}`);
49
49
  if (!same(metadata.full_name, repository) || typeof metadata.default_branch !== 'string' || !metadata.default_branch) throw Error('repository');
@@ -53,8 +53,8 @@ export function githubVerify(source, repository, selector) {
53
53
  if (selected.error) return { ...result, details: selected.error };
54
54
  const workflow = selected.workflow;
55
55
  Object.assign(result, { workflowId: workflow.id, workflowFile: workflow.path, workflowName: workflow.name });
56
- const rejected = new Set();
57
- let checkedTag = false, tagSHA;
56
+ const rejected = new Set(), successful = [], information = [];
57
+ let checkedTag = false, tagSHA, tagUnavailable = false;
58
58
  const runs = api(`repos/${repository}/actions/workflows/${workflow.id}/runs?head_sha=${source.commit}&per_page=100`, true)
59
59
  .flatMap(page => page.workflow_runs);
60
60
  for (const run of runs) {
@@ -64,21 +64,42 @@ export function githubVerify(source, repository, selector) {
64
64
  }
65
65
  if (run.workflow_id !== workflow.id) { rejected.add('different workflow'); continue; }
66
66
  if (!['push', 'workflow_dispatch'].includes(run.event)) { rejected.add('event must be push or workflow_dispatch'); continue; }
67
+ const evidence = { runId: run.id, runUrl: `https://github.com/${metadata.full_name}/actions/runs/${run.id}`,
68
+ event: run.event, branch: run.head_branch, conclusion: run.conclusion };
67
69
  if (run.status !== 'completed' || run.conclusion !== 'success') {
68
- rejected.add(run.status === 'completed' ? `conclusion ${['failure', 'cancelled', 'skipped', 'timed_out', 'neutral', 'action_required', 'stale'].includes(run.conclusion) ? run.conclusion : 'not success'}` : 'run not completed');
70
+ const reason = run.status === 'completed'
71
+ ? `conclusion ${['failure', 'cancelled', 'skipped', 'timed_out', 'neutral', 'action_required', 'stale'].includes(run.conclusion) ? run.conclusion : 'not success'}`
72
+ : `run not completed (${run.status})`;
73
+ rejected.add(`Run ${run.id} on ${run.head_branch} (${run.event}): ${reason}; ${evidence.runUrl}`);
74
+ information.push({ ...evidence, status: run.status,
75
+ message: `${reason}; does not invalidate a separate successful Verify run for this exact SHA.` });
69
76
  continue;
70
77
  }
71
- if (run.head_branch !== metadata.default_branch) {
72
- if (run.head_branch !== source.tag) { rejected.add('neither default branch nor release tag'); continue; }
73
- if (!checkedTag) { tagSHA = tagCommit(repository, source.tag); checkedTag = true; }
78
+ // A push or workflow_dispatch run for this exact SHA ran this commit's
79
+ // own workflow file on this commit's tree, regardless of branch. A
80
+ // pull_request run tests its merge ref and cannot provide that evidence.
81
+ if (run.head_branch === source.tag && run.head_branch !== metadata.default_branch) {
82
+ if (!checkedTag) {
83
+ checkedTag = true;
84
+ try { tagSHA = tagCommit(repository, source.tag); }
85
+ catch { tagUnavailable = true; }
86
+ }
87
+ // A tag lookup failure rejects this run, not independent branch evidence.
88
+ if (tagUnavailable) { rejected.add('release tag could not be resolved'); continue; }
74
89
  if (tagSHA !== source.commit) { rejected.add('release tag points at a different commit'); continue; }
75
90
  }
76
91
  if (!Number.isSafeInteger(run.id) || run.id <= 0) throw Error('run');
92
+ successful.push(evidence);
93
+ }
94
+ // API page order is not an authority: select the highest qualifying run ID.
95
+ successful.sort((left, right) => right.runId - left.runId);
96
+ information.sort((left, right) => right.runId - left.runId);
97
+ if (successful.length) {
77
98
  return { status: 'PASS', provider: 'github', repository: metadata.full_name, commit: source.commit,
78
99
  workflowId: workflow.id, workflowFile: workflow.path, workflowName: workflow.name,
79
- runId: run.id, runUrl: `https://github.com/${metadata.full_name}/actions/runs/${run.id}`,
80
- event: run.event, branch: run.head_branch, conclusion: run.conclusion };
100
+ ...successful[0], ...(information.length ? { information } : {}) };
81
101
  }
102
+ if (tagUnavailable) throw Error('tag');
82
103
  result.details = rejected.size ? [...rejected].join('; ') : 'No runs found for this SHA.';
83
104
  } catch {
84
105
  result.reason = 'github-verify-unavailable';
@@ -6,7 +6,7 @@
6
6
  .docs-search input { display: block; width: 100%; min-width: 0; min-height: 42px; padding: 8px 0; border: 0; border-radius: 0; outline: none; background: transparent; color: var(--ink); font: inherit; font-size: 15px; line-height: 1.4; }
7
7
  .docs-search input::-webkit-search-cancel-button { filter: grayscale(1); }
8
8
  .docs-search input::placeholder { color: var(--ink-soft); opacity: 1; }
9
- .docs-search kbd { flex: none; padding: 0 5px; border: 1px solid var(--rule); border-radius: 3px; color: var(--ink-soft); font: inherit; font-size: 12px; line-height: 20px; }
9
+ .docs-search kbd { flex: none; padding: 0 5px; border: 1px solid var(--rule); border-radius: 3px; color: var(--ink-soft); font: inherit; font-size: 13px; line-height: 20px; }
10
10
  .docs-search-panel { margin-top: 10px; }
11
11
  .docs-search-status { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.4; }
12
12
  .docs-search-status:empty { display: none; }
@@ -175,6 +175,12 @@ their native look.
175
175
  appearance, at least 36px of right padding and its chevron 10-16px from the
176
176
  right edge.
177
177
 
178
+ `KEEP_BROWSER_CHECK=1` retains successful onboarding screenshots and axe reports;
179
+ failed checks retain them automatically.
180
+
181
+ The CLI wrapper's `RER_JOBS_MAX_WAIT_SECONDS` defaults to 1200 seconds, unlike the
182
+ bare queue's indefinite wait; admission timeout exits 75 without starting work.
183
+
178
184
  ## Setup behavior and custody
179
185
 
180
186
  Setup validates answers before effects, then uses the declared lifecycle to
@@ -213,14 +219,20 @@ is separate from bringing records in through the reviewed import door. Each
213
219
  first-party adapter declares which resources that archive export/restore supports.
214
220
  Every first-party seed verifies a complete local export/import/export round
215
221
  trip across those resources. Archives are private and integrity-checked;
216
- owner/auth, historical development mail, private settings and transient runtime state remain
217
- excluded. Archive restore validates and restores atomically into an empty destination.
222
+ historical development mail, private settings and transient runtime state remain
223
+ excluded. Identity retention depends on the seed's archive policy: default-seed
224
+ excludes authentication identities and the owner claim, while foundation retains
225
+ selected identity tables and the original claim. A restored job remains bound to
226
+ its recorded principal; verify whether that principal survives the selected policy.
227
+ Archive restore validates and restores atomically into an empty destination.
218
228
  Remote transfer is supported only when every required resource has a complete
219
229
  adapter implementation; unsupported targets fail visibly.
220
230
 
221
231
  Deployment uses each seed's actual owner-account declaration, resource policy,
222
- migrations and health check. Dry run validates and builds locally without
223
- provider requests. Local tests and structural checks do not establish hosted
232
+ migrations and health check. Application dry run builds and validates locally,
233
+ then uses Cloudflare credentials to read target secret bindings; it makes no
234
+ provider writes. Site and demo dry runs have their separately documented offline
235
+ behavior. Local tests and structural checks do not establish hosted
224
236
  acceptance or external mail delivery.
225
237
 
226
238
  Keep server authorization in every private handler, including direct server
@@ -15,6 +15,7 @@ import { appFetch } from './app-fetch.mjs';
15
15
  import { owner, signIn } from './adapter-auth.mjs';
16
16
  import { installerDevKey } from './dev-identity.mjs';
17
17
  import { assertArchiveFree } from './archive-output.mjs';
18
+ import { startOriginDiagnostic } from './start-origin-diagnostic.mjs';
18
19
  export { ownerAccountHosting } from './adapter-hosting.mjs';
19
20
 
20
21
  // The adapter kit for an existing seed. A seed's scripts/installer/local.mjs
@@ -229,7 +230,10 @@ async function start(context, hooks) {
229
230
  if (signal?.aborted) throw error;
230
231
  const ports=await ownedPorts();
231
232
  if(ports.length){
232
- const message=store.redact(`Application listened on port ${ports.join(', ')}; readiness failed for expected internal port ${expectedPort}. Check application health and the runtime target's port binding.`);
233
+ let diagnosis;
234
+ try { diagnosis=await startOriginDiagnostic(context,hooks,child,health,ready); }
235
+ catch (diagnosticError) { if(signal?.aborted)throw diagnosticError; }
236
+ const message=store.redact(diagnosis??`Application listened on port ${ports.join(', ')}; readiness failed for GET ${url} through expected internal port ${expectedPort}. Check application health and the runtime target's port binding.`);
233
237
  store.report(message);const prior=approvedFailure(error);error=commandFailure(`${prior?.message??readinessLabel}\n${message}`,prior??{});
234
238
  }
235
239
  throw installationFailure('command_failed', { step: 'start', diagnostic: error });
@@ -149,6 +149,28 @@
149
149
  "enum": ["owner", "developer"],
150
150
  "description": "Public fields only: owner or developer. When absent, inherit the group's audience, or owner without a group audience. An explicit owner value inside a developer group is invalid. This metadata does not change local installer or rer setup visibility; secret visibility uses ownerVisible and input."
151
151
  },
152
+ "businessField": {
153
+ "enum": [
154
+ "owner_email",
155
+ "legal_name",
156
+ "timezone",
157
+ "currency",
158
+ "jurisdiction",
159
+ "mail_sender",
160
+ "display_name",
161
+ "owner_name",
162
+ "brand_color",
163
+ "logo_ref",
164
+ "entity_type",
165
+ "state_of_organization",
166
+ "fiscal_year_start",
167
+ "books_start_date",
168
+ "tax_method",
169
+ "country",
170
+ "state"
171
+ ],
172
+ "description": "Optional public-field hint identifying the business profile value represented by this input. Secrets cannot declare this hint. It does not supply an answer or change validation."
173
+ },
152
174
  "required": {
153
175
  "type": "boolean"
154
176
  },
@@ -242,7 +264,10 @@
242
264
  "required": [
243
265
  "required",
244
266
  "ownerVisible"
245
- ]
267
+ ],
268
+ "not": {
269
+ "required": ["businessField"]
270
+ }
246
271
  }
247
272
  },
248
273
  {
@@ -0,0 +1,37 @@
1
+ // Exact input-to-profile permissions, not a credential-name classifier.
2
+ // Normalize case once for lookup. SETUP's separate ASCII upper-snake-case
3
+ // identifier grammar still applies; no separator, prefix or Unicode folding.
4
+ export const BUSINESS_FIELD_INPUTS = Object.freeze(Object.fromEntries(Object.entries({
5
+ owner_email: ['OWNER_EMAIL', 'FIRST_OWNER_EMAIL', 'OPERATOR_EMAIL', 'SEED_ADMIN_EMAIL', 'SETUP_OPERATOR_EMAIL', 'SETUP_OWNER_EMAIL', 'SUPPORT_EMAIL'],
6
+ legal_name: ['LEGAL_NAME', 'TRADING_NAME'],
7
+ timezone: ['WORKSPACE_TIMEZONE', 'LAMP_PAGE_TIMEZONE', 'TIMEZONE'],
8
+ currency: ['WORKSPACE_CURRENCY', 'CURRENCY'],
9
+ jurisdiction: ['JURISDICTION'],
10
+ mail_sender: ['MAIL_FROM', 'EMAIL_FROM', 'MAIL_FROM_ADDRESS', 'MAIL_SENDER'],
11
+ display_name: ['APP_NAME', 'WORKSPACE_NAME', 'DEFAULT_TEAM_NAME', 'LAMP_PAGE_NAME', 'LAMP_PAGE_TAGLINE', 'DISPLAY_NAME', 'BUSINESS_NAME'],
12
+ owner_name: ['OWNER_NAME', 'FIRST_OWNER_NAME', 'OWNER_DISPLAY_NAME'],
13
+ brand_color: ['PRIMARY_COLOR', 'LAMP_ACCENT_COLOR', 'BRAND_COLOR'],
14
+ logo_ref: ['LOGO_REF'],
15
+ entity_type: ['ENTITY_TYPE'],
16
+ state_of_organization: ['STATE_OF_ORGANIZATION'],
17
+ fiscal_year_start: ['FISCAL_YEAR_START'],
18
+ books_start_date: ['BOOKS_START_DATE'],
19
+ tax_method: ['TAX_METHOD'],
20
+ country: ['COUNTRY'],
21
+ state: ['STATE'],
22
+ }).map(([field, names]) => [field, Object.freeze(names)])));
23
+
24
+ /** Shared hint refusal for validators and the installer compiler's vault scope. */
25
+ export function businessFieldInputError(field, secretScopes = {}) {
26
+ if (!Object.hasOwn(field, 'businessField')) return;
27
+ if (field.kind === 'secret' || field.type === 'password' || field.secret === true
28
+ || Object.hasOwn(secretScopes, field.name)) {
29
+ return `${field.name} cannot claim Business field ${String(field.businessField)} because it is secret or vault-bound`;
30
+ }
31
+ if (typeof field.businessField !== 'string' || typeof field.name !== 'string') return;
32
+ const names = Object.hasOwn(BUSINESS_FIELD_INPUTS, field.businessField)
33
+ ? BUSINESS_FIELD_INPUTS[field.businessField] : [];
34
+ if (!names.includes(field.name.toUpperCase())) {
35
+ return `${field.name} cannot claim Business field ${field.businessField}: this name is not on the Business-field allow-list: add it in Base's schema table through a Base change, or rename the input to one of: ${names.join(', ') || '(choose a valid Business field first)'}`;
36
+ }
37
+ }
@@ -24,7 +24,7 @@ const SUPPORTED = new Set([
24
24
  '$schema', '$id', '$ref', '$defs', 'title', 'description',
25
25
  'type', 'enum', 'const', 'required', 'properties', 'additionalProperties',
26
26
  'propertyNames', 'items', 'minItems', 'maxItems', 'minLength', 'pattern', 'format',
27
- 'allOf', 'if', 'then', 'uniqueItems'
27
+ 'allOf', 'if', 'then', 'not', 'uniqueItems'
28
28
  ]);
29
29
 
30
30
  // The supported keywords whose value holds subschemas, and how they hold them:
@@ -37,7 +37,8 @@ const SUBSCHEMAS = {
37
37
  items: 'schema',
38
38
  allOf: 'list',
39
39
  if: 'schema',
40
- then: 'schema'
40
+ then: 'schema',
41
+ not: 'schema'
41
42
  };
42
43
 
43
44
  const SUPPORTED_FORMATS = new Set(['date']);
@@ -138,6 +139,9 @@ export function validate(schema, data, { root = schema, path = '$', label = '' }
138
139
  if (Object.hasOwn(schema, 'const') && data !== schema.const) {
139
140
  fail(`expected ${JSON.stringify(schema.const)}`);
140
141
  }
142
+ if (schema.not && validate(schema.not, data, { root, path }).length === 0) {
143
+ fail('must not match excluded schema');
144
+ }
141
145
 
142
146
  if (actual === 'string') {
143
147
  if (schema.minLength !== undefined && data.length < schema.minLength) fail(`must not be empty`);
@@ -1,6 +1,7 @@
1
1
  import { dependencyErrors } from './dependencies.mjs';
2
2
  export { validateDependencyGraph } from './dependencies.mjs';
3
3
  import {checkSchema, validate} from './json-schema.mjs';
4
+ import {businessFieldInputError} from './business-field-inputs.mjs';
4
5
 
5
6
  export const SETUP_SCHEMA_ID = 'urn:rer:setup:1';
6
7
 
@@ -103,11 +104,27 @@ function rejectDuplicateObjectKeys(text) {
103
104
  visit();
104
105
  }
105
106
 
107
+ // Run before grammar diagnostics too, so off-list names receive a useful next step.
108
+ function businessFieldErrors(data) {
109
+ const errors = [], claims = new Map();
110
+ for (const [index, field] of (Array.isArray(data?.fields) ? data.fields : []).entries()) {
111
+ if (!field || typeof field.name !== 'string' || !Object.hasOwn(field, 'businessField')) continue;
112
+ const path = `$.fields[${index}].businessField`;
113
+ const refusal = businessFieldInputError(field);
114
+ if (refusal) errors.push(`${path}: ${refusal}`);
115
+ if (typeof field.businessField !== 'string') continue;
116
+ const previous = claims.get(field.businessField);
117
+ if (previous !== undefined) errors.push(`${path}: ${previous} and ${field.name} both claim Business field ${field.businessField}; each Business field needs a single input`);
118
+ else claims.set(field.businessField, field.name);
119
+ }
120
+ return errors;
121
+ }
122
+
106
123
  /** Semantic checks that cannot be expressed in the portable JSON Schema subset. */
107
124
  export function setupManifestSemanticErrors(data) {
108
125
  if (!data || typeof data !== 'object' || Array.isArray(data)
109
126
  || !Array.isArray(data.fields) || !Array.isArray(data.groups) || !Array.isArray(data.steps)) return [];
110
- const errors = dependencyErrors(data);
127
+ const errors = [...dependencyErrors(data), ...businessFieldErrors(data)];
111
128
  const fail = (path, message) => errors.push(`${path}: ${message}`);
112
129
  const groups = new Map();
113
130
  for (const [index, group] of data.groups.entries()) {
@@ -329,11 +346,11 @@ export function validateSetupManifest(schema, data) {
329
346
  if (schema?.$id !== SETUP_SCHEMA_ID) throw new Error('Expected setup schema version 1');
330
347
  checkSchema(schema);
331
348
  const errors = validate(schema, data);
332
- if (errors.length) return errors.map(error => {
349
+ if (errors.length) return [...businessFieldErrors(data), ...errors.map(error => {
333
350
  const match = error.match(/^(\$\.(fields|groups)\[(\d+)\]\.audience):/);
334
351
  if (!match) return error;
335
352
  const item = data[match[2]][Number(match[3])];
336
353
  return `${match[1]}: ${item.name ?? item.id} audience must be "owner" or "developer"`;
337
- });
354
+ })];
338
355
  return setupManifestSemanticErrors(data);
339
356
  }
@@ -60,7 +60,7 @@ export async function startInstaller(root,{seed,port=0,answers,secretInput,noPre
60
60
  if(secretInput){vault.set(secretInput,store.state.draft);if(Object.keys(secretInput).length)store.activity.secrets();secretInput=undefined;}
61
61
  await workspaceArt?.request();
62
62
  store.state.known.providers=noPrefill||(!seed.features?.hosting&&!seed.features?.github)?{}:(await discoverProviders(root,{signal:abort.signal})).providers;
63
- const assets={'/setup-manifest.mjs':['../setup-manifest.mjs','text/javascript'],'/installer-inputs.mjs':['../installer-inputs.mjs','text/javascript'],'/schema/setup-validation.mjs':['../schema/setup-validation.mjs','text/javascript'],'/schema/dependencies.mjs':['../schema/dependencies.mjs','text/javascript'],'/schema/json-schema.mjs':['../schema/json-schema.mjs','text/javascript'],'/ui/model-core.mjs':['model-core.mjs','text/javascript'],'/seed.mjs':[seed.browserModule,'text/javascript'],'/model-core.mjs':['model-core.mjs','text/javascript'],'/workspace-art.js':['workspace-art.js','text/javascript'],'/activity.js':['activity.js','text/javascript'], '/':['index.html','text/html'], '/app.js':['app.js','text/javascript'], '/address-client.mjs':['address-client.mjs','text/javascript'], '/model.mjs':['model.mjs','text/javascript'], '/style.css':['style.css','text/css'], '/theme.css':['theme.css','text/css'], '/ocean.png':[null,seed.background?.endsWith('.svg')?'image/svg+xml':'image/png']};
63
+ const assets={'/setup-manifest.mjs':['../setup-manifest.mjs','text/javascript'],'/installer-inputs.mjs':['../installer-inputs.mjs','text/javascript'],'/schema/setup-validation.mjs':['../schema/setup-validation.mjs','text/javascript'],'/schema/dependencies.mjs':['../schema/dependencies.mjs','text/javascript'],'/schema/business-field-inputs.mjs':['../schema/business-field-inputs.mjs','text/javascript'],'/schema/json-schema.mjs':['../schema/json-schema.mjs','text/javascript'],'/ui/model-core.mjs':['model-core.mjs','text/javascript'],'/seed.mjs':[seed.browserModule,'text/javascript'],'/model-core.mjs':['model-core.mjs','text/javascript'],'/workspace-art.js':['workspace-art.js','text/javascript'],'/activity.js':['activity.js','text/javascript'], '/':['index.html','text/html'], '/app.js':['app.js','text/javascript'], '/address-client.mjs':['address-client.mjs','text/javascript'], '/model.mjs':['model.mjs','text/javascript'], '/style.css':['style.css','text/css'], '/theme.css':['theme.css','text/css'], '/ocean.png':[null,seed.background?.endsWith('.svg')?'image/svg+xml':'image/png']};
64
64
  for(const path of theme?.files.keys()??[])if(assets[path])throw Error(`Seed theme file ${path} collides with an installer path; serve it at another path.`);
65
65
  const equal=(a,b)=>typeof a==='string'&&a.length===b.length&&timingSafeEqual(Buffer.from(a),Buffer.from(b));
66
66
  const server=createServer(async(req,res)=>{
@@ -1,6 +1,7 @@
1
1
  import {parseSetupManifestBytes, validateSetupManifest, setupConditionMatches, validateSetupValue, setupFieldAudience} from './schema/setup-validation.mjs';
2
2
  import {createModel} from './ui/model-core.mjs';
3
3
  import {installerInputs} from './installer-inputs.mjs';
4
+ import {businessFieldInputError} from './schema/business-field-inputs.mjs';
4
5
 
5
6
  const legacy=['fields','safeKeys','setupGroups','requiredKeys','secretScopes','summaryDefaults','initialValues','installInput'];
6
7
  export function refuseLegacySetup(value) {
@@ -26,6 +27,7 @@ export function createInstallerModel(manifest,presentation={},options={}) {
26
27
  for(const field of manifest.fields)if(field.kind==='secret'&&field.input!=='entered'&&!field.generate&&
27
28
  (field.required||field.presentations?.some(item=>item.required))&&!supplied.includes(field.name))throw Error(`rer-setup.json: required managed secret ${field.name} needs adapter supplied declaration.`);
28
29
  const own=installerInputs({...presentation.features,ownerBootstrap});
30
+ for(const field of manifest.fields){const refusal=businessFieldInputError(field,own.secretScopes);if(refusal)throw Error(`rer-setup.json: ${refusal}`);}
29
31
  // Compile browser roles once from the manifest, preserving its input names.
30
32
  // The first required text field names the workspace; URL/colour fields provide
31
33
  // artwork context. Installer-owned hosting inputs are outside that context.
@@ -0,0 +1,24 @@
1
+ import { readSettings } from './adapter-settings.mjs';
2
+ import { loopbackRequest } from './app-fetch.mjs';
3
+ import { inspectionContext, listenerOwnership } from './process-diagnostics.mjs';
4
+
5
+ // Diagnosis only: an alternate Host can explain a failed start, never make it
6
+ // ready. Inspect custody before sending either request to the internal listener.
7
+ export async function startOriginDiagnostic(context, hooks, child, health, ready) {
8
+ if (context.verb !== 'dev' || !context.runtimePort || ready || hooks.health || health !== '/health' || !hooks.secrets?.originKey) return;
9
+ const key = hooks.secrets.originKey;
10
+ const saved = (await readSettings(context.root, hooks.secrets)).values[key];
11
+ let previous, selected;
12
+ try { previous = new URL(saved); selected = new URL(context.origin); } catch { return; }
13
+ if (previous.origin !== saved || previous.origin === selected.origin || previous.protocol !== 'http:' || selected.protocol !== 'http:') return;
14
+ const { signal, runtimePort: port } = context;
15
+ const ownership = await listenerOwnership(child.pid, port, '127.0.0.1', inspectionContext({ port, verb: 'dev', signal }));
16
+ if (ownership.status !== 'owned') return;
17
+ const request = host => loopbackRequest({ port, path: health, headers: { host }, signal, timeoutMs: 2000 });
18
+ let rejected, accepted;
19
+ try { [rejected, accepted] = await Promise.all([request(selected.host), request(previous.host)]); }
20
+ catch (error) { if (signal?.aborted) throw error; return; }
21
+ if (rejected.status !== 404 || accepted.status !== 200) return;
22
+ try { if (JSON.parse(accepted.body.toString()).status !== 'ok') return; } catch { return; }
23
+ return `Origin mismatch: GET ${new URL(health, selected).href} returns HTTP 404, but the application's owned internal port ${port} returns healthy JSON with Host ${previous.host}. The runtime still uses saved ${key}=${previous.origin} instead of RER_DEV_ORIGIN=${selected.origin}. Update the seed's local Worker entry to apply RER_DEV_ORIGIN to ${key} before its host checks; .dev.vars can override Vite config.vars. Readiness failed; the application was not accepted.`;
24
+ }
@@ -1,8 +1,8 @@
1
- *{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;color:#173753;font:15px/1.6 Inter,Arial,sans-serif}.scene{min-height:100vh;padding:64px 5vw;background:#164661 url('/ocean.png') center/cover}.layout{max-width:1360px;margin:auto;display:grid;grid-template-columns:minmax(290px,.9fr) minmax(0,1.5fr);column-gap:70px;row-gap:24px;align-items:start}.sidebar{padding:0 28px;color:#f7f8ff;background:transparent;border:0;box-shadow:none}.brand{grid-column:1/-1;font-size:22px;font-weight:700;color:#f7f8ff;margin:0;padding-left:28px}.known-row{padding:7px 0;display:grid;grid-template-columns:1fr auto;gap:2px 15px}.known-label{font-size:12px}.known-value{grid-column:1;font-weight:500;font-size:14px;overflow-wrap:anywhere}.known-source{grid-column:1;font-size:10px;line-height:1.3}.edit{border:0;background:none;color:#dfcaff;font:inherit;cursor:pointer;padding:0;align-self:center;grid-column:2;grid-row:1/4}summary{cursor:pointer}.panel{padding:38px 40px;border-radius:26px;background:rgba(251,252,255,.97);box-shadow:0 18px 64px #001c3b33;min-width:0}.panel h1{font-size:29px;letter-spacing:-.6px;line-height:1.25;margin:0 0 24px}.fields{display:grid;gap:18px}.field{border:1px solid #e0e8f6;border-radius:15px;padding:20px;background:rgba(255,255,255,.5);min-width:0}.field label,.field-title{font-size:15px;font-weight:600;display:block;margin:0 0 7px;color:#153b66}.input{display:block;width:100%;min-width:0;padding:12px 14px;border:1px solid #cdd6e5;border-radius:10px;background:#fff;color:#173753;font:inherit}.input:focus-visible,button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #b796ff;outline-offset:3px}.help{color:#64788e;font-size:13px;line-height:1.6;margin:8px 0 0}.status{color:#57728b;font-size:13px;margin:10px 0}.field .edit{color:#7542d3;display:block;margin-top:12px;font-size:13px}.primary,.secondary{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:12px 24px;border-radius:25px;font:600 14px/1.5 Inter,Arial,sans-serif;cursor:pointer;text-decoration:none}.primary{border:0;background:linear-gradient(120deg,#9255fc,#6537e7);color:white;box-shadow:0 5px 12px #7949de28}.secondary{border:1px solid #d2dcea;background:transparent;color:#224567}.actions{display:flex;justify-content:flex-end;margin-top:26px}.primary:disabled{opacity:.5;cursor:default}.error{padding:14px;background:#fff0ee;border:1px solid #f0c6c0;border-radius:10px;color:#98291b}.logs{white-space:pre-wrap;overflow-wrap:anywhere;max-height:360px;overflow:auto;background:#edf1f8;padding:16px;border-radius:12px;font:12px/1.65 monospace}.known-editor{grid-column:1/-1}.known-editor .input{margin-top:6px}.editor-actions{display:flex;gap:15px;margin-top:10px}.editor-actions button{font:inherit;border:0;background:none;padding:0;color:#dfcaff;cursor:pointer}.known-editor .help{color:#d5dff0}.ready-summary{padding:20px;background:#f1ecfc;border-radius:14px;color:#4f4570;margin:0}.connection-editor .field{margin-top:12px;background:#fff;color:#173753}.connection-actions{display:flex;gap:15px;align-items:center;flex-wrap:wrap}.token-field{margin-top:16px}.connected{color:#d1f2e9}.secret-value{font-size:13px}.badge{font-size:10px;color:#d0bcfa}
1
+ *{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;color:#173753;font:15px/1.6 Inter,Arial,sans-serif}.scene{min-height:100vh;padding:64px 5vw;background:#164661 url('/ocean.png') center/cover}.layout{max-width:1360px;margin:auto;display:grid;grid-template-columns:minmax(290px,.9fr) minmax(0,1.5fr);column-gap:70px;row-gap:24px;align-items:start}.sidebar{padding:0 28px;color:#f7f8ff;background:transparent;border:0;box-shadow:none}.brand{grid-column:1/-1;font-size:22px;font-weight:700;color:#f7f8ff;margin:0;padding-left:28px}.known-row{padding:7px 0;display:grid;grid-template-columns:1fr auto;gap:2px 15px}.known-label{font-size:13px}.known-value{grid-column:1;font-weight:500;font-size:14px;overflow-wrap:anywhere}.known-source{grid-column:1;font-size:13px;line-height:1.3}.edit{border:0;background:none;color:#dfcaff;font:inherit;cursor:pointer;padding:0;align-self:center;grid-column:2;grid-row:1/4}summary{cursor:pointer}.panel{padding:38px 40px;border-radius:26px;background:rgba(251,252,255,.97);box-shadow:0 18px 64px #001c3b33;min-width:0}.panel h1{font-size:29px;letter-spacing:-.6px;line-height:1.25;margin:0 0 24px}.fields{display:grid;gap:18px}.field{border:1px solid #e0e8f6;border-radius:15px;padding:20px;background:rgba(255,255,255,.5);min-width:0}.field label,.field-title{font-size:15px;font-weight:600;display:block;margin:0 0 7px;color:#153b66}.input{display:block;width:100%;min-width:0;padding:12px 14px;border:1px solid #cdd6e5;border-radius:10px;background:#fff;color:#173753;font:inherit}.input:focus-visible,button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #b796ff;outline-offset:3px}.help{color:#64788e;font-size:13px;line-height:1.6;margin:8px 0 0}.status{color:#57728b;font-size:13px;margin:10px 0}.field .edit{color:#7542d3;display:block;margin-top:12px;font-size:13px}.primary,.secondary{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:12px 24px;border-radius:25px;font:600 14px/1.5 Inter,Arial,sans-serif;cursor:pointer;text-decoration:none}.primary{border:0;background:linear-gradient(120deg,#9255fc,#6537e7);color:white;box-shadow:0 5px 12px #7949de28}.secondary{border:1px solid #d2dcea;background:transparent;color:#224567}.actions{display:flex;justify-content:flex-end;margin-top:26px}.primary:disabled{opacity:.5;cursor:default}.error{padding:14px;background:#fff0ee;border:1px solid #f0c6c0;border-radius:10px;color:#98291b}.logs{white-space:pre-wrap;overflow-wrap:anywhere;max-height:360px;overflow:auto;background:#edf1f8;padding:16px;border-radius:12px;font:13px/1.65 monospace}.known-editor{grid-column:1/-1}.known-editor .input{margin-top:6px}.editor-actions{display:flex;gap:15px;margin-top:10px}.editor-actions button{font:inherit;border:0;background:none;padding:0;color:#dfcaff;cursor:pointer}.known-editor .help{color:#d5dff0}.ready-summary{padding:20px;background:#f1ecfc;border-radius:14px;color:#4f4570;margin:0}.connection-editor .field{margin-top:12px;background:#fff;color:#173753}.connection-actions{display:flex;gap:15px;align-items:center;flex-wrap:wrap}.token-field{margin-top:16px}.connected{color:#d1f2e9}.secret-value{font-size:13px}.badge{font-size:13px;color:#d0bcfa}
2
2
  @media(max-width:1000px){.layout{gap:28px;grid-template-columns:minmax(250px,.85fr) minmax(0,1.4fr)}.panel{padding:28px}.sidebar{padding:0 22px}.brand{padding-left:22px}.scene{padding:35px 24px}}
3
3
  @media(max-width:700px){.scene{padding:20px 16px;background-attachment:scroll}.layout{display:block}.brand{margin-bottom:24px}.sidebar{margin-bottom:24px;padding-left:0;padding-right:0}.panel{padding:25px 20px}.panel h1{font-size:25px}.field{padding:17px}.primary{width:100%}}
4
4
 
5
- .agent-activity.known-group{backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);border:0;border-radius:13px;background:linear-gradient(110deg,rgba(38,60,116,.5),rgba(132,118,143,.5));overflow:hidden;margin-bottom:16px}.known-group-header{display:flex;align-items:center;gap:16px;padding:16px 15px 7px}.known-group-title{font-size:16px;margin:0;font-weight:700;line-height:1.3}.category-icon{width:36px;height:36px;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;border-radius:11px;background:linear-gradient(135deg,#aa98ff,#e5d1ff);color:#412199;box-shadow:inset 0 0 8px #ffffff44}.category-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.workspace .category-icon{background:linear-gradient(135deg,#a2dbff,#4fa9f5);color:#0070df}.hosting .category-icon,.email .category-icon{background:linear-gradient(135deg,#0ed4b6,#31f2cf);color:#005761}.known-group-body{padding:6px 16px 13px 23px}.known-group .known-row:last-child{padding-bottom:0}#known-summary .known-label{font-size:11px}.known-row{min-width:0}.known-editor{min-width:0}.group-symbols{position:absolute;width:0;height:0;overflow:hidden}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:700px){.known-group-header{gap:12px}.known-group-body{padding-left:15px}.known-group-title{font-size:15px}}
5
+ .agent-activity.known-group{backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);border:0;border-radius:13px;background:linear-gradient(110deg,rgba(38,60,116,.5),rgba(132,118,143,.5));overflow:hidden;margin-bottom:16px}.known-group-header{display:flex;align-items:center;gap:16px;padding:16px 15px 7px}.known-group-title{font-size:16px;margin:0;font-weight:700;line-height:1.3}.category-icon{width:36px;height:36px;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;border-radius:11px;background:linear-gradient(135deg,#aa98ff,#e5d1ff);color:#412199;box-shadow:inset 0 0 8px #ffffff44}.category-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.workspace .category-icon{background:linear-gradient(135deg,#a2dbff,#4fa9f5);color:#0070df}.hosting .category-icon,.email .category-icon{background:linear-gradient(135deg,#0ed4b6,#31f2cf);color:#005761}.known-group-body{padding:6px 16px 13px 23px}.known-group .known-row:last-child{padding-bottom:0}.known-row{min-width:0}.known-editor{min-width:0}.group-symbols{position:absolute;width:0;height:0;overflow:hidden}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:700px){.known-group-header{gap:12px}.known-group-body{padding-left:15px}.known-group-title{font-size:15px}}
6
6
 
7
7
  #fields>.field[data-field]{border:0;border-radius:0;background:transparent;padding:0}#fields{gap:24px}.select-wrap{position:relative}
8
8
  /* The shared select rule: foundation/runtime/select-style.ts, documented under "Select chevron" in README.md. */
@@ -10,7 +10,7 @@ select:not([multiple],[size]:not([size="1"])){--rer-select-ink:var(--rer-muted,l
10
10
 
11
11
  .known-value{display:flex;align-items:center;gap:7px;min-width:0}.known-value-text{min-width:0;overflow-wrap:anywhere}.value-icon,.colour-swatch{width:18px;height:18px;flex-shrink:0}.colour-swatch{width:16px;height:16px}.value-icon{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.colour-swatch{border-radius:4px;box-shadow:inset 0 0 0 1px #ffffff70}
12
12
 
13
- .target-choices{border:0;margin:0 0 8px;padding:0;display:flex;gap:8px;flex-wrap:wrap}.target-choices legend{margin-bottom:7px;padding:0}.target-choice{display:flex;align-items:center;gap:6px;padding:8px 10px;border:1px solid #ffffff35;border-radius:8px;font-size:12px;cursor:pointer;position:relative}.target-choice:has(input:checked){background:#ffffff20;border-color:#69efd0}.target-choice input{position:absolute;opacity:0;width:1px;height:1px}.target-choice:has(input:focus-visible){outline:3px solid #b796ff;outline-offset:3px}.target-tick{display:inline-flex;align-items:center;justify-content:center;width:15px;height:15px;border:1px solid #ffffff60;border-radius:50%;color:transparent;font-size:11px;flex-shrink:0}.target-choice input:checked+.target-tick{background:#69efd0;border-color:#69efd0;color:#005761}
13
+ .target-choices{border:0;margin:0 0 8px;padding:0;display:flex;gap:8px;flex-wrap:wrap}.target-choices legend{margin-bottom:7px;padding:0}.target-choice{display:flex;align-items:center;gap:6px;padding:8px 10px;border:1px solid #ffffff35;border-radius:8px;font-size:13px;cursor:pointer;position:relative}.target-choice:has(input:checked){background:#ffffff20;border-color:#69efd0}.target-choice input{position:absolute;opacity:0;width:1px;height:1px}.target-choice:has(input:focus-visible){outline:3px solid #b796ff;outline-offset:3px}.target-tick{display:inline-flex;align-items:center;justify-content:center;width:15px;height:15px;border:1px solid #ffffff60;border-radius:50%;color:transparent;font-size:13px;flex-shrink:0}.target-choice input:checked+.target-tick{background:#69efd0;border-color:#69efd0;color:#005761}
14
14
 
15
15
  .panel .target-choices{margin:0}.panel .target-choices legend{color:#153b66;font-size:15px;font-weight:600}.panel .target-choice{color:#173753;border-color:#cdd6e5;font-size:14px}.panel .target-choice:has(input:checked){background:#e9e4ff;border-color:#7542d3}.panel .target-tick{border-color:#8296aa}
16
16
 
@@ -22,15 +22,15 @@ select:not([multiple],[size]:not([size="1"])){--rer-select-ink:var(--rer-muted,l
22
22
 
23
23
  .secondary:disabled{opacity:.5;cursor:default}
24
24
 
25
- .email-unit{display:grid;gap:18px}.email-unit>.field,.advanced>.field{border:0;border-radius:0;background:transparent;padding:0}.email-unit>.help{margin:0}.choice-copy{display:block}.choice-copy .help{display:block;margin:5px 0 0;font-weight:400;font-size:12px}.hosting-unit>.target-choices .target-choice{flex:1 1 200px;align-items:flex-start}.hosting-unit>.target-choices .target-tick{margin-top:3px}.hosting-unit>.target-choices .value-icon{margin-top:2px}.connection-row .field-title{font-size:14px}.connection-row>.help{margin-top:0}.connection-row .secondary{min-height:36px;padding:7px 15px;font-size:13px}.advanced{font-size:13px}.advanced summary{color:#64788e}.advanced-toggle{display:flex;align-items:center;gap:8px;margin:15px 0 8px}.advanced .field{margin-top:8px}.panel .advanced>.field>label{font-size:13px}.panel .edit{color:#7542d3}.email-unit .target-choices legend{font-size:15px;font-weight:600;color:#153b66;margin-bottom:7px}
25
+ .email-unit{display:grid;gap:18px}.email-unit>.field,.advanced>.field{border:0;border-radius:0;background:transparent;padding:0}.email-unit>.help{margin:0}.choice-copy{display:block}.choice-copy .help{display:block;margin:5px 0 0;font-weight:400;font-size:13px}.hosting-unit>.target-choices .target-choice{flex:1 1 200px;align-items:flex-start}.hosting-unit>.target-choices .target-tick{margin-top:3px}.hosting-unit>.target-choices .value-icon{margin-top:2px}.connection-row .field-title{font-size:14px}.connection-row>.help{margin-top:0}.connection-row .secondary{min-height:36px;padding:7px 15px;font-size:13px}.advanced{font-size:13px}.advanced summary{color:#64788e}.advanced-toggle{display:flex;align-items:center;gap:8px;margin:15px 0 8px}.advanced .field{margin-top:8px}.panel .advanced>.field>label{font-size:13px}.panel .edit{color:#7542d3}.email-unit .target-choices legend{font-size:15px;font-weight:600;color:#153b66;margin-bottom:7px}
26
26
 
27
- .step-progress{font-size:12px;color:#64788e;margin:0 0 8px}.actions{gap:12px}.actions #back{margin-right:auto}.known-group-header .edit{margin-left:auto;font-size:12px}.known-group-header .known-group-title{flex:1}#heading:focus{outline:none}
27
+ .step-progress{font-size:13px;color:#64788e;margin:0 0 8px}.actions{gap:12px}.actions #back{margin-right:auto}.known-group-header .edit{margin-left:auto;font-size:13px}.known-group-header .known-group-title{flex:1}#heading:focus{outline:none}
28
28
 
29
- .agent-activity{min-width:0;padding-bottom:16px;background:rgba(0,0,0,.5)}.agent-activity .known-group-header{padding-left:16px;padding-right:16px;justify-content:space-between;gap:12px;flex-wrap:wrap}.agent-activity .known-group-title{min-width:0}.agent-activity-message{font-size:13px;line-height:1.55;margin:6px 16px 0;color:#f7f8ff;overflow-wrap:anywhere}.agent-activity-history{margin:10px 16px 0;color:#d5e4f3;font-size:11px}.agent-activity-history summary{width:fit-content}.agent-activity-events{padding-left:15px;margin:8px 0 0;line-height:1.5}.agent-activity-events li{padding:3px 0;overflow-wrap:anywhere}
29
+ .agent-activity{min-width:0;padding-bottom:16px;background:rgba(0,0,0,.5)}.agent-activity .known-group-header{padding-left:16px;padding-right:16px;justify-content:space-between;gap:12px;flex-wrap:wrap}.agent-activity .known-group-title{min-width:0}.agent-activity-message{font-size:13px;line-height:1.55;margin:6px 16px 0;color:#f7f8ff;overflow-wrap:anywhere}.agent-activity-history{margin:10px 16px 0;color:#d5e4f3;font-size:13px}.agent-activity-history summary{width:fit-content}.agent-activity-events{padding-left:15px;margin:8px 0 0;line-height:1.5}.agent-activity-events li{padding:3px 0;overflow-wrap:anywhere}
30
30
 
31
- .agent-connect{display:block;margin:0 0 0 auto;max-width:100%;padding:7px 12px;border:1px solid #ffffff80;border-radius:8px;background:transparent;color:#fff;font:600 12px/1.5 Inter,Arial,sans-serif;cursor:pointer}.agent-handoff{width:min(540px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:26px;border:0;border-radius:20px;background:#fbfcff;color:#173753;box-shadow:0 18px 64px #001c3b55}.agent-handoff::backdrop{background:#001c3b80}.agent-handoff h2{margin:0;font-size:22px;line-height:1.3}.agent-handoff textarea{margin-top:18px;resize:vertical;font:12px/1.6 monospace;min-height:140px}.agent-handoff-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.agent-handoff .status{min-height:21px}.agent-handoff .primary{width:auto}@media(max-width:700px){.agent-handoff{padding:20px}}
31
+ .agent-connect{display:block;margin:0 0 0 auto;max-width:100%;padding:7px 12px;border:1px solid #ffffff80;border-radius:8px;background:transparent;color:#fff;font:600 13px/1.5 Inter,Arial,sans-serif;cursor:pointer}.agent-handoff{width:min(540px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:26px;border:0;border-radius:20px;background:#fbfcff;color:#173753;box-shadow:0 18px 64px #001c3b55}.agent-handoff::backdrop{background:#001c3b80}.agent-handoff h2{margin:0;font-size:22px;line-height:1.3}.agent-handoff textarea{margin-top:18px;resize:vertical;font:13px/1.6 monospace;min-height:140px}.agent-handoff-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.agent-handoff .status{min-height:21px}.agent-handoff .primary{width:auto}@media(max-width:700px){.agent-handoff{padding:20px}}
32
32
 
33
- .agent-working{display:inline-flex;align-items:center;gap:7px;margin-left:auto;color:#f7f8ff;font-size:12px;line-height:1.5;white-space:nowrap}.agent-working-spinner{width:12px;height:12px;border:1.5px solid #ffffff50;border-top-color:currentColor;border-radius:50%;animation:agent-working-spin .9s linear infinite}@keyframes agent-working-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.agent-working-spinner{animation:none}}
33
+ .agent-working{display:inline-flex;align-items:center;gap:7px;margin-left:auto;color:#f7f8ff;font-size:13px;line-height:1.5;white-space:nowrap}.agent-working-spinner{width:12px;height:12px;border:1.5px solid #ffffff50;border-top-color:currentColor;border-radius:50%;animation:agent-working-spin .9s linear infinite}@keyframes agent-working-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.agent-working-spinner{animation:none}}
34
34
 
35
35
  textarea.input{resize:vertical;min-height:100px}
36
36
 
@@ -60,6 +60,6 @@ textarea.input{resize:vertical;min-height:100px}
60
60
 
61
61
  .target-choice .help{color:#42546b}
62
62
 
63
- #known-summary .known-group{border:0;border-radius:13px;background:#f2f5fc;overflow:hidden;margin-bottom:16px}#known-summary .known-group.workspace{background:#eef7fc}#known-summary .known-group.hosting,#known-summary .known-group.email{background:#eaf8f6}#known-summary .known-label,#known-summary .known-source{color:#42546b}#known-summary .known-group-title,#known-summary .known-value{color:#173753}#known-summary .known-group .edit{color:#4d2e87}.help-link{color:#4d2e87;font-weight:600;text-decoration:underline}.failure-log-path{margin:12px 0 0;color:#42546b;font-size:12px;overflow-wrap:anywhere}#retry-installation{margin-top:14px}
63
+ #known-summary .known-group{border:0;border-radius:13px;background:#f2f5fc;overflow:hidden;margin-bottom:16px}#known-summary .known-group.workspace{background:#eef7fc}#known-summary .known-group.hosting,#known-summary .known-group.email{background:#eaf8f6}#known-summary .known-label,#known-summary .known-source{color:#42546b}#known-summary .known-group-title,#known-summary .known-value{color:#173753}#known-summary .known-group .edit{color:#4d2e87}.help-link{color:#4d2e87;font-weight:600;text-decoration:underline}.failure-log-path{margin:12px 0 0;color:#42546b;font-size:13px;overflow-wrap:anywhere}#retry-installation{margin-top:14px}
64
64
 
65
65
  h1,h2,h3,legend{text-wrap:balance}p,.help,.status,.known-source,.agent-activity-message,.choice-copy{text-wrap:pretty}