@aarwitz/tapp 0.18.1 → 0.18.3

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.
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width,initial-scale=1">
6
- <meta name="description" content="Tapp turns repositories into UI maps, deterministic release contracts, and evidence-backed merge decisions across iOS, Android, and web.">
6
+ <meta name="description" content="Tapp Studio: point Tapp at a website, a repository or a build, watch it run on a real device, and open the evidence.">
7
7
  <meta name="tapp-api-base" content="">
8
8
  <meta name="tapp-login-url" content="">
9
9
  <title>Tapp</title>
@@ -14,10 +14,6 @@
14
14
  <svg hidden aria-hidden="true" xmlns="http://www.w3.org/2000/svg">
15
15
  <symbol id="i-grid" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="2" y="2" width="5" height="5" rx="1"/><rect x="9" y="2" width="5" height="5" rx="1"/><rect x="2" y="9" width="5" height="5" rx="1"/><rect x="9" y="9" width="5" height="5" rx="1"/></symbol>
16
16
  <symbol id="i-play" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="8" cy="8" r="6.25"/><path d="M6.5 5.5v5l4-2.5z" fill="currentColor" stroke="none"/></symbol>
17
- <symbol id="i-warn" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"><path d="M8 2.5 14 13H2z"/><path d="M8 6.5v3M8 11.3v.2"/></symbol>
18
- <symbol id="i-map" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"><path d="M2 4l4-1.5 4 1.5 4-1.5v10l-4 1.5-4-1.5-4 1.5z"/><path d="M6 2.5v10M10 4v10"/></symbol>
19
- <symbol id="i-check" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 8.5l3 3 7-7"/></symbol>
20
- <symbol id="i-gear" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="8" cy="8" r="2.25"/><path d="M8 1.75v2M8 12.25v2M1.75 8h2M12.25 8h2M3.6 3.6l1.4 1.4M11 11l1.4 1.4M3.6 12.4 5 11M11 5l1.4-1.4"/></symbol>
21
17
  <symbol id="i-folder" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 4.5A1.5 1.5 0 0 1 3.5 3h3l1.5 1.5h4.5A1.5 1.5 0 0 1 14 6v5.5A1.5 1.5 0 0 1 12.5 13h-9A1.5 1.5 0 0 1 2 11.5z"/></symbol>
22
18
  <symbol id="i-branch" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="4" cy="3.5" r="1.5"/><circle cx="4" cy="12.5" r="1.5"/><circle cx="12" cy="5" r="1.5"/><path d="M4 5v6M12 6.5c0 3-8 2-8 4.5"/></symbol>
23
19
  <symbol id="i-server" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="2" y="2.5" width="12" height="4.5" rx="1"/><rect x="2" y="9" width="12" height="4.5" rx="1"/><path d="M4.5 4.75h.01M4.5 11.25h.01"/></symbol>
@@ -25,60 +21,49 @@
25
21
  <symbol id="i-app" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="3" y="2" width="10" height="12" rx="2"/><path d="M6.5 12h3"/></symbol>
26
22
  </svg>
27
23
 
28
- <main class="source-onboarding hidden" id="source-onboarding">
24
+ <main class="prompt-screen hidden" id="source-onboarding">
29
25
  <header class="onboarding-topbar">
30
- <button class="brand" data-brand-home aria-label="Tapp overview">tapp<span class="brand-mark"></span><small>release confidence</small></button>
31
- <span class="mode-pill" id="onboarding-mode-pill">Local engine</span>
26
+ <button class="brand" data-brand-home aria-label="Tapp overview">tapp<span class="brand-mark"></span><small>ship with proof</small></button>
27
+ <span class="mode-pill" id="onboarding-mode-pill">Self-host · this machine</span>
32
28
  </header>
33
- <section class="welcome-copy">
34
- <p class="eyebrow">Release contracts for real applications</p>
35
- <h1>Bring the product.<br>Tapp builds the proof.</h1>
36
- <p>Connect a repository once. Tapp detects its targets, builds and explores the real application, maps what users can do, proposes the business journeys worth protecting, and installs deterministic release gates. A website alone can be explored and recorded, but only source gives a release verdict.</p>
37
- <div class="platform-row" aria-label="Supported target platforms">
38
- <span>iOS</span><span>Android</span><span>Web</span>
29
+
30
+ <section class="prompt-hero" aria-hidden="true">
31
+ <!-- A device being driven: a cursor moves across screens, each screen gets its check. The
32
+ loop is the product in eight seconds; it respects prefers-reduced-motion. -->
33
+ <div class="hero-stage">
34
+ <div class="hero-device">
35
+ <span class="hero-notch"></span>
36
+ <div class="hero-screen">
37
+ <div class="hero-page hero-page-1"><span class="hero-bar"></span><span class="hero-line w60"></span><span class="hero-line w80"></span><span class="hero-tile"></span><span class="hero-btn">Add to cart</span></div>
38
+ <div class="hero-page hero-page-2"><span class="hero-bar"></span><span class="hero-line w40"></span><span class="hero-row"></span><span class="hero-row"></span><span class="hero-btn">Checkout</span></div>
39
+ <div class="hero-page hero-page-3"><span class="hero-bar"></span><span class="hero-check">✓</span><span class="hero-line w60 center"></span><span class="hero-line w40 center"></span></div>
40
+ </div>
41
+ <span class="hero-cursor">👆</span>
42
+ </div>
43
+ <ul class="hero-log">
44
+ <li class="hero-log-1">📱 Launching the app</li>
45
+ <li class="hero-log-2">👆 Tapping “Add to cart”</li>
46
+ <li class="hero-log-3">👆 Tapping “Checkout”</li>
47
+ <li class="hero-log-4">📸 Screenshotting · <b>✓ Order confirmed</b></li>
48
+ </ul>
39
49
  </div>
40
50
  </section>
41
51
 
42
- <section class="source-choices" aria-label="Connect a repository">
43
- <article class="source-card local-runner-card">
44
- <span class="source-layer">Repository</span>
45
- <div class="source-icon">⌘</div>
46
- <p class="eyebrow">This Mac</p>
47
- <h2>Run from your checkout</h2>
48
- <p>Your source never uploads. Tapp builds with local Xcode and drives your local simulator, while the web app shows progress and evidence.</p>
49
- <div id="local-repositories"><small>Looking for connected Mac repositories…</small></div>
50
- </article>
51
- <article class="source-card drop-zone" id="repository-drop-zone" tabindex="0">
52
- <span class="source-layer">Repository</span>
53
- <div class="source-icon">↥</div>
54
- <p class="eyebrow">Cloud copy</p>
55
- <h2>Upload a project folder</h2>
56
- <p>Upload an isolated working copy from this computer. Committed hidden config (like <code>.tapp/</code>) is included; dependency and build output folders are skipped.</p>
57
- <button class="primary" id="browse-folder">Browse folder</button>
58
- <input id="folder-input" type="file" webkitdirectory multiple hidden>
59
- <small>For direct edits to an existing checkout, start with <code>tapp app /path/to/repo</code>.</small>
60
- </article>
61
- <article class="source-card github-card">
62
- <span class="source-layer">Repository</span>
63
- <div class="source-icon github-icon">⌘</div>
64
- <p class="eyebrow">GitHub</p>
65
- <h2>Connect to GitHub</h2>
66
- <p id="github-source-copy">Select one of the repositories authorized by your local GitHub session. Tapp clones an isolated checkout and never pushes silently.</p>
67
- <button class="secondary" id="connect-github">Choose repository</button>
68
- <small id="github-source-note">Local preview uses <code>gh auth</code>. Hosted Tapp will use repository-scoped GitHub App authorization.</small>
69
- </article>
70
- <article class="source-card website-card" id="website-card">
71
- <span class="source-layer">Website</span>
72
- <div class="source-icon">⌁</div>
73
- <p class="eyebrow">No source code</p>
74
- <h2>Connect a website</h2>
75
- <p id="website-source-copy">Explore, record, and check the journeys of an app you own from its public URL. Without source there is no release verdict — exploration observes; only the repository gate judges.</p>
76
- <a class="button-link hidden" id="website-connect-link" href="/connect">Connect a website</a>
77
- <small id="website-source-note">In the local Studio, website checks run from the CLI: <code>npx -y @aarwitz/tapp@latest explore https://example.com --read-only</code>. Website projects live in the hosted Studio.</small>
78
- </article>
52
+ <section class="prompt-block">
53
+ <h1>What should tapp test?</h1>
54
+ <form class="prompt-form" id="prompt-form" autocomplete="off">
55
+ <label class="prompt-field"><span class="sr-only">Website, repository, folder, or build</span><input id="prompt-input" name="input" placeholder="A website URL, a GitHub repo, a folder on this Mac, a bundle id, an .app or .apk…" spellcheck="false" required></label>
56
+ <button class="primary prompt-go" type="submit" id="prompt-start" aria-label="Start">→</button>
57
+ </form>
58
+ <ul class="prompt-suggestions" aria-label="Examples">
59
+ <li><button type="button" data-prompt="https://example.com"><span>⌁</span><b>https://example.com</b><small>audit a website read-only — safe on production, nothing is clicked</small></button></li>
60
+ <li><button type="button" data-prompt="~/code/my-app"><span>⌘</span><b>~/code/my-app</b><small>open a repo folder on this Mac — detects iOS, Android and web targets, builds locally</small></button></li>
61
+ <li><button type="button" data-prompt="owner/repo"><span>🐙</span><b>owner/repo</b><small>clone from GitHub into an isolated workspace, then the same</small></button></li>
62
+ <li><button type="button" data-prompt="com.company.app"><span>📱</span><b>com.company.app</b><small>explore a build already on the booted simulator (or give a .app / .apk)</small></button></li>
63
+ </ul>
64
+ <p class="prompt-note" id="privacy-note-detail">Everything runs on this machine. Exploration, replay and merge decisions are deterministic and need no API key.</p>
65
+ <span class="sr-only" id="privacy-note-title">Your code stays on this machine.</span>
79
66
  </section>
80
-
81
- <div class="privacy-note"><strong id="privacy-note-title">Your code stays on this machine in local mode.</strong><span id="privacy-note-detail">Ordinary exploration, replay, and merge decisions are deterministic and require no API key.</span></div>
82
67
  </main>
83
68
 
84
69
  <div class="product-shell hidden" id="product-shell">
@@ -91,10 +76,6 @@
91
76
  <nav class="primary-nav" aria-label="Product navigation">
92
77
  <button data-view="overview" class="active"><span><svg><use href="#i-grid"/></svg></span>Overview</button>
93
78
  <button data-view="runs"><span><svg><use href="#i-play"/></svg></span>Runs <i id="run-count" class="zero">0</i></button>
94
- <button data-view="findings"><span><svg><use href="#i-warn"/></svg></span>Findings <i id="finding-count" class="zero">0</i></button>
95
- <button data-view="coverage"><span><svg><use href="#i-map"/></svg></span>Coverage</button>
96
- <button data-view="contracts"><span><svg><use href="#i-check"/></svg></span>Contracts <i id="contract-count" class="zero">0</i></button>
97
- <button data-view="settings"><span><svg><use href="#i-gear"/></svg></span>Settings</button>
98
79
  </nav>
99
80
  <div class="sidebar-project">
100
81
  <p class="eyebrow">Project</p>
@@ -103,10 +84,10 @@
103
84
  <div class="row"><span><svg><use href="#i-target"/></svg></span><span id="sidebar-target">Select a target</span></div>
104
85
  <div class="row"><span><svg><use href="#i-server"/></svg></span><span id="sidebar-runner">Runner not checked</span></div>
105
86
  <div class="row hidden" id="sidebar-app-row"><span><svg><use href="#i-app"/></svg></span><span><code id="sidebar-app-id"></code></span></div>
106
- <span class="mode-pill" id="mode-pill">Local engine</span>
87
+ <span class="mode-pill" id="mode-pill">Self-host · this machine</span>
107
88
  </div>
108
89
  <div class="sidebar-footer">
109
- <button class="quiet" id="change-source">+ Add project</button>
90
+ <button class="quiet" id="change-source">+ Test something else</button>
110
91
  <button class="quiet hidden" id="refresh-project">Refresh</button>
111
92
  </div>
112
93
  </aside>
@@ -114,19 +95,17 @@
114
95
  <main class="workspace">
115
96
  <section class="workspace-view active" data-view-panel="overview" id="overview">
116
97
  <div class="command-bar">
117
- <div><h1>Release Command Center</h1><p><span id="app-name">Your release workspace</span> · <span id="app-summary">Inspect the repository to discover product targets and release intent.</span></p></div>
98
+ <div><h1 id="app-name">Your project</h1><p id="app-summary">Inspecting the repository for targets.</p></div>
118
99
  <div class="command-actions">
119
100
  <span class="phase-pill hidden" id="phase-pill"><span class="spinner"></span><span id="phase-pill-text">Working…</span></span>
101
+ <div class="idle-badges" id="idle-badges"></div>
120
102
  <button class="primary" id="command-run">Run release check</button>
121
103
  </div>
122
104
  </div>
123
105
  <div class="run-progress hidden" id="run-progress"><span class="progress-track"><span id="run-progress-bar"></span></span><span id="run-progress-text">Starting…</span></div>
124
- <div class="idle-badges" id="idle-badges"></div>
125
- <hr class="command-divider">
126
106
 
127
- <section class="evidence-section">
128
- <div class="device-panel">
129
- <p class="feed-label" id="device-feed-label">Live feed</p>
107
+ <section class="stage" id="stage">
108
+ <div class="device-stage">
130
109
  <div class="device-frame" id="device-frame">
131
110
  <span class="notch"></span>
132
111
  <div class="device-screen">
@@ -135,40 +114,23 @@
135
114
  <div class="device-placeholder" id="device-placeholder"><div><strong>No live feed yet</strong>Run a release check or open a live session to see the real application here.</div></div>
136
115
  </div>
137
116
  </div>
138
- <div class="device-meta">
139
- <div><span>Device</span><strong id="device-meta-device">—</strong></div>
140
- <div><span>Screen</span><strong id="live-screen-title">—</strong></div>
141
- </div>
142
- </div>
143
- <span class="vrule"></span>
144
- <div class="chat-panel">
145
- <div class="chat-head"><div><h2>tapp chat</h2><p>Live narration of screens, actions, and findings during a run</p></div></div>
146
- <div class="chat-transcript" id="chat-transcript"></div>
147
- <div class="chat-footer">Narration comes from the engine's own progress events. Nothing here is generated after the fact.</div>
117
+ <div class="device-meta"><span id="device-feed-label">Live feed</span><span id="device-meta-device">—</span><span id="live-screen-title">—</span></div>
148
118
  </div>
149
- </section>
150
-
151
- <div class="view-heading" style="margin-top:20px">
152
- <nav class="journey" aria-label="Release setup progress" style="margin:0">
153
- <button data-jump="connect"><span>1</span><b>Connect</b><small>Repository</small></button>
154
- <button data-jump="target-stage"><span>2</span><b>Target</b><small>Build & runtime</small></button>
155
- <button data-jump="map"><span>3</span><b>Map</b><small>Observed product</small></button>
156
- <button data-jump="contracts"><span>4</span><b>Contracts</b><small>Review intent</small></button>
157
- <button data-jump="validate"><span>5</span><b>Validate</b><small>Keyless replay</small></button>
158
- <button data-jump="evidence"><span>6</span><b>Gate</b><small>Decision & CI</small></button>
159
- </nav>
160
- <div class="decision-card neutral" id="decision-card"><span class="decision-label">CURRENT DECISION</span><strong id="decision-title">Not evaluated</strong><span id="decision-detail">Run a conclusive release gate to establish evidence.</span></div>
161
- </div>
162
119
 
163
- <section class="panel section" id="connect">
164
- <div class="section-heading"><div><p class="eyebrow">Connected repository</p><h2 id="repository-title">Repository</h2><p id="repository-detail">Tapp reads canonical repository artifacts and writes only explicit, reviewable changes.</p></div><span class="status-chip" id="connect-status">Not inspected</span></div>
165
- <div class="button-row"><button class="secondary" id="inspect">Inspect repository</button><button class="quiet" data-view="settings">Repository settings</button></div>
120
+ <aside class="chat-float" id="chat-float" aria-label="tapp chat">
121
+ <button class="chat-head" id="chat-toggle" aria-expanded="true" aria-controls="chat-transcript">
122
+ <span class="chat-avatar">💬</span>
123
+ <span class="chat-title">tapp<small id="chat-status">ready</small></span>
124
+ <span class="chat-caret" aria-hidden="true">▾</span>
125
+ </button>
126
+ <div class="chat-transcript" id="chat-transcript"></div>
127
+ </aside>
166
128
  </section>
167
129
 
168
130
  <section class="panel section" id="target-stage">
169
- <div class="section-heading"><div><p class="eyebrow">Build & run</p><h2>Choose the product target</h2><p>Tapp detected these targets from source. Multiple targets require an explicit choice; build results validate—not replace—the model.</p></div><span class="status-chip" id="target-status">No target selected</span></div>
131
+ <div class="section-heading"><div><p class="eyebrow">Build & run</p><h2>Choose the product target</h2><p>Tapp detected these targets from source. With more than one, you choose; nothing builds until you do.</p></div><span class="status-chip" id="target-status">No target selected</span></div>
170
132
  <div class="target-choice-callout hidden" id="target-choice-callout"><span>1</span><div><strong>Choose what Tapp should test</strong><small>Nothing will build until you select a target. Tapp never guesses when a repository contains multiple applications.</small></div></div>
171
- <div id="targets" class="target-grid"><div class="empty">Inspect the repository to detect iOS, Android, and web targets.</div></div>
133
+ <div id="targets" class="target-grid"><div class="empty">Inspecting the repository for iOS, Android and web targets…</div></div>
172
134
  <div class="runtime-row hidden" id="runtime-row">
173
135
  <label class="field android-runtime hidden" id="serial-field"><span>Android device serial <i>optional</i></span><input id="android-serial" placeholder="emulator-5554"><small>Leave blank to use the first connected and authorized device.</small></label>
174
136
  <div class="run-cta"><div class="button-row"><button class="primary" id="explore">Build, launch & explore</button><button class="secondary" id="start-session">Open live app</button></div><small id="explore-help">Select one target to continue.</small></div>
@@ -177,79 +139,35 @@
177
139
  </section>
178
140
 
179
141
  <section class="panel section live-session-panel hidden" id="live-session-panel">
180
- <div class="section-heading"><div><p class="eyebrow">Live application</p><h2>Drive the running target</h2><p>The device feed above shows the same real application surface used by Tapp's deterministic engine. Semantic controls refresh after every action.</p></div><div class="button-row"><span class="status-chip" id="live-platform">Target</span><span class="status-chip" id="live-recorded-steps">0 recorded steps</span><button class="quiet" id="refresh-live-session">Refresh</button><button class="secondary" id="end-session">End session</button></div></div>
142
+ <div class="section-heading"><div><p class="eyebrow">Live application</p><h2>Drive the running target</h2><p>The device above is the real application. Semantic controls refresh after every action; successful actions are recorded as a Flow you can save.</p></div><div class="button-row"><span class="status-chip" id="live-platform">Target</span><span class="status-chip" id="live-recorded-steps">0 recorded steps</span><button class="quiet" id="refresh-live-session">Refresh</button><button class="secondary" id="end-session">End session</button></div></div>
181
143
  <div class="live-layout">
182
144
  <aside class="live-controls"><div class="live-controls-heading"><div><strong>Semantic controls</strong><small id="live-control-count">0 available</small></div></div><div id="live-control-list"><div class="empty">Controls appear when the session starts.</div></div><div class="manual-action"><label><span>Target or field</span><input id="live-action-target" placeholder="Accessibility id or visible label"></label><label><span>Text <i>for type/wait</i></span><input id="live-action-text" autocomplete="off"></label><div class="button-row"><button class="secondary" id="live-tap">Tap</button><button class="secondary" id="live-type">Type</button><button class="quiet" id="live-back">Back</button><button class="quiet" id="live-swipe">Swipe up</button></div></div></aside>
183
- <div class="flow-recorder-panel"><div class="flow-recorder-head"><div><strong>Keep this journey as a deterministic Flow</strong><small>Successful actions are recorded with semantic selectors. Existing files are preserved.</small></div></div><div class="flow-recorder"><label><span>Flow name</span><input id="live-flow-name" placeholder="Checkout smoke"></label><button class="primary" id="save-live-flow">Save Flow</button><p>Saved Flows replay without AI and can be promoted into the release gate from Contracts.</p></div></div>
145
+ <div class="flow-recorder-panel"><div class="flow-recorder-head"><div><strong>Keep this journey as a deterministic Flow</strong><small>Saved Flows replay without AI; promote them into the gate from the repository.</small></div></div><div class="flow-recorder"><label><span>Flow name</span><input id="live-flow-name" placeholder="Checkout smoke"></label><button class="primary" id="save-live-flow">Save Flow</button></div></div>
184
146
  </div>
185
147
  </section>
186
148
 
187
149
  <section class="overview-grid">
188
- <article class="panel summary-panel"><div class="section-heading compact"><div><p class="eyebrow">Latest evidence</p><h2>What changed?</h2></div><button class="quiet" data-view="runs">All runs</button></div><div id="overview-evidence"><div class="empty">No release run yet.</div></div></article>
189
- <article class="panel summary-panel"><div class="section-heading compact"><div><p class="eyebrow">Coverage</p><h2>Observed surface</h2></div><button class="quiet" data-view="coverage">Open map</button></div><div id="overview-coverage" class="metric-grid"></div></article>
150
+ <article class="panel summary-panel"><div class="section-heading compact"><div><p class="eyebrow">Latest evidence</p><h2>What the last run proved</h2></div><button class="quiet" data-view="runs">All runs</button></div><div class="decision-card neutral" id="decision-card"><span class="decision-label">CURRENT DECISION</span><strong id="decision-title">Not evaluated</strong><span id="decision-detail">Run a conclusive release gate to establish evidence.</span></div><div id="overview-evidence"><div class="empty">No run yet.</div></div></article>
190
151
  </section>
191
152
  </section>
192
153
 
193
154
  <section class="workspace-view" data-view-panel="runs">
194
- <div class="view-heading simple"><div><p class="eyebrow">Runs</p><h1>Release history</h1><p>Every autonomous sweep, deterministic replay, finding, and decision stays inspectable.</p></div><button class="primary" id="run-gate">Run release gate</button></div>
155
+ <div class="view-heading simple"><div><p class="eyebrow">Runs</p><h1>Every run, with its evidence</h1><p>Release checks, explorations and read-only website audits. Each opens the report page the engine wrote.</p></div><button class="primary" id="run-gate">Run release gate</button></div>
156
+ <section class="panel section audit-panel">
157
+ <div class="section-heading compact"><div><p class="eyebrow">Website</p><h2>Audit a website — read-only</h2><p>Up to six pages, nothing clicked. Safe on production or a site you do not own; no release verdict without source.</p></div></div>
158
+ <form class="audit-form" id="runs-audit-form">
159
+ <label class="field"><span>Website URL</span><input id="audit-url" name="url" type="url" inputmode="url" placeholder="https://example.com" required autocomplete="off"></label>
160
+ <button class="primary" type="submit" id="audit-start">Audit read-only</button>
161
+ </form>
162
+ </section>
195
163
  <div class="split-view">
196
164
  <section class="panel list-panel" id="runs-list"><div class="empty">No runs yet.</div></section>
197
- <section class="panel detail-panel" id="run-detail"><div class="empty">Select a run to inspect its decision, checks, findings, and artifacts.</div></section>
165
+ <section class="panel detail-panel" id="run-detail"><div class="empty">Select a run to inspect its evidence.</div></section>
198
166
  </div>
199
167
  </section>
200
-
201
- <section class="workspace-view" data-view-panel="findings">
202
- <div class="view-heading simple"><div><p class="eyebrow">Findings</p><h1>What needs attention</h1><p>Findings preserve their severity and regression state. A failed contract is never silently healed.</p></div><select id="finding-filter"><option value="all">All severities</option><option value="critical">Critical</option><option value="high">High</option><option value="medium">Medium</option><option value="low">Low</option></select></div>
203
- <div class="split-view findings-layout"><section class="panel list-panel" id="findings-list"><div class="empty">No findings yet.</div></section><section class="panel detail-panel" id="finding-detail"><div class="empty">Select a finding to inspect its evidence.</div></section></div>
204
- </section>
205
-
206
- <section class="workspace-view" data-view-panel="coverage" id="map">
207
- <div class="view-heading simple"><div><p class="eyebrow">Coverage</p><h1>The product Tapp understands</h1><p>One platform-neutral Application Model and UI Map power exploration, planning, maintenance, CLI, MCP, and CI.</p></div><span class="metric" id="map-metric">0 states</span></div>
208
- <div class="subnav"><button data-coverage-tab="map" class="active">Flow Map</button><button data-coverage-tab="screens">Screens</button><button data-coverage-tab="application">Application</button><button data-coverage-tab="plan">Release Plan</button></div>
209
- <section class="coverage-panel active" data-coverage-panel="map"><div class="map-layout"><div class="map-canvas" id="map-canvas"><div class="empty">Explore the real product to build its map.</div></div><aside id="coverage-summary" class="coverage-summary"></aside></div><div id="transition-list" class="transition-list"></div></section>
210
- <section class="coverage-panel" data-coverage-panel="screens"><div class="panel table-panel" id="screen-list"><div class="empty">No observed screens yet.</div></div></section>
211
- <section class="coverage-panel" data-coverage-panel="application"><div class="application-grid" id="application-model"><div class="empty">Inspect the repository to build its Application Model.</div></div></section>
212
- <section class="coverage-panel" data-coverage-panel="plan"><div id="coverage-plan-list" class="plan-list"><div class="empty">No release plan yet.</div></div></section>
213
- </section>
214
-
215
- <section class="workspace-view" data-view-panel="contracts" id="contracts">
216
- <div class="view-heading simple"><div><p class="eyebrow">Release contracts</p><h1>Review business guarantees</h1><p>Approve a compact set of important outcomes. Tapp composes reusable Tasks instead of generating one script for every situation.</p></div><span class="status-chip" id="plan-status">No plan</span></div>
217
- <section class="panel section">
218
- <div class="plan-toolbar"><button class="quiet" id="approve-high">Approve high & critical</button><button class="quiet" id="defer-rest">Defer undecided</button><span class="spacer"></span><button class="primary" id="save-review">Save review</button></div>
219
- <div id="plan-list" class="plan-list"><div class="empty">Inspect and explore to create a grounded release plan.</div></div>
220
- </section>
221
- <section class="panel section" id="validate">
222
- <div class="section-heading"><div><p class="eyebrow">Deterministic suite</p><h2>Generate, replay, then promote</h2><p>Draft Tasks and contracts remain untrusted until they pass without AI against the selected real target. Promotion is explicit.</p></div><span class="status-chip" id="validation-status">Not generated</span></div>
223
- <div class="pipeline"><article><span>01</span><h3>Generate drafts</h3><p>Compose reusable Tasks and TypeScript contracts from approved, grounded intent.</p><button class="secondary" id="generate">Generate</button></article><article><span>02</span><h3>Replay without AI</h3><p>Execute exact assertions and bounded waits on the actual selected platform.</p><button class="secondary" id="validate-drafts">Validate</button></article><article><span>03</span><h3>Promote reviewed proof</h3><p>Move only validated drafts into the committed suite and update map coverage.</p><button class="secondary" id="promote">Promote</button></article></div>
224
- <div id="artifact-list" class="artifact-list"></div>
225
- </section>
226
- </section>
227
-
228
- <section class="workspace-view" data-view-panel="settings">
229
- <div class="view-heading simple"><div><p class="eyebrow">Settings</p><h1>Project and execution</h1><p>Only unavoidable target, environment, actor, and credential inputs belong here.</p></div></div>
230
- <div class="settings-grid">
231
- <section class="panel settings-section"><p class="eyebrow">Repository</p><h2>Source</h2><div id="settings-repository"></div><button class="secondary" id="settings-add-repository">Add repository</button></section>
232
- <section class="panel settings-section"><p class="eyebrow">Runners</p><h2>Execution surfaces</h2><div id="runner-list"></div></section>
233
- <section class="panel settings-section"><p class="eyebrow">Actors & credentials</p><h2>Runtime-only values</h2><p>Values stay in this browser session and process environment; they are never written into repository artifacts or job results.</p><label class="field"><span>Test email</span><input id="test-email" autocomplete="off"></label><label class="field"><span>Test password</span><input id="test-password" type="password" autocomplete="new-password"></label><div id="actor-list" class="actor-list"></div></section>
234
- <section class="panel settings-section"><p class="eyebrow">AI & data</p><h2>Optional orchestration</h2><div class="setting-row"><div><strong>Remote AI</strong><small>Planning and maintenance only. Deterministic execution does not need it.</small></div><span class="status-chip">Off</span></div><p class="honesty">Remote AI consent and provider controls are not yet exposed in this local browser build. Tapp will not opt you in implicitly.</p></section>
235
- </div>
236
- <section class="panel section" id="evidence">
237
- <div class="section-heading"><div><p class="eyebrow">Release evidence & CI</p><h2>Install the same decision in GitHub</h2><p>Preview the target-aware workflow, required secrets, unresolved configuration, and exact policy before writing anything.</p></div><div class="button-row"><button class="secondary" id="create-baseline" disabled>Establish baseline</button><button class="secondary" id="preview-ci">Preview CI</button><button class="primary" id="install-ci">Write reviewable patch</button></div></div>
238
- <div id="latest-evidence" class="evidence-grid"><div class="empty">No release run yet.</div></div>
239
- <pre id="ci-preview" class="code-preview hidden"></pre>
240
- </section>
241
- </section>
242
168
  </main>
243
169
  </div>
244
170
 
245
- <dialog id="github-dialog">
246
- <form method="dialog" class="dialog-shell">
247
- <div class="dialog-heading"><div><p class="eyebrow">Connect to GitHub</p><h2>Select a repository</h2><p>Tapp only displays repositories available to your authenticated local GitHub session.</p></div><button class="quiet" value="cancel" aria-label="Close">Close</button></div>
248
- <input class="search-input" id="github-search" placeholder="Search repositories…" autocomplete="off">
249
- <div id="github-repositories" class="github-repositories"><div class="empty">Loading authorized repositories…</div></div>
250
- </form>
251
- </dialog>
252
-
253
171
  <div class="operation-drawer hidden" id="operation-drawer" role="status" aria-live="polite"><div class="spinner"></div><div class="operation-copy"><strong id="operation-title">Working…</strong><p id="operation-progress">Starting operation</p><div class="progress-track"><span id="operation-progress-bar"></span></div></div></div>
254
172
  <div class="toast hidden" id="toast"></div>
255
173
  <script type="module" src="./assets/app.js"></script>
@@ -1,25 +1,25 @@
1
- // Executable parity contract for Tapp's one customer-facing browser product.
2
- // Both the local adapter and hosted adapter must serve this same application.
1
+ // Executable contract for Tapp's one browser surface: the Studio served by `tapp app`.
2
+ // It is a run viewer — start a run against a repository target or a URL, watch it live, open
3
+ // its evidence — not a second Command Center (ADR-0006, owner decision of 2026-10-15). The
4
+ // hosted control plane embeds these same assets unchanged.
3
5
  export const customerProductContract = Object.freeze({
4
- schemaVersion: 1,
6
+ schemaVersion: 2,
5
7
  product: "Tapp",
6
8
  interface: "customer-browser",
7
9
  targetPlatforms: ["ios", "android", "web"],
8
- repositorySources: ["local-folder", "github"],
10
+ // A repository is opened by path (`tapp app /path/to/repo`); a website by URL in the Studio.
11
+ repositorySources: ["local-path", "github"],
12
+ entryLayers: ["repository", "website"],
9
13
  views: [
10
- { id: "overview", label: "Overview", capabilities: ["release-decision", "onboarding-progress", "current-operation", "latest-evidence"] },
11
- { id: "runs", label: "Runs", capabilities: ["run-history", "run-detail", "timeline", "screenshots", "recordings", "logs", "artifacts"] },
12
- { id: "findings", label: "Findings", capabilities: ["finding-list", "severity-filter", "regression-state", "evidence"] },
13
- { id: "coverage", label: "Coverage", capabilities: ["application-model", "ui-map", "screens", "transitions", "controls", "task-coverage", "contract-coverage"] },
14
- { id: "contracts", label: "Contracts", capabilities: ["release-plan-review", "task-generation", "contract-generation", "deterministic-validation", "explicit-promotion"] },
15
- { id: "settings", label: "Settings", capabilities: ["target-selection", "runner-status", "runtime-inputs", "actors", "credentials", "ai-consent", "ci-installation"] },
14
+ { id: "overview", label: "Overview", capabilities: ["target-selection", "release-check", "live-feed", "progress-transcript", "live-session", "flow-recording", "latest-evidence"] },
15
+ { id: "runs", label: "Runs", capabilities: ["run-history", "run-detail", "evidence-page", "website-audit"] },
16
16
  ],
17
- operations: ["initialize", "session-start", "session-act", "session-save-flow", "session-end", "review", "generate", "validate", "promote", "gate", "baseline", "ci-preview", "ci-install"],
17
+ operations: ["initialize", "session-start", "session-act", "session-save-flow", "session-end", "gate", "audit"],
18
18
  invariants: [
19
- "Browser is the Tapp customer interface; web is one target platform.",
20
- "Repository paths are selected by the server or imported into isolated workspaces.",
21
- "AI is optional for planning; deterministic replay and ordinary merge decisions are keyless.",
22
- "Generated Tasks and contracts remain untrusted until real replay passes and promotion is explicit.",
23
- "The internal fleet console is not a customer product surface.",
19
+ "The Studio shows runs; it never scores or judges them. Only the deterministic gate decides.",
20
+ "Every run's evidence is the report.html the engine wrote; the Studio links to it rather than re-rendering it.",
21
+ "A website audit is read-only: nothing is clicked, typed, submitted, or hovered.",
22
+ "Repositories are opened from the machine the Studio runs on; nothing is uploaded or cloned by the Studio.",
23
+ "Deterministic replay and ordinary merge decisions are keyless.",
24
24
  ],
25
25
  });
@@ -14,3 +14,88 @@ export function productJourneyFlags({ status = {}, hasTarget = false, hasEvidenc
14
14
  export function operationIsPending(status) {
15
15
  return ["queued", "claimed", "running"].includes(String(status || ""));
16
16
  }
17
+
18
+ // What a person typed into "What should tapp test?" — classified the same way on the server.
19
+ // Order matters: a GitHub URL is a URL, so it is checked before the generic http(s) rule.
20
+ export function classifyPrompt(raw) {
21
+ const input = String(raw || "").trim();
22
+ if (!input) return { kind: "empty", value: "" };
23
+ const github = input.match(/^(?:https?:\/\/)?(?:www\.)?github\.com\/([A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+?)(?:\.git)?(?:\/.*)?$/i) || input.match(/^([A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+)$/);
24
+ if (github && !/^https?:\/\/(?!(?:www\.)?github\.com)/i.test(input) && !input.startsWith("/") && !input.startsWith("~")) {
25
+ return { kind: "github", value: github[1].replace(/\.git$/, "") };
26
+ }
27
+ if (/^https?:\/\//i.test(input)) return { kind: "url", value: input };
28
+ if (/\.apk$/i.test(input)) return { kind: "apk", value: input };
29
+ if (/\.app\/?$/i.test(input) && /[\/~]/.test(input)) return { kind: "app", value: input.replace(/\/$/, "") };
30
+ // Reverse-DNS reads as a bundle id (com.company.app); a hostname puts the TLD last (company.com).
31
+ if (/^(?:com|org|net|io|co|dev|app|ai|me|us|uk|de|fr|se|edu|gov)\.[A-Za-z][A-Za-z0-9-]*(?:\.[A-Za-z0-9-]+)+$/i.test(input)) return { kind: "bundle", value: input };
32
+ if (/^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)+$/.test(input)) return { kind: "url", value: `https://${input}` };
33
+ if (input.startsWith("/") || input.startsWith("~") || input.startsWith("./") || input.startsWith("../")) return { kind: "path", value: input };
34
+ return { kind: "business", value: input };
35
+ }
36
+
37
+ // Renders one engine progress line as a chat line: an emoji and the engine's own words. The
38
+ // text is never rewritten beyond trimming; the icon is derived from what the engine said.
39
+ const RULES = [
40
+ [/^(?:Opened|Open(?:ing)?) /i, "📍"],
41
+ [/^(?:Reached|Navigated to|Now on) /i, "🧭"],
42
+ [/^(?:Tapped|Tap(?:ping)?|Clicked|Pressed) /i, "👆"],
43
+ [/^(?:Typed|Filled|Entered|Type) /i, "⌨️"],
44
+ [/^(?:Swiped|Scrolled)/i, "↕️"],
45
+ [/^(?:Went back|Back)/i, "◀️"],
46
+ [/sign(?:ed|ing)? in|login|logged in|credentials/i, "🔐"],
47
+ [/screenshot|captured frame|snapshot/i, "📸"],
48
+ [/^(?:Building|Compiling|Build )/i, "🔨"],
49
+ [/^(?:Installing|Installed|Install )/i, "📦"],
50
+ [/^(?:Launching|Launched|Booting|Booted|Starting the app|Opening the)/i, "📱"],
51
+ [/^(?:Cloning|Connected |Cloned)/i, "🐙"],
52
+ [/^(?:Inspecting|Detected|Found \d+ target|Reading the repository)/i, "🔎"],
53
+ [/^(?:Audited|Auditing|Opening .* read-only)/i, "🔍"],
54
+ [/^(?:Exploring|Explore )/i, "🧭"],
55
+ [/^(?:Replaying|Replay |Running flow|Flow )/i, "▶️"],
56
+ [/^(?:Gate|Release gate|Evaluating)/i, "⚖️"],
57
+ [/^\d+\/\d+ actions/i, "⏳"],
58
+ [/waiting|waited|settling/i, "⏳"],
59
+ [/^(?:Timed out|Failed|Error|Could not)/i, "⚠️"],
60
+ ];
61
+
62
+ export function narrate(entry = {}, { platform = "" } = {}) {
63
+ const text = String(entry.text || "").trim().replace(/\s+/g, " ");
64
+ if (!text) return null;
65
+ const progress = text.match(/^(\d+)\/(\d+) actions(?: · (\d+) (?:states?|pages?|screens?)[^·]*)?/i);
66
+ if (progress) return { kind: "progress", icon: "⏳", text, current: Number(progress[1]), total: Number(progress[2]), states: progress[3] ? Number(progress[3]) : null };
67
+ for (const [pattern, icon] of RULES) {
68
+ if (pattern.test(text)) {
69
+ const kind = /^(?:Timed out|Failed|Error|Could not)/i.test(text) ? "warning" : "step";
70
+ const deviceIcon = icon === "📱" ? (platform === "web" ? "🌐" : platform === "android" ? "🤖" : "📱") : icon;
71
+ return { kind, icon: deviceIcon, text };
72
+ }
73
+ }
74
+ return { kind: entry.phase && !["explore", "runtime"].includes(entry.phase) ? "phase" : "step", icon: entry.phase === "runtime" ? "⚙️" : "•", text };
75
+ }
76
+
77
+ export function narrateFinding(finding = {}) {
78
+ const severity = String(finding.severity || "info").toLowerCase();
79
+ const icon = { critical: "🔴", high: "🟠", medium: "🟡", low: "⚪️" }[severity] || "•";
80
+ const where = finding.screen ? ` on ${finding.screen}` : "";
81
+ return { kind: "finding", severity, icon, text: `${finding.title || finding.message || finding.type || "Finding"}${where}` };
82
+ }
83
+
84
+ // The summary card at the end of a run: the gate's outcome when there is one, otherwise what the
85
+ // engine's headline says it observed. Never a score.
86
+ export function summarize(name, result = {}) {
87
+ const report = result?.report || result;
88
+ const gateOutcome = report?.gate?.outcome || (report?.gate?.failed === true ? "fail" : report?.gate ? "pass" : null);
89
+ if (name === "audit") {
90
+ const issues = result.issueCount || 0;
91
+ return { tone: issues ? "caution" : "ready", pill: issues ? `${issues} issue${issues === 1 ? "" : "s"} found` : "✓ Nothing broken observed", text: `${result.pagesAudited || 0} page(s) rendered read-only — nothing was clicked. ${issues ? "Each issue is listed in the run detail with the pages it appears on." : "This says the pages are served without structural defects, not that the site works."}` };
92
+ }
93
+ if (gateOutcome) {
94
+ const tone = { pass: "ready", fail: "blocked", inconclusive: "caution" }[gateOutcome] || "caution";
95
+ const pill = { pass: "✓ Ready to merge", fail: "× Do not merge", inconclusive: "◐ Inconclusive" }[gateOutcome];
96
+ return { tone, pill, text: (report.gate?.reasons || [report.headline || "Release gate completed."]).join(" · ") };
97
+ }
98
+ if (report?.inconclusive) return { tone: "caution", pill: "◐ Inconclusive", text: report.headline || "Exploration could not see enough to conclude." };
99
+ if (report?.headline) return { tone: "neutral", pill: `${report.screensExplored || 0} screens · ${report.actionsPerformed || 0} actions · ${(report.findings || []).length} findings`, text: /not a release decision/i.test(report.headline) ? report.headline : `${report.headline} An observation, not a release decision.` };
100
+ return { tone: "neutral", pill: "Done", text: `${name} completed.` };
101
+ }