@ancha-labs/cli 0.1.2 → 0.1.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.
@@ -151,12 +151,12 @@ function github(o, manual) {
151
151
  }
152
152
  function seedData(scene, selected) {
153
153
  const s = scene.seed?.[selected] ?? {}, label2 = (ref2) => named(scene, ref2);
154
- let body = "";
155
- if (selected === "slack") body = (s.channels ?? []).map((c) => `<section class="seed-channel"><h3># ${h(c.name)}</h3><p class="seed-people">${h((c.members ?? []).map(label2).join(" \xB7 "))}</p>${(s.messages ?? []).filter((m) => label2(m.channel) === c.name).map((m) => `<article class="message"><span class="avatar">${h(label2(m.user).slice(0, 1))}</span><div><div class="row"><strong>${h(label2(m.user))}</strong><span class="small muted">${h(m.at)}${m.thread_of ? " \xB7 Thread reply" : ""}</span></div><p class="message-text">${h(m.text)}</p></div></article>`).join("") || empty("No messages seeded")}</section>`).join("");
156
- if (selected === "github") body = `<div class="seed-cards">${(s.repos ?? []).map((r) => `<article class="record"><h3>${h(r.name)}</h3><p class="small muted">Production</p><p>${h(label2(r.production) || "Not set")}</p><h4>Pull requests</h4>${(r.pulls ?? []).map((p) => `<p>${badge(p.merged ? "Merged" : p.draft ? "Draft" : "Open")} ${h(p.title)}</p>`).join("") || '<p class="muted">None seeded</p>'}<details><summary>Files & history</summary>${(r.commits ?? []).map((c) => `<h4>${h(c.message)}</h4>${Object.entries(c.files ?? {}).map(([path2, value]) => `<details><summary>${h(path2)}</summary><pre>${h(value)}</pre></details>`).join("")}`).join("")}</details></article>`).join("")}</div>`;
157
- if (selected === "datadog") body = `<div class="seed-cards">${[...s.monitors ?? [], ...scene.world_rules?.monitors ?? []].map((m) => `<article class="record"><span class="small muted">Monitor</span><h3>${h(m.name)}</h3><p>${h(m.message)}</p>${details("Query", m.query)}</article>`).join("")}${(s.events ?? []).map((e) => `<article class="record"><span class="small muted">Event \xB7 ${h(e.at)}</span><h3>${h(e.title)}</h3><p>${h(e.text)}</p></article>`).join("")}${(s.logs ?? []).map((l) => `<article class="record"><span class="small muted">${h(l.service)} \xB7 ${h(l.status)} \xB7 ${h(l.at)}</span><p>${h(l.message)}</p></article>`).join("")}</div>${(scene.world_rules?.metrics ?? []).length ? `<h3>Metric behavior</h3><div class="seed-cards">${scene.world_rules.metrics.map((m) => `<article class="record"><h3>${h(m.name)}</h3><p>Baseline: ${h(m.baseline)}</p>${(m.effects ?? []).map((e) => `<p>${h(e.value)} while \u201C${h(label2(e.while))}\u201D is active</p>`).join("")}${details("Exact metric definition", m)}</article>`).join("")}</div>` : ""}`;
158
- if (selected === "pagerduty") body = `<div class="seed-cards">${(s.services ?? []).map((v) => `<article class="record"><span class="small muted">Service</span><h3>${h(v.name)}</h3><p>${h(label2(v.escalation_policy))}</p>${(s.escalation_policies ?? []).filter((p) => label2(v.escalation_policy) === label2("$" + p.ref)).map((p) => `<ol>${(p.levels ?? []).map((l) => `<li>${h((l.targets ?? []).map(label2).join(", "))}${l.after ? ` \xB7 escalate after ${h(l.after)}` : ""}</li>`).join("")}</ol>`).join("")}${v.slack_channel ? `<p class="small muted">Slack \xB7 #${h(label2(v.slack_channel))}</p>` : ""}</article>`).join("")}${(s.incidents ?? []).map((i) => `<article class="record">${badge(i.status)}<h3>${h(i.title)}</h3><p>${h(label2(i.service))}</p></article>`).join("")}</div>`;
159
- return `<h2>${h(toolName(selected))}</h2>${body || empty("No data seeded")}${details("Full starting data", s)}${selected === "datadog" ? details("Generated telemetry definitions", { metrics: scene.world_rules?.metrics, logs: scene.world_rules?.logs, monitors: scene.world_rules?.monitors }) : ""}`;
154
+ let body2 = "";
155
+ if (selected === "slack") body2 = (s.channels ?? []).map((c) => `<section class="seed-channel"><h3># ${h(c.name)}</h3><p class="seed-people">${h((c.members ?? []).map(label2).join(" \xB7 "))}</p>${(s.messages ?? []).filter((m) => label2(m.channel) === c.name).map((m) => `<article class="message"><span class="avatar">${h(label2(m.user).slice(0, 1))}</span><div><div class="row"><strong>${h(label2(m.user))}</strong><span class="small muted">${h(m.at)}${m.thread_of ? " \xB7 Thread reply" : ""}</span></div><p class="message-text">${h(m.text)}</p></div></article>`).join("") || empty("No messages seeded")}</section>`).join("");
156
+ if (selected === "github") body2 = `<div class="seed-cards">${(s.repos ?? []).map((r) => `<article class="record"><h3>${h(r.name)}</h3><p class="small muted">Production</p><p>${h(label2(r.production) || "Not set")}</p><h4>Pull requests</h4>${(r.pulls ?? []).map((p) => `<p>${badge(p.merged ? "Merged" : p.draft ? "Draft" : "Open")} ${h(p.title)}</p>`).join("") || '<p class="muted">None seeded</p>'}<details><summary>Files & history</summary>${(r.commits ?? []).map((c) => `<h4>${h(c.message)}</h4>${Object.entries(c.files ?? {}).map(([path2, value]) => `<details><summary>${h(path2)}</summary><pre>${h(value)}</pre></details>`).join("")}`).join("")}</details></article>`).join("")}</div>`;
157
+ if (selected === "datadog") body2 = `<div class="seed-cards">${[...s.monitors ?? [], ...scene.world_rules?.monitors ?? []].map((m) => `<article class="record"><span class="small muted">Monitor</span><h3>${h(m.name)}</h3><p>${h(m.message)}</p>${details("Query", m.query)}</article>`).join("")}${(s.events ?? []).map((e) => `<article class="record"><span class="small muted">Event \xB7 ${h(e.at)}</span><h3>${h(e.title)}</h3><p>${h(e.text)}</p></article>`).join("")}${(s.logs ?? []).map((l) => `<article class="record"><span class="small muted">${h(l.service)} \xB7 ${h(l.status)} \xB7 ${h(l.at)}</span><p>${h(l.message)}</p></article>`).join("")}</div>${(scene.world_rules?.metrics ?? []).length ? `<h3>Metric behavior</h3><div class="seed-cards">${scene.world_rules.metrics.map((m) => `<article class="record"><h3>${h(m.name)}</h3><p>Baseline: ${h(m.baseline)}</p>${(m.effects ?? []).map((e) => `<p>${h(e.value)} while \u201C${h(label2(e.while))}\u201D is active</p>`).join("")}${details("Exact metric definition", m)}</article>`).join("")}</div>` : ""}`;
158
+ if (selected === "pagerduty") body2 = `<div class="seed-cards">${(s.services ?? []).map((v) => `<article class="record"><span class="small muted">Service</span><h3>${h(v.name)}</h3><p>${h(label2(v.escalation_policy))}</p>${(s.escalation_policies ?? []).filter((p) => label2(v.escalation_policy) === label2("$" + p.ref)).map((p) => `<ol>${(p.levels ?? []).map((l) => `<li>${h((l.targets ?? []).map(label2).join(", "))}${l.after ? ` \xB7 escalate after ${h(l.after)}` : ""}</li>`).join("")}</ol>`).join("")}${v.slack_channel ? `<p class="small muted">Slack \xB7 #${h(label2(v.slack_channel))}</p>` : ""}</article>`).join("")}${(s.incidents ?? []).map((i) => `<article class="record">${badge(i.status)}<h3>${h(i.title)}</h3><p>${h(label2(i.service))}</p></article>`).join("")}</div>`;
159
+ return `<h2>${h(toolName(selected))}</h2>${body2 || empty("No data seeded")}${details("Full starting data", s)}${selected === "datadog" ? details("Generated telemetry definitions", { metrics: scene.world_rules?.metrics, logs: scene.world_rules?.logs, monitors: scene.world_rules?.monitors }) : ""}`;
160
160
  }
161
161
  var countLabel = (count, noun, plural = noun + "s") => `${count} ${count === 1 ? noun : plural}`;
162
162
  function agentLabel(agent, all) {
@@ -166,7 +166,11 @@ function agentLabel(agent, all) {
166
166
  const distinct = new Set(twins.map(folder)).size === twins.length && folder(agent);
167
167
  return `${agent.name} \xB7 ${distinct ? folder(agent) : String(agent.id).slice(-4)}`;
168
168
  }
169
- var toolNames = { slack: "Slack", "open-meteo": "Open-Meteo", datadog: "Datadog", pagerduty: "PagerDuty", github: "GitHub", "linkedin-ads": "LinkedIn Ads", salesforce: "Salesforce", gong: "Gong", "google-ads": "Google Ads", "chatgpt-ads": "ChatGPT Ads", hubspot: "HubSpot", ga4: "Google Analytics", gmail: "Gmail", "google-drive": "Google Drive", "amazon-s3": "Amazon S3", linear: "Linear", okta: "Okta", stripe: "Stripe", clerk: "Clerk", "better-stack": "Better Stack", notion: "Notion", attio: "Attio", dropbox: "Dropbox", resend: "Resend", "microsoft-word": "Microsoft Word", shopify: "Shopify" };
169
+ function connectDefaults(detected) {
170
+ const started = Array.isArray(detected?.evidence) && detected.evidence.includes("package.json") && /^(?:npm|pnpm) start$/.test(String(detected?.suggestions?.command ?? ""));
171
+ return started ? { taskInputKind: "command", state: "stateless" } : {};
172
+ }
173
+ var toolNames = { slack: "Slack", "open-meteo": "Open-Meteo", datadog: "Datadog", pagerduty: "PagerDuty", github: "GitHub", "linkedin-ads": "LinkedIn Ads", salesforce: "Salesforce", gong: "Gong", "google-ads": "Google Ads", "chatgpt-ads": "ChatGPT Ads", hubspot: "HubSpot", ga4: "Google Analytics", gmail: "Gmail", "google-drive": "Google Drive", "amazon-s3": "Amazon S3", linear: "Linear", okta: "Okta", stripe: "Stripe", clerk: "Clerk", "better-stack": "Better Stack", notion: "Notion", attio: "Attio", dropbox: "Dropbox", resend: "Resend", "microsoft-word": "Microsoft Word", shopify: "Shopify", lob: "Lob", paypal: "PayPal", jira: "Jira", kalshi: "Kalshi", intercom: "Intercom", zendesk: "Zendesk", "google-calendar": "Google Calendar", twilio: "Twilio" };
170
174
  var toolName = (name) => toolNames[name] ?? name;
171
175
  var toolLinks = (names) => names.map((name) => `<a class="tool-chip" href="/tools/${encodeURIComponent(name)}" data-nav>${h(toolName(name))}</a>`).join("");
172
176
  var toolDescription = (name) => ({ slack: "Channels, messages and threads", datadog: "Monitors, metrics and logs", pagerduty: "Incidents, on-call and escalation", github: "Repositories, pull requests and deployments" })[name] ?? "API capabilities";
@@ -184,6 +188,176 @@ function sandboxActivity(o) {
184
188
  return `<div class="row between"><h2>Activity</h2><span class="small muted">Oldest first \u2193</span></div>${rows3.length ? `<div class="flat-activity">${rows3.slice(-200).map((t) => `<div class="activity-row"><time>${h(time(t.tSim))}</time><strong>${h(toolName(t.service))}</strong><span>${h(t.method ?? "")} ${h(t.path)}</span>${badge(t.gap ? "Unsupported" : t.status >= 400 ? "Rejected" : "Completed", t.gap || t.status >= 400 ? "warn" : "")}</div>`).join("")}</div>` : empty("No tool requests yet. Connect your agent to start.")}`;
185
189
  }
186
190
 
191
+ // frontend/src/tool-logos.ts
192
+ var logos = {
193
+ "slack": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path fill="#e01e5a" d="M53.841 161.32c0 14.832-11.987 26.82-26.819 26.82S.203 176.152.203 161.32c0-14.831 11.987-26.818 26.82-26.818H53.84zm13.41 0c0-14.831 11.987-26.818 26.819-26.818s26.819 11.987 26.819 26.819v67.047c0 14.832-11.987 26.82-26.82 26.82c-14.83 0-26.818-11.988-26.818-26.82z"/><path fill="#36c5f0" d="M94.07 53.638c-14.832 0-26.82-11.987-26.82-26.819S79.239 0 94.07 0s26.819 11.987 26.819 26.819v26.82zm0 13.613c14.832 0 26.819 11.987 26.819 26.819s-11.987 26.819-26.82 26.819H26.82C11.987 120.889 0 108.902 0 94.069c0-14.83 11.987-26.818 26.819-26.818z"/><path fill="#2eb67d" d="M201.55 94.07c0-14.832 11.987-26.82 26.818-26.82s26.82 11.988 26.82 26.82s-11.988 26.819-26.82 26.819H201.55zm-13.41 0c0 14.832-11.988 26.819-26.82 26.819c-14.831 0-26.818-11.987-26.818-26.82V26.82C134.502 11.987 146.489 0 161.32 0s26.819 11.987 26.819 26.819z"/><path fill="#ecb22e" d="M161.32 201.55c14.832 0 26.82 11.987 26.82 26.818s-11.988 26.82-26.82 26.82c-14.831 0-26.818-11.988-26.818-26.82V201.55zm0-13.41c-14.831 0-26.818-11.988-26.818-26.82c0-14.831 11.987-26.818 26.819-26.818h67.25c14.832 0 26.82 11.987 26.82 26.819s-11.988 26.819-26.82 26.819z"/></svg>',
194
+ "github": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 250"><path fill="#161614" d="M128.001 0C57.317 0 0 57.307 0 128.001c0 56.554 36.676 104.535 87.535 121.46c6.397 1.185 8.746-2.777 8.746-6.158c0-3.052-.12-13.135-.174-23.83c-35.61 7.742-43.124-15.103-43.124-15.103c-5.823-14.795-14.213-18.73-14.213-18.73c-11.613-7.944.876-7.78.876-7.78c12.853.902 19.621 13.19 19.621 13.19c11.417 19.568 29.945 13.911 37.249 10.64c1.149-8.272 4.466-13.92 8.127-17.116c-28.431-3.236-58.318-14.212-58.318-63.258c0-13.975 5-25.394 13.188-34.358c-1.329-3.224-5.71-16.242 1.24-33.874c0 0 10.749-3.44 35.21 13.121c10.21-2.836 21.16-4.258 32.038-4.307c10.878.049 21.837 1.47 32.066 4.307c24.431-16.56 35.165-13.12 35.165-13.12c6.967 17.63 2.584 30.65 1.255 33.873c8.207 8.964 13.173 20.383 13.173 34.358c0 49.163-29.944 59.988-58.447 63.157c4.591 3.972 8.682 11.762 8.682 23.704c0 17.126-.148 30.91-.148 35.126c0 3.407 2.304 7.398 8.792 6.14C219.37 232.5 256 184.537 256 128.002C256 57.307 198.691 0 128.001 0m-80.06 182.34c-.282.636-1.283.827-2.194.39c-.929-.417-1.45-1.284-1.15-1.922c.276-.655 1.279-.838 2.205-.399c.93.418 1.46 1.293 1.139 1.931m6.296 5.618c-.61.566-1.804.303-2.614-.591c-.837-.892-.994-2.086-.375-2.66c.63-.566 1.787-.301 2.626.591c.838.903 1 2.088.363 2.66m4.32 7.188c-.785.545-2.067.034-2.86-1.104c-.784-1.138-.784-2.503.017-3.05c.795-.547 2.058-.055 2.861 1.075c.782 1.157.782 2.522-.019 3.08m7.304 8.325c-.701.774-2.196.566-3.29-.49c-1.119-1.032-1.43-2.496-.726-3.27c.71-.776 2.213-.558 3.315.49c1.11 1.03 1.45 2.505.701 3.27m9.442 2.81c-.31 1.003-1.75 1.459-3.199 1.033c-1.448-.439-2.395-1.613-2.103-2.626c.301-1.01 1.747-1.484 3.207-1.028c1.446.436 2.396 1.602 2.095 2.622m10.744 1.193c.036 1.055-1.193 1.93-2.715 1.95c-1.53.034-2.769-.82-2.786-1.86c0-1.065 1.202-1.932 2.733-1.958c1.522-.03 2.768.818 2.768 1.868m10.555-.405c.182 1.03-.875 2.088-2.387 2.37c-1.485.271-2.861-.365-3.05-1.386c-.184-1.056.893-2.114 2.376-2.387c1.514-.263 2.868.356 3.061 1.403"/></svg>',
195
+ "datadog": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 275"><path fill="#632ca6" d="m214.434 194.558l-22.796-15.039l-19.016 31.766l-22.118-6.465l-19.474 29.723l.997 9.355l105.89-19.513l-6.15-66.163zm-98.745-28.523l16.99-2.336c2.748 1.235 4.66 1.706 7.956 2.544c5.136 1.334 11.074 2.617 19.872-1.814c2.047-1.015 6.314-4.915 8.038-7.14l69.605-12.624l7.1 85.94l-119.252 21.49zm129.293-30.967l-6.871 1.309L224.91 0L0 26.078l27.71 224.856l26.33-3.822c-2.104-3.002-5.378-6.634-10.967-11.282c-7.752-6.44-5.014-17.384-.436-24.294c6.051-11.674 37.23-26.51 35.463-45.168c-.634-6.785-1.71-15.613-8.011-21.669c-.238 2.514.19 4.928.19 4.928s-2.587-3.3-3.874-7.795c-1.279-1.728-2.285-2.277-3.646-4.583c-.971 2.665-.842 5.757-.842 5.757s-2.116-4.997-2.457-9.216c-1.253 1.887-1.568 5.472-1.568 5.472s-2.747-7.878-2.12-12.124c-1.253-3.692-4.972-11.022-3.922-27.676c6.862 4.807 21.975 3.667 27.861-5.01c1.953-2.876 3.296-10.72-.976-26.182c-2.742-9.912-9.532-24.674-12.18-30.276l-.315.23c1.396 4.512 4.272 13.967 5.378 18.558c3.343 13.907 4.237 18.753 2.669 25.167c-1.335 5.576-4.535 9.22-12.646 13.298c-8.111 4.09-18.879-5.865-19.557-6.414c-7.882-6.28-13.98-16.52-14.658-21.5c-.709-5.446 3.14-8.716 5.079-13.168c-2.777.79-5.87 2.202-5.87 2.202s3.693-3.822 8.245-7.126c1.888-1.248 2.993-2.043 4.98-3.693c-2.876-.047-5.213.035-5.213.035s4.798-2.592 9.77-4.48c-3.637-.159-7.122-.025-7.122-.025S48 36.288 56.454 32.777c5.813-2.384 11.492-1.68 14.684 2.937c4.19 6.046 8.59 9.329 17.915 11.363c5.727-2.54 7.464-3.84 14.66-5.805c6.33-6.966 11.302-7.865 11.302-7.865s-2.466 2.264-3.127 5.818c3.59-2.829 7.524-5.191 7.524-5.191s-1.525 1.878-2.946 4.867l.328.493c4.19-2.514 9.113-4.492 9.113-4.492s-1.408 1.78-3.057 4.081c3.161-.026 9.566.134 12.054.415c14.68.324 17.725-15.674 23.357-17.682c7.053-2.518 10.206-4.043 22.226 7.765c10.31 10.141 18.368 28.281 14.365 32.345c-3.356 3.374-9.973-1.317-17.307-10.456c-3.874-4.841-6.806-10.564-8.18-17.837c-1.157-6.138-5.666-9.696-5.666-9.696s2.613 5.83 2.613 10.965c0 2.808.35 13.299 4.85 19.19c-.445.86-.652 4.258-1.145 4.91c-5.234-6.327-16.477-10.853-18.312-12.188c6.206 5.084 20.468 16.762 25.944 27.961c5.183 10.586 2.13 20.291 4.75 22.8c.748.717 11.144 13.674 13.144 20.183c3.49 11.342.207 23.267-4.358 30.66l-12.754 1.987c-1.866-.518-3.123-.777-4.794-1.744c.924-1.633 2.755-5.701 2.772-6.544l-.72-1.26c-3.97 5.622-10.617 11.082-16.14 14.217c-7.23 4.099-15.562 3.464-20.987 1.788c-15.393-4.746-29.952-15.15-33.463-17.885c0 0-.108 2.181.552 2.674c3.879 4.38 12.772 12.296 21.37 17.82l-18.325 2.017l8.664 67.45c-3.84.548-4.44.82-8.642 1.416c-3.706-13.09-10.793-21.638-18.542-26.618c-6.832-4.392-16.256-5.381-25.274-3.593l-.58.674c6.272-.652 13.675.255 21.28 5.07c7.464 4.721 13.48 16.914 15.696 24.251c2.837 9.381 4.798 19.419-2.838 30.056c-5.429 7.563-21.28 11.74-34.09 2.7c3.421 5.502 8.042 9.998 14.27 10.845c9.243 1.257 18.015-.35 24.053-6.548c5.152-5.3 7.89-16.382 7.17-28.052l8.158-1.183l2.946 20.947L256 242.542zm-82.156-56.885c-.376.859-.972 1.425-.082 4.223l.052.16l.143.363l.371.838c1.602 3.278 3.36 6.366 6.306 7.947q1.14-.196 2.367-.255c2.764-.12 4.509.315 5.61.911c.1-.552.12-1.356.06-2.543c-.216-4.151.821-11.208-7.156-14.923c-3.01-1.395-7.235-.967-8.643.778c.255.034.484.086.666.147c2.133.738.69 1.472.306 2.354m22.364 38.724c-1.045-.58-5.934-.35-9.372.06c-6.548.773-13.618 3.04-15.164 4.25c-2.816 2.177-1.538 5.969.544 7.528c5.835 4.358 10.949 7.282 16.343 6.57c3.313-.437 6.237-5.685 8.306-10.444c1.416-3.278 1.416-6.815-.657-7.964m-57.965-33.59c1.844-1.753-9.195-4.055-17.764 1.789c-6.319 4.31-6.522 13.553-.471 18.792a15 15 0 0 0 1.568 1.188a51 51 0 0 1 6.098-2.423c3.913-1.27 7.17-1.927 9.843-2.277c1.279-1.43 2.769-3.947 2.397-8.508c-.51-6.19-5.191-5.209-1.671-8.56"/></svg>',
196
+ "pagerduty": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 372"><path fill="#06ac38" d="M54.554 272.557v98.919H0v-98.919zM109.047.001c46.745.051 67.005 2.703 95.795 18.254C236.471 35.237 256 68.988 256 111.018c0 39.058-15.92 72.81-46.488 92.975c-28.02 18.68-59.86 21.228-102.315 21.228H0V0Zm8.739 47.753l-1.673.007l-61.56.425v129.91h65.168c45.639 0 80.451-18.255 80.451-66.44c0-44.79-28.02-64.32-84.06-63.895Z"/></svg>',
197
+ "linkedin-ads": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path fill="#0a66c2" d="M218.123 218.127h-37.931v-59.403c0-14.165-.253-32.4-19.728-32.4c-19.756 0-22.779 15.434-22.779 31.369v60.43h-37.93V95.967h36.413v16.694h.51a39.91 39.91 0 0 1 35.928-19.733c38.445 0 45.533 25.288 45.533 58.186zM56.955 79.27c-12.157.002-22.014-9.852-22.016-22.009s9.851-22.014 22.008-22.016c12.157-.003 22.014 9.851 22.016 22.008A22.013 22.013 0 0 1 56.955 79.27m18.966 138.858H37.95V95.967h37.97zM237.033.018H18.89C8.58-.098.125 8.161-.001 18.471v219.053c.122 10.315 8.576 18.582 18.89 18.474h218.144c10.336.128 18.823-8.139 18.966-18.474V18.454c-.147-10.33-8.635-18.588-18.966-18.453"/></svg>',
198
+ "salesforce": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 180"><path fill="#00a1e0" d="M106.553 19.651c8.248-8.594 19.731-13.924 32.43-13.924c16.883 0 31.612 9.414 39.455 23.389a54.5 54.5 0 0 1 22.3-4.74c30.449 0 55.134 24.9 55.134 55.615c0 30.719-24.685 55.62-55.134 55.62a54.7 54.7 0 0 1-10.86-1.083c-6.908 12.321-20.07 20.645-35.178 20.645a40.1 40.1 0 0 1-17.632-4.058c-7.002 16.47-23.316 28.019-42.33 28.019c-19.8 0-36.674-12.529-43.152-30.1c-2.83.602-5.763.915-8.772.915c-23.574 0-42.686-19.308-42.686-43.13a43.2 43.2 0 0 1 21.345-37.36a49.4 49.4 0 0 1-4.088-19.727C17.385 22.336 39.626.128 67.06.128c16.106 0 30.42 7.658 39.494 19.523"/><path fill="#fff" d="M37.17 92.956c-.16.419.058.506.11.58c.48.349.968.6 1.46.88c2.609 1.385 5.071 1.79 7.647 1.79c5.246 0 8.503-2.79 8.503-7.283v-.087c0-4.153-3.676-5.662-7.126-6.75l-.448-.147c-2.601-.845-4.845-1.573-4.845-3.286v-.09c0-1.465 1.311-2.544 3.344-2.544c2.259 0 4.94.75 6.667 1.705c0 0 .506.328.692-.164c.102-.262.976-2.615 1.068-2.87c.098-.277-.077-.481-.255-.59c-1.971-1.2-4.696-2.019-7.516-2.019l-.525.004c-4.801 0-8.153 2.9-8.153 7.057v.087c0 4.383 3.698 5.803 7.162 6.794l.558.172c2.524.775 4.7 1.442 4.7 3.22v.087c0 1.625-1.414 2.835-3.695 2.835c-.885 0-3.708-.018-6.758-1.946c-.368-.215-.583-.371-.867-.542c-.15-.095-.524-.26-.688.236zm76.8 0c-.16.419.058.506.11.58c.48.349.968.6 1.46.88c2.608 1.385 5.071 1.79 7.647 1.79c5.246 0 8.503-2.79 8.503-7.283v-.087c0-4.153-3.676-5.662-7.126-6.75l-.448-.147c-2.601-.845-4.846-1.573-4.846-3.286v-.09c0-1.465 1.312-2.544 3.345-2.544c2.259 0 4.94.75 6.667 1.705c0 0 .506.328.692-.164c.102-.262.976-2.615 1.067-2.87c.099-.277-.076-.481-.255-.59c-1.97-1.2-4.696-2.019-7.515-2.019l-.525.004c-4.802 0-8.153 2.9-8.153 7.057v.087c0 4.383 3.697 5.803 7.162 6.794l.557.172c2.525.775 4.704 1.442 4.704 3.22v.087c0 1.625-1.418 2.835-3.698 2.835a12.4 12.4 0 0 1-6.758-1.946c-.368-.215-.587-.364-.863-.542c-.095-.062-.54-.234-.693.236zm52.429-8.799c0 2.54-.474 4.54-1.406 5.953c-.922 1.4-2.317 2.08-4.263 2.08c-1.949 0-3.337-.677-4.244-2.08c-.918-1.41-1.384-3.413-1.384-5.953c0-2.535.466-4.532 1.384-5.93c.907-1.385 2.295-2.059 4.244-2.059c1.946 0 3.34.674 4.266 2.058c.93 1.4 1.403 3.396 1.403 5.931m4.379-4.707c-.43-1.453-1.1-2.735-1.993-3.803c-.893-1.071-2.022-1.93-3.363-2.557c-1.337-.623-2.918-.94-4.692-.94c-1.778 0-3.359.317-4.696.94c-1.34.626-2.47 1.486-3.366 2.557c-.889 1.071-1.56 2.354-1.993 3.803c-.426 1.447-.64 3.028-.64 4.707c0 1.68.214 3.265.64 4.707c.434 1.45 1.1 2.732 1.997 3.804a9.4 9.4 0 0 0 3.362 2.535c1.34.609 2.918.918 4.696.918c1.774 0 3.352-.31 4.692-.918a9.4 9.4 0 0 0 3.363-2.535c.893-1.068 1.563-2.35 1.993-3.804c.43-1.446.645-3.03.645-4.707c0-1.675-.215-3.26-.645-4.707m35.959 12.063c-.145-.426-.557-.266-.557-.266c-.637.244-1.315.47-2.036.583a16 16 0 0 1-2.401.171c-2.12 0-3.804-.63-5.01-1.876c-1.209-1.246-1.887-3.26-1.88-5.986c.008-2.48.606-4.346 1.68-5.767c1.068-1.413 2.692-2.138 4.86-2.138c1.807 0 3.184.207 4.627.663c0 0 .346.15.51-.303c.382-1.063.667-1.825 1.075-2.994c.116-.332-.168-.474-.27-.514c-.568-.222-1.909-.583-2.922-.736c-.947-.145-2.054-.222-3.286-.222c-1.84 0-3.479.313-4.882.94c-1.399.623-2.586 1.483-3.526 2.554s-1.654 2.353-2.131 3.803c-.474 1.446-.714 3.035-.714 4.714c0 3.632.98 6.569 2.914 8.718c1.938 2.157 4.85 3.253 8.645 3.253c2.244 0 4.547-.455 6.2-1.107c0 0 .318-.153.18-.521zm7.663-9.788c.207-1.41.597-2.583 1.198-3.497c.907-1.388 2.291-2.15 4.237-2.15c1.945 0 3.231.765 4.153 2.15c.612.914.878 2.138.983 3.497zm14.743-3.1c-.372-1.403-1.294-2.82-1.898-3.468c-.955-1.028-1.887-1.746-2.813-2.146a10.8 10.8 0 0 0-4.248-.86c-1.85 0-3.53.31-4.892.95c-1.366.642-2.514 1.516-3.414 2.606c-.9 1.085-1.577 2.379-2.007 3.847c-.434 1.46-.652 3.053-.652 4.732c0 1.709.226 3.3.674 4.732c.451 1.443 1.173 2.715 2.15 3.767c.972 1.06 2.225 1.891 3.726 2.47c1.49.576 3.3.875 5.38.871c4.281-.015 6.537-.969 7.465-1.483c.164-.09.321-.251.124-.71l-.969-2.714c-.145-.405-.557-.255-.557-.255c-1.06.393-2.568 1.1-6.084 1.093c-2.299-.004-4.004-.682-5.071-1.742c-1.097-1.085-1.632-2.68-1.727-4.932l14.824.014s.39-.007.43-.386c.014-.16.51-3.046-.441-6.386m-133.46 3.1c.211-1.41.597-2.583 1.199-3.497c.907-1.388 2.291-2.15 4.236-2.15c1.946 0 3.232.765 4.157 2.15c.609.914.875 2.138.98 3.497zm14.74-3.1c-.372-1.403-1.29-2.82-1.895-3.468c-.954-1.028-1.887-1.746-2.812-2.146a10.8 10.8 0 0 0-4.248-.86c-1.847 0-3.53.31-4.892.95c-1.367.642-2.514 1.516-3.414 2.606c-.9 1.085-1.577 2.379-2.007 3.847c-.43 1.46-.652 3.053-.652 4.732c0 1.709.225 3.3.674 4.732c.451 1.443 1.173 2.715 2.149 3.767c.973 1.06 2.226 1.891 3.727 2.47c1.49.576 3.3.875 5.38.871c4.281-.015 6.536-.969 7.465-1.483c.164-.09.32-.251.124-.71l-.965-2.714c-.15-.405-.561-.255-.561-.255c-1.06.393-2.565 1.1-6.088 1.093c-2.295-.004-4-.682-5.067-1.742c-1.097-1.085-1.633-2.68-1.727-4.932l14.823.014s.39-.007.43-.386c.015-.16.51-3.046-.444-6.386M63.642 91.431c-.58-.462-.66-.579-.856-.878c-.292-.455-.441-1.104-.441-1.927c0-1.304.43-2.24 1.322-2.87c-.01.003 1.275-1.112 4.3-1.072c2.123.03 4.021.343 4.021.343v6.74h.004s-1.884.404-4.004.531c-3.017.182-4.357-.87-4.346-.867m5.898-10.415c-.601-.044-1.38-.07-2.313-.07c-1.272 0-2.5.16-3.65.47a9.5 9.5 0 0 0-3.097 1.436a7.15 7.15 0 0 0-2.15 2.444c-.524.977-.79 2.128-.79 3.417c0 1.312.225 2.452.677 3.385a6.1 6.1 0 0 0 1.935 2.317c.823.601 1.84 1.042 3.02 1.308c1.162.266 2.48.4 3.923.4c1.52 0 3.035-.123 4.503-.375a94 94 0 0 0 3.734-.721c.492-.117 1.039-.266 1.039-.266c.368-.091.338-.485.338-.485l-.007-13.555c0-2.973-.794-5.177-2.357-6.543c-1.555-1.363-3.847-2.051-6.809-2.051c-1.11 0-2.9.153-3.97.368c0 0-3.24.626-4.573 1.668c0 0-.291.182-.131.59l1.05 2.82c.13.364.484.24.484.24s.113-.043.244-.12c2.852-1.552 6.459-1.504 6.459-1.504c1.603 0 2.834.32 3.665.958c.809.619 1.22 1.555 1.22 3.53v.626c-1.275-.182-2.444-.287-2.444-.287m119.56-7.639a.4.4 0 0 0-.223-.532c-.251-.098-1.512-.364-2.485-.426c-1.861-.113-2.896.2-3.821.616c-.918.415-1.938 1.085-2.507 1.847v-1.804c0-.251-.178-.451-.426-.451h-3.8c-.247 0-.426.2-.426.451v22.11c0 .248.204.452.452.452h3.894a.45.45 0 0 0 .448-.452V84.142c0-1.482.164-2.962.492-3.89c.32-.919.758-1.654 1.297-2.183a4.55 4.55 0 0 1 1.833-1.1c.688-.211 1.45-.28 1.989-.28c.776 0 1.628.2 1.628.2c.284.033.445-.142.54-.4c.254-.678.976-2.708 1.114-3.112"/><path fill="#fff" d="M152.544 63.13a13 13 0 0 0-1.465-.35a11.6 11.6 0 0 0-2.014-.152c-2.682 0-4.795.757-6.277 2.251c-1.476 1.486-2.478 3.749-2.98 6.725l-.183 1.002h-3.366s-.408-.015-.495.43l-.55 3.086c-.04.291.087.477.48.477h3.276l-3.323 18.55c-.258 1.494-.557 2.722-.889 3.654c-.324.918-.64 1.607-1.034 2.11c-.38.48-.736.838-1.356 1.045c-.51.172-1.1.252-1.745.252c-.357 0-.834-.059-1.187-.131a3.5 3.5 0 0 1-.802-.26s-.382-.145-.535.238c-.12.317-.995 2.717-1.1 3.013c-.102.295.043.524.229.593c.437.153.761.255 1.355.397c.824.194 1.52.204 2.172.204c1.362 0 2.608-.193 3.639-.564c1.035-.375 1.938-1.028 2.74-1.91c.863-.954 1.406-1.952 1.923-3.318c.514-1.348.955-3.024 1.304-4.976l3.341-18.897h4.882s.411.014.495-.434l.554-3.082c.036-.295-.087-.477-.485-.477h-4.74c.026-.106.241-1.774.784-3.344c.233-.667.67-1.21 1.038-1.581a3.1 3.1 0 0 1 1.243-.773c.47-.153 1.005-.226 1.592-.226c.444 0 .885.051 1.216.12c.46.099.638.15.758.186c.485.146.55.004.645-.23l1.133-3.11c.117-.335-.171-.478-.273-.518M86.322 95.19c0 .247-.179.448-.426.448h-3.931c-.248 0-.423-.2-.423-.448V63.553c0-.247.175-.448.423-.448h3.93c.248 0 .427.2.427.448z"/></svg>',
199
+ "ga4": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 284"><path fill="#f9ab00" d="M256.003 247.933a35.224 35.224 0 0 1-39.376 35.161c-18.044-2.67-31.266-18.371-30.826-36.606V36.845C185.365 18.591 198.62 2.881 216.687.24a35.22 35.22 0 0 1 39.316 35.16z"/><path fill="#e37400" d="M35.101 213.193c19.386 0 35.101 15.716 35.101 35.101c0 19.386-15.715 35.101-35.101 35.101S0 267.68 0 248.295s15.715-35.102 35.101-35.102m92.358-106.387c-19.477 1.068-34.59 17.406-34.137 36.908v94.285c0 25.588 11.259 41.122 27.755 44.433a35.16 35.16 0 0 0 42.146-34.56V142.089a35.22 35.22 0 0 0-35.764-35.282"/></svg>',
200
+ "hubspot": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#FF7A59" d="M18.164 7.93V5.084a2.2 2.2 0 0 0 1.267-1.978v-.067A2.2 2.2 0 0 0 17.238.845h-.067a2.2 2.2 0 0 0-2.193 2.193v.067a2.2 2.2 0 0 0 1.252 1.973l.013.006v2.852a6.2 6.2 0 0 0-2.969 1.31l.012-.01l-7.828-6.095A2.497 2.497 0 1 0 4.3 4.656l-.012.006l7.697 5.991a6.2 6.2 0 0 0-1.038 3.446a6.2 6.2 0 0 0 1.147 3.607l-.013-.02l-2.342 2.343a2 2 0 0 0-.58-.095h-.002a2.033 2.033 0 1 0 2.033 2.033a2 2 0 0 0-.1-.595l.005.014l2.317-2.317a6.247 6.247 0 1 0 4.782-11.134l-.036-.005zm-.964 9.378a3.206 3.206 0 1 1 3.215-3.207v.002a3.206 3.206 0 0 1-3.207 3.207z"/></svg>',
201
+ "google-ads": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 230"><path fill="#fbbc04" d="M5.888 166.405L90.88 20.9c10.796 6.356 65.236 36.484 74.028 42.214L79.916 208.627c-9.295 12.28-85.804-23.587-74.028-42.23z"/><path fill="#4285f4" d="M250.084 166.402L165.092 20.906C153.21 1.132 127.62-6.054 106.601 5.625S79.182 42.462 91.064 63.119l84.992 145.514c11.882 19.765 37.473 26.95 58.492 15.272c20.1-11.68 27.418-37.73 15.536-57.486z"/><ellipse cx="42.664" cy="187.924" fill="#34a853" rx="42.664" ry="41.604"/></svg>',
202
+ "chatgpt-ads": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 260"><path d="M239.184 106.203a64.72 64.72 0 0 0-5.576-53.103C219.452 28.459 191 15.784 163.213 21.74A65.586 65.586 0 0 0 52.096 45.22a64.72 64.72 0 0 0-43.23 31.36c-14.31 24.602-11.061 55.634 8.033 76.74a64.67 64.67 0 0 0 5.525 53.102c14.174 24.65 42.644 37.324 70.446 31.36a64.72 64.72 0 0 0 48.754 21.744c28.481.025 53.714-18.361 62.414-45.481a64.77 64.77 0 0 0 43.229-31.36c14.137-24.558 10.875-55.423-8.083-76.483m-97.56 136.338a48.4 48.4 0 0 1-31.105-11.255l1.535-.87l51.67-29.825a8.6 8.6 0 0 0 4.247-7.367v-72.85l21.845 12.636c.218.111.37.32.409.563v60.367c-.056 26.818-21.783 48.545-48.601 48.601M37.158 197.93a48.35 48.35 0 0 1-5.781-32.589l1.534.921l51.722 29.826a8.34 8.34 0 0 0 8.441 0l63.181-36.425v25.221a.87.87 0 0 1-.358.665l-52.335 30.184c-23.257 13.398-52.97 5.431-66.404-17.803M23.549 85.38a48.5 48.5 0 0 1 25.58-21.333v61.39a8.29 8.29 0 0 0 4.195 7.316l62.874 36.272l-21.845 12.636a.82.82 0 0 1-.767 0L41.353 151.53c-23.211-13.454-31.171-43.144-17.804-66.405zm179.466 41.695l-63.08-36.63L161.73 77.86a.82.82 0 0 1 .768 0l52.233 30.184a48.6 48.6 0 0 1-7.316 87.635v-61.391a8.54 8.54 0 0 0-4.4-7.213m21.742-32.69l-1.535-.922l-51.619-30.081a8.39 8.39 0 0 0-8.492 0L99.98 99.808V74.587a.72.72 0 0 1 .307-.665l52.233-30.133a48.652 48.652 0 0 1 72.236 50.391zM88.061 139.097l-21.845-12.585a.87.87 0 0 1-.41-.614V65.685a48.652 48.652 0 0 1 79.757-37.346l-1.535.87l-51.67 29.825a8.6 8.6 0 0 0-4.246 7.367zm11.868-25.58L128.067 97.3l28.188 16.218v32.434l-28.086 16.218l-28.188-16.218z"/></svg>',
203
+ "open-meteo": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><circle cx="25" cy="24" r="11" fill="#f2a93b"/><g stroke="#f2a93b" stroke-width="3.5" stroke-linecap="round"><path d="M25 5v5M25 38v4M6 24h5M10.9 9.9l3.5 3.5M39.1 9.9l-3.5 3.5M10.9 38.1l3.5-3.5"/></g><path d="M24 55h25a11 11 0 0 0 1.4-21.9A15 15 0 0 0 22.3 38 8.5 8.5 0 0 0 24 55z" fill="#5b8fd6"/></svg>',
204
+ "gong": '<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">\n<rect width="512" height="512" rx="85.3333" fill="#8039DF"/>\n<rect x="53.4446" y="53.4446" width="21.3333" height="21.3333" fill="#3E0075"/>\n<rect x="437.333" y="53.3333" width="21.3333" height="21.3333" fill="#3E0075"/>\n<rect x="437.333" y="437.333" width="21.3333" height="21.3333" fill="#3E0075"/>\n<rect x="53.3333" y="437.333" width="21.3333" height="21.3333" fill="#3E0075"/>\n<path d="M427.2 229.814H328.146C322.677 229.814 318.423 235.887 320.246 240.745L343.946 302.075C345.162 304.504 342.731 307.54 339.693 307.54L309.308 305.719C308.093 305.719 306.877 306.326 305.662 307.54L282.57 340.938C281.354 342.76 278.924 343.367 276.493 342.153L241.247 318.471C240.031 317.256 238.208 317.256 236.385 318.471L187.77 351.261C184.732 353.69 180.478 350.654 181.693 347.011L195.67 298.432C196.278 296.61 195.062 294.181 193.239 293.574L167.716 283.251C165.285 282.037 164.07 279 165.893 277.179L188.378 249.246C189.593 248.031 189.593 245.602 188.378 244.388L169.539 217.062C167.716 214.634 169.539 210.99 172.578 210.99L202.355 208.561C204.785 208.561 206.001 206.74 206.001 204.311L203.57 163.019C203.57 159.982 206.608 158.161 209.039 158.768L245.501 173.949C247.324 174.556 249.147 173.949 250.362 172.734L275.885 144.802C277.708 142.373 281.354 142.98 282.57 146.016L297.762 184.879C299.585 189.737 305.662 191.559 309.916 188.522L369.469 144.194C376.154 139.337 371.9 128.406 363.392 129.621L325.108 134.479C323.285 134.479 321.462 133.871 320.854 132.05L300.193 79.2203C297.762 73.7552 291.077 72.5408 286.823 76.7914L241.854 125.37C240.639 126.585 238.816 127.192 236.993 126.585L178.047 101.688C172.578 99.2591 167.109 102.902 166.501 108.975L164.07 169.698C164.07 172.127 162.247 173.342 160.424 173.342L106.339 176.985C100.263 177.592 96.6164 184.272 100.263 189.737L136.116 242.566C137.332 243.781 137.332 246.21 136.116 247.424L99.6549 289.323C96.6164 292.36 98.4395 299.039 103.301 300.861L145.232 319.078C147.055 319.685 148.27 322.114 147.662 323.936L120.924 427.773C119.101 435.06 127.609 440.525 133.686 436.274L233.954 364.62C235.17 363.406 236.993 363.406 238.816 364.62L284.393 396.804C288.039 399.233 293.508 398.626 295.939 394.375L324.5 350.654C325.108 349.44 326.931 348.832 328.146 348.832L396.208 357.334C401.677 357.941 407.146 353.69 405.323 348.225L376.762 274.75C376.154 272.928 376.762 270.499 379.192 269.285L430.846 244.995C438.138 241.352 435.708 229.814 427.2 229.814Z" fill="white"/>\n</svg>\n',
205
+ "gmail": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 36"><path fill="#4285f4" d="M3 36h8V17L0 9v24a3 3 0 0 0 3 3z"/><path fill="#34a853" d="M37 36h8a3 3 0 0 0 3-3V9l-11 8z"/><path fill="#fbbc04" d="M37 3v14l11-8V5c0-4-4.6-6.4-7.8-4z"/><path fill="#ea4335" d="M11 17V3l13 9.7L37 3v14l-13 9.7z"/><path fill="#c5221f" d="M0 5v4l11 8V3L7.8 1C4.6-1.4 0 1 0 5z"/></svg>',
206
+ "google-drive": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 87.3 78"><path fill="#0066da" d="m6.6 66.85 3.85 6.65c.8 1.4 1.95 2.5 3.3 3.3l13.75-23.8H0c0 1.55.4 3.1 1.2 4.5z"/><path fill="#00ac47" d="M43.65 25 29.9 1.2c-1.35.8-2.5 1.9-3.3 3.3l-25.4 44A9.06 9.06 0 0 0 0 53h27.5z"/><path fill="#ea4335" d="M73.55 76.8c1.35-.8 2.5-1.9 3.3-3.3l1.6-2.75 7.65-13.25c.8-1.4 1.2-2.95 1.2-4.5H59.798l5.852 11.5z"/><path fill="#00832d" d="M43.65 25 57.4 1.2C56.05.4 54.5 0 52.9 0H34.4c-1.6 0-3.15.45-4.5 1.2z"/><path fill="#2684fc" d="M59.8 53H27.5L13.75 76.8c1.35.8 2.9 1.2 4.5 1.2h50.8c1.6 0 3.15-.45 4.5-1.2z"/><path fill="#ffba00" d="m73.4 26.5-12.7-22c-.8-1.4-1.95-2.5-3.3-3.3L43.65 25 59.8 53h27.45c0-1.55-.4-3.1-1.2-4.5z"/></svg>',
207
+ "amazon-s3": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><defs><linearGradient id="SVG7R6tZwZW" x1="0%" x2="100%" y1="100%" y2="0%"><stop offset="0%" stop-color="#1b660f"/><stop offset="100%" stop-color="#6cae3e"/></linearGradient></defs><path fill="url(#SVG7R6tZwZW)" d="M0 0h256v256H0z"/><path fill="#fff" d="m194.675 137.256l1.229-8.652c11.33 6.787 11.478 9.59 11.475 9.667c-.02.016-1.952 1.629-12.704-1.015m-6.218-1.728c-19.584-5.926-46.857-18.438-57.894-23.654c0-.045.013-.086.013-.131c0-4.24-3.45-7.69-7.693-7.69c-4.237 0-7.687 3.45-7.687 7.69s3.45 7.69 7.687 7.69c1.862 0 3.552-.695 4.886-1.8c12.986 6.148 40.048 18.478 59.776 24.302l-7.801 55.059q-.033.225-.032.451c0 4.848-21.463 13.754-56.532 13.754c-35.44 0-57.13-8.906-57.13-13.754q0-.22-.028-.435l-16.3-119.062c14.108 9.712 44.454 14.85 73.478 14.85c28.979 0 59.273-5.12 73.41-14.802zM48 65.528c.23-4.21 24.428-20.73 75.2-20.73c50.764 0 74.966 16.516 75.2 20.73v1.437c-2.784 9.443-34.144 19.434-75.2 19.434c-41.127 0-72.503-10.023-75.2-19.479zm156.8.07c0-11.087-31.79-27.2-81.6-27.2c-49.812 0-81.6 16.113-81.6 27.2l.3 2.414l17.754 129.676c.426 14.503 39.1 19.91 63.526 19.91c30.31 0 62.512-6.969 62.928-19.9l7.668-54.07c4.265 1.02 7.776 1.542 10.595 1.542c3.785 0 6.345-.925 7.897-2.774c1.274-1.517 1.76-3.354 1.396-5.31c-.83-4.428-6.087-9.202-16.794-15.311l7.603-53.639z"/></svg>',
208
+ "linear": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#5e6ad2" d="M2.886 4.18A11.98 11.98 0 0 1 11.99 0C18.624 0 24 5.376 24 12.009c0 3.64-1.62 6.903-4.18 9.105L2.887 4.18ZM1.817 5.626l16.556 16.556q-.787.496-1.65.866L.951 7.277q.371-.863.866-1.65ZM.322 9.163l14.515 14.515q-1.066.26-2.195.322L0 11.358a12 12 0 0 1 .322-2.195m-.17 4.862l9.823 9.824a12.02 12.02 0 0 1-9.824-9.824Z"/></svg>',
209
+ "okta": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#007dc1" d="M12 0C5.389 0 0 5.35 0 12s5.35 12 12 12s12-5.35 12-12S18.611 0 12 0m0 18c-3.325 0-6-2.675-6-6s2.675-6 6-6s6 2.675 6 6s-2.675 6-6 6"/></svg>',
210
+ "stripe": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#635bff" d="M13.976 9.15c-2.172-.806-3.356-1.426-3.356-2.409c0-.831.683-1.305 1.901-1.305c2.227 0 4.515.858 6.09 1.631l.89-5.494C18.252.975 15.697 0 12.165 0C9.667 0 7.589.654 6.104 1.872C4.56 3.147 3.757 4.992 3.757 7.218c0 4.039 2.467 5.76 6.476 7.219c2.585.92 3.445 1.574 3.445 2.583c0 .98-.84 1.545-2.354 1.545c-1.875 0-4.965-.921-6.99-2.109l-.9 5.555C5.175 22.99 8.385 24 11.714 24c2.641 0 4.843-.624 6.328-1.813c1.664-1.305 2.525-3.236 2.525-5.732c0-4.128-2.524-5.851-6.594-7.305z"/></svg>',
211
+ "clerk": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 324"><path fill="#bab1ff" d="M251.87 27.289c5.058 3.387 5.49 10.513 1.185 14.818l-36.97 36.971c-3.342 3.341-8.526 3.87-12.732 1.715c-12.435-6.371-26.53-9.966-41.462-9.966c-50.294 0-91.064 40.77-91.064 91.064c0 14.933 3.595 29.027 9.966 41.462c2.154 4.206 1.626 9.39-1.715 12.731l-36.971 36.971c-4.305 4.305-11.43 3.873-14.818-1.185C10.053 226.138 0 195.188 0 161.89C0 72.48 72.48 0 161.89 0c33.298 0 64.248 10.053 89.98 27.289"/><path fill="#6c47ff" d="M212.481 161.89c0 27.941-22.65 50.591-50.59 50.591s-50.591-22.65-50.591-50.59s22.65-50.591 50.59-50.591s50.591 22.65 50.591 50.59m40.574 119.784c4.305 4.306 3.873 11.431-1.184 14.818c-25.733 17.237-56.683 27.29-89.98 27.29s-64.248-10.053-89.98-27.29c-5.058-3.387-5.49-10.512-1.186-14.818l36.971-36.97c3.342-3.342 8.525-3.87 12.731-1.716c12.437 6.371 26.53 9.966 41.464 9.966s29.027-3.595 41.463-9.966c4.206-2.154 9.39-1.626 12.73 1.715z"/></svg>',
212
+ "better-stack": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#000000" d="m.78 10.748l-.766 6.638a2.1 2.1 0 0 0 .696 1.812l1.896 1.672c.65.573 1.658.015 1.519-.84l-1.521-9.325c-.172-1.056-1.702-1.02-1.825.043m12.373 8.714L8.63 6.43c-.502-1.447-2.608-1.384-3.02.09l-1.376 4.923c-.156.56-.216.882 0 1.421h.523l1.899 6.07c.294.732.902 1.3 1.661 1.554l2.832.943c1.241.414 2.426-.751 2.004-1.97zm10.63-1.033L15.79 3.443c-.697-1.307-2.578-1.272-3.227.06l-1.966 3.955c-.237.487-.127.66.07.943c.159.227.527.245.676.012a.348.348 0 0 1 .606.038l5.138 10.687a2.74 2.74 0 0 0 2.142 1.601l2.718.348c1.463.192 2.53-1.354 1.834-2.658"/></svg>',
213
+ "notion": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 268"><path fill="#fff" d="M16.092 11.538L164.09.608c18.179-1.56 22.85-.508 34.28 7.801l47.243 33.282C253.406 47.414 256 48.975 256 55.207v182.527c0 11.439-4.155 18.205-18.696 19.24L65.44 267.378c-10.913.517-16.11-1.043-21.825-8.327L8.826 213.814C2.586 205.487 0 199.254 0 191.97V29.726c0-9.352 4.155-17.153 16.092-18.188"/><path d="M164.09.608L16.092 11.538C4.155 12.573 0 20.374 0 29.726v162.245c0 7.284 2.585 13.516 8.826 21.843l34.789 45.237c5.715 7.284 10.912 8.844 21.825 8.327l171.864-10.404c14.532-1.035 18.696-7.801 18.696-19.24V55.207c0-5.911-2.336-7.614-9.21-12.66l-1.185-.856L198.37 8.409C186.94.1 182.27-.952 164.09.608M69.327 52.22c-14.033.945-17.216 1.159-25.186-5.323L23.876 30.778c-2.06-2.086-1.026-4.69 4.163-5.207l142.274-10.395c11.947-1.043 18.17 3.12 22.842 6.758l24.401 17.68c1.043.525 3.638 3.637.517 3.637L71.146 52.095zm-16.36 183.954V81.222c0-6.767 2.077-9.887 8.3-10.413L230.02 60.93c5.724-.517 8.31 3.12 8.31 9.879v153.917c0 6.767-1.044 12.49-10.387 13.008l-161.487 9.361c-9.343.517-13.489-2.594-13.489-10.921M212.377 89.53c1.034 4.681 0 9.362-4.681 9.897l-7.783 1.542v114.404c-6.758 3.637-12.981 5.715-18.18 5.715c-8.308 0-10.386-2.604-16.609-10.396l-50.898-80.079v77.476l16.1 3.646s0 9.362-12.989 9.362l-35.814 2.077c-1.043-2.086 0-7.284 3.63-8.318l9.351-2.595V109.823l-12.98-1.052c-1.044-4.68 1.55-11.439 8.826-11.965l38.426-2.585l52.958 81.113v-71.76l-13.498-1.552c-1.043-5.733 3.111-9.896 8.3-10.404z"/></svg>',
214
+ "attio": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 28"><path fill="#2e3238" d="m31.669 19.175l-2.673-4.279l-.016-.026l-.211-.336a2.16 2.16 0 0 0-1.838-1.022l-4.306-.014l-.3.481l-5.146 8.235l-.284.456l2.156 3.444a2.15 2.15 0 0 0 1.843 1.023h6.035a2.19 2.19 0 0 0 1.842-1.02l.213-.34s.008-.01.01-.015l2.677-4.284c.44-.7.44-1.605 0-2.303zm-.816 1.792l-2.677 4.284l-.037.052a.363.363 0 0 1-.579-.054l-2.678-4.284a1.2 1.2 0 0 1-.137-.969c.03-.105.076-.21.135-.306l2.674-4.28l.006-.01a.34.34 0 0 1 .213-.154q.04-.01.071-.014h.03c.062 0 .215.02.31.176l2.674 4.278c.244.39.244.891 0 1.28zM23.758 8.823a2.19 2.19 0 0 0 0-2.303l-2.673-4.278l-.223-.36a2.16 2.16 0 0 0-1.844-1.02h-6.034c-.754 0-1.442.381-1.844 1.022L.333 19.178a2.16 2.16 0 0 0-.002 2.301L3.23 26.12c.4.64 1.088 1.02 1.842 1.02h6.035c.758 0 1.446-.381 1.844-1.022l.22-.35v-.004s.005-.006.005-.008l2.154-3.445l6.384-10.218l2.041-3.268zm-.63-1.151c0 .22-.062.443-.187.64L12.355 25.255a.36.36 0 0 1-.31.17a.36.36 0 0 1-.31-.17l-2.676-4.286a1.22 1.22 0 0 1 0-1.28L19.645 2.752a.36.36 0 0 1 .31-.173c.062 0 .215.018.313.175L22.94 7.03c.125.197.187.42.187.64"/></svg>',
215
+ "dropbox": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 218"><path fill="#0061ff" d="M63.995 0L0 40.771l63.995 40.772L128 40.771zM192 0l-64 40.775l64 40.775l64.001-40.775zM0 122.321l63.995 40.772L128 122.321L63.995 81.55zM192 81.55l-64 40.775l64 40.774l64-40.774zM64 176.771l64.005 40.772L192 176.771L128.005 136z"/></svg>',
216
+ "resend": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path fill="#141413" d="M156.575 0c49.582 0 79.07 29.488 79.07 68.632s-29.488 68.632-79.07 68.632h-25.052L256 256h-87.942l-94.729-90.03c-6.784-6.263-9.916-13.57-9.916-19.833c0-8.873 6.263-16.701 18.267-20.094l48.8-13.048c18.527-4.958 31.314-19.31 31.314-38.1c0-22.964-18.79-36.273-42.014-36.273H0V0z"/></svg>',
217
+ "microsoft-word": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><defs><linearGradient id="SVG2m3AVb6p" x1="4.494" x2="13.832" y1="-1712.086" y2="-1695.914" gradientTransform="translate(0 1720)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#2368c4"/><stop offset=".5" stop-color="#1a5dbe"/><stop offset="1" stop-color="#1146ac"/></linearGradient></defs><path fill="#41a5ee" d="M28.806 3H9.705a1.19 1.19 0 0 0-1.193 1.191V9.5l11.069 3.25L30 9.5V4.191A1.19 1.19 0 0 0 28.806 3"/><path fill="#2b7cd3" d="M30 9.5H8.512V16l11.069 1.95L30 16Z"/><path fill="#185abd" d="M8.512 16v6.5l10.418 1.3L30 22.5V16Z"/><path fill="#103f91" d="M9.705 29h19.1A1.19 1.19 0 0 0 30 27.809V22.5H8.512v5.309A1.19 1.19 0 0 0 9.705 29"/><path d="M16.434 8.2H8.512v16.25h7.922a1.2 1.2 0 0 0 1.194-1.191V9.391A1.2 1.2 0 0 0 16.434 8.2" opacity=".1"/><path d="M15.783 8.85H8.512V25.1h7.271a1.2 1.2 0 0 0 1.194-1.191V10.041a1.2 1.2 0 0 0-1.194-1.191" opacity=".2"/><path d="M15.783 8.85H8.512V23.8h7.271a1.2 1.2 0 0 0 1.194-1.191V10.041a1.2 1.2 0 0 0-1.194-1.191" opacity=".2"/><path d="M15.132 8.85h-6.62V23.8h6.62a1.2 1.2 0 0 0 1.194-1.191V10.041a1.2 1.2 0 0 0-1.194-1.191" opacity=".2"/><path fill="url(#SVG2m3AVb6p)" d="M3.194 8.85h11.938a1.193 1.193 0 0 1 1.194 1.191v11.918a1.193 1.193 0 0 1-1.194 1.191H3.194A1.19 1.19 0 0 1 2 21.959V10.041A1.19 1.19 0 0 1 3.194 8.85"/><path fill="#fff" d="M6.9 17.988q.035.276.046.481h.028q.015-.195.065-.47c.05-.275.062-.338.089-.465l1.255-5.407h1.624l1.3 5.326a8 8 0 0 1 .162 1h.022a8 8 0 0 1 .135-.975l1.039-5.358h1.477l-1.824 7.748h-1.727l-1.237-5.126q-.054-.222-.122-.578t-.084-.52h-.021q-.021.189-.084.561t-.1.552L7.78 19.871H6.024L4.19 12.127h1.5l1.131 5.418a5 5 0 0 1 .079.443"/></svg>',
218
+ "shopify": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 292"><path fill="#95bf46" d="M223.774 57.34c-.201-1.46-1.48-2.268-2.537-2.357a19614 19614 0 0 0-23.383-1.743s-15.507-15.395-17.209-17.099c-1.703-1.703-5.029-1.185-6.32-.805c-.19.056-3.388 1.043-8.678 2.68c-5.18-14.906-14.322-28.604-30.405-28.604c-.444 0-.901.018-1.358.044C129.31 3.407 123.644.779 118.75.779c-37.465 0-55.364 46.835-60.976 70.635c-14.558 4.511-24.9 7.718-26.221 8.133c-8.126 2.549-8.383 2.805-9.45 10.462C21.3 95.806.038 260.235.038 260.235l165.678 31.042l89.77-19.42S223.973 58.8 223.775 57.34M156.49 40.848l-14.019 4.339c.005-.988.01-1.96.01-3.023c0-9.264-1.286-16.723-3.349-22.636c8.287 1.04 13.806 10.469 17.358 21.32m-27.638-19.483c2.304 5.773 3.802 14.058 3.802 25.238c0 .572-.005 1.095-.01 1.624c-9.117 2.824-19.024 5.89-28.953 8.966c5.575-21.516 16.025-31.908 25.161-35.828m-11.131-10.537c1.617 0 3.246.549 4.805 1.622c-12.007 5.65-24.877 19.88-30.312 48.297l-22.886 7.088C75.694 46.16 90.81 10.828 117.72 10.828"/><path fill="#5e8e3e" d="M221.237 54.983a19614 19614 0 0 0-23.383-1.743s-15.507-15.395-17.209-17.099c-.637-.634-1.496-.959-2.394-1.099l-12.527 256.233l89.762-19.418S223.972 58.8 223.774 57.34c-.201-1.46-1.48-2.268-2.537-2.357"/><path fill="#fff" d="m135.242 104.585l-11.069 32.926s-9.698-5.176-21.586-5.176c-17.428 0-18.305 10.937-18.305 13.693c0 15.038 39.2 20.8 39.2 56.024c0 27.713-17.577 45.558-41.277 45.558c-28.44 0-42.984-17.7-42.984-17.7l7.615-25.16s14.95 12.835 27.565 12.835c8.243 0 11.596-6.49 11.596-11.232c0-19.616-32.16-20.491-32.16-52.724c0-27.129 19.472-53.382 58.778-53.382c15.145 0 22.627 4.338 22.627 4.338"/></svg>',
219
+ "paypal": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 302"><path fill="#27346a" d="M217.168 23.507C203.234 7.625 178.046.816 145.823.816h-93.52A13.39 13.39 0 0 0 39.076 12.11L.136 259.077c-.774 4.87 2.997 9.28 7.933 9.28h57.736l14.5-91.971l-.45 2.88c1.033-6.501 6.593-11.296 13.177-11.296h27.436c53.898 0 96.101-21.892 108.429-85.221c.366-1.873.683-3.696.957-5.477q-2.334-1.236 0 0c3.671-23.407-.025-39.34-12.686-53.765"/><path fill="#27346a" d="M102.397 68.84a11.7 11.7 0 0 1 5.053-1.14h73.318c8.682 0 16.78.565 24.18 1.756a102 102 0 0 1 6.177 1.182a90 90 0 0 1 8.59 2.347c3.638 1.215 7.026 2.63 10.14 4.287c3.67-23.416-.026-39.34-12.687-53.765C203.226 7.625 178.046.816 145.823.816H52.295C45.71.816 40.108 5.61 39.076 12.11L.136 259.068c-.774 4.878 2.997 9.282 7.925 9.282h57.744L95.888 77.58a11.72 11.72 0 0 1 6.509-8.74"/><path fill="#2790c3" d="M228.897 82.749c-12.328 63.32-54.53 85.221-108.429 85.221H93.024c-6.584 0-12.145 4.795-13.168 11.296L61.817 293.621c-.674 4.262 2.622 8.124 6.934 8.124h48.67a11.71 11.71 0 0 0 11.563-9.88l.474-2.48l9.173-58.136l.591-3.213a11.71 11.71 0 0 1 11.562-9.88h7.284c47.147 0 84.064-19.154 94.852-74.55c4.503-23.15 2.173-42.478-9.739-56.054c-3.613-4.112-8.1-7.508-13.327-10.28c-.283 1.79-.59 3.604-.957 5.477"/><path fill="#1f264f" d="M216.952 72.128a90 90 0 0 0-5.818-1.49a110 110 0 0 0-6.177-1.174c-7.408-1.199-15.5-1.765-24.19-1.765h-73.309a11.6 11.6 0 0 0-5.053 1.149a11.68 11.68 0 0 0-6.51 8.74l-15.582 98.798l-.45 2.88c1.025-6.501 6.585-11.296 13.17-11.296h27.444c53.898 0 96.1-21.892 108.428-85.221c.367-1.873.675-3.688.958-5.477q-4.682-2.47-10.14-4.279a83 83 0 0 0-2.77-.865"/></svg>',
220
+ // Jira, Google Calendar, Intercom (in black: its brand cyan disappears on white) and Zendesk: Simple Icons 16.35.0, CC0-1.0; the marks are their owners’ trademarks.
221
+ "jira": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#0052CC" d="M11.571 11.513H0a5.218 5.218 0 0 0 5.232 5.215h2.13v2.057A5.215 5.215 0 0 0 12.575 24V12.518a1.005 1.005 0 0 0-1.005-1.005zm5.723-5.756H5.736a5.215 5.215 0 0 0 5.215 5.214h2.129v2.058a5.218 5.218 0 0 0 5.215 5.214V6.758a1.001 1.001 0 0 0-1.001-1.001zM23.013 0H11.455a5.215 5.215 0 0 0 5.215 5.215h2.129v2.057A5.215 5.215 0 0 0 24 12.483V1.005A1.001 1.001 0 0 0 23.013 0Z"/></svg>',
222
+ "google-calendar": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#4285F4" d="M18.316 5.684H24v12.632h-5.684V5.684zM5.684 24h12.632v-5.684H5.684V24zM18.316 5.684V0H1.895A1.894 1.894 0 0 0 0 1.895v16.421h5.684V5.684h12.632zm-7.207 6.25v-.065c.272-.144.5-.349.687-.617s.279-.595.279-.982c0-.379-.099-.72-.3-1.025a2.05 2.05 0 0 0-.832-.714 2.703 2.703 0 0 0-1.197-.257c-.6 0-1.094.156-1.481.467-.386.311-.65.671-.793 1.078l1.085.452c.086-.249.224-.461.413-.633.189-.172.445-.257.767-.257.33 0 .602.088.816.264a.86.86 0 0 1 .322.703c0 .33-.12.589-.36.778-.24.19-.535.284-.886.284h-.567v1.085h.633c.407 0 .748.109 1.02.327.272.218.407.499.407.843 0 .336-.129.614-.387.832s-.565.327-.924.327c-.351 0-.651-.103-.897-.311-.248-.208-.422-.502-.521-.881l-1.096.452c.178.616.505 1.082.977 1.401.472.319.984.478 1.538.477a2.84 2.84 0 0 0 1.293-.291c.382-.193.684-.458.902-.794.218-.336.327-.72.327-1.149 0-.429-.115-.797-.344-1.105a2.067 2.067 0 0 0-.881-.689zm2.093-1.931l.602.913L15 10.045v5.744h1.187V8.446h-.827l-2.158 1.557zM22.105 0h-3.289v5.184H24V1.895A1.894 1.894 0 0 0 22.105 0zm-3.289 23.5l4.684-4.684h-4.684V23.5zM0 22.105C0 23.152.848 24 1.895 24h3.289v-5.184H0v3.289z"/></svg>',
223
+ "intercom": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#000000" d="M21 0H3C1.343 0 0 1.343 0 3v18c0 1.658 1.343 3 3 3h18c1.658 0 3-1.342 3-3V3c0-1.657-1.342-3-3-3zm-5.801 4.399c0-.44.36-.8.802-.8.44 0 .8.36.8.8v10.688c0 .442-.36.801-.8.801-.443 0-.802-.359-.802-.801V4.399zM11.2 3.994c0-.44.357-.799.8-.799s.8.359.8.799v11.602c0 .44-.357.8-.8.8s-.8-.36-.8-.8V3.994zm-4 .405c0-.44.359-.8.799-.8.443 0 .802.36.802.8v10.688c0 .442-.36.801-.802.801-.44 0-.799-.359-.799-.801V4.399zM3.199 6c0-.442.36-.8.802-.8.44 0 .799.358.799.8v7.195c0 .441-.359.8-.799.8-.443 0-.802-.36-.802-.8V6zM20.52 18.202c-.123.105-3.086 2.593-8.52 2.593-5.433 0-8.397-2.486-8.521-2.593-.335-.288-.375-.792-.086-1.128.285-.334.79-.375 1.125-.09.047.041 2.693 2.211 7.481 2.211 4.848 0 7.456-2.186 7.479-2.207.334-.289.839-.25 1.128.086.289.336.25.84-.086 1.128zm.281-5.007c0 .441-.36.8-.801.8-.441 0-.801-.36-.801-.8V6c0-.442.361-.8.801-.8.441 0 .801.357.801.8v7.195z"/></svg>',
224
+ "zendesk": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#03363D" d="M12.914 2.904V16.29L24 2.905H12.914zM0 2.906C0 5.966 2.483 8.45 5.543 8.45s5.542-2.484 5.543-5.544H0zm11.086 4.807L0 21.096h11.086V7.713zm7.37 7.84c-3.063 0-5.542 2.48-5.542 5.543H24c0-3.06-2.48-5.543-5.543-5.543z"/></svg>'
225
+ };
226
+ var pngLogos = {
227
+ "kalshi": "iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAIAAABMXPacAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAgKADAAQAAAABAAAAgAAAAABIjgR3AAAhEElEQVR4Ae1d6Y8lV3W/Sy2v3tbbLLZnxjZeZIMx8SLGLHZMDBhQ2KIAIVIihU8h+Z4PkfI3gBRFSqJEShRFSYggAhFCgowB2yzBGDDYAY8HJmPP1tPb22u7S36nql/P9HTVuGtc0x2kd+fN63r3Vd3lnHv2c+/j/LnPsFnZPwiI/et61jNBYIaAfV4HMwTMELDPENjn7mcUMEPAPkNgn7ufUcAMAfsMgX3ufkYBMwTsMwT2ufsZBcwQsM8Q2OfuZxQwQ8A+Q2Cfu59RwAwB+wyBfe5+RgEzBOwzBPa5+xkFzBCwzxDY5+5nFDBDwD5DYJ+7n1HAPiPAqat/KxmzhlnmadFUXDIeOmwitLQc5YperLWoKaz3DNfcpoJZRzCJP2jTMil5pK5o5OofXcMSDIlZoVkjNq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mSq8Qgk++blGk3jcpViE4ziu1wK18rlZxZ/TBN+d1xHL+1Wj30bNFcR0kdzJBbjNPJmZmZb5hyB+v1+gOI9FZm3ukotsqQpZMcuj2U4geY4bIkSe5x+jVTgdu3gWWbRt1rZFellPqumf7zWtX2p2E4jut3j4yM3DswEMjUtgUAJWXangza/TG0ldty85ptnfmtHj6qFO8CgM8QBQ/WatUjjpeu6LQ8PFebNeVOd5kcQB3GLUpWrVZlILw+isofAMD3ioMqQxbbqVYUue8oAD+kFNyTJIlsn6GwAjt/JUv3T4hgTKnCce9ZMBFwo6G+XK/Xn57ntuoEwSqVyi8j8hWI9BYAkOPQ1Yi44kQHlQ4kMQ0FMSI8iQjfRuRHDhyo/0+nsnNi2+w8ItiiV7eTUUTiv6evVavVHW1uWLcNyBxwvQOAr5DfBHAipl0/wBQixsz8AwB8WCn1dbNNteXpZxYVYinR8qW3TW/LwjA8i5nXB4H+UQVxsSKz/t/aHEbEfXEcP9vWydihrFPNSco3Ojp6bpqmZxtZBG40+EipVNo/NDT043379rn/6xn3F1AK064ARfbM86GXSRHWo1ekA62vYD5JmZ3IE+KVR+4iP1lrn9l1ey61GaAT7XEG7dufnmfjLDB2IM4mR68DYz0ej8fj8Xg8Ho/H4/F4PB6Px+PxeDwej8fj8Xg8Ho/H4/F4PB6Px+PxeDwej8fj8Xg8Ho/H4/F4PB6Px9Of/D+y5cyuZJVkkwAAAABJRU5ErkJggg=="
229
+ };
230
+ var logoSrc = (name) => logos[name] ? `data:image/svg+xml,${encodeURIComponent(logos[name])}` : pngLogos[name] ? `data:image/png;base64,${pngLogos[name]}` : void 0;
231
+ function toolLogo(name) {
232
+ const src = logoSrc(name);
233
+ return src ? `<img class="catalog-brand" src="${src}" alt="" width="36" height="36">` : '<span class="catalog-brand" aria-hidden="true">\u25C7</span>';
234
+ }
235
+ function toolIcon(name, label2) {
236
+ const src = logoSrc(name);
237
+ return src ? `<img class="tool-icon" src="${src}" alt="${label2.replace(/[&<>"]/g, "")}" title="${label2.replace(/[&<>"]/g, "")}" width="16" height="16">` : `<span class="tool-icon tool-icon-fallback" title="${label2.replace(/[&<>"]/g, "")}">${label2.slice(0, 1).replace(/[&<>"]/g, "")}</span>`;
238
+ }
239
+
240
+ // frontend/src/sim-time.ts
241
+ var HOUR = 36e5;
242
+ var DAY = 24 * HOUR;
243
+ var two = (n) => String(n).padStart(2, "0");
244
+ function simOffset(ms, startMs) {
245
+ const total = Math.max(0, Math.floor((ms - startMs) / 1e3)), days = Math.floor(total / 86400), hours = Math.floor(total % 86400 / 3600), minutes = Math.floor(total % 3600 / 60), seconds = total % 60;
246
+ if (days) return `+${days}d ${hours}:${two(minutes)}:${two(seconds)}`;
247
+ return hours ? `+${hours}:${two(minutes)}:${two(seconds)}` : `+${minutes}:${two(seconds)}`;
248
+ }
249
+ function gapLabel(gapMs) {
250
+ if (gapMs >= DAY) {
251
+ const d = Math.round(gapMs / DAY);
252
+ return `${d} day${d === 1 ? "" : "s"} later`;
253
+ }
254
+ if (gapMs >= HOUR) {
255
+ const hrs = Math.round(gapMs / HOUR);
256
+ return `${hrs} hour${hrs === 1 ? "" : "s"} later`;
257
+ }
258
+ return "";
259
+ }
260
+ function simIso(ms) {
261
+ const date = new Date(ms);
262
+ return Number.isNaN(date.getTime()) ? "" : date.toISOString();
263
+ }
264
+ var simAbsolute = (ms) => {
265
+ const iso = simIso(ms);
266
+ return iso ? iso.replace("T", " ").slice(0, 19) + " scene time" : "";
267
+ };
268
+
269
+ // frontend/src/conversation.ts
270
+ var list = (value) => Array.isArray(value) ? value.filter((item) => item && typeof item === "object") : [];
271
+ var hasConversation = (o) => list(o?.peopleTimeline?.persons).length > 0;
272
+ var entryAnchor = (id) => "cv-" + String(id).replace(/[^A-Za-z0-9_-]+/g, "-");
273
+ function people(o) {
274
+ const persons = list(o.peopleTimeline?.persons);
275
+ return (ref2) => ref2 === "agent" ? "Agent" : String(persons.find((p) => p.ref === ref2)?.name ?? ref2);
276
+ }
277
+ var words = (id) => String(id ?? "").replace(/[_-]+/g, " ").trim();
278
+ function factLabel(fact, name) {
279
+ const [owner, id] = String(fact ?? "").split(/\.(.*)/s);
280
+ return id ? `${name(owner)}\u2019s ${words(id)}` : words(owner);
281
+ }
282
+ var COMPARE = { gte: "\u2265", gt: ">", lte: "\u2264", lt: "<", eq: "=", ne: "\u2260" };
283
+ function ruleText(reason, name) {
284
+ const text2 = String(reason ?? "");
285
+ if (text2 === "default rule") return "default";
286
+ const rule = /^rule (\d+): (.*)$/s.exec(text2);
287
+ if (!rule) return text2;
288
+ const [, number, condition] = rule;
289
+ const json3 = (when) => {
290
+ if (Array.isArray(when?.fact) && when.fact.length === 3 && COMPARE[when.fact[1]] && typeof when.fact[2] === "number") return `${factLabel(when.fact[0], name)} ${COMPARE[when.fact[1]]} ${when.fact[2]}`;
291
+ for (const [key, joiner] of [["all", " and "], ["any", " or "]]) if (Array.isArray(when?.[key])) {
292
+ const parts = when[key].map(json3);
293
+ return parts.length && parts.every(Boolean) ? parts.join(joiner) : void 0;
294
+ }
295
+ return void 0;
296
+ };
297
+ const words2 = (all) => {
298
+ const parts = all.split(" and ").map((part) => /^([A-Za-z0-9_-]+\.[A-Za-z0-9_]+) (≥|≤|=|>|<|≠) (-?\d+(?:\.\d+)?)$/.exec(part.trim())).map((match) => match ? `${factLabel(match[1], name)} ${match[2]} ${match[3]}` : void 0);
299
+ return parts.every(Boolean) ? parts.join(" and ") : void 0;
300
+ };
301
+ if (!/^[[{]/.test(condition)) return words2(condition) ?? `rule ${number}`;
302
+ try {
303
+ return json3(JSON.parse(condition)) ?? `rule ${number}`;
304
+ } catch {
305
+ return `rule ${number}`;
306
+ }
307
+ }
308
+ function where(place) {
309
+ const tool = String(place.tool ?? "");
310
+ const kind = place.kind === "thread" ? " \xB7 thread" : place.kind === "dm" ? " \xB7 direct message" : "";
311
+ return `<span class="cv-place">${tool ? toolIcon(tool, toolName(tool)) : ""}${h(String(place.label ?? ""))}${h(kind)}</span>`;
312
+ }
313
+ function body(entry, name) {
314
+ if (entry.kind === "message") {
315
+ const to = Array.isArray(entry.to) && entry.to.length ? ` \u2192 ${entry.to.map(name).join(", ")}` : "";
316
+ return `<div class="cv-head"><strong>${h(name(entry.from))}</strong>${to ? `<span class="muted">${h(to)}</span>` : ""}${where(entry.place ?? {})}</div><p class="cv-text">${h(String(entry.text ?? ""))}</p>`;
317
+ }
318
+ const whom = (ref2) => ref2 === "agent" ? "the agent" : name(ref2);
319
+ if (entry.kind === "fact") return `<p class="cv-event">${h(name(entry.person))} told ${h(whom(entry.to ?? "agent"))} <strong>${h(words(entry.fact))}</strong></p>`;
320
+ if (entry.kind === "learned") return `<p class="cv-event">${h(name(entry.person))} learned <strong>${h(factLabel(entry.fact, name))}</strong> from ${h(whom(entry.from))}</p>`;
321
+ if (entry.kind === "decision") return `<p class="cv-event">${h(name(entry.person))} decided <strong>${h(words(entry.decision))}: ${h(String(entry.option))}</strong>${entry.reason ? ` <span class="muted">\xB7 ${h(ruleText(entry.reason, name))}</span>` : ""}</p>`;
322
+ return "";
323
+ }
324
+ function conversationView(o, options = {}) {
325
+ const name = people(o);
326
+ const usable = (value) => {
327
+ const ms = Number(value);
328
+ return Number.isFinite(ms) && Math.abs(ms) <= 864e13 ? ms : NaN;
329
+ };
330
+ const timeline2 = list(o.peopleTimeline?.timeline).filter((entry) => entry.seed !== true && !(usable(entry.simMs) < 0));
331
+ const startMs = options.startMs ?? Date.parse(String(o.peopleTimeline?.startedAt ?? ""));
332
+ let previous = NaN;
333
+ const rows3 = timeline2.map((entry) => {
334
+ const ms = usable(entry.simMs), gap = Number.isFinite(ms) && Number.isFinite(previous) ? gapLabel(ms - previous) : "";
335
+ if (Number.isFinite(ms)) previous = ms;
336
+ const iso = Number.isFinite(ms) && Number.isFinite(startMs) ? simIso(startMs + ms) : "";
337
+ const time2 = Number.isFinite(ms) ? `<time${iso ? ` datetime="${h(iso)}" title="${h(simAbsolute(startMs + ms))}"` : ""}>${h(simOffset(ms, 0))}</time>` : "<time></time>";
338
+ const classes = ["cv-entry", `cv-${String(entry.kind)}`, entry.kind === "message" && entry.from === "agent" ? "from-agent" : "", options.focus === entry.id ? "focused" : ""].filter(Boolean).join(" ");
339
+ return `${gap ? `<div class="activity-gap" role="separator">${h(gap)}</div>` : ""}<article class="${h(classes)}" id="${h(entryAnchor(String(entry.id)))}">${time2}<div>${body(entry, name)}</div></article>`;
340
+ }).join("");
341
+ return `<section class="conversation"><div class="tool-section-title"><h2>Conversation</h2><span class="muted">Oldest first</span></div>${rows3 || '<p class="quiet-empty">No messages between the agent and people.</p>'}</section>`;
342
+ }
343
+ function checkFocus(o) {
344
+ const ids = new Set(list(o.peopleTimeline?.timeline).map((entry) => String(entry.id)));
345
+ const focus = /* @__PURE__ */ new Map();
346
+ for (const explanation of list(o.explanations)) {
347
+ const id = list(explanation.evidence).map((evidence) => String(evidence.id ?? "")).find((candidate) => ids.has(candidate));
348
+ if (id && explanation.checkId) focus.set(String(explanation.checkId), id);
349
+ }
350
+ return focus;
351
+ }
352
+ function peopleSection(world) {
353
+ const persons = list(world.people ?? world.configuration?.people);
354
+ if (!persons.length) return "";
355
+ return `<section class="world-people"><div class="ww-section-heading"><h2>People</h2><span>${persons.length}</span></div><div class="world-people-list">${persons.map((person2) => {
356
+ const facts = list(person2.knows).length, decides = list(person2.decides).map((decision) => String(decision.id));
357
+ return `<article class="world-person"><strong>${h(String(person2.name ?? person2.ref ?? "Person"))}</strong><span class="muted">${h(String(person2.role ?? ""))}</span><span>${facts} ${facts === 1 ? "fact" : "facts"}${decides.length ? ` \xB7 decides ${h(decides.join(", "))}` : ""}</span></article>`;
358
+ }).join("")}</div></section>`;
359
+ }
360
+
187
361
  // frontend/src/scenario.ts
188
362
  function traceActions(patterns, avoided = false) {
189
363
  const remaining = new Set(typeof patterns === "string" ? [patterns] : patterns), labels = [];
@@ -261,6 +435,12 @@ function batchCounts(batch) {
261
435
  const attempts = batch.attempts ?? [];
262
436
  return { total: attempts.length, finished: attempts.filter((a) => terminal(a.status)).length, completed: attempts.filter((a) => a.status === "completed").length, running: attempts.filter((a) => ["running", "starting"].includes(a.status)).length };
263
437
  }
438
+ function batchTitle(batch) {
439
+ if (batch.groupName) return String(batch.groupName);
440
+ if (batch.test?.name) return String(batch.test.name);
441
+ const tasks = batch.tasks ?? [];
442
+ return tasks.length === 1 ? tasks[0].title || shortPrompt(tasks[0].prompt) : `${tasks.length} tasks`;
443
+ }
264
444
  function groupEntryForAttempt(entries, attempt) {
265
445
  if (!attempt) return void 0;
266
446
  return entries.find((entry) => entry.id === attempt.entryId) ?? entries.find((entry) => entry.agentId === attempt.agentId);
@@ -318,48 +498,10 @@ function responseView(attempt) {
318
498
  return `<p class="quiet-empty">${terminal(attempt.status) ? "No final response was captured." : "No final response yet."}</p>`;
319
499
  }
320
500
 
321
- // frontend/src/tool-logos.ts
322
- var logos = {
323
- "slack": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path fill="#e01e5a" d="M53.841 161.32c0 14.832-11.987 26.82-26.819 26.82S.203 176.152.203 161.32c0-14.831 11.987-26.818 26.82-26.818H53.84zm13.41 0c0-14.831 11.987-26.818 26.819-26.818s26.819 11.987 26.819 26.819v67.047c0 14.832-11.987 26.82-26.82 26.82c-14.83 0-26.818-11.988-26.818-26.82z"/><path fill="#36c5f0" d="M94.07 53.638c-14.832 0-26.82-11.987-26.82-26.819S79.239 0 94.07 0s26.819 11.987 26.819 26.819v26.82zm0 13.613c14.832 0 26.819 11.987 26.819 26.819s-11.987 26.819-26.82 26.819H26.82C11.987 120.889 0 108.902 0 94.069c0-14.83 11.987-26.818 26.819-26.818z"/><path fill="#2eb67d" d="M201.55 94.07c0-14.832 11.987-26.82 26.818-26.82s26.82 11.988 26.82 26.82s-11.988 26.819-26.82 26.819H201.55zm-13.41 0c0 14.832-11.988 26.819-26.82 26.819c-14.831 0-26.818-11.987-26.818-26.82V26.82C134.502 11.987 146.489 0 161.32 0s26.819 11.987 26.819 26.819z"/><path fill="#ecb22e" d="M161.32 201.55c14.832 0 26.82 11.987 26.82 26.818s-11.988 26.82-26.82 26.82c-14.831 0-26.818-11.988-26.818-26.82V201.55zm0-13.41c-14.831 0-26.818-11.988-26.818-26.82c0-14.831 11.987-26.818 26.819-26.818h67.25c14.832 0 26.82 11.987 26.82 26.819s-11.988 26.819-26.82 26.819z"/></svg>',
324
- "github": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 250"><path fill="#161614" d="M128.001 0C57.317 0 0 57.307 0 128.001c0 56.554 36.676 104.535 87.535 121.46c6.397 1.185 8.746-2.777 8.746-6.158c0-3.052-.12-13.135-.174-23.83c-35.61 7.742-43.124-15.103-43.124-15.103c-5.823-14.795-14.213-18.73-14.213-18.73c-11.613-7.944.876-7.78.876-7.78c12.853.902 19.621 13.19 19.621 13.19c11.417 19.568 29.945 13.911 37.249 10.64c1.149-8.272 4.466-13.92 8.127-17.116c-28.431-3.236-58.318-14.212-58.318-63.258c0-13.975 5-25.394 13.188-34.358c-1.329-3.224-5.71-16.242 1.24-33.874c0 0 10.749-3.44 35.21 13.121c10.21-2.836 21.16-4.258 32.038-4.307c10.878.049 21.837 1.47 32.066 4.307c24.431-16.56 35.165-13.12 35.165-13.12c6.967 17.63 2.584 30.65 1.255 33.873c8.207 8.964 13.173 20.383 13.173 34.358c0 49.163-29.944 59.988-58.447 63.157c4.591 3.972 8.682 11.762 8.682 23.704c0 17.126-.148 30.91-.148 35.126c0 3.407 2.304 7.398 8.792 6.14C219.37 232.5 256 184.537 256 128.002C256 57.307 198.691 0 128.001 0m-80.06 182.34c-.282.636-1.283.827-2.194.39c-.929-.417-1.45-1.284-1.15-1.922c.276-.655 1.279-.838 2.205-.399c.93.418 1.46 1.293 1.139 1.931m6.296 5.618c-.61.566-1.804.303-2.614-.591c-.837-.892-.994-2.086-.375-2.66c.63-.566 1.787-.301 2.626.591c.838.903 1 2.088.363 2.66m4.32 7.188c-.785.545-2.067.034-2.86-1.104c-.784-1.138-.784-2.503.017-3.05c.795-.547 2.058-.055 2.861 1.075c.782 1.157.782 2.522-.019 3.08m7.304 8.325c-.701.774-2.196.566-3.29-.49c-1.119-1.032-1.43-2.496-.726-3.27c.71-.776 2.213-.558 3.315.49c1.11 1.03 1.45 2.505.701 3.27m9.442 2.81c-.31 1.003-1.75 1.459-3.199 1.033c-1.448-.439-2.395-1.613-2.103-2.626c.301-1.01 1.747-1.484 3.207-1.028c1.446.436 2.396 1.602 2.095 2.622m10.744 1.193c.036 1.055-1.193 1.93-2.715 1.95c-1.53.034-2.769-.82-2.786-1.86c0-1.065 1.202-1.932 2.733-1.958c1.522-.03 2.768.818 2.768 1.868m10.555-.405c.182 1.03-.875 2.088-2.387 2.37c-1.485.271-2.861-.365-3.05-1.386c-.184-1.056.893-2.114 2.376-2.387c1.514-.263 2.868.356 3.061 1.403"/></svg>',
325
- "datadog": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 275"><path fill="#632ca6" d="m214.434 194.558l-22.796-15.039l-19.016 31.766l-22.118-6.465l-19.474 29.723l.997 9.355l105.89-19.513l-6.15-66.163zm-98.745-28.523l16.99-2.336c2.748 1.235 4.66 1.706 7.956 2.544c5.136 1.334 11.074 2.617 19.872-1.814c2.047-1.015 6.314-4.915 8.038-7.14l69.605-12.624l7.1 85.94l-119.252 21.49zm129.293-30.967l-6.871 1.309L224.91 0L0 26.078l27.71 224.856l26.33-3.822c-2.104-3.002-5.378-6.634-10.967-11.282c-7.752-6.44-5.014-17.384-.436-24.294c6.051-11.674 37.23-26.51 35.463-45.168c-.634-6.785-1.71-15.613-8.011-21.669c-.238 2.514.19 4.928.19 4.928s-2.587-3.3-3.874-7.795c-1.279-1.728-2.285-2.277-3.646-4.583c-.971 2.665-.842 5.757-.842 5.757s-2.116-4.997-2.457-9.216c-1.253 1.887-1.568 5.472-1.568 5.472s-2.747-7.878-2.12-12.124c-1.253-3.692-4.972-11.022-3.922-27.676c6.862 4.807 21.975 3.667 27.861-5.01c1.953-2.876 3.296-10.72-.976-26.182c-2.742-9.912-9.532-24.674-12.18-30.276l-.315.23c1.396 4.512 4.272 13.967 5.378 18.558c3.343 13.907 4.237 18.753 2.669 25.167c-1.335 5.576-4.535 9.22-12.646 13.298c-8.111 4.09-18.879-5.865-19.557-6.414c-7.882-6.28-13.98-16.52-14.658-21.5c-.709-5.446 3.14-8.716 5.079-13.168c-2.777.79-5.87 2.202-5.87 2.202s3.693-3.822 8.245-7.126c1.888-1.248 2.993-2.043 4.98-3.693c-2.876-.047-5.213.035-5.213.035s4.798-2.592 9.77-4.48c-3.637-.159-7.122-.025-7.122-.025S48 36.288 56.454 32.777c5.813-2.384 11.492-1.68 14.684 2.937c4.19 6.046 8.59 9.329 17.915 11.363c5.727-2.54 7.464-3.84 14.66-5.805c6.33-6.966 11.302-7.865 11.302-7.865s-2.466 2.264-3.127 5.818c3.59-2.829 7.524-5.191 7.524-5.191s-1.525 1.878-2.946 4.867l.328.493c4.19-2.514 9.113-4.492 9.113-4.492s-1.408 1.78-3.057 4.081c3.161-.026 9.566.134 12.054.415c14.68.324 17.725-15.674 23.357-17.682c7.053-2.518 10.206-4.043 22.226 7.765c10.31 10.141 18.368 28.281 14.365 32.345c-3.356 3.374-9.973-1.317-17.307-10.456c-3.874-4.841-6.806-10.564-8.18-17.837c-1.157-6.138-5.666-9.696-5.666-9.696s2.613 5.83 2.613 10.965c0 2.808.35 13.299 4.85 19.19c-.445.86-.652 4.258-1.145 4.91c-5.234-6.327-16.477-10.853-18.312-12.188c6.206 5.084 20.468 16.762 25.944 27.961c5.183 10.586 2.13 20.291 4.75 22.8c.748.717 11.144 13.674 13.144 20.183c3.49 11.342.207 23.267-4.358 30.66l-12.754 1.987c-1.866-.518-3.123-.777-4.794-1.744c.924-1.633 2.755-5.701 2.772-6.544l-.72-1.26c-3.97 5.622-10.617 11.082-16.14 14.217c-7.23 4.099-15.562 3.464-20.987 1.788c-15.393-4.746-29.952-15.15-33.463-17.885c0 0-.108 2.181.552 2.674c3.879 4.38 12.772 12.296 21.37 17.82l-18.325 2.017l8.664 67.45c-3.84.548-4.44.82-8.642 1.416c-3.706-13.09-10.793-21.638-18.542-26.618c-6.832-4.392-16.256-5.381-25.274-3.593l-.58.674c6.272-.652 13.675.255 21.28 5.07c7.464 4.721 13.48 16.914 15.696 24.251c2.837 9.381 4.798 19.419-2.838 30.056c-5.429 7.563-21.28 11.74-34.09 2.7c3.421 5.502 8.042 9.998 14.27 10.845c9.243 1.257 18.015-.35 24.053-6.548c5.152-5.3 7.89-16.382 7.17-28.052l8.158-1.183l2.946 20.947L256 242.542zm-82.156-56.885c-.376.859-.972 1.425-.082 4.223l.052.16l.143.363l.371.838c1.602 3.278 3.36 6.366 6.306 7.947q1.14-.196 2.367-.255c2.764-.12 4.509.315 5.61.911c.1-.552.12-1.356.06-2.543c-.216-4.151.821-11.208-7.156-14.923c-3.01-1.395-7.235-.967-8.643.778c.255.034.484.086.666.147c2.133.738.69 1.472.306 2.354m22.364 38.724c-1.045-.58-5.934-.35-9.372.06c-6.548.773-13.618 3.04-15.164 4.25c-2.816 2.177-1.538 5.969.544 7.528c5.835 4.358 10.949 7.282 16.343 6.57c3.313-.437 6.237-5.685 8.306-10.444c1.416-3.278 1.416-6.815-.657-7.964m-57.965-33.59c1.844-1.753-9.195-4.055-17.764 1.789c-6.319 4.31-6.522 13.553-.471 18.792a15 15 0 0 0 1.568 1.188a51 51 0 0 1 6.098-2.423c3.913-1.27 7.17-1.927 9.843-2.277c1.279-1.43 2.769-3.947 2.397-8.508c-.51-6.19-5.191-5.209-1.671-8.56"/></svg>',
326
- "pagerduty": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 372"><path fill="#06ac38" d="M54.554 272.557v98.919H0v-98.919zM109.047.001c46.745.051 67.005 2.703 95.795 18.254C236.471 35.237 256 68.988 256 111.018c0 39.058-15.92 72.81-46.488 92.975c-28.02 18.68-59.86 21.228-102.315 21.228H0V0Zm8.739 47.753l-1.673.007l-61.56.425v129.91h65.168c45.639 0 80.451-18.255 80.451-66.44c0-44.79-28.02-64.32-84.06-63.895Z"/></svg>',
327
- "linkedin-ads": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path fill="#0a66c2" d="M218.123 218.127h-37.931v-59.403c0-14.165-.253-32.4-19.728-32.4c-19.756 0-22.779 15.434-22.779 31.369v60.43h-37.93V95.967h36.413v16.694h.51a39.91 39.91 0 0 1 35.928-19.733c38.445 0 45.533 25.288 45.533 58.186zM56.955 79.27c-12.157.002-22.014-9.852-22.016-22.009s9.851-22.014 22.008-22.016c12.157-.003 22.014 9.851 22.016 22.008A22.013 22.013 0 0 1 56.955 79.27m18.966 138.858H37.95V95.967h37.97zM237.033.018H18.89C8.58-.098.125 8.161-.001 18.471v219.053c.122 10.315 8.576 18.582 18.89 18.474h218.144c10.336.128 18.823-8.139 18.966-18.474V18.454c-.147-10.33-8.635-18.588-18.966-18.453"/></svg>',
328
- "salesforce": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 180"><path fill="#00a1e0" d="M106.553 19.651c8.248-8.594 19.731-13.924 32.43-13.924c16.883 0 31.612 9.414 39.455 23.389a54.5 54.5 0 0 1 22.3-4.74c30.449 0 55.134 24.9 55.134 55.615c0 30.719-24.685 55.62-55.134 55.62a54.7 54.7 0 0 1-10.86-1.083c-6.908 12.321-20.07 20.645-35.178 20.645a40.1 40.1 0 0 1-17.632-4.058c-7.002 16.47-23.316 28.019-42.33 28.019c-19.8 0-36.674-12.529-43.152-30.1c-2.83.602-5.763.915-8.772.915c-23.574 0-42.686-19.308-42.686-43.13a43.2 43.2 0 0 1 21.345-37.36a49.4 49.4 0 0 1-4.088-19.727C17.385 22.336 39.626.128 67.06.128c16.106 0 30.42 7.658 39.494 19.523"/><path fill="#fff" d="M37.17 92.956c-.16.419.058.506.11.58c.48.349.968.6 1.46.88c2.609 1.385 5.071 1.79 7.647 1.79c5.246 0 8.503-2.79 8.503-7.283v-.087c0-4.153-3.676-5.662-7.126-6.75l-.448-.147c-2.601-.845-4.845-1.573-4.845-3.286v-.09c0-1.465 1.311-2.544 3.344-2.544c2.259 0 4.94.75 6.667 1.705c0 0 .506.328.692-.164c.102-.262.976-2.615 1.068-2.87c.098-.277-.077-.481-.255-.59c-1.971-1.2-4.696-2.019-7.516-2.019l-.525.004c-4.801 0-8.153 2.9-8.153 7.057v.087c0 4.383 3.698 5.803 7.162 6.794l.558.172c2.524.775 4.7 1.442 4.7 3.22v.087c0 1.625-1.414 2.835-3.695 2.835c-.885 0-3.708-.018-6.758-1.946c-.368-.215-.583-.371-.867-.542c-.15-.095-.524-.26-.688.236zm76.8 0c-.16.419.058.506.11.58c.48.349.968.6 1.46.88c2.608 1.385 5.071 1.79 7.647 1.79c5.246 0 8.503-2.79 8.503-7.283v-.087c0-4.153-3.676-5.662-7.126-6.75l-.448-.147c-2.601-.845-4.846-1.573-4.846-3.286v-.09c0-1.465 1.312-2.544 3.345-2.544c2.259 0 4.94.75 6.667 1.705c0 0 .506.328.692-.164c.102-.262.976-2.615 1.067-2.87c.099-.277-.076-.481-.255-.59c-1.97-1.2-4.696-2.019-7.515-2.019l-.525.004c-4.802 0-8.153 2.9-8.153 7.057v.087c0 4.383 3.697 5.803 7.162 6.794l.557.172c2.525.775 4.704 1.442 4.704 3.22v.087c0 1.625-1.418 2.835-3.698 2.835a12.4 12.4 0 0 1-6.758-1.946c-.368-.215-.587-.364-.863-.542c-.095-.062-.54-.234-.693.236zm52.429-8.799c0 2.54-.474 4.54-1.406 5.953c-.922 1.4-2.317 2.08-4.263 2.08c-1.949 0-3.337-.677-4.244-2.08c-.918-1.41-1.384-3.413-1.384-5.953c0-2.535.466-4.532 1.384-5.93c.907-1.385 2.295-2.059 4.244-2.059c1.946 0 3.34.674 4.266 2.058c.93 1.4 1.403 3.396 1.403 5.931m4.379-4.707c-.43-1.453-1.1-2.735-1.993-3.803c-.893-1.071-2.022-1.93-3.363-2.557c-1.337-.623-2.918-.94-4.692-.94c-1.778 0-3.359.317-4.696.94c-1.34.626-2.47 1.486-3.366 2.557c-.889 1.071-1.56 2.354-1.993 3.803c-.426 1.447-.64 3.028-.64 4.707c0 1.68.214 3.265.64 4.707c.434 1.45 1.1 2.732 1.997 3.804a9.4 9.4 0 0 0 3.362 2.535c1.34.609 2.918.918 4.696.918c1.774 0 3.352-.31 4.692-.918a9.4 9.4 0 0 0 3.363-2.535c.893-1.068 1.563-2.35 1.993-3.804c.43-1.446.645-3.03.645-4.707c0-1.675-.215-3.26-.645-4.707m35.959 12.063c-.145-.426-.557-.266-.557-.266c-.637.244-1.315.47-2.036.583a16 16 0 0 1-2.401.171c-2.12 0-3.804-.63-5.01-1.876c-1.209-1.246-1.887-3.26-1.88-5.986c.008-2.48.606-4.346 1.68-5.767c1.068-1.413 2.692-2.138 4.86-2.138c1.807 0 3.184.207 4.627.663c0 0 .346.15.51-.303c.382-1.063.667-1.825 1.075-2.994c.116-.332-.168-.474-.27-.514c-.568-.222-1.909-.583-2.922-.736c-.947-.145-2.054-.222-3.286-.222c-1.84 0-3.479.313-4.882.94c-1.399.623-2.586 1.483-3.526 2.554s-1.654 2.353-2.131 3.803c-.474 1.446-.714 3.035-.714 4.714c0 3.632.98 6.569 2.914 8.718c1.938 2.157 4.85 3.253 8.645 3.253c2.244 0 4.547-.455 6.2-1.107c0 0 .318-.153.18-.521zm7.663-9.788c.207-1.41.597-2.583 1.198-3.497c.907-1.388 2.291-2.15 4.237-2.15c1.945 0 3.231.765 4.153 2.15c.612.914.878 2.138.983 3.497zm14.743-3.1c-.372-1.403-1.294-2.82-1.898-3.468c-.955-1.028-1.887-1.746-2.813-2.146a10.8 10.8 0 0 0-4.248-.86c-1.85 0-3.53.31-4.892.95c-1.366.642-2.514 1.516-3.414 2.606c-.9 1.085-1.577 2.379-2.007 3.847c-.434 1.46-.652 3.053-.652 4.732c0 1.709.226 3.3.674 4.732c.451 1.443 1.173 2.715 2.15 3.767c.972 1.06 2.225 1.891 3.726 2.47c1.49.576 3.3.875 5.38.871c4.281-.015 6.537-.969 7.465-1.483c.164-.09.321-.251.124-.71l-.969-2.714c-.145-.405-.557-.255-.557-.255c-1.06.393-2.568 1.1-6.084 1.093c-2.299-.004-4.004-.682-5.071-1.742c-1.097-1.085-1.632-2.68-1.727-4.932l14.824.014s.39-.007.43-.386c.014-.16.51-3.046-.441-6.386m-133.46 3.1c.211-1.41.597-2.583 1.199-3.497c.907-1.388 2.291-2.15 4.236-2.15c1.946 0 3.232.765 4.157 2.15c.609.914.875 2.138.98 3.497zm14.74-3.1c-.372-1.403-1.29-2.82-1.895-3.468c-.954-1.028-1.887-1.746-2.812-2.146a10.8 10.8 0 0 0-4.248-.86c-1.847 0-3.53.31-4.892.95c-1.367.642-2.514 1.516-3.414 2.606c-.9 1.085-1.577 2.379-2.007 3.847c-.43 1.46-.652 3.053-.652 4.732c0 1.709.225 3.3.674 4.732c.451 1.443 1.173 2.715 2.149 3.767c.973 1.06 2.226 1.891 3.727 2.47c1.49.576 3.3.875 5.38.871c4.281-.015 6.536-.969 7.465-1.483c.164-.09.32-.251.124-.71l-.965-2.714c-.15-.405-.561-.255-.561-.255c-1.06.393-2.565 1.1-6.088 1.093c-2.295-.004-4-.682-5.067-1.742c-1.097-1.085-1.633-2.68-1.727-4.932l14.823.014s.39-.007.43-.386c.015-.16.51-3.046-.444-6.386M63.642 91.431c-.58-.462-.66-.579-.856-.878c-.292-.455-.441-1.104-.441-1.927c0-1.304.43-2.24 1.322-2.87c-.01.003 1.275-1.112 4.3-1.072c2.123.03 4.021.343 4.021.343v6.74h.004s-1.884.404-4.004.531c-3.017.182-4.357-.87-4.346-.867m5.898-10.415c-.601-.044-1.38-.07-2.313-.07c-1.272 0-2.5.16-3.65.47a9.5 9.5 0 0 0-3.097 1.436a7.15 7.15 0 0 0-2.15 2.444c-.524.977-.79 2.128-.79 3.417c0 1.312.225 2.452.677 3.385a6.1 6.1 0 0 0 1.935 2.317c.823.601 1.84 1.042 3.02 1.308c1.162.266 2.48.4 3.923.4c1.52 0 3.035-.123 4.503-.375a94 94 0 0 0 3.734-.721c.492-.117 1.039-.266 1.039-.266c.368-.091.338-.485.338-.485l-.007-13.555c0-2.973-.794-5.177-2.357-6.543c-1.555-1.363-3.847-2.051-6.809-2.051c-1.11 0-2.9.153-3.97.368c0 0-3.24.626-4.573 1.668c0 0-.291.182-.131.59l1.05 2.82c.13.364.484.24.484.24s.113-.043.244-.12c2.852-1.552 6.459-1.504 6.459-1.504c1.603 0 2.834.32 3.665.958c.809.619 1.22 1.555 1.22 3.53v.626c-1.275-.182-2.444-.287-2.444-.287m119.56-7.639a.4.4 0 0 0-.223-.532c-.251-.098-1.512-.364-2.485-.426c-1.861-.113-2.896.2-3.821.616c-.918.415-1.938 1.085-2.507 1.847v-1.804c0-.251-.178-.451-.426-.451h-3.8c-.247 0-.426.2-.426.451v22.11c0 .248.204.452.452.452h3.894a.45.45 0 0 0 .448-.452V84.142c0-1.482.164-2.962.492-3.89c.32-.919.758-1.654 1.297-2.183a4.55 4.55 0 0 1 1.833-1.1c.688-.211 1.45-.28 1.989-.28c.776 0 1.628.2 1.628.2c.284.033.445-.142.54-.4c.254-.678.976-2.708 1.114-3.112"/><path fill="#fff" d="M152.544 63.13a13 13 0 0 0-1.465-.35a11.6 11.6 0 0 0-2.014-.152c-2.682 0-4.795.757-6.277 2.251c-1.476 1.486-2.478 3.749-2.98 6.725l-.183 1.002h-3.366s-.408-.015-.495.43l-.55 3.086c-.04.291.087.477.48.477h3.276l-3.323 18.55c-.258 1.494-.557 2.722-.889 3.654c-.324.918-.64 1.607-1.034 2.11c-.38.48-.736.838-1.356 1.045c-.51.172-1.1.252-1.745.252c-.357 0-.834-.059-1.187-.131a3.5 3.5 0 0 1-.802-.26s-.382-.145-.535.238c-.12.317-.995 2.717-1.1 3.013c-.102.295.043.524.229.593c.437.153.761.255 1.355.397c.824.194 1.52.204 2.172.204c1.362 0 2.608-.193 3.639-.564c1.035-.375 1.938-1.028 2.74-1.91c.863-.954 1.406-1.952 1.923-3.318c.514-1.348.955-3.024 1.304-4.976l3.341-18.897h4.882s.411.014.495-.434l.554-3.082c.036-.295-.087-.477-.485-.477h-4.74c.026-.106.241-1.774.784-3.344c.233-.667.67-1.21 1.038-1.581a3.1 3.1 0 0 1 1.243-.773c.47-.153 1.005-.226 1.592-.226c.444 0 .885.051 1.216.12c.46.099.638.15.758.186c.485.146.55.004.645-.23l1.133-3.11c.117-.335-.171-.478-.273-.518M86.322 95.19c0 .247-.179.448-.426.448h-3.931c-.248 0-.423-.2-.423-.448V63.553c0-.247.175-.448.423-.448h3.93c.248 0 .427.2.427.448z"/></svg>',
329
- "ga4": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 284"><path fill="#f9ab00" d="M256.003 247.933a35.224 35.224 0 0 1-39.376 35.161c-18.044-2.67-31.266-18.371-30.826-36.606V36.845C185.365 18.591 198.62 2.881 216.687.24a35.22 35.22 0 0 1 39.316 35.16z"/><path fill="#e37400" d="M35.101 213.193c19.386 0 35.101 15.716 35.101 35.101c0 19.386-15.715 35.101-35.101 35.101S0 267.68 0 248.295s15.715-35.102 35.101-35.102m92.358-106.387c-19.477 1.068-34.59 17.406-34.137 36.908v94.285c0 25.588 11.259 41.122 27.755 44.433a35.16 35.16 0 0 0 42.146-34.56V142.089a35.22 35.22 0 0 0-35.764-35.282"/></svg>',
330
- "hubspot": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#FF7A59" d="M18.164 7.93V5.084a2.2 2.2 0 0 0 1.267-1.978v-.067A2.2 2.2 0 0 0 17.238.845h-.067a2.2 2.2 0 0 0-2.193 2.193v.067a2.2 2.2 0 0 0 1.252 1.973l.013.006v2.852a6.2 6.2 0 0 0-2.969 1.31l.012-.01l-7.828-6.095A2.497 2.497 0 1 0 4.3 4.656l-.012.006l7.697 5.991a6.2 6.2 0 0 0-1.038 3.446a6.2 6.2 0 0 0 1.147 3.607l-.013-.02l-2.342 2.343a2 2 0 0 0-.58-.095h-.002a2.033 2.033 0 1 0 2.033 2.033a2 2 0 0 0-.1-.595l.005.014l2.317-2.317a6.247 6.247 0 1 0 4.782-11.134l-.036-.005zm-.964 9.378a3.206 3.206 0 1 1 3.215-3.207v.002a3.206 3.206 0 0 1-3.207 3.207z"/></svg>',
331
- "google-ads": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 230"><path fill="#fbbc04" d="M5.888 166.405L90.88 20.9c10.796 6.356 65.236 36.484 74.028 42.214L79.916 208.627c-9.295 12.28-85.804-23.587-74.028-42.23z"/><path fill="#4285f4" d="M250.084 166.402L165.092 20.906C153.21 1.132 127.62-6.054 106.601 5.625S79.182 42.462 91.064 63.119l84.992 145.514c11.882 19.765 37.473 26.95 58.492 15.272c20.1-11.68 27.418-37.73 15.536-57.486z"/><ellipse cx="42.664" cy="187.924" fill="#34a853" rx="42.664" ry="41.604"/></svg>',
332
- "chatgpt-ads": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 260"><path d="M239.184 106.203a64.72 64.72 0 0 0-5.576-53.103C219.452 28.459 191 15.784 163.213 21.74A65.586 65.586 0 0 0 52.096 45.22a64.72 64.72 0 0 0-43.23 31.36c-14.31 24.602-11.061 55.634 8.033 76.74a64.67 64.67 0 0 0 5.525 53.102c14.174 24.65 42.644 37.324 70.446 31.36a64.72 64.72 0 0 0 48.754 21.744c28.481.025 53.714-18.361 62.414-45.481a64.77 64.77 0 0 0 43.229-31.36c14.137-24.558 10.875-55.423-8.083-76.483m-97.56 136.338a48.4 48.4 0 0 1-31.105-11.255l1.535-.87l51.67-29.825a8.6 8.6 0 0 0 4.247-7.367v-72.85l21.845 12.636c.218.111.37.32.409.563v60.367c-.056 26.818-21.783 48.545-48.601 48.601M37.158 197.93a48.35 48.35 0 0 1-5.781-32.589l1.534.921l51.722 29.826a8.34 8.34 0 0 0 8.441 0l63.181-36.425v25.221a.87.87 0 0 1-.358.665l-52.335 30.184c-23.257 13.398-52.97 5.431-66.404-17.803M23.549 85.38a48.5 48.5 0 0 1 25.58-21.333v61.39a8.29 8.29 0 0 0 4.195 7.316l62.874 36.272l-21.845 12.636a.82.82 0 0 1-.767 0L41.353 151.53c-23.211-13.454-31.171-43.144-17.804-66.405zm179.466 41.695l-63.08-36.63L161.73 77.86a.82.82 0 0 1 .768 0l52.233 30.184a48.6 48.6 0 0 1-7.316 87.635v-61.391a8.54 8.54 0 0 0-4.4-7.213m21.742-32.69l-1.535-.922l-51.619-30.081a8.39 8.39 0 0 0-8.492 0L99.98 99.808V74.587a.72.72 0 0 1 .307-.665l52.233-30.133a48.652 48.652 0 0 1 72.236 50.391zM88.061 139.097l-21.845-12.585a.87.87 0 0 1-.41-.614V65.685a48.652 48.652 0 0 1 79.757-37.346l-1.535.87l-51.67 29.825a8.6 8.6 0 0 0-4.246 7.367zm11.868-25.58L128.067 97.3l28.188 16.218v32.434l-28.086 16.218l-28.188-16.218z"/></svg>',
333
- "open-meteo": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><circle cx="25" cy="24" r="11" fill="#f2a93b"/><g stroke="#f2a93b" stroke-width="3.5" stroke-linecap="round"><path d="M25 5v5M25 38v4M6 24h5M10.9 9.9l3.5 3.5M39.1 9.9l-3.5 3.5M10.9 38.1l3.5-3.5"/></g><path d="M24 55h25a11 11 0 0 0 1.4-21.9A15 15 0 0 0 22.3 38 8.5 8.5 0 0 0 24 55z" fill="#5b8fd6"/></svg>',
334
- "gong": '<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">\n<rect width="512" height="512" rx="85.3333" fill="#8039DF"/>\n<rect x="53.4446" y="53.4446" width="21.3333" height="21.3333" fill="#3E0075"/>\n<rect x="437.333" y="53.3333" width="21.3333" height="21.3333" fill="#3E0075"/>\n<rect x="437.333" y="437.333" width="21.3333" height="21.3333" fill="#3E0075"/>\n<rect x="53.3333" y="437.333" width="21.3333" height="21.3333" fill="#3E0075"/>\n<path d="M427.2 229.814H328.146C322.677 229.814 318.423 235.887 320.246 240.745L343.946 302.075C345.162 304.504 342.731 307.54 339.693 307.54L309.308 305.719C308.093 305.719 306.877 306.326 305.662 307.54L282.57 340.938C281.354 342.76 278.924 343.367 276.493 342.153L241.247 318.471C240.031 317.256 238.208 317.256 236.385 318.471L187.77 351.261C184.732 353.69 180.478 350.654 181.693 347.011L195.67 298.432C196.278 296.61 195.062 294.181 193.239 293.574L167.716 283.251C165.285 282.037 164.07 279 165.893 277.179L188.378 249.246C189.593 248.031 189.593 245.602 188.378 244.388L169.539 217.062C167.716 214.634 169.539 210.99 172.578 210.99L202.355 208.561C204.785 208.561 206.001 206.74 206.001 204.311L203.57 163.019C203.57 159.982 206.608 158.161 209.039 158.768L245.501 173.949C247.324 174.556 249.147 173.949 250.362 172.734L275.885 144.802C277.708 142.373 281.354 142.98 282.57 146.016L297.762 184.879C299.585 189.737 305.662 191.559 309.916 188.522L369.469 144.194C376.154 139.337 371.9 128.406 363.392 129.621L325.108 134.479C323.285 134.479 321.462 133.871 320.854 132.05L300.193 79.2203C297.762 73.7552 291.077 72.5408 286.823 76.7914L241.854 125.37C240.639 126.585 238.816 127.192 236.993 126.585L178.047 101.688C172.578 99.2591 167.109 102.902 166.501 108.975L164.07 169.698C164.07 172.127 162.247 173.342 160.424 173.342L106.339 176.985C100.263 177.592 96.6164 184.272 100.263 189.737L136.116 242.566C137.332 243.781 137.332 246.21 136.116 247.424L99.6549 289.323C96.6164 292.36 98.4395 299.039 103.301 300.861L145.232 319.078C147.055 319.685 148.27 322.114 147.662 323.936L120.924 427.773C119.101 435.06 127.609 440.525 133.686 436.274L233.954 364.62C235.17 363.406 236.993 363.406 238.816 364.62L284.393 396.804C288.039 399.233 293.508 398.626 295.939 394.375L324.5 350.654C325.108 349.44 326.931 348.832 328.146 348.832L396.208 357.334C401.677 357.941 407.146 353.69 405.323 348.225L376.762 274.75C376.154 272.928 376.762 270.499 379.192 269.285L430.846 244.995C438.138 241.352 435.708 229.814 427.2 229.814Z" fill="white"/>\n</svg>\n',
335
- "gmail": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 36"><path fill="#4285f4" d="M3 36h8V17L0 9v24a3 3 0 0 0 3 3z"/><path fill="#34a853" d="M37 36h8a3 3 0 0 0 3-3V9l-11 8z"/><path fill="#fbbc04" d="M37 3v14l11-8V5c0-4-4.6-6.4-7.8-4z"/><path fill="#ea4335" d="M11 17V3l13 9.7L37 3v14l-13 9.7z"/><path fill="#c5221f" d="M0 5v4l11 8V3L7.8 1C4.6-1.4 0 1 0 5z"/></svg>',
336
- "google-drive": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 87.3 78"><path fill="#0066da" d="m6.6 66.85 3.85 6.65c.8 1.4 1.95 2.5 3.3 3.3l13.75-23.8H0c0 1.55.4 3.1 1.2 4.5z"/><path fill="#00ac47" d="M43.65 25 29.9 1.2c-1.35.8-2.5 1.9-3.3 3.3l-25.4 44A9.06 9.06 0 0 0 0 53h27.5z"/><path fill="#ea4335" d="M73.55 76.8c1.35-.8 2.5-1.9 3.3-3.3l1.6-2.75 7.65-13.25c.8-1.4 1.2-2.95 1.2-4.5H59.798l5.852 11.5z"/><path fill="#00832d" d="M43.65 25 57.4 1.2C56.05.4 54.5 0 52.9 0H34.4c-1.6 0-3.15.45-4.5 1.2z"/><path fill="#2684fc" d="M59.8 53H27.5L13.75 76.8c1.35.8 2.9 1.2 4.5 1.2h50.8c1.6 0 3.15-.45 4.5-1.2z"/><path fill="#ffba00" d="m73.4 26.5-12.7-22c-.8-1.4-1.95-2.5-3.3-3.3L43.65 25 59.8 53h27.45c0-1.55-.4-3.1-1.2-4.5z"/></svg>',
337
- "amazon-s3": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><defs><linearGradient id="SVG7R6tZwZW" x1="0%" x2="100%" y1="100%" y2="0%"><stop offset="0%" stop-color="#1b660f"/><stop offset="100%" stop-color="#6cae3e"/></linearGradient></defs><path fill="url(#SVG7R6tZwZW)" d="M0 0h256v256H0z"/><path fill="#fff" d="m194.675 137.256l1.229-8.652c11.33 6.787 11.478 9.59 11.475 9.667c-.02.016-1.952 1.629-12.704-1.015m-6.218-1.728c-19.584-5.926-46.857-18.438-57.894-23.654c0-.045.013-.086.013-.131c0-4.24-3.45-7.69-7.693-7.69c-4.237 0-7.687 3.45-7.687 7.69s3.45 7.69 7.687 7.69c1.862 0 3.552-.695 4.886-1.8c12.986 6.148 40.048 18.478 59.776 24.302l-7.801 55.059q-.033.225-.032.451c0 4.848-21.463 13.754-56.532 13.754c-35.44 0-57.13-8.906-57.13-13.754q0-.22-.028-.435l-16.3-119.062c14.108 9.712 44.454 14.85 73.478 14.85c28.979 0 59.273-5.12 73.41-14.802zM48 65.528c.23-4.21 24.428-20.73 75.2-20.73c50.764 0 74.966 16.516 75.2 20.73v1.437c-2.784 9.443-34.144 19.434-75.2 19.434c-41.127 0-72.503-10.023-75.2-19.479zm156.8.07c0-11.087-31.79-27.2-81.6-27.2c-49.812 0-81.6 16.113-81.6 27.2l.3 2.414l17.754 129.676c.426 14.503 39.1 19.91 63.526 19.91c30.31 0 62.512-6.969 62.928-19.9l7.668-54.07c4.265 1.02 7.776 1.542 10.595 1.542c3.785 0 6.345-.925 7.897-2.774c1.274-1.517 1.76-3.354 1.396-5.31c-.83-4.428-6.087-9.202-16.794-15.311l7.603-53.639z"/></svg>',
338
- "linear": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#5e6ad2" d="M2.886 4.18A11.98 11.98 0 0 1 11.99 0C18.624 0 24 5.376 24 12.009c0 3.64-1.62 6.903-4.18 9.105L2.887 4.18ZM1.817 5.626l16.556 16.556q-.787.496-1.65.866L.951 7.277q.371-.863.866-1.65ZM.322 9.163l14.515 14.515q-1.066.26-2.195.322L0 11.358a12 12 0 0 1 .322-2.195m-.17 4.862l9.823 9.824a12.02 12.02 0 0 1-9.824-9.824Z"/></svg>',
339
- "okta": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#007dc1" d="M12 0C5.389 0 0 5.35 0 12s5.35 12 12 12s12-5.35 12-12S18.611 0 12 0m0 18c-3.325 0-6-2.675-6-6s2.675-6 6-6s6 2.675 6 6s-2.675 6-6 6"/></svg>',
340
- "stripe": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#635bff" d="M13.976 9.15c-2.172-.806-3.356-1.426-3.356-2.409c0-.831.683-1.305 1.901-1.305c2.227 0 4.515.858 6.09 1.631l.89-5.494C18.252.975 15.697 0 12.165 0C9.667 0 7.589.654 6.104 1.872C4.56 3.147 3.757 4.992 3.757 7.218c0 4.039 2.467 5.76 6.476 7.219c2.585.92 3.445 1.574 3.445 2.583c0 .98-.84 1.545-2.354 1.545c-1.875 0-4.965-.921-6.99-2.109l-.9 5.555C5.175 22.99 8.385 24 11.714 24c2.641 0 4.843-.624 6.328-1.813c1.664-1.305 2.525-3.236 2.525-5.732c0-4.128-2.524-5.851-6.594-7.305z"/></svg>',
341
- "clerk": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 324"><path fill="#bab1ff" d="M251.87 27.289c5.058 3.387 5.49 10.513 1.185 14.818l-36.97 36.971c-3.342 3.341-8.526 3.87-12.732 1.715c-12.435-6.371-26.53-9.966-41.462-9.966c-50.294 0-91.064 40.77-91.064 91.064c0 14.933 3.595 29.027 9.966 41.462c2.154 4.206 1.626 9.39-1.715 12.731l-36.971 36.971c-4.305 4.305-11.43 3.873-14.818-1.185C10.053 226.138 0 195.188 0 161.89C0 72.48 72.48 0 161.89 0c33.298 0 64.248 10.053 89.98 27.289"/><path fill="#6c47ff" d="M212.481 161.89c0 27.941-22.65 50.591-50.59 50.591s-50.591-22.65-50.591-50.59s22.65-50.591 50.59-50.591s50.591 22.65 50.591 50.59m40.574 119.784c4.305 4.306 3.873 11.431-1.184 14.818c-25.733 17.237-56.683 27.29-89.98 27.29s-64.248-10.053-89.98-27.29c-5.058-3.387-5.49-10.512-1.186-14.818l36.971-36.97c3.342-3.342 8.525-3.87 12.731-1.716c12.437 6.371 26.53 9.966 41.464 9.966s29.027-3.595 41.463-9.966c4.206-2.154 9.39-1.626 12.73 1.715z"/></svg>',
342
- "better-stack": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#000000" d="m.78 10.748l-.766 6.638a2.1 2.1 0 0 0 .696 1.812l1.896 1.672c.65.573 1.658.015 1.519-.84l-1.521-9.325c-.172-1.056-1.702-1.02-1.825.043m12.373 8.714L8.63 6.43c-.502-1.447-2.608-1.384-3.02.09l-1.376 4.923c-.156.56-.216.882 0 1.421h.523l1.899 6.07c.294.732.902 1.3 1.661 1.554l2.832.943c1.241.414 2.426-.751 2.004-1.97zm10.63-1.033L15.79 3.443c-.697-1.307-2.578-1.272-3.227.06l-1.966 3.955c-.237.487-.127.66.07.943c.159.227.527.245.676.012a.348.348 0 0 1 .606.038l5.138 10.687a2.74 2.74 0 0 0 2.142 1.601l2.718.348c1.463.192 2.53-1.354 1.834-2.658"/></svg>',
343
- "notion": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 268"><path fill="#fff" d="M16.092 11.538L164.09.608c18.179-1.56 22.85-.508 34.28 7.801l47.243 33.282C253.406 47.414 256 48.975 256 55.207v182.527c0 11.439-4.155 18.205-18.696 19.24L65.44 267.378c-10.913.517-16.11-1.043-21.825-8.327L8.826 213.814C2.586 205.487 0 199.254 0 191.97V29.726c0-9.352 4.155-17.153 16.092-18.188"/><path d="M164.09.608L16.092 11.538C4.155 12.573 0 20.374 0 29.726v162.245c0 7.284 2.585 13.516 8.826 21.843l34.789 45.237c5.715 7.284 10.912 8.844 21.825 8.327l171.864-10.404c14.532-1.035 18.696-7.801 18.696-19.24V55.207c0-5.911-2.336-7.614-9.21-12.66l-1.185-.856L198.37 8.409C186.94.1 182.27-.952 164.09.608M69.327 52.22c-14.033.945-17.216 1.159-25.186-5.323L23.876 30.778c-2.06-2.086-1.026-4.69 4.163-5.207l142.274-10.395c11.947-1.043 18.17 3.12 22.842 6.758l24.401 17.68c1.043.525 3.638 3.637.517 3.637L71.146 52.095zm-16.36 183.954V81.222c0-6.767 2.077-9.887 8.3-10.413L230.02 60.93c5.724-.517 8.31 3.12 8.31 9.879v153.917c0 6.767-1.044 12.49-10.387 13.008l-161.487 9.361c-9.343.517-13.489-2.594-13.489-10.921M212.377 89.53c1.034 4.681 0 9.362-4.681 9.897l-7.783 1.542v114.404c-6.758 3.637-12.981 5.715-18.18 5.715c-8.308 0-10.386-2.604-16.609-10.396l-50.898-80.079v77.476l16.1 3.646s0 9.362-12.989 9.362l-35.814 2.077c-1.043-2.086 0-7.284 3.63-8.318l9.351-2.595V109.823l-12.98-1.052c-1.044-4.68 1.55-11.439 8.826-11.965l38.426-2.585l52.958 81.113v-71.76l-13.498-1.552c-1.043-5.733 3.111-9.896 8.3-10.404z"/></svg>',
344
- "attio": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 28"><path fill="#2e3238" d="m31.669 19.175l-2.673-4.279l-.016-.026l-.211-.336a2.16 2.16 0 0 0-1.838-1.022l-4.306-.014l-.3.481l-5.146 8.235l-.284.456l2.156 3.444a2.15 2.15 0 0 0 1.843 1.023h6.035a2.19 2.19 0 0 0 1.842-1.02l.213-.34s.008-.01.01-.015l2.677-4.284c.44-.7.44-1.605 0-2.303zm-.816 1.792l-2.677 4.284l-.037.052a.363.363 0 0 1-.579-.054l-2.678-4.284a1.2 1.2 0 0 1-.137-.969c.03-.105.076-.21.135-.306l2.674-4.28l.006-.01a.34.34 0 0 1 .213-.154q.04-.01.071-.014h.03c.062 0 .215.02.31.176l2.674 4.278c.244.39.244.891 0 1.28zM23.758 8.823a2.19 2.19 0 0 0 0-2.303l-2.673-4.278l-.223-.36a2.16 2.16 0 0 0-1.844-1.02h-6.034c-.754 0-1.442.381-1.844 1.022L.333 19.178a2.16 2.16 0 0 0-.002 2.301L3.23 26.12c.4.64 1.088 1.02 1.842 1.02h6.035c.758 0 1.446-.381 1.844-1.022l.22-.35v-.004s.005-.006.005-.008l2.154-3.445l6.384-10.218l2.041-3.268zm-.63-1.151c0 .22-.062.443-.187.64L12.355 25.255a.36.36 0 0 1-.31.17a.36.36 0 0 1-.31-.17l-2.676-4.286a1.22 1.22 0 0 1 0-1.28L19.645 2.752a.36.36 0 0 1 .31-.173c.062 0 .215.018.313.175L22.94 7.03c.125.197.187.42.187.64"/></svg>',
345
- "dropbox": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 218"><path fill="#0061ff" d="M63.995 0L0 40.771l63.995 40.772L128 40.771zM192 0l-64 40.775l64 40.775l64.001-40.775zM0 122.321l63.995 40.772L128 122.321L63.995 81.55zM192 81.55l-64 40.775l64 40.774l64-40.774zM64 176.771l64.005 40.772L192 176.771L128.005 136z"/></svg>',
346
- "resend": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path fill="#141413" d="M156.575 0c49.582 0 79.07 29.488 79.07 68.632s-29.488 68.632-79.07 68.632h-25.052L256 256h-87.942l-94.729-90.03c-6.784-6.263-9.916-13.57-9.916-19.833c0-8.873 6.263-16.701 18.267-20.094l48.8-13.048c18.527-4.958 31.314-19.31 31.314-38.1c0-22.964-18.79-36.273-42.014-36.273H0V0z"/></svg>',
347
- "microsoft-word": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><defs><linearGradient id="SVG2m3AVb6p" x1="4.494" x2="13.832" y1="-1712.086" y2="-1695.914" gradientTransform="translate(0 1720)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#2368c4"/><stop offset=".5" stop-color="#1a5dbe"/><stop offset="1" stop-color="#1146ac"/></linearGradient></defs><path fill="#41a5ee" d="M28.806 3H9.705a1.19 1.19 0 0 0-1.193 1.191V9.5l11.069 3.25L30 9.5V4.191A1.19 1.19 0 0 0 28.806 3"/><path fill="#2b7cd3" d="M30 9.5H8.512V16l11.069 1.95L30 16Z"/><path fill="#185abd" d="M8.512 16v6.5l10.418 1.3L30 22.5V16Z"/><path fill="#103f91" d="M9.705 29h19.1A1.19 1.19 0 0 0 30 27.809V22.5H8.512v5.309A1.19 1.19 0 0 0 9.705 29"/><path d="M16.434 8.2H8.512v16.25h7.922a1.2 1.2 0 0 0 1.194-1.191V9.391A1.2 1.2 0 0 0 16.434 8.2" opacity=".1"/><path d="M15.783 8.85H8.512V25.1h7.271a1.2 1.2 0 0 0 1.194-1.191V10.041a1.2 1.2 0 0 0-1.194-1.191" opacity=".2"/><path d="M15.783 8.85H8.512V23.8h7.271a1.2 1.2 0 0 0 1.194-1.191V10.041a1.2 1.2 0 0 0-1.194-1.191" opacity=".2"/><path d="M15.132 8.85h-6.62V23.8h6.62a1.2 1.2 0 0 0 1.194-1.191V10.041a1.2 1.2 0 0 0-1.194-1.191" opacity=".2"/><path fill="url(#SVG2m3AVb6p)" d="M3.194 8.85h11.938a1.193 1.193 0 0 1 1.194 1.191v11.918a1.193 1.193 0 0 1-1.194 1.191H3.194A1.19 1.19 0 0 1 2 21.959V10.041A1.19 1.19 0 0 1 3.194 8.85"/><path fill="#fff" d="M6.9 17.988q.035.276.046.481h.028q.015-.195.065-.47c.05-.275.062-.338.089-.465l1.255-5.407h1.624l1.3 5.326a8 8 0 0 1 .162 1h.022a8 8 0 0 1 .135-.975l1.039-5.358h1.477l-1.824 7.748h-1.727l-1.237-5.126q-.054-.222-.122-.578t-.084-.52h-.021q-.021.189-.084.561t-.1.552L7.78 19.871H6.024L4.19 12.127h1.5l1.131 5.418a5 5 0 0 1 .079.443"/></svg>',
348
- "shopify": '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 292"><path fill="#95bf46" d="M223.774 57.34c-.201-1.46-1.48-2.268-2.537-2.357a19614 19614 0 0 0-23.383-1.743s-15.507-15.395-17.209-17.099c-1.703-1.703-5.029-1.185-6.32-.805c-.19.056-3.388 1.043-8.678 2.68c-5.18-14.906-14.322-28.604-30.405-28.604c-.444 0-.901.018-1.358.044C129.31 3.407 123.644.779 118.75.779c-37.465 0-55.364 46.835-60.976 70.635c-14.558 4.511-24.9 7.718-26.221 8.133c-8.126 2.549-8.383 2.805-9.45 10.462C21.3 95.806.038 260.235.038 260.235l165.678 31.042l89.77-19.42S223.973 58.8 223.775 57.34M156.49 40.848l-14.019 4.339c.005-.988.01-1.96.01-3.023c0-9.264-1.286-16.723-3.349-22.636c8.287 1.04 13.806 10.469 17.358 21.32m-27.638-19.483c2.304 5.773 3.802 14.058 3.802 25.238c0 .572-.005 1.095-.01 1.624c-9.117 2.824-19.024 5.89-28.953 8.966c5.575-21.516 16.025-31.908 25.161-35.828m-11.131-10.537c1.617 0 3.246.549 4.805 1.622c-12.007 5.65-24.877 19.88-30.312 48.297l-22.886 7.088C75.694 46.16 90.81 10.828 117.72 10.828"/><path fill="#5e8e3e" d="M221.237 54.983a19614 19614 0 0 0-23.383-1.743s-15.507-15.395-17.209-17.099c-.637-.634-1.496-.959-2.394-1.099l-12.527 256.233l89.762-19.418S223.972 58.8 223.774 57.34c-.201-1.46-1.48-2.268-2.537-2.357"/><path fill="#fff" d="m135.242 104.585l-11.069 32.926s-9.698-5.176-21.586-5.176c-17.428 0-18.305 10.937-18.305 13.693c0 15.038 39.2 20.8 39.2 56.024c0 27.713-17.577 45.558-41.277 45.558c-28.44 0-42.984-17.7-42.984-17.7l7.615-25.16s14.95 12.835 27.565 12.835c8.243 0 11.596-6.49 11.596-11.232c0-19.616-32.16-20.491-32.16-52.724c0-27.129 19.472-53.382 58.778-53.382c15.145 0 22.627 4.338 22.627 4.338"/></svg>'
349
- };
350
- function toolLogo(name) {
351
- const svg = logos[name];
352
- return svg ? `<img class="catalog-brand" src="data:image/svg+xml,${encodeURIComponent(svg)}" alt="" width="36" height="36">` : '<span class="catalog-brand" aria-hidden="true">\u25C7</span>';
353
- }
354
- function toolIcon(name, label2) {
355
- const svg = logos[name];
356
- return svg ? `<img class="tool-icon" src="data:image/svg+xml,${encodeURIComponent(svg)}" alt="${label2.replace(/[&<>"]/g, "")}" title="${label2.replace(/[&<>"]/g, "")}" width="16" height="16">` : `<span class="tool-icon tool-icon-fallback" title="${label2.replace(/[&<>"]/g, "")}">${label2.slice(0, 1).replace(/[&<>"]/g, "")}</span>`;
357
- }
358
-
359
501
  // frontend/src/experience.ts
360
- var list = (value) => Array.isArray(value) ? value.filter((v) => v && typeof v === "object") : [];
502
+ var list2 = (value) => Array.isArray(value) ? value.filter((v) => v && typeof v === "object") : [];
361
503
  var text = (value) => typeof value === "string" ? value : typeof value === "number" || typeof value === "boolean" ? String(value) : "";
362
- var rows2 = (o, tool, key) => list(o.state?.[tool]?.[key]);
504
+ var rows2 = (o, tool, key) => list2(o.state?.[tool]?.[key]);
363
505
  var ref = (value) => text(value).replace(/^\$(?:[a-z_]+\.)?/, "");
364
506
  var same = (a, b) => a != null && b != null && String(a) === String(b);
365
507
  var milliseconds = (value) => {
@@ -368,8 +510,12 @@ var milliseconds = (value) => {
368
510
  return /^\d+(?:\.\d+)?$/.test(value) ? Number(value) * (Number(value) > 1e12 ? 1 : 1e3) : Date.parse(value);
369
511
  };
370
512
  var at = (value) => {
513
+ const iso = simIso(milliseconds(value));
514
+ return iso ? iso.slice(11, 19) : "Time unavailable";
515
+ };
516
+ var usableMs = (value) => {
371
517
  const ms = milliseconds(value);
372
- return Number.isFinite(ms) ? new Date(ms).toISOString().slice(11, 19) : "Time unavailable";
518
+ return Number.isFinite(ms) && simIso(ms) ? ms : NaN;
373
519
  };
374
520
  var ordered = (values, key) => values.slice().sort((a, b) => (milliseconds(a[key]) || 0) - (milliseconds(b[key]) || 0));
375
521
  var pill = (value, tone = "") => `<span class="pill ${h(tone)}">${h(value)}</span>`;
@@ -403,8 +549,8 @@ function cell(value) {
403
549
  }
404
550
  function messageText(value) {
405
551
  const raw = readable(value);
406
- const [first, ...body] = raw.split("\n");
407
- if (first?.startsWith("Incident runbook |") && body.length) return `<p class="message-text">${h(body.join("\n"))}</p><span class="muted small">${h(first.split("|").slice(1).map((p) => p.trim().split("=").slice(1).join("=")).filter(Boolean).join(" \xB7 "))}</span>`;
552
+ const [first, ...body2] = raw.split("\n");
553
+ if (first?.startsWith("Incident runbook |") && body2.length) return `<p class="message-text">${h(body2.join("\n"))}</p><span class="muted small">${h(first.split("|").slice(1).map((p) => p.trim().split("=").slice(1).join("=")).filter(Boolean).join(" \xB7 "))}</span>`;
408
554
  return raw ? `<p class="message-text">${h(raw)}</p>` : empty2("Message text was not captured.");
409
555
  }
410
556
  function person(o, id) {
@@ -414,13 +560,13 @@ function person(o, id) {
414
560
  var messageKey = (message) => text(message.seedKey || message.ts);
415
561
  var latestDay = /* @__PURE__ */ new WeakMap();
416
562
  function messageTime(o, ts) {
417
- const ms = milliseconds(ts);
563
+ const ms = usableMs(ts);
418
564
  if (!Number.isFinite(ms)) return "Time unavailable";
419
565
  if (!latestDay.has(o)) {
420
- const last = Math.max(...rows2(o, "slack", "messages").map((m) => milliseconds(m.ts)).filter(Number.isFinite));
421
- latestDay.set(o, Number.isFinite(last) ? new Date(last).toISOString().slice(0, 10) : "");
566
+ const last = Math.max(...rows2(o, "slack", "messages").map((m) => usableMs(m.ts)).filter(Number.isFinite));
567
+ latestDay.set(o, Number.isFinite(last) ? simIso(last).slice(0, 10) : "");
422
568
  }
423
- const iso = new Date(ms).toISOString(), clock2 = iso.slice(11, 16);
569
+ const iso = simIso(ms), clock2 = iso.slice(11, 16);
424
570
  return latestDay.get(o) && iso.slice(0, 10) !== latestDay.get(o) ? `${new Date(ms).toLocaleDateString("en-US", { month: "short", day: "numeric", timeZone: "UTC" })}, ${clock2}` : clock2;
425
571
  }
426
572
  function slackMessage(o, m, base = "", showLink = true) {
@@ -456,8 +602,8 @@ function metricSeries(o) {
456
602
  seeded.get(key).points.push([milliseconds(p.at), Number(p.value)]);
457
603
  }
458
604
  for (const m of seeded.values()) add(m);
459
- for (const t of ordered(list(o.trace), "tSim")) if (t.service === "datadog" && /\/api\/v1\/query(?:\?|$)/.test(text(t.path))) for (const m of list(t.response?.series)) add(m, text(t.tSim));
460
- for (const m of list(o.metrics)) add(m);
605
+ for (const t of ordered(list2(o.trace), "tSim")) if (t.service === "datadog" && /\/api\/v1\/query(?:\?|$)/.test(text(t.path))) for (const m of list2(t.response?.series)) add(m, text(t.tSim));
606
+ for (const m of list2(o.metrics)) add(m);
461
607
  return [...captured.values()];
462
608
  }
463
609
  function metricChart(m) {
@@ -476,8 +622,8 @@ function capturedLogs(o) {
476
622
  if (typeof v.message === "string") found.set(`${v.at}\0${v.message}`, v);
477
623
  };
478
624
  for (const l of rows2(o, "datadog", "logs")) add(l);
479
- for (const t of list(o.trace)) if (t.service === "datadog" && text(t.path).includes("/logs/events/search")) for (const l of list(t.response?.data)) add(l);
480
- for (const l of list(o.logs)) add(l);
625
+ for (const t of list2(o.trace)) if (t.service === "datadog" && text(t.path).includes("/logs/events/search")) for (const l of list2(t.response?.data)) add(l);
626
+ for (const l of list2(o.logs)) add(l);
481
627
  return ordered([...found.values()], "at").reverse();
482
628
  }
483
629
  function datadogView(o, options) {
@@ -501,16 +647,16 @@ function pagerdutyView(o, options) {
501
647
  }).join("") || empty2("No incidents in the captured data.")}</section>`;
502
648
  }
503
649
  function files(s, sha, prefix = "", visited = /* @__PURE__ */ new Set()) {
504
- const result = /* @__PURE__ */ new Map(), key = text(sha);
505
- if (!key || visited.has(key)) return result;
650
+ const result2 = /* @__PURE__ */ new Map(), key = text(sha);
651
+ if (!key || visited.has(key)) return result2;
506
652
  visited.add(key);
507
- const tree = list(s.trees).find((t) => same(t.sha, key));
508
- for (const e of list(tree?.entries)) {
653
+ const tree = list2(s.trees).find((t) => same(t.sha, key));
654
+ for (const e of list2(tree?.entries)) {
509
655
  if (e.type === "tree") {
510
- for (const [path2, content2] of files(s, e.sha, prefix + text(e.path) + "/", new Set(visited))) result.set(path2, content2);
656
+ for (const [path2, content2] of files(s, e.sha, prefix + text(e.path) + "/", new Set(visited))) result2.set(path2, content2);
511
657
  continue;
512
658
  }
513
- const blob = list(s.blobs).find((b) => same(b.sha, e.sha));
659
+ const blob = list2(s.blobs).find((b) => same(b.sha, e.sha));
514
660
  if (!blob || typeof blob.content !== "string") continue;
515
661
  let content = blob.content;
516
662
  if (blob.encoding === "base64") {
@@ -520,15 +666,15 @@ function files(s, sha, prefix = "", visited = /* @__PURE__ */ new Set()) {
520
666
  continue;
521
667
  }
522
668
  }
523
- result.set(prefix + text(e.path), content);
669
+ result2.set(prefix + text(e.path), content);
524
670
  }
525
- return result;
671
+ return result2;
526
672
  }
527
673
  function filesAt(s, sha, visited = /* @__PURE__ */ new Set()) {
528
674
  const key = text(sha);
529
675
  if (!key || visited.has(key)) return /* @__PURE__ */ new Map();
530
676
  visited.add(key);
531
- const commit = list(s.commits).find((c) => same(c.sha, key));
677
+ const commit = list2(s.commits).find((c) => same(c.sha, key));
532
678
  if (!commit?.files || typeof commit.files !== "object") return files(s, commit?.commit?.tree);
533
679
  const inherited = filesAt(s, commit.commit?.parents?.[0], visited);
534
680
  for (const [path2, content] of Object.entries(commit.files)) {
@@ -551,7 +697,7 @@ function configuration(s, sha, before) {
551
697
  }
552
698
  function githubView(o, options) {
553
699
  const s = o.state?.github || {};
554
- let repos = list(s.repos).sort((a, b) => text(a.full_name).localeCompare(text(b.full_name))), repoLinks = "";
700
+ let repos = list2(s.repos).sort((a, b) => text(a.full_name).localeCompare(text(b.full_name))), repoLinks = "";
555
701
  if (options.record) repos = repos.filter((r) => same(r.id, options.record) || same(r.full_name, options.record) || same(r.ref, ref(options.record)));
556
702
  else if (repos.length > 1) {
557
703
  const current2 = repos.find((r) => same(r.full_name, options.repo)) ?? repos[0];
@@ -559,16 +705,16 @@ function githubView(o, options) {
559
705
  repos = [current2];
560
706
  }
561
707
  return `<section class="tool-surface">${repoLinks}${repos.map((r) => {
562
- const commit = list(s.commits).find((c) => same(c.sha, r.production));
563
- const pulls = list(s.pulls).filter((p) => same(p.repo_id, r.id));
564
- const issues = list(s.issues).filter((i) => same(i.repo_id, r.id) && !i.is_pull && !pulls.some((p) => same(p.number, i.number))).sort((a, b) => Number(b.number) - Number(a.number));
565
- const issueCards = issues.length ? `<h3 class="tool-section-title">Issues</h3>${issues.map((i) => `<article class="tool-change"><div class="row"><strong>#${h(i.number)} ${h(i.title)}</strong>${pill(text(i.state) || "Open")}</div>${messageText(i.body)}${list(s.comments).filter((c) => same(c.repo_id, r.id) && same(c.issue_number, i.number)).map((c) => messageText(c.body)).join("")}</article>`).join("")}` : "";
566
- const deployments = ordered(list(s.deployments).filter((d) => same(d.repo_id, r.id)), "created_at");
708
+ const commit = list2(s.commits).find((c) => same(c.sha, r.production));
709
+ const pulls = list2(s.pulls).filter((p) => same(p.repo_id, r.id));
710
+ const issues = list2(s.issues).filter((i) => same(i.repo_id, r.id) && !i.is_pull && !pulls.some((p) => same(p.number, i.number))).sort((a, b) => Number(b.number) - Number(a.number));
711
+ const issueCards = issues.length ? `<h3 class="tool-section-title">Issues</h3>${issues.map((i) => `<article class="tool-change"><div class="row"><strong>#${h(i.number)} ${h(i.title)}</strong>${pill(text(i.state) || "Open")}</div>${messageText(i.body)}${list2(s.comments).filter((c) => same(c.repo_id, r.id) && same(c.issue_number, i.number)).map((c) => messageText(c.body)).join("")}</article>`).join("")}` : "";
712
+ const deployments = ordered(list2(s.deployments).filter((d) => same(d.repo_id, r.id)), "created_at");
567
713
  return `<article class="repository">${heading(text(r.full_name) || text(r.name), "GitHub")}${issueCards}<p>${h(text(commit?.commit?.message) || "Production commit unavailable")}</p>${configuration(s, r.production, commit?.commit?.parents?.[0])}${pulls.length ? `<h3 class="tool-section-title">Pull requests</h3>${pulls.map((p) => {
568
- const issue = list(s.issues).find((i) => same(i.repo_id, r.id) && same(i.number, p.number));
714
+ const issue = list2(s.issues).find((i) => same(i.repo_id, r.id) && same(i.number, p.number));
569
715
  return `<article class="tool-change"><div class="row"><strong>#${h(p.number)} ${h(text(issue?.title) || "Pull request")}</strong>${pill(p.merged ? "Merged" : text(issue?.state) || "Open", p.merged ? "good" : "")}</div>${issue?.body ? `<p>${h(readable(issue.body))}</p>` : ""}${configuration(s, p.head_sha, p.base_sha)}</article>`;
570
716
  }).join("")}` : empty2("No pull requests in the captured data.")}${deployments.length ? `<h3 class="tool-section-title">Deployments</h3><ol class="event-list tool-events">${deployments.map((d) => {
571
- const status = ordered(list(s.deployment_statuses).filter((v) => same(v.deployment_id, d.id)), "created_at").at(-1);
717
+ const status = ordered(list2(s.deployment_statuses).filter((v) => same(v.deployment_id, d.id)), "created_at").at(-1);
572
718
  return `<li><time>${h(at(d.created_at))}</time><span>${h(text(d.environment) || "Deployment")} \xB7 ${h(text(status?.state) || "Status not captured")}${status?.description ? ` \u2014 ${h(readable(status.description))}` : ""}</span></li>`;
573
719
  }).join("")}</ol>` : ""}</article>`;
574
720
  }).join("") || empty2("No repositories in the captured data.")}</section>`;
@@ -580,11 +726,11 @@ function toolView(observation2, tool, options = {}) {
580
726
  return renderers[tool](observation2, options);
581
727
  }
582
728
  function projectedTool(o, tool, options) {
583
- const view = o.toolViews?.[tool], tables = list(view?.tables), conversations = list(view?.conversations), active = tables.find((t) => t.title === options.resource) ?? tables[0];
729
+ const view = o.toolViews?.[tool], tables = list2(view?.tables), conversations = list2(view?.conversations), active = tables.find((t) => t.title === options.resource) ?? tables[0];
584
730
  if (!view) return empty2(`${toolName(tool)} records are not available in this capture.`);
585
731
  const selected = options.conversation == null ? null : conversations[Number(options.conversation)];
586
- if (selected) return `<section class="tool-surface">${heading(selected.title, toolName(tool))}${nav("Back to records", options.baseHref || "", { view: "tools", tool, conversation: null }, "back-link")}<div class="messages">${list(selected.messages).map((m) => `<article class="message"><span class="avatar" aria-hidden="true">${h(text(m.speaker).slice(0, 2).toUpperCase())}</span><div><strong>${h(m.speaker)}</strong>${messageText(m.text)}</div></article>`).join("") || empty2(selected.status === "processing" ? "The transcript is still processing." : "No transcript was captured.")}</div></section>`;
587
- return `<section class="tool-surface">${options.embedded ? "" : heading(toolName(tool))}${tables.length > 1 ? `<nav class="tool-nav" aria-label="Record collections">${tables.map((t) => nav(t.title, options.baseHref || "", { view: "tools", tool, resource: t.title, conversation: null }, t === active ? "active" : "")).join("")}</nav>` : ""}${active ? `<div class="tool-section-title"><h3>${h(active.title)}</h3><span class="muted">${Number(active.total)} records</span></div><div class="table-wrap"><table><thead><tr>${(active.columns ?? []).map((key) => `<th>${h(key)}</th>`).join("")}</tr></thead><tbody>${list(active.rows).map((row) => `<tr>${(active.columns ?? []).map((key) => `<td>${h(cell(row[key]) || "\u2014")}</td>`).join("")}</tr>`).join("")}</tbody></table></div>${active.rows.length < active.total ? `<p class="muted small">Showing ${active.rows.length} of ${active.total} records.</p>` : ""}` : empty2("No records in this capture.")}${conversations.length ? `<div class="transcript-list">${conversations.map((c, index) => nav(c.title, options.baseHref || "", { view: "tools", tool, conversation: index }, "transcript-link")).join("")}</div>` : ""}</section>`;
732
+ if (selected) return `<section class="tool-surface">${heading(selected.title, toolName(tool))}${nav("Back to records", options.baseHref || "", { view: "tools", tool, conversation: null }, "back-link")}<div class="messages">${list2(selected.messages).map((m) => `<article class="message"><span class="avatar" aria-hidden="true">${h(text(m.speaker).slice(0, 2).toUpperCase())}</span><div><strong>${h(m.speaker)}</strong>${messageText(m.text)}</div></article>`).join("") || empty2(selected.status === "processing" ? "The transcript is still processing." : "No transcript was captured.")}</div></section>`;
733
+ return `<section class="tool-surface">${options.embedded ? "" : heading(toolName(tool))}${tables.length > 1 ? `<nav class="tool-nav" aria-label="Record collections">${tables.map((t) => nav(t.title, options.baseHref || "", { view: "tools", tool, resource: t.title, conversation: null }, t === active ? "active" : "")).join("")}</nav>` : ""}${active ? `<div class="tool-section-title"><h3>${h(active.title)}</h3><span class="muted">${Number(active.total)} records</span></div><div class="table-wrap"><table><thead><tr>${(active.columns ?? []).map((key) => `<th>${h(key)}</th>`).join("")}</tr></thead><tbody>${list2(active.rows).map((row2) => `<tr>${(active.columns ?? []).map((key) => `<td>${h(cell(row2[key]) || "\u2014")}</td>`).join("")}</tr>`).join("")}</tbody></table></div>${active.rows.length < active.total ? `<p class="muted small">Showing ${active.rows.length} of ${active.total} records.</p>` : ""}` : empty2("No records in this capture.")}${conversations.length ? `<div class="transcript-list">${conversations.map((c, index) => nav(c.title, options.baseHref || "", { view: "tools", tool, conversation: index }, "transcript-link")).join("")}</div>` : ""}</section>`;
588
734
  }
589
735
  var actionNames = {
590
736
  "conversations.list": "Listed Slack channels",
@@ -614,7 +760,7 @@ function actionLabel(t) {
614
760
  if (p === "/v2/enqueue") return t.request?.event_action === "resolve" ? "Sent incident recovery" : "Sent incident event";
615
761
  if (/\/incidents(?:\/|$)/.test(p)) {
616
762
  if (method === "GET") return "Read incidents";
617
- const statuses = [...list(t.request?.incidents), ...t.request?.incident ? [t.request.incident] : []].map((i) => i.status);
763
+ const statuses = [...list2(t.request?.incidents), ...t.request?.incident ? [t.request.incident] : []].map((i) => i.status);
618
764
  return statuses.includes("acknowledged") ? "Acknowledged an incident" : statuses.includes("resolved") ? "Resolved an incident" : "Updated an incident";
619
765
  }
620
766
  if (t.service === "github" && /\/issues(?:\/|$)/.test(p)) return method === "POST" ? p.endsWith("/comments") ? "Commented on an issue" : "Created an issue" : method === "PATCH" ? "Updated an issue" : "Read issues";
@@ -628,29 +774,29 @@ function actionLabel(t) {
628
774
  return method === "GET" || method === "HEAD" ? `Read ${toolName(text(t.service))} data` : `Called ${toolName(text(t.service))}`;
629
775
  }
630
776
  function traceDescription(t) {
631
- const path2 = text(t.path), result = [];
777
+ const path2 = text(t.path), result2 = [];
632
778
  if (t.service === "slack" && /(?:chat\.(?:postMessage|update)|actor)/.test(path2)) {
633
- const body = t.response?.message?.text ?? t.response?.text ?? t.request?.text;
634
- if (typeof body === "string") return messageText(body);
779
+ const body2 = t.response?.message?.text ?? t.response?.text ?? t.request?.text;
780
+ if (typeof body2 === "string") return messageText(body2);
635
781
  }
636
782
  if (t.service === "datadog" && /\/api\/v1\/query/.test(path2)) {
637
- for (const s of list(t.response?.series).slice(0, 4)) {
783
+ for (const s of list2(t.response?.series).slice(0, 4)) {
638
784
  const values = Array.isArray(s.pointlist) ? s.pointlist.filter((p) => Array.isArray(p) && Number.isFinite(p[1])) : [];
639
- result.push(`${text(s.metric || s.expression) || "Metric"}${values.length ? ` \xB7 latest returned value ${values.at(-1)[1]}` : " \xB7 no samples returned"}`);
785
+ result2.push(`${text(s.metric || s.expression) || "Metric"}${values.length ? ` \xB7 latest returned value ${values.at(-1)[1]}` : " \xB7 no samples returned"}`);
640
786
  }
641
787
  }
642
- if (path2.includes("/logs/events/search") && Array.isArray(t.response?.data)) result.push(`${t.response.data.length} log entries returned`);
788
+ if (path2.includes("/logs/events/search") && Array.isArray(t.response?.data)) result2.push(`${t.response.data.length} log entries returned`);
643
789
  if (t.service === "github") {
644
- if (typeof t.request?.title === "string") result.push(t.request.title);
645
- if (typeof t.response?.title === "string" && t.response.title !== t.request?.title) result.push(t.response.title);
646
- if (typeof t.response?.message === "string") result.push(t.response.message);
790
+ if (typeof t.request?.title === "string") result2.push(t.request.title);
791
+ if (typeof t.response?.title === "string" && t.response.title !== t.request?.title) result2.push(t.response.title);
792
+ if (typeof t.response?.message === "string") result2.push(t.response.message);
647
793
  const filename = path2.match(/\/contents\/([^?]+)/)?.[1];
648
- if (filename) result.push(filename);
794
+ if (filename) result2.push(filename);
649
795
  }
650
- if (t.gap) result.push("This request could not be handled by the mocked tool.");
651
- if (t.issue?.message) result.push(readable(t.issue.message));
652
- else if (Number(t.status) >= 400) result.push(`HTTP ${Number(t.status)}${typeof t.response?.error === "string" ? " \xB7 " + readable(t.response.error) : ""}`);
653
- return result.length ? `<p>${result.map(h).join(" \xB7 ")}</p>` : "";
796
+ if (t.gap) result2.push("This request could not be handled by the mocked tool.");
797
+ if (t.issue?.message) result2.push(readable(t.issue.message));
798
+ else if (Number(t.status) >= 400) result2.push(`HTTP ${Number(t.status)}${typeof t.response?.error === "string" ? " \xB7 " + readable(t.response.error) : ""}`);
799
+ return result2.length ? `<p>${result2.map(h).join(" \xB7 ")}</p>` : "";
654
800
  }
655
801
  function readCall(t) {
656
802
  const method = text(t.method).toUpperCase(), path2 = text(t.path).split("?")[0] ?? "";
@@ -661,21 +807,24 @@ function readCall(t) {
661
807
  return /\/(?:search|query)$/.test(path2);
662
808
  }
663
809
  function traceRows(o, trace, options = {}) {
664
- const manual = new Set(list(o.trace).filter((t) => t.path === "console.manual_action").flatMap((t) => Array.isArray(t.response?.sequences) ? t.response.sequences : []));
665
- let previous = "", previousSource = "";
810
+ const manual = new Set(list2(o.trace).filter((t) => t.path === "console.manual_action").flatMap((t) => Array.isArray(t.response?.sequences) ? t.response.sequences : []));
811
+ const times = list2(o.trace).map((t) => usableMs(t.tSim)).filter(Number.isFinite), start = times.length ? Math.min(...times) : NaN;
812
+ let previous = "", previousSource = "", previousMs = NaN;
666
813
  return trace.map((t) => {
667
814
  const message = t.service === "slack" && /chat\.(postMessage|update)/.test(text(t.path)), channel2 = t.response?.channel ?? t.request?.channel, thread2 = t.response?.message?.thread_ts ?? t.response?.ts ?? t.request?.ts;
668
815
  const link = options.baseHref && (o.state?.[t.service] || o.toolViews?.[t.service]) ? nav(message && channel2 && thread2 ? "View message" : "Open " + toolName(text(t.service)), options.baseHref, { view: "tools", tool: t.service, ...message && channel2 && thread2 ? { channel: channel2, thread: thread2 } : {} }, "activity-record-link") : "";
669
816
  const kind = t.gap || t.issue || Number(t.status) >= 400 || t.response?.ok === false ? "error" : readCall(t) ? "read" : "write";
670
- const time2 = at(t.tSim), repeat = time2 === previous;
817
+ const ms = usableMs(t.tSim), time2 = Number.isFinite(ms) && Number.isFinite(start) ? simOffset(ms, start) : at(t.tSim), repeat = time2 === previous;
671
818
  previous = time2;
819
+ const gap = Number.isFinite(ms) && Number.isFinite(previousMs) ? gapLabel(ms - previousMs) : "";
820
+ if (Number.isFinite(ms)) previousMs = ms;
672
821
  const source = traceSource(t, manual), tool = toolName(text(t.service)), newSource = source !== previousSource;
673
822
  previousSource = source;
674
- return `<article class="activity-event" data-kind="${kind}" id="event-${h(t.seq)}"><time${repeat ? ' class="repeat"' : ""}>${h(time2)}</time><div><div class="activity-event-head"><span class="ae-tool">${toolIcon(text(t.service), tool)}</span><strong>${h(actionLabel(t))}${t.repeated > 1 ? ` <span class="muted">\xB7 ${t.repeated} times</span>` : ""}</strong>${newSource ? `<span class="ae-source">${h(source)}</span>` : ""}${link}</div>${traceDescription(t)}</div></article>`;
823
+ return `${gap ? `<div class="activity-gap" role="separator">${h(gap)}</div>` : ""}<article class="activity-event" data-kind="${kind}" id="event-${h(t.seq)}"><time${repeat ? ' class="repeat"' : ""}${Number.isFinite(ms) ? ` datetime="${h(simIso(ms))}" title="${h(simAbsolute(ms))}"` : ""}>${h(time2)}</time><div><div class="activity-event-head"><span class="ae-tool">${toolIcon(text(t.service), tool)}</span><strong>${h(actionLabel(t))}${t.repeated > 1 ? ` <span class="muted">\xB7 ${t.repeated} times</span>` : ""}</strong>${newSource ? `<span class="ae-source">${h(source)}</span>` : ""}${link}</div>${traceDescription(t)}</div></article>`;
675
824
  }).join("");
676
825
  }
677
826
  function activityView(observation2, options = {}) {
678
- const trace = ordered(list(observation2.trace), "tSim").filter((t) => !options.source || options.source === "all" || t.source === options.source);
827
+ const trace = ordered(list2(observation2.trace), "tSim").filter((t) => !options.source || options.source === "all" || t.source === options.source);
679
828
  const visible = trace.slice(-200);
680
829
  const grouped = [];
681
830
  for (const entry of visible) {
@@ -687,7 +836,7 @@ function activityView(observation2, options = {}) {
687
836
  return `<section class="activity-stream"><div class="tool-section-title"><h2>Activity</h2><span class="muted">Oldest first${trace.length > 200 ? ` \xB7 latest 200 of ${trace.length}` : ""}</span></div>${traceRows(observation2, grouped, options) || empty2("No captured tool activity yet.")}</section>`;
688
837
  }
689
838
  function checkLabel(scene, check) {
690
- const definition = list(scene?.checks).find((c) => c.id === check.id);
839
+ const definition = list2(scene?.checks).find((c) => c.id === check.id);
691
840
  return definition && scene ? criterion(scene, definition) : text(check.id).replaceAll("_", " ") || "Outcome";
692
841
  }
693
842
  function checkState(check, provisional = false) {
@@ -700,8 +849,8 @@ function slackEvidence(o, scene, rule, base) {
700
849
  if (!channel2) return empty2("The channel referenced by this outcome is unavailable in the saved data.");
701
850
  if (!rule.in_thread_of) return slackView(o, { channel: channel2.id, baseHref: base });
702
851
  const threadRef = ref(rule.in_thread_of);
703
- const seeded = list(scene.seed?.slack?.messages).find((m) => same(m.ref, threadRef));
704
- const scripted = list(scene.world_rules?.actors).map((a) => a["slack.post"]).find((m) => m && same(m.ref, threadRef));
852
+ const seeded = list2(scene.seed?.slack?.messages).find((m) => same(m.ref, threadRef));
853
+ const scripted = list2(scene.world_rules?.actors).map((a) => a["slack.post"]).find((m) => m && same(m.ref, threadRef));
705
854
  const definition = seeded || scripted;
706
855
  const author = definition ? rows2(o, "slack", "users").find((u) => same(u.ref, ref(definition.user))) : null;
707
856
  const matches = rows2(o, "slack", "messages").filter((m) => same(m.channel_id, channel2.id) && (same(m.ref, threadRef) || definition && m.text === definition.text && (!author || same(m.user_id, author.id))));
@@ -709,7 +858,7 @@ function slackEvidence(o, scene, rule, base) {
709
858
  return slackView(o, { channel: channel2.id, thread: messageKey(matches[0]), baseHref: base });
710
859
  }
711
860
  function checkEvidence(o, scene, check, base) {
712
- const definition = list(scene?.checks).find((c) => c.id === check.id), state = definition?.state || {};
861
+ const definition = list2(scene?.checks).find((c) => c.id === check.id), state = definition?.state || {};
713
862
  if (scene && state["slack.message"]) return slackEvidence(o, scene, state["slack.message"], base);
714
863
  if (state["pagerduty.incident"]) {
715
864
  const rule = state["pagerduty.incident"], service = rows2(o, "pagerduty", "services").find((s) => same(s.ref, ref(rule.service)));
@@ -724,14 +873,14 @@ function checkEvidence(o, scene, check, base) {
724
873
  return githubView(o, { record: ref(repository) });
725
874
  }
726
875
  const sequences = new Set(Array.isArray(check.evidence) ? check.evidence : []);
727
- const evidence = ordered(list(o.trace).filter((t) => sequences.has(t.seq)), "tSim");
876
+ const evidence = ordered(list2(o.trace).filter((t) => sequences.has(t.seq)), "tSim");
728
877
  if (evidence.length) return `<div class="activity-stream">${traceRows(o, evidence)}</div>`;
729
878
  if (definition?.trace?.not_called) return `<p>${h(readable(check.actual) || "No matching calls were reported by this check.")}</p>`;
730
879
  if (state.fault_resolved) return `<p>${h(readable(check.actual) || "No fault-state description was captured.")}</p>`;
731
880
  return `<p>${h(readable(check.actual) || readable(check.explanation) || "Detailed evidence is unavailable for this outcome.")}</p>`;
732
881
  }
733
882
  function attemptResult(observation2, scene, selectedCheck, baseHref = "") {
734
- const entry = observation2.entry || {}, checks2 = list(observation2.checks).length ? list(observation2.checks) : list(entry.checks);
883
+ const entry = observation2.entry || {}, checks2 = list2(observation2.checks).length ? list2(observation2.checks) : list2(entry.checks);
735
884
  const required = checks2.filter((c) => c.required !== false), validFinal = !entry.incomplete && entry.valid === true && typeof entry.passed === "boolean";
736
885
  const partial = entry.incomplete === true || observation2.phase === "partial", invalid = !partial && entry.valid === false;
737
886
  const provisional = !validFinal && !invalid;
@@ -749,7 +898,36 @@ function attemptResult(observation2, scene, selectedCheck, baseHref = "") {
749
898
  }).join("")}</nav><section class="selected-evidence" aria-label="Selected outcome evidence"><header class="tool-title"><h3>${h(checkLabel(scene, selected))}</h3>${pill(selectedState.label, selectedState.tone)}</header>${selected.error ? `<p class="error">${h(readable(selected.error))}</p>` : selected.status === "skipped" ? `<p>${h(readable(selected.warning) || "This check was not evaluated.")}</p>` : ""}<div class="evidence-surface">${checkEvidence(observation2, scene, selected, baseHref)}</div></section></div>`;
750
899
  }
751
900
 
901
+ // frontend/src/runs-page.ts
902
+ var SOURCES = { console: "Console", cli: "CLI", ci: "CI" };
903
+ var TARGETS = { local: "Local", docker: "Docker", hosted: "Hosted" };
904
+ function originLabel(origin) {
905
+ if (!origin?.source) return "";
906
+ const commit = origin.commit ? `${String(origin.commit).slice(0, 7)}${origin.dirty ? " + changes" : ""}` : "";
907
+ return [SOURCES[origin.source] ?? String(origin.source), String(origin.target ?? "").toLowerCase(), commit].filter(Boolean).join(" \xB7 ");
908
+ }
909
+ function result(run) {
910
+ const counts = batchCounts(run), rate = run.summary?.pass_rate;
911
+ if (!terminal(run.status)) return run.status === "queued" && run.queue ? queueLabel(run.queue) : `${counts.finished} / ${counts.total} finished`;
912
+ return typeof rate === "number" ? `${Math.round(rate * 100)}% passed` : `${counts.total} ${counts.total === 1 ? "attempt" : "attempts"}`;
913
+ }
914
+ function row(run) {
915
+ const date = new Date(run.createdAt), when = Number.isFinite(date.getTime()) ? date.toLocaleString(void 0, { month: "short", day: "numeric", hour: "numeric", minute: "2-digit" }) : "";
916
+ const about = [run.agentName, run.world?.name].filter(Boolean).join(" \xB7 "), meta = [when, originLabel(run.origin)].filter(Boolean).join(" \xB7 ");
917
+ return `<a class="batch-history-row runs-row" href="/playgrounds/${encodeURIComponent(run.id)}" data-nav><div><strong>${h(shortPrompt(batchTitle(run)))}</strong>${about ? `<small>${h(about)}</small>` : ""}${meta ? `<small>${h(meta)}</small>` : ""}</div>${attemptBadge(run.status)}<span class="muted">${h(result(run))}</span><span aria-hidden="true">\u2192</span></a>`;
918
+ }
919
+ function runsPage(runs, filters, options = {}) {
920
+ if (!runs.length) return `<p class="quiet-empty">${options.emptyHtml ?? "No runs yet. Runs started here, with the CLI or in CI appear here."}</p>`;
921
+ const values = (key) => [...new Set([...runs.map((run) => run.origin?.[key]), filters[key]].filter(Boolean).map(String))];
922
+ const select = (name, label2, options2) => `<label><span>${label2}</span><select name="${name}" data-run-filter><option value="">All</option>${options2.map(([value, text2]) => `<option value="${h(value)}" ${filters[name] === value ? "selected" : ""}>${h(text2)}</option>`).join("")}</select></label>`;
923
+ const commits = values("commit");
924
+ const bar = `<form class="runs-filters" aria-label="Filter runs">${select("source", "Source", values("source").map((v) => [v, SOURCES[v] ?? v]))}${select("target", "Target", values("target").map((v) => [v, TARGETS[v] ?? v]))}${commits.length ? select("commit", "Commit", commits.map((v) => [v, v.slice(0, 7)])) : ""}</form>`;
925
+ const shown = runs.filter((run) => (!filters.source || run.origin?.source === filters.source) && (!filters.target || run.origin?.target === filters.target) && (!filters.commit || run.origin?.commit === filters.commit));
926
+ return bar + (shown.length ? `<div class="batch-history runs-list">${shown.map(row).join("")}</div>` : '<p class="quiet-empty">No runs match these filters.</p>');
927
+ }
928
+
752
929
  // frontend/src/attempt-workspace.ts
930
+ var readOnlyRun = (batch) => batch.origin?.stored === true || batch.origin?.mirrored === true || ["cli", "ci"].includes(batch.origin?.source);
753
931
  var records = (value) => Array.isArray(value) ? value.filter((item) => item && typeof item === "object") : [];
754
932
  var basePath = (batch) => "/playgrounds/" + encodeURIComponent(String(batch.id));
755
933
  var taskHref = (batch, task, extra = {}) => url(basePath(batch), { task: task.id, ...extra });
@@ -788,7 +966,7 @@ function queueLine(batch) {
788
966
  }
789
967
  function executionSummary(attempts) {
790
968
  const finished = attempts.filter((a) => ["completed", "error", "stopped"].includes(a.status));
791
- const durations = finished.map((a) => Date.parse(a.finishedAt) - Date.parse(a.startedAt)).filter((ms) => Number.isFinite(ms) && ms >= 0).sort((x, y) => x - y);
969
+ const durations = finished.map(attemptMs).filter((ms) => ms !== void 0).sort((x, y) => x - y);
792
970
  const passed = attempts.filter((a) => a.outcome === "passed").length, failed = attempts.filter((a) => a.outcome === "failed").length, invalid = attempts.filter((a) => a.outcome === "invalid").length;
793
971
  return {
794
972
  total: attempts.length,
@@ -855,11 +1033,24 @@ function railMark(attempt) {
855
1033
  const outcome = attemptOutcome(attempt), label2 = outcome.key === "ungraded" ? attemptLabel(String(attempt.status ?? "")) : outcome.label;
856
1034
  return `<span class="aw-rail-mark ${outcome.tone} execution-${h(String(attempt.status ?? ""))}" title="${h(label2)}" aria-label="${h(label2)}">${attemptMark(attempt)}</span>`;
857
1035
  }
858
- function checksView(attempt) {
1036
+ function sentence(text2) {
1037
+ const value = String(text2 ?? "");
1038
+ if (!/^\s*[[{]/.test(value)) return value;
1039
+ try {
1040
+ JSON.parse(value);
1041
+ return "";
1042
+ } catch {
1043
+ return value;
1044
+ }
1045
+ }
1046
+ function checksView(attempt, jump = () => void 0) {
859
1047
  const checks2 = records(attempt.checks);
860
1048
  if (!checks2.length) return "";
861
1049
  const passed = checks2.filter((c) => c.passed).length;
862
- return `<section class="aw-checks"><h3>Checks <span>${passed} of ${checks2.length} passed</span></h3><ul>${checks2.map((c) => `<li class="${c.passed ? "pass" : "fail"}"><span class="aw-check-mark" aria-hidden="true">${c.passed ? "\u2713" : "\u2717"}</span><div><strong>${h(c.id)}</strong><p>${h(c.expected)}</p><p class="muted">${h(c.error ? `Error: ${c.error}` : c.actual)}</p></div></li>`).join("")}</ul></section>`;
1050
+ return `<section class="aw-checks"><h3>Checks <span>${passed} of ${checks2.length} passed</span></h3><ul>${checks2.map((c) => {
1051
+ const href2 = c.passed ? void 0 : jump(String(c.id));
1052
+ return `<li class="${c.passed ? "pass" : "fail"}"><span class="aw-check-mark" aria-hidden="true">${c.passed ? "\u2713" : "\u2717"}</span><div><strong>${h(c.id)}</strong>${sentence(c.expected) ? `<p>${h(sentence(c.expected))}</p>` : ""}<p class="muted">${h(c.error ? `Error: ${c.error}` : c.actual)}</p>${href2 ? navLink("See in the conversation", href2, "aw-check-jump") : ""}</div></li>`;
1053
+ }).join("")}</ul></section>`;
863
1054
  }
864
1055
  function widgets(attempts, tasks) {
865
1056
  return summaryWidgets(attempts, hasChecks(tasks));
@@ -878,10 +1069,10 @@ function attemptMark(attempt) {
878
1069
  if (outcome.key !== "ungraded") return outcome.mark;
879
1070
  return attempt.status === "error" ? "!" : ["running", "starting"].includes(attempt.status) ? "" : attempt.status === "queued" ? "" : attempt.status === "stopped" ? "\u2013" : "\u2022";
880
1071
  }
881
- var attemptMs = (attempt) => {
882
- const ms = Date.parse(attempt.finishedAt) - Date.parse(attempt.startedAt);
1072
+ function attemptMs(attempt) {
1073
+ const ms = Number.isFinite(attempt.durationMs) ? Number(attempt.durationMs) : Date.parse(attempt.finishedAt) - Date.parse(attempt.startedAt);
883
1074
  return Number.isFinite(ms) && ms >= 0 ? ms : void 0;
884
- };
1075
+ }
885
1076
  function markers(batch, task, attempts) {
886
1077
  return `<div class="aw-attempt-strip" aria-label="${h(task.title || "Task")} attempts">${attempts.map((attempt) => {
887
1078
  const state = ["queued", "starting", "running", "completed", "stopped", "error"].includes(attempt.status) ? attempt.status : "unavailable";
@@ -891,7 +1082,7 @@ function markers(batch, task, attempts) {
891
1082
  }).join("")}</div>`;
892
1083
  }
893
1084
  function comparisonForm(batch, task, attempts, selected) {
894
- if (attempts.length < 2) return "";
1085
+ if (attempts.length < 2 || readOnlyRun(batch)) return "";
895
1086
  const option = (a, chosen) => `<option value="${h(a.id)}" ${a.id === chosen ? "selected" : ""}>Attempt ${h(a.number)}</option>`;
896
1087
  const open = `<form class="attempt-compare-form aw-compare-form${selected ? " compact" : ""}" data-run="${h(batch.id)}"><input type="hidden" name="task" value="${h(task.id)}">`;
897
1088
  if (selected) {
@@ -904,7 +1095,7 @@ function comparisonForm(batch, task, attempts, selected) {
904
1095
  function runMeta(batch, attempts, tasks) {
905
1096
  const status = String(batch.status ?? "");
906
1097
  const when = Date.parse(batch.createdAt);
907
- const parts = [batch.agentName ?? batch.test?.agentName, `${attempts.length} attempt${attempts.length === 1 ? "" : "s"}`, `${tasks.length} task${tasks.length === 1 ? "" : "s"}`, Number.isFinite(when) ? new Date(when).toLocaleString("en-US", { month: "short", day: "numeric", hour: "numeric", minute: "2-digit" }) : ""].filter(Boolean);
1098
+ const parts = [batch.agentName ?? batch.test?.agentName, `${attempts.length} attempt${attempts.length === 1 ? "" : "s"}`, `${tasks.length} task${tasks.length === 1 ? "" : "s"}`, Number.isFinite(when) ? new Date(when).toLocaleString("en-US", { month: "short", day: "numeric", hour: "numeric", minute: "2-digit" }) : "", originLabel(batch.origin)].filter(Boolean);
908
1099
  return `<p class="aw-meta">${status ? `<span class="aw-run-state ${h(status)}">${h(attemptLabel(status))}</span>` : ""}${parts.map((p) => `<span>${h(String(p))}</span>`).join("")}</p>`;
909
1100
  }
910
1101
  function renderRunOverview(batch, actionsHtml = "", options = {}) {
@@ -1027,14 +1218,23 @@ function managedResponse(attempt) {
1027
1218
  function renderAttemptWorkspace(batch, attempt, evidence, options = {}) {
1028
1219
  const entry = groupEntryForAttempt(records(batch.entries), attempt), tasks = entry ? tasksForEntry(batch, entry) : records(batch.tasks), index = tasks.findIndex((t) => t.id === attempt.taskId), task = tasks[index] ?? { id: attempt.taskId, prompt: "" };
1029
1220
  const attempts = (entry ? attemptsForEntry(batch, entry) : records(batch.attempts)).filter((a) => a.taskId === attempt.taskId);
1030
- const observation2 = { ...evidence, ...evidence.observation ?? {} }, fullEvidence = { ...attempt, ...observation2, status: attempt.status }, view = ["tools", "sandbox"].includes(options.view ?? "") ? "tools" : "activity";
1221
+ const observation2 = { ...evidence, ...evidence.observation ?? {} }, fullEvidence = { ...attempt, ...observation2, status: attempt.status };
1222
+ const people2 = hasConversation(observation2), view = ["tools", "sandbox"].includes(options.view ?? "") ? "tools" : options.view === "activity" || !people2 ? "activity" : "conversation";
1031
1223
  const world = entry?.world ?? entry?.test?.world, configuration2 = world?.configuration ?? entry?.configuration ?? entry?.test?.configuration ?? batch.configuration;
1032
1224
  const tools = [.../* @__PURE__ */ new Set([...records(configuration2?.preset?.datasets).map((dataset) => String(dataset.tool)), ...Object.keys(observation2.state ?? {}), ...Object.keys(observation2.toolViews ?? {})])];
1033
1225
  const tool = options.tool && tools.includes(options.tool) ? options.tool : tools[0], attemptBase = taskHref(batch, task, { attempt: attempt.id });
1226
+ const response = readOnlyRun(batch) && !(typeof attempt.response === "string" && attempt.response.trim()) ? "" : managedResponse(fullEvidence);
1034
1227
  const query = options.query ?? {};
1035
1228
  const toolsNav = `<nav class="tool-nav" aria-label="Attempt tools">${tools.map((t) => navLink(toolName(t), taskHref(batch, task, { attempt: attempt.id, view: "tools", tool: t }), t === tool ? "active" : "")).join("")}</nav>`;
1036
- const content = view === "tools" ? toolsNav + (tool ? capturedToolView(observation2, tool, { ...query, baseHref: attemptBase }) : '<p class="quiet-empty">No captured tool data.</p>') : managedResponse(fullEvidence) + activityView(observation2, { baseHref: attemptBase });
1037
- return `<div class="aw-task-detail">${navLink("\u2190 Tasks", basePath(batch), "back")}<header class="aw-header"><h1>${h(taskDisplayName(task, Math.max(index, 0)))}</h1><div class="aw-actions">${options.actionsHtml ?? ""}</div></header><section class="aw-task-description"><p>${h(task.prompt)}</p></section>${queueLine(batch)}${errorMessage(batch.error)}<div class="aw-workspace"><aside class="aw-attempt-rail"><h2>Attempts</h2><nav class="aw-attempt-list" aria-label="Task attempts">${attempts.map((a) => `<a data-nav class="aw-attempt-item ${a.id === attempt.id ? "selected" : ""}" ${a.id === attempt.id ? 'aria-current="page"' : ""} href="${h(taskHref(batch, task, { attempt: a.id, view }))}"><span class="aw-attempt-number">Attempt ${h(a.number)}</span>${a.status === "completed" ? `<span class="aw-attempt-time">${h(duration(attemptMs(a)))}</span>` : executionBadge(a, true)}${railMark(a)}</a>`).join("")}</nav></aside><section class="aw-evidence"><header class="aw-evidence-header"><div><h2>Attempt ${h(attempt.number)}</h2>${outcomeBadge(attempt)}${attempt.status === "completed" ? "" : executionBadge(attempt)}<span class="aw-evidence-meta">${[attemptMs(attempt) === void 0 ? "" : duration(attemptMs(attempt)), `${Number(attempt.toolCalls) || 0} tool call${Number(attempt.toolCalls) === 1 ? "" : "s"}`].filter(Boolean).map(h).join(" \xB7 ")}</span></div>${comparisonForm(batch, task, attempts, attempt)}</header>${invalidNote(attempt)}${checksView(attempt)}<nav class="aw-tabs" aria-label="Attempt evidence">${navLink("Activity", attemptBase, view === "activity" ? "active" : "").replace("<a ", `<a ${view === "activity" ? 'aria-current="page" ' : ""}`)}${navLink("Tools", taskHref(batch, task, { attempt: attempt.id, view: "tools" }), view === "tools" ? "active" : "").replace("<a ", `<a ${view === "tools" ? 'aria-current="page" ' : ""}`)}</nav><div id="attempt-evidence" class="aw-evidence-body">${errorMessage(fullEvidence.error)}${content}</div></section></div></div>`;
1229
+ const activityHref = people2 ? taskHref(batch, task, { attempt: attempt.id, view: "activity" }) : attemptBase;
1230
+ const content = view === "tools" ? toolsNav + (tool ? capturedToolView(observation2, tool, { ...query, baseHref: attemptBase }) : '<p class="quiet-empty">No captured tool data.</p>') : view === "conversation" ? response + conversationView(observation2, { focus: query.focus }) : response + activityView(observation2, { baseHref: activityHref });
1231
+ const focus = people2 ? checkFocus(observation2) : /* @__PURE__ */ new Map();
1232
+ const jump = (checkId) => {
1233
+ const id = focus.get(checkId);
1234
+ return id ? taskHref(batch, task, { attempt: attempt.id, view: "conversation", focus: id }) : void 0;
1235
+ };
1236
+ const tab2 = (label2, href2, active) => navLink(label2, href2, active ? "active" : "").replace("<a ", `<a ${active ? 'aria-current="page" ' : ""}`);
1237
+ return `<div class="aw-task-detail">${navLink("\u2190 Tasks", basePath(batch), "back")}<header class="aw-header"><h1>${h(taskDisplayName(task, Math.max(index, 0)))}</h1><div class="aw-actions">${options.actionsHtml ?? ""}</div></header><section class="aw-task-description"><p>${h(task.prompt)}</p></section>${queueLine(batch)}${errorMessage(batch.error)}<div class="aw-workspace"><aside class="aw-attempt-rail"><h2>Attempts</h2><nav class="aw-attempt-list" aria-label="Task attempts">${attempts.map((a) => `<a data-nav class="aw-attempt-item ${a.id === attempt.id ? "selected" : ""}" ${a.id === attempt.id ? 'aria-current="page"' : ""} href="${h(taskHref(batch, task, { attempt: a.id, view }))}"><span class="aw-attempt-number">Attempt ${h(a.number)}</span>${a.status === "completed" ? `<span class="aw-attempt-time">${h(duration(attemptMs(a)))}</span>` : executionBadge(a, true)}${railMark(a)}</a>`).join("")}</nav></aside><section class="aw-evidence"><header class="aw-evidence-header"><div><h2>Attempt ${h(attempt.number)}</h2>${outcomeBadge(attempt)}${attempt.status === "completed" ? "" : executionBadge(attempt)}<span class="aw-evidence-meta">${[attemptMs(attempt) === void 0 ? "" : duration(attemptMs(attempt)), `${Number(attempt.toolCalls) || 0} tool call${Number(attempt.toolCalls) === 1 ? "" : "s"}`].filter(Boolean).map(h).join(" \xB7 ")}</span></div>${comparisonForm(batch, task, attempts, attempt)}</header>${invalidNote(attempt)}${checksView(attempt, jump)}<nav class="aw-tabs" aria-label="Attempt evidence">${people2 ? tab2("Conversation", taskHref(batch, task, { attempt: attempt.id, view: "conversation" }), view === "conversation") : ""}${tab2("Activity", activityHref, view === "activity")}${tab2("Tools", taskHref(batch, task, { attempt: attempt.id, view: "tools" }), view === "tools")}</nav><div id="attempt-evidence" class="aw-evidence-body">${errorMessage(fullEvidence.error)}${content}</div></section></div></div>`;
1038
1238
  }
1039
1239
  function renderManagedComparison(data) {
1040
1240
  const sides = records(data.attempts ?? [data.left, data.right]);
@@ -1095,9 +1295,9 @@ function taskChecks(task, index) {
1095
1295
  } catch {
1096
1296
  throw new Error(`Task ${index + 1}: checks must be valid JSON, a list like [{"id": "posted", "trace": {"called": "* /api/chat.postMessage"}}]`);
1097
1297
  }
1098
- const list2 = Array.isArray(parsed) ? parsed : [parsed];
1099
- if (list2.some((item) => !item || typeof item !== "object" || Array.isArray(item))) throw new Error(`Task ${index + 1}: each check must be an object with an id and a state or trace check`);
1100
- return list2;
1298
+ const list3 = Array.isArray(parsed) ? parsed : [parsed];
1299
+ if (list3.some((item) => !item || typeof item !== "object" || Array.isArray(item))) throw new Error(`Task ${index + 1}: each check must be an object with an id and a state or trace check`);
1300
+ return list3;
1101
1301
  }
1102
1302
  function workspaceDefinition(draft) {
1103
1303
  return {
@@ -1151,7 +1351,7 @@ function mountWorldWorkspace(node, options) {
1151
1351
  d.agentId = String(values.get("agentId") ?? "");
1152
1352
  d.concurrency = Number(values.get("concurrency"));
1153
1353
  d.worldRevision = Number(values.get("worldRevision"));
1154
- d.tasks = [...form.querySelectorAll(".ww-task-editor")].map((row) => ({ id: row.dataset.taskId, title: row.querySelector("[name=title]").value, prompt: row.querySelector("[name=prompt]").value, attempts: Number(row.querySelector("[name=attempts]").value), timeoutMs: Math.round(Number(row.querySelector("[name=minutes]").value) * 6e4), checksText: row.querySelector("[name=checks]")?.value ?? "" }));
1354
+ d.tasks = [...form.querySelectorAll(".ww-task-editor")].map((row2) => ({ id: row2.dataset.taskId, title: row2.querySelector("[name=title]").value, prompt: row2.querySelector("[name=prompt]").value, attempts: Number(row2.querySelector("[name=attempts]").value), timeoutMs: Math.round(Number(row2.querySelector("[name=minutes]").value) * 6e4), checksText: row2.querySelector("[name=checks]")?.value ?? "" }));
1155
1355
  remember();
1156
1356
  }
1157
1357
  function href2(test, agent = agentId, extra = "") {
@@ -1164,15 +1364,15 @@ function mountWorldWorkspace(node, options) {
1164
1364
  function render() {
1165
1365
  if (disposed) return;
1166
1366
  const currentRuns = selected ? setupRuns(runs, selected) : [], run = currentRuns[0], attempts = run?.attempts ?? [], tasks = selected?.tasks ?? [], choices = worldSetups(tests, world.id, agentId);
1167
- node.innerHTML = `<div class="ww-workspace"><header class="ww-header"><h1>${h(world.name)}</h1><div class="ww-world-actions"><label class="ww-agent-select">Agent<select data-ww-select="agent"><option value="" disabled>Choose agent</option>${agents.map((a) => `<option value="${h(a.id)}" ${a.id === agentId ? "selected" : ""}>${h(agentLabel(a, agents))}</option>`).join("")}</select></label><button type="button" data-ww="configure">Configure</button>${selected ? options.runActions?.(selected.id) ?? button("Run tasks", "run-saved-test", selected.id, "primary") : ""}</div></header><p class="ww-error" role="alert" ${error ? "" : "hidden"}>${h(error)}</p>${errors.map((e) => `<p class="ww-error" role="alert">${h(e.message)}</p>`).join("")}${!loaded ? '<p role="status">Loading tasks\u2026</p>' : ""}${choices.length > 1 ? `<label class="ww-setup-select">Configuration<select data-ww-select="test">${!selected ? '<option value="" selected disabled>New configuration</option>' : ""}${choices.map((t) => `<option value="${h(t.id)}" ${t.id === selected?.id ? "selected" : ""}>${h(t.name)}</option>`).join("")}</select></label>` : ""}${loaded && configure ? configuration2() : loaded ? `${summaryWidgets(attempts, hasChecks(run?.tasks ?? tasks))}<div class="ww-section-heading"><h2>Tasks${tasks.length ? ` <span class="ww-task-count">${tasks.length}</span>` : ""}</h2><div class="actions">${worldHistory(runs, world.id, agentId || void 0).length || selected ? `<button type="button" data-ww="history" aria-expanded="${showHistory}">History</button>` : ""}<button type="button" data-ww="configure">${tasks.length ? "Edit tasks" : "Add tasks"}</button></div></div>${tasks.length ? `<section class="ww-task-table"><div class="ww-table-head"><span>Task</span><span>Result</span><span>Attempts</span><span>Median</span><span></span></div>${tasks.map((task, index) => {
1168
- const list2 = attempts.filter((a) => a.taskId === task.id), taskURL = run ? `/playgrounds/${enc(run.id)}?task=${enc(task.id)}${list2[0] ? "&attempt=" + enc(list2[0].id) : ""}` : "";
1367
+ node.innerHTML = `<div class="ww-workspace"><header class="ww-header"><h1>${h(world.name)}</h1><div class="ww-world-actions"><label class="ww-agent-select">Agent<select data-ww-select="agent"><option value="" disabled>Choose agent</option>${agents.map((a) => `<option value="${h(a.id)}" ${a.id === agentId ? "selected" : ""}>${h(agentLabel(a, agents))}</option>`).join("")}</select></label><button type="button" data-ww="configure">Configure</button>${selected ? options.runActions?.(selected.id) ?? button("Run tasks", "run-saved-test", selected.id, "primary") : ""}</div></header>${peopleSection(world)}<p class="ww-error" role="alert" ${error ? "" : "hidden"}>${h(error)}</p>${errors.map((e) => `<p class="ww-error" role="alert">${h(e.message)}</p>`).join("")}${!loaded ? '<p role="status">Loading tasks\u2026</p>' : ""}${choices.length > 1 ? `<label class="ww-setup-select">Configuration<select data-ww-select="test">${!selected ? '<option value="" selected disabled>New configuration</option>' : ""}${choices.map((t) => `<option value="${h(t.id)}" ${t.id === selected?.id ? "selected" : ""}>${h(t.name)}</option>`).join("")}</select></label>` : ""}${loaded && configure ? configuration2() : loaded ? `${summaryWidgets(attempts, hasChecks(run?.tasks ?? tasks))}<div class="ww-section-heading"><h2>Tasks${tasks.length ? ` <span class="ww-task-count">${tasks.length}</span>` : ""}</h2><div class="actions">${worldHistory(runs, world.id, agentId || void 0).length || selected ? `<button type="button" data-ww="history" aria-expanded="${showHistory}">History</button>` : ""}<button type="button" data-ww="configure">${tasks.length ? "Edit tasks" : "Add tasks"}</button></div></div>${tasks.length ? `<section class="ww-task-table"><div class="ww-table-head"><span>Task</span><span>Result</span><span>Attempts</span><span>Median</span><span></span></div>${tasks.map((task, index) => {
1368
+ const list3 = attempts.filter((a) => a.taskId === task.id), taskURL = run ? `/playgrounds/${enc(run.id)}?task=${enc(task.id)}${list3[0] ? "&attempt=" + enc(list3[0].id) : ""}` : "";
1169
1369
  return `<article class="ww-task-row"><div class="ww-task-identity">${taskURL ? `<a data-nav class="ww-task-name" href="${taskURL}"><span class="ww-ordinal">${index + 1}</span><strong>${h(label(task, index))}</strong></a>` : `<strong class="ww-task-name"><span class="ww-ordinal">${index + 1}</span>${h(label(task, index))}</strong>`}<p class="ww-task-prompt" title="${h(task.prompt)}">${h(task.prompt)}</p></div>${(() => {
1170
- const o = taskOutcome(list2, hasChecks([task]));
1370
+ const o = taskOutcome(list3, hasChecks([task]));
1171
1371
  return `<div class="ww-rate ${o.tone}"><strong>${h(o.value)}</strong><span>${h(o.note)}</span></div>`;
1172
- })()}<div class="ww-attempt-marks" role="group" aria-label="Attempts for ${h(label(task, index))}">${list2.map((a) => {
1372
+ })()}<div class="ww-attempt-marks" role="group" aria-label="Attempts for ${h(label(task, index))}">${list3.map((a) => {
1173
1373
  const o = attemptOutcome(a);
1174
1374
  return `<a data-nav class="ww-attempt-mark ${h(a.status)} outcome-${o.key}" href="/playgrounds/${enc(run.id)}?task=${enc(task.id)}&attempt=${enc(a.id)}" title="Attempt ${a.number}: ${h(attemptLabel(a.status))} \xB7 ${o.label}" aria-label="Attempt ${a.number}: ${h(attemptLabel(a.status))} \xB7 ${o.label}">${attemptMark(a)}</a>`;
1175
- }).join("") || `<span class="muted">Repeat ${h(task.attempts)} times</span>`}</div><span class="ww-task-time">${list2.length ? h(medianTime(list2)) : ""}</span>${taskURL ? `<a data-nav class="ww-row-inspect" href="${taskURL}" aria-label="Inspect ${h(label(task, index))}">\u2192</a>` : "<span></span>"}</article>`;
1375
+ }).join("") || `<span class="muted">Repeat ${h(task.attempts)} times</span>`}</div><span class="ww-task-time">${list3.length ? h(medianTime(list3)) : ""}</span>${taskURL ? `<a data-nav class="ww-row-inspect" href="${taskURL}" aria-label="Inspect ${h(label(task, index))}">\u2192</a>` : "<span></span>"}</article>`;
1176
1376
  }).join("")}</section>` : `<div class="quiet-empty">${agents.length ? "Add tasks to this world." : '<a data-nav href="/agents">Connect an agent</a>'}</div>`}${selected && !currentRuns.length && setupHistory(runs, selected).some((item) => item.earlier) ? '<p class="ww-snapshot-notice">This configuration has changed. Earlier attempts are in History.</p>' : ""}${showHistory ? history2() : ""}` : ""}</div>`;
1177
1377
  }
1178
1378
  function history2() {
@@ -1291,16 +1491,16 @@ function mountWorldWorkspace(node, options) {
1291
1491
  error = "";
1292
1492
  render();
1293
1493
  const d = getDraft(), oldKey = key();
1294
- let body;
1494
+ let body2;
1295
1495
  try {
1296
- body = workspaceDefinition(d);
1496
+ body2 = workspaceDefinition(d);
1297
1497
  } catch (e) {
1298
1498
  error = e instanceof Error ? e.message : String(e);
1299
1499
  saving = false;
1300
1500
  render();
1301
1501
  return;
1302
1502
  }
1303
- void api2(selected ? `/playground-tests/${enc(selected.id)}/update` : "/playground-tests", { ...body, ...selected ? { revision: d.revision } : {} }).then((saved) => {
1503
+ void api2(selected ? `/playground-tests/${enc(selected.id)}/update` : "/playground-tests", { ...body2, ...selected ? { revision: d.revision } : {} }).then((saved) => {
1304
1504
  sessionStorage.removeItem(oldKey);
1305
1505
  if (!disposed) go2(href2(saved, saved.agentId));
1306
1506
  }).catch((e) => {
@@ -1319,6 +1519,27 @@ function mountWorldWorkspace(node, options) {
1319
1519
  };
1320
1520
  }
1321
1521
 
1522
+ // frontend/src/workspace-view.ts
1523
+ var VIEW_SECTIONS = /* @__PURE__ */ new Set(["playgrounds", "settings", "help"]);
1524
+ var viewMode = (boot2) => boot2.mode === "view";
1525
+ function hoursLabel(value) {
1526
+ const n = Number(value) || 0, scale = n >= 10 ? 10 : 100;
1527
+ return `${String(Math.round(n * scale) / scale)} hosted ${n === 1 ? "hour" : "hours"}`;
1528
+ }
1529
+ function viewBanner(boot2, now = /* @__PURE__ */ new Date()) {
1530
+ const machine = boot2.machine ?? {};
1531
+ if (machine.state === "starting") return '<section class="view-banner" role="status"><span class="status-spinner" aria-hidden="true"></span><div><strong>Your workspace is starting\u2026</strong><p>Worlds, agents and tools open here when it is up. This page reloads by itself.</p></div></section>';
1532
+ if (machine.state === "capped") {
1533
+ const month = now.toLocaleString("en-US", { month: "long", timeZone: "UTC" }), ask = boot2.hosted?.execution === false;
1534
+ return `<section class="view-banner" role="status"><div><strong>Hosted hours used for ${h(month)}</strong><p>This workspace used its ${h(hoursLabel(machine.hoursCap))} for ${h(month)}. Your data is kept; the workspace wakes again on the 1st. Keep working with <code>ancha run</code> on your computer${ask ? ', or <a href="/account#hosted">request hosted access</a>' : ""}.</p></div></section>`;
1535
+ }
1536
+ const asleep = machine.state === "absent" ? "Your workspace hasn\u2019t started yet." : "Your workspace is asleep.";
1537
+ return `<section class="view-banner" role="status"><div><strong>${asleep}</strong><p>Runs you upload are here. Worlds, agents and tools need the workspace running.</p></div>${machine.canStart ? button("Start workspace", "start-workspace", "", "primary") : '<p class="muted">This workspace is read-only right now.</p>'}</section>`;
1538
+ }
1539
+ function viewStartPage(boot2) {
1540
+ return `${viewBanner(boot2)}<p class="view-note">Runs you upload stay readable while the workspace sleeps: <a href="/playgrounds" data-nav>see your runs</a>.</p>`;
1541
+ }
1542
+
1322
1543
  // frontend/src/heartbeat.ts
1323
1544
  var backgroundHeader = { "x-ancha-background": "1" };
1324
1545
  function startHeartbeat(ping, options = {}) {
@@ -1329,7 +1550,7 @@ function startHeartbeat(ping, options = {}) {
1329
1550
  }
1330
1551
 
1331
1552
  // frontend/src/generated/coding-agent-skill.ts
1332
- var codingAgentSkill = "---\nname: ancha\ndescription: Test, debug and fix an AI agent (a Slack bot, a support or on-call agent) against stateful replicas of the tools it uses, and prove a fix with graded runs. Use when asked to test an agent with Ancha, or in a repository that has ancha.yaml.\n---\n\n# Ancha\n\nAncha gives an AI agent the other side of its job: stateful replicas of the tools it uses (Slack, GitHub, Datadog, PagerDuty and more), seeded with one fictional company, and checks that grade every attempt from the agent's calls and the world's end state. The verdict comes from the world, not from mocks you wrote yourself.\n\n## Run the CLI\n\nBefore the CLI is installed, run every command as `npx -y @ancha-labs/cli <command>`. After `npm install -g @ancha-labs/cli` (Node 24 or newer), run `ancha <command>`. Never run `npx` with the bare name `ancha`: that npm name is not this package.\n\nAdd `--json` to every command. Runs print NDJSON events that end with `run_finished`; everything else prints one JSON object. `ancha schema <kind> --json` prints the JSON Schema of `ancha.yaml`, scene files and these outputs. If your command can time out, give `ancha run` an `--idempotency-key <key>`: running it again with the same key returns the same run instead of starting another.\n\n## The loop\n\n1. `ancha init --agent \"<the command that starts the agent>\"`, once, in the agent's project, if it has no `ancha.yaml` yet. It writes `ancha.yaml`, `scenes/starter/`, the coding-agent skill, and `.ancha/` in `.gitignore`. It installs and runs nothing.\n2. `ancha doctor --json` checks the config and scenes and runs the agent once. A tool the agent didn't call is a warning, not a failure.\n3. `ancha run --json` runs every scene in fresh worlds. Exit 1 means a check failed.\n4. `ancha explain latest --json` shows each failed check: what was expected, what happened, and the calls and world events behind it. Read it before guessing from the code; many bugs only show up with the world's data and timing.\n5. `ancha baseline save before` keeps the failing run as the reference.\n6. Fix the agent's code.\n7. `ancha run --compare before --json` proves the fix: exit 0 means every check passes and nothing regressed.\n\nThe starter scene only proves that the agent reaches each tool. Write scenes for its real job: `ancha docs scenes`.\n\n## The rule\n\nFix the agent, not `ancha.yaml`, the scenes or their checks. The exception is a check that is wrong for the real API, such as a method the official SDK never sends. Then don't quietly edit it: tell the user, show the evidence (the call from `ancha explain`, the vendor's documentation), and change it only with their agreement.\n\nNever give the agent under test the scenes, checks, seeds or reference companions (`oracle.mjs`, `null.mjs`), and never point it at a real SaaS API.\n\n## What the agent gets\n\nEach trial gives the agent its tools as environment variables, with fake credentials that only work against the replicas:\n\n- Slack: `SLACK_API_URL` (ends in `/api/`), `SLACK_BOT_TOKEN`\n- GitHub: `GITHUB_API_URL`, `GITHUB_TOKEN`\n- Datadog: `DATADOG_API_URL`, `DD_API_KEY`, `DD_APP_KEY`\n- PagerDuty: `PAGERDUTY_API_URL`, `PAGERDUTY_API_TOKEN`, `PAGERDUTY_FROM_EMAIL`, `PAGERDUTY_ROUTING_KEY`\n- the same pattern for the other tools in the world; `ANCHA_TASK` carries a command-line task.\n\n`ancha connect <tool> --lang ts|py` prints the SDK settings. `ancha twins coverage <tool>` lists the endpoints each replica implements.\n\n`ancha run` starts the agent on this computer. It has this computer's network, and an environment limited to Ancha's variables, the tools' variables and the names allowed in `agent.pass_env` in `ancha.yaml` (or `--pass-env NAME`). For a sealed run, set `agent.execution: { mode: container, image: node:24-slim }` in `ancha.yaml`; it needs Docker.\n\n## Hosted workspace\n\nIf the user has an Ancha workspace, `ancha login` asks them to approve this computer once in the browser; ask them to do it. After that, `ancha run` creates its worlds in their workspace while the agent still runs here: the first line of a run, and `workspace` in its JSON, say so. `ancha whoami --json` shows which workspace commands use, and `--local` keeps a command on this computer. In CI, `ANCHA_SERVER_URL` and `ANCHA_API_KEY` replace the login. `ancha secrets set NAME` copies a provider key from this shell into the workspace for agents that run there.\n\nRunning the agent itself in the cloud is a console flow at https://app.ancha.io: Bring your agent, Connect, tasks with checks, Run. Send the user there for it.\n\n## When something fails\n\n- Exit 1: a check failed or the comparison regressed (a single check's drop counts, see `comparison.droppedChecks`). Run `ancha explain latest --json`.\n- Exit 2: usage, config, scene or authentication error. `AUTH_INVALID` means `ancha login` again or a valid `ANCHA_API_KEY`. Read the `hint`.\n- Exit 3: infrastructure, or a trial the harness couldn't complete. That's not the agent's fault; run again, and `ancha doctor --json` if it repeats.\n- Exit 4, only with `--strict`: the agent called an endpoint a replica doesn't implement. `ancha explain` lists these coverage gaps even without `--strict`; check `ancha twins coverage <tool>` before changing the agent.\n\nEvery error has a stable `code` and a `hint` that names the next command. More: `ancha docs`, `ancha docs <topic>` for setup, run, explain, compare, scenes, integrations, cloud and playgrounds, and https://ancha.mintlify.app/coding-agents.\n\nTell the user what you ran, the pass rate and the evidence. Never claim a fix until `ancha run --compare` exits 0.\n";
1553
+ var codingAgentSkill = "---\nname: ancha\ndescription: Test, debug and fix an AI agent (a Slack bot, a support or on-call agent) against stateful replicas of the tools it uses, and prove a fix with graded runs. Use when asked to test an agent with Ancha, or in a repository that has ancha.yaml.\n---\n\n# Ancha\n\nAncha gives an AI agent the other side of its job: stateful replicas of the tools it uses (Slack, GitHub, Datadog, PagerDuty and more), seeded with one fictional company, and checks that grade every attempt from the agent's calls and the world's end state. The verdict comes from the world, not from mocks you wrote yourself.\n\n## Run the CLI\n\nBefore the CLI is installed, run every command as `npx -y @ancha-labs/cli <command>`. After `npm install -g @ancha-labs/cli` (Node 24 or newer), run `ancha <command>`. Never run `npx` with the bare name `ancha`: that npm name is not this package.\n\nAdd `--json` to every command. Runs print NDJSON events that end with `run_finished`; everything else prints one JSON object. `ancha schema <kind> --json` prints the JSON Schema of `ancha.yaml`, scene files and these outputs. If your command can time out, give `ancha run` an `--idempotency-key <key>`: running it again with the same key returns the same run instead of starting another.\n\n## The loop\n\n1. `ancha init --agent \"<the command that starts the agent>\"`, once, in the agent's project, if it has no `ancha.yaml` yet. It writes `ancha.yaml`, `scenes/starter/`, the coding-agent skill, and `.ancha/` in `.gitignore`. It installs and runs nothing.\n2. `ancha doctor --json` checks the config and scenes and runs the agent once. A tool the agent didn't call is a warning, not a failure.\n3. `ancha run --json` runs every scene in fresh worlds. Exit 1 means a check failed.\n4. `ancha explain latest --json` shows each failed check: what was expected, what happened, and the calls and world events behind it. Read it before guessing from the code; many bugs only show up with the world's data and timing.\n5. `ancha baseline save before` keeps the failing run as the reference.\n6. Fix the agent's code.\n7. `ancha run --compare before --json` proves the fix: exit 0 means every check passes and nothing regressed.\n\nThe starter scene only proves that the agent reaches each tool. Write scenes for its real job: `ancha docs scenes`.\n\n## The rule\n\nFix the agent, not `ancha.yaml`, the scenes or their checks. The exception is a check that is wrong for the real API, such as a method the official SDK never sends. Then don't quietly edit it: tell the user, show the evidence (the call from `ancha explain`, the vendor's documentation), and change it only with their agreement.\n\nNever give the agent under test the scenes, checks, seeds or reference companions (`oracle.mjs`, `null.mjs`), and never point it at a real SaaS API.\n\n## What the agent gets\n\nEach trial gives the agent its tools as environment variables, with fake credentials that only work against the replicas:\n\n- Slack: `SLACK_API_URL` (ends in `/api/`), `SLACK_BOT_TOKEN`\n- GitHub: `GITHUB_API_URL`, `GITHUB_TOKEN`\n- Datadog: `DATADOG_API_URL`, `DD_API_KEY`, `DD_APP_KEY`\n- PagerDuty: `PAGERDUTY_API_URL`, `PAGERDUTY_API_TOKEN`, `PAGERDUTY_FROM_EMAIL`, `PAGERDUTY_ROUTING_KEY`\n- the same pattern for the other tools in the world; `ANCHA_TASK` carries a command-line task.\n\n`ancha connect <tool> --lang ts|py` prints the SDK settings. `ancha twins coverage <tool>` lists the endpoints each replica implements.\n\n`ancha run` starts the agent on this computer. It has this computer's network, and an environment limited to Ancha's variables, the tools' variables and the names allowed in `agent.pass_env` in `ancha.yaml` (or `--pass-env NAME`). For a sealed run, set `agent.execution: { mode: container, image: node:24-slim }` in `ancha.yaml`; it needs Docker.\n\n## Hosted workspace\n\nIf the user has an Ancha workspace, `ancha login` asks them to approve this computer once in the browser; ask them to do it. After that, `ancha run` still runs its worlds on this computer; `ancha run --upload --json` sends the finished run to their workspace, where the console shows it (`upload.url` in the JSON). `ancha whoami --json` shows the workspace and where runs put their worlds. In CI, `ANCHA_SERVER_URL` and `ANCHA_API_KEY` replace the login: `ancha run --local --upload --json`. `ancha secrets set NAME` copies a provider key from this shell into the workspace for agents that run there.\n\nRunning the agent itself in the cloud is a console flow at https://app.ancha.io: Bring your agent, Connect, tasks with checks, Run. Send the user there for it.\n\n## When something fails\n\n- Exit 1: a check failed or the comparison regressed (a single check's drop counts, see `comparison.droppedChecks`). Run `ancha explain latest --json`.\n- Exit 2: usage, config, scene or authentication error. `AUTH_INVALID` means `ancha login` again or a valid `ANCHA_API_KEY`. Read the `hint`.\n- Exit 3: infrastructure, or a trial the harness couldn't complete. That's not the agent's fault; run again, and `ancha doctor --json` if it repeats.\n- Exit 4, only with `--strict`: the agent called an endpoint a replica doesn't implement. `ancha explain` lists these coverage gaps even without `--strict`; check `ancha twins coverage <tool>` before changing the agent.\n\nEvery error has a stable `code` and a `hint` that names the next command. More: `ancha docs`, `ancha docs <topic>` for setup, run, explain, compare, scenes, integrations, cloud and playgrounds, and https://ancha.mintlify.app/coding-agents.\n\nTell the user what you ran, the pass rate and the evidence. Never claim a fix until `ancha run --compare` exits 0.\n";
1333
1554
 
1334
1555
  // frontend/src/workspace-pages.ts
1335
1556
  var startSentence = "Test our agent with Ancha. Start with: npx -y @ancha-labs/cli init, then read https://app.ancha.io/llms.txt";
@@ -1397,9 +1618,9 @@ function testDefinition(draft, agentId) {
1397
1618
  return { name: draft.name, agentId, worldId: draft.worldId, worldRevision: draft.worldRevision, tasks: draft.tasks, concurrency: draft.concurrency, seed: draft.seed ?? "playground-1" };
1398
1619
  }
1399
1620
  async function persistTestDraft(draft, agentId, api2, remember) {
1400
- const body = testDefinition(draft, agentId), signature = JSON.stringify(body), previous = draft.savedTest;
1621
+ const body2 = testDefinition(draft, agentId), signature = JSON.stringify(body2), previous = draft.savedTest;
1401
1622
  if (previous?.signature === signature) return previous;
1402
- const saved = await api2(previous ? `/playground-tests/${previous.id}/update` : "/playground-tests", { ...body, ...previous ? { revision: previous.revision } : {} });
1623
+ const saved = await api2(previous ? `/playground-tests/${previous.id}/update` : "/playground-tests", { ...body2, ...previous ? { revision: previous.revision } : {} });
1403
1624
  draft.savedTest = { id: saved.id, revision: saved.revision, signature };
1404
1625
  remember();
1405
1626
  return draft.savedTest;
@@ -1436,7 +1657,7 @@ function mountTestFlow(node, options) {
1436
1657
  draft.name = form.elements.namedItem("name").value;
1437
1658
  draft.concurrency = Number(form.elements.namedItem("concurrency").value);
1438
1659
  const kept = new Map((draft.tasks ?? []).map((t) => [t.id, t]));
1439
- draft.tasks = [...form.querySelectorAll(".task-editor")].map((row) => ({ ...kept.get(row.dataset.taskId) ?? {}, id: row.dataset.taskId, prompt: row.querySelector("[name=prompt]").value, attempts: Number(row.querySelector("[name=attempts]").value), timeoutMs: Math.round(Number(row.querySelector("[name=minutes]").value) * 6e4) }));
1660
+ draft.tasks = [...form.querySelectorAll(".task-editor")].map((row2) => ({ ...kept.get(row2.dataset.taskId) ?? {}, id: row2.dataset.taskId, prompt: row2.querySelector("[name=prompt]").value, attempts: Number(row2.querySelector("[name=attempts]").value), timeoutMs: Math.round(Number(row2.querySelector("[name=minutes]").value) * 6e4) }));
1440
1661
  }
1441
1662
  remember();
1442
1663
  }
@@ -1701,7 +1922,7 @@ function mountGroupFlow(node, options) {
1701
1922
  draft.worldRevision = world?.revision ?? 0;
1702
1923
  draft.concurrency = Number(values.get("concurrency") ?? 1);
1703
1924
  const kept = new Map((draft.tasks ?? []).map((t) => [t.id, t]));
1704
- draft.tasks = [...form.querySelectorAll(".task-editor")].map((row) => ({ ...kept.get(row.dataset.taskId) ?? {}, id: row.dataset.taskId, prompt: row.querySelector("[name=prompt]").value, attempts: Number(row.querySelector("[name=attempts]").value), timeoutMs: Math.round(Number(row.querySelector("[name=minutes]").value) * 6e4) }));
1925
+ draft.tasks = [...form.querySelectorAll(".task-editor")].map((row2) => ({ ...kept.get(row2.dataset.taskId) ?? {}, id: row2.dataset.taskId, prompt: row2.querySelector("[name=prompt]").value, attempts: Number(row2.querySelector("[name=attempts]").value), timeoutMs: Math.round(Number(row2.querySelector("[name=minutes]").value) * 6e4) }));
1705
1926
  remember();
1706
1927
  }
1707
1928
  function showError(message) {
@@ -1749,10 +1970,10 @@ function mountGroupFlow(node, options) {
1749
1970
  draft.pendingSubmission = request;
1750
1971
  remember();
1751
1972
  }
1752
- const result = await options.api("/playgrounds/groups", draft.pendingSubmission);
1973
+ const result2 = await options.api("/playgrounds/groups", draft.pendingSubmission);
1753
1974
  sessionStorage.removeItem(key);
1754
1975
  accepted = true;
1755
- options.go("/playgrounds/" + encodeURIComponent(result.id));
1976
+ options.go("/playgrounds/" + encodeURIComponent(result2.id));
1756
1977
  } catch (e) {
1757
1978
  if (groupSubmissionWasRejected(e)) {
1758
1979
  delete draft.pendingSubmission;
@@ -1826,7 +2047,15 @@ var connectionFields = {
1826
2047
  dropbox: ["DROPBOX_API_URL", "DROPBOX_ACCESS_TOKEN"],
1827
2048
  resend: ["RESEND_BASE_URL", "RESEND_API_KEY"],
1828
2049
  "microsoft-word": ["MICROSOFT_GRAPH_API_URL", "MICROSOFT_GRAPH_ACCESS_TOKEN"],
1829
- shopify: ["SHOPIFY_API_URL", "SHOPIFY_ACCESS_TOKEN", "SHOPIFY_API_VERSION"]
2050
+ shopify: ["SHOPIFY_API_URL", "SHOPIFY_ACCESS_TOKEN", "SHOPIFY_API_VERSION"],
2051
+ lob: ["LOB_API_URL", "LOB_API_KEY", "LOB_ASSETS_URL"],
2052
+ paypal: ["PAYPAL_API_URL", "PAYPAL_CLIENT_ID", "PAYPAL_CLIENT_SECRET"],
2053
+ jira: ["JIRA_BASE_URL", "JIRA_EMAIL", "JIRA_API_TOKEN"],
2054
+ kalshi: ["KALSHI_API_URL", "KALSHI_API_KEY_ID", "KALSHI_PRIVATE_KEY"],
2055
+ intercom: ["INTERCOM_API_URL", "INTERCOM_ACCESS_TOKEN"],
2056
+ zendesk: ["ZENDESK_API_URL", "ZENDESK_EMAIL", "ZENDESK_API_TOKEN"],
2057
+ "google-calendar": ["GOOGLE_CALENDAR_API_URL", "GOOGLE_CALENDAR_ACCESS_TOKEN"],
2058
+ twilio: ["TWILIO_API_URL", "TWILIO_ACCOUNT_SID", "TWILIO_AUTH_TOKEN"]
1830
2059
  };
1831
2060
  var connectionNote = {
1832
2061
  "amazon-s3": "The AWS SDKs read all four variables themselves. Set forcePathStyle: true when the endpoint is a host name.",
@@ -1835,12 +2064,20 @@ var connectionNote = {
1835
2064
  notion: "new Client({ auth: NOTION_TOKEN, baseUrl: NOTION_API_URL }) from @notionhq/client; the SDK adds /v1 itself.",
1836
2065
  attio: "Send each request to ATTIO_API_URL plus its /v2 path, with Authorization: Bearer ATTIO_API_KEY.",
1837
2066
  resend: "The Resend SDK reads RESEND_BASE_URL itself: new Resend(RESEND_API_KEY).",
2067
+ lob: "new Configuration({ username: LOB_API_KEY, basePath: LOB_API_URL }); fetch proof links under LOB_ASSETS_URL.",
2068
+ paypal: "Get a token at PAYPAL_API_URL/v1/oauth2/token with PAYPAL_CLIENT_ID and PAYPAL_CLIENT_SECRET, then call PAYPAL_API_URL; the server SDK needs an axios adapter that swaps PayPal\u2019s host for it.",
2069
+ jira: "Call JIRA_BASE_URL/rest/api/3/\u2026 with HTTP Basic auth: JIRA_EMAIL and JIRA_API_TOKEN.",
2070
+ kalshi: "new Configuration({ basePath: KALSHI_API_URL, apiKey: KALSHI_API_KEY_ID, privateKeyPem: KALSHI_PRIVATE_KEY }); requests are signed as on Kalshi.",
2071
+ zendesk: "Send ZENDESK_EMAIL/token:ZENDESK_API_TOKEN as Basic auth to ZENDESK_API_URL plus the path (it ends in /api/v2).",
2072
+ "google-calendar": 'calendar({ version: "v3", auth }) with GOOGLE_CALENDAR_ACCESS_TOKEN as the OAuth access token, and GOOGLE_CALENDAR_API_URL + "/" as each request\u2019s rootUrl.',
2073
+ twilio: "twilio(TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, { httpClient }), where the httpClient sends https://api.twilio.com to TWILIO_API_URL, and Verify and Lookup to TWILIO_API_URL plus /verify and /lookups.",
2074
+ intercom: "new IntercomClient({ token: INTERCOM_ACCESS_TOKEN, baseUrl: INTERCOM_API_URL }).",
1838
2075
  shopify: "createAdminApiClient({ storeDomain, apiVersion: SHOPIFY_API_VERSION, accessToken: SHOPIFY_ACCESS_TOKEN, customFetchApi }), where customFetchApi swaps https://<store>.myshopify.com for SHOPIFY_API_URL.",
1839
2076
  "microsoft-word": 'Client.init({ baseUrl: MICROSOFT_GRAPH_API_URL + "/", authProvider, fetchOptions: { headers: { authorization: "Bearer " + MICROSOFT_GRAPH_ACCESS_TOKEN } } }).',
1840
2077
  dropbox: "new Dropbox({ accessToken: DROPBOX_ACCESS_TOKEN, fetch }), where fetch replaces https://api.dropboxapi.com and https://content.dropboxapi.com with DROPBOX_API_URL before sending.",
1841
2078
  "better-stack": "There is no official Uptime SDK: send each request to BETTER_STACK_API_URL plus its /api/v2 or /api/v3 path, with Authorization: Bearer BETTER_STACK_API_TOKEN."
1842
2079
  };
1843
- var awsLabels = { AWS_ENDPOINT_URL_S3: "Endpoint URL", AWS_ACCESS_KEY_ID: "Access key ID", AWS_SECRET_ACCESS_KEY: "Secret access key", AWS_REGION: "Region", OKTA_ORG_URL: "Org URL", OKTA_API_TOKEN: "API token", STRIPE_SECRET_KEY: "Secret key", CLERK_SECRET_KEY: "Secret key", BETTER_STACK_API_TOKEN: "API token", NOTION_TOKEN: "Integration token", SHOPIFY_API_VERSION: "API version" };
2080
+ var awsLabels = { AWS_ENDPOINT_URL_S3: "Endpoint URL", AWS_ACCESS_KEY_ID: "Access key ID", AWS_SECRET_ACCESS_KEY: "Secret access key", AWS_REGION: "Region", OKTA_ORG_URL: "Org URL", OKTA_API_TOKEN: "API token", STRIPE_SECRET_KEY: "Secret key", CLERK_SECRET_KEY: "Secret key", BETTER_STACK_API_TOKEN: "API token", NOTION_TOKEN: "Integration token", SHOPIFY_API_VERSION: "API version", LOB_ASSETS_URL: "Assets URL", PAYPAL_CLIENT_ID: "Client ID", PAYPAL_CLIENT_SECRET: "Client secret", JIRA_BASE_URL: "Site URL", JIRA_EMAIL: "Email", JIRA_API_TOKEN: "API token", KALSHI_API_KEY_ID: "API key ID", KALSHI_PRIVATE_KEY: "Private key", ZENDESK_EMAIL: "Email", ZENDESK_API_TOKEN: "API token", TWILIO_ACCOUNT_SID: "Account SID", TWILIO_AUTH_TOKEN: "Auth token" };
1844
2081
  var fields = connectionFields;
1845
2082
  var connectionLabel = (key) => awsLabels[key] ?? (key.endsWith("URL") ? "API URL" : key.endsWith("ENDPOINT") ? "gRPC endpoint" : key.endsWith("FROM_EMAIL") ? "Caller email" : key === "DD_APP_KEY" ? "Application key" : key === "GONG_ACCESS_KEY" ? "Access key" : key.endsWith("SECRET") ? "Access key secret" : key.endsWith("API_KEY") ? "API key" : "Access token");
1846
2083
  function connectionsView(info, mode, tool) {
@@ -1859,11 +2096,11 @@ function connectionStatus(verification) {
1859
2096
  const status = verification.status;
1860
2097
  return badge(status === "connected" || status === "verified" ? "Connected" : status === "running" ? "Connecting" : status === "failed" ? "Connection failed" : status === "stale" ? "Needs recheck" : "Not checked", status === "connected" || status === "verified" ? "good" : status === "failed" ? "bad" : "warn");
1861
2098
  }
1862
- function agentList(agents) {
2099
+ function agentList(agents, instead) {
1863
2100
  return agents.length ? `<div class="agent-card-grid">${agents.map((a) => {
1864
2101
  const initials = String(a.name).trim().split(/\s+/).slice(0, 2).map((word) => Array.from(word)[0] ?? "").join("").toUpperCase();
1865
2102
  return `<a class="agent-card" data-nav href="/agents/${encodeURIComponent(a.id)}"><span class="agent-monogram" aria-hidden="true">${h(initials)}</span><h2>${h(a.name)}</h2>${a.provider?.model ? `<p class="agent-card-model">${h(a.provider.model)}</p>` : ""}<span class="agent-card-footer">Open agent <span aria-hidden="true">\u2197</span></span></a>`;
1866
- }).join("")}</div>` : `<section class="empty first-use agent-empty"><h2>No agents yet</h2><p>Choose your local project to get started.</p>${button("Connect agent", "add-agent", "", "primary")}</section>`;
2103
+ }).join("")}</div>` : `<section class="empty first-use agent-empty"><h2>No agents yet</h2>${instead ?? `<p>Choose your local project to get started.</p>${button("Connect agent", "add-agent", "", "primary")}`}</section>`;
1867
2104
  }
1868
2105
  function scenarioList(scenes) {
1869
2106
  return `<div class="scenario-list">${scenes.map((s) => `<a class="scenario-row" href="/scenarios/${encodeURIComponent(s.key)}" data-nav><div><h2>${h(title(s.scene))}</h2><p>${h(s.scene.twins.map(toolName).join(" \xB7 "))}</p></div>${s.origin === "draft" ? badge("Draft \xB7 unverified") : ""}<span aria-hidden="true">\u2192</span></a>`).join("")}</div>`;
@@ -1889,11 +2126,11 @@ function comparisonSetup(runId, runs) {
1889
2126
  if (!baselines.length) return '<div class="empty compact"><h3>No baseline yet</h3><p>Complete another run with the same scenarios and test data to compare results.</p></div>';
1890
2127
  return `<p class="hint">Choose a completed run with matching scenarios and test data.</p><form id="compare-form"><input type="hidden" name="current" value="${h(runId)}"><label>Baseline<select name="baseline" required>${baselines.map((r) => `<option value="${h(r.runId)}">${h(r.metadata?.label ?? "CLI test")} \xB7 ${h(r.runId)}</option>`).join("")}</select></label><button class="primary">Compare</button></form>`;
1891
2128
  }
1892
- function comparisonResults(result, labels) {
2129
+ function comparisonResults(result2, labels) {
1893
2130
  const percent2 = (rate) => `${(rate * 100).toLocaleString("en-US", { maximumFractionDigits: 1 })}%`;
1894
2131
  const change = (delta) => delta === 0 ? "No change" : Math.abs(delta * 100) < 0.1 ? `${delta > 0 ? "Increase" : "Decrease"} under 0.1 percentage points` : `${delta > 0 ? "+" : "\u2212"}${Math.abs(delta * 100).toLocaleString("en-US", { maximumFractionDigits: 1 })} percentage points`;
1895
2132
  const attempts = (count) => `${count} ${count === 1 ? "attempt" : "attempts"}`;
1896
- return `<p>${result.regressed ? "Pass rate decreased in one or more scenarios." : "No decrease in pass rate."}</p><div class="table-wrap comparison-table"><table><thead><tr><th scope="col">Scenario</th><th scope="col">Before</th><th scope="col">After</th><th scope="col">Change</th></tr></thead><tbody>${result.scenes.map((s, index) => `<tr><th scope="row">${h(labels[s.sceneId] ?? `Scenario ${index + 1}`)}</th><td><strong>${percent2(s.before)}</strong><span class="comparison-attempts">${attempts(s.beforeTrials)}</span></td><td><strong>${percent2(s.after)}</strong><span class="comparison-attempts">${attempts(s.afterTrials)}</span></td><td>${badge(change(s.delta), s.delta > 0 ? "good" : s.delta < 0 ? "bad" : "")}</td></tr>`).join("")}</tbody></table></div><p class="hint">Observed pass rates; no claim of statistical significance.</p>${details("Comparison details", result)}`;
2133
+ return `<p>${result2.regressed ? "Pass rate decreased in one or more scenarios." : "No decrease in pass rate."}</p><div class="table-wrap comparison-table"><table><thead><tr><th scope="col">Scenario</th><th scope="col">Before</th><th scope="col">After</th><th scope="col">Change</th></tr></thead><tbody>${result2.scenes.map((s, index) => `<tr><th scope="row">${h(labels[s.sceneId] ?? `Scenario ${index + 1}`)}</th><td><strong>${percent2(s.before)}</strong><span class="comparison-attempts">${attempts(s.beforeTrials)}</span></td><td><strong>${percent2(s.after)}</strong><span class="comparison-attempts">${attempts(s.afterTrials)}</span></td><td>${badge(change(s.delta), s.delta > 0 ? "good" : s.delta < 0 ? "bad" : "")}</td></tr>`).join("")}</tbody></table></div><p class="hint">Observed pass rates; no claim of statistical significance.</p>${details("Comparison details", result2)}`;
1897
2134
  }
1898
2135
  function dataSelection(item) {
1899
2136
  if (!item) return "";
@@ -2047,10 +2284,49 @@ async function api(path2, data, signal, background = false) {
2047
2284
  });
2048
2285
  connected = true;
2049
2286
  noteConnection(true);
2050
- const result = await res.json();
2051
- if (!res.ok) throw Object.assign(new Error(result.error ?? `Request failed (${res.status})`), { status: res.status, code: result.code, run: result.run });
2052
- return result;
2287
+ const result2 = await res.json();
2288
+ if (!res.ok) {
2289
+ const refusal = result2.error && typeof result2.error === "object" ? result2.error : void 0;
2290
+ const message = refusal ? [refusal.message, refusal.hint].map(sentence2).filter(Boolean).join(" ") : result2.error ?? `Request failed (${res.status})`;
2291
+ throw Object.assign(new Error(message), { status: res.status, code: refusal?.code ?? result2.code, run: result2.run });
2292
+ }
2293
+ return result2;
2053
2294
  }
2295
+ var sentence2 = (text2) => {
2296
+ const t = String(text2 ?? "").trim();
2297
+ return t && t[0].toUpperCase() + t.slice(1) + (/[.!?]$/.test(t) ? "" : ".");
2298
+ };
2299
+ var ownRunsOff = () => boot.hosted?.execution === false;
2300
+ var viewMode2 = () => viewMode(boot);
2301
+ var viewBanner2 = () => viewBanner(boot);
2302
+ var startTimer;
2303
+ function waitForWorkspace() {
2304
+ clearTimeout(startTimer);
2305
+ startTimer = setTimeout(async () => {
2306
+ try {
2307
+ const next = await (await fetch("/api/bootstrap", { headers: backgroundHeader })).json();
2308
+ if (next.mode !== "view") {
2309
+ location.reload();
2310
+ return;
2311
+ }
2312
+ if (next.machine?.state !== boot.machine?.state) {
2313
+ boot = { ...boot, machine: next.machine };
2314
+ void load();
2315
+ }
2316
+ } catch {
2317
+ }
2318
+ waitForWorkspace();
2319
+ }, 3e3);
2320
+ }
2321
+ async function startWorkspace() {
2322
+ const res = await fetch("/workspace/start", { method: "POST" }).catch(() => void 0);
2323
+ const result2 = await res?.json().catch(() => ({})) ?? {};
2324
+ if (!res || !res.ok && result2.state !== "capped") throw new Error(result2.error ?? "We could not start your workspace. Try again in a minute.");
2325
+ boot = { ...boot, machine: { ...boot.machine, state: result2.state === "capped" ? "capped" : "starting", ...result2.state === "capped" && { canStart: false } } };
2326
+ await load();
2327
+ if (result2.state !== "capped") waitForWorkspace();
2328
+ }
2329
+ var betaNote = () => '<p class="beta-note">Hosted runs of your own agent are in private beta for this workspace. Run <code>ancha run</code> on your computer, or <a href="/account#hosted">request access in Settings</a>.</p>';
2054
2330
  var poll = (path2) => api(path2, void 0, void 0, true);
2055
2331
  function path() {
2056
2332
  return location.pathname.split("/").filter(Boolean).map(decodeURIComponent);
@@ -2108,7 +2384,7 @@ function starterPanel(tool, q, base) {
2108
2384
  }
2109
2385
  function shell(section, content) {
2110
2386
  const nav2 = (items) => items.map(([id, name]) => `<a href="/${id}" data-nav class="nav-item ${section === id ? "active" : ""}" ${section === id ? 'aria-current="page"' : ""}>${name}</a>`).join("");
2111
- root.innerHTML = `<aside class="sidebar"><a href="/worlds" class="brand" data-nav>ancha</a><nav class="app-nav" aria-label="Main navigation">${nav2([["worlds", "Worlds"], ["agents", "Agents"], ["tools", "Tools"]])}</nav><div class="workspace"><span id="connection" class="connection warn" role="status"${failedProbes < 2 ? " hidden" : ""}>${failedProbes < 2 ? "" : "Can\u2019t reach the server. Retrying\u2026"}</span><a href="/help" data-nav>Help</a><a href="/settings" data-nav>Settings</a></div></aside><main id="main" tabindex="-1">${content}</main>`;
2387
+ root.innerHTML = `<aside class="sidebar"><a href="/${viewMode2() ? "playgrounds" : "worlds"}" class="brand" data-nav>ancha</a><nav class="app-nav" aria-label="Main navigation">${nav2(viewMode2() ? [["playgrounds", "Runs"]] : [["worlds", "Worlds"], ["agents", "Agents"], ["playgrounds", "Runs"], ["tools", "Tools"]])}</nav><div class="workspace"><span id="connection" class="connection warn" role="status"${failedProbes < 2 ? " hidden" : ""}>${failedProbes < 2 ? "" : "Can\u2019t reach the server. Retrying\u2026"}</span><a href="/help" data-nav>Help</a><a href="/settings" data-nav>Settings</a></div></aside><main id="main" tabindex="-1">${viewMode2() && VIEW_SECTIONS.has(section) ? viewBanner2() : ""}${content}</main>`;
2112
2388
  }
2113
2389
  function worldToolIcons(world) {
2114
2390
  const tools = [...new Set((world.configuration?.preset?.datasets ?? []).map((dataset) => dataset.tool))];
@@ -2135,11 +2411,24 @@ async function load() {
2135
2411
  try {
2136
2412
  if (!boot.csrf) {
2137
2413
  boot = await api("/bootstrap");
2138
- const tools = await api("/tools");
2139
- toolCatalog = tools.tools;
2140
- sandboxPresets = tools.presets ?? [];
2414
+ if (viewMode2()) {
2415
+ if (boot.machine?.state === "starting") waitForWorkspace();
2416
+ } else {
2417
+ const tools = await api("/tools");
2418
+ toolCatalog = tools.tools;
2419
+ sandboxPresets = tools.presets ?? [];
2420
+ }
2141
2421
  }
2142
2422
  if (thisGeneration !== generation) return;
2423
+ if (viewMode2() && !VIEW_SECTIONS.has(section)) {
2424
+ if (!p[0]) {
2425
+ go("/playgrounds");
2426
+ return;
2427
+ }
2428
+ const title2 = { worlds: "Worlds", agents: "Agents", tools: "Tools", sandboxes: "Sandboxes", scenarios: "Scenarios" }[section] ?? "Workspace";
2429
+ shell(section, head(title2) + viewStartPage(boot));
2430
+ return;
2431
+ }
2143
2432
  if (section === "agents") {
2144
2433
  const detail = p[1] ? Promise.all([api(`/playgrounds/configuration/${enc2(p[1])}`), api(`/playgrounds?agentId=${enc2(p[1])}`), api(`/playgrounds/readiness/${enc2(p[1])}`), api(`/runs?agent=${enc2(p[1])}&kind=test`), api(`/playground-tests?agentId=${enc2(p[1])}`), api("/worlds"), api(`/agents/${enc2(p[1])}/connect`)]) : void 0;
2145
2434
  detail?.catch(() => {
@@ -2171,11 +2460,11 @@ async function load() {
2171
2460
  renderAgents(p[1]);
2172
2461
  if (p[1]) pollAgent(p[1], thisGeneration);
2173
2462
  } else if (section === "help" || section === "settings") {
2174
- shell(section, head(section === "help" ? "Help" : "Settings") + (section === "help" ? helpPage() : boot.hosted ? `<section class="settings-page"><h2>Hosted workspace</h2><dl class="hosted-urls"><dt>Console</dt><dd><a href="${h(boot.hosted.console)}">${h(boot.hosted.console)}</a></dd><dt>World server</dt><dd><code>${h(boot.hosted.worldServer)}</code></dd></dl><p class="muted">For CI, set <code>ANCHA_SERVER_URL</code> to the world server and <code>ANCHA_API_KEY</code> to a key from <a href="/account">Account settings</a>. On your computer, <code>ancha login</code> sets both.</p></section>` : `<section class="settings-page"><h2>Local workspace</h2><p class="workspace-path">${h(boot.workspace)}</p><p class="muted">Agents, worlds, tests and results are saved here.</p></section>`));
2463
+ shell(section, head(section === "help" ? "Help" : "Settings") + (section === "help" ? helpPage() : boot.hosted ? `<section class="settings-page"><h2>Hosted workspace</h2><dl class="hosted-urls">${boot.hosted.tier ? `<dt>This workspace</dt><dd>${ownRunsOff() ? 'Free \xB7 <a href="/account#hosted">Request hosted runs</a>' : 'Hosted runs \xB7 <a href="/account#hosted">Machine time</a>'}</dd>` : ""}${boot.hosted.console ? `<dt>Console</dt><dd><a href="${h(boot.hosted.console)}">${h(boot.hosted.console)}</a></dd><dt>World server</dt><dd><code>${h(boot.hosted.worldServer)}</code></dd>` : ""}</dl><p class="muted">For CI, set <code>ANCHA_SERVER_URL</code> to the world server and <code>ANCHA_API_KEY</code> to a key from <a href="/account">Account settings</a>. On your computer, <code>ancha login</code> sets both.</p></section>` : `<section class="settings-page"><h2>Local workspace</h2><p class="workspace-path">${h(boot.workspace)}</p><p class="muted">Agents, worlds, tests and results are saved here.</p></section>`));
2175
2464
  } else if (section === "worlds") {
2176
- const [result, registry, definitions] = await Promise.all([api("/worlds"), api("/agents"), api("/playground-tests")]);
2465
+ const [result2, registry, definitions] = await Promise.all([api("/worlds"), api("/agents"), api("/playground-tests")]);
2177
2466
  if (thisGeneration !== generation) return;
2178
- worlds = result.worlds ?? [];
2467
+ worlds = result2.worlds ?? [];
2179
2468
  agentCatalog = registry.agents ?? [];
2180
2469
  savedPlaygroundTests = definitions.tests ?? [];
2181
2470
  for (const world of worlds) {
@@ -2215,7 +2504,12 @@ async function load() {
2215
2504
  if (thisGeneration !== generation) return;
2216
2505
  renderPlayground();
2217
2506
  pollPlayground(p[1], thisGeneration);
2218
- } else go("/worlds");
2507
+ } else if (section === "playgrounds") {
2508
+ const list3 = await api("/playgrounds?include=cli"), q = new URLSearchParams(location.search);
2509
+ if (thisGeneration !== generation) return;
2510
+ current = {};
2511
+ shell("playgrounds", head("Runs") + runsPage(list3.runs ?? [], { source: q.get("source") ?? void 0, target: q.get("target") ?? void 0, commit: q.get("commit") ?? void 0 }, viewMode2() ? { emptyHtml: "No runs yet. Run <code>ancha run --upload</code> in your project and the results appear here." } : {}));
2512
+ } else go(viewMode2() ? "/playgrounds" : "/worlds");
2219
2513
  } catch (e) {
2220
2514
  if (thisGeneration !== generation) return;
2221
2515
  shell(section, head("Unable to load this view", button("Try again", "reload"), e instanceof Error ? e.message : String(e)) + `<p><a href="/${section}" data-nav>Back to ${h(section)}</a></p>`);
@@ -2229,16 +2523,25 @@ async function suggestAgentCommand(form) {
2229
2523
  if (!folder?.value.trim() || !command || command.value.trim()) return;
2230
2524
  const path2 = folder.value;
2231
2525
  try {
2232
- const result = await api("/agents/detect", { cwd: path2 });
2233
- if (form.isConnected && folder.value === path2 && !command.value.trim() && result.suggestions?.command) {
2234
- command.value = result.suggestions.command;
2526
+ const result2 = await api("/agents/detect", { cwd: path2 });
2527
+ if (form.isConnected && folder.value === path2 && !command.value.trim() && result2.suggestions?.command) {
2528
+ command.value = result2.suggestions.command;
2235
2529
  let note = form.querySelector(".command-suggestion");
2236
2530
  if (!note) {
2237
2531
  note = document.createElement("p");
2238
2532
  note.className = "hint command-suggestion";
2239
2533
  command.closest("label")?.after(note);
2240
2534
  }
2241
- note.textContent = `${result.language ? `Detected a ${result.language} project${result.evidence?.length ? ` from ${result.evidence.join(", ")}` : ""}. ` : "Suggested from your project. "}Confirm this is how you start the agent.`;
2535
+ note.textContent = `${result2.language ? `Detected a ${result2.language} project${result2.evidence?.length ? ` from ${result2.evidence.join(", ")}` : ""}. ` : "Suggested from your project. "}Confirm this is how you start the agent.`;
2536
+ for (const [name, value] of Object.entries(connectDefaults(result2))) {
2537
+ const select = form.querySelector(`select[name=${name}]`);
2538
+ if (select && !select.value) {
2539
+ select.value = value;
2540
+ select.dispatchEvent(new Event("change", { bubbles: true }));
2541
+ const detail = form.querySelector("#state-detail");
2542
+ if (name === "state" && detail) detail.textContent = "Chosen from your project. Change it if your agent keeps memory between trials.";
2543
+ }
2544
+ }
2242
2545
  }
2243
2546
  } catch {
2244
2547
  }
@@ -2269,7 +2572,7 @@ function agentDraft(id) {
2269
2572
  function rememberDraft() {
2270
2573
  const form = document.querySelector("#playground-form");
2271
2574
  if (!form) return;
2272
- const id = form.dataset.agent, draft = { tasks: [...form.querySelectorAll(".task-editor")].map((row) => ({ id: row.dataset.taskId, prompt: row.querySelector("[name=prompt]").value, attempts: Number(row.querySelector("[name=attempts]").value), timeoutMs: Math.round(Number(row.querySelector("[name=minutes]").value) * 6e4) })), concurrency: Number(form.querySelector("[name=concurrency]").value) };
2575
+ const id = form.dataset.agent, draft = { tasks: [...form.querySelectorAll(".task-editor")].map((row2) => ({ id: row2.dataset.taskId, prompt: row2.querySelector("[name=prompt]").value, attempts: Number(row2.querySelector("[name=attempts]").value), timeoutMs: Math.round(Number(row2.querySelector("[name=minutes]").value) * 6e4) })), concurrency: Number(form.querySelector("[name=concurrency]").value) };
2273
2576
  taskDrafts.set(id, draft);
2274
2577
  try {
2275
2578
  sessionStorage.setItem("ancha-tasks:" + id, JSON.stringify(draft));
@@ -2318,11 +2621,11 @@ function renderAgents(id) {
2318
2621
  mountGroupFlow(document.querySelector("#group-run-flow"), { agents: agentCatalog, worlds, api, go });
2319
2622
  return;
2320
2623
  }
2321
- const list2 = agentList(agentCatalog);
2322
- const actions = agentCatalog.length ? `${agentCatalog.length > 1 ? navLink("Run agents together", "/agents?tab=group-run", "button-link") : ""}${button("Connect agent", "add-agent", "", "primary")}` : "";
2323
- shell("agents", head("Agents", actions) + agentErrors.map((e) => `<div class="alert">${h(e.message)}</div>`).join("") + list2);
2624
+ const note = ownRunsOff() ? betaNote() : void 0, list3 = agentList(agentCatalog, note);
2625
+ const actions = agentCatalog.length ? `${agentCatalog.length > 1 ? navLink("Run agents together", "/agents?tab=group-run", "button-link") : ""}${note ? "" : button("Connect agent", "add-agent", "", "primary")}` : "";
2626
+ shell("agents", head("Agents", actions) + (note && agentCatalog.length ? note : "") + agentErrors.map((e) => `<div class="alert">${h(e.message)}</div>`).join("") + list3);
2324
2627
  const handoff = new URLSearchParams(location.search);
2325
- if (handoff.has("connect")) {
2628
+ if (handoff.has("connect") && !note) {
2326
2629
  history.replaceState(history.state, "", location.pathname);
2327
2630
  renderedLocation = new URL(location.href);
2328
2631
  agentForm();
@@ -2357,7 +2660,9 @@ function renderAgents(id) {
2357
2660
  } });
2358
2661
  return;
2359
2662
  }
2360
- if (page === "setup") {
2663
+ if (page === "setup" && ownRunsOff()) {
2664
+ content = `${connectionNotice}${betaNote()}<div class="agent-footer">${button("Remove agent", "delete-agent", a.id, "link")}</div>`;
2665
+ } else if (page === "setup") {
2361
2666
  content = `${connectionNotice}<form id="agent-settings-form" class="agent-settings" data-agent="${h(a.id)}"><div class="folder-field"><label for="agent-folder">Project folder</label><div class="folder-input"><input id="agent-folder" name="cwd" value="${h(a.cwd)}" required>${boot.folderPickerAvailable ? button("Choose folder\u2026", "choose-agent-folder") : ""}</div></div><label>${a.configPath ? "Configuration file" : "Start command"}<input name="${a.configPath ? "configPath" : "command"}" value="${h(a.configPath ?? a.command)}" required></label>${taskInputFields(a.taskInput)}${providerFields(a.provider)}<label>Memory between trials<select name="state"><option value="stateless" ${a.state === "stateless" ? "selected" : ""}>No persistent memory</option><option value="namespaced" ${a.state === "namespaced" ? "selected" : ""}>Separate folder for each trial</option><option value="external" ${a.state === "external" ? "selected" : ""}>Shared files or external memory</option></select></label><p class="hint" id="state-detail">${a.state === "namespaced" ? "Your agent uses ANCHA_STATE_DIR for its persistent state." : ""}</p><div class="actions"><button type="submit" class="primary" ${connecting ? "disabled" : ""}>Connect agent</button>${button("Advanced settings", "agent-execution", a.id, "secondary")}</div><p id="page-form-error" class="error" role="alert"></p></form><div class="agent-footer">${button("Remove agent", "delete-agent", a.id, "link")}</div>`;
2362
2667
  } else {
2363
2668
  const tests = savedPlaygroundTests;
@@ -2371,7 +2676,7 @@ function renderAgents(id) {
2371
2676
  content = testCard(selectedTest, worlds.find((w) => w.id === selectedTest.worldId), base, savedTestActions(selectedTest.id) + navLink("Edit", url(base, { tab: "new-test", test: selectedTest.id })) + button("Archive", "archive-test", selectedTest.id, "link"), true) + `<section class="agent-recent"><h2>Runs</h2>${batchHistory(testRuns)}</section>`;
2372
2677
  } else content = connectionNotice + `<section><div class="section-title"><h2>Tasks</h2></div>${tests.length ? agentWorldTasks(tests, worlds, (id2) => savedTestActions(id2, "Run tasks")) : '<p class="quiet-empty"><a data-nav href="/worlds">Choose a world to add tasks.</a></p>'}</section>${playgroundErrors.map((e) => `<p class="error">${h(e.message)}</p>`).join("")}<p id="page-form-error" class="error" role="alert"></p>`;
2373
2678
  }
2374
- const primary = page === "setup" ? "" : ready ? button("Add tasks", "add-tasks", a.id, "primary") : navLink("Connect agent", url(base, { tab: "setup" }), "button-link primary");
2679
+ const primary = page === "setup" || connecting || queuedConnect ? "" : ready ? button("Add tasks", "add-tasks", a.id, "primary") : ownRunsOff() ? "" : navLink("Connect agent", url(base, { tab: "setup" }), "button-link primary");
2375
2680
  const connectionTone = operation?.state === "failed" ? "failed" : operation?.stale ? "stale" : connecting || queuedConnect ? "connecting" : operation?.state === "cancelled" ? "cancelled" : "";
2376
2681
  const settingsControl = page === "setup" ? navLink("\u2190 Overview", base, "button-link") : `<a data-nav class="agent-settings-control" href="${h(url(base, { tab: "setup" }))}" title="${h("Connection settings \xB7 " + status)}" aria-label="${h("Connection settings \xB7 " + status)}"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 3-.5 2-1.8 1-2-.6-2.2 3.8L4 10.7v2.1l-1.5 1.5 2.2 3.8 2-.6 1.8 1L9 21h4.4l.5-2.5 1.8-1 2 .6 2.2-3.8-1.5-1.5v-2.1l1.5-1.5-2.2-3.8-2 .6-1.8-1L13.4 3Z"/><circle cx="11.2" cy="12" r="3"/></svg>${connectionTone ? `<span class="agent-connection-dot ${connectionTone}" aria-hidden="true"></span>` : ""}</a>`;
2377
2682
  shell("agents", (page === "test" ? navLink("\u2190 " + a.name, base, "back") : navLink("\u2190 Agents", "/agents", "back")) + head(page === "test" ? savedPlaygroundTests.find((t) => t.id === q.get("test"))?.name ?? a.name : a.name, page === "test" ? "" : primary + settingsControl) + content);
@@ -2407,9 +2712,9 @@ function pollAgent(id, version) {
2407
2712
  const text2 = document.querySelector(".connect-progress p");
2408
2713
  if (text2) text2.textContent = op.message ?? "";
2409
2714
  }
2410
- const result = await poll(`/playgrounds?agentId=${enc2(id)}`);
2715
+ const result2 = await poll(`/playgrounds?agentId=${enc2(id)}`);
2411
2716
  if (version !== generation) return;
2412
- playgroundRuns = result.runs ?? [];
2717
+ playgroundRuns = result2.runs ?? [];
2413
2718
  for (const area2 of document.querySelectorAll(".agent-run-history")) area2.innerHTML = batchHistory(new URLSearchParams(location.search).get("tab") === "runs" ? playgroundRuns : playgroundRuns.slice(0, 5));
2414
2719
  const active = playgroundRuns.filter((r) => !terminal(r.status)), area = document.querySelector("#agent-active-runs");
2415
2720
  if (area) area.innerHTML = active.length ? `<h2>Active runs</h2>${batchHistory(active)}` : "";
@@ -2425,18 +2730,20 @@ function pollAgent(id, version) {
2425
2730
  function renderPlayground() {
2426
2731
  renderedLocation = new URL(location.href);
2427
2732
  const batch = current, q = new URLSearchParams(location.search), selected = q.get("attempt"), attempt = (batch.attempts ?? []).find((a) => a.id === selected), base = "/playgrounds/" + enc2(batch.id);
2428
- const actions = !terminal(batch.status) ? button("Stop", "stop-playground", batch.id) : rerunAction(batch.id);
2733
+ const actions = readOnlyRun(batch) ? batch.origin?.stored ? button("Delete run", "delete-stored-run", batch.id, "link") : "" : !terminal(batch.status) ? button("Stop", "stop-playground", batch.id) : rerunAction(batch.id);
2429
2734
  if (selected && !attempt) throw new Error("This attempt is not available.");
2430
2735
  if (q.get("compare")) {
2431
2736
  const back = q.get("task") ? url(base, { task: q.get("task") }) : base;
2432
- shell("worlds", head("Compare attempts", navLink("Back", back, "button-link")) + '<div id="comparison-body" role="status">Loading comparison\u2026</div>');
2737
+ shell("playgrounds", head("Compare attempts", navLink("Back", back, "button-link")) + '<div id="comparison-body" role="status">Loading comparison\u2026</div>');
2433
2738
  const version = generation;
2434
- void api(`/playgrounds/${enc2(batch.id)}/compare?left=${enc2(q.get("compare"))}&right=${enc2(q.get("with") ?? "")}`).then((result) => {
2435
- if (version === generation) document.querySelector("#comparison-body").innerHTML = renderManagedComparison(result);
2739
+ void api(`/playgrounds/${enc2(batch.id)}/compare?left=${enc2(q.get("compare"))}&right=${enc2(q.get("with") ?? "")}`).then((result2) => {
2740
+ if (version === generation) document.querySelector("#comparison-body").innerHTML = renderManagedComparison(result2);
2436
2741
  }).catch((e) => notify(String(e), true));
2437
2742
  return;
2438
2743
  }
2439
- shell("worlds", attempt ? renderAttemptWorkspace(batch, attempt, batchEvidence, { view: q.get("view") ?? "activity", tool: q.get("tool") ?? void 0, actionsHtml: actions, query: Object.fromEntries(q) }) : renderRunOverview(batch, actions, { task: q.get("task") ?? void 0 }));
2744
+ shell("playgrounds", attempt ? renderAttemptWorkspace(batch, attempt, batchEvidence, { view: q.get("view") ?? void 0, tool: q.get("tool") ?? void 0, actionsHtml: actions, query: Object.fromEntries(q) }) : renderRunOverview(batch, actions, { task: q.get("task") ?? void 0 }));
2745
+ const focus = q.get("focus");
2746
+ if (attempt && focus) document.getElementById(entryAnchor(focus))?.scrollIntoView({ block: "center" });
2440
2747
  }
2441
2748
  function pollPlayground(id, version) {
2442
2749
  if (version !== generation || terminal(current.status)) return;
@@ -2456,8 +2763,8 @@ function pollPlayground(id, version) {
2456
2763
  }
2457
2764
  }, 1500);
2458
2765
  }
2459
- var toolOrder = ["slack", "github", "linear", "notion", "microsoft-word", "gmail", "resend", "google-drive", "dropbox", "amazon-s3", "okta", "clerk", "stripe", "shopify", "datadog", "better-stack", "pagerduty", "hubspot", "salesforce", "attio", "gong", "ga4", "google-ads", "linkedin-ads", "chatgpt-ads", "open-meteo"];
2460
- var toolCategory = { slack: "Team chat", github: "Code", gmail: "Email", resend: "Email", "google-drive": "Files", dropbox: "Files", "amazon-s3": "Files", linear: "Issues", okta: "Identity", clerk: "Identity", stripe: "Payments", shopify: "Commerce", notion: "Docs", "microsoft-word": "Docs", datadog: "Monitoring", "better-stack": "Uptime", pagerduty: "Incidents", hubspot: "CRM", salesforce: "CRM", attio: "CRM", gong: "Sales calls", ga4: "Analytics", "google-ads": "Ads", "linkedin-ads": "Ads", "chatgpt-ads": "Ads", "open-meteo": "Weather" };
2766
+ var toolOrder = ["slack", "github", "linear", "jira", "notion", "microsoft-word", "gmail", "resend", "lob", "twilio", "google-calendar", "google-drive", "dropbox", "amazon-s3", "okta", "clerk", "stripe", "paypal", "shopify", "kalshi", "datadog", "better-stack", "pagerduty", "hubspot", "salesforce", "attio", "intercom", "zendesk", "gong", "ga4", "google-ads", "linkedin-ads", "chatgpt-ads", "open-meteo"];
2767
+ var toolCategory = { slack: "Team chat", github: "Code", gmail: "Email", resend: "Email", "google-drive": "Files", dropbox: "Files", "amazon-s3": "Files", linear: "Issues", okta: "Identity", clerk: "Identity", stripe: "Payments", paypal: "Payments", shopify: "Commerce", lob: "Mail", jira: "Issues", kalshi: "Markets", intercom: "Support", zendesk: "Support", "google-calendar": "Calendar", twilio: "SMS & voice", notion: "Docs", "microsoft-word": "Docs", datadog: "Monitoring", "better-stack": "Uptime", pagerduty: "Incidents", hubspot: "CRM", salesforce: "CRM", attio: "CRM", gong: "Sales calls", ga4: "Analytics", "google-ads": "Ads", "linkedin-ads": "Ads", "chatgpt-ads": "Ads", "open-meteo": "Weather" };
2461
2768
  var starterCounts = {
2462
2769
  slack: [["users", "Members"], ["channels", "Channels"], ["messages", "Messages"]],
2463
2770
  github: [["repos", "Repositories"], ["pulls", "Pull requests"], ["issues", "Issues"], ["commits", "Commits"]],
@@ -2484,12 +2791,20 @@ var starterCounts = {
2484
2791
  dropbox: [["folders", "Folders"], ["files", "Files"], ["sharedLinks", "Shared links"], ["sharedFolders", "Shared folders"]],
2485
2792
  resend: [["emails", "Emails"], ["broadcasts", "Broadcasts"], ["domains", "Domains"], ["contacts", "Contacts"]],
2486
2793
  "microsoft-word": [["documents", "Documents"], ["folders", "Folders"], ["permissions", "Shares"]],
2487
- shopify: [["orders", "Orders"], ["products", "Products"], ["customers", "Customers"], ["locations", "Locations"]]
2794
+ shopify: [["orders", "Orders"], ["products", "Products"], ["customers", "Customers"], ["locations", "Locations"]],
2795
+ lob: [["letters", "Letters"], ["postcards", "Postcards"], ["checks", "Checks"], ["addresses", "Addresses"]],
2796
+ paypal: [["orders", "Orders"], ["payments", "Payments"], ["subscriptions", "Subscriptions"], ["plans", "Plans"]],
2797
+ jira: [["projects", "Projects"], ["issues", "Issues"], ["sprints", "Sprints"], ["users", "People"]],
2798
+ kalshi: [["markets", "Markets"], ["orders", "Orders"], ["fills", "Fills"], ["positions", "Positions"]],
2799
+ intercom: [["conversations", "Conversations"], ["contacts", "Contacts"], ["companies", "Companies"], ["articles", "Articles"]],
2800
+ zendesk: [["tickets", "Tickets"], ["users", "People"], ["organizations", "Organizations"]],
2801
+ "google-calendar": [["calendars", "Calendars"], ["events", "Events"]],
2802
+ twilio: [["messages", "Messages"], ["calls", "Calls"], ["numbers", "Phone numbers"], ["verifications", "Verifications"]]
2488
2803
  };
2489
2804
  function starterStats(tool) {
2490
2805
  const state = (starterObservation.state ?? {})[tool] ?? {};
2491
2806
  const isFolder = (f) => f.mimeType === "application/vnd.google-apps.folder";
2492
- const count = (key) => key === "issues" && Array.isArray(state.pulls) ? (state.issues ?? []).length - state.pulls.length : tool === "google-drive" && Array.isArray(state.files) && (key === "files" || key === "folders") ? state.files.filter((f) => isFolder(f) === (key === "folders")).length : tool === "datadog" && key === "metrics" && Array.isArray(state.metrics) ? new Set(state.metrics.map((m) => m.metric ?? m.name)).size : tool === "attio" && ["people", "companies", "deals"].includes(key) && Array.isArray(state.records) ? state.records.filter((r) => r.object === key).length : tool === "dropbox" && (key === "files" || key === "folders") && Array.isArray(state.entries) ? state.entries.filter((e) => e.kind === key.slice(0, -1)).length : tool === "microsoft-word" && (key === "documents" || key === "folders") && Array.isArray(state.items) ? state.items.filter((i) => i.kind === (key === "folders" ? "folder" : "file")).length : Array.isArray(state[key]) ? state[key].length : void 0;
2807
+ const count = (key) => key === "issues" && Array.isArray(state.pulls) ? (state.issues ?? []).length - state.pulls.length : tool === "google-drive" && Array.isArray(state.files) && (key === "files" || key === "folders") ? state.files.filter((f) => isFolder(f) === (key === "folders")).length : tool === "datadog" && key === "metrics" && Array.isArray(state.metrics) ? new Set(state.metrics.map((m) => m.metric ?? m.name)).size : tool === "attio" && ["people", "companies", "deals"].includes(key) && Array.isArray(state.records) ? state.records.filter((r) => r.object === key).length : tool === "dropbox" && (key === "files" || key === "folders") && Array.isArray(state.entries) ? state.entries.filter((e) => e.kind === key.slice(0, -1)).length : tool === "microsoft-word" && (key === "documents" || key === "folders") && Array.isArray(state.items) ? state.items.filter((i) => i.kind === (key === "folders" ? "folder" : "file")).length : tool === "lob" && ["letters", "postcards", "checks"].includes(key) && Array.isArray(state.mail) ? state.mail.filter((m) => m.kind === key.slice(0, -1)).length : Array.isArray(state[key]) ? state[key].length : void 0;
2493
2808
  const cells = (starterCounts[tool] ?? []).map(([key, label2]) => [label2, count(key)]).filter(([, n]) => n !== void 0);
2494
2809
  return cells.length ? `<section class="run-summary tool-stats" aria-label="Starter data"><div class="rs-stats cols-${Math.min(cells.length, 4)}">${cells.map(([label2, n]) => `<div class="rs-stat"><span>${h(label2)}</span><strong>${h(String(n))}</strong></div>`).join("")}</div></section>` : "";
2495
2810
  }
@@ -2509,8 +2824,8 @@ function renderTools(selected) {
2509
2824
  }
2510
2825
  const d = tool.descriptor ?? {}, coverage = tool.coverage ?? [], env = connectionFields[tool.name] ?? [];
2511
2826
  const methods = ["GET", "POST", "PUT", "PATCH", "DELETE"], sorted = [...coverage].sort((a, b) => String(a.path).localeCompare(String(b.path)) || methods.indexOf(a.method) - methods.indexOf(b.method));
2512
- const row = (c) => `<li title="${h(`${c.method} ${c.path}${c.notes ? ` \u2014 ${c.notes}` : ""}`)}"><code>${h(c.method)}</code><span>${h(c.path).replaceAll("/", "/<wbr>")}</span></li>`;
2513
- const endpoints = coverage.length ? `<section class="tool-aside-section"><h2>Endpoints <span>${coverage.length}</span></h2><ul class="cov-list">${sorted.slice(0, 10).map(row).join("")}</ul>${coverage.length > 10 ? `<details class="cov-more"><summary>All ${coverage.length} endpoints</summary><ul class="cov-list">${sorted.slice(10).map(row).join("")}</ul></details>` : ""}</section>` : "";
2827
+ const row2 = (c) => `<li title="${h(`${c.method} ${c.path}${c.notes ? ` \u2014 ${c.notes}` : ""}`)}"><code>${h(c.method)}</code><span>${h(c.path).replaceAll("/", "/<wbr>")}</span></li>`;
2828
+ const endpoints = coverage.length ? `<section class="tool-aside-section"><h2>Endpoints <span>${coverage.length}</span></h2><ul class="cov-list">${sorted.slice(0, 10).map(row2).join("")}</ul>${coverage.length > 10 ? `<details class="cov-more"><summary>All ${coverage.length} endpoints</summary><ul class="cov-list">${sorted.slice(10).map(row2).join("")}</ul></details>` : ""}</section>` : "";
2514
2829
  const connect = env.length ? `<section class="tool-aside-section"><h2>Connect your agent</h2><p>Your agent reads these at start; point your client at the URL instead of the real service.</p><dl class="env-list">${env.map((key) => `<div><dt><code>${h(key)}</code></dt><dd>${h(connectionLabel(key))}</dd></div>`).join("")}</dl>${connectionNote[tool.name] ? `<p class="hint">${h(connectionNote[tool.name])}</p>` : ""}</section>` : "";
2515
2830
  const limits = (d.limitations ?? []).length ? `<section class="tool-aside-section"><h2>Limits</h2><ul class="tool-limits">${(d.limitations ?? []).map((x) => `<li>${h(x)}</li>`).join("")}</ul></section>` : "";
2516
2831
  const preview = previewCache.has(tool.name) ? toolView(starterObservation, tool.name, { ...Object.fromEntries(new URLSearchParams(location.search)), baseHref: "/tools/" + enc2(tool.name), embedded: true }) : `<p class="loading" role="status">Loading ${h(toolName(tool.name))}\u2026</p>`;
@@ -2537,9 +2852,9 @@ function workspaceBody(scene, manual) {
2537
2852
  if (hideChecks && tab === "checks") tab = "activity";
2538
2853
  if (!enabled.includes(tab) && !["activity", "checks", "raw"].includes(tab)) tab = enabled[0] ?? "activity";
2539
2854
  const projected = ["slack", "github", "datadog", "pagerduty"].includes(tab) ? void 0 : observation.toolViews?.[tab];
2540
- let body = projected && (projected.tables.length || projected.conversations.length) ? toolDataPanel(projected, resourceTab) : tab === "slack" ? slack(observation, manual, channel, thread) : tab === "pagerduty" ? pagerduty(observation, manual) : tab === "datadog" ? datadog(observation) : tab === "github" ? github(observation, manual) : tab === "activity" ? seeded ? sandboxActivity(observation) : timeline(observation, filter) : tab === "checks" ? checks(Array.isArray(observation.checks) ? observation.checks : observation.checks?.checks ?? [], manual) : empty("No records yet.");
2855
+ let body2 = projected && (projected.tables.length || projected.conversations.length) ? toolDataPanel(projected, resourceTab) : tab === "slack" ? slack(observation, manual, channel, thread) : tab === "pagerduty" ? pagerduty(observation, manual) : tab === "datadog" ? datadog(observation) : tab === "github" ? github(observation, manual) : tab === "activity" ? seeded ? sandboxActivity(observation) : timeline(observation, filter) : tab === "checks" ? checks(Array.isArray(observation.checks) ? observation.checks : observation.checks?.checks ?? [], manual) : empty("No records yet.");
2541
2856
  const sections = [...enabled.map((id) => [id, toolName(id)]), ["activity", "Activity"], ...!hideChecks ? [["checks", "Conditions"]] : []];
2542
- return `${scene?.world_rules?.integrations?.length ? `<details class="inspection-connections"><summary>Connections</summary>${routes(scene, observation)}</details>` : ""}<div class="work-tabs"><div class="tabs tools" aria-label="Sandbox sections">${sections.map(([id, n]) => button(n, "tool", id, tab === id ? "active" : "")).join("")}</div></div><section class="panel tool-panel">${body}</section>${(observation.warnings ?? []).map((w) => `<p class="hint">${h(w)}</p>`).join("")}`;
2857
+ return `${scene?.world_rules?.integrations?.length ? `<details class="inspection-connections"><summary>Connections</summary>${routes(scene, observation)}</details>` : ""}<div class="work-tabs"><div class="tabs tools" aria-label="Sandbox sections">${sections.map(([id, n]) => button(n, "tool", id, tab === id ? "active" : "")).join("")}</div></div><section class="panel tool-panel">${body2}</section>${(observation.warnings ?? []).map((w) => `<p class="hint">${h(w)}</p>`).join("")}`;
2543
2858
  }
2544
2859
  function renderSandbox() {
2545
2860
  const s = current.sandbox;
@@ -2626,11 +2941,11 @@ async function executionRuntime() {
2626
2941
  }
2627
2942
  }
2628
2943
  function executionValue(data) {
2629
- const list2 = (value = "") => value.split(",").map((v) => v.trim()).filter(Boolean);
2944
+ const list3 = (value = "") => value.split(",").map((v) => v.trim()).filter(Boolean);
2630
2945
  if (data.executionMode === "config") return void 0;
2631
2946
  if (data.executionMode === "host") return { mode: "host" };
2632
2947
  const image = data.executionImage?.trim(), preparation = image === data.originalExecutionImage ? data.originalExecutionPreparation : "image";
2633
- return { mode: "container", image, ...["project", "image"].includes(preparation ?? "") ? { preparation } : {}, files: list2(data.executionFiles), env: list2(data.executionEnv), modelHosts: list2(data.executionHosts), cpus: Number(data.executionCpus), memoryMb: Number(data.executionMemory), pids: Number(data.executionPids) };
2948
+ return { mode: "container", image, ...["project", "image"].includes(preparation ?? "") ? { preparation } : {}, files: list3(data.executionFiles), env: list3(data.executionEnv), modelHosts: list3(data.executionHosts), cpus: Number(data.executionCpus), memoryMb: Number(data.executionMemory), pids: Number(data.executionPids) };
2634
2949
  }
2635
2950
  function agentForm(importConfig = false) {
2636
2951
  modal(importConfig ? "Import agent configuration" : "Connect agent", `<form id="agent-form"><label>Agent name<input name="name" placeholder="e.g. Support agent" maxlength="100" required autofocus></label><div class="folder-field"><label for="agent-folder">Project folder</label><div class="folder-input"><input id="agent-folder" name="cwd" placeholder="/Users/you/projects/my-agent" required>${boot.folderPickerAvailable ? button("Choose folder\u2026", "choose-agent-folder") : ""}</div></div>${importConfig ? '<label>Configuration file<input name="configPath" placeholder="ancha.yaml" required></label>' : '<label>Start command<input name="command" placeholder="e.g. node agent.js" required></label>'}${taskInputFields()}${providerFields()}<label>Memory between trials<select name="state" required><option value="" disabled selected>Choose memory behavior</option><option value="stateless">No persistent memory</option><option value="namespaced">Separate folder for each trial</option><option value="external">Shared files or external memory</option></select></label><p class="hint" id="state-detail"></p><div class="actions"><button class="primary" type="submit">Connect agent</button>${button(importConfig ? "Use a start command" : "Import configuration", importConfig ? "add-agent" : "import-agent", "", "link")}</div></form>`);
@@ -2686,7 +3001,7 @@ function verifyAgentForm(id) {
2686
3001
  function editForm(key) {
2687
3002
  const item = catalog.scenes.find((s) => s.key === key);
2688
3003
  if (!item) return;
2689
- modal("Duplicate & edit scenario", `<form id="edit-form"><div class="form-grid"><label>Draft ID<input name="slug" value="${h(item.scene.id)}-custom" pattern="[a-z][a-z0-9-]{0,63}" required></label><label>Title<input name="title" value="${h(item.scene.title)}" required maxlength="300"></label></div><label>Agent task<textarea name="task" rows="3" required>${h(item.scene.task)}</textarea></label><label>Notification routing<select name="routing"><option value="unchanged">Keep the definition\u2019s routes</option><option value="pagerduty-only">Datadog \u2192 PagerDuty \u2192 Slack (remove direct Datadog \u2192 Slack)</option></select></label><label>Advanced YAML<textarea class="code-editor" name="yaml" rows="18" spellcheck="false" required>${h(item.yaml)}</textarea></label><p class="hint">Fields above override YAML. New drafts are unverified.</p><div class="actions">${button("Validate YAML", "validate")}<button class="primary">Save new draft</button></div></form>`, true);
3004
+ modal("Duplicate & edit scenario", `<form id="edit-form"><div class="form-grid"><label>Draft ID<input name="slug" value="${h(item.scene.id)}-custom" pattern="[a-z][a-z0-9\\-]{0,63}" required></label><label>Title<input name="title" value="${h(item.scene.title)}" required maxlength="300"></label></div><label>Agent task<textarea name="task" rows="3" required>${h(item.scene.task)}</textarea></label><label>Notification routing<select name="routing"><option value="unchanged">Keep the definition\u2019s routes</option><option value="pagerduty-only">Datadog \u2192 PagerDuty \u2192 Slack (remove direct Datadog \u2192 Slack)</option></select></label><label>Advanced YAML<textarea class="code-editor" name="yaml" rows="18" spellcheck="false" required>${h(item.yaml)}</textarea></label><p class="hint">Fields above override YAML. New drafts are unverified.</p><div class="actions">${button("Validate YAML", "validate")}<button class="primary">Save new draft</button></div></form>`, true);
2690
3005
  }
2691
3006
  function setBusy(value) {
2692
3007
  busy = value;
@@ -2699,13 +3014,13 @@ async function mutate(action2, payload = {}) {
2699
3014
  setBusy(true);
2700
3015
  const version = generation, id = current.sandbox.id;
2701
3016
  try {
2702
- const result = await api(`/sandboxes/${enc2(id)}/${action2}`, { revision: observation.revision, ...payload });
3017
+ const result2 = await api(`/sandboxes/${enc2(id)}/${action2}`, { revision: observation.revision, ...payload });
2703
3018
  if (version !== generation) return;
2704
- if (result.observation) observation = result.observation;
3019
+ if (result2.observation) observation = result2.observation;
2705
3020
  renderSandbox();
2706
- if (result.operation && !result.operation.ok) {
3021
+ if (result2.operation && !result2.operation.ok) {
2707
3022
  stopPlay();
2708
- throw new Error(`Operation rejected: ${JSON.stringify(result.operation.body)}`);
3023
+ throw new Error(`Operation rejected: ${JSON.stringify(result2.operation.body)}`);
2709
3024
  }
2710
3025
  } catch (e) {
2711
3026
  stopPlay();
@@ -2755,6 +3070,24 @@ async function action(kind, value, target) {
2755
3070
  go("/agents?tab=group-run");
2756
3071
  return;
2757
3072
  }
3073
+ if (kind === "start-workspace") return startWorkspace();
3074
+ if (kind === "delete-stored-run") {
3075
+ if (target.dataset.armed !== "1") {
3076
+ target.dataset.armed = "1";
3077
+ target.textContent = "Delete permanently?";
3078
+ setTimeout(() => {
3079
+ if (target.isConnected) {
3080
+ target.dataset.armed = "";
3081
+ target.textContent = "Delete run";
3082
+ }
3083
+ }, 4e3);
3084
+ return;
3085
+ }
3086
+ await api(`/runs/${enc2(value)}/delete`, {});
3087
+ notify("Run deleted.");
3088
+ go("/playgrounds");
3089
+ return;
3090
+ }
2758
3091
  if (kind === "close") return dialog.close();
2759
3092
  if (kind === "add-task" || kind === "remove-task") {
2760
3093
  rememberDraft();
@@ -2785,8 +3118,8 @@ async function action(kind, value, target) {
2785
3118
  target.setAttribute("aria-busy", "true");
2786
3119
  target.disabled = true;
2787
3120
  try {
2788
- const result = await api(`/playgrounds/${enc2(value)}/rerun`, { idempotencyKey: submission.idempotencyKey });
2789
- go(`/playgrounds/${enc2(result.id)}`);
3121
+ const result2 = await api(`/playgrounds/${enc2(value)}/rerun`, { idempotencyKey: submission.idempotencyKey });
3122
+ go(`/playgrounds/${enc2(result2.id)}`);
2790
3123
  sessionStorage.removeItem(storageKey);
2791
3124
  return;
2792
3125
  } catch (error) {
@@ -2819,8 +3152,8 @@ async function action(kind, value, target) {
2819
3152
  target.setAttribute("aria-busy", "true");
2820
3153
  target.disabled = true;
2821
3154
  try {
2822
- const result = await api("/playgrounds", submission);
2823
- go("/playgrounds/" + enc2(result.id));
3155
+ const result2 = await api("/playgrounds", submission);
3156
+ go("/playgrounds/" + enc2(result2.id));
2824
3157
  sessionStorage.removeItem(storageKey);
2825
3158
  return;
2826
3159
  } catch (error) {
@@ -2928,8 +3261,8 @@ async function action(kind, value, target) {
2928
3261
  if (kind === "browse") return go("/scenarios");
2929
3262
  if (kind === "recreate-sandbox") {
2930
3263
  const s = current.sandbox;
2931
- const result = await api("/sandboxes", { configuration: s.configuration, seed: s.seed });
2932
- go(`/sandboxes/${enc2(result.sandbox.id)}`);
3264
+ const result2 = await api("/sandboxes", { configuration: s.configuration, seed: s.seed });
3265
+ go(`/sandboxes/${enc2(result2.sandbox.id)}`);
2933
3266
  return;
2934
3267
  }
2935
3268
  if (kind === "create") {
@@ -2968,9 +3301,9 @@ async function action(kind, value, target) {
2968
3301
  if (kind === "download-mcp") return download("ancha-mcp.json", JSON.stringify(connectionInfo.mcp.configuration, null, 2) + "\n", "application/json");
2969
3302
  if (kind === "download-certificate") return download("ancha-google-ads.pem", connectionInfo.services["google-ads"].tlsRootCertificate);
2970
3303
  if (kind === "sandbox-fork") {
2971
- const result = await api(`/sandboxes/${enc2(current.sandbox.id)}/fork`, {});
3304
+ const result2 = await api(`/sandboxes/${enc2(current.sandbox.id)}/fork`, {});
2972
3305
  dialog.close();
2973
- go(`/sandboxes/${enc2(result.sandbox.id)}`);
3306
+ go(`/sandboxes/${enc2(result2.sandbox.id)}`);
2974
3307
  return notify("Fresh sandbox created from the original data.");
2975
3308
  }
2976
3309
  if (kind === "test") return testForm(value);
@@ -3100,8 +3433,8 @@ async function action(kind, value, target) {
3100
3433
  return renderSandbox();
3101
3434
  }
3102
3435
  if (kind === "renew") {
3103
- const result = await api(`/sandboxes/${enc2(current.sandbox.id)}/renew`, {});
3104
- current.lease = result.lease;
3436
+ const result2 = await api(`/sandboxes/${enc2(current.sandbox.id)}/renew`, {});
3437
+ current.lease = result2.lease;
3105
3438
  renderSandbox();
3106
3439
  if (dialog.open) await action("sandbox-details", "", target);
3107
3440
  return notify("Sandbox lifetime renewed.");
@@ -3178,6 +3511,12 @@ document.addEventListener("change", (event) => {
3178
3511
  updateTaskCount();
3179
3512
  return;
3180
3513
  }
3514
+ if (el.matches("[data-run-filter]")) {
3515
+ const params = new URLSearchParams();
3516
+ for (const [key, value] of new FormData(el.closest("form"))) if (value) params.set(key, String(value));
3517
+ go("/playgrounds" + (params.size ? "?" + params : ""));
3518
+ return;
3519
+ }
3181
3520
  if (el.id === "task-input-kind") {
3182
3521
  document.querySelector("#http-task-fields").hidden = el.value !== "http";
3183
3522
  document.querySelector("#task-input-detail").textContent = el.value === "command" ? "The task is provided in ANCHA_TASK." : el.value === "events" ? "This task workflow requires a direct task input. Tool events remain available for existing integrations." : "";
@@ -3277,8 +3616,8 @@ async function submitForm(form) {
3277
3616
  if (form.id === "playground-form") {
3278
3617
  rememberDraft();
3279
3618
  const draft = agentDraft(form.dataset.agent);
3280
- const result = await api("/playgrounds", { agentId: form.dataset.agent, tasks: draft.tasks, concurrency: draft.concurrency, seed: "playground-1" });
3281
- go("/playgrounds/" + enc2(result.id));
3619
+ const result2 = await api("/playgrounds", { agentId: form.dataset.agent, tasks: draft.tasks, concurrency: draft.concurrency, seed: "playground-1" });
3620
+ go("/playgrounds/" + enc2(result2.id));
3282
3621
  return;
3283
3622
  }
3284
3623
  if (form.id === "agent-settings-form") {
@@ -3342,14 +3681,14 @@ async function submitForm(form) {
3342
3681
  notify("Draft saved.");
3343
3682
  }
3344
3683
  if (form.id === "compare-form") {
3345
- const result = await api("/compare", d);
3346
- const labels = Object.fromEntries(result.scenes.map((row, index) => {
3347
- const saved = current.metadata?.cases?.find((c) => c.id === row.sceneId);
3348
- const summary = current.summary?.scenes?.find((c) => c.sceneId === row.sceneId);
3349
- const item = catalog.scenes.find((c) => c.caseId === row.sceneId || c.scene.id === (summary?.scenarioId ?? row.sceneId));
3350
- return [row.sceneId, saved?.title ?? (item ? title(item.scene) : summary?.scenarioId ? title({ id: summary.scenarioId }) : `Scenario ${index + 1}`)];
3684
+ const result2 = await api("/compare", d);
3685
+ const labels = Object.fromEntries(result2.scenes.map((row2, index) => {
3686
+ const saved = current.metadata?.cases?.find((c) => c.id === row2.sceneId);
3687
+ const summary = current.summary?.scenes?.find((c) => c.sceneId === row2.sceneId);
3688
+ const item = catalog.scenes.find((c) => c.caseId === row2.sceneId || c.scene.id === (summary?.scenarioId ?? row2.sceneId));
3689
+ return [row2.sceneId, saved?.title ?? (item ? title(item.scene) : summary?.scenarioId ? title({ id: summary.scenarioId }) : `Scenario ${index + 1}`)];
3351
3690
  }));
3352
- modal("Run comparison", comparisonResults(result, labels), true);
3691
+ modal("Run comparison", comparisonResults(result2, labels), true);
3353
3692
  }
3354
3693
  if (form.id === "slack-form") {
3355
3694
  stopPlay();