@worca/app 1.6.0-rc.1 → 1.6.0-rc.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.
@@ -1350,12 +1350,16 @@
1350
1350
  literal routing attribute name, so never spell it out in a comment. -->
1351
1351
  <section class="view hidden" data-view="settings">
1352
1352
  <div class="seg settings-tabs" id="settings-tabs" role="group" aria-label="Settings section">
1353
+ <!-- Ordered by mode (Simple, Advanced, Expert) so each mode sees a gap-free prefix of the
1354
+ strip; Models sits next to Providers. -->
1353
1355
  <button type="button" class="on" data-tab="general" data-min-level="simple" aria-pressed="true">General</button>
1356
+ <button type="button" data-tab="runs" data-min-level="simple" aria-pressed="false">Runs</button>
1357
+ <button type="button" data-tab="ask" data-min-level="advanced" aria-pressed="false">Ask Worca</button>
1354
1358
  <button type="button" data-tab="guardrails" data-min-level="advanced" aria-pressed="false">Guardrails</button>
1359
+ <button type="button" data-tab="memory" data-min-level="advanced" aria-pressed="false">Memory</button>
1360
+ <button type="button" data-tab="plugins" data-min-level="advanced" aria-pressed="false">Plugins</button>
1355
1361
  <button type="button" data-tab="models" data-min-level="expert" aria-pressed="false">Models</button>
1356
1362
  <button type="button" data-tab="providers" data-min-level="expert" aria-pressed="false">Providers</button>
1357
- <button type="button" data-tab="plugins" data-min-level="advanced" aria-pressed="false">Plugins</button>
1358
- <button type="button" data-tab="memory" data-min-level="advanced" aria-pressed="false">Memory</button>
1359
1363
  </div>
1360
1364
 
1361
1365
  <section class="settings-pane" data-tab="general">
@@ -1452,6 +1456,97 @@
1452
1456
  <small class="hint" id="settingsMsg"></small>
1453
1457
  </section>
1454
1458
 
1459
+ <!-- Spawn-debug diagnostics: the stored side of WORCA_DEBUG_SPAWN.
1460
+ claude-runner.mjs reads the setting per spawn (UI server AND CLI);
1461
+ a non-empty env var overrides it. This card only flips the gate —
1462
+ the runner decides what is printable (routing keys readable,
1463
+ credentials as "<set, N chars>"). -->
1464
+ <section class="card settings-card" id="debug-spawn-settings-card" data-min-level="expert">
1465
+ <div class="card-head">
1466
+ <div class="label-row">
1467
+ <h2>Spawn diagnostics</h2>
1468
+ <button type="button" class="info-tip" aria-label="About spawn diagnostics">i<span class="tip-content hidden">
1469
+ Logs the exact claude binary, argv and routing env handed to every spawn, in the run
1470
+ log. Credentials never appear: routing keys (endpoint, wire model) print readable,
1471
+ every other value as <code>&lt;set, N chars&gt;</code>. Applies to runs started here
1472
+ and from the CLI, with no restart. A non-empty <code>WORCA_DEBUG_SPAWN</code> in the
1473
+ environment overrides this setting.
1474
+ </span></button>
1475
+ </div>
1476
+ </div>
1477
+ <div class="field">
1478
+ <label class="check-row" for="debugSpawnEnabled"><input id="debugSpawnEnabled" type="checkbox" /> Log claude spawn details (binary, argv, routing env)</label>
1479
+ </div>
1480
+ <small class="hint" id="debugSpawnEnvNote"></small>
1481
+ <div class="add-project-actions" style="margin-top:14px">
1482
+ <button type="button" id="debugSpawnReset" class="btn btn-ghost btn-mini">Reset to default</button>
1483
+ <button type="button" id="debugSpawnSave" class="btn btn-primary btn-mini">Save</button>
1484
+ </div>
1485
+ <small class="hint" id="debugSpawnMsg"></small>
1486
+ </section>
1487
+
1488
+ <!-- Getting started: the checklist's Hide is undone here. Only the checklist —
1489
+ the welcome dialog stays seen. No info-tip (the row explains itself);
1490
+ the .hint is painted by app.js like every other settings status line. -->
1491
+ <section class="card settings-card" id="getting-started-card" data-min-level="simple">
1492
+ <div class="label-row">
1493
+ <h2>Getting started</h2>
1494
+ </div>
1495
+ <div class="gs-settings-row">
1496
+ <p class="gs-settings-text">The checklist on New pipeline walks through the first nine things to do with Worca. Hidden it, or want the guided tour back?</p>
1497
+ <button type="button" id="gsShowAgain" class="btn btn-ghost btn-mini">Show again</button>
1498
+ </div>
1499
+ <small class="hint" id="gsSettingsMsg"></small>
1500
+ </section>
1501
+
1502
+ <!-- About: intentionally no info-tip and no .hint (test/ui-settings-tooltips.test.mjs pins both). -->
1503
+ <section class="card settings-card" id="about-card" data-min-level="simple">
1504
+ <div class="label-row">
1505
+ <h2>About</h2>
1506
+ </div>
1507
+ <div class="about-row">
1508
+ <span class="about-key">Version</span>
1509
+ <!-- href is painted from app.releaseUrl (the worca-app-v<version> tag);
1510
+ without one the anchor is plain text, so the placeholder never links. -->
1511
+ <a class="about-val about-version" id="aboutVersion"
1512
+ target="_blank" rel="noopener noreferrer">&mdash;</a>
1513
+ </div>
1514
+ <div class="about-row">
1515
+ <span class="about-key">Repository</span>
1516
+ <a class="about-val about-link" id="aboutRepoLink"
1517
+ href="https://github.com/SinishaDjukic/worca-cc"
1518
+ target="_blank" rel="noopener noreferrer">github.com/SinishaDjukic/worca-cc</a>
1519
+ </div>
1520
+ <div class="about-row">
1521
+ <span class="about-key">Feedback</span>
1522
+ <!-- hrefs are repainted from app.bugsUrl (package.json bugs.url); the
1523
+ static fallback keeps the links usable before /api/settings lands.
1524
+ Anchors only: ui-settings-about.test.mjs forbids a control here,
1525
+ and neither the label nor the href carries a version string. -->
1526
+ <a class="about-val about-link" id="aboutBugLink"
1527
+ href="https://github.com/SinishaDjukic/worca-cc/issues/new?labels=bug"
1528
+ target="_blank" rel="noopener noreferrer">Report a bug</a>
1529
+ </div>
1530
+ <div class="about-row">
1531
+ <span class="about-key"></span>
1532
+ <a class="about-val about-link" id="aboutIdeaLink"
1533
+ href="https://github.com/SinishaDjukic/worca-cc/issues/new?labels=enhancement"
1534
+ target="_blank" rel="noopener noreferrer">Suggest an improvement</a>
1535
+ </div>
1536
+ </section>
1537
+ </section>
1538
+ <!-- /pane general -->
1539
+
1540
+ <!-- ===== TAB: RUNS — how pipeline runs are capped, scheduled and reported.
1541
+ Simple, for Budget; the two Advanced cards keep their own level. ===== -->
1542
+ <section class="settings-pane hidden" data-tab="runs">
1543
+ <div class="topbar">
1544
+ <div>
1545
+ <h1>Runs</h1>
1546
+ <div class="sub">Cost limits and defaults for your pipeline runs</div>
1547
+ </div>
1548
+ </div>
1549
+
1455
1550
  <section class="card settings-card" id="budget-settings-card" data-min-level="simple">
1456
1551
  <div class="card-head">
1457
1552
  <div class="label-row">
@@ -1510,63 +1605,6 @@
1510
1605
  <small class="hint" id="budgetMsg"></small>
1511
1606
  </section>
1512
1607
 
1513
- <!-- Ask Worca (ask-worca-design §6.9): per-turn guards for the
1514
- assistant chat. Read fresh on every turn (D12); a stored null
1515
- budget means "no cap". Posted ALONE — never with root/budget keys. -->
1516
- <section class="card settings-card" id="ask-settings-card" data-min-level="advanced">
1517
- <div class="card-head">
1518
- <div class="label-row">
1519
- <h2>Ask Worca</h2>
1520
- <button type="button" class="info-tip" aria-label="About Ask Worca limits">i<span class="tip-content hidden">
1521
- Per-turn guards for the Ask Worca assistant chat. A chat turn stops when it reaches the turn limit or the per-turn cost cap; both are read fresh on every turn.
1522
- </span></button>
1523
- </div>
1524
- </div>
1525
- <div class="field">
1526
- <div class="label-row">
1527
- <label for="askMaxTurns">Turn limit</label>
1528
- <button type="button" class="info-tip" aria-label="About Turn limit">i<span class="tip-content hidden">
1529
- Maximum assistant/tool turns one chat message may use (1&ndash;500). Leave empty to restore the default of 400.
1530
- </span></button>
1531
- </div>
1532
- <input id="askMaxTurns" class="input" type="number" min="1" max="500" step="1" inputmode="numeric" placeholder="400" autocomplete="off" />
1533
- </div>
1534
- <div class="field">
1535
- <div class="label-row">
1536
- <label for="askMaxBudgetUsd">Per-turn cost cap (USD)</label>
1537
- <button type="button" class="info-tip" aria-label="About Per-turn cost cap">i<span class="tip-content hidden">
1538
- There is no cap by default. Untick No cap and enter an amount (0.1&ndash;100) to turn the guard on: a chat turn then stops when its estimated cost reaches it. Leaving the amount empty, or pressing Use defaults, means no cap.
1539
- </span></button>
1540
- </div>
1541
- <input id="askMaxBudgetUsd" class="input" type="number" min="0.1" max="100" step="0.1" inputmode="decimal" placeholder="No cap" autocomplete="off" />
1542
- <label class="check-row" for="askNoCap"><input id="askNoCap" type="checkbox" /> No cap</label>
1543
- </div>
1544
- <!-- Scripts workbench W20: the chat's save_script / test_script switch. Body
1545
- rendered by chat-settings-view.mjs; saved with this card's Save button. -->
1546
- <div class="field" id="ask-script-tools-host"></div>
1547
- <!-- Ask web access (off by default): rendered by chat-settings-view.mjs; saved with this
1548
- card's Save button, and only when one of its fields was touched. -->
1549
- <div class="field" id="ask-web-host"></div>
1550
- <div class="add-project-actions" style="margin-top:14px">
1551
- <button type="button" id="askLimitsReset" class="btn btn-ghost btn-mini">Use defaults</button>
1552
- <button type="button" id="askLimitsSave" class="btn btn-primary btn-mini">Save</button>
1553
- </div>
1554
- <small class="hint" id="askLimitsMsg"></small>
1555
- <!-- Chat history: the counts paint with the view; the button opens a
1556
- danger confirm quoting FRESH counts, then DELETE /api/ask/threads. -->
1557
- <div class="field" style="margin-top:14px">
1558
- <div class="label-row">
1559
- <label for="askHistoryDelete">Chat history</label>
1560
- <button type="button" class="info-tip" aria-label="About Chat history">i<span class="tip-content hidden">
1561
- Every saved Ask Worca chat: transcripts, attachments and the git worktrees checked out for them. Runs started from a chat are not affected.
1562
- </span></button>
1563
- </div>
1564
- <button type="button" id="askHistoryDelete" class="ask-history-delete" disabled>Delete all chat history</button>
1565
- <small class="hint" id="askHistoryCounts"></small>
1566
- <small class="hint" id="askHistoryMsg"></small>
1567
- </div>
1568
- </section>
1569
-
1570
1608
  <!-- Scheduled runs: the defaults a NEW schedule inherits. Each schedule keeps
1571
1609
  its own copy, so a change here never rewrites an existing one. -->
1572
1610
  <section class="card settings-card" id="schedule-settings-card" data-min-level="advanced">
@@ -1618,95 +1656,6 @@
1618
1656
  <small class="hint" id="schedDefaultsMsg"></small>
1619
1657
  </section>
1620
1658
 
1621
- <!-- Title generation (#422): which model writes run/chat titles.
1622
- Empty = the model of the run or chat itself (title.mjs
1623
- resolveTitleModel), so a first-party-free install needs no setup.
1624
- The select is built from the project-less catalog; a stored id
1625
- that left the catalog paints disabled + "not installed". -->
1626
- <section class="card settings-card" id="title-model-settings-card" data-min-level="expert">
1627
- <div class="card-head">
1628
- <div class="label-row">
1629
- <h2>Title generation</h2>
1630
- <button type="button" class="info-tip" aria-label="About title generation">i<span class="tip-content hidden">
1631
- Every run and chat gets a short LLM-written title. By default it is written by the
1632
- model the run or chat itself uses, so an install without a first-party Anthropic
1633
- account needs no setup here. Pick a model to write every title with it instead;
1634
- the change applies to the next title, no restart. A non-empty
1635
- <code>WORCA_TITLE_MODEL</code> in the environment overrides this setting.
1636
- </span></button>
1637
- </div>
1638
- </div>
1639
- <div class="field">
1640
- <div class="label-row">
1641
- <label for="titleModel">Model</label>
1642
- </div>
1643
- <select id="titleModel" class="select" aria-label="Title model"></select>
1644
- </div>
1645
- <small class="hint" id="titleModelEnvNote"></small>
1646
- <div class="add-project-actions" style="margin-top:14px">
1647
- <button type="button" id="titleModelTest" class="btn btn-ghost btn-mini" title="Send one tiny prompt to the selected model">Test</button>
1648
- <button type="button" id="titleModelReset" class="btn btn-ghost btn-mini">Use default</button>
1649
- <button type="button" id="titleModelSave" class="btn btn-primary btn-mini">Save</button>
1650
- </div>
1651
- <small class="hint" id="titleModelMsg"></small>
1652
- </section>
1653
-
1654
- <!-- Auto workflow model (spec D14 / §7.7): which model classifies a task into a workflow.
1655
- Empty = the Sonnet-class default; WORCA_AUTO_MODEL in the environment wins. -->
1656
- <section class="card settings-card" id="auto-model-settings-card" data-min-level="expert">
1657
- <div class="card-head">
1658
- <div class="label-row">
1659
- <h2>Auto workflow model</h2>
1660
- <button type="button" class="info-tip" aria-label="About the Auto workflow model">i<span class="tip-content hidden">
1661
- When a run starts on <b>Auto</b>, one short model call reads the task and picks the workflow.
1662
- Pick the model that makes that call; empty means the Sonnet-class default. A non-empty
1663
- <code>WORCA_AUTO_MODEL</code> in the environment overrides this setting. Each call is billed to the
1664
- run as a sub-agent row named "Auto workflow (round n)".
1665
- </span></button>
1666
- </div>
1667
- </div>
1668
- <div class="field">
1669
- <div class="label-row"><label for="autoModel">Model</label></div>
1670
- <select id="autoModel" class="select" aria-label="Auto workflow model"></select>
1671
- </div>
1672
- <small class="hint" id="autoModelEnvNote"></small>
1673
- <div class="add-project-actions" style="margin-top:14px">
1674
- <button type="button" id="autoModelTest" class="btn btn-ghost btn-mini" title="Send one tiny prompt to the selected model">Test</button>
1675
- <button type="button" id="autoModelReset" class="btn btn-ghost btn-mini">Use default</button>
1676
- <button type="button" id="autoModelSave" class="btn btn-primary btn-mini">Save</button>
1677
- </div>
1678
- <small class="hint" id="autoModelMsg"></small>
1679
- </section>
1680
-
1681
- <!-- Spawn-debug diagnostics: the stored side of WORCA_DEBUG_SPAWN.
1682
- claude-runner.mjs reads the setting per spawn (UI server AND CLI);
1683
- a non-empty env var overrides it. This card only flips the gate —
1684
- the runner decides what is printable (routing keys readable,
1685
- credentials as "<set, N chars>"). -->
1686
- <section class="card settings-card" id="debug-spawn-settings-card" data-min-level="expert">
1687
- <div class="card-head">
1688
- <div class="label-row">
1689
- <h2>Spawn diagnostics</h2>
1690
- <button type="button" class="info-tip" aria-label="About spawn diagnostics">i<span class="tip-content hidden">
1691
- Logs the exact claude binary, argv and routing env handed to every spawn, in the run
1692
- log. Credentials never appear: routing keys (endpoint, wire model) print readable,
1693
- every other value as <code>&lt;set, N chars&gt;</code>. Applies to runs started here
1694
- and from the CLI, with no restart. A non-empty <code>WORCA_DEBUG_SPAWN</code> in the
1695
- environment overrides this setting.
1696
- </span></button>
1697
- </div>
1698
- </div>
1699
- <div class="field">
1700
- <label class="check-row" for="debugSpawnEnabled"><input id="debugSpawnEnabled" type="checkbox" /> Log claude spawn details (binary, argv, routing env)</label>
1701
- </div>
1702
- <small class="hint" id="debugSpawnEnvNote"></small>
1703
- <div class="add-project-actions" style="margin-top:14px">
1704
- <button type="button" id="debugSpawnReset" class="btn btn-ghost btn-mini">Reset to default</button>
1705
- <button type="button" id="debugSpawnSave" class="btn btn-primary btn-mini">Save</button>
1706
- </div>
1707
- <small class="hint" id="debugSpawnMsg"></small>
1708
- </section>
1709
-
1710
1659
  <!-- Chat notifications (chat-connectivity-design.md §4.8): which run
1711
1660
  events ping which chat channels. Body rendered by
1712
1661
  chat-settings-view.mjs; app.js owns fetch/save/Test wiring. -->
@@ -1720,58 +1669,78 @@
1720
1669
  </div>
1721
1670
  <small class="hint" id="chatSettingsMsg"></small>
1722
1671
  </section>
1672
+ </section>
1673
+ <!-- /pane runs -->
1723
1674
 
1724
- <!-- Getting started: the checklist's Hide is undone here. Only the checklist —
1725
- the welcome dialog stays seen. No info-tip (the row explains itself);
1726
- the .hint is painted by app.js like every other settings status line. -->
1727
- <section class="card settings-card" id="getting-started-card" data-min-level="simple">
1728
- <div class="label-row">
1729
- <h2>Getting started</h2>
1730
- </div>
1731
- <div class="gs-settings-row">
1732
- <p class="gs-settings-text">The checklist on New pipeline walks through the first nine things to do with Worca. Hidden it, or want the guided tour back?</p>
1733
- <button type="button" id="gsShowAgain" class="btn btn-ghost btn-mini">Show again</button>
1675
+ <!-- ===== TAB: ASK WORCA — the assistant chat's limits, tools, web access and history ===== -->
1676
+ <section class="settings-pane hidden" data-tab="ask">
1677
+ <div class="topbar">
1678
+ <div>
1679
+ <h1>Ask Worca</h1>
1680
+ <div class="sub">The assistant chat: how far one turn may go, which tools and websites it may use, and its saved history</div>
1734
1681
  </div>
1735
- <small class="hint" id="gsSettingsMsg"></small>
1736
- </section>
1682
+ </div>
1737
1683
 
1738
- <!-- About: intentionally no info-tip and no .hint (test/ui-settings-tooltips.test.mjs pins both). -->
1739
- <section class="card settings-card" id="about-card" data-min-level="simple">
1740
- <div class="label-row">
1741
- <h2>About</h2>
1684
+ <!-- Ask Worca (ask-worca-design §6.9): per-turn guards for the
1685
+ assistant chat. Read fresh on every turn (D12); a stored null
1686
+ budget means "no cap". Posted ALONE — never with root/budget keys. -->
1687
+ <!-- Simple on purpose: the Ask Worca tab (Advanced) already gates it, and a deep link at a lower mode
1688
+ must still show the card under the level banner (docs/ui-levels.md rule 3). -->
1689
+ <section class="card settings-card" id="ask-settings-card" data-min-level="simple">
1690
+ <div class="card-head">
1691
+ <div class="label-row">
1692
+ <h2>Limits &amp; access</h2>
1693
+ <button type="button" class="info-tip" aria-label="About Ask Worca limits">i<span class="tip-content hidden">
1694
+ Per-turn guards for the Ask Worca assistant chat. A chat turn stops when it reaches the turn limit or the per-turn cost cap; both are read fresh on every turn.
1695
+ </span></button>
1696
+ </div>
1742
1697
  </div>
1743
- <div class="about-row">
1744
- <span class="about-key">Version</span>
1745
- <!-- href is painted from app.releaseUrl (the worca-app-v<version> tag);
1746
- without one the anchor is plain text, so the placeholder never links. -->
1747
- <a class="about-val about-version" id="aboutVersion"
1748
- target="_blank" rel="noopener noreferrer">&mdash;</a>
1698
+ <div class="field">
1699
+ <div class="label-row">
1700
+ <label for="askMaxTurns">Turn limit</label>
1701
+ <button type="button" class="info-tip" aria-label="About Turn limit">i<span class="tip-content hidden">
1702
+ Maximum assistant/tool turns one chat message may use (1&ndash;500). Leave empty to restore the default of 400.
1703
+ </span></button>
1704
+ </div>
1705
+ <input id="askMaxTurns" class="input" type="number" min="1" max="500" step="1" inputmode="numeric" placeholder="400" autocomplete="off" />
1749
1706
  </div>
1750
- <div class="about-row">
1751
- <span class="about-key">Repository</span>
1752
- <a class="about-val about-link" id="aboutRepoLink"
1753
- href="https://github.com/SinishaDjukic/worca-cc"
1754
- target="_blank" rel="noopener noreferrer">github.com/SinishaDjukic/worca-cc</a>
1707
+ <div class="field">
1708
+ <div class="label-row">
1709
+ <label for="askMaxBudgetUsd">Per-turn cost cap (USD)</label>
1710
+ <button type="button" class="info-tip" aria-label="About Per-turn cost cap">i<span class="tip-content hidden">
1711
+ There is no cap by default. Untick No cap and enter an amount (0.1&ndash;100) to turn the guard on: a chat turn then stops when its estimated cost reaches it. Leaving the amount empty, or pressing Use defaults, means no cap.
1712
+ </span></button>
1713
+ </div>
1714
+ <input id="askMaxBudgetUsd" class="input" type="number" min="0.1" max="100" step="0.1" inputmode="decimal" placeholder="No cap" autocomplete="off" />
1715
+ <label class="check-row" for="askNoCap"><input id="askNoCap" type="checkbox" /> No cap</label>
1755
1716
  </div>
1756
- <div class="about-row">
1757
- <span class="about-key">Feedback</span>
1758
- <!-- hrefs are repainted from app.bugsUrl (package.json bugs.url); the
1759
- static fallback keeps the links usable before /api/settings lands.
1760
- Anchors only: ui-settings-about.test.mjs forbids a control here,
1761
- and neither the label nor the href carries a version string. -->
1762
- <a class="about-val about-link" id="aboutBugLink"
1763
- href="https://github.com/SinishaDjukic/worca-cc/issues/new?labels=bug"
1764
- target="_blank" rel="noopener noreferrer">Report a bug</a>
1717
+ <!-- Scripts workbench W20: the chat's save_script / test_script switch. Body
1718
+ rendered by chat-settings-view.mjs; saved with this card's Save button. -->
1719
+ <div class="field" id="ask-script-tools-host"></div>
1720
+ <!-- Ask web access (off by default): rendered by chat-settings-view.mjs; saved with this
1721
+ card's Save button, and only when one of its fields was touched. -->
1722
+ <div class="field" id="ask-web-host"></div>
1723
+ <div class="add-project-actions" style="margin-top:14px">
1724
+ <button type="button" id="askLimitsReset" class="btn btn-ghost btn-mini">Use defaults</button>
1725
+ <button type="button" id="askLimitsSave" class="btn btn-primary btn-mini">Save</button>
1765
1726
  </div>
1766
- <div class="about-row">
1767
- <span class="about-key"></span>
1768
- <a class="about-val about-link" id="aboutIdeaLink"
1769
- href="https://github.com/SinishaDjukic/worca-cc/issues/new?labels=enhancement"
1770
- target="_blank" rel="noopener noreferrer">Suggest an improvement</a>
1727
+ <small class="hint" id="askLimitsMsg"></small>
1728
+ <!-- Chat history: the counts paint with the view; the button opens a
1729
+ danger confirm quoting FRESH counts, then DELETE /api/ask/threads. -->
1730
+ <div class="field" style="margin-top:14px">
1731
+ <div class="label-row">
1732
+ <label for="askHistoryDelete">Chat history</label>
1733
+ <button type="button" class="info-tip" aria-label="About Chat history">i<span class="tip-content hidden">
1734
+ Every saved Ask Worca chat: transcripts, attachments and the git worktrees checked out for them. Runs started from a chat are not affected.
1735
+ </span></button>
1736
+ </div>
1737
+ <button type="button" id="askHistoryDelete" class="ask-history-delete" disabled>Delete all chat history</button>
1738
+ <small class="hint" id="askHistoryCounts"></small>
1739
+ <small class="hint" id="askHistoryMsg"></small>
1771
1740
  </div>
1772
1741
  </section>
1773
1742
  </section>
1774
- <!-- /pane general -->
1743
+ <!-- /pane ask -->
1775
1744
 
1776
1745
  <!-- ===== TAB: GUARDRAILS (was the top-level Guardrails view) ===== -->
1777
1746
  <section class="settings-pane hidden" data-tab="guardrails">
@@ -1790,41 +1759,42 @@
1790
1759
  </section>
1791
1760
  <!-- /pane guardrails -->
1792
1761
 
1793
- <!-- ===== TAB: MODELS (was the top-level Models view) ===== -->
1794
- <section class="settings-pane hidden" data-tab="models">
1762
+ <!-- ===== TAB: MEMORY (agent-memory-design.md §10) ===== -->
1763
+ <section class="settings-pane hidden" data-tab="memory">
1795
1764
  <div class="topbar">
1796
1765
  <div>
1797
- <h1>Models</h1>
1798
- <div class="sub">The global model catalog — available in every project; entries can override built-ins, route through a provider, or carry per-model routing env. Sign-ins and endpoints live on the Providers tab.</div>
1799
- </div>
1800
- <div style="display:flex;gap:8px;flex:0 0 auto">
1801
- <button type="button" id="model-share-btn" class="btn-ghost" style="padding:11px 20px;white-space:nowrap">Share as plugin…</button>
1802
- <button type="button" id="model-import-btn" class="btn-ghost" style="padding:11px 20px;white-space:nowrap">Import models…</button>
1803
- <button type="button" id="model-create-btn" class="btn-go" style="padding:11px 20px;white-space:nowrap">
1804
- <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round"><path d="M12 5v14M5 12h14"></path></svg>
1805
- Add model
1806
- </button>
1766
+ <h1>Memory</h1>
1767
+ <div class="sub">What worca remembers across runs and chats — the global rules and preferences every agent sees. A project's own memory lives on its project page (Projects → open a project → Memory).</div>
1807
1768
  </div>
1808
1769
  </div>
1809
- <p id="models-msg" class="form-msg" aria-live="polite"></p>
1810
- <div class="run-list" id="models-list"></div>
1811
- </section>
1812
- <!-- /pane models -->
1813
-
1814
- <!-- ===== TAB: PROVIDERS (model-bridge-design.md §8.1) =====
1815
- Split out of Models: the card is account-level setup you touch rarely, and at
1816
- 1000+px it buried the catalog it unlocks. Expert only, like Models. -->
1817
- <section class="settings-pane hidden" data-tab="providers">
1818
- <div class="topbar">
1819
- <div>
1820
- <h1>Providers</h1>
1821
- <div class="sub">Sign-ins, endpoints and keys for the models Worca bridges — GitHub Copilot, any OpenAI-compatible server (llama.cpp, Ollama, LM Studio, vLLM), an Anthropic-compatible gateway. The models themselves live on the Models tab.</div>
1770
+ <!-- Settings › Memory: the model + effort EVERY Memory defragment run uses (memory-defrag-model.mjs).
1771
+ Expert, like the health card's Defragment. No ⓘ and empty hints: the settings-view census
1772
+ (test/ui-settings-tooltips.test.mjs) pins both. A plain .card like the health card, NOT a
1773
+ .settings-card: that census (About last) counts the Settings cards. -->
1774
+ <section class="card mem-model-card" id="mem-defrag-model-card" data-min-level="expert">
1775
+ <div class="label-row"><h2>Defragment model</h2></div>
1776
+ <p class="mem-model-text">The model every Memory defragment run uses — from the Defragment button, New pipeline, an Ask Worca card or the CLI. A model named when the run starts (<code>worca --model</code>) still wins.</p>
1777
+ <div class="mem-model-row">
1778
+ <div class="field">
1779
+ <div class="label-row"><label for="memDefragModel">Model</label></div>
1780
+ <select id="memDefragModel" class="select" aria-label="Defragment model"></select>
1781
+ </div>
1782
+ <div class="field">
1783
+ <div class="label-row"><label for="memDefragEffort">Effort</label></div>
1784
+ <select id="memDefragEffort" class="select" aria-label="Defragment effort"></select>
1785
+ </div>
1822
1786
  </div>
1823
- </div>
1824
- <p id="providers-msg" class="form-msg" aria-live="polite"></p>
1825
- <div class="run-list" id="providers-list"></div>
1787
+ <small class="hint" id="memDefragModelNote"></small>
1788
+ <div class="add-project-actions" style="margin-top:14px">
1789
+ <button type="button" id="memDefragModelReset" class="btn btn-ghost btn-mini">Use default</button>
1790
+ <button type="button" id="memDefragModelSave" class="btn btn-primary btn-mini">Save</button>
1791
+ </div>
1792
+ <small class="hint" id="memDefragModelMsg"></small>
1793
+ </section>
1794
+ <p id="memory-msg" class="form-msg" aria-live="polite"></p>
1795
+ <div id="memory-host" class="mem-host"></div>
1826
1796
  </section>
1827
- <!-- /pane providers -->
1797
+ <!-- /pane memory -->
1828
1798
 
1829
1799
  <!-- ===== TAB: PLUGINS (was the top-level Plugins view) ===== -->
1830
1800
  <section class="settings-pane hidden" data-tab="plugins">
@@ -1856,42 +1826,104 @@
1856
1826
  </section>
1857
1827
  <!-- /pane plugins -->
1858
1828
 
1859
- <!-- ===== TAB: MEMORY (agent-memory-design.md §10) ===== -->
1860
- <section class="settings-pane hidden" data-tab="memory">
1829
+ <!-- ===== TAB: MODELS (was the top-level Models view) ===== -->
1830
+ <section class="settings-pane hidden" data-tab="models">
1861
1831
  <div class="topbar">
1862
1832
  <div>
1863
- <h1>Memory</h1>
1864
- <div class="sub">What worca remembers across runs and chats — the global rules and preferences every agent sees. A project's own memory lives on its project page (Projects → open a project → Memory).</div>
1833
+ <h1>Models</h1>
1834
+ <div class="sub">The global model catalog — available in every project; entries can override built-ins, route through a provider, or carry per-model routing env. The two cards on top pick the models Worca's own titles and Auto classifier use. Sign-ins and endpoints live on the Providers tab.</div>
1835
+ </div>
1836
+ <div style="display:flex;gap:8px;flex:0 0 auto">
1837
+ <button type="button" id="model-share-btn" class="btn-ghost" style="padding:11px 20px;white-space:nowrap">Share as plugin…</button>
1838
+ <button type="button" id="model-import-btn" class="btn-ghost" style="padding:11px 20px;white-space:nowrap">Import models…</button>
1839
+ <button type="button" id="model-create-btn" class="btn-go" style="padding:11px 20px;white-space:nowrap">
1840
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round"><path d="M12 5v14M5 12h14"></path></svg>
1841
+ Add model
1842
+ </button>
1865
1843
  </div>
1866
1844
  </div>
1867
- <!-- Settings › Memory: the model + effort EVERY Memory defragment run uses (memory-defrag-model.mjs).
1868
- Expert, like the health card's Defragment. No ⓘ and empty hints: the settings-view census
1869
- (test/ui-settings-tooltips.test.mjs) pins both. A plain .card like the health card, NOT a
1870
- .settings-card: that census (About last, twelve cards) counts the General tab's cards. -->
1871
- <section class="card mem-model-card" id="mem-defrag-model-card" data-min-level="expert">
1872
- <div class="label-row"><h2>Defragment model</h2></div>
1873
- <p class="mem-model-text">The model every Memory defragment run uses — from the Defragment button, New pipeline, an Ask Worca card or the CLI. A model named when the run starts (<code>worca --model</code>) still wins.</p>
1874
- <div class="mem-model-row">
1845
+ <!-- The models Worca's own helper calls use (titles, the Auto classifier). Two columns on a
1846
+ wide screen so the catalog below is not pushed a screen down. -->
1847
+ <div class="models-helpers" data-min-level="expert">
1848
+ <!-- Title generation (#422): which model writes run/chat titles.
1849
+ Empty = the model of the run or chat itself (title.mjs
1850
+ resolveTitleModel), so a first-party-free install needs no setup.
1851
+ The select is built from the project-less catalog; a stored id
1852
+ that left the catalog paints disabled + "not installed". -->
1853
+ <section class="card settings-card" id="title-model-settings-card" data-min-level="expert">
1854
+ <div class="card-head">
1855
+ <div class="label-row">
1856
+ <h2>Title generation</h2>
1857
+ <button type="button" class="info-tip" aria-label="About title generation">i<span class="tip-content hidden">
1858
+ Every run and chat gets a short LLM-written title. By default it is written by the
1859
+ model the run or chat itself uses, so an install without a first-party Anthropic
1860
+ account needs no setup here. Pick a model to write every title with it instead;
1861
+ the change applies to the next title, no restart. A non-empty
1862
+ <code>WORCA_TITLE_MODEL</code> in the environment overrides this setting.
1863
+ </span></button>
1864
+ </div>
1865
+ </div>
1875
1866
  <div class="field">
1876
- <div class="label-row"><label for="memDefragModel">Model</label></div>
1877
- <select id="memDefragModel" class="select" aria-label="Defragment model"></select>
1867
+ <div class="label-row">
1868
+ <label for="titleModel">Model</label>
1869
+ </div>
1870
+ <select id="titleModel" class="select" aria-label="Title model"></select>
1871
+ </div>
1872
+ <small class="hint" id="titleModelEnvNote"></small>
1873
+ <div class="add-project-actions" style="margin-top:14px">
1874
+ <button type="button" id="titleModelTest" class="btn btn-ghost btn-mini" title="Send one tiny prompt to the selected model">Test</button>
1875
+ <button type="button" id="titleModelReset" class="btn btn-ghost btn-mini">Use default</button>
1876
+ <button type="button" id="titleModelSave" class="btn btn-primary btn-mini">Save</button>
1877
+ </div>
1878
+ <small class="hint" id="titleModelMsg"></small>
1879
+ </section>
1880
+
1881
+ <!-- Auto workflow model (spec D14 / §7.7): which model classifies a task into a workflow.
1882
+ Empty = the Sonnet-class default; WORCA_AUTO_MODEL in the environment wins. -->
1883
+ <section class="card settings-card" id="auto-model-settings-card" data-min-level="expert">
1884
+ <div class="card-head">
1885
+ <div class="label-row">
1886
+ <h2>Auto workflow model</h2>
1887
+ <button type="button" class="info-tip" aria-label="About the Auto workflow model">i<span class="tip-content hidden">
1888
+ When a run starts on <b>Auto</b>, one short model call reads the task and picks the workflow.
1889
+ Pick the model that makes that call; empty means the Sonnet-class default. A non-empty
1890
+ <code>WORCA_AUTO_MODEL</code> in the environment overrides this setting. Each call is billed to the
1891
+ run as a sub-agent row named "Auto workflow (round n)".
1892
+ </span></button>
1893
+ </div>
1878
1894
  </div>
1879
1895
  <div class="field">
1880
- <div class="label-row"><label for="memDefragEffort">Effort</label></div>
1881
- <select id="memDefragEffort" class="select" aria-label="Defragment effort"></select>
1896
+ <div class="label-row"><label for="autoModel">Model</label></div>
1897
+ <select id="autoModel" class="select" aria-label="Auto workflow model"></select>
1882
1898
  </div>
1899
+ <small class="hint" id="autoModelEnvNote"></small>
1900
+ <div class="add-project-actions" style="margin-top:14px">
1901
+ <button type="button" id="autoModelTest" class="btn btn-ghost btn-mini" title="Send one tiny prompt to the selected model">Test</button>
1902
+ <button type="button" id="autoModelReset" class="btn btn-ghost btn-mini">Use default</button>
1903
+ <button type="button" id="autoModelSave" class="btn btn-primary btn-mini">Save</button>
1904
+ </div>
1905
+ <small class="hint" id="autoModelMsg"></small>
1906
+ </section>
1907
+ </div>
1908
+ <p id="models-msg" class="form-msg" aria-live="polite"></p>
1909
+ <div class="run-list" id="models-list"></div>
1910
+ </section>
1911
+ <!-- /pane models -->
1912
+
1913
+ <!-- ===== TAB: PROVIDERS (model-bridge-design.md §8.1) =====
1914
+ Split out of Models: the card is account-level setup you touch rarely, and at
1915
+ 1000+px it buried the catalog it unlocks. Expert only, like Models. -->
1916
+ <section class="settings-pane hidden" data-tab="providers">
1917
+ <div class="topbar">
1918
+ <div>
1919
+ <h1>Providers</h1>
1920
+ <div class="sub">Sign-ins, endpoints and keys for the models Worca bridges — GitHub Copilot, any OpenAI-compatible server (llama.cpp, Ollama, LM Studio, vLLM), an Anthropic-compatible gateway. The models themselves live on the Models tab.</div>
1883
1921
  </div>
1884
- <small class="hint" id="memDefragModelNote"></small>
1885
- <div class="add-project-actions" style="margin-top:14px">
1886
- <button type="button" id="memDefragModelReset" class="btn btn-ghost btn-mini">Use default</button>
1887
- <button type="button" id="memDefragModelSave" class="btn btn-primary btn-mini">Save</button>
1888
- </div>
1889
- <small class="hint" id="memDefragModelMsg"></small>
1890
- </section>
1891
- <p id="memory-msg" class="form-msg" aria-live="polite"></p>
1892
- <div id="memory-host" class="mem-host"></div>
1922
+ </div>
1923
+ <p id="providers-msg" class="form-msg" aria-live="polite"></p>
1924
+ <div class="run-list" id="providers-list"></div>
1893
1925
  </section>
1894
- <!-- /pane memory -->
1926
+ <!-- /pane providers -->
1895
1927
  </section>
1896
1928
  <!-- /view settings -->
1897
1929
  </main>