@ai-ecoverse/slicc-spectrum 1.102.0 → 1.103.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/slicc-ui.js CHANGED
@@ -10435,6 +10435,9 @@ var o55 = class extends a10 {
10435
10435
  };
10436
10436
  e25("swc-icon-new", o55);
10437
10437
 
10438
+ // node_modules/@adobe/spectrum-wc/dist/link.css
10439
+ var link_default = '/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Standalone link presentation for native `<a href>` elements.\n *\n * Default anchor appearance inside `.swc-Typography--prose` and\n * `.swc-Typography--links` ships with `typography.css` (generated). Import this\n * stylesheet when authors need explicit BEM modifiers on anchors.\n *\n */\n\n.swc-Link {\n inline-size: -moz-fit-content;\n inline-size: fit-content;\n font-family: var(--swc-sans-font-family-stack);\n font-size: var(--swc-font-size-100);\n font-style: normal;\n font-weight: 400;\n line-height: 1.30;\n color: var(--swc-link-text-color-default, var(--swc-accent-color-900));\n -webkit-text-decoration: underline;\n text-decoration: underline;\n text-decoration-thickness: 1px;\n text-underline-offset: 1px;\n transition: color 130ms ease-in-out;\n\n &:hover {\n color: var(--swc-link-text-color-hover, var(--swc-accent-color-1000));\n }\n\n &:active {\n color: var(--swc-link-text-color-down, var(--swc-accent-color-1000));\n }\n\n &:focus-visible {\n color: var(--swc-link-text-color-focus, var(--swc-accent-color-1000));\n border-radius: 4px;\n outline: 2px solid var(--swc-link-focus-indicator-color, var(--swc-blue-800));\n outline-offset: 2px;\n }\n\n &:lang(ja),\n &:lang(zh),\n &:lang(ko) {\n line-height: 1.50;\n }\n}\n\n.swc-Link--standalone {\n font-weight: 500;\n}\n\n.swc-Link--secondary {\n --swc-link-text-color-default: var(--swc-gray-800);\n --swc-link-text-color-hover: var(--swc-gray-900);\n --swc-link-text-color-down: var(--swc-gray-900);\n --swc-link-text-color-focus: var(--swc-gray-900);\n}\n\n.swc-Link--staticWhite {\n --swc-link-text-color-default: var(--swc-white);\n --swc-link-text-color-hover: var(--swc-white);\n --swc-link-text-color-down: var(--swc-white);\n --swc-link-text-color-focus: var(--swc-white);\n --swc-link-focus-indicator-color: var(--swc-white);\n}\n\n.swc-Link--staticBlack {\n --swc-link-text-color-default: var(--swc-black);\n --swc-link-text-color-hover: var(--swc-black);\n --swc-link-text-color-down: var(--swc-black);\n --swc-link-text-color-focus: var(--swc-black);\n --swc-link-focus-indicator-color: var(--swc-black);\n}\n\n.swc-Link--quiet.swc-Link--standalone {\n -webkit-text-decoration: none;\n text-decoration: none;\n}\n\n.swc-Link--quiet.swc-Link--standalone:hover {\n -webkit-text-decoration: underline;\n text-decoration: underline;\n}\n';
10440
+
10438
10441
  // src/app/command.ts
10439
10442
  var toShow = "Show the full command to allow it.";
10440
10443
  var toScroll = "Scroll to the end of the command to allow it.";
@@ -21436,6 +21439,94 @@ var markdownCss = i`
21436
21439
  }
21437
21440
  `;
21438
21441
 
21442
+ // node_modules/@adobe/spectrum-wc-icons/dist/Copy.js
21443
+ function e98() {
21444
+ return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="var(--swc-icon-color, currentColor)" d="M11.75 18h-7.5C3.01 18 2 16.99 2 15.75v-7.5C2 7.01 3.01 6 4.25 6a.75.75 0 0 1 0 1.5.75.75 0 0 0-.75.75v7.5c0 .413.337.75.75.75h7.5c.413 0 .75-.337.75-.75a.75.75 0 0 1 1.5 0c0 1.24-1.01 2.25-2.25 2.25m-5-13A.75.75 0 0 1 6 4.25C6 3.01 7.01 2 8.25 2a.75.75 0 0 1 0 1.5.75.75 0 0 0-.75.75.75.75 0 0 1-.75.75M13 3.5h-2A.75.75 0 0 1 11 2h2a.75.75 0 0 1 0 1.5"/><path fill="var(--swc-icon-color, currentColor)" d="M13 14h-2a.75.75 0 0 1 0-1.5h2a.75.75 0 0 1 0 1.5m2.75 0a.75.75 0 0 1 0-1.5c.413 0 .75-.337.75-.75a.75.75 0 0 1 1.5 0c0 1.24-1.01 2.25-2.25 2.25m1.5-9a.75.75 0 0 1-.75-.75.75.75 0 0 0-.75-.75.75.75 0 0 1 0-1.5C16.99 2 18 3.01 18 4.25a.75.75 0 0 1-.75.75m0 4.75A.75.75 0 0 1 16.5 9V7A.75.75 0 0 1 18 7v2a.75.75 0 0 1-.75.75m-10.5 0A.75.75 0 0 1 6 9V7a.75.75 0 0 1 1.5 0v2a.75.75 0 0 1-.75.75M8.25 14C7.01 14 6 12.99 6 11.75a.75.75 0 0 1 1.5 0c0 .413.337.75.75.75a.75.75 0 0 1 0 1.5"/></svg>';
21445
+ }
21446
+
21447
+ // node_modules/@adobe/spectrum-wc-icons/dist/swc-icon-copy.js
21448
+ var o64 = class extends a10 {
21449
+ static get styles() {
21450
+ return [t40];
21451
+ }
21452
+ render() {
21453
+ return b`
21454
+ ${o16(e98())}
21455
+ `;
21456
+ }
21457
+ };
21458
+ e25("swc-icon-copy", o64);
21459
+
21460
+ // src/app/reach.ts
21461
+ var command = "curl -fsSL https://get.sliccy.ai/slicc | sh";
21462
+ var startCommand = "slicc";
21463
+ var nodeCommand = "npx sliccy@next";
21464
+ var reachStyles = i`
21465
+ .command {
21466
+ display: flex;
21467
+ align-items: center;
21468
+ gap: var(--swc-spacing-100);
21469
+ padding: var(--swc-spacing-75) var(--swc-spacing-75) var(--swc-spacing-75) var(--swc-spacing-200);
21470
+ border-radius: var(--swc-corner-radius-medium-default);
21471
+ background: var(--swc-background-layer-1-color);
21472
+ }
21473
+ code {
21474
+ flex: 1;
21475
+ min-width: 0;
21476
+ overflow-wrap: break-word;
21477
+ word-break: normal;
21478
+ font-family: var(--swc-code-font-family-stack);
21479
+ font-size: var(--swc-font-size-75);
21480
+ color: var(--swc-code-color);
21481
+ user-select: all;
21482
+ }
21483
+ .commands {
21484
+ display: grid;
21485
+ gap: var(--swc-spacing-100);
21486
+ }
21487
+ .commands p {
21488
+ margin: 0;
21489
+ font-size: var(--swc-font-size-75);
21490
+ color: var(--swc-neutral-subdued-content-color-default);
21491
+ }
21492
+ `;
21493
+ function block2(text5, copied, copy, first2 = false) {
21494
+ const done2 = copied === text5;
21495
+ return b`<div class="command" data-command=${text5}>
21496
+ <code>${breakable(text5)}</code>
21497
+ <swc-action-button size="s" quiet data-action=${first2 ? "copy-command" : A} accessible-label=${done2 ? "Copied" : `Copy ${text5}`} @click=${() => copy(text5)}>
21498
+ <swc-icon-copy slot="icon"></swc-icon-copy>${done2 ? "Copied" : "Copy"}
21499
+ </swc-action-button>
21500
+ </div>`;
21501
+ }
21502
+ function breakable(text5) {
21503
+ return text5.split("/").map(
21504
+ (part2, index2, parts3) => b`${part2}${index2 < parts3.length - 1 ? b`/<wbr />` : A}`
21505
+ );
21506
+ }
21507
+ function reach({ intro, extensionUrl, copied, uncopied, copy }) {
21508
+ return b`<p>${intro}</p>
21509
+ ${extensionUrl ? b`<p><a class="swc-Link" href=${extensionUrl} target="_blank" rel="noopener noreferrer" data-action="install-extension">Install the Chrome extension</a></p>` : A}
21510
+ <p>To run slicc, enter this in a terminal:</p>
21511
+ <div class="commands">
21512
+ ${block2(command, copied, copy, true)}
21513
+ ${block2(startCommand, copied, copy)}
21514
+ </div>
21515
+ <div class="commands" data-commands="node">
21516
+ <p>With Node:</p>
21517
+ ${block2(nodeCommand, copied, copy)}
21518
+ </div>
21519
+ ${uncopied ? b`<div class="error" role="alert" data-error="copy"><swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle><span>Couldn’t copy. Select the command and copy it.</span></div>` : A}`;
21520
+ }
21521
+ async function copyText(text5) {
21522
+ try {
21523
+ await globalThis.navigator.clipboard.writeText(text5);
21524
+ return true;
21525
+ } catch {
21526
+ return false;
21527
+ }
21528
+ }
21529
+
21439
21530
  // src/app/sign-in.ts
21440
21531
  var continuing = "Continue in the sign-in window that opened.";
21441
21532
  var closed = "Closed the sign-in window? Cancel, then Log in again.";
@@ -21463,6 +21554,116 @@ var SignInWaits = class {
21463
21554
  this.#since.delete(key2);
21464
21555
  }
21465
21556
  };
21557
+ var signInCopy = { shownFor: 2e3 };
21558
+ var SignInCopies = class {
21559
+ #copied = /* @__PURE__ */ new Map();
21560
+ #update;
21561
+ constructor(update) {
21562
+ this.#update = update;
21563
+ }
21564
+ state(key2) {
21565
+ return this.#copied.get(key2)?.state;
21566
+ }
21567
+ async copy(key2, code3) {
21568
+ let state2 = "done";
21569
+ try {
21570
+ await globalThis.navigator.clipboard.writeText(code3);
21571
+ } catch {
21572
+ state2 = "failed";
21573
+ }
21574
+ const entry = { state: state2 };
21575
+ this.#copied.set(key2, entry);
21576
+ this.#update();
21577
+ setTimeout(() => {
21578
+ if (this.#copied.get(key2) !== entry) return;
21579
+ this.#copied.delete(key2);
21580
+ this.#update();
21581
+ }, signInCopy.shownFor);
21582
+ }
21583
+ };
21584
+ var signInHosts = /* @__PURE__ */ new Map([
21585
+ ["openai-codex", ["auth.openai.com"]],
21586
+ ["xai", ["accounts.x.ai"]],
21587
+ ["kimi-coding", ["www.kimi.com"]]
21588
+ ]);
21589
+ function signInPage(id, url) {
21590
+ let page;
21591
+ try {
21592
+ page = new URL(url);
21593
+ } catch {
21594
+ return null;
21595
+ }
21596
+ const plain3 = page.protocol === "https:" && !page.username && !page.password && !page.port;
21597
+ return plain3 && signInHosts.get(id)?.includes(page.hostname) ? page.href : null;
21598
+ }
21599
+ var unknownPage = "This sign-in page isn\u2019t one SLICC knows. Check the address before you go there.";
21600
+ function pageLink(url, known) {
21601
+ if (known)
21602
+ return b`<a class="swc-Link swc-Link--standalone swc-Link--quiet" href=${known} target="_blank" rel="noopener noreferrer" data-action="open-sign-in">Open the sign-in page</a>`;
21603
+ if (!url) return A;
21604
+ return b`<p class="unknown" data-id="sign-in-unknown"><swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle><span>${unknownPage}</span></p>
21605
+ <span class="address" data-id="sign-in-url">${breakable(url)}</span>`;
21606
+ }
21607
+ var copyLabels = { done: "Copied", failed: "Couldn\u2019t copy" };
21608
+ function codeBlock(code3, copied, copy, size4) {
21609
+ const label = copied ? copyLabels[copied] : "Copy";
21610
+ return b`<p class="enter">Enter this code on the sign-in page:</p>
21611
+ <div class="code-row">
21612
+ <span class="code" data-id="sign-in-code">${code3}</span>
21613
+ <swc-action-button size=${size4} quiet data-action="copy-sign-in-code" accessible-label=${copied ? label : "Copy the code"} @click=${() => copy(code3)}><swc-icon-copy slot="icon"></swc-icon-copy>${label}</swc-action-button>
21614
+ <span class="sr" role="status">${copied ? label : ""}</span>
21615
+ </div>`;
21616
+ }
21617
+ function signInDetails(id, signIn, copied, copy, size4 = "m") {
21618
+ if (!(signIn?.code || signIn?.url)) return A;
21619
+ return b`<div class="sign-in" data-sign-in>
21620
+ ${signIn.code ? codeBlock(signIn.code, copied, copy, size4) : A}
21621
+ ${pageLink(signIn.url, signInPage(id, signIn.url))}
21622
+ </div>`;
21623
+ }
21624
+ var signInCss = i`
21625
+ .sign-in {
21626
+ display: grid;
21627
+ justify-items: start;
21628
+ gap: var(--swc-spacing-75);
21629
+ }
21630
+ .sign-in .enter {
21631
+ margin: 0;
21632
+ }
21633
+ .sign-in .code-row {
21634
+ display: flex;
21635
+ flex-wrap: wrap;
21636
+ align-items: center;
21637
+ gap: var(--swc-spacing-100);
21638
+ }
21639
+ .sign-in .unknown {
21640
+ display: flex;
21641
+ align-items: flex-start;
21642
+ gap: var(--swc-spacing-75);
21643
+ margin: 0;
21644
+ color: var(--swc-neutral-subdued-content-color-default);
21645
+ --swc-icon-color: var(--swc-notice-visual-color);
21646
+ }
21647
+ .sign-in .unknown swc-icon-alert-triangle {
21648
+ flex: none;
21649
+ margin-block-start: var(--swc-spacing-50);
21650
+ }
21651
+ .sign-in .address {
21652
+ font-family: var(--swc-code-font-family-stack);
21653
+ color: var(--swc-neutral-content-color-default);
21654
+ overflow-wrap: anywhere;
21655
+ user-select: text;
21656
+ }
21657
+ .sign-in .code {
21658
+ font-family: var(--swc-code-font-family-stack);
21659
+ font-size: var(--swc-heading-size-s);
21660
+ font-weight: var(--swc-bold-font-weight);
21661
+ line-height: var(--swc-heading-line-height);
21662
+ color: var(--swc-neutral-content-color-default);
21663
+ overflow-wrap: anywhere;
21664
+ user-select: all;
21665
+ }
21666
+ `;
21466
21667
 
21467
21668
  // src/app/messages.ts
21468
21669
  var alone = { calls: [], live: false };
@@ -21604,6 +21805,7 @@ function errorCard(item2, handlers) {
21604
21805
  ${resolved ? A : b`<span class="sr">Error: </span>`}<span class="lead">${title}</span>
21605
21806
  ${text5 ? b`<span class="detail" role=${login ? "status" : A}>${text5}</span>` : A}
21606
21807
  ${fix ? b`<div class="fix" aria-live="off">${fixButton(fix, item2, handlers, login)}</div>` : A}
21808
+ ${signing ? signInDetails(item2.account, login.signIn, login.copied, (code3) => handlers.copySignIn?.(item2.account, id, code3), "s") : A}
21607
21809
  ${failure2 ? b`<div class="help" data-error="login"><sp-help-text size="s" variant="negative" icon>${failure2}</sp-help-text><swc-action-button size="s" quiet data-action="settings" @click=${() => handlers.action("settings", item2.id, item2.account)}>Open settings</swc-action-button></div>` : A}
21608
21810
  </div>`;
21609
21811
  }
@@ -22012,6 +22214,7 @@ function assistant(message, name, model, handlers, showThinking, suggestion = nu
22012
22214
  action: (action, _id, account) => handlers.action(action, message.id, account),
22013
22215
  login: (account) => handlers.login?.(account, message.id),
22014
22216
  cancelLogin: (account) => handlers.cancelLogin?.(account, message.id),
22217
+ copySignIn: (account, _id, code3) => handlers.copySignIn?.(account, message.id, code3),
22015
22218
  dropping: () => handlers.dropping(message.id)
22016
22219
  },
22017
22220
  showThinking
@@ -22778,6 +22981,9 @@ var messageCss = i`
22778
22981
  .error-card swc-button {
22779
22982
  white-space: nowrap;
22780
22983
  }
22984
+ .error-card .sign-in {
22985
+ grid-column: 2 / -1;
22986
+ }
22781
22987
  .error-card .help {
22782
22988
  grid-column: 2 / -1;
22783
22989
  display: flex;
@@ -23354,6 +23560,80 @@ function owner(node2) {
23354
23560
  }
23355
23561
  return node2.ownerDocument;
23356
23562
  }
23563
+ function pageOf(key2) {
23564
+ const known = pages.get(key2);
23565
+ if (known) return known;
23566
+ const owned = /* @__PURE__ */ new Set();
23567
+ const found = {
23568
+ rows: restore(owned),
23569
+ owned,
23570
+ draft: null,
23571
+ hosts: /* @__PURE__ */ new Set(),
23572
+ watched: /* @__PURE__ */ new Map()
23573
+ };
23574
+ pages.set(key2, found);
23575
+ return found;
23576
+ }
23577
+ function settle(page, rows2) {
23578
+ page.rows = rows2;
23579
+ keep(page.owned, rows2);
23580
+ for (const host4 of [...page.hosts]) host4.requestUpdate();
23581
+ }
23582
+ function post(model, id, message) {
23583
+ const attachments = message.attachments ?? [];
23584
+ const done2 = () => retire(model.agent, id, attachments);
23585
+ model.agent.send(id, { ...message, attachments }).then(done2, done2);
23586
+ }
23587
+ function deliver(model, id, message, mode2) {
23588
+ const busy = model.agent.busy(id);
23589
+ const resolved = mode2 === "queue" ? busy ? "queue" : "send" : busy || mode2 === "steer" ? "steer" : "send";
23590
+ post(model, id, { text: message.text, attachments: message.attachments, mode: resolved });
23591
+ }
23592
+ function arrived(page, model) {
23593
+ const waiting3 = page.rows;
23594
+ const agents = model.agent.list();
23595
+ if (!(waiting3.length && agents.length) || model.agent.starting?.()) return;
23596
+ const active = model.agent.active();
23597
+ const id = agents.some((agent) => agent.id === active) ? active : agents[0].id;
23598
+ const sendable = (row) => !!(row.text || row.attachments.length) && !row.lost?.length;
23599
+ const [first2, ...rest] = waiting3.filter(sendable);
23600
+ if (!first2) return;
23601
+ const held2 = waiting3.filter((row) => !sendable(row));
23602
+ settle(page, held2);
23603
+ deliver(model, id, first2, "queue");
23604
+ for (const { text: text5, attachments } of rest) post(model, id, { text: text5, attachments, mode: "queue" });
23605
+ }
23606
+ function watch(page, model) {
23607
+ const arrive = () => arrived(page, model);
23608
+ let live = true;
23609
+ queueMicrotask(() => {
23610
+ if (live) arrive();
23611
+ });
23612
+ const known = page.watched.get(model);
23613
+ if (known) known.count++;
23614
+ else {
23615
+ const offs = [
23616
+ model.agent.on("agents", arrive),
23617
+ ...model.agent.starting ? [model.agent.on("starting", arrive)] : []
23618
+ ];
23619
+ page.watched.set(model, {
23620
+ count: 1,
23621
+ off: () => {
23622
+ for (const off of offs) off();
23623
+ }
23624
+ });
23625
+ }
23626
+ return () => {
23627
+ live = false;
23628
+ const entry = page.watched.get(model);
23629
+ if (--entry.count) return;
23630
+ entry.off();
23631
+ page.watched.delete(model);
23632
+ };
23633
+ }
23634
+ function flushStarting(node2, model) {
23635
+ return watch(pageOf(owner(node2)), model);
23636
+ }
23357
23637
  var PageQueue = class {
23358
23638
  #host;
23359
23639
  #owner = null;
@@ -23363,22 +23643,13 @@ var PageQueue = class {
23363
23643
  }
23364
23644
  #page() {
23365
23645
  this.#owner ??= this.#host.isConnected ? owner(this.#host) : null;
23366
- const page = this.#owner ?? this.#host.ownerDocument;
23367
- const known = pages.get(page);
23368
- if (known) return known;
23369
- const owned = /* @__PURE__ */ new Set();
23370
- const found = { rows: restore(owned), owned, draft: null, hosts: /* @__PURE__ */ new Set() };
23371
- pages.set(page, found);
23372
- return found;
23646
+ return pageOf(this.#owner ?? this.#host.ownerDocument);
23373
23647
  }
23374
23648
  get value() {
23375
23649
  return this.#page().rows;
23376
23650
  }
23377
23651
  set value(rows2) {
23378
- const page = this.#page();
23379
- page.rows = rows2;
23380
- keep(page.owned, rows2);
23381
- for (const host4 of [...page.hosts]) host4.requestUpdate();
23652
+ settle(this.#page(), rows2);
23382
23653
  }
23383
23654
  get draft() {
23384
23655
  return this.#page().draft;
@@ -23386,6 +23657,9 @@ var PageQueue = class {
23386
23657
  set draft(draft2) {
23387
23658
  this.#page().draft = draft2;
23388
23659
  }
23660
+ watch(model) {
23661
+ return this.#owner === this.#host.ownerDocument ? [watch(this.#page(), model)] : [];
23662
+ }
23389
23663
  hostConnected() {
23390
23664
  this.#owner = owner(this.#host);
23391
23665
  this.#page().hosts.add(this.#host);
@@ -23912,13 +24186,13 @@ var SliccComposer = class extends ThemedElement {
23912
24186
  globalThis.removeEventListener("blur", this.#release);
23913
24187
  clearValues(this.renderRoot);
23914
24188
  const kept3 = this.#waiting.draft?.attachments;
23915
- const held = [
24189
+ const held2 = [
23916
24190
  this.attachments === kept3 ? [] : this.attachments,
23917
24191
  ...[...this.#drafts.values()].map((draft2) => draft2.attachments)
23918
24192
  ];
23919
- if (held.flat().some((attachment2) => attachment2.url?.startsWith("blob:")))
24193
+ if (held2.flat().some((attachment2) => attachment2.url?.startsWith("blob:")))
23920
24194
  this.#abandon = setTimeout(() => {
23921
- for (const attachments of held) release(attachments);
24195
+ for (const attachments of held2) release(attachments);
23922
24196
  }, linger);
23923
24197
  }
23924
24198
  updated(changed2) {
@@ -23946,9 +24220,9 @@ var SliccComposer = class extends ThemedElement {
23946
24220
  this.#paths = entries.filter((entry) => entry.kind === "file").map((entry) => entry.path);
23947
24221
  });
23948
24222
  const update = () => this.requestUpdate();
23949
- queueMicrotask(() => this.#arrived());
23950
24223
  return [
23951
24224
  ...super.subscribe(model),
24225
+ ...this.#waiting.watch(model),
23952
24226
  model.agent.on("active", (id) => {
23953
24227
  if (!this.agent) this.#switch(id);
23954
24228
  }),
@@ -23956,15 +24230,11 @@ var SliccComposer = class extends ThemedElement {
23956
24230
  if (hold2?.reason !== "locked") this.blocked = false;
23957
24231
  update();
23958
24232
  }),
23959
- model.agent.on("agents", () => {
23960
- this.#arrived();
23961
- update();
23962
- }),
24233
+ model.agent.on("agents", update),
23963
24234
  ...model.agent.starting ? [
23964
24235
  model.agent.on("starting", () => {
23965
24236
  if (this.#starting() && this.popup?.kind !== "file" && this.popup?.kind !== "secret")
23966
24237
  this.popup = null;
23967
- this.#arrived();
23968
24238
  update();
23969
24239
  })
23970
24240
  ] : [],
@@ -23981,21 +24251,6 @@ var SliccComposer = class extends ThemedElement {
23981
24251
  #starting() {
23982
24252
  return this.model?.agent.starting?.() ?? null;
23983
24253
  }
23984
- #arrived() {
23985
- const model = this.model;
23986
- const waiting3 = this.#waiting.value;
23987
- const agents = model?.agent.list() ?? [];
23988
- if (!(model && waiting3.length && agents.length) || this.#starting()) return;
23989
- const active = model.agent.active();
23990
- const id = agents.some((agent) => agent.id === active) ? active : agents[0].id;
23991
- const sendable = (row) => !!(row.text || row.attachments.length) && !row.lost?.length;
23992
- const [first2, ...rest] = waiting3.filter(sendable);
23993
- if (!first2) return;
23994
- this.#waiting.value = waiting3.filter((row) => !sendable(row));
23995
- this.#deliver(model, id, first2, "queue");
23996
- for (const { text: text5, attachments } of rest)
23997
- this.#post(model, id, { text: text5, attachments, mode: "queue" });
23998
- }
23999
24254
  #putBack(row) {
24000
24255
  this.value = this.value.trim() ? `${this.value}
24001
24256
  ${row.text}` : row.text;
@@ -24076,17 +24331,7 @@ ${row.text}` : row.text;
24076
24331
  known.run(model, this.#agent, (command3[2] ?? "").trim());
24077
24332
  return;
24078
24333
  }
24079
- this.#deliver(model, this.#agent, { text: text5, attachments }, mode2);
24080
- }
24081
- #deliver(model, id, message, mode2) {
24082
- const busy = model.agent.busy(id);
24083
- const resolved = mode2 === "queue" ? busy ? "queue" : "send" : busy || mode2 === "steer" ? "steer" : "send";
24084
- this.#post(model, id, { text: message.text, attachments: message.attachments, mode: resolved });
24085
- }
24086
- #post(model, id, message) {
24087
- const attachments = message.attachments ?? [];
24088
- const done2 = () => retire(model.agent, id, attachments);
24089
- model.agent.send(id, { ...message, attachments }).then(done2, done2);
24334
+ deliver(model, this.#agent, { text: text5, attachments }, mode2);
24090
24335
  }
24091
24336
  #propose(model, text5) {
24092
24337
  this.value = "";
@@ -24581,10 +24826,10 @@ ${this.value}` : text5;
24581
24826
  if (!hold2) return A;
24582
24827
  const locked = hold2.reason === "locked";
24583
24828
  const vault = this.model?.vault;
24584
- const held = hold2.held === 1 ? "1 tool result held" : `${hold2.held} tool results held`;
24829
+ const held2 = hold2.held === 1 ? "1 tool result held" : `${hold2.held} tool results held`;
24585
24830
  return b`<div class="hold" role="status" data-hold=${hold2.reason}>
24586
24831
  ${locked ? b`<swc-icon-lock size="s" aria-hidden="true"></swc-icon-lock>` : b`<swc-progress-circle size="s" label="Waiting" aria-hidden="true"></swc-progress-circle>`}
24587
- <span class="text">${locked ? "Unlock the vault to continue" : "Waiting for the vault"}${hold2.held ? b`<span class="held"> · ${held}</span>` : A}</span>
24832
+ <span class="text">${locked ? "Unlock the vault to continue" : "Waiting for the vault"}${hold2.held ? b`<span class="held"> · ${held2}</span>` : A}</span>
24588
24833
  ${locked && vault ? b`<slicc-vault-button
24589
24834
  data-action="unlock-vault"
24590
24835
  .vault=${vault}
@@ -24628,18 +24873,18 @@ ${this.value}` : text5;
24628
24873
  #starter(message) {
24629
24874
  const lost2 = message.lost ?? [];
24630
24875
  const empty5 = !(message.text || message.attachments.length);
24631
- const held = !empty5 && lost2.length > 0;
24632
- const alert = empty5 || held;
24876
+ const held2 = !empty5 && lost2.length > 0;
24877
+ const alert = empty5 || held2;
24633
24878
  const files = message.attachments.length;
24634
- return b`<li class="queued" data-id=${message.id} data-mode="starting" ?data-unsent=${empty5} ?data-held=${held}>
24879
+ return b`<li class="queued" data-id=${message.id} data-mode="starting" ?data-unsent=${empty5} ?data-held=${held2}>
24635
24880
  ${alert ? b`<swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle>` : b`<swc-icon-clock size="s" aria-hidden="true"></swc-icon-clock>`}
24636
24881
  ${message.text ? A : b`<swc-icon-file size="xs" aria-hidden="true"></swc-icon-file>`}
24637
24882
  <span class="body">
24638
- <span class="text"><span class="sr">${held ? "Held: " : "Queued: "}</span>${message.text || names(message.attachments) || names(lost2)}</span>
24639
- ${lost2.length ? b`<span class="lost" data-lost title=${names(lost2)}><span class="sr">, </span>${held ? notKept(lost2) : "Not kept after reload"}${lost2.length > 1 ? b`<span class="sr"> (${names(lost2)})</span>` : A}</span>` : A}
24883
+ <span class="text"><span class="sr">${held2 ? "Held: " : "Queued: "}</span>${message.text || names(message.attachments) || names(lost2)}</span>
24884
+ ${lost2.length ? b`<span class="lost" data-lost title=${names(lost2)}><span class="sr">, </span>${held2 ? notKept(lost2) : "Not kept after reload"}${lost2.length > 1 ? b`<span class="sr"> (${names(lost2)})</span>` : A}</span>` : A}
24640
24885
  </span>
24641
24886
  ${message.text && files ? b`<span class="next" data-files><swc-icon-file size="xs" aria-hidden="true"></swc-icon-file><span class="sr">, </span>${files === 1 ? "1 file" : `${files} files`}</span>` : A}
24642
- ${held ? b`<swc-action-button size="s" quiet data-action="restore-starting" accessible-label=${`Put back: ${message.text}`} @click=${() => this.#putBack(message)}>Put back</swc-action-button>` : b`<span class="next">${empty5 ? "Not sent. Attach the files again." : "Sent when the agent starts"}</span>`}
24887
+ ${held2 ? b`<swc-action-button size="s" quiet data-action="restore-starting" accessible-label=${`Put back: ${message.text}`} @click=${() => this.#putBack(message)}>Put back</swc-action-button>` : b`<span class="next">${empty5 ? "Not sent. Attach the files again." : "Sent when the agent starts"}</span>`}
24643
24888
  <swc-close-button size="s" data-action="unqueue" accessible-label=${alert ? "Dismiss" : "Remove from queue"} @click=${() => this.#unwait(message.id)}></swc-close-button>
24644
24889
  </li>`;
24645
24890
  }
@@ -24687,7 +24932,7 @@ ${this.value}` : text5;
24687
24932
  const canSend = !!this.value.trim() || this.attachments.some((attachment2) => !attachment2.error);
24688
24933
  const pushToTalk = this.model?.settings.get().pushToTalk ?? false;
24689
24934
  const talk = !!speech();
24690
- const held = this.#held();
24935
+ const held2 = this.#held();
24691
24936
  const starting = this.#starting();
24692
24937
  const back = new Set(
24693
24938
  this.attachments.filter((attachment2) => !attachment2.error).map((attachment2) => attachment2.name)
@@ -24707,8 +24952,8 @@ ${this.value}` : text5;
24707
24952
  send-label=${busy ? "Steer" : "Send"}
24708
24953
  max-rows="10"
24709
24954
  ?generating=${busy && !canSend}
24710
- ?disabled=${!!held}
24711
- placeholder=${held ? `Reconnecting to ${held}\u2026` : starting ? starting : suggestion ? `${suggestion} (Tab)` : `Message ${agent?.name ?? ""}`}
24955
+ ?disabled=${!!held2}
24956
+ placeholder=${held2 ? `Reconnecting to ${held2}\u2026` : starting ? starting : suggestion ? `${suggestion} (Tab)` : `Message ${agent?.name ?? ""}`}
24712
24957
  .value=${l(this.value)}
24713
24958
  @keydown=${this.#keys}
24714
24959
  @swc-prompt-field-input=${this.#input}
@@ -24812,12 +25057,12 @@ function settleModels(model) {
24812
25057
  if (settling.has(model) || !controls(model)) return;
24813
25058
  settling.add(model);
24814
25059
  try {
24815
- settle(model);
25060
+ settle2(model);
24816
25061
  } finally {
24817
25062
  settling.delete(model);
24818
25063
  }
24819
25064
  }
24820
- function settle(model) {
25065
+ function settle2(model) {
24821
25066
  const offered = chatModels(model.settings.models());
24822
25067
  const pick = fallbackModel(offered);
24823
25068
  if (!pick) return;
@@ -25140,8 +25385,8 @@ function dock(entries, messages, seat) {
25140
25385
  return { items, asks };
25141
25386
  }
25142
25387
  var failed = (message) => message.role === "assistant" ? message.status === "error" : message.role === "system" && message.kind === "error";
25143
- function empty3(watch, seat, name) {
25144
- if (watch) return "No messages yet.";
25388
+ function empty3(watch2, seat, name) {
25389
+ if (watch2) return "No messages yet.";
25145
25390
  return seat ? `No messages yet. Say hello to ${name}.` : `No messages yet. Ask ${name} something.`;
25146
25391
  }
25147
25392
  function carriesFiles(event2) {
@@ -25248,6 +25493,8 @@ var SliccChat = class _SliccChat extends ThemedElement {
25248
25493
  markdownCss,
25249
25494
  messageCss,
25250
25495
  clampCss,
25496
+ r(link_default),
25497
+ signInCss,
25251
25498
  i`
25252
25499
  :host {
25253
25500
  position: relative;
@@ -25518,6 +25765,9 @@ var SliccChat = class _SliccChat extends ThemedElement {
25518
25765
  action: (action, messageId, account) => this.#action(action, messageId, account),
25519
25766
  login: (account, messageId) => this.#loginState(account, messageId),
25520
25767
  cancelLogin: (account, messageId) => this.#cancelLogin(account, messageId),
25768
+ copySignIn: (account, messageId, code3) => {
25769
+ void this.#copies.copy(`${messageId}:${account}`, code3);
25770
+ },
25521
25771
  dropping: (messageId) => failedTurns(this.model.agent.messages(this.#id()), messageId).length,
25522
25772
  open: (path2) => this.dispatchEvent(
25523
25773
  new CustomEvent("open-file", { detail: { path: path2 }, bubbles: true, composed: true })
@@ -25536,7 +25786,7 @@ var SliccChat = class _SliccChat extends ThemedElement {
25536
25786
  }
25537
25787
  };
25538
25788
  subscribe(model) {
25539
- const settle2 = () => {
25789
+ const settle3 = () => {
25540
25790
  settleModels(model);
25541
25791
  this.requestUpdate();
25542
25792
  };
@@ -25551,14 +25801,14 @@ var SliccChat = class _SliccChat extends ThemedElement {
25551
25801
  return [
25552
25802
  ...super.subscribe(model),
25553
25803
  () => width.disconnect(),
25554
- model.settings.on("settings", settle2),
25555
- model.settings.on("accounts", settle2),
25804
+ model.settings.on("settings", settle3),
25805
+ model.settings.on("accounts", settle3),
25556
25806
  model.agent.on("active", () => {
25557
25807
  if (!this.agent) this.#refresh(true);
25558
25808
  }),
25559
- model.agent.on("agents", settle2),
25809
+ model.agent.on("agents", settle3),
25560
25810
  ...model.tabs ? [model.tabs.on("tabs", () => this.requestUpdate())] : [],
25561
- ...onWatch(model, settle2),
25811
+ ...onWatch(model, settle3),
25562
25812
  ...model.agent.starting ? [model.agent.on("starting", () => this.requestUpdate())] : [],
25563
25813
  model.agent.on("messages", (agentId) => {
25564
25814
  if (agentId === this.#id()) this.#refresh(this.#sent(agentId));
@@ -25760,8 +26010,8 @@ var SliccChat = class _SliccChat extends ThemedElement {
25760
26010
  this.#observe();
25761
26011
  }
25762
26012
  focus() {
25763
- if (!touched && globalThis.matchMedia("(pointer: fine)").matches)
25764
- this.focusOn("slicc-composer", ".log");
26013
+ if (touched) return;
26014
+ if (globalThis.matchMedia("(pointer: fine)").matches) this.focusOn("slicc-composer", ".log");
25765
26015
  else this.focusOn(".log");
25766
26016
  }
25767
26017
  #id() {
@@ -25798,6 +26048,7 @@ var SliccChat = class _SliccChat extends ThemedElement {
25798
26048
  }
25799
26049
  #logins = /* @__PURE__ */ new Map();
25800
26050
  #waits = new SignInWaits(() => this.requestUpdate());
26051
+ #copies = new SignInCopies(() => this.requestUpdate());
25801
26052
  #loginState(accountId, messageId) {
25802
26053
  const settings = this.model.settings;
25803
26054
  const account = settings.accounts().find((candidate) => candidate.id === accountId);
@@ -25806,7 +26057,14 @@ var SliccChat = class _SliccChat extends ThemedElement {
25806
26057
  const window2 = account?.auth === "oauth";
25807
26058
  const key2 = `${messageId}:${accountId}`;
25808
26059
  if (account?.status === "signing-in" || local2?.pending)
25809
- return { state: "signing-in", cancel, window: window2, waited: window2 && this.#waits.waited(key2) };
26060
+ return {
26061
+ state: "signing-in",
26062
+ cancel,
26063
+ window: window2,
26064
+ waited: window2 && this.#waits.waited(key2),
26065
+ signIn: account?.status === "signing-in" ? account.signIn : void 0,
26066
+ copied: this.#copies.state(key2)
26067
+ };
25810
26068
  this.#waits.done(key2);
25811
26069
  if (account?.status === "connected") return { state: "connected", provider: account.provider };
25812
26070
  return { state: "idle", error: local2?.error };
@@ -26020,9 +26278,9 @@ var SliccChat = class _SliccChat extends ThemedElement {
26020
26278
  this.#handlers.model = this.model ?? null;
26021
26279
  const agent = this.#agent();
26022
26280
  this.#switched(agent);
26023
- const watch = watchOnly(this.model);
26281
+ const watch2 = watchOnly(this.model);
26024
26282
  const seat = this.model?.seat;
26025
- this.#handlers.readOnly = !!agent?.frozen || !!watch || !!seat;
26283
+ this.#handlers.readOnly = !!agent?.frozen || !!watch2 || !!seat;
26026
26284
  this.#handlers.agentId = agent?.id;
26027
26285
  this.#handlers.seat = seat?.label;
26028
26286
  const messages = agent ? this.model?.agent.messages(agent.id) ?? [] : [];
@@ -26055,7 +26313,7 @@ var SliccChat = class _SliccChat extends ThemedElement {
26055
26313
  items,
26056
26314
  ([key2]) => key2,
26057
26315
  ([, item2]) => item2
26058
- )}</swc-conversation-thread>` : this.model?.tabs?.state().role === "connecting" ? b`<div class="empty" data-connecting>${connecting}</div>` : this.model?.agent.starting?.() ? A : b`<div class="empty" data-empty>${empty3(watch, seat, agent?.name ?? "the agent")}</div>`}
26316
+ )}</swc-conversation-thread>` : this.model?.tabs?.state().role === "connecting" ? b`<div class="empty" data-connecting>${connecting}</div>` : this.model?.agent.starting?.() ? A : b`<div class="empty" data-empty>${empty3(watch2, seat, agent?.name ?? "the agent")}</div>`}
26059
26317
  </div>
26060
26318
  </div>
26061
26319
  ${this.behind ? this.#latest(count2 - this.#mark) : A}
@@ -26068,28 +26326,28 @@ var SliccChat = class _SliccChat extends ThemedElement {
26068
26326
  </swc-illustrated-message>
26069
26327
  </swc-dropzone>` : A}
26070
26328
  <p class="sr" role="status" data-announce="drop">${this.dropping ? "Drop to attach files to your message" : ""}</p>
26071
- ${watch ? watch === following(this.model)?.refused ? A : b`<p class="watch-only" role="note" data-follow="watch">${watch}</p>` : this.model && !agent?.frozen ? b`<slicc-composer .model=${this.model} .agent=${this.agent}></slicc-composer>` : A}
26329
+ ${watch2 ? watch2 === following(this.model)?.refused ? A : b`<p class="watch-only" role="note" data-follow="watch">${watch2}</p>` : this.model && !agent?.frozen ? b`<slicc-composer .model=${this.model} .agent=${this.agent}></slicc-composer>` : A}
26072
26330
  `;
26073
26331
  }
26074
26332
  };
26075
26333
 
26076
26334
  // node_modules/@adobe/spectrum-wc-icons/dist/FolderAdd.js
26077
- function e98() {
26335
+ function e99() {
26078
26336
  return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="var(--swc-icon-color, currentColor)" d="M8.373 15.498H3.25a.75.75 0 0 1-.75-.75v-8.25h14.25a.75.75 0 0 1 .75.75V9.07a.75.75 0 0 0 1.5 0V7.248c0-1.24-1.01-2.25-2.25-2.25h-5.964a.75.75 0 0 1-.566-.258L8.515 2.773a2.25 2.25 0 0 0-1.7-.775H3.25C2.01 1.998 1 3.008 1 4.248v10.5c0 1.24 1.01 2.25 2.25 2.25h5.123a.75.75 0 0 0 0-1.5m-5.123-12h3.565a.75.75 0 0 1 .567.258l1.076 1.242H2.5v-.75a.75.75 0 0 1 .75-.75"/><path fill="var(--swc-icon-color, currentColor)" d="M15 10.498a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9m2.5 5.125h-1.875v1.875a.625.625 0 1 1-1.25 0v-1.875H12.5a.625.625 0 1 1 0-1.25h1.875v-1.875a.625.625 0 1 1 1.25 0v1.875H17.5a.625.625 0 1 1 0 1.25"/></svg>';
26079
26337
  }
26080
26338
 
26081
26339
  // node_modules/@adobe/spectrum-wc-icons/dist/swc-icon-folder-add.js
26082
- var o64 = class extends a10 {
26340
+ var o65 = class extends a10 {
26083
26341
  static get styles() {
26084
26342
  return [t40];
26085
26343
  }
26086
26344
  render() {
26087
26345
  return b`
26088
- ${o16(e98())}
26346
+ ${o16(e99())}
26089
26347
  `;
26090
26348
  }
26091
26349
  };
26092
- e25("swc-icon-folder-add", o64);
26350
+ e25("swc-icon-folder-add", o65);
26093
26351
 
26094
26352
  // src/app/search.ts
26095
26353
  var searchCss = i`
@@ -26768,7 +27026,7 @@ var SliccFileView = class extends ThemedElement {
26768
27026
  var t83 = i`:host([indeterminate]) .swc-LinearProgress-fill{inline-size:100%;min-inline-size:0;transform-origin:left;transition:none;animation:indeterminate-loop-ltr 1s cubic-bezier(.45,0,.4,1) infinite;will-change:transform;&:dir(rtl){animation-name:indeterminate-loop-rtl}}@keyframes indeterminate-loop-ltr{0%{transform:translate(-70%) scaleX(.7)}to{transform:translate(100%) scaleX(.7)}}@keyframes indeterminate-loop-rtl{0%{transform:translate(100%) scaleX(.7)}to{transform:translate(-70%) scaleX(.7)}}@media(prefers-reduced-motion:reduce){:host([indeterminate]) .swc-LinearProgress-fill{animation-duration:15s;animation-timing-function:linear}}`;
26769
27027
 
26770
27028
  // node_modules/@adobe/spectrum-wc-core/dist/components/progress-bar/ProgressBar.base.js
26771
- var o65 = class extends m3(i12(i9, {
27029
+ var o66 = class extends m3(i12(i9, {
26772
27030
  validSizes: s6,
26773
27031
  defaultSize: "m"
26774
27032
  })) {
@@ -26779,10 +27037,10 @@ var o65 = class extends m3(i12(i9, {
26779
27037
  e24([n({
26780
27038
  type: Boolean,
26781
27039
  reflect: true
26782
- })], o65.prototype, "indeterminate", void 0);
27040
+ })], o66.prototype, "indeterminate", void 0);
26783
27041
 
26784
27042
  // node_modules/@adobe/spectrum-wc/dist/components/progress-bar/ProgressBar.js
26785
- var o66 = class extends o65 {
27043
+ var o67 = class extends o66 {
26786
27044
  static get styles() {
26787
27045
  return [t26, t83];
26788
27046
  }
@@ -26831,25 +27089,7 @@ var o66 = class extends o65 {
26831
27089
  };
26832
27090
 
26833
27091
  // node_modules/@adobe/spectrum-wc/dist/components/progress-bar/swc-progress-bar.js
26834
- e25("swc-progress-bar", o66);
26835
-
26836
- // node_modules/@adobe/spectrum-wc-icons/dist/Copy.js
26837
- function e99() {
26838
- return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="var(--swc-icon-color, currentColor)" d="M11.75 18h-7.5C3.01 18 2 16.99 2 15.75v-7.5C2 7.01 3.01 6 4.25 6a.75.75 0 0 1 0 1.5.75.75 0 0 0-.75.75v7.5c0 .413.337.75.75.75h7.5c.413 0 .75-.337.75-.75a.75.75 0 0 1 1.5 0c0 1.24-1.01 2.25-2.25 2.25m-5-13A.75.75 0 0 1 6 4.25C6 3.01 7.01 2 8.25 2a.75.75 0 0 1 0 1.5.75.75 0 0 0-.75.75.75.75 0 0 1-.75.75M13 3.5h-2A.75.75 0 0 1 11 2h2a.75.75 0 0 1 0 1.5"/><path fill="var(--swc-icon-color, currentColor)" d="M13 14h-2a.75.75 0 0 1 0-1.5h2a.75.75 0 0 1 0 1.5m2.75 0a.75.75 0 0 1 0-1.5c.413 0 .75-.337.75-.75a.75.75 0 0 1 1.5 0c0 1.24-1.01 2.25-2.25 2.25m1.5-9a.75.75 0 0 1-.75-.75.75.75 0 0 0-.75-.75.75.75 0 0 1 0-1.5C16.99 2 18 3.01 18 4.25a.75.75 0 0 1-.75.75m0 4.75A.75.75 0 0 1 16.5 9V7A.75.75 0 0 1 18 7v2a.75.75 0 0 1-.75.75m-10.5 0A.75.75 0 0 1 6 9V7a.75.75 0 0 1 1.5 0v2a.75.75 0 0 1-.75.75M8.25 14C7.01 14 6 12.99 6 11.75a.75.75 0 0 1 1.5 0c0 .413.337.75.75.75a.75.75 0 0 1 0 1.5"/></svg>';
26839
- }
26840
-
26841
- // node_modules/@adobe/spectrum-wc-icons/dist/swc-icon-copy.js
26842
- var o67 = class extends a10 {
26843
- static get styles() {
26844
- return [t40];
26845
- }
26846
- render() {
26847
- return b`
26848
- ${o16(e99())}
26849
- `;
26850
- }
26851
- };
26852
- e25("swc-icon-copy", o67);
27092
+ e25("swc-progress-bar", o67);
26853
27093
 
26854
27094
  // src/app/disclosure.ts
26855
27095
  var chevron = b`<swc-icon-chevron-right class="chevron" size="s" aria-hidden="true"></swc-icon-chevron-right>`;
@@ -27641,76 +27881,6 @@ var SliccFreezer = class extends ModelElement {
27641
27881
  }
27642
27882
  };
27643
27883
 
27644
- // src/app/reach.ts
27645
- var command = "curl -fsSL https://get.sliccy.ai/slicc | sh";
27646
- var startCommand = "slicc";
27647
- var nodeCommand = "npx sliccy@next";
27648
- var reachStyles = i`
27649
- .command {
27650
- display: flex;
27651
- align-items: center;
27652
- gap: var(--swc-spacing-100);
27653
- padding: var(--swc-spacing-75) var(--swc-spacing-75) var(--swc-spacing-75) var(--swc-spacing-200);
27654
- border-radius: var(--swc-corner-radius-medium-default);
27655
- background: var(--swc-background-layer-1-color);
27656
- }
27657
- code {
27658
- flex: 1;
27659
- min-width: 0;
27660
- overflow-wrap: break-word;
27661
- word-break: normal;
27662
- font-family: var(--swc-code-font-family-stack);
27663
- font-size: var(--swc-font-size-75);
27664
- color: var(--swc-code-color);
27665
- user-select: all;
27666
- }
27667
- .commands {
27668
- display: grid;
27669
- gap: var(--swc-spacing-100);
27670
- }
27671
- .commands p {
27672
- margin: 0;
27673
- font-size: var(--swc-font-size-75);
27674
- color: var(--swc-neutral-subdued-content-color-default);
27675
- }
27676
- `;
27677
- function block2(text5, copied, copy, first2 = false) {
27678
- const done2 = copied === text5;
27679
- return b`<div class="command" data-command=${text5}>
27680
- <code>${breakable(text5)}</code>
27681
- <swc-action-button size="s" quiet data-action=${first2 ? "copy-command" : A} accessible-label=${done2 ? "Copied" : `Copy ${text5}`} @click=${() => copy(text5)}>
27682
- <swc-icon-copy slot="icon"></swc-icon-copy>${done2 ? "Copied" : "Copy"}
27683
- </swc-action-button>
27684
- </div>`;
27685
- }
27686
- function breakable(text5) {
27687
- return text5.split("/").map(
27688
- (part2, index2, parts3) => b`${part2}${index2 < parts3.length - 1 ? b`/<wbr />` : A}`
27689
- );
27690
- }
27691
- function reach({ intro, extensionUrl, copied, uncopied, copy }) {
27692
- return b`<p>${intro}</p>
27693
- ${extensionUrl ? b`<p><a class="swc-Link" href=${extensionUrl} target="_blank" rel="noopener noreferrer" data-action="install-extension">Install the Chrome extension</a></p>` : A}
27694
- <p>To run slicc, enter this in a terminal:</p>
27695
- <div class="commands">
27696
- ${block2(command, copied, copy, true)}
27697
- ${block2(startCommand, copied, copy)}
27698
- </div>
27699
- <div class="commands" data-commands="node">
27700
- <p>With Node:</p>
27701
- ${block2(nodeCommand, copied, copy)}
27702
- </div>
27703
- ${uncopied ? b`<div class="error" role="alert" data-error="copy"><swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle><span>Couldn’t copy. Select the command and copy it.</span></div>` : A}`;
27704
- }
27705
- async function copyText(text5) {
27706
- try {
27707
- await globalThis.navigator.clipboard.writeText(text5);
27708
- return true;
27709
- } catch {
27710
- return false;
27711
- }
27712
- }
27713
-
27714
27884
  // src/app/monitor.ts
27715
27885
  function sparkline(points, width = 120, height = 28) {
27716
27886
  if (points.length < 2) return "";
@@ -28990,9 +29160,6 @@ var o74 = class extends a10 {
28990
29160
  };
28991
29161
  e25("swc-icon-visibility-off", o74);
28992
29162
 
28993
- // node_modules/@adobe/spectrum-wc/dist/link.css
28994
- var link_default = '/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Standalone link presentation for native `<a href>` elements.\n *\n * Default anchor appearance inside `.swc-Typography--prose` and\n * `.swc-Typography--links` ships with `typography.css` (generated). Import this\n * stylesheet when authors need explicit BEM modifiers on anchors.\n *\n */\n\n.swc-Link {\n inline-size: -moz-fit-content;\n inline-size: fit-content;\n font-family: var(--swc-sans-font-family-stack);\n font-size: var(--swc-font-size-100);\n font-style: normal;\n font-weight: 400;\n line-height: 1.30;\n color: var(--swc-link-text-color-default, var(--swc-accent-color-900));\n -webkit-text-decoration: underline;\n text-decoration: underline;\n text-decoration-thickness: 1px;\n text-underline-offset: 1px;\n transition: color 130ms ease-in-out;\n\n &:hover {\n color: var(--swc-link-text-color-hover, var(--swc-accent-color-1000));\n }\n\n &:active {\n color: var(--swc-link-text-color-down, var(--swc-accent-color-1000));\n }\n\n &:focus-visible {\n color: var(--swc-link-text-color-focus, var(--swc-accent-color-1000));\n border-radius: 4px;\n outline: 2px solid var(--swc-link-focus-indicator-color, var(--swc-blue-800));\n outline-offset: 2px;\n }\n\n &:lang(ja),\n &:lang(zh),\n &:lang(ko) {\n line-height: 1.50;\n }\n}\n\n.swc-Link--standalone {\n font-weight: 500;\n}\n\n.swc-Link--secondary {\n --swc-link-text-color-default: var(--swc-gray-800);\n --swc-link-text-color-hover: var(--swc-gray-900);\n --swc-link-text-color-down: var(--swc-gray-900);\n --swc-link-text-color-focus: var(--swc-gray-900);\n}\n\n.swc-Link--staticWhite {\n --swc-link-text-color-default: var(--swc-white);\n --swc-link-text-color-hover: var(--swc-white);\n --swc-link-text-color-down: var(--swc-white);\n --swc-link-text-color-focus: var(--swc-white);\n --swc-link-focus-indicator-color: var(--swc-white);\n}\n\n.swc-Link--staticBlack {\n --swc-link-text-color-default: var(--swc-black);\n --swc-link-text-color-hover: var(--swc-black);\n --swc-link-text-color-down: var(--swc-black);\n --swc-link-text-color-focus: var(--swc-black);\n --swc-link-focus-indicator-color: var(--swc-black);\n}\n\n.swc-Link--quiet.swc-Link--standalone {\n -webkit-text-decoration: none;\n text-decoration: none;\n}\n\n.swc-Link--quiet.swc-Link--standalone:hover {\n -webkit-text-decoration: underline;\n text-decoration: underline;\n}\n';
28995
-
28996
29163
  // src/app/guests.ts
28997
29164
  var hour = 36e5;
28998
29165
  var day3 = 24 * hour;
@@ -30913,10 +31080,10 @@ var SliccNetwork = class extends ModelElement {
30913
31080
  const scroll = () => this.renderRoot.querySelector("[data-pairing]")?.scrollIntoView({ block: "nearest" });
30914
31081
  scroll();
30915
31082
  this.#settle?.disconnect();
30916
- const settle2 = new ResizeObserver(scroll);
30917
- settle2.observe(this.renderRoot.querySelector(".page"));
30918
- this.#settle = settle2;
30919
- setTimeout(() => settle2.disconnect(), 1e3);
31083
+ const settle3 = new ResizeObserver(scroll);
31084
+ settle3.observe(this.renderRoot.querySelector(".page"));
31085
+ this.#settle = settle3;
31086
+ setTimeout(() => settle3.disconnect(), 1e3);
30920
31087
  });
30921
31088
  }
30922
31089
  willUpdate(changed2) {
@@ -32656,9 +32823,9 @@ var SliccTerminalPanel = class extends ThemedElement {
32656
32823
  }
32657
32824
  #seen(panel, screen) {
32658
32825
  const sized = laid(panel.api) ? Promise.resolve() : new Promise((resolve2) => {
32659
- const watch = panel.api.onDidDimensionsChange((size4) => {
32826
+ const watch2 = panel.api.onDidDimensionsChange((size4) => {
32660
32827
  if (!laid(size4)) return;
32661
- watch.dispose();
32828
+ watch2.dispose();
32662
32829
  resolve2();
32663
32830
  });
32664
32831
  });
@@ -35619,15 +35786,29 @@ function pinVersion(item2, pin) {
35619
35786
  if (pin.base === null) return [pin.range === version2 ? version2 : `${pin.range} \u2192 ${version2}`];
35620
35787
  return [version2, pin.base === version2 ? "the version seven ships" : `seven ships ${pin.base}`];
35621
35788
  }
35789
+ function held(item2) {
35790
+ if (!item2.withheld) return item2;
35791
+ return {
35792
+ ...item2,
35793
+ offered: item2.version,
35794
+ state: item2.state === "outdated" ? "installed" : item2.state,
35795
+ actions: item2.actions.filter((action) => action !== "install" && action !== "update")
35796
+ };
35797
+ }
35622
35798
  function placed(item2) {
35623
35799
  const installs = item2.installs ?? [];
35624
- if (!installs.length) return item2;
35800
+ if (!installs.length) return held(item2);
35625
35801
  const version2 = item2.version ?? installs[0].version;
35626
35802
  const newer2 = item2.offered !== null && item2.offered !== version2;
35627
35803
  const state2 = item2.state === "available" ? newer2 ? "outdated" : "installed" : item2.state;
35628
35804
  const owned = installs.some((install) => install.manager === "panel");
35629
35805
  const hidden = new Set(owned ? ["install"] : ["install", "remove"]);
35630
- return { ...item2, version: version2, state: state2, actions: item2.actions.filter((action) => !hidden.has(action)) };
35806
+ return held({
35807
+ ...item2,
35808
+ version: version2,
35809
+ state: state2,
35810
+ actions: item2.actions.filter((action) => !hidden.has(action))
35811
+ });
35631
35812
  }
35632
35813
  var elsewhere = (item2) => (item2.installs ?? []).filter((install) => install.manager !== "panel");
35633
35814
  function installText(install, version2) {
@@ -35645,6 +35826,44 @@ function actionLabel2(item2, action) {
35645
35826
  if (action === "remove" && shared2(item2)) return `Remove the panel\u2019s copy of ${item2.label}`;
35646
35827
  return `${packageActions[action]} ${item2.label}`;
35647
35828
  }
35829
+ var plainLimit = 300;
35830
+ var entities = {
35831
+ amp: "&",
35832
+ lt: "<",
35833
+ gt: ">",
35834
+ quot: '"',
35835
+ apos: "'",
35836
+ nbsp: " ",
35837
+ copy: "\xA9",
35838
+ reg: "\xAE",
35839
+ trade: "\u2122",
35840
+ hellip: "\u2026",
35841
+ ndash: "\u2013",
35842
+ mdash: "\u2014",
35843
+ lsquo: "\u2018",
35844
+ rsquo: "\u2019",
35845
+ ldquo: "\u201C",
35846
+ rdquo: "\u201D"
35847
+ };
35848
+ var decoded = (text5) => text5.replace(/&(#x[\da-f]+|#\d+|[a-z]+);/gi, (entity, name) => {
35849
+ if (name[0] !== "#") return entities[name.toLowerCase()] ?? entity;
35850
+ const hex = /^#x/i.test(name);
35851
+ const code3 = Number.parseInt(name.slice(hex ? 2 : 1), hex ? 16 : 10);
35852
+ return code3 > 0 && code3 <= 1114111 ? String.fromCodePoint(code3) : entity;
35853
+ });
35854
+ function stripped(text5) {
35855
+ const target = String.raw`\(((?:[^()]|\([^()]*\))*)\)`;
35856
+ return decoded(text5).replace(/^[ \t]*(?:`{3,}|~{3,}).*$/gm, "").replace(/^[ \t]*(?:#{1,6}[ \t]+|>[ \t]?|[-*+][ \t]+|\d+[.)][ \t]+)+/gm, "").replace(/<!--[\s\S]*?-->/g, "").replace(/<\/?[a-z][^>]*>/gi, "").replace(new RegExp(String.raw`!\[([^\]]*)\]${target}`, "g"), "$1").replace(new RegExp(String.raw`\[([^\]]*)\]${target}`, "g"), "$1").replace(/(`+)([^\n]+?)\1(?!`)/g, "$2").replace(/(\*\*|__)(?=\S)(.+?)\1/g, "$2").replace(/\*(?=\S)([^*\n]+?)\*/g, "$1").replace(/(^|[^\w])_(?=\S)([^_\n]+?)_(?![\w])/g, "$1$2");
35857
+ }
35858
+ function plain2(text5, limit2 = plainLimit) {
35859
+ const flat = [...stripped(text5).replace(/\s+/g, " ").trim()];
35860
+ return flat.length > limit2 ? `${flat.slice(0, limit2 - 1).join("").trimEnd()}\u2026` : flat.join("");
35861
+ }
35862
+ function withheldText(reason, prefix = "Not offered") {
35863
+ const text5 = plain2(reason, 200).replace(/\.$/, "");
35864
+ return `${prefix}: ${text5}${text5.endsWith("\u2026") ? "" : "."}`;
35865
+ }
35866
+ var unreachable = (items) => items.some((item2) => item2.registry === "unreachable");
35648
35867
  var packageRunning = /* @__PURE__ */ new Set(["installing", "updating", "removing"]);
35649
35868
  var list5 = (names2) => new Intl.ListFormat("en", { type: "conjunction" }).format(names2);
35650
35869
  function requiresText(item2, all3) {
@@ -35743,6 +35962,9 @@ function whatsNew(releases, from, to, name) {
35743
35962
  const range3 = releases.filter((release3) => newer(release3.version, from) > 0 && newer(release3.version, to) <= 0).sort((a23, b13) => newer(b13.version, a23.version)).map((release3) => releaseNotes(release3, name));
35744
35963
  return range3.some((entry) => entry.body) ? range3 : [];
35745
35964
  }
35965
+ var npmPage = (name) => `https://www.npmjs.com/package/${name.split("/").map(
35966
+ (part2) => part2.startsWith("@") ? `@${encodeURIComponent(part2.slice(1))}` : encodeURIComponent(part2)
35967
+ ).join("/")}`;
35746
35968
  var secure = (url) => /^https:\/\//i.test(url);
35747
35969
  var installed2 = (releases, version2) => releases?.find((release3) => newer(release3.version, version2) === 0 && secure(release3.url));
35748
35970
  var snapshot = (items) => new Map(items.map(({ id, state: state2, error }) => [id, { state: state2, error }]));
@@ -35799,10 +36021,13 @@ var SliccUpdates = class extends ModelElement {
35799
36021
  pending: { state: true },
35800
36022
  failures: { state: true },
35801
36023
  busy: { state: true },
35802
- problems: { state: true }
36024
+ problems: { state: true },
36025
+ refreshing: { state: true },
36026
+ still: { state: true }
35803
36027
  };
35804
36028
  #logs = new ViewSet(this, "updates");
35805
36029
  #reached = /* @__PURE__ */ new Map();
36030
+ #retryHeld = false;
35806
36031
  constructor() {
35807
36032
  super();
35808
36033
  this.pending = /* @__PURE__ */ new Set();
@@ -35972,8 +36197,35 @@ var SliccUpdates = class extends ModelElement {
35972
36197
  grid-area: description;
35973
36198
  margin: 0;
35974
36199
  overflow: hidden;
35975
- text-overflow: ellipsis;
35976
- white-space: nowrap;
36200
+ display: -webkit-box;
36201
+ -webkit-box-orient: vertical;
36202
+ -webkit-line-clamp: 2;
36203
+ overflow-wrap: anywhere;
36204
+ }
36205
+ [data-registry] > .description,
36206
+ .withheld {
36207
+ color: var(--swc-neutral-subdued-content-color-default);
36208
+ }
36209
+ .withheld {
36210
+ font-size: var(--swc-font-size-75);
36211
+ line-height: var(--swc-line-height-200);
36212
+ overflow-wrap: anywhere;
36213
+ }
36214
+ .rows > li[data-registry='unreachable'] {
36215
+ grid-template-areas: 'name buttons';
36216
+ }
36217
+ .registry {
36218
+ display: flex;
36219
+ flex-wrap: wrap;
36220
+ align-items: center;
36221
+ gap: var(--swc-spacing-100) var(--swc-spacing-200);
36222
+ margin-block-end: var(--swc-spacing-100);
36223
+ }
36224
+ .registry .hint {
36225
+ margin: 0;
36226
+ }
36227
+ #packages:focus {
36228
+ outline: none;
35977
36229
  }
35978
36230
  .rows > li > .meta {
35979
36231
  justify-content: flex-start;
@@ -36109,12 +36361,6 @@ var SliccUpdates = class extends ModelElement {
36109
36361
  .rows > li {
36110
36362
  grid-template-areas: 'name buttons' 'description description';
36111
36363
  }
36112
- .description {
36113
- display: -webkit-box;
36114
- -webkit-box-orient: vertical;
36115
- -webkit-line-clamp: 2;
36116
- white-space: normal;
36117
- }
36118
36364
  }
36119
36365
  `
36120
36366
  ];
@@ -36123,6 +36369,8 @@ var SliccUpdates = class extends ModelElement {
36123
36369
  this.failures = /* @__PURE__ */ new Map();
36124
36370
  this.busy = /* @__PURE__ */ new Map();
36125
36371
  this.problems = /* @__PURE__ */ new Map();
36372
+ this.refreshing = false;
36373
+ this.still = false;
36126
36374
  this.#reached.clear();
36127
36375
  const port = model.updates;
36128
36376
  if (!port) return [];
@@ -36198,6 +36446,42 @@ var SliccUpdates = class extends ModelElement {
36198
36446
  }
36199
36447
  }
36200
36448
  }
36449
+ async refreshPackages() {
36450
+ const port = this.model?.updates;
36451
+ if (!port?.refreshPackages || this.refreshing) return;
36452
+ this.refreshing = true;
36453
+ this.still = false;
36454
+ try {
36455
+ await port.refreshPackages();
36456
+ } catch {
36457
+ } finally {
36458
+ if (this.model?.updates === port) {
36459
+ this.refreshing = false;
36460
+ this.still = unreachable(port.packages?.() ?? []);
36461
+ }
36462
+ }
36463
+ }
36464
+ willUpdate(changed2) {
36465
+ super.willUpdate(changed2);
36466
+ const active = this.shadowRoot?.activeElement;
36467
+ this.#retryHeld = active?.dataset.action === "retry-registry";
36468
+ }
36469
+ updated(changed2) {
36470
+ super.updated(changed2);
36471
+ if (this.#retryHeld && !this.renderRoot.querySelector('[data-action="retry-registry"]'))
36472
+ this.renderRoot.querySelector("#packages")?.focus();
36473
+ for (const row of this.renderRoot.querySelectorAll("li[data-id]")) {
36474
+ const description = row.querySelector(".description");
36475
+ for (const button of row.querySelectorAll(
36476
+ ".buttons swc-button"
36477
+ ))
36478
+ void button.updateComplete.then(() => {
36479
+ const inner = button.shadowRoot?.querySelector("button");
36480
+ if (inner)
36481
+ inner.ariaDescribedByElements = description && !row.dataset.registry ? [description] : [];
36482
+ });
36483
+ }
36484
+ }
36201
36485
  #prune(kind, items, busy) {
36202
36486
  const live = new Set(items.filter(busy).map((item2) => `${kind}:${item2.id}`));
36203
36487
  for (const key2 of this.#reached.keys()) {
@@ -36297,7 +36581,7 @@ var SliccUpdates = class extends ModelElement {
36297
36581
  return b`<a class="swc-Link swc-Link--standalone" href=${release3.url} target="_blank" rel="noopener noreferrer" data-action="release-notes" aria-label=${`${label} ${version2} release notes`}>Release notes</a>`;
36298
36582
  }
36299
36583
  if (!npm) return A;
36300
- return b`<a class="swc-Link swc-Link--standalone" href=${`https://www.npmjs.com/package/${npm}/v/${version2}`} target="_blank" rel="noopener noreferrer" data-action="npm-page" aria-label=${`npm page for ${label} ${version2}`}>npm page</a>`;
36584
+ return b`<a class="swc-Link swc-Link--standalone" href=${npmPage(npm)} target="_blank" rel="noopener noreferrer" data-action="npm-page" aria-label=${`npm page for ${label} ${version2}`}>npm page</a>`;
36301
36585
  }
36302
36586
  #version(item2, meta) {
36303
36587
  const text5 = meta ? b`<span data-npm-meta>${meta}</span>` : b`<span class="version">${item2.from ?? "Not installed"}${item2.to && item2.to !== item2.from ? b` → ${item2.to}` : A}</span>`;
@@ -36348,12 +36632,13 @@ var SliccUpdates = class extends ModelElement {
36348
36632
  }
36349
36633
  const version2 = item2.version === null ? item2.offered : item2.offered && item2.offered !== item2.version ? `${item2.version} \u2192 ${item2.offered}` : item2.version;
36350
36634
  const download2 = item2.size !== void 0 && (item2.version === null || item2.offered !== item2.version);
36635
+ const bytes = download2 ? `${size3(item2.size)}${item2.unpacked ? " on disk" : ""}` : "";
36351
36636
  const requires = requiresText(item2, all3);
36352
36637
  return b`<p class="meta">
36353
36638
  ${version2 ? b`<span class="version">${version2}</span>` : A}
36354
36639
  ${shared2(item2) ? b`<span data-install="panel">the panel’s copy</span>` : A}
36355
36640
  ${elsewhere(item2).map((install) => b`<span data-install>${installText(install, item2.version)}</span>`)}
36356
- ${download2 ? b`<span>${size3(item2.size)}</span>` : A}
36641
+ ${download2 ? b`<span data-size>${bytes}</span>` : A}
36357
36642
  ${requires ? b`<span data-requires>${requires}</span>` : A}
36358
36643
  ${this.#packageLink(item2)}
36359
36644
  </p>`;
@@ -36377,10 +36662,11 @@ var SliccUpdates = class extends ModelElement {
36377
36662
  #package(item2, all3, act2) {
36378
36663
  const light = packageLight(item2);
36379
36664
  const busy = this.busy.get(item2.id);
36380
- const shown4 = busy ? [busy] : act2 ? item2.actions : [];
36665
+ const actions2 = item2.registry ? item2.actions.filter((action) => action !== "retry") : item2.actions;
36666
+ const shown4 = busy ? [busy] : act2 ? actions2 : [];
36381
36667
  const error = this.problems.get(item2.id) ?? item2.error;
36382
36668
  const managed = managedText(item2);
36383
- return b`<li data-id=${item2.id} data-state=${item2.state}>
36669
+ return b`<li data-id=${item2.id} data-state=${item2.state} data-registry=${item2.registry ?? A}>
36384
36670
  <div class="name">
36385
36671
  <h3 title=${item2.package}>${item2.label}</h3>
36386
36672
  ${light ? b`<swc-status-light size="s" variant=${light[0]}>${light[1]}</swc-status-light>` : A}
@@ -36395,9 +36681,10 @@ var SliccUpdates = class extends ModelElement {
36395
36681
  @click=${() => void this.actPackage(item2.id, action)}
36396
36682
  >${packageActions[action]}</swc-button>`
36397
36683
  )}</div>
36398
- <p class="description">${item2.description}</p>
36399
- ${this.#packageMeta(item2, all3)}
36400
- ${item2.notes?.length || managed ? b`<p class="notes" data-notes>${(item2.notes ?? []).map((note) => b`<span>${note}</span>`)}${managed ? b`<span data-managed>${managed}</span>` : A}</p>` : A}
36684
+ ${item2.registry === "unreachable" ? A : b`<p class="description">${item2.registry ? "Checking npm\u2026" : plain2(item2.description)}</p>`}
36685
+ ${item2.withheld ? b`<p class="withheld" data-withheld>${withheldText(item2.withheld)}</p>` : item2.newer ? b`<p class="withheld" data-newer>${withheldText(item2.newer.reason, `${item2.newer.version} isn\u2019t offered yet`)}</p>` : A}
36686
+ ${item2.registry === "unreachable" && item2.version === null ? A : this.#packageMeta(item2, all3)}
36687
+ ${item2.notes?.length || managed ? b`<p class="notes" data-notes>${(item2.notes ?? []).map((note) => b`<span>${plain2(note)}</span>`)}${managed ? b`<span data-managed>${managed}</span>` : A}</p>` : A}
36401
36688
  ${item2.warnings?.length ? b`<p class="warnings" data-warnings>${item2.warnings.map(
36402
36689
  (warning) => b`<span><swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle>${warning}</span>`
36403
36690
  )}</p>` : A}
@@ -36420,6 +36707,24 @@ var SliccUpdates = class extends ModelElement {
36420
36707
  (item2) => this.#package(item2, all3, Boolean(port.actPackage))
36421
36708
  )}</ul>`;
36422
36709
  }
36710
+ #packagesHint(port, offered) {
36711
+ if (!unreachable(offered) && !this.refreshing)
36712
+ return b`<p class="hint">
36713
+ ${offered.length ? "Tools for the agent and the terminal. Install the ones you need; you can remove them later." : "No optional packages are offered right now."}
36714
+ </p>`;
36715
+ return b`<div class="registry" data-registry="unreachable">
36716
+ <p class="hint">${this.refreshing ? "Checking npm\u2026" : "Couldn\u2019t reach npm, so versions and sizes aren\u2019t shown."}</p>
36717
+ ${port.refreshPackages ? b`<swc-button
36718
+ size="s"
36719
+ variant="secondary"
36720
+ data-action="retry-registry"
36721
+ accessible-label="Retry reaching npm"
36722
+ ?pending=${this.refreshing}
36723
+ @click=${() => void this.refreshPackages()}
36724
+ >Retry</swc-button>` : A}
36725
+ <span class="hidden" role="status" aria-live="polite" data-still>${this.still ? "Still couldn\u2019t reach npm." : ""}</span>
36726
+ </div>`;
36727
+ }
36423
36728
  #packages(port) {
36424
36729
  if (!port?.packages) return A;
36425
36730
  const all3 = port.packages().map(placed);
@@ -36427,10 +36732,8 @@ var SliccUpdates = class extends ModelElement {
36427
36732
  const yours = all3.filter((item2) => item2.origin === "user");
36428
36733
  return b`<section data-section="packages" aria-labelledby="packages">
36429
36734
  <swc-divider size="m"></swc-divider>
36430
- <h2 id="packages">Optional packages</h2>
36431
- <p class="hint">
36432
- ${offered.length ? "Tools for the agent and the terminal. Install the ones you need; you can remove them later." : "No optional packages are offered right now."}
36433
- </p>
36735
+ <h2 id="packages" tabindex="-1">Optional packages</h2>
36736
+ ${this.#packagesHint(port, offered)}
36434
36737
  ${offered.length ? this.#list(offered, all3, port) : A}
36435
36738
  </section>
36436
36739
  ${yours.length ? b`<section data-section="user-packages" aria-labelledby="user-packages">
@@ -36785,14 +37088,14 @@ var SliccApp = class extends ThemedElement {
36785
37088
  }
36786
37089
  subscribe(model) {
36787
37090
  const update = () => this.requestUpdate();
36788
- const settle2 = () => settleModels(model);
36789
- queueMicrotask(settle2);
37091
+ const settle3 = () => settleModels(model);
37092
+ queueMicrotask(settle3);
36790
37093
  return [
36791
37094
  ...super.subscribe(model),
36792
- model.settings.on("settings", settle2),
36793
- model.settings.on("accounts", settle2),
37095
+ model.settings.on("settings", settle3),
37096
+ model.settings.on("accounts", settle3),
36794
37097
  model.agent.on("agents", () => {
36795
- settle2();
37098
+ settle3();
36796
37099
  this.#prune();
36797
37100
  update();
36798
37101
  }),
@@ -36817,17 +37120,18 @@ var SliccApp = class extends ThemedElement {
36817
37120
  ...model.tabs ? [model.tabs.on("tabs", update)] : [],
36818
37121
  ...model.agent.readOnly ? [
36819
37122
  model.agent.on("readOnly", () => {
36820
- settle2();
37123
+ settle3();
36821
37124
  update();
36822
37125
  })
36823
37126
  ] : [],
36824
37127
  ...model.follow ? [
36825
37128
  model.follow.on("follow", () => {
36826
- settle2();
37129
+ settle3();
36827
37130
  this.#followed(model);
36828
37131
  update();
36829
37132
  })
36830
- ] : []
37133
+ ] : [],
37134
+ flushStarting(this, model)
36831
37135
  ];
36832
37136
  }
36833
37137
  connectedCallback() {
@@ -37031,7 +37335,7 @@ var SliccApp = class extends ThemedElement {
37031
37335
  if (!dock2 || !this.#started) return;
37032
37336
  const known = new Set(this.model?.agent.list().map((agent2) => agent2.id));
37033
37337
  const agent = this.#active();
37034
- const held = !!agent && !!dock2.content("chat")?.shadowRoot?.activeElement;
37338
+ const held2 = !!agent && !!dock2.content("chat")?.shadowRoot?.activeElement;
37035
37339
  this.panels.quietly(() => {
37036
37340
  for (const id of chats(dock2)) {
37037
37341
  if (!known.has(chatAgent(id))) dock2.close(id);
@@ -37051,7 +37355,7 @@ var SliccApp = class extends ThemedElement {
37051
37355
  if (this.model && this.#offers("terminal"))
37052
37356
  this.terminalPanels.sync(dock2, this.model.terminals, this.screen);
37053
37357
  });
37054
- if (agent && held && this.#offers("chat")) openChat(dock2, agent, this.screen, true);
37358
+ if (agent && held2 && this.#offers("chat")) openChat(dock2, agent, this.screen, true);
37055
37359
  }
37056
37360
  #activated(event2) {
37057
37361
  const { id } = event2.detail;
@@ -37172,12 +37476,19 @@ var SliccApp = class extends ThemedElement {
37172
37476
  event2.preventDefault();
37173
37477
  this.#detach(id, null, false);
37174
37478
  }
37479
+ #railClick(event2, id) {
37480
+ if (event2.pointerType === "touch" || event2.pointerType === "pen")
37481
+ [...this.renderRoot.querySelectorAll("swc-tooltip")].find(
37482
+ (tip) => tip.getAttribute("for") === `rail-${id}`
37483
+ ).open = false;
37484
+ this.show(id);
37485
+ }
37175
37486
  #railButton(item2, side) {
37176
37487
  const changes2 = item2.id === "changes" ? this.#changes() : 0;
37177
37488
  const driven = item2.id === "browser" && !!this.model?.browser.list().some((tab) => tab.controlled);
37178
37489
  const visible2 = shown2(this.dock, item2.id);
37179
37490
  const label = `${visible2 ? `${item2.title}, shown` : `Open ${item2.title}`}${changes2 ? `, ${changeCount(changes2)}` : driven ? ", a tab is in use" : ""}`;
37180
- const button = u22`<swc-action-button id=${`rail-${item2.id}`} class=${visible2 ? "selected" : ""} quiet size="m" accessible-label=${label} data-surface=${item2.id} data-cone=${o2(item2.cone)} ?data-visible=${visible2} @click=${() => this.show(item2.id)}>${railIcon(item2.icon)}</swc-action-button>`;
37491
+ const button = u22`<swc-action-button id=${`rail-${item2.id}`} class=${visible2 ? "selected" : ""} quiet size="m" accessible-label=${label} data-surface=${item2.id} data-cone=${o2(item2.cone)} ?data-visible=${visible2} @click=${(event2) => this.#railClick(event2, item2.id)}>${railIcon(item2.icon)}</swc-action-button>`;
37181
37492
  const tooltip = b`<swc-tooltip for=${`rail-${item2.id}`} placement=${{ left: "end", right: "start", bottom: "top" }[side]}>${item2.title}</swc-tooltip>`;
37182
37493
  return changes2 ? b`<span class="badged">${button}<swc-badge size="s" variant="neutral" aria-hidden="true">${changes2}</swc-badge></span>${tooltip}` : driven ? b`<span class="badged">${button}<span class="dot" data-driven aria-hidden="true"></span></span>${tooltip}` : b`${button}${tooltip}`;
37183
37494
  }
@@ -37525,9 +37836,9 @@ function ansi2(command3) {
37525
37836
  const escape3 = /\\(?:x([0-9a-fA-F]{1,2})|u([0-9a-fA-F]{1,4})|U([0-9a-fA-F]{1,8})|([0-7]{1,3})|([\s\S]))/g;
37526
37837
  return command3.replace(
37527
37838
  /\$'((?:[^'\\]|\\[\s\S])*)'/g,
37528
- (_9, body4) => `'${body4.replace(escape3, (_match, hex, short2, long, octal, plain2) => {
37839
+ (_9, body4) => `'${body4.replace(escape3, (_match, hex, short2, long, octal, plain3) => {
37529
37840
  if (octal) return String.fromCharCode(Number.parseInt(octal, 8));
37530
- if (plain2) return plain2;
37841
+ if (plain3) return plain3;
37531
37842
  return String.fromCodePoint(
37532
37843
  Math.min(Number.parseInt(hex ?? short2 ?? long, 16), 1114111)
37533
37844
  );
@@ -37624,9 +37935,9 @@ function reach2(command3, cwd) {
37624
37935
  if (protects(start2, false)) return start2;
37625
37936
  const cwds = /* @__PURE__ */ new Set([start2]);
37626
37937
  const text5 = unglob(ansi2(command3.replace(/\\\n/g, "")));
37627
- const plain2 = text5.split(separators).map((segment2) => commas(segment2.split(/[\s<>=]+/).map((word2) => word2.replace(/['"\\]/g, ""))));
37938
+ const plain3 = text5.split(separators).map((segment2) => commas(segment2.split(/[\s<>=]+/).map((word2) => word2.replace(/['"\\]/g, ""))));
37628
37939
  const aware = shield(text5).split(separators).map((segment2) => commas(quoted(unshield(segment2))));
37629
- const segments = JSON.stringify(aware) === JSON.stringify(plain2) ? plain2 : [...plain2, ...aware];
37940
+ const segments = JSON.stringify(aware) === JSON.stringify(plain3) ? plain3 : [...plain3, ...aware];
37630
37941
  const whole = segments.some((words2) => words2.length > 0 && !trusted2(words2[0]));
37631
37942
  for (const words2 of segments) {
37632
37943
  const hit = scan2(words2, cwds, whole);
@@ -38042,9 +38353,9 @@ var SliccApprovals = class extends ModelElement {
38042
38353
  </sp-alert-dialog>`
38043
38354
  );
38044
38355
  }
38045
- const held = this.#showing && this.#pending.has(this.#showing.id) ? this.#showing : null;
38356
+ const held2 = this.#showing && this.#pending.has(this.#showing.id) ? this.#showing : null;
38046
38357
  const list6 = this.#current();
38047
- const [approval, ...rest] = held ? [held, ...list6.filter(({ id }) => id !== held.id)] : list6;
38358
+ const [approval, ...rest] = held2 ? [held2, ...list6.filter(({ id }) => id !== held2.id)] : list6;
38048
38359
  if (!approval) return A;
38049
38360
  const failure2 = this.failure?.id === approval.id ? this.failure.message : "";
38050
38361
  const verdict = rulesOf(approval);
@@ -41904,6 +42215,8 @@ function words(message, word2) {
41904
42215
  return new RegExp(`\\b${word2.replace(/[^a-z0-9 ]/gi, "\\$&")}\\b`, "i").test(message);
41905
42216
  }
41906
42217
  var popup = (account) => account.group === "mcp" && account.auth === "oauth";
42218
+ var dual = (account) => account.auth === "oauth" && account.secret === "api-key";
42219
+ var signInMethod = (account) => dual(account) ? { method: "sign-in" } : void 0;
41907
42220
  var start = (options2, value) => options2.some((option2) => option2.value === value) ? value : options2[0]?.value ?? "";
41908
42221
  var nothingToChoose = "Nothing to choose from yet. You can connect without it.";
41909
42222
  var secretNames = { "api-key": "API key", token: "token" };
@@ -41933,6 +42246,7 @@ var SliccSettings = class extends ThemedElement {
41933
42246
  developerError: { state: true }
41934
42247
  };
41935
42248
  #waits = new SignInWaits(() => this.requestUpdate());
42249
+ #copies = new SignInCopies(() => this.requestUpdate());
41936
42250
  #landing = null;
41937
42251
  #away = false;
41938
42252
  #bases = /* @__PURE__ */ new Map();
@@ -41959,6 +42273,7 @@ var SliccSettings = class extends ThemedElement {
41959
42273
  dialogFrame,
41960
42274
  searchCss,
41961
42275
  r(link_default),
42276
+ signInCss,
41962
42277
  i`
41963
42278
  :host {
41964
42279
  display: block;
@@ -42073,6 +42388,15 @@ var SliccSettings = class extends ThemedElement {
42073
42388
  color: var(--swc-neutral-subdued-content-color-default);
42074
42389
  font-size: var(--swc-font-size-75);
42075
42390
  }
42391
+ .sign-in .enter {
42392
+ color: var(--swc-neutral-subdued-content-color-default);
42393
+ }
42394
+ .sign-in .enter,
42395
+ .sign-in .unknown,
42396
+ .sign-in .address,
42397
+ .sign-in .swc-Link {
42398
+ font-size: var(--swc-font-size-75);
42399
+ }
42076
42400
  .switched {
42077
42401
  grid-column: 2;
42078
42402
  }
@@ -42126,6 +42450,20 @@ var SliccSettings = class extends ThemedElement {
42126
42450
  flex: none;
42127
42451
  margin-block-start: var(--swc-spacing-50);
42128
42452
  }
42453
+ .other-way {
42454
+ justify-self: start;
42455
+ padding: 0;
42456
+ border: 0;
42457
+ background: none;
42458
+ font-size: var(--swc-font-size-75);
42459
+ cursor: pointer;
42460
+ }
42461
+ @media (forced-colors: active) {
42462
+ .other-way {
42463
+ color: LinkText;
42464
+ text-decoration: underline;
42465
+ }
42466
+ }
42129
42467
  .add {
42130
42468
  margin-block-start: var(--swc-spacing-200);
42131
42469
  margin-inline-start: calc(-1 * var(--swc-spacing-100));
@@ -42285,7 +42623,7 @@ var SliccSettings = class extends ThemedElement {
42285
42623
  ];
42286
42624
  subscribe(model) {
42287
42625
  const update = () => this.requestUpdate();
42288
- const settle2 = () => {
42626
+ const settle3 = () => {
42289
42627
  settleModels(model);
42290
42628
  update();
42291
42629
  };
@@ -42301,8 +42639,8 @@ var SliccSettings = class extends ThemedElement {
42301
42639
  return [
42302
42640
  ...super.subscribe(model),
42303
42641
  ...developer && model.updates ? [model.updates.on("items", update)] : [],
42304
- model.settings.on("settings", settle2),
42305
- model.settings.on("accounts", settle2),
42642
+ model.settings.on("settings", settle3),
42643
+ model.settings.on("accounts", settle3),
42306
42644
  model.settings.on("providers", update),
42307
42645
  ...model.vault ? [model.vault.on("status", update), model.vault.on("list", update)] : []
42308
42646
  ];
@@ -42378,13 +42716,13 @@ var SliccSettings = class extends ThemedElement {
42378
42716
  const rest = [...this.pending].filter((candidate) => candidate !== id);
42379
42717
  this.pending = new Set(on2 ? [...rest, id] : rest);
42380
42718
  }
42381
- async connect(id, secret, fields) {
42719
+ async connect(id, secret, fields, options2) {
42382
42720
  this.#busy(id, true);
42383
42721
  this.failure = null;
42384
42722
  this.#cancelled.delete(id);
42385
42723
  const settings = this.model?.settings;
42386
42724
  try {
42387
- await (fields ? settings?.connect(id, secret, fields) : secret === void 0 ? settings?.connect(id) : settings?.connect(id, secret));
42725
+ await (options2 ? settings?.connect(id, secret, fields, options2) : fields ? settings?.connect(id, secret, fields) : secret === void 0 ? settings?.connect(id) : settings?.connect(id, secret));
42388
42726
  if (this.entering === id) this.entering = null;
42389
42727
  if (this.adding?.id === id && this.#added(id)?.status === "connected") this.#finish(id);
42390
42728
  } catch (error) {
@@ -42396,7 +42734,8 @@ var SliccSettings = class extends ThemedElement {
42396
42734
  }
42397
42735
  #vault(account) {
42398
42736
  const vault = this.model?.vault;
42399
- return account.auth === "api-key" && account.store === "vault" && vault?.put ? vault : null;
42737
+ const keyed2 = account.auth === "api-key" || dual(account);
42738
+ return keyed2 && account.store === "vault" && vault?.put ? vault : null;
42400
42739
  }
42401
42740
  async keep(account, value, fields) {
42402
42741
  const model = this.model;
@@ -42526,7 +42865,7 @@ var SliccSettings = class extends ThemedElement {
42526
42865
  return;
42527
42866
  }
42528
42867
  }
42529
- await this.connect(id, secret, fields);
42868
+ await this.connect(id, secret, fields, dual(account) ? { method: "key" } : void 0);
42530
42869
  if (this.failure?.id === id) {
42531
42870
  this.#placeFailure(account, fields);
42532
42871
  const back = forward ? this.#modelChange(name, changes2, "url", "old") : null;
@@ -42585,11 +42924,30 @@ var SliccSettings = class extends ThemedElement {
42585
42924
  }
42586
42925
  #start(account) {
42587
42926
  if (account.auth !== "api-key") {
42588
- void this.connect(account.id);
42927
+ void this.connect(account.id, void 0, void 0, signInMethod(account));
42589
42928
  return;
42590
42929
  }
42591
42930
  this.#enter(account);
42592
42931
  }
42932
+ #useSignIn(account) {
42933
+ this.#cancel();
42934
+ void this.updateComplete.then(
42935
+ () => this.renderRoot.querySelector(
42936
+ `.account[data-id="${CSS.escape(account.id)}"] [data-action=connect]`
42937
+ )?.focus()
42938
+ );
42939
+ }
42940
+ #otherWay(account) {
42941
+ if (!dual(account) || account.status === "connected" || this.#signingIn(account) || this.pending.has(account.id))
42942
+ return A;
42943
+ const entering = this.entering === account.id;
42944
+ return b`<button
42945
+ type="button"
42946
+ class="swc-Link swc-Link--standalone swc-Link--quiet other-way"
42947
+ data-action=${entering ? "use-sign-in" : "use-key"}
42948
+ @click=${() => entering ? this.#useSignIn(account) : this.#enter(account)}
42949
+ >${entering ? "Sign in instead" : "Use an API key instead"}</button>`;
42950
+ }
42593
42951
  #enter(account) {
42594
42952
  this.failure = null;
42595
42953
  this.problem = null;
@@ -42770,6 +43128,7 @@ var SliccSettings = class extends ThemedElement {
42770
43128
  }
42771
43129
  #leave(account) {
42772
43130
  const adding = this.adding?.id === account.id;
43131
+ if (dual(account) && !adding) return A;
42773
43132
  return b`<swc-button size="m" variant="secondary" data-action=${adding ? "back" : "cancel"} @click=${() => adding ? this.#back() : this.#cancel()}>${adding ? "Back" : "Cancel"}</swc-button>`;
42774
43133
  }
42775
43134
  #saveLabel(account) {
@@ -42863,7 +43222,8 @@ var SliccSettings = class extends ThemedElement {
42863
43222
  return account.auth !== "api-key" || !!vault.put;
42864
43223
  }
42865
43224
  #records(account, vault) {
42866
- if (account.auth === "api-key") return [[recordName(account), recordKind(account)]];
43225
+ if (account.auth === "api-key" || dual(account))
43226
+ return [[recordName(account), recordKind(account)]];
42867
43227
  const server = serverOf(account);
42868
43228
  const names2 = (vault.list()?.secrets ?? []).filter(
42869
43229
  (secret) => secret.kind === "mcp" && secret.server === server && secret.state !== "removed"
@@ -42875,7 +43235,7 @@ var SliccSettings = class extends ThemedElement {
42875
43235
  const model = this.model;
42876
43236
  const vault = model?.vault;
42877
43237
  const vaulted = account.store === "vault" && !!vault?.remove;
42878
- const key2 = vaulted && account.auth === "api-key";
43238
+ const key2 = vaulted && (account.auth === "api-key" || dual(account));
42879
43239
  const signIn = vaulted && account.auth !== "api-key" && account.group === "mcp";
42880
43240
  const stored2 = key2 || signIn ? vault : void 0;
42881
43241
  const body4 = `Agents can\u2019t use ${account.provider} until you connect it again.${key2 ? " You can restore its key from Removed in Secrets for 30 days." : ""}`;
@@ -42919,7 +43279,7 @@ var SliccSettings = class extends ThemedElement {
42919
43279
  return this.picking ? "a provider is being added" : null;
42920
43280
  }
42921
43281
  #signingIn(account) {
42922
- return account.status === "signing-in" || account.auth !== "api-key" && account.status !== "connected" && this.pending.has(account.id);
43282
+ return account.status === "signing-in" || account.auth !== "api-key" && account.status !== "connected" && this.entering !== account.id && this.pending.has(account.id);
42923
43283
  }
42924
43284
  #action(account) {
42925
43285
  if (this.#signingIn(account) && this.model?.settings.cancel) {
@@ -42941,14 +43301,15 @@ var SliccSettings = class extends ThemedElement {
42941
43301
  @click=${() => this.#disconnect(account)}
42942
43302
  >Disconnect</swc-button>`;
42943
43303
  }
42944
- const label = popup(account) ? "Sign in" : account.status === "expired" ? "Reconnect" : "Connect";
43304
+ const signs = popup(account) || dual(account);
43305
+ const label = signs ? "Sign in" : account.status === "expired" ? "Reconnect" : "Connect";
42945
43306
  const entering = this.entering === account.id;
42946
43307
  const busy = this.#signingIn(account) || !entering && this.pending.has(account.id);
42947
43308
  return b`<swc-button
42948
43309
  size="m"
42949
43310
  variant="secondary"
42950
43311
  data-action="connect"
42951
- accessible-label=${popup(account) ? `Sign in to ${account.provider}` : `${label} ${account.provider}`}
43312
+ accessible-label=${signs ? `Sign in to ${account.provider}` : `${label} ${account.provider}`}
42952
43313
  ?pending=${busy}
42953
43314
  ?disabled=${entering || !!account.blocked}
42954
43315
  @click=${() => this.#start(account)}
@@ -42976,9 +43337,14 @@ var SliccSettings = class extends ThemedElement {
42976
43337
  <swc-status-light class="state" variant=${variant}>${label}</swc-status-light>
42977
43338
  ${this.#actions(account)}
42978
43339
  </div>
42979
- ${this.#offered() ? this.#rowNotes(account) : A}
43340
+ ${this.#rowNotes(account)}
42980
43341
  ${this.#movedNote(account)}
42981
- ${this.adding?.id === account.id ? A : b`${this.#key(account)}${failure2}`}`;
43342
+ ${this.adding?.id === account.id ? A : b`${this.#key(account)}${this.#otherKey(account)}${failure2}`}`;
43343
+ }
43344
+ #otherKey(account) {
43345
+ if (this.entering !== account.id) return A;
43346
+ const other = this.#otherWay(account);
43347
+ return other === A ? A : b`<div class="notes">${other}</div>`;
42982
43348
  }
42983
43349
  #actions(account) {
42984
43350
  const moved2 = account.status === "connected" ? this.#moved(account) : null;
@@ -43029,7 +43395,7 @@ var SliccSettings = class extends ThemedElement {
43029
43395
  clearValues(this.renderRoot);
43030
43396
  if (this.entering === account.id) this.entering = null;
43031
43397
  const vault = model.vault;
43032
- const keyed2 = account.store === "vault" && account.auth === "api-key" && !!vault?.remove;
43398
+ const keyed2 = account.store === "vault" && (account.auth === "api-key" || dual(account)) && !!vault?.remove;
43033
43399
  if (keyed2 && !await this.#forget(account, vault)) return;
43034
43400
  if (this.model !== model) return;
43035
43401
  await this.#closeTip(`remove-${account.id}`);
@@ -43074,11 +43440,21 @@ var SliccSettings = class extends ThemedElement {
43074
43440
  }
43075
43441
  return b`<p class="hint" role="status" data-signing>${signInText(this.#waits.waited(key2))}</p>`;
43076
43442
  }
43443
+ #signInDetails(account) {
43444
+ if (account.status !== "signing-in") return A;
43445
+ return signInDetails(account.id, account.signIn, this.#copies.state(account.id), (code3) => {
43446
+ void this.#copies.copy(account.id, code3);
43447
+ });
43448
+ }
43077
43449
  #rowNotes(account) {
43078
- const notice = this.#notice(account);
43079
- const signing = this.adding?.id === account.id ? A : this.#signingNote(account);
43080
- if (notice === A && signing === A) return A;
43081
- return b`<div class="notes">${notice}${signing}</div>`;
43450
+ const offered = !!this.#offered();
43451
+ const adding = this.adding?.id === account.id;
43452
+ const notice = offered ? this.#notice(account) : A;
43453
+ const signing = offered && !adding ? this.#signingNote(account) : A;
43454
+ const details = adding ? A : this.#signInDetails(account);
43455
+ const other = this.entering === account.id ? A : this.#otherWay(account);
43456
+ if ([notice, signing, details, other].every((part2) => part2 === A)) return A;
43457
+ return b`<div class="notes">${notice}${signing}${details}${other}</div>`;
43082
43458
  }
43083
43459
  #openPicker() {
43084
43460
  this.query = "";
@@ -43233,9 +43609,10 @@ var SliccSettings = class extends ThemedElement {
43233
43609
  ${signing ? this.#signingNote(account) : A}
43234
43610
  <div class="buttons">
43235
43611
  ${cancel ? b`<swc-button size="m" variant="secondary" data-action="cancel-sign-in" @click=${() => this.#stopSigningIn(account)}>Cancel</swc-button>` : A}
43236
- <swc-button size="m" variant="accent" data-action="sign-in" ?pending=${signing} ?disabled=${!!account.blocked} @click=${() => this.connect(account.id)}>${signing ? "Signing in\u2026" : "Sign in"}</swc-button>
43612
+ <swc-button size="m" variant="accent" data-action="sign-in" ?pending=${signing} ?disabled=${!!account.blocked} @click=${() => this.connect(account.id, void 0, void 0, signInMethod(account))}>${signing ? "Signing in\u2026" : "Sign in"}</swc-button>
43237
43613
  ${signing ? A : this.#leave(account)}
43238
- </div>`;
43614
+ </div>
43615
+ ${this.#signInDetails(account)}`;
43239
43616
  }
43240
43617
  #localStep(account) {
43241
43618
  return b`<p class="hint">SLICC connects to ${account.provider} on this device.</p>
@@ -43730,15 +44107,15 @@ var SliccSprinkle = class extends ThemedElement {
43730
44107
  value: null
43731
44108
  };
43732
44109
  #hold(port, ask, id) {
43733
- const held = { port, id, ready: false, value: null };
43734
- this.#held = held;
44110
+ const held2 = { port, id, ready: false, value: null };
44111
+ this.#held = held2;
43735
44112
  this.#frame = { key: "", doc: "" };
43736
- const settle2 = (value) => {
43737
- held.value = value ?? null;
43738
- held.ready = true;
43739
- if (this.#held === held) this.requestUpdate();
44113
+ const settle3 = (value) => {
44114
+ held2.value = value ?? null;
44115
+ held2.ready = true;
44116
+ if (this.#held === held2) this.requestUpdate();
43740
44117
  };
43741
- ask.call(port, id, "getState", []).then(settle2, () => settle2(null));
44118
+ ask.call(port, id, "getState", []).then(settle3, () => settle3(null));
43742
44119
  }
43743
44120
  willUpdate(changed2) {
43744
44121
  super.willUpdate(changed2);
@@ -43812,15 +44189,15 @@ ${data.html}`;
43812
44189
  const bridged = !!this.model?.sprinkles.call;
43813
44190
  if (bridged && !this.#held.ready) return b``;
43814
44191
  const state2 = bridged ? this.#held : void 0;
43815
- const watch = !!watchOnly(this.model) || !!this.model?.seat;
43816
- const caption2 = watch ? b`<span class="view-only" data-view-only>View only on this device</span>` : A;
44192
+ const watch2 = !!watchOnly(this.model) || !!this.model?.seat;
44193
+ const caption2 = watch2 ? b`<span class="view-only" data-view-only>View only on this device</span>` : A;
43817
44194
  const style = `color-scheme:${this.color};${this.inline ? `height:${this.height}px;` : ""}`;
43818
44195
  const frame = b`${i22(
43819
44196
  this.#mounts,
43820
- b`<iframe title=${data.title} sandbox="allow-scripts" ?inert=${watch} style=${style} .srcdoc=${this.#document(data, state2)}></iframe>`
44197
+ b`<iframe title=${data.title} sandbox="allow-scripts" ?inert=${watch2} style=${style} .srcdoc=${this.#document(data, state2)}></iframe>`
43821
44198
  )}`;
43822
44199
  if (!this.inline)
43823
- return watch ? b`<div class="panel"><div class="bar">${caption2}</div>${frame}</div>` : frame;
44200
+ return watch2 ? b`<div class="panel"><div class="bar">${caption2}</div>${frame}</div>` : frame;
43824
44201
  return b`<div class="handle" draggable="true" title="Drag into the dock or a rail to open as a panel" @dragstart=${this.#drag}>
43825
44202
  ${grip}
43826
44203
  <span class="name">${data.title}</span>
@@ -52914,21 +53291,21 @@ function getTransformers(options2) {
52914
53291
  }
52915
53292
  function sortTransformersByEnforcement(transformers) {
52916
53293
  const pre = [];
52917
- const post = [];
53294
+ const post2 = [];
52918
53295
  const normal = [];
52919
53296
  for (const transformer of transformers) switch (transformer.enforce) {
52920
53297
  case "pre":
52921
53298
  pre.push(transformer);
52922
53299
  break;
52923
53300
  case "post":
52924
- post.push(transformer);
53301
+ post2.push(transformer);
52925
53302
  break;
52926
53303
  default:
52927
53304
  normal.push(transformer);
52928
53305
  }
52929
53306
  return {
52930
53307
  pre,
52931
- post,
53308
+ post: post2,
52932
53309
  normal
52933
53310
  };
52934
53311
  }
@@ -54946,8 +55323,8 @@ function recursion(pattern2, data) {
54946
55323
  numCapturesPassed
54947
55324
  );
54948
55325
  const pre = pattern2.slice(0, startPos);
54949
- const post = pattern2.slice(startPos + groupContents.length);
54950
- pattern2 = `${pre}${expansion2}${post}`;
55326
+ const post2 = pattern2.slice(startPos + groupContents.length);
55327
+ pattern2 = `${pre}${expansion2}${post2}`;
54951
55328
  token.lastIndex += expansion2.length - m16.length - groupContentsLeft.length - groupContentsRight.length;
54952
55329
  openGroups.forEach((g7) => g7.hasRecursedWithin = true);
54953
55330
  hasRecursed = true;