@genesislcap/ai-assistant 15.108.0 → 15.109.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/ai-assistant.api.json +410 -4
- package/dist/ai-assistant.d.ts +121 -2
- package/dist/chat-driver.cjs +33 -15
- package/dist/chat-driver.cjs.map +2 -2
- package/dist/chat-driver.mjs +33 -15
- package/dist/chat-driver.mjs.map +2 -2
- package/dist/custom-elements.json +891 -690
- package/dist/dts/components/chat-driver/chat-driver.d.ts +9 -0
- package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
- package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts +2 -0
- package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts.map +1 -1
- package/dist/dts/components/settings-modal/settings-modal.d.ts +2 -0
- package/dist/dts/components/settings-modal/settings-modal.d.ts.map +1 -1
- package/dist/dts/components/settings-modal/settings-modal.styles.d.ts.map +1 -1
- package/dist/dts/components/settings-modal/settings-modal.template.d.ts +1 -0
- package/dist/dts/components/settings-modal/settings-modal.template.d.ts.map +1 -1
- package/dist/dts/genesis/register-genesis-assistant.d.ts +24 -0
- package/dist/dts/genesis/register-genesis-assistant.d.ts.map +1 -1
- package/dist/dts/genesis/types.d.ts +8 -2
- package/dist/dts/genesis/types.d.ts.map +1 -1
- package/dist/dts/genesis/vendor-follower.d.ts +86 -0
- package/dist/dts/genesis/vendor-follower.d.ts.map +1 -0
- package/dist/dts/genesis/vendor-pick.d.ts +36 -0
- package/dist/dts/genesis/vendor-pick.d.ts.map +1 -0
- package/dist/dts/index.d.ts +1 -0
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/main/budget-controller.d.ts +6 -0
- package/dist/dts/main/budget-controller.d.ts.map +1 -1
- package/dist/dts/main/main.d.ts +30 -0
- package/dist/dts/main/main.d.ts.map +1 -1
- package/dist/dts/main/vendor-picker-controller.d.ts +89 -0
- package/dist/dts/main/vendor-picker-controller.d.ts.map +1 -0
- package/dist/dts/provider/ai-provider-switcher.d.ts +22 -1
- package/dist/dts/provider/ai-provider-switcher.d.ts.map +1 -1
- package/dist/dts/provider/tiered-provider-switcher.d.ts +39 -2
- package/dist/dts/provider/tiered-provider-switcher.d.ts.map +1 -1
- package/dist/esm/chat-driver-node.js +1 -1
- package/dist/esm/components/chat-driver/chat-driver.js +3 -2
- package/dist/esm/components/orchestrating-driver/orchestrating-driver.js +1 -0
- package/dist/esm/components/settings-modal/settings-modal.js +4 -1
- package/dist/esm/components/settings-modal/settings-modal.styles.js +59 -0
- package/dist/esm/components/settings-modal/settings-modal.template.js +54 -1
- package/dist/esm/genesis/register-genesis-assistant.js +72 -7
- package/dist/esm/genesis/vendor-follower.js +149 -0
- package/dist/esm/genesis/vendor-pick.js +67 -0
- package/dist/esm/main/budget-controller.js +11 -9
- package/dist/esm/main/main.js +57 -0
- package/dist/esm/main/vendor-picker-controller.js +141 -0
- package/dist/esm/provider/tiered-provider-switcher.js +54 -1
- package/docs/genesis.md +35 -1
- package/package.json +17 -17
|
@@ -854,6 +854,22 @@
|
|
|
854
854
|
"package": "./main/main.template"
|
|
855
855
|
}
|
|
856
856
|
},
|
|
857
|
+
{
|
|
858
|
+
"kind": "js",
|
|
859
|
+
"name": "VendorPickerOption",
|
|
860
|
+
"declaration": {
|
|
861
|
+
"name": "VendorPickerOption",
|
|
862
|
+
"module": "./main/vendor-picker-controller"
|
|
863
|
+
}
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
"kind": "js",
|
|
867
|
+
"name": "VendorSelectedElsewhere",
|
|
868
|
+
"declaration": {
|
|
869
|
+
"name": "VendorSelectedElsewhere",
|
|
870
|
+
"module": "./main/vendor-picker-controller"
|
|
871
|
+
}
|
|
872
|
+
},
|
|
857
873
|
{
|
|
858
874
|
"kind": "js",
|
|
859
875
|
"name": "*",
|
|
@@ -1570,317 +1586,598 @@
|
|
|
1570
1586
|
},
|
|
1571
1587
|
{
|
|
1572
1588
|
"kind": "javascript-module",
|
|
1573
|
-
"path": "src/
|
|
1589
|
+
"path": "src/channel/ai-activity-bus.ts",
|
|
1574
1590
|
"declarations": [
|
|
1575
1591
|
{
|
|
1576
1592
|
"kind": "variable",
|
|
1577
|
-
"name": "
|
|
1593
|
+
"name": "NOOP_ACTIVITY_BUS",
|
|
1578
1594
|
"type": {
|
|
1579
|
-
"text": "
|
|
1595
|
+
"text": "ActivityBus"
|
|
1580
1596
|
},
|
|
1581
|
-
"default": "
|
|
1582
|
-
"description": "The
|
|
1597
|
+
"default": "{ publish: () => {} }",
|
|
1598
|
+
"description": "No-op ActivityBus. The default when no bus is injected (Node, tests, headless\nserver use) — publishing goes nowhere and nothing is left open to tear down."
|
|
1583
1599
|
},
|
|
1584
1600
|
{
|
|
1585
1601
|
"kind": "class",
|
|
1586
|
-
"description": "
|
|
1587
|
-
"name": "
|
|
1602
|
+
"description": "Typed in-process event bus for AI assistant activity events.\n\nDispatches events synchronously to all local subscribers in the same JS module instance\n(i.e. the same browser tab). Events listed in `crossTabEvents` are additionally forwarded\nvia a shared `BroadcastChannel` so that other tabs on the same origin receive them.",
|
|
1603
|
+
"name": "AgenticActivityBus",
|
|
1588
1604
|
"members": [
|
|
1589
1605
|
{
|
|
1590
1606
|
"kind": "field",
|
|
1591
|
-
"name": "
|
|
1592
|
-
"type": {
|
|
1593
|
-
"text": "readonly AgentConfig[]"
|
|
1594
|
-
},
|
|
1595
|
-
"privacy": "private",
|
|
1596
|
-
"readonly": true
|
|
1597
|
-
},
|
|
1598
|
-
{
|
|
1599
|
-
"kind": "field",
|
|
1600
|
-
"name": "providerRegistry",
|
|
1601
|
-
"type": {
|
|
1602
|
-
"text": "AIProviderRegistry"
|
|
1603
|
-
},
|
|
1604
|
-
"privacy": "private",
|
|
1605
|
-
"readonly": true
|
|
1606
|
-
},
|
|
1607
|
-
{
|
|
1608
|
-
"kind": "field",
|
|
1609
|
-
"name": "sessionKey",
|
|
1610
|
-
"type": {
|
|
1611
|
-
"text": "string"
|
|
1612
|
-
},
|
|
1613
|
-
"privacy": "private",
|
|
1614
|
-
"readonly": true
|
|
1615
|
-
},
|
|
1616
|
-
{
|
|
1617
|
-
"kind": "field",
|
|
1618
|
-
"name": "activityBus",
|
|
1619
|
-
"type": {
|
|
1620
|
-
"text": "ActivityBus"
|
|
1621
|
-
},
|
|
1622
|
-
"privacy": "private",
|
|
1623
|
-
"readonly": true
|
|
1624
|
-
},
|
|
1625
|
-
{
|
|
1626
|
-
"kind": "field",
|
|
1627
|
-
"name": "listeners",
|
|
1628
|
-
"privacy": "private",
|
|
1629
|
-
"readonly": true,
|
|
1630
|
-
"default": "new Set<() => void>()"
|
|
1631
|
-
},
|
|
1632
|
-
{
|
|
1633
|
-
"kind": "field",
|
|
1634
|
-
"name": "sessions",
|
|
1607
|
+
"name": "subscribers",
|
|
1635
1608
|
"privacy": "private",
|
|
1636
1609
|
"readonly": true,
|
|
1637
|
-
"default": "new Map<string,
|
|
1610
|
+
"default": "new Map<string, Set<AnyHandler>>()"
|
|
1638
1611
|
},
|
|
1639
1612
|
{
|
|
1640
1613
|
"kind": "field",
|
|
1641
|
-
"name": "
|
|
1614
|
+
"name": "crossTabEvents",
|
|
1642
1615
|
"type": {
|
|
1643
|
-
"text": "string
|
|
1616
|
+
"text": "Set<string>"
|
|
1644
1617
|
},
|
|
1645
1618
|
"privacy": "private",
|
|
1646
|
-
"
|
|
1647
|
-
"
|
|
1619
|
+
"readonly": true,
|
|
1620
|
+
"default": "new Set(config?.crossTabEvents ?? [])"
|
|
1648
1621
|
},
|
|
1649
1622
|
{
|
|
1650
1623
|
"kind": "field",
|
|
1651
|
-
"name": "
|
|
1624
|
+
"name": "channelNameFactory",
|
|
1652
1625
|
"type": {
|
|
1653
|
-
"text": "
|
|
1626
|
+
"text": "() => string | undefined"
|
|
1654
1627
|
},
|
|
1655
1628
|
"privacy": "private",
|
|
1656
|
-
"
|
|
1657
|
-
},
|
|
1658
|
-
{
|
|
1659
|
-
"kind": "field",
|
|
1660
|
-
"name": "pauseState",
|
|
1661
|
-
"type": {
|
|
1662
|
-
"text": "AutopilotHostState['pause'] | undefined"
|
|
1663
|
-
},
|
|
1664
|
-
"privacy": "private"
|
|
1629
|
+
"readonly": true
|
|
1665
1630
|
},
|
|
1666
1631
|
{
|
|
1667
1632
|
"kind": "field",
|
|
1668
|
-
"name": "
|
|
1633
|
+
"name": "channel",
|
|
1669
1634
|
"type": {
|
|
1670
|
-
"text": "
|
|
1635
|
+
"text": "BroadcastChannel | undefined"
|
|
1671
1636
|
},
|
|
1672
1637
|
"privacy": "private"
|
|
1673
1638
|
},
|
|
1674
1639
|
{
|
|
1675
1640
|
"kind": "field",
|
|
1676
|
-
"name": "
|
|
1677
|
-
"type": {
|
|
1678
|
-
"text": "InteractionOpened | undefined"
|
|
1679
|
-
},
|
|
1680
|
-
"privacy": "private",
|
|
1681
|
-
"description": "The interaction open right now, whoever holds it: claimed or not, it was offered here first.\n`held` covers only what the autopilot claimed, so this is how the status knows that the working\nagent is parked on a question left with the person (see `waitingOnUser`)."
|
|
1682
|
-
},
|
|
1683
|
-
{
|
|
1684
|
-
"kind": "field",
|
|
1685
|
-
"name": "declinedWhilePaused",
|
|
1686
|
-
"type": {
|
|
1687
|
-
"text": "InteractionOpened | undefined"
|
|
1688
|
-
},
|
|
1689
|
-
"privacy": "private",
|
|
1690
|
-
"description": "The open interaction, when the autopilot declined it only for being paused as it opened: a live\nResume may still take it (see `takeOpenOnResume`). Cleared when it is taken or settles."
|
|
1691
|
-
},
|
|
1692
|
-
{
|
|
1693
|
-
"kind": "field",
|
|
1694
|
-
"name": "refinements",
|
|
1641
|
+
"name": "channelInitialised",
|
|
1695
1642
|
"type": {
|
|
1696
|
-
"text": "
|
|
1643
|
+
"text": "boolean"
|
|
1697
1644
|
},
|
|
1698
1645
|
"privacy": "private",
|
|
1699
|
-
"
|
|
1646
|
+
"default": "false"
|
|
1700
1647
|
},
|
|
1701
1648
|
{
|
|
1702
|
-
"kind": "
|
|
1703
|
-
"name": "
|
|
1704
|
-
"type": {
|
|
1705
|
-
"text": "ReturnType<typeof setTimeout> | undefined"
|
|
1706
|
-
},
|
|
1649
|
+
"kind": "method",
|
|
1650
|
+
"name": "ensureChannel",
|
|
1707
1651
|
"privacy": "private",
|
|
1708
|
-
"
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
"name": "endedDiagnostics",
|
|
1713
|
-
"type": {
|
|
1714
|
-
"text": "DiagnosticEntry[]"
|
|
1652
|
+
"return": {
|
|
1653
|
+
"type": {
|
|
1654
|
+
"text": "void"
|
|
1655
|
+
}
|
|
1715
1656
|
},
|
|
1716
|
-
"
|
|
1717
|
-
"readonly": true,
|
|
1718
|
-
"default": "[]",
|
|
1719
|
-
"description": "What sessions that have ended did, kept for the debug log."
|
|
1657
|
+
"description": "Lazily open the cross-tab `BroadcastChannel` on first use. Deferred (rather than\ncreated in the constructor) so that importing this module, or constructing the bus\noff-browser (Node, tests, headless server), never opens a live channel or reads\n`sessionStorage` — both would keep a Node event loop alive and hang the process.\nCross-tab forwarding is inherently browser-only, so channel creation is gated on a\nbrowser environment; elsewhere the bus stays purely in-process."
|
|
1720
1658
|
},
|
|
1721
1659
|
{
|
|
1722
|
-
"kind": "
|
|
1723
|
-
"name": "
|
|
1724
|
-
"
|
|
1725
|
-
"
|
|
1660
|
+
"kind": "method",
|
|
1661
|
+
"name": "subscribe",
|
|
1662
|
+
"return": {
|
|
1663
|
+
"type": {
|
|
1664
|
+
"text": "() => void"
|
|
1665
|
+
}
|
|
1726
1666
|
},
|
|
1727
|
-
"
|
|
1728
|
-
|
|
1729
|
-
|
|
1667
|
+
"parameters": [
|
|
1668
|
+
{
|
|
1669
|
+
"name": "type",
|
|
1670
|
+
"type": {
|
|
1671
|
+
"text": "K"
|
|
1672
|
+
}
|
|
1673
|
+
},
|
|
1674
|
+
{
|
|
1675
|
+
"name": "handler",
|
|
1676
|
+
"type": {
|
|
1677
|
+
"text": "(detail: AgenticActivityEvents[K]) => void"
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
],
|
|
1681
|
+
"description": "Subscribe to an event. Returns an unsubscribe function — call it in\n`disconnectedCallback` to avoid memory leaks."
|
|
1730
1682
|
},
|
|
1731
1683
|
{
|
|
1732
|
-
"kind": "
|
|
1733
|
-
"name": "
|
|
1734
|
-
"
|
|
1735
|
-
"
|
|
1684
|
+
"kind": "method",
|
|
1685
|
+
"name": "publish",
|
|
1686
|
+
"return": {
|
|
1687
|
+
"type": {
|
|
1688
|
+
"text": "void"
|
|
1689
|
+
}
|
|
1736
1690
|
},
|
|
1737
|
-
"
|
|
1738
|
-
|
|
1691
|
+
"parameters": [
|
|
1692
|
+
{
|
|
1693
|
+
"name": "type",
|
|
1694
|
+
"type": {
|
|
1695
|
+
"text": "K"
|
|
1696
|
+
}
|
|
1697
|
+
},
|
|
1698
|
+
{
|
|
1699
|
+
"name": "detail",
|
|
1700
|
+
"type": {
|
|
1701
|
+
"text": "AgenticActivityEvents[K]"
|
|
1702
|
+
}
|
|
1703
|
+
}
|
|
1704
|
+
],
|
|
1705
|
+
"description": "Publish an event to all local subscribers and, if configured, to other tabs\nvia BroadcastChannel."
|
|
1739
1706
|
},
|
|
1740
1707
|
{
|
|
1741
|
-
"kind": "
|
|
1742
|
-
"name": "
|
|
1743
|
-
"
|
|
1744
|
-
"
|
|
1708
|
+
"kind": "method",
|
|
1709
|
+
"name": "addCrossTabEvent",
|
|
1710
|
+
"return": {
|
|
1711
|
+
"type": {
|
|
1712
|
+
"text": "void"
|
|
1713
|
+
}
|
|
1745
1714
|
},
|
|
1746
|
-
"
|
|
1747
|
-
|
|
1715
|
+
"parameters": [
|
|
1716
|
+
{
|
|
1717
|
+
"name": "type",
|
|
1718
|
+
"type": {
|
|
1719
|
+
"text": "keyof AgenticActivityEvents"
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
],
|
|
1723
|
+
"description": "Add an event type to the cross-tab forwarding set at runtime.\nMust be called before the first AgenticActivityBus.publish of that event type."
|
|
1748
1724
|
},
|
|
1749
1725
|
{
|
|
1750
|
-
"kind": "
|
|
1751
|
-
"name": "
|
|
1752
|
-
"
|
|
1753
|
-
"
|
|
1726
|
+
"kind": "method",
|
|
1727
|
+
"name": "close",
|
|
1728
|
+
"return": {
|
|
1729
|
+
"type": {
|
|
1730
|
+
"text": "void"
|
|
1731
|
+
}
|
|
1754
1732
|
},
|
|
1755
|
-
"
|
|
1756
|
-
"description": "The mode of a hand-off's target that has released, kept for its caller, which has not taken the\nlock back yet (GENC-1751): the flow has no owner in between. See `carriedTo`."
|
|
1733
|
+
"description": "Close the underlying BroadcastChannel. Call once on application teardown if needed."
|
|
1757
1734
|
},
|
|
1758
1735
|
{
|
|
1759
|
-
"kind": "
|
|
1760
|
-
"name": "
|
|
1761
|
-
"type": {
|
|
1762
|
-
"text": "Carried | undefined"
|
|
1763
|
-
},
|
|
1736
|
+
"kind": "method",
|
|
1737
|
+
"name": "notifyLocal",
|
|
1764
1738
|
"privacy": "private",
|
|
1765
|
-
"
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
"name": "generation",
|
|
1770
|
-
"type": {
|
|
1771
|
-
"text": "number"
|
|
1739
|
+
"return": {
|
|
1740
|
+
"type": {
|
|
1741
|
+
"text": "void"
|
|
1742
|
+
}
|
|
1772
1743
|
},
|
|
1773
|
-
"
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1744
|
+
"parameters": [
|
|
1745
|
+
{
|
|
1746
|
+
"name": "type",
|
|
1747
|
+
"type": {
|
|
1748
|
+
"text": "string"
|
|
1749
|
+
}
|
|
1750
|
+
},
|
|
1751
|
+
{
|
|
1752
|
+
"name": "detail",
|
|
1753
|
+
"type": {
|
|
1754
|
+
"text": "unknown"
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1757
|
+
]
|
|
1758
|
+
}
|
|
1759
|
+
]
|
|
1760
|
+
},
|
|
1761
|
+
{
|
|
1762
|
+
"kind": "variable",
|
|
1763
|
+
"name": "agenticActivityBus",
|
|
1764
|
+
"default": "new AgenticActivityBus({\n crossTabEvents: ['halo-start', 'halo-stop', 'tool-loop-start', 'tool-loop-end'],\n // Lazy: the tab-scoped name (and its `sessionStorage` read) is computed on first\n // cross-tab use in a browser, not at module-eval — so importing this module is\n // side-effect-free and Node/test-safe.\n channelNameFactory: () => getTabScopedChannelName('foundation-ai-activity'),\n})",
|
|
1765
|
+
"description": "Pre-instantiated singleton event bus for AI assistant activity.\n\n- `halo-start` / `halo-stop` are forwarded via a tab-scoped `BroadcastChannel` so that\n popout windows opened from this tab show halo animations, while remaining isolated from\n unrelated tabs on the same origin (tab-scoped channel name).\n- `tool-loop-start` / `tool-loop-end` are cross-tab for the same reason: they describe the\n assistant's lifecycle (a turn beginning / ending), and the most common subscribers\n (workspace transitions, post-turn deferred recomputation, UI gates tied to the assistant\n being idle) need the event regardless of whether the user is interacting with the chat\n in the main tab or a popout window. Tab-local-only telemetry can subscribe and filter.\n- `chat-popout` / `chat-popin` are in-memory only — they must only affect the tab where the\n user clicked."
|
|
1766
|
+
}
|
|
1767
|
+
],
|
|
1768
|
+
"exports": [
|
|
1769
|
+
{
|
|
1770
|
+
"kind": "js",
|
|
1771
|
+
"name": "NOOP_ACTIVITY_BUS",
|
|
1772
|
+
"declaration": {
|
|
1773
|
+
"name": "NOOP_ACTIVITY_BUS",
|
|
1774
|
+
"module": "src/channel/ai-activity-bus.ts"
|
|
1775
|
+
}
|
|
1776
|
+
},
|
|
1777
|
+
{
|
|
1778
|
+
"kind": "js",
|
|
1779
|
+
"name": "AgenticActivityBus",
|
|
1780
|
+
"declaration": {
|
|
1781
|
+
"name": "AgenticActivityBus",
|
|
1782
|
+
"module": "src/channel/ai-activity-bus.ts"
|
|
1783
|
+
}
|
|
1784
|
+
},
|
|
1785
|
+
{
|
|
1786
|
+
"kind": "js",
|
|
1787
|
+
"name": "agenticActivityBus",
|
|
1788
|
+
"declaration": {
|
|
1789
|
+
"name": "agenticActivityBus",
|
|
1790
|
+
"module": "src/channel/ai-activity-bus.ts"
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
]
|
|
1794
|
+
},
|
|
1795
|
+
{
|
|
1796
|
+
"kind": "javascript-module",
|
|
1797
|
+
"path": "src/channel/ai-activity-channel.ts",
|
|
1798
|
+
"declarations": [],
|
|
1799
|
+
"exports": []
|
|
1800
|
+
},
|
|
1801
|
+
{
|
|
1802
|
+
"kind": "javascript-module",
|
|
1803
|
+
"path": "src/channel/autopilot-needs-user.ts",
|
|
1804
|
+
"declarations": [
|
|
1805
|
+
{
|
|
1806
|
+
"kind": "function",
|
|
1807
|
+
"name": "setAutopilotNeedsUser",
|
|
1808
|
+
"return": {
|
|
1809
|
+
"type": {
|
|
1810
|
+
"text": "void"
|
|
1811
|
+
}
|
|
1812
|
+
},
|
|
1813
|
+
"parameters": [
|
|
1814
|
+
{
|
|
1815
|
+
"name": "sessionKey",
|
|
1816
|
+
"type": {
|
|
1817
|
+
"text": "string"
|
|
1818
|
+
}
|
|
1819
|
+
},
|
|
1820
|
+
{
|
|
1821
|
+
"name": "needsUser",
|
|
1822
|
+
"type": {
|
|
1823
|
+
"text": "boolean"
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1826
|
+
],
|
|
1827
|
+
"description": "Set it for one session, announcing `autopilot-needs-user` when it changes."
|
|
1828
|
+
},
|
|
1829
|
+
{
|
|
1830
|
+
"kind": "function",
|
|
1831
|
+
"name": "autopilotNeedsUser",
|
|
1832
|
+
"return": {
|
|
1833
|
+
"type": {
|
|
1834
|
+
"text": "boolean"
|
|
1835
|
+
}
|
|
1836
|
+
},
|
|
1837
|
+
"parameters": [
|
|
1838
|
+
{
|
|
1839
|
+
"name": "sessionKey",
|
|
1840
|
+
"optional": true,
|
|
1841
|
+
"type": {
|
|
1842
|
+
"text": "string"
|
|
1843
|
+
}
|
|
1844
|
+
}
|
|
1845
|
+
],
|
|
1846
|
+
"description": "Whether a session has something waiting on the person — or, without a key (a bubble that cannot\ntell which assistant it holds), whether any session has."
|
|
1847
|
+
}
|
|
1848
|
+
],
|
|
1849
|
+
"exports": [
|
|
1850
|
+
{
|
|
1851
|
+
"kind": "js",
|
|
1852
|
+
"name": "setAutopilotNeedsUser",
|
|
1853
|
+
"declaration": {
|
|
1854
|
+
"name": "setAutopilotNeedsUser",
|
|
1855
|
+
"module": "src/channel/autopilot-needs-user.ts"
|
|
1856
|
+
}
|
|
1857
|
+
},
|
|
1858
|
+
{
|
|
1859
|
+
"kind": "js",
|
|
1860
|
+
"name": "autopilotNeedsUser",
|
|
1861
|
+
"declaration": {
|
|
1862
|
+
"name": "autopilotNeedsUser",
|
|
1863
|
+
"module": "src/channel/autopilot-needs-user.ts"
|
|
1864
|
+
}
|
|
1865
|
+
}
|
|
1866
|
+
]
|
|
1867
|
+
},
|
|
1868
|
+
{
|
|
1869
|
+
"kind": "javascript-module",
|
|
1870
|
+
"path": "src/autopilot/autopilot-driver.ts",
|
|
1871
|
+
"declarations": [
|
|
1872
|
+
{
|
|
1873
|
+
"kind": "variable",
|
|
1874
|
+
"name": "AUTOPILOT_CLAIMANT",
|
|
1875
|
+
"type": {
|
|
1876
|
+
"text": "string"
|
|
1877
|
+
},
|
|
1878
|
+
"default": "'autopilot'",
|
|
1879
|
+
"description": "The holder id the autopilot claims interactions as."
|
|
1880
|
+
},
|
|
1881
|
+
{
|
|
1882
|
+
"kind": "class",
|
|
1883
|
+
"description": "Autopilot (GENC-1660): a driver decorator that answers the questions a working agent asks the\nuser, on their behalf, grounded in the agent's autopilot config (for bootstrap, the brief).\n\nNeither side calls the other. The working agent asks as it always does; this driver claims the\ninteractions its policy allows, while it is running for that flow, and answers each in one short\nturn on the flow's `AutopilotSession`. It plugs in only through the generic extension points\n— an interaction interceptor, a handler capability and the flow lifecycle — so the core knows\nnothing about it, and it wraps any `AiDriver`.",
|
|
1884
|
+
"name": "AutopilotDriver",
|
|
1885
|
+
"members": [
|
|
1886
|
+
{
|
|
1778
1887
|
"kind": "field",
|
|
1779
|
-
"name": "
|
|
1888
|
+
"name": "agents",
|
|
1780
1889
|
"type": {
|
|
1781
|
-
"text": "
|
|
1890
|
+
"text": "readonly AgentConfig[]"
|
|
1782
1891
|
},
|
|
1783
1892
|
"privacy": "private",
|
|
1784
|
-
"
|
|
1785
|
-
"description": "Working turns this driver has started that have not ended yet; see `working`."
|
|
1893
|
+
"readonly": true
|
|
1786
1894
|
},
|
|
1787
1895
|
{
|
|
1788
1896
|
"kind": "field",
|
|
1789
|
-
"name": "
|
|
1897
|
+
"name": "providerRegistry",
|
|
1790
1898
|
"type": {
|
|
1791
|
-
"text": "
|
|
1899
|
+
"text": "AIProviderRegistry"
|
|
1792
1900
|
},
|
|
1793
1901
|
"privacy": "private",
|
|
1794
|
-
"
|
|
1795
|
-
"description": "Written questions being answered right now; see `working`."
|
|
1902
|
+
"readonly": true
|
|
1796
1903
|
},
|
|
1797
1904
|
{
|
|
1798
1905
|
"kind": "field",
|
|
1799
|
-
"name": "
|
|
1906
|
+
"name": "sessionKey",
|
|
1800
1907
|
"type": {
|
|
1801
|
-
"text": "
|
|
1908
|
+
"text": "string"
|
|
1802
1909
|
},
|
|
1803
1910
|
"privacy": "private",
|
|
1804
|
-
"
|
|
1805
|
-
"description": "Whether the autopilot has been running, and working, since it last stopped or was paused: so\ngoing idle now is a stop to report. Outlives its flow ending, so a turn still running then is\nwaited out. See `watchForStop`."
|
|
1911
|
+
"readonly": true
|
|
1806
1912
|
},
|
|
1807
1913
|
{
|
|
1808
1914
|
"kind": "field",
|
|
1809
|
-
"name": "
|
|
1915
|
+
"name": "activityBus",
|
|
1810
1916
|
"type": {
|
|
1811
|
-
"text": "
|
|
1917
|
+
"text": "ActivityBus"
|
|
1812
1918
|
},
|
|
1813
1919
|
"privacy": "private",
|
|
1814
|
-
"
|
|
1920
|
+
"readonly": true
|
|
1815
1921
|
},
|
|
1816
1922
|
{
|
|
1817
1923
|
"kind": "field",
|
|
1818
|
-
"name": "
|
|
1924
|
+
"name": "listeners",
|
|
1819
1925
|
"privacy": "private",
|
|
1820
1926
|
"readonly": true,
|
|
1821
|
-
"default": "new Set<() => void>()"
|
|
1822
|
-
"description": "Stops each wait for a widget left with the person to ask them; see `reportHandBackWhenAsking`."
|
|
1927
|
+
"default": "new Set<() => void>()"
|
|
1823
1928
|
},
|
|
1824
1929
|
{
|
|
1825
1930
|
"kind": "field",
|
|
1826
|
-
"name": "
|
|
1931
|
+
"name": "sessions",
|
|
1932
|
+
"privacy": "private",
|
|
1933
|
+
"readonly": true,
|
|
1934
|
+
"default": "new Map<string, AutopilotSession>()"
|
|
1935
|
+
},
|
|
1936
|
+
{
|
|
1937
|
+
"kind": "field",
|
|
1938
|
+
"name": "onFor",
|
|
1827
1939
|
"type": {
|
|
1828
|
-
"text": "
|
|
1940
|
+
"text": "string | null"
|
|
1829
1941
|
},
|
|
1830
|
-
"
|
|
1942
|
+
"privacy": "private",
|
|
1943
|
+
"default": "null",
|
|
1944
|
+
"description": "The flow the mode applies to: set when it is first switched, cleared when that flow ends."
|
|
1831
1945
|
},
|
|
1832
1946
|
{
|
|
1833
|
-
"kind": "
|
|
1834
|
-
"name": "
|
|
1947
|
+
"kind": "field",
|
|
1948
|
+
"name": "mode",
|
|
1949
|
+
"type": {
|
|
1950
|
+
"text": "'paused' | 'running'"
|
|
1951
|
+
},
|
|
1835
1952
|
"privacy": "private",
|
|
1836
|
-
"
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1953
|
+
"default": "'paused'"
|
|
1954
|
+
},
|
|
1955
|
+
{
|
|
1956
|
+
"kind": "field",
|
|
1957
|
+
"name": "pauseState",
|
|
1958
|
+
"type": {
|
|
1959
|
+
"text": "AutopilotHostState['pause'] | undefined"
|
|
1840
1960
|
},
|
|
1841
|
-
"
|
|
1961
|
+
"privacy": "private"
|
|
1842
1962
|
},
|
|
1843
1963
|
{
|
|
1844
1964
|
"kind": "field",
|
|
1845
|
-
"name": "
|
|
1965
|
+
"name": "held",
|
|
1846
1966
|
"type": {
|
|
1847
|
-
"text": "
|
|
1967
|
+
"text": "Held | undefined"
|
|
1848
1968
|
},
|
|
1849
|
-
"
|
|
1969
|
+
"privacy": "private"
|
|
1850
1970
|
},
|
|
1851
1971
|
{
|
|
1852
|
-
"kind": "
|
|
1853
|
-
"name": "
|
|
1854
|
-
"
|
|
1855
|
-
"
|
|
1856
|
-
"text": "() => void"
|
|
1857
|
-
}
|
|
1972
|
+
"kind": "field",
|
|
1973
|
+
"name": "open",
|
|
1974
|
+
"type": {
|
|
1975
|
+
"text": "InteractionOpened | undefined"
|
|
1858
1976
|
},
|
|
1859
|
-
"
|
|
1860
|
-
|
|
1861
|
-
"name": "listener",
|
|
1862
|
-
"type": {
|
|
1863
|
-
"text": "() => void"
|
|
1864
|
-
}
|
|
1865
|
-
}
|
|
1866
|
-
]
|
|
1977
|
+
"privacy": "private",
|
|
1978
|
+
"description": "The interaction open right now, whoever holds it: claimed or not, it was offered here first.\n`held` covers only what the autopilot claimed, so this is how the status knows that the working\nagent is parked on a question left with the person (see `waitingOnUser`)."
|
|
1867
1979
|
},
|
|
1868
1980
|
{
|
|
1869
|
-
"kind": "
|
|
1870
|
-
"name": "
|
|
1871
|
-
"
|
|
1872
|
-
"
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1981
|
+
"kind": "field",
|
|
1982
|
+
"name": "declinedWhilePaused",
|
|
1983
|
+
"type": {
|
|
1984
|
+
"text": "InteractionOpened | undefined"
|
|
1985
|
+
},
|
|
1986
|
+
"privacy": "private",
|
|
1987
|
+
"description": "The open interaction, when the autopilot declined it only for being paused as it opened: a live\nResume may still take it (see `takeOpenOnResume`). Cleared when it is taken or settles."
|
|
1876
1988
|
},
|
|
1877
1989
|
{
|
|
1878
|
-
"kind": "
|
|
1879
|
-
"name": "
|
|
1880
|
-
"
|
|
1881
|
-
"
|
|
1882
|
-
|
|
1883
|
-
|
|
1990
|
+
"kind": "field",
|
|
1991
|
+
"name": "refinements",
|
|
1992
|
+
"type": {
|
|
1993
|
+
"text": "{ key: string; count: number } | undefined"
|
|
1994
|
+
},
|
|
1995
|
+
"privacy": "private",
|
|
1996
|
+
"description": "Refining actions taken on the current step (written answers among them), for the limit."
|
|
1997
|
+
},
|
|
1998
|
+
{
|
|
1999
|
+
"kind": "field",
|
|
2000
|
+
"name": "watchdog",
|
|
2001
|
+
"type": {
|
|
2002
|
+
"text": "ReturnType<typeof setTimeout> | undefined"
|
|
2003
|
+
},
|
|
2004
|
+
"privacy": "private",
|
|
2005
|
+
"description": "The watchdog's next check, while a claimed interaction is pending."
|
|
2006
|
+
},
|
|
2007
|
+
{
|
|
2008
|
+
"kind": "field",
|
|
2009
|
+
"name": "endedDiagnostics",
|
|
2010
|
+
"type": {
|
|
2011
|
+
"text": "DiagnosticEntry[]"
|
|
2012
|
+
},
|
|
2013
|
+
"privacy": "private",
|
|
2014
|
+
"readonly": true,
|
|
2015
|
+
"default": "[]",
|
|
2016
|
+
"description": "What sessions that have ended did, kept for the debug log."
|
|
2017
|
+
},
|
|
2018
|
+
{
|
|
2019
|
+
"kind": "field",
|
|
2020
|
+
"name": "consecutiveReplies",
|
|
2021
|
+
"type": {
|
|
2022
|
+
"text": "number"
|
|
2023
|
+
},
|
|
2024
|
+
"privacy": "private",
|
|
2025
|
+
"default": "0",
|
|
2026
|
+
"description": "Written answers sent in a row; see `MAX_CONSECUTIVE_REPLIES`."
|
|
2027
|
+
},
|
|
2028
|
+
{
|
|
2029
|
+
"kind": "field",
|
|
2030
|
+
"name": "turnHandBack",
|
|
2031
|
+
"type": {
|
|
2032
|
+
"text": "{ why: string } | undefined"
|
|
2033
|
+
},
|
|
2034
|
+
"privacy": "private",
|
|
2035
|
+
"description": "Set while the turn-level hand-back waits on the person."
|
|
2036
|
+
},
|
|
2037
|
+
{
|
|
2038
|
+
"kind": "field",
|
|
2039
|
+
"name": "restored",
|
|
2040
|
+
"type": {
|
|
2041
|
+
"text": "PersistedAutopilotMode | undefined"
|
|
2042
|
+
},
|
|
2043
|
+
"privacy": "private",
|
|
2044
|
+
"description": "A mode restored with the session, waiting for its flow to become the owner again."
|
|
2045
|
+
},
|
|
2046
|
+
{
|
|
2047
|
+
"kind": "field",
|
|
2048
|
+
"name": "handingBack",
|
|
2049
|
+
"type": {
|
|
2050
|
+
"text": "Carried | undefined"
|
|
2051
|
+
},
|
|
2052
|
+
"privacy": "private",
|
|
2053
|
+
"description": "The mode of a hand-off's target that has released, kept for its caller, which has not taken the\nlock back yet (GENC-1751): the flow has no owner in between. See `carriedTo`."
|
|
2054
|
+
},
|
|
2055
|
+
{
|
|
2056
|
+
"kind": "field",
|
|
2057
|
+
"name": "switchedFrom",
|
|
2058
|
+
"type": {
|
|
2059
|
+
"text": "Carried | undefined"
|
|
2060
|
+
},
|
|
2061
|
+
"privacy": "private",
|
|
2062
|
+
"description": "The mode of the flow that just ended, should a one-way hand-off with nobody waiting turn out to\nhave ended it: that switch announces itself only after the owner has changed (GENC-1751)."
|
|
2063
|
+
},
|
|
2064
|
+
{
|
|
2065
|
+
"kind": "field",
|
|
2066
|
+
"name": "generation",
|
|
2067
|
+
"type": {
|
|
2068
|
+
"text": "number"
|
|
2069
|
+
},
|
|
2070
|
+
"privacy": "private",
|
|
2071
|
+
"default": "0",
|
|
2072
|
+
"description": "Bumped on every pause and resume, and when its sessions end. A written answer is sent only if\nnone came between asking for it and its landing: one started before a pause is stale after it,\neven once resumed."
|
|
2073
|
+
},
|
|
2074
|
+
{
|
|
2075
|
+
"kind": "field",
|
|
2076
|
+
"name": "turnsInFlight",
|
|
2077
|
+
"type": {
|
|
2078
|
+
"text": "number"
|
|
2079
|
+
},
|
|
2080
|
+
"privacy": "private",
|
|
2081
|
+
"default": "0",
|
|
2082
|
+
"description": "Working turns this driver has started that have not ended yet; see `working`."
|
|
2083
|
+
},
|
|
2084
|
+
{
|
|
2085
|
+
"kind": "field",
|
|
2086
|
+
"name": "answersInFlight",
|
|
2087
|
+
"type": {
|
|
2088
|
+
"text": "number"
|
|
2089
|
+
},
|
|
2090
|
+
"privacy": "private",
|
|
2091
|
+
"default": "0",
|
|
2092
|
+
"description": "Written questions being answered right now; see `working`."
|
|
2093
|
+
},
|
|
2094
|
+
{
|
|
2095
|
+
"kind": "field",
|
|
2096
|
+
"name": "ranSinceStop",
|
|
2097
|
+
"type": {
|
|
2098
|
+
"text": "boolean"
|
|
2099
|
+
},
|
|
2100
|
+
"privacy": "private",
|
|
2101
|
+
"default": "false",
|
|
2102
|
+
"description": "Whether the autopilot has been running, and working, since it last stopped or was paused: so\ngoing idle now is a stop to report. Outlives its flow ending, so a turn still running then is\nwaited out. See `watchForStop`."
|
|
2103
|
+
},
|
|
2104
|
+
{
|
|
2105
|
+
"kind": "field",
|
|
2106
|
+
"name": "stopCheck",
|
|
2107
|
+
"type": {
|
|
2108
|
+
"text": "ReturnType<typeof setTimeout> | undefined"
|
|
2109
|
+
},
|
|
2110
|
+
"privacy": "private",
|
|
2111
|
+
"description": "The check that confirms the autopilot stopped, once it looked like it had."
|
|
2112
|
+
},
|
|
2113
|
+
{
|
|
2114
|
+
"kind": "field",
|
|
2115
|
+
"name": "handBackWaits",
|
|
2116
|
+
"privacy": "private",
|
|
2117
|
+
"readonly": true,
|
|
2118
|
+
"default": "new Set<() => void>()",
|
|
2119
|
+
"description": "Stops each wait for a widget left with the person to ask them; see `reportHandBackWhenAsking`."
|
|
2120
|
+
},
|
|
2121
|
+
{
|
|
2122
|
+
"kind": "field",
|
|
2123
|
+
"name": "state",
|
|
2124
|
+
"type": {
|
|
2125
|
+
"text": "AutopilotHostState"
|
|
2126
|
+
},
|
|
2127
|
+
"readonly": true
|
|
2128
|
+
},
|
|
2129
|
+
{
|
|
2130
|
+
"kind": "method",
|
|
2131
|
+
"name": "waitingOnUser",
|
|
2132
|
+
"privacy": "private",
|
|
2133
|
+
"return": {
|
|
2134
|
+
"type": {
|
|
2135
|
+
"text": "boolean"
|
|
2136
|
+
}
|
|
2137
|
+
},
|
|
2138
|
+
"description": "Whether the working agent is parked on a question the person holds, with the autopilot deciding\nnothing: one it never took — its policy keeps it for the person, it is `userOnly` (the turn-level\nhand-back among them), it has no controller, or it opened while paused and no Resume has taken\nit since (a restored mode takes nothing) — or one another interceptor took and then gave to the\nperson. One the autopilot handed back reads `selfPaused`, and one a pause handed over reads\n`paused`; `state` settles both before asking this.\n\nNever one that asks them nothing (see `asksThePerson`): the person holds it, but it is work\nrunning, which settles by itself, so \"waiting for your answer\" would be untrue. A hand-back is\nreported by the same rule (see `reportHandBackWhenAsking`)."
|
|
2139
|
+
},
|
|
2140
|
+
{
|
|
2141
|
+
"kind": "field",
|
|
2142
|
+
"name": "copy",
|
|
2143
|
+
"type": {
|
|
2144
|
+
"text": "AutopilotCopy"
|
|
2145
|
+
},
|
|
2146
|
+
"readonly": true
|
|
2147
|
+
},
|
|
2148
|
+
{
|
|
2149
|
+
"kind": "method",
|
|
2150
|
+
"name": "subscribe",
|
|
2151
|
+
"return": {
|
|
2152
|
+
"type": {
|
|
2153
|
+
"text": "() => void"
|
|
2154
|
+
}
|
|
2155
|
+
},
|
|
2156
|
+
"parameters": [
|
|
2157
|
+
{
|
|
2158
|
+
"name": "listener",
|
|
2159
|
+
"type": {
|
|
2160
|
+
"text": "() => void"
|
|
2161
|
+
}
|
|
2162
|
+
}
|
|
2163
|
+
]
|
|
2164
|
+
},
|
|
2165
|
+
{
|
|
2166
|
+
"kind": "method",
|
|
2167
|
+
"name": "pause",
|
|
2168
|
+
"return": {
|
|
2169
|
+
"type": {
|
|
2170
|
+
"text": "void"
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
},
|
|
2174
|
+
{
|
|
2175
|
+
"kind": "method",
|
|
2176
|
+
"name": "resume",
|
|
2177
|
+
"return": {
|
|
2178
|
+
"type": {
|
|
2179
|
+
"text": "void"
|
|
2180
|
+
}
|
|
1884
2181
|
}
|
|
1885
2182
|
},
|
|
1886
2183
|
{
|
|
@@ -5047,285 +5344,235 @@
|
|
|
5047
5344
|
},
|
|
5048
5345
|
{
|
|
5049
5346
|
"kind": "javascript-module",
|
|
5050
|
-
"path": "src/
|
|
5347
|
+
"path": "src/config/config.ts",
|
|
5051
5348
|
"declarations": [
|
|
5052
5349
|
{
|
|
5053
|
-
"kind": "
|
|
5054
|
-
"name": "
|
|
5055
|
-
"
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5350
|
+
"kind": "function",
|
|
5351
|
+
"name": "defineAgent",
|
|
5352
|
+
"description": "Identity helper that infers the narrowest possible type for an agent config,\npreserving string literal types (including `name`) without requiring `as const`.\n\nUse this when you need `typeof myAgent` to carry the literal `name` type —\nfor example, when wiring `ChatToolHandlers<typeof myAgent>`.\n\n```ts\nconst myAgent = defineAgent({ name: 'my_agent', ... });\ntype Handlers = ChatToolHandlers<typeof myAgent>;\n// requestSubAgent name param is now typed as 'my_agent'\n```"
|
|
5353
|
+
}
|
|
5354
|
+
],
|
|
5355
|
+
"exports": [
|
|
5356
|
+
{
|
|
5357
|
+
"kind": "js",
|
|
5358
|
+
"name": "CachePolicy",
|
|
5359
|
+
"declaration": {
|
|
5360
|
+
"name": "CachePolicy",
|
|
5361
|
+
"module": "src/config/config.ts"
|
|
5362
|
+
}
|
|
5060
5363
|
},
|
|
5061
5364
|
{
|
|
5062
|
-
"kind": "
|
|
5063
|
-
"
|
|
5064
|
-
"
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5365
|
+
"kind": "js",
|
|
5366
|
+
"name": "ChatFallback",
|
|
5367
|
+
"declaration": {
|
|
5368
|
+
"name": "ChatFallback",
|
|
5369
|
+
"module": "src/config/config.ts"
|
|
5370
|
+
}
|
|
5371
|
+
},
|
|
5372
|
+
{
|
|
5373
|
+
"kind": "js",
|
|
5374
|
+
"name": "ChatInputDuringExecutionMode",
|
|
5375
|
+
"declaration": {
|
|
5376
|
+
"name": "ChatInputDuringExecutionMode",
|
|
5377
|
+
"module": "src/config/config.ts"
|
|
5378
|
+
}
|
|
5379
|
+
},
|
|
5380
|
+
{
|
|
5381
|
+
"kind": "js",
|
|
5382
|
+
"name": "ChatThinkingPolicy",
|
|
5383
|
+
"declaration": {
|
|
5384
|
+
"name": "ChatThinkingPolicy",
|
|
5385
|
+
"module": "src/config/config.ts"
|
|
5386
|
+
}
|
|
5387
|
+
},
|
|
5388
|
+
{
|
|
5389
|
+
"kind": "js",
|
|
5390
|
+
"name": "ChatToolChoice",
|
|
5391
|
+
"declaration": {
|
|
5392
|
+
"name": "ChatToolChoice",
|
|
5393
|
+
"module": "src/config/config.ts"
|
|
5394
|
+
}
|
|
5395
|
+
},
|
|
5396
|
+
{
|
|
5397
|
+
"kind": "js",
|
|
5398
|
+
"name": "defineAgent",
|
|
5399
|
+
"declaration": {
|
|
5400
|
+
"name": "defineAgent",
|
|
5401
|
+
"module": "src/config/config.ts"
|
|
5402
|
+
}
|
|
5403
|
+
}
|
|
5404
|
+
]
|
|
5405
|
+
},
|
|
5406
|
+
{
|
|
5407
|
+
"kind": "javascript-module",
|
|
5408
|
+
"path": "src/config/define-stateful-agent.ts",
|
|
5409
|
+
"declarations": [
|
|
5410
|
+
{
|
|
5411
|
+
"kind": "function",
|
|
5412
|
+
"name": "restoreMachine",
|
|
5413
|
+
"return": {
|
|
5414
|
+
"type": {
|
|
5415
|
+
"text": "void"
|
|
5416
|
+
}
|
|
5417
|
+
},
|
|
5418
|
+
"parameters": [
|
|
5073
5419
|
{
|
|
5074
|
-
"
|
|
5075
|
-
"name": "crossTabEvents",
|
|
5420
|
+
"name": "machine",
|
|
5076
5421
|
"type": {
|
|
5077
|
-
"text": "
|
|
5422
|
+
"text": "{ stop: () => void; start: (options?: { state?: unknown }) => void }"
|
|
5078
5423
|
},
|
|
5079
|
-
"
|
|
5080
|
-
"readonly": true,
|
|
5081
|
-
"default": "new Set(config?.crossTabEvents ?? [])"
|
|
5424
|
+
"description": "the machine to restore (already constructed/started)."
|
|
5082
5425
|
},
|
|
5083
5426
|
{
|
|
5084
|
-
"
|
|
5085
|
-
"name": "channelNameFactory",
|
|
5427
|
+
"name": "restored",
|
|
5086
5428
|
"type": {
|
|
5087
|
-
"text": "
|
|
5429
|
+
"text": "unknown"
|
|
5088
5430
|
},
|
|
5089
|
-
"
|
|
5090
|
-
"readonly": true
|
|
5431
|
+
"description": "the agent's serialized image (`ctx.restored` in `init`)."
|
|
5091
5432
|
},
|
|
5092
5433
|
{
|
|
5093
|
-
"
|
|
5094
|
-
"
|
|
5095
|
-
"
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5434
|
+
"name": "key",
|
|
5435
|
+
"default": "'machine'",
|
|
5436
|
+
"description": "the property the machine occupies in the snapshot; defaults to\n`'machine'` to match the conventional `{ machine }` state bag."
|
|
5437
|
+
}
|
|
5438
|
+
],
|
|
5439
|
+
"description": "Restore a foundation-state-machine instance from a snapshot produced by the\ndefault serializer (or `machine.getPersistedSnapshot()`). Call inside a\nstateful agent's `init` to resume the machine in its exact prior place:\n\n```ts\ninit: ({ restored }) => {\n const machine = new MyMachine();\n restoreMachine(machine, restored); // resume, or no-op on a fresh start\n return { machine };\n}\n```\n\nNo-ops when there is nothing to restore (a fresh session), leaving the\nfreshly-constructed machine in its initial state."
|
|
5440
|
+
},
|
|
5441
|
+
{
|
|
5442
|
+
"kind": "function",
|
|
5443
|
+
"name": "defineStatefulAgent",
|
|
5444
|
+
"return": {
|
|
5445
|
+
"type": {
|
|
5446
|
+
"text": "AgentConfig"
|
|
5447
|
+
}
|
|
5448
|
+
},
|
|
5449
|
+
"parameters": [
|
|
5100
5450
|
{
|
|
5101
|
-
"
|
|
5102
|
-
"name": "channelInitialised",
|
|
5451
|
+
"name": "opts",
|
|
5103
5452
|
"type": {
|
|
5104
|
-
"text": "
|
|
5105
|
-
}
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
},
|
|
5120
|
-
{
|
|
5121
|
-
"kind": "method",
|
|
5122
|
-
"name": "subscribe",
|
|
5123
|
-
"return": {
|
|
5124
|
-
"type": {
|
|
5125
|
-
"text": "() => void"
|
|
5126
|
-
}
|
|
5127
|
-
},
|
|
5128
|
-
"parameters": [
|
|
5129
|
-
{
|
|
5130
|
-
"name": "type",
|
|
5131
|
-
"type": {
|
|
5132
|
-
"text": "K"
|
|
5133
|
-
}
|
|
5134
|
-
},
|
|
5135
|
-
{
|
|
5136
|
-
"name": "handler",
|
|
5137
|
-
"type": {
|
|
5138
|
-
"text": "(detail: AgenticActivityEvents[K]) => void"
|
|
5139
|
-
}
|
|
5140
|
-
}
|
|
5141
|
-
],
|
|
5142
|
-
"description": "Subscribe to an event. Returns an unsubscribe function — call it in\n`disconnectedCallback` to avoid memory leaks."
|
|
5143
|
-
},
|
|
5144
|
-
{
|
|
5145
|
-
"kind": "method",
|
|
5146
|
-
"name": "publish",
|
|
5147
|
-
"return": {
|
|
5148
|
-
"type": {
|
|
5149
|
-
"text": "void"
|
|
5150
|
-
}
|
|
5151
|
-
},
|
|
5152
|
-
"parameters": [
|
|
5153
|
-
{
|
|
5154
|
-
"name": "type",
|
|
5155
|
-
"type": {
|
|
5156
|
-
"text": "K"
|
|
5157
|
-
}
|
|
5158
|
-
},
|
|
5159
|
-
{
|
|
5160
|
-
"name": "detail",
|
|
5161
|
-
"type": {
|
|
5162
|
-
"text": "AgenticActivityEvents[K]"
|
|
5163
|
-
}
|
|
5164
|
-
}
|
|
5165
|
-
],
|
|
5166
|
-
"description": "Publish an event to all local subscribers and, if configured, to other tabs\nvia BroadcastChannel."
|
|
5167
|
-
},
|
|
5168
|
-
{
|
|
5169
|
-
"kind": "method",
|
|
5170
|
-
"name": "addCrossTabEvent",
|
|
5171
|
-
"return": {
|
|
5172
|
-
"type": {
|
|
5173
|
-
"text": "void"
|
|
5174
|
-
}
|
|
5175
|
-
},
|
|
5176
|
-
"parameters": [
|
|
5177
|
-
{
|
|
5178
|
-
"name": "type",
|
|
5179
|
-
"type": {
|
|
5180
|
-
"text": "keyof AgenticActivityEvents"
|
|
5181
|
-
}
|
|
5182
|
-
}
|
|
5183
|
-
],
|
|
5184
|
-
"description": "Add an event type to the cross-tab forwarding set at runtime.\nMust be called before the first AgenticActivityBus.publish of that event type."
|
|
5185
|
-
},
|
|
5186
|
-
{
|
|
5187
|
-
"kind": "method",
|
|
5188
|
-
"name": "close",
|
|
5189
|
-
"return": {
|
|
5190
|
-
"type": {
|
|
5191
|
-
"text": "void"
|
|
5192
|
-
}
|
|
5193
|
-
},
|
|
5194
|
-
"description": "Close the underlying BroadcastChannel. Call once on application teardown if needed."
|
|
5195
|
-
},
|
|
5453
|
+
"text": "StatefulAgentInit<S>"
|
|
5454
|
+
}
|
|
5455
|
+
}
|
|
5456
|
+
],
|
|
5457
|
+
"description": "Build an `AgentConfig` whose `systemPrompt`, `toolDefinitions`, and tool\nhandlers all close over a long-lived state object created on activation.\n\nThe framework wires the lifecycle: `init` on `onActivate`, `dispose` on\n`onDeactivate`. State is held inside the helper's closure — never exposed on\nthe resulting `AgentConfig` — so the redux serializer doesn't see it."
|
|
5458
|
+
},
|
|
5459
|
+
{
|
|
5460
|
+
"kind": "function",
|
|
5461
|
+
"name": "defineAutopilot",
|
|
5462
|
+
"return": {
|
|
5463
|
+
"type": {
|
|
5464
|
+
"text": "AutopilotConfig<S>"
|
|
5465
|
+
}
|
|
5466
|
+
},
|
|
5467
|
+
"parameters": [
|
|
5196
5468
|
{
|
|
5197
|
-
"
|
|
5198
|
-
"
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
"type": {
|
|
5202
|
-
"text": "void"
|
|
5203
|
-
}
|
|
5204
|
-
},
|
|
5205
|
-
"parameters": [
|
|
5206
|
-
{
|
|
5207
|
-
"name": "type",
|
|
5208
|
-
"type": {
|
|
5209
|
-
"text": "string"
|
|
5210
|
-
}
|
|
5211
|
-
},
|
|
5212
|
-
{
|
|
5213
|
-
"name": "detail",
|
|
5214
|
-
"type": {
|
|
5215
|
-
"text": "unknown"
|
|
5216
|
-
}
|
|
5217
|
-
}
|
|
5218
|
-
]
|
|
5469
|
+
"name": "config",
|
|
5470
|
+
"type": {
|
|
5471
|
+
"text": "AutopilotConfig<S>"
|
|
5472
|
+
}
|
|
5219
5473
|
}
|
|
5220
|
-
]
|
|
5474
|
+
],
|
|
5475
|
+
"description": "Define an autopilot for a stateful agent whose state is `S` (GENC-1660). An identity function\nthat exists for its type: the resolvers get `S`, and the result goes on `defineStatefulAgent`'s\n`autopilot` option."
|
|
5476
|
+
}
|
|
5477
|
+
],
|
|
5478
|
+
"exports": [
|
|
5479
|
+
{
|
|
5480
|
+
"kind": "js",
|
|
5481
|
+
"name": "restoreMachine",
|
|
5482
|
+
"declaration": {
|
|
5483
|
+
"name": "restoreMachine",
|
|
5484
|
+
"module": "src/config/define-stateful-agent.ts"
|
|
5485
|
+
}
|
|
5221
5486
|
},
|
|
5487
|
+
{
|
|
5488
|
+
"kind": "js",
|
|
5489
|
+
"name": "defineStatefulAgent",
|
|
5490
|
+
"declaration": {
|
|
5491
|
+
"name": "defineStatefulAgent",
|
|
5492
|
+
"module": "src/config/define-stateful-agent.ts"
|
|
5493
|
+
}
|
|
5494
|
+
},
|
|
5495
|
+
{
|
|
5496
|
+
"kind": "js",
|
|
5497
|
+
"name": "defineAutopilot",
|
|
5498
|
+
"declaration": {
|
|
5499
|
+
"name": "defineAutopilot",
|
|
5500
|
+
"module": "src/config/define-stateful-agent.ts"
|
|
5501
|
+
}
|
|
5502
|
+
}
|
|
5503
|
+
]
|
|
5504
|
+
},
|
|
5505
|
+
{
|
|
5506
|
+
"kind": "javascript-module",
|
|
5507
|
+
"path": "src/config/fallback-agents.ts",
|
|
5508
|
+
"declarations": [
|
|
5222
5509
|
{
|
|
5223
5510
|
"kind": "variable",
|
|
5224
|
-
"name": "
|
|
5225
|
-
"
|
|
5226
|
-
|
|
5511
|
+
"name": "friendlyFallbackAgent",
|
|
5512
|
+
"type": {
|
|
5513
|
+
"text": "FallbackAgentConfig"
|
|
5514
|
+
},
|
|
5515
|
+
"default": "{\n name: 'Assistant',\n fallback: true,\n systemPrompt: `You are a warm, friendly assistant. For general conversation like \"Hi\" or \"How are you\", you can have a friendly chat. For anything more complex, you cannot directly help, but you can explain what specialists are available. The available specialists are:\\n\\n{{agents}}\\n\\nPolitely let the user know what you can help with and invite them to rephrase their request if it is outside your scope.`,\n}",
|
|
5516
|
+
"description": "A warm, conversational fallback agent. Acknowledges it can't help directly,\nexplains what the available specialists can do, and invites the user to retry.\n\nThe system prompt is generated at runtime by `OrchestratingDriver` from the\nspecialist list — no manual authoring required."
|
|
5517
|
+
},
|
|
5518
|
+
{
|
|
5519
|
+
"kind": "variable",
|
|
5520
|
+
"name": "strictFallbackAgent",
|
|
5521
|
+
"type": {
|
|
5522
|
+
"text": "FallbackAgentConfig"
|
|
5523
|
+
},
|
|
5524
|
+
"default": "{\n name: 'Assistant',\n fallback: true,\n systemPrompt: `You are a concise assistant. The user's request is outside your scope. The available specialists are: {{agents}}.\n\n{{unroutable}}\n\nAnswer in a single short sentence. Do not elaborate.`,\n}",
|
|
5525
|
+
"description": "A brief, professional fallback agent. States what is available without\nelaboration. The `{{agents}}` placeholder is replaced at runtime by\n`OrchestratingDriver` with the generated specialist list.\n\nThe `{{unroutable}}` placeholder positions `UNROUTABLE_INSTRUCTION` — the framework's\ninstruction for a substantive request no specialist covers, which is otherwise APPENDED to a\nstring-form prompt. Positioned rather than appended for one reason: this preset's whole point is\nbrevity, and appended text would be the last thing the model reads. Putting the block above the\nbrevity rule leaves \"a single short sentence\" with the recency, so the two compose instead of\ncompeting. A prompt whose tone rules matter should do the same."
|
|
5227
5526
|
}
|
|
5228
5527
|
],
|
|
5229
5528
|
"exports": [
|
|
5230
5529
|
{
|
|
5231
5530
|
"kind": "js",
|
|
5232
|
-
"name": "
|
|
5233
|
-
"declaration": {
|
|
5234
|
-
"name": "NOOP_ACTIVITY_BUS",
|
|
5235
|
-
"module": "src/channel/ai-activity-bus.ts"
|
|
5236
|
-
}
|
|
5237
|
-
},
|
|
5238
|
-
{
|
|
5239
|
-
"kind": "js",
|
|
5240
|
-
"name": "AgenticActivityBus",
|
|
5531
|
+
"name": "friendlyFallbackAgent",
|
|
5241
5532
|
"declaration": {
|
|
5242
|
-
"name": "
|
|
5243
|
-
"module": "src/
|
|
5533
|
+
"name": "friendlyFallbackAgent",
|
|
5534
|
+
"module": "src/config/fallback-agents.ts"
|
|
5244
5535
|
}
|
|
5245
5536
|
},
|
|
5246
5537
|
{
|
|
5247
5538
|
"kind": "js",
|
|
5248
|
-
"name": "
|
|
5539
|
+
"name": "strictFallbackAgent",
|
|
5249
5540
|
"declaration": {
|
|
5250
|
-
"name": "
|
|
5251
|
-
"module": "src/
|
|
5541
|
+
"name": "strictFallbackAgent",
|
|
5542
|
+
"module": "src/config/fallback-agents.ts"
|
|
5252
5543
|
}
|
|
5253
5544
|
}
|
|
5254
5545
|
]
|
|
5255
5546
|
},
|
|
5256
5547
|
{
|
|
5257
5548
|
"kind": "javascript-module",
|
|
5258
|
-
"path": "src/
|
|
5549
|
+
"path": "src/config/index.ts",
|
|
5259
5550
|
"declarations": [],
|
|
5260
|
-
"exports": []
|
|
5261
|
-
},
|
|
5262
|
-
{
|
|
5263
|
-
"kind": "javascript-module",
|
|
5264
|
-
"path": "src/channel/autopilot-needs-user.ts",
|
|
5265
|
-
"declarations": [
|
|
5266
|
-
{
|
|
5267
|
-
"kind": "function",
|
|
5268
|
-
"name": "setAutopilotNeedsUser",
|
|
5269
|
-
"return": {
|
|
5270
|
-
"type": {
|
|
5271
|
-
"text": "void"
|
|
5272
|
-
}
|
|
5273
|
-
},
|
|
5274
|
-
"parameters": [
|
|
5275
|
-
{
|
|
5276
|
-
"name": "sessionKey",
|
|
5277
|
-
"type": {
|
|
5278
|
-
"text": "string"
|
|
5279
|
-
}
|
|
5280
|
-
},
|
|
5281
|
-
{
|
|
5282
|
-
"name": "needsUser",
|
|
5283
|
-
"type": {
|
|
5284
|
-
"text": "boolean"
|
|
5285
|
-
}
|
|
5286
|
-
}
|
|
5287
|
-
],
|
|
5288
|
-
"description": "Set it for one session, announcing `autopilot-needs-user` when it changes."
|
|
5289
|
-
},
|
|
5290
|
-
{
|
|
5291
|
-
"kind": "function",
|
|
5292
|
-
"name": "autopilotNeedsUser",
|
|
5293
|
-
"return": {
|
|
5294
|
-
"type": {
|
|
5295
|
-
"text": "boolean"
|
|
5296
|
-
}
|
|
5297
|
-
},
|
|
5298
|
-
"parameters": [
|
|
5299
|
-
{
|
|
5300
|
-
"name": "sessionKey",
|
|
5301
|
-
"optional": true,
|
|
5302
|
-
"type": {
|
|
5303
|
-
"text": "string"
|
|
5304
|
-
}
|
|
5305
|
-
}
|
|
5306
|
-
],
|
|
5307
|
-
"description": "Whether a session has something waiting on the person — or, without a key (a bubble that cannot\ntell which assistant it holds), whether any session has."
|
|
5308
|
-
}
|
|
5309
|
-
],
|
|
5310
5551
|
"exports": [
|
|
5311
5552
|
{
|
|
5312
5553
|
"kind": "js",
|
|
5313
|
-
"name": "
|
|
5554
|
+
"name": "*",
|
|
5314
5555
|
"declaration": {
|
|
5315
|
-
"name": "
|
|
5316
|
-
"
|
|
5556
|
+
"name": "*",
|
|
5557
|
+
"package": "./config"
|
|
5317
5558
|
}
|
|
5318
5559
|
},
|
|
5319
5560
|
{
|
|
5320
5561
|
"kind": "js",
|
|
5321
|
-
"name": "
|
|
5562
|
+
"name": "*",
|
|
5322
5563
|
"declaration": {
|
|
5323
|
-
"name": "
|
|
5324
|
-
"
|
|
5564
|
+
"name": "*",
|
|
5565
|
+
"package": "./fallback-agents"
|
|
5325
5566
|
}
|
|
5326
5567
|
}
|
|
5327
5568
|
]
|
|
5328
5569
|
},
|
|
5570
|
+
{
|
|
5571
|
+
"kind": "javascript-module",
|
|
5572
|
+
"path": "src/config/validate-providers.ts",
|
|
5573
|
+
"declarations": [],
|
|
5574
|
+
"exports": []
|
|
5575
|
+
},
|
|
5329
5576
|
{
|
|
5330
5577
|
"kind": "javascript-module",
|
|
5331
5578
|
"path": "src/components/flowing-waves-indicator.ts",
|
|
@@ -5813,274 +6060,43 @@
|
|
|
5813
6060
|
"attributes": [
|
|
5814
6061
|
{
|
|
5815
6062
|
"type": {
|
|
5816
|
-
"text": "number"
|
|
5817
|
-
},
|
|
5818
|
-
"default": "WAVES_DEFAULT_SIZE",
|
|
5819
|
-
"description": "Diameter of the circular window in px. Default: 56.",
|
|
5820
|
-
"resolveInitializer": {
|
|
5821
|
-
"module": "src/components/waves-indicator.ts"
|
|
5822
|
-
},
|
|
5823
|
-
"fieldName": "size"
|
|
5824
|
-
}
|
|
5825
|
-
],
|
|
5826
|
-
"superclass": {
|
|
5827
|
-
"name": "GenesisElement",
|
|
5828
|
-
"package": "@genesislcap/web-core"
|
|
5829
|
-
},
|
|
5830
|
-
"tagName": "ai-waves-indicator",
|
|
5831
|
-
"customElement": true
|
|
5832
|
-
}
|
|
5833
|
-
],
|
|
5834
|
-
"exports": [
|
|
5835
|
-
{
|
|
5836
|
-
"kind": "js",
|
|
5837
|
-
"name": "AiWavesIndicator",
|
|
5838
|
-
"declaration": {
|
|
5839
|
-
"name": "AiWavesIndicator",
|
|
5840
|
-
"module": "src/components/waves-indicator.ts"
|
|
5841
|
-
}
|
|
5842
|
-
},
|
|
5843
|
-
{
|
|
5844
|
-
"kind": "custom-element-definition",
|
|
5845
|
-
"name": "ai-waves-indicator",
|
|
5846
|
-
"declaration": {
|
|
5847
|
-
"name": "AiWavesIndicator",
|
|
5848
|
-
"module": "src/components/waves-indicator.ts"
|
|
5849
|
-
}
|
|
5850
|
-
}
|
|
5851
|
-
]
|
|
5852
|
-
},
|
|
5853
|
-
{
|
|
5854
|
-
"kind": "javascript-module",
|
|
5855
|
-
"path": "src/config/config.ts",
|
|
5856
|
-
"declarations": [
|
|
5857
|
-
{
|
|
5858
|
-
"kind": "function",
|
|
5859
|
-
"name": "defineAgent",
|
|
5860
|
-
"description": "Identity helper that infers the narrowest possible type for an agent config,\npreserving string literal types (including `name`) without requiring `as const`.\n\nUse this when you need `typeof myAgent` to carry the literal `name` type —\nfor example, when wiring `ChatToolHandlers<typeof myAgent>`.\n\n```ts\nconst myAgent = defineAgent({ name: 'my_agent', ... });\ntype Handlers = ChatToolHandlers<typeof myAgent>;\n// requestSubAgent name param is now typed as 'my_agent'\n```"
|
|
5861
|
-
}
|
|
5862
|
-
],
|
|
5863
|
-
"exports": [
|
|
5864
|
-
{
|
|
5865
|
-
"kind": "js",
|
|
5866
|
-
"name": "CachePolicy",
|
|
5867
|
-
"declaration": {
|
|
5868
|
-
"name": "CachePolicy",
|
|
5869
|
-
"module": "src/config/config.ts"
|
|
5870
|
-
}
|
|
5871
|
-
},
|
|
5872
|
-
{
|
|
5873
|
-
"kind": "js",
|
|
5874
|
-
"name": "ChatFallback",
|
|
5875
|
-
"declaration": {
|
|
5876
|
-
"name": "ChatFallback",
|
|
5877
|
-
"module": "src/config/config.ts"
|
|
5878
|
-
}
|
|
5879
|
-
},
|
|
5880
|
-
{
|
|
5881
|
-
"kind": "js",
|
|
5882
|
-
"name": "ChatInputDuringExecutionMode",
|
|
5883
|
-
"declaration": {
|
|
5884
|
-
"name": "ChatInputDuringExecutionMode",
|
|
5885
|
-
"module": "src/config/config.ts"
|
|
5886
|
-
}
|
|
5887
|
-
},
|
|
5888
|
-
{
|
|
5889
|
-
"kind": "js",
|
|
5890
|
-
"name": "ChatThinkingPolicy",
|
|
5891
|
-
"declaration": {
|
|
5892
|
-
"name": "ChatThinkingPolicy",
|
|
5893
|
-
"module": "src/config/config.ts"
|
|
5894
|
-
}
|
|
5895
|
-
},
|
|
5896
|
-
{
|
|
5897
|
-
"kind": "js",
|
|
5898
|
-
"name": "ChatToolChoice",
|
|
5899
|
-
"declaration": {
|
|
5900
|
-
"name": "ChatToolChoice",
|
|
5901
|
-
"module": "src/config/config.ts"
|
|
5902
|
-
}
|
|
5903
|
-
},
|
|
5904
|
-
{
|
|
5905
|
-
"kind": "js",
|
|
5906
|
-
"name": "defineAgent",
|
|
5907
|
-
"declaration": {
|
|
5908
|
-
"name": "defineAgent",
|
|
5909
|
-
"module": "src/config/config.ts"
|
|
5910
|
-
}
|
|
5911
|
-
}
|
|
5912
|
-
]
|
|
5913
|
-
},
|
|
5914
|
-
{
|
|
5915
|
-
"kind": "javascript-module",
|
|
5916
|
-
"path": "src/config/define-stateful-agent.ts",
|
|
5917
|
-
"declarations": [
|
|
5918
|
-
{
|
|
5919
|
-
"kind": "function",
|
|
5920
|
-
"name": "restoreMachine",
|
|
5921
|
-
"return": {
|
|
5922
|
-
"type": {
|
|
5923
|
-
"text": "void"
|
|
5924
|
-
}
|
|
5925
|
-
},
|
|
5926
|
-
"parameters": [
|
|
5927
|
-
{
|
|
5928
|
-
"name": "machine",
|
|
5929
|
-
"type": {
|
|
5930
|
-
"text": "{ stop: () => void; start: (options?: { state?: unknown }) => void }"
|
|
5931
|
-
},
|
|
5932
|
-
"description": "the machine to restore (already constructed/started)."
|
|
5933
|
-
},
|
|
5934
|
-
{
|
|
5935
|
-
"name": "restored",
|
|
5936
|
-
"type": {
|
|
5937
|
-
"text": "unknown"
|
|
5938
|
-
},
|
|
5939
|
-
"description": "the agent's serialized image (`ctx.restored` in `init`)."
|
|
5940
|
-
},
|
|
5941
|
-
{
|
|
5942
|
-
"name": "key",
|
|
5943
|
-
"default": "'machine'",
|
|
5944
|
-
"description": "the property the machine occupies in the snapshot; defaults to\n`'machine'` to match the conventional `{ machine }` state bag."
|
|
5945
|
-
}
|
|
5946
|
-
],
|
|
5947
|
-
"description": "Restore a foundation-state-machine instance from a snapshot produced by the\ndefault serializer (or `machine.getPersistedSnapshot()`). Call inside a\nstateful agent's `init` to resume the machine in its exact prior place:\n\n```ts\ninit: ({ restored }) => {\n const machine = new MyMachine();\n restoreMachine(machine, restored); // resume, or no-op on a fresh start\n return { machine };\n}\n```\n\nNo-ops when there is nothing to restore (a fresh session), leaving the\nfreshly-constructed machine in its initial state."
|
|
5948
|
-
},
|
|
5949
|
-
{
|
|
5950
|
-
"kind": "function",
|
|
5951
|
-
"name": "defineStatefulAgent",
|
|
5952
|
-
"return": {
|
|
5953
|
-
"type": {
|
|
5954
|
-
"text": "AgentConfig"
|
|
5955
|
-
}
|
|
5956
|
-
},
|
|
5957
|
-
"parameters": [
|
|
5958
|
-
{
|
|
5959
|
-
"name": "opts",
|
|
5960
|
-
"type": {
|
|
5961
|
-
"text": "StatefulAgentInit<S>"
|
|
5962
|
-
}
|
|
5963
|
-
}
|
|
5964
|
-
],
|
|
5965
|
-
"description": "Build an `AgentConfig` whose `systemPrompt`, `toolDefinitions`, and tool\nhandlers all close over a long-lived state object created on activation.\n\nThe framework wires the lifecycle: `init` on `onActivate`, `dispose` on\n`onDeactivate`. State is held inside the helper's closure — never exposed on\nthe resulting `AgentConfig` — so the redux serializer doesn't see it."
|
|
5966
|
-
},
|
|
5967
|
-
{
|
|
5968
|
-
"kind": "function",
|
|
5969
|
-
"name": "defineAutopilot",
|
|
5970
|
-
"return": {
|
|
5971
|
-
"type": {
|
|
5972
|
-
"text": "AutopilotConfig<S>"
|
|
5973
|
-
}
|
|
5974
|
-
},
|
|
5975
|
-
"parameters": [
|
|
5976
|
-
{
|
|
5977
|
-
"name": "config",
|
|
5978
|
-
"type": {
|
|
5979
|
-
"text": "AutopilotConfig<S>"
|
|
5980
|
-
}
|
|
6063
|
+
"text": "number"
|
|
6064
|
+
},
|
|
6065
|
+
"default": "WAVES_DEFAULT_SIZE",
|
|
6066
|
+
"description": "Diameter of the circular window in px. Default: 56.",
|
|
6067
|
+
"resolveInitializer": {
|
|
6068
|
+
"module": "src/components/waves-indicator.ts"
|
|
6069
|
+
},
|
|
6070
|
+
"fieldName": "size"
|
|
5981
6071
|
}
|
|
5982
6072
|
],
|
|
5983
|
-
"
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
"exports": [
|
|
5987
|
-
{
|
|
5988
|
-
"kind": "js",
|
|
5989
|
-
"name": "restoreMachine",
|
|
5990
|
-
"declaration": {
|
|
5991
|
-
"name": "restoreMachine",
|
|
5992
|
-
"module": "src/config/define-stateful-agent.ts"
|
|
5993
|
-
}
|
|
5994
|
-
},
|
|
5995
|
-
{
|
|
5996
|
-
"kind": "js",
|
|
5997
|
-
"name": "defineStatefulAgent",
|
|
5998
|
-
"declaration": {
|
|
5999
|
-
"name": "defineStatefulAgent",
|
|
6000
|
-
"module": "src/config/define-stateful-agent.ts"
|
|
6001
|
-
}
|
|
6002
|
-
},
|
|
6003
|
-
{
|
|
6004
|
-
"kind": "js",
|
|
6005
|
-
"name": "defineAutopilot",
|
|
6006
|
-
"declaration": {
|
|
6007
|
-
"name": "defineAutopilot",
|
|
6008
|
-
"module": "src/config/define-stateful-agent.ts"
|
|
6009
|
-
}
|
|
6010
|
-
}
|
|
6011
|
-
]
|
|
6012
|
-
},
|
|
6013
|
-
{
|
|
6014
|
-
"kind": "javascript-module",
|
|
6015
|
-
"path": "src/config/fallback-agents.ts",
|
|
6016
|
-
"declarations": [
|
|
6017
|
-
{
|
|
6018
|
-
"kind": "variable",
|
|
6019
|
-
"name": "friendlyFallbackAgent",
|
|
6020
|
-
"type": {
|
|
6021
|
-
"text": "FallbackAgentConfig"
|
|
6022
|
-
},
|
|
6023
|
-
"default": "{\n name: 'Assistant',\n fallback: true,\n systemPrompt: `You are a warm, friendly assistant. For general conversation like \"Hi\" or \"How are you\", you can have a friendly chat. For anything more complex, you cannot directly help, but you can explain what specialists are available. The available specialists are:\\n\\n{{agents}}\\n\\nPolitely let the user know what you can help with and invite them to rephrase their request if it is outside your scope.`,\n}",
|
|
6024
|
-
"description": "A warm, conversational fallback agent. Acknowledges it can't help directly,\nexplains what the available specialists can do, and invites the user to retry.\n\nThe system prompt is generated at runtime by `OrchestratingDriver` from the\nspecialist list — no manual authoring required."
|
|
6025
|
-
},
|
|
6026
|
-
{
|
|
6027
|
-
"kind": "variable",
|
|
6028
|
-
"name": "strictFallbackAgent",
|
|
6029
|
-
"type": {
|
|
6030
|
-
"text": "FallbackAgentConfig"
|
|
6073
|
+
"superclass": {
|
|
6074
|
+
"name": "GenesisElement",
|
|
6075
|
+
"package": "@genesislcap/web-core"
|
|
6031
6076
|
},
|
|
6032
|
-
"
|
|
6033
|
-
"
|
|
6077
|
+
"tagName": "ai-waves-indicator",
|
|
6078
|
+
"customElement": true
|
|
6034
6079
|
}
|
|
6035
6080
|
],
|
|
6036
6081
|
"exports": [
|
|
6037
6082
|
{
|
|
6038
6083
|
"kind": "js",
|
|
6039
|
-
"name": "
|
|
6040
|
-
"declaration": {
|
|
6041
|
-
"name": "friendlyFallbackAgent",
|
|
6042
|
-
"module": "src/config/fallback-agents.ts"
|
|
6043
|
-
}
|
|
6044
|
-
},
|
|
6045
|
-
{
|
|
6046
|
-
"kind": "js",
|
|
6047
|
-
"name": "strictFallbackAgent",
|
|
6048
|
-
"declaration": {
|
|
6049
|
-
"name": "strictFallbackAgent",
|
|
6050
|
-
"module": "src/config/fallback-agents.ts"
|
|
6051
|
-
}
|
|
6052
|
-
}
|
|
6053
|
-
]
|
|
6054
|
-
},
|
|
6055
|
-
{
|
|
6056
|
-
"kind": "javascript-module",
|
|
6057
|
-
"path": "src/config/index.ts",
|
|
6058
|
-
"declarations": [],
|
|
6059
|
-
"exports": [
|
|
6060
|
-
{
|
|
6061
|
-
"kind": "js",
|
|
6062
|
-
"name": "*",
|
|
6084
|
+
"name": "AiWavesIndicator",
|
|
6063
6085
|
"declaration": {
|
|
6064
|
-
"name": "
|
|
6065
|
-
"
|
|
6086
|
+
"name": "AiWavesIndicator",
|
|
6087
|
+
"module": "src/components/waves-indicator.ts"
|
|
6066
6088
|
}
|
|
6067
6089
|
},
|
|
6068
6090
|
{
|
|
6069
|
-
"kind": "
|
|
6070
|
-
"name": "
|
|
6091
|
+
"kind": "custom-element-definition",
|
|
6092
|
+
"name": "ai-waves-indicator",
|
|
6071
6093
|
"declaration": {
|
|
6072
|
-
"name": "
|
|
6073
|
-
"
|
|
6094
|
+
"name": "AiWavesIndicator",
|
|
6095
|
+
"module": "src/components/waves-indicator.ts"
|
|
6074
6096
|
}
|
|
6075
6097
|
}
|
|
6076
6098
|
]
|
|
6077
6099
|
},
|
|
6078
|
-
{
|
|
6079
|
-
"kind": "javascript-module",
|
|
6080
|
-
"path": "src/config/validate-providers.ts",
|
|
6081
|
-
"declarations": [],
|
|
6082
|
-
"exports": []
|
|
6083
|
-
},
|
|
6084
6100
|
{
|
|
6085
6101
|
"kind": "javascript-module",
|
|
6086
6102
|
"path": "src/genesis/calendar.ts",
|
|
@@ -7129,6 +7145,18 @@
|
|
|
7129
7145
|
"declarations": [],
|
|
7130
7146
|
"exports": []
|
|
7131
7147
|
},
|
|
7148
|
+
{
|
|
7149
|
+
"kind": "javascript-module",
|
|
7150
|
+
"path": "src/genesis/vendor-follower.ts",
|
|
7151
|
+
"declarations": [],
|
|
7152
|
+
"exports": []
|
|
7153
|
+
},
|
|
7154
|
+
{
|
|
7155
|
+
"kind": "javascript-module",
|
|
7156
|
+
"path": "src/genesis/vendor-pick.ts",
|
|
7157
|
+
"declarations": [],
|
|
7158
|
+
"exports": []
|
|
7159
|
+
},
|
|
7132
7160
|
{
|
|
7133
7161
|
"kind": "javascript-module",
|
|
7134
7162
|
"path": "src/genesis/write-commit.ts",
|
|
@@ -9264,15 +9292,23 @@
|
|
|
9264
9292
|
"name": "budget",
|
|
9265
9293
|
"privacy": "private",
|
|
9266
9294
|
"readonly": true,
|
|
9267
|
-
"default": "new BudgetController({\n sessionRef: () => this._sessionRef,\n providerStatuses: () => this.providerStatuses,\n providerRegistry: () => this.providerRegistry,\n chatConfig: () => this.chatConfig,\n })",
|
|
9295
|
+
"default": "new BudgetController({\n sessionRef: () => this._sessionRef,\n providerStatuses: () => this.providerStatuses,\n providerRegistry: () => this.providerRegistry,\n chatConfig: () => this.chatConfig,\n vendorSwitchPlace: () => this.vendorPicker.switchPlace,\n })",
|
|
9268
9296
|
"description": "The AI-spend budget: vendor walls, the derived composer lock, the banner copy\nand the settings meter (GENC-1464).\n\nTakes the session store itself rather than a callback per field — see\n`BudgetDeps` for why this one differs from its siblings."
|
|
9269
9297
|
},
|
|
9298
|
+
{
|
|
9299
|
+
"kind": "field",
|
|
9300
|
+
"name": "vendorPicker",
|
|
9301
|
+
"privacy": "private",
|
|
9302
|
+
"readonly": true,
|
|
9303
|
+
"default": "new VendorPickerController({\n switcher: () => this.providerSwitcher,\n computing: () => this.busy && !this.hasActivePendingInteraction,\n hostControl: () => this.settings.modelSlotted.length > 0,\n })",
|
|
9304
|
+
"description": "The vendor control in the settings' AI model section, shown only when the registered\nswitcher asks for one through its `vendorChoice`."
|
|
9305
|
+
},
|
|
9270
9306
|
{
|
|
9271
9307
|
"kind": "field",
|
|
9272
9308
|
"name": "settings",
|
|
9273
9309
|
"privacy": "private",
|
|
9274
9310
|
"readonly": true,
|
|
9275
|
-
"default": "new SettingsModalController({\n chatConfig: () => this.chatConfig,\n contextTokens: () => this.contextTokens,\n contextLimit: () => this.contextLimit,\n budgetUsageVisible: () => this.budget.settingsUsageVisible,\n costConfig: () => this.costLedger.config,\n costHistoryLength: () => this.costLedger.history.length,\n liveCostSessionTitle: () => this.costLedger.liveTitle,\n providerStatusCount: () => this.providerStatuses.length,\n sessionRef: () => this._sessionRef,\n stateKey: () => this.getStateKey(),\n popoutMode: () => this.popoutMode,\n headerTitle: () => this.headerTitle,\n appSettingsProvider: () => this.appSettingsProvider,\n modal: () => this.settingsModal,\n tabsEl: () => this.settingsTabsEl,\n requestBudgetRefresh: () => this.requestBudgetRefresh(),\n logMeta: (type, detail) => this.logMeta(type, detail),\n })",
|
|
9311
|
+
"default": "new SettingsModalController({\n chatConfig: () => this.chatConfig,\n contextTokens: () => this.contextTokens,\n contextLimit: () => this.contextLimit,\n budgetUsageVisible: () => this.budget.settingsUsageVisible,\n vendorPickerVisible: () => this.vendorPicker.visible,\n costConfig: () => this.costLedger.config,\n costHistoryLength: () => this.costLedger.history.length,\n liveCostSessionTitle: () => this.costLedger.liveTitle,\n providerStatusCount: () => this.providerStatuses.length,\n sessionRef: () => this._sessionRef,\n stateKey: () => this.getStateKey(),\n popoutMode: () => this.popoutMode,\n headerTitle: () => this.headerTitle,\n appSettingsProvider: () => this.appSettingsProvider,\n modal: () => this.settingsModal,\n tabsEl: () => this.settingsTabsEl,\n requestBudgetRefresh: () => this.requestBudgetRefresh(),\n logMeta: (type, detail) => this.logMeta(type, detail),\n })",
|
|
9276
9312
|
"description": "The settings modal (`docs/code-health.md` §3). Reaches the two design-system\nrefs through callbacks, because the template writes them by name — see\n`SettingsModalDeps`."
|
|
9277
9313
|
},
|
|
9278
9314
|
{
|
|
@@ -9282,6 +9318,14 @@
|
|
|
9282
9318
|
"text": "AIProviderRegistry"
|
|
9283
9319
|
}
|
|
9284
9320
|
},
|
|
9321
|
+
{
|
|
9322
|
+
"kind": "field",
|
|
9323
|
+
"name": "providerSwitcher",
|
|
9324
|
+
"type": {
|
|
9325
|
+
"text": "AIProviderSwitcher"
|
|
9326
|
+
},
|
|
9327
|
+
"description": "The app's vendor switcher; the platform's no-op one when it registered none."
|
|
9328
|
+
},
|
|
9285
9329
|
{
|
|
9286
9330
|
"kind": "field",
|
|
9287
9331
|
"name": "appSettingsProvider",
|
|
@@ -11914,6 +11958,52 @@
|
|
|
11914
11958
|
"description": "The settings modal's derived surface. Every member below delegates to\n`SettingsModalController` — the names are this element's public API and the\n943-line template's bindings, so they stay put while the logic moves into the\n`settings-modal.ts` that folder never had (`docs/code-health.md` §3).\n\nNone carries `@volatile`: the decorators live on the controller's getters, and\nthey reach the binding observer from there — see `docs/code-health.md` §11.4.",
|
|
11915
11959
|
"readonly": true
|
|
11916
11960
|
},
|
|
11961
|
+
{
|
|
11962
|
+
"kind": "field",
|
|
11963
|
+
"name": "settingsVendorPickerDisabled",
|
|
11964
|
+
"type": {
|
|
11965
|
+
"text": "boolean"
|
|
11966
|
+
},
|
|
11967
|
+
"description": "Whether the cards are disabled: a turn is computing. @internal",
|
|
11968
|
+
"readonly": true
|
|
11969
|
+
},
|
|
11970
|
+
{
|
|
11971
|
+
"kind": "field",
|
|
11972
|
+
"name": "settingsVendorSelectedElsewhere",
|
|
11973
|
+
"type": {
|
|
11974
|
+
"text": "VendorSelectedElsewhere | undefined"
|
|
11975
|
+
},
|
|
11976
|
+
"description": "The active vendor read-only, when the switcher says it is chosen elsewhere. @internal",
|
|
11977
|
+
"readonly": true
|
|
11978
|
+
},
|
|
11979
|
+
{
|
|
11980
|
+
"kind": "method",
|
|
11981
|
+
"name": "selectSettingsVendor",
|
|
11982
|
+
"return": {
|
|
11983
|
+
"type": {
|
|
11984
|
+
"text": "void"
|
|
11985
|
+
}
|
|
11986
|
+
},
|
|
11987
|
+
"parameters": [
|
|
11988
|
+
{
|
|
11989
|
+
"name": "vendor",
|
|
11990
|
+
"type": {
|
|
11991
|
+
"text": "string"
|
|
11992
|
+
}
|
|
11993
|
+
}
|
|
11994
|
+
],
|
|
11995
|
+
"description": "A vendor card was picked. @internal"
|
|
11996
|
+
},
|
|
11997
|
+
{
|
|
11998
|
+
"kind": "field",
|
|
11999
|
+
"name": "transcriptVendorSwitchPlace",
|
|
12000
|
+
"type": {
|
|
12001
|
+
"text": "string | undefined"
|
|
12002
|
+
},
|
|
12003
|
+
"privacy": "private",
|
|
12004
|
+
"description": "Where the transcript's budget bubble tells the user to switch vendor, when that is outside\nthe app (Genesis Create's preview). The driver is built once, and this does not change after\nregistration; the default, \"in Settings\", is the in-app picker's.",
|
|
12005
|
+
"readonly": true
|
|
12006
|
+
},
|
|
11917
12007
|
{
|
|
11918
12008
|
"kind": "field",
|
|
11919
12009
|
"name": "settingsContextUsageVisible",
|
|
@@ -13354,6 +13444,40 @@
|
|
|
13354
13444
|
"declarations": [],
|
|
13355
13445
|
"exports": []
|
|
13356
13446
|
},
|
|
13447
|
+
{
|
|
13448
|
+
"kind": "javascript-module",
|
|
13449
|
+
"path": "src/main/vendor-picker-controller.ts",
|
|
13450
|
+
"declarations": [
|
|
13451
|
+
{
|
|
13452
|
+
"kind": "function",
|
|
13453
|
+
"name": "vendorLabel",
|
|
13454
|
+
"return": {
|
|
13455
|
+
"type": {
|
|
13456
|
+
"text": "string"
|
|
13457
|
+
}
|
|
13458
|
+
},
|
|
13459
|
+
"parameters": [
|
|
13460
|
+
{
|
|
13461
|
+
"name": "vendor",
|
|
13462
|
+
"type": {
|
|
13463
|
+
"text": "string"
|
|
13464
|
+
}
|
|
13465
|
+
}
|
|
13466
|
+
],
|
|
13467
|
+
"description": "What a vendor is called in the settings: the platform's label, else the vendor id."
|
|
13468
|
+
}
|
|
13469
|
+
],
|
|
13470
|
+
"exports": [
|
|
13471
|
+
{
|
|
13472
|
+
"kind": "js",
|
|
13473
|
+
"name": "vendorLabel",
|
|
13474
|
+
"declaration": {
|
|
13475
|
+
"name": "vendorLabel",
|
|
13476
|
+
"module": "src/main/vendor-picker-controller.ts"
|
|
13477
|
+
}
|
|
13478
|
+
}
|
|
13479
|
+
]
|
|
13480
|
+
},
|
|
13357
13481
|
{
|
|
13358
13482
|
"kind": "javascript-module",
|
|
13359
13483
|
"path": "src/notifications/agent-notifications.ts",
|
|
@@ -13581,11 +13705,21 @@
|
|
|
13581
13705
|
"members": [
|
|
13582
13706
|
{
|
|
13583
13707
|
"kind": "field",
|
|
13584
|
-
"name": "
|
|
13708
|
+
"name": "builtVendors",
|
|
13585
13709
|
"type": {
|
|
13586
13710
|
"text": "readonly AITierVendor[]"
|
|
13587
13711
|
},
|
|
13588
|
-
"
|
|
13712
|
+
"privacy": "private",
|
|
13713
|
+
"readonly": true,
|
|
13714
|
+
"description": "The vendors it was constructed with: TieredAIProviderSwitcher.setAvailableVendors\nchooses among these and never adds one."
|
|
13715
|
+
},
|
|
13716
|
+
{
|
|
13717
|
+
"kind": "field",
|
|
13718
|
+
"name": "_vendors",
|
|
13719
|
+
"type": {
|
|
13720
|
+
"text": "readonly AITierVendor[]"
|
|
13721
|
+
},
|
|
13722
|
+
"privacy": "private"
|
|
13589
13723
|
},
|
|
13590
13724
|
{
|
|
13591
13725
|
"kind": "field",
|
|
@@ -13630,6 +13764,15 @@
|
|
|
13630
13764
|
},
|
|
13631
13765
|
"privacy": "private"
|
|
13632
13766
|
},
|
|
13767
|
+
{
|
|
13768
|
+
"kind": "field",
|
|
13769
|
+
"name": "vendorChoice",
|
|
13770
|
+
"type": {
|
|
13771
|
+
"text": "AIVendorChoice | undefined"
|
|
13772
|
+
},
|
|
13773
|
+
"readonly": true,
|
|
13774
|
+
"description": "Who chooses the vendor, as the options said."
|
|
13775
|
+
},
|
|
13633
13776
|
{
|
|
13634
13777
|
"kind": "field",
|
|
13635
13778
|
"name": "vendor",
|
|
@@ -13638,6 +13781,40 @@
|
|
|
13638
13781
|
},
|
|
13639
13782
|
"readonly": true
|
|
13640
13783
|
},
|
|
13784
|
+
{
|
|
13785
|
+
"kind": "field",
|
|
13786
|
+
"name": "vendors",
|
|
13787
|
+
"type": {
|
|
13788
|
+
"text": "readonly AITierVendor[]"
|
|
13789
|
+
},
|
|
13790
|
+
"description": "The vendors it can switch between now: `vendors` as constructed, unless\nTieredAIProviderSwitcher.setAvailableVendors has narrowed them since.",
|
|
13791
|
+
"readonly": true
|
|
13792
|
+
},
|
|
13793
|
+
{
|
|
13794
|
+
"kind": "method",
|
|
13795
|
+
"name": "setAvailableVendors",
|
|
13796
|
+
"return": {
|
|
13797
|
+
"type": {
|
|
13798
|
+
"text": "void"
|
|
13799
|
+
}
|
|
13800
|
+
},
|
|
13801
|
+
"parameters": [
|
|
13802
|
+
{
|
|
13803
|
+
"name": "vendors",
|
|
13804
|
+
"type": {
|
|
13805
|
+
"text": "readonly string[]"
|
|
13806
|
+
}
|
|
13807
|
+
},
|
|
13808
|
+
{
|
|
13809
|
+
"name": "active",
|
|
13810
|
+
"optional": true,
|
|
13811
|
+
"type": {
|
|
13812
|
+
"text": "string"
|
|
13813
|
+
}
|
|
13814
|
+
}
|
|
13815
|
+
],
|
|
13816
|
+
"description": "Change which vendors are available, within the ones it was constructed with, and optionally\nwhich one is active — in one registry rebuild."
|
|
13817
|
+
},
|
|
13641
13818
|
{
|
|
13642
13819
|
"kind": "method",
|
|
13643
13820
|
"name": "switchTo",
|
|
@@ -21163,6 +21340,17 @@
|
|
|
21163
21340
|
"description": "Host override for the budget-wall transcript copy, used verbatim — see\n`ChatDriverConfig.budgetExhaustedMessage`. `undefined` means no override,\nand the bubble is composed per wall by ChatDriver.budgetExhaustedBubble.",
|
|
21164
21341
|
"default": "budgetExhaustedMessage"
|
|
21165
21342
|
},
|
|
21343
|
+
{
|
|
21344
|
+
"kind": "field",
|
|
21345
|
+
"name": "vendorSwitchPlace",
|
|
21346
|
+
"type": {
|
|
21347
|
+
"text": "string"
|
|
21348
|
+
},
|
|
21349
|
+
"privacy": "private",
|
|
21350
|
+
"readonly": true,
|
|
21351
|
+
"description": "See `ChatDriverConfig.vendorSwitchPlace`.",
|
|
21352
|
+
"default": "vendorSwitchPlace"
|
|
21353
|
+
},
|
|
21166
21354
|
{
|
|
21167
21355
|
"kind": "field",
|
|
21168
21356
|
"name": "providerRefusedMessageOverride",
|
|
@@ -27625,7 +27813,7 @@
|
|
|
27625
27813
|
{
|
|
27626
27814
|
"kind": "variable",
|
|
27627
27815
|
"name": "settingsModalStyles",
|
|
27628
|
-
"default": "css`\n /*\n * Section headings come from the shared fragment the package also exports, so a host titling\n * its own slotted section applies the same rule rather than a copy of it.\n */\n ${assistantSettingsSectionTitleStyles}\n\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n\n .settings-modal {\n --ai-tier-badge-bg-mix: 14%;\n --ai-tier-badge-text-lighten: 18%;\n }\n\n .settings-modal::part(dialog) {\n max-width: 620px;\n width: calc(100vw - 48px);\n max-height: calc(100vh - 48px);\n padding: 0;\n }\n\n .settings-modal::part(content) {\n display: flex;\n flex-direction: column;\n min-height: 0;\n padding: 0;\n width: 100%;\n }\n\n .settings-modal::part(top) {\n padding: calc(var(--design-unit) * 4px) calc(var(--design-unit) * 5px);\n border-bottom: 1px solid var(--neutral-stroke-rest);\n }\n\n .settings-modal::part(bottom) {\n padding: calc(var(--design-unit) * 4px) calc(var(--design-unit) * 5px);\n border-top: 1px solid var(--neutral-stroke-rest);\n border-bottom-left-radius: var(--card-border-radius, calc(var(--control-corner-radius) * 1px));\n border-bottom-right-radius: var(--card-border-radius, calc(var(--control-corner-radius) * 1px));\n background-color: var(--neutral-layer-2);\n }\n\n .settings-modal-header {\n display: flex;\n align-items: center;\n min-width: 0;\n }\n\n .settings-modal-title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n display: flex;\n align-items: center;\n gap: calc(var(--design-unit) * 2px);\n color: var(--neutral-foreground-rest);\n }\n\n .settings-modal-content {\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1 1 auto;\n }\n\n .settings-modal-tabs::part(tablist) {\n border-bottom: 0;\n padding: 0 calc(var(--design-unit) * 5px);\n column-gap: calc(var(--design-unit) * 5px);\n }\n\n .settings-modal-tabs::part(activeIndicator) {\n height: 2px;\n }\n\n .settings-modal-tab {\n padding: 0;\n font-weight: 600;\n gap: 6px;\n }\n\n .settings-modal-tab[aria-selected='true'] {\n color: var(--neutral-foreground-rest);\n }\n\n .settings-modal-tabs::part(tabpanel) {\n border-top: 1px solid var(--neutral-stroke-rest);\n }\n\n .settings-modal-tab-panel {\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1 1 auto;\n padding: 0;\n border-radius: 0;\n }\n\n .settings-modal-tab-panel[hidden] {\n display: none !important;\n }\n\n .settings-modal-body {\n overflow-y: auto;\n padding: 0 calc(var(--design-unit) * 5px) calc(var(--design-unit) * 2px);\n max-height: min(60vh, 520px);\n }\n\n .settings-modal-section {\n padding: calc(var(--design-unit) * 5px) 0;\n border-bottom: 1px solid var(--neutral-stroke-rest);\n }\n\n .settings-modal-section:last-child {\n border-bottom: none;\n }\n\n /*\n * Only the spacing. Everything else about this heading comes from the exported fragment\n * above, which the assistant and its hosts share; margin is deliberately not in there,\n * since the gap below a heading depends on the layout around it.\n */\n .ai-settings-section-title {\n margin: 0 0 calc(var(--design-unit) * 3px);\n }\n\n .settings-modal-section-note {\n margin: calc(var(--design-unit) * -2px) 0 calc(var(--design-unit) * 3px);\n font-size: 12px;\n line-height: 1.5;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-modal-section-body {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 4px);\n }\n\n .settings-toggle-row {\n display: flex;\n align-items: flex-start;\n gap: calc(var(--design-unit) * 3px);\n padding: 0 0 calc(var(--design-unit) * 4px);\n border-bottom: 1px solid var(--neutral-stroke-rest);\n }\n\n .settings-toggle-row:last-child {\n border-bottom: none;\n padding-bottom: calc(var(--design-unit) * 1px);\n }\n\n .settings-toggle-row.is-stacked {\n flex-direction: column;\n gap: calc(var(--design-unit) * 2px);\n }\n\n /*\n * For rows whose control is a button rather than a switch. The base row top-aligns, which suits\n * a switch (it lands level with the title), but a button is tall enough that top-aligning leaves\n * it above the title-plus-description block it acts on.\n */\n .settings-toggle-row.is-centered {\n align-items: center;\n }\n\n .settings-animation-list {\n display: flex;\n flex-direction: column;\n width: 100%;\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius) * 1.2px);\n padding: calc(var(--design-unit) * 2px);\n gap: calc(var(--design-unit) * 2px);\n }\n\n .settings-animation-list .settings-toggle-row {\n border: 0;\n }\n\n .settings-animation-category {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 4px);\n }\n\n .settings-animation-category-label {\n font-weight: 600;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-toggle-row + .settings-animation-category-label {\n border-top: 1px solid var(--neutral-stroke-rest);\n padding-top: calc(var(--design-unit) * 2px);\n }\n\n .settings-animation-option {\n padding: 0;\n margin: 0;\n }\n\n .settings-animation-option:last-child {\n border-bottom: none;\n padding-bottom: calc(var(--design-unit) * 2px);\n }\n\n .settings-toggle-text {\n flex: 1;\n min-width: 0;\n }\n\n .settings-toggle-title {\n font-size: 14px;\n font-weight: 500;\n color: var(--neutral-foreground-rest);\n }\n\n .settings-toggle-desc {\n font-size: 12px;\n color: var(--neutral-foreground-hint);\n line-height: 1.5;\n max-width: 92%;\n }\n\n .settings-toggle-control {\n flex: 0 0 auto;\n min-width: 0;\n }\n\n .settings-toggle-control-wide {\n width: 100%;\n max-width: 280px;\n }\n\n .settings-toggle-row.is-stacked .settings-toggle-desc {\n max-width: none;\n }\n\n .settings-toggle-row.is-stacked .settings-toggle-control-wide {\n width: 100%;\n max-width: none;\n }\n\n /*\n * Sub-heading over the provider toggle group. Unlike the section headings it sits INSIDE\n * .settings-modal-section-body, so the parent's 4-unit flex gap already separates it from the\n * first toggle — and flex does not collapse margins, so the shared rule's 3-unit margin-bottom\n * would add to that gap rather than replace it, leaving the label adrift from the rows it\n * names. Zero the margin and pull back 2 of the 4 gap units, expressed in the same token so it\n * tracks if that gap changes.\n */\n .settings-app-toggles-title {\n margin: 0 0 calc(var(--design-unit) * -2px);\n }\n\n .settings-app-toggle-block {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 1px);\n }\n\n .settings-toggle-hint {\n font-size: 12px;\n color: var(--neutral-foreground-hint);\n line-height: 1.4;\n padding-left: calc(var(--design-unit) * 1px);\n font-style: italic;\n }\n\n /* A row's own hint, under its description: lined up with it, not indented. */\n .settings-toggle-text .settings-toggle-hint {\n padding-left: 0;\n margin-top: calc(var(--design-unit) * 1px);\n }\n\n /*\n * The budget meter (GENC-1464) is the context indicator's money sibling and\n * shares its row anatomy 1:1, so the budget classes JOIN these rules rather\n * than restating them — one place to restyle the header/label/figures shape,\n * and the two indicators cannot drift apart. Design-system tokens only, and\n * unfallbacked: every token here ships a DS default, so a var(--x, y)\n * fallback would be dead code that hides a broken token name (#2411/#2436\n * review rule, pinned by settings-modal.styles.test.ts).\n */\n .settings-context-header,\n .settings-budget-header {\n display: flex;\n justify-content: space-between;\n gap: calc(var(--design-unit) * 2px);\n margin-bottom: calc(var(--design-unit) * 2px);\n font-size: 12px;\n }\n\n .settings-context-label,\n .settings-budget-label {\n color: var(--neutral-foreground-hint);\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n }\n\n .settings-context-tokens,\n .settings-budget-figures {\n color: var(--neutral-foreground-rest);\n }\n\n /*\n * Stacked budget bar (NEW-15): only drawn when the host broke a vendor's spend down.\n * Sized off the design system's progress element rather than a figure of its own, so the\n * segmented row and the plain one line up in the same meter — a vendor with a breakdown\n * and one without sit next to each other.\n *\n * The pieces are tones of ONE accent, not a palette: the assistant is themed by whatever\n * design system hosts it, so inventing chart colours here would collide with every one of\n * them. Tone is positional and carries no meaning on its own, which is why the legend\n * below is part of the drawing rather than an optional extra.\n */\n .settings-budget-stack {\n display: flex;\n overflow: hidden;\n width: 100%;\n\n /* The design system's own progress metrics, so a segmented row and a plain one are the\n same bar at the same height with the same rhythm around them. */\n height: calc(var(--design-unit) * 2px);\n margin: calc(var(--design-unit) * 1px) 0;\n border-radius: calc(var(--design-unit) * 1px);\n background: var(--neutral-fill-rest);\n }\n\n .settings-budget-segment {\n height: 100%;\n\n /* The fill colour the progress element's determinate bar uses, not the button accent. */\n background: var(--accent-foreground-rest);\n\n /*\n * Set per piece by the template. Unfallbacked like every token here: an unset custom\n * property makes the declaration invalid at computed-value time, which lands on opacity's\n * initial value of 1 — the same thing a fallback would say, without a second copy of it.\n */\n opacity: var(--segment-tone);\n }\n\n /*\n * A hairline in the track colour between adjacent pieces, so every boundary is visible even\n * where two pieces share a tone (from the fourth named segment on, the tones bottom out at a\n * floor and repeat). Drawn as a border, not a flex gap: with border-box sizing the hairline comes out of\n * the piece's own width, so the pieces still add up to what the arithmetic gave them.\n */\n .settings-budget-segment + .settings-budget-segment {\n border-left: 1px solid var(--neutral-fill-rest);\n }\n\n .settings-budget-legend {\n display: flex;\n flex-wrap: wrap;\n gap: calc(var(--design-unit) * 2px);\n margin-top: calc(var(--design-unit) * 1.5px);\n font-size: 11px;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-budget-legend-item {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n }\n\n .settings-budget-swatch {\n width: 8px;\n height: 8px;\n border-radius: 2px;\n background: var(--accent-foreground-rest);\n opacity: var(--segment-tone);\n }\n\n .settings-budget-legend-figures {\n color: var(--neutral-foreground-rest);\n }\n\n /* Freshness footer (GENC-1464): refresh button + label under the vendor\n rows, left-aligned — a footnote to the figures above it. The button's\n inline padding is pinned and cancelled by the container margin so the\n ICON GLYPH (not the button box) sits flush with the budget labels'\n left edge, whatever the density tokens say. */\n .settings-budget-toolbar {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n gap: 4px;\n margin-inline-start: -4px;\n }\n\n .settings-budget-refresh::part(control) {\n padding-inline: 4px;\n }\n\n .settings-budget-updated {\n color: var(--neutral-foreground-hint);\n font-size: 11px;\n }\n\n /*\n * ONE rhythm for every meter row. The outer wrapper holds the context\n * indicator and the budget meter; the inner one holds the budget meter's\n * vendor rows — and both gap by the same 2 units (half the section body's 4)\n * so that visually identical meter rows are evenly spaced whatever mix of\n * them is on screen. Without the wrapper the context row inherits the body's\n * 4-unit gap while the vendor rows keep 2, and three identical-looking rows\n * read as an uneven 4/2/2. The wrapper renders only when at least one meter\n * does — see settingsUsageMetersTemplate for why an always-on one would cost\n * a stray gap.\n */\n .settings-usage-meters,\n .settings-budget-usage {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 2px);\n }\n\n .settings-current-build,\n .settings-lifetime-usage {\n background: var(--neutral-layer-2);\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius) * 1.5px);\n padding: calc(var(--design-unit) * 4px);\n margin: calc(var(--design-unit) * 3px) 0;\n }\n\n /*\n * Deliberately quieter than the live block: no pulsing badge and no accent, so the eye lands\n * on what is being built now — which is why that block leads the tab and this one follows,\n * under the history heading whose rows it totals.\n */\n .settings-lifetime-usage-top {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: calc(var(--design-unit) * 2px);\n margin-bottom: calc(var(--design-unit) * 3px);\n }\n\n .settings-lifetime-label {\n font-size: 10px;\n line-height: 1;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-current-build-top {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: calc(var(--design-unit) * 2px);\n margin-bottom: calc(var(--design-unit) * 3px);\n }\n\n /*\n * Optically centring these 10px caps against the 14px project name beside them. Flex offers\n * only two alignments and neither lands it, because a box centre and a text baseline are\n * different lines:\n * - align-items: center sits the badge baseline about 1.2px high\n * - align-items: baseline matches baselines, but the caps then read as bottom-aligned\n * against the name's ascenders, so the badge looks low\n * The eye wants the midpoint, so: centre the boxes, then translate down by the ~1px of\n * overshoot. This is a nudge, but it corrects a fixed relationship between two font sizes\n * rather than some neighbouring element's layout, so unlike a margin tuned to a sibling it\n * cannot rot when that sibling changes. In em, so it tracks the badge text.\n *\n * display: block, not inline-flex: a flex container has no text baseline of its own and\n * synthesizes one from its first child, which here is the dot, an empty span. As a block box\n * the badge takes the baseline of its first line, i.e. the text.\n */\n .settings-live-badge {\n display: block;\n font-size: 10px;\n line-height: 1;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: var(--accent-fill-rest);\n white-space: nowrap;\n transform: translateY(0.1em);\n }\n\n .settings-live-dot {\n display: inline-block;\n width: 7px;\n height: 7px;\n\n /* Replaces the flex gap the badge no longer has. */\n margin-right: calc(var(--design-unit) * 1px);\n\n /* Centres the dot on the text beside it without disturbing that text's baseline. */\n vertical-align: middle;\n border-radius: 50%;\n background: var(--accent-fill-rest);\n animation: settings-live-pulse 1.6s ease-out infinite;\n }\n\n @keyframes settings-live-pulse {\n 0% {\n box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-fill-rest) 55%, transparent);\n }\n\n 70% {\n box-shadow: 0 0 0 7px transparent;\n }\n\n 100% {\n box-shadow: 0 0 0 0 transparent;\n }\n }\n\n .settings-current-build-name {\n font-size: 14px;\n line-height: 1;\n font-weight: 600;\n }\n\n /*\n * Cost and the token buckets side by side: one number in its own box, the four buckets\n * sharing the box next to it. Stretch, so the two are the same height however tall the 22px\n * cost value makes the left one.\n */\n .settings-usage-row {\n display: flex;\n flex-wrap: wrap;\n align-items: stretch;\n gap: calc(var(--design-unit) * 3px);\n margin-bottom: calc(var(--design-unit) * 3px);\n }\n\n .settings-usage-row-tokens {\n display: flex;\n flex: 1 1 auto;\n min-width: 0;\n }\n\n .settings-build-stat {\n min-width: 0;\n background: var(--neutral-layer-1);\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius) * 1px);\n padding: calc(var(--design-unit) * 3px);\n }\n\n .settings-build-stat-label {\n font-size: 10px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-build-stat-value {\n font-size: 22px;\n font-weight: 700;\n margin-top: calc(var(--design-unit) * 1px);\n color: var(--neutral-foreground-rest);\n }\n\n .settings-build-stat-value .prefix,\n .settings-build-stat-value .suffix {\n color: var(--accent-fill-rest);\n }\n\n /*\n * Per-bucket token split, beneath the headline cost. Small paired label/value cells\n * rather than four more stat cards: they are the detail behind the cost above, so they\n * have to read as subordinate to it rather than compete with it. The four buckets ARE\n * the token figure now — there is no merged total anywhere for them to break down.\n */\n .settings-token-breakdown {\n display: flex;\n flex-direction: column;\n\n /*\n * Tight against the buckets below. One design unit rather than two, because each bucket\n * separates its own label from its value by only 2px — at two units the title sat four\n * times further from the bucket labels than they sit from their own numbers, which read\n * as a gap between unrelated blocks instead of a heading over its content.\n */\n gap: calc(var(--design-unit) * 1px);\n margin-bottom: calc(var(--design-unit) * 3px);\n padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 3px);\n background: var(--neutral-layer-1);\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius) * 1px);\n }\n\n /*\n * Titles the box, because nothing else in it named the unit. Same styling and position as\n * the cost box's label, so two boxes sitting side by side are titled the same way; the\n * hierarchy against the bucket labels comes from position, not a second type size.\n */\n .settings-token-breakdown-label {\n font-size: 10px;\n line-height: 1;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-token-buckets {\n display: flex;\n flex-wrap: wrap;\n gap: calc(var(--design-unit) * 4px);\n }\n\n .settings-token-bucket {\n display: flex;\n\n /*\n * min-content (not 0) so a bucket cannot be shrunk narrower than its own unbreakable label.\n * With the label set to nowrap, a zero minimum would overflow it into the next column instead\n * of wrapping — so the container's flex-wrap takes over and moves a bucket to a second row,\n * which is the degradation we want when the modal is dragged narrow.\n */\n min-width: min-content;\n flex-direction: column;\n gap: 2px;\n }\n\n .settings-token-bucket-label {\n font-size: 10px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: var(--neutral-foreground-hint);\n\n /*\n * One line, always. The rate marker is a separate inline box after collapsible whitespace, so\n * a wrappable label gives it a break opportunity of its own — in a narrow column it orphaned\n * onto line 2, which also pushed that bucket's value a line below the other three and broke\n * the row of figures. nowrap removes every break opportunity in the label, the space before\n * the marker included, so no glue character is needed.\n */\n white-space: nowrap;\n }\n\n .settings-token-bucket-value {\n font-size: 13px;\n font-weight: 600;\n color: var(--neutral-foreground-rest);\n }\n\n /*\n * The price-direction marker on a cache bucket's label — down for reads (a fraction of the\n * uncached input rate), up for writes (a premium over it). Three tiers, so a bucket with no\n * marker is the reference rate rather than an unlabelled fourth case.\n *\n * Carried by the label rather than the value, which is what this used to do: cache reads are\n * usually the largest bucket by a wide margin in an agentic session, so the value was muted to\n * stop the biggest number reading as the dominant cost driver. That priced the treatment to the\n * wrong thing — a dimmed 0 (every Gemini cache write) looked disabled next to a normal 0, and a\n * rate is a property of the bucket, not of this turn's figure.\n *\n * Sized down and nudged up rather than tinted: the label is already the hint colour, so a\n * dimmer marker would vanish and a brighter one would out-shout the word it qualifies.\n */\n .settings-token-bucket-rate {\n font-size: 8px;\n line-height: 1;\n vertical-align: 0.15em;\n letter-spacing: 0;\n }\n\n /*\n * Usage-row overrides. Placed after the base rules they refine rather than up beside\n * .settings-usage-row itself, because stylelint's no-descending-specificity rejects a\n * compound selector appearing before the plain one it overrides.\n */\n\n /* Sized by its content; the buckets take the rest, since four cells need the width. */\n .settings-usage-row > .settings-build-stat {\n flex: 0 1 auto;\n }\n\n .settings-usage-row .settings-token-breakdown {\n flex: 1 1 auto;\n\n /* The row owns the spacing now; this centres the column against the taller cost box. */\n justify-content: center;\n margin-bottom: 0;\n }\n\n /*\n * Basis auto, not 0: a zero basis splits the row into four equal columns, so CACHE WRITE is\n * squeezed exactly as hard as INPUT despite being twice the label. Sizing from content gives the\n * long labels the room their text needs and lets the short ones concede it, which is what makes\n * white-space: nowrap above safe — every column starts at least as wide as its own content,\n * then shares the slack. Still grows and shrinks, so the four stay flush edge to edge.\n */\n .settings-usage-row .settings-token-bucket {\n flex: 1 1 auto;\n }\n\n .settings-model-tags {\n display: flex;\n flex-wrap: wrap;\n gap: calc(var(--design-unit) * 2px);\n }\n\n .settings-model-tag {\n font-size: 11px;\n font-weight: 600;\n padding: 3px 9px;\n border-radius: 20px;\n font-family: ui-monospace, monospace;\n border: 1px solid var(--neutral-stroke-rest);\n }\n\n .settings-model-tag,\n .settings-cost-history-icon {\n --model-tag-color: var(--neutral-foreground-rest);\n\n background: color-mix(\n in srgb,\n var(--model-tag-color) var(--ai-tier-badge-bg-mix),\n var(--neutral-layer-1)\n );\n border-color: color-mix(in srgb, var(--model-tag-color) 20%, var(--neutral-layer-1));\n color: color-mix(in srgb, var(--model-tag-color), white var(--ai-tier-badge-text-lighten));\n }\n\n .settings-cost-history-title {\n font-size: 11px;\n text-transform: uppercase;\n letter-spacing: 0.08em;\n color: var(--neutral-foreground-hint);\n font-weight: 600;\n margin: calc(var(--design-unit) * 4px) 0 calc(var(--design-unit) * 2px);\n }\n\n /*\n * The heading labels the lifetime card as well as the rows, so the card gives up its own top\n * margin and the gap becomes the heading's alone. Adjacent siblings collapse to the LARGER of\n * the two margins, so leaving both would space the caps 3 units off the block they label while\n * the rows below sit at 2 — reading as though the heading belonged to neither.\n */\n .settings-cost-history-title + .settings-lifetime-usage {\n margin-top: 0;\n }\n\n .settings-cost-history {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 2px);\n padding-bottom: calc(var(--design-unit) * 2px);\n }\n\n .settings-cost-history-icon {\n flex: 0 0 auto;\n width: 36px;\n height: 36px;\n border-radius: calc(var(--control-corner-radius) * 1px);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n font-weight: 700;\n border: 1px solid var(--neutral-stroke-rest);\n }\n\n .settings-cost-history-row {\n display: flex;\n flex-direction: column;\n background: var(--neutral-layer-1);\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius) * 1.5px);\n padding: calc(var(--design-unit) * 4px);\n }\n\n .settings-cost-history-row-content {\n display: flex;\n align-items: flex-start;\n gap: calc(var(--design-unit) * 2px);\n }\n\n /*\n * All of these carry a ?hidden binding, and all declare display: flex — which silently beat the\n * UA [hidden] { display: none } rule, because author-origin declarations outrank user-agent\n * origin whatever the specificity. Without this, showTokens: false still rendered the full\n * breakdown in the lifetime block, the live block and every history row, and an empty row list\n * still occupied its padding under the lifetime total. Sibling elements that hide correctly do\n * so only by declaring no display at all. Same treatment as .settings-modal-tab-panel[hidden]\n * near the top of this file.\n */\n .settings-usage-row-tokens[hidden],\n .settings-cost-history[hidden],\n .settings-cost-history-row-content[hidden] {\n display: none !important;\n }\n\n /*\n * The buckets inside a history row drop the panel treatment they carry in the summary\n * blocks — the row is already a bordered card, and a second box inside it reads as a\n * nested panel. The adjacent-sibling rule above supplies the separator instead.\n */\n .settings-cost-history-row-breakdown .settings-token-breakdown {\n flex: 1 1 auto;\n margin-bottom: 0;\n padding: 0;\n background: none;\n border: none;\n }\n\n .settings-cost-history-row-content + .settings-cost-history-row-content {\n border-top: 1px solid var(--neutral-stroke-rest);\n margin-top: calc(var(--design-unit) * 2px);\n padding-top: calc(var(--design-unit) * 2px);\n }\n\n .settings-cost-history-row-body {\n flex: 1 1 auto;\n min-width: 0;\n display: flex;\n gap: calc(var(--design-unit) * 2px);\n justify-content: space-between;\n }\n\n /*\n * Holds the cost and the delete button as one centred pair. The button used to be a sibling\n * of the whole row body, kept in place by a -2px nudge tuned for when the metrics column had\n * two lines (cost plus a merged token total). Dropping that second line left the nudge\n * compensating for nothing. Centring the two against each other needs no magic number and\n * cannot drift again if the metrics content changes.\n *\n * NB this rule previously set align-items with no display:flex, so it had no effect at all.\n */\n .settings-cost-history-row-right {\n display: flex;\n align-items: center;\n gap: calc(var(--design-unit) * 1px);\n flex: 0 0 auto;\n }\n\n .settings-cost-history-row-cost,\n .settings-cost-history-row-title {\n font-size: 14px;\n font-weight: 600;\n color: var(--neutral-foreground-rest);\n min-width: 0;\n }\n\n .settings-cost-history-row-metrics {\n display: flex;\n flex-direction: column;\n flex: 0 0 auto;\n font-size: 13px;\n font-family: ui-monospace, monospace;\n color: var(--neutral-foreground-rest);\n white-space: nowrap;\n }\n\n .settings-cost-history-row-date {\n font-size: 12px;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-cost-history-delete {\n flex: 0 0 auto;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-cost-history-delete:hover {\n color: var(--error-color);\n }\n\n .settings-cost-history ::slotted(*) {\n display: block;\n }\n\n .settings-modal-footer {\n width: 100%;\n }\n\n .settings-done-button {\n margin-left: auto;\n }\n\n .settings-modal-footer-actions {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: calc(var(--design-unit) * 2px);\n width: 100%;\n }\n\n .settings-disclaimer {\n font-size: 12px;\n color: var(--neutral-foreground-hint);\n max-width: 60%;\n line-height: 1.4;\n }\n\n /* The agent-log row's two actions (Download / Send) side by side. */\n .agent-log-actions {\n display: flex;\n align-items: center;\n gap: calc(var(--design-unit) * 2px);\n }\n\n /*\n * Row + compose box. The row is normally the section's last child (no divider); inside\n * the wrapper it is only the last child while the box is closed, so drop the divider\n * explicitly and let the box supply its own spacing beneath the row.\n */\n .agent-log-block {\n display: flex;\n flex-direction: column;\n }\n\n .agent-log-block .settings-toggle-row {\n border-bottom: none;\n padding-bottom: calc(var(--design-unit) * 1px);\n }\n\n .agent-log-compose {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 2px);\n margin-top: calc(var(--design-unit) * 2px);\n }\n\n .agent-log-note {\n width: 100%;\n }\n\n .agent-log-note::part(control) {\n width: 100%;\n box-sizing: border-box;\n font-size: 13px;\n line-height: 1.5;\n }\n\n .agent-log-compose-footer {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: calc(var(--design-unit) * 3px);\n }\n\n /* Counter / validation / failure line. Hint-coloured until it carries an error. */\n .agent-log-compose-hint {\n font-size: 12px;\n color: var(--neutral-foreground-hint);\n min-width: 0;\n }\n\n /*\n * Failure state without leaning on --error-color: rapid's fixed brand red is 3.02:1 on a\n * light surface, under AA for 12px text, and the failure line is the one that most needs\n * reading. The contrast-adaptive foreground plus weight carries it; the text itself also\n * changes, so colour was never the only channel.\n */\n .agent-log-compose-hint.is-error {\n color: var(--neutral-foreground-rest);\n font-weight: 600;\n }\n\n /* Screen-reader-only live region for submission outcomes (same recipe as main.styles). */\n .visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n }\n\n /*\n * Inline spinner shown in the agent-log buttons (Download / Send) while the log\n * builds (GENC-1351 §5.8) — the lifetime-stitch path is an async provider\n * round-trip. Sized to the button label and tinted with currentColor so it tracks\n * the button's text colour in every appearance / theme.\n */\n [part='download-button'] .download-spinner,\n [part='submit-log-button'] .download-spinner,\n [part='agent-log-send-button'] .download-spinner {\n display: inline-block;\n width: 12px;\n height: 12px;\n margin-right: calc(var(--design-unit) * 1px);\n vertical-align: -1px;\n border: 2px solid currentColor;\n border-right-color: transparent;\n border-radius: 50%;\n animation: download-spin 0.6s linear infinite;\n }\n\n @keyframes download-spin {\n to {\n transform: rotate(360deg);\n }\n }\n`",
|
|
27816
|
+
"default": "css`\n /*\n * Section headings come from the shared fragment the package also exports, so a host titling\n * its own slotted section applies the same rule rather than a copy of it.\n */\n ${assistantSettingsSectionTitleStyles}\n\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n\n .settings-modal {\n --ai-tier-badge-bg-mix: 14%;\n --ai-tier-badge-text-lighten: 18%;\n }\n\n .settings-modal::part(dialog) {\n max-width: 620px;\n width: calc(100vw - 48px);\n max-height: calc(100vh - 48px);\n padding: 0;\n }\n\n .settings-modal::part(content) {\n display: flex;\n flex-direction: column;\n min-height: 0;\n padding: 0;\n width: 100%;\n }\n\n .settings-modal::part(top) {\n padding: calc(var(--design-unit) * 4px) calc(var(--design-unit) * 5px);\n border-bottom: 1px solid var(--neutral-stroke-rest);\n }\n\n .settings-modal::part(bottom) {\n padding: calc(var(--design-unit) * 4px) calc(var(--design-unit) * 5px);\n border-top: 1px solid var(--neutral-stroke-rest);\n border-bottom-left-radius: var(--card-border-radius, calc(var(--control-corner-radius) * 1px));\n border-bottom-right-radius: var(--card-border-radius, calc(var(--control-corner-radius) * 1px));\n background-color: var(--neutral-layer-2);\n }\n\n .settings-modal-header {\n display: flex;\n align-items: center;\n min-width: 0;\n }\n\n .settings-modal-title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n display: flex;\n align-items: center;\n gap: calc(var(--design-unit) * 2px);\n color: var(--neutral-foreground-rest);\n }\n\n .settings-modal-content {\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1 1 auto;\n }\n\n .settings-modal-tabs::part(tablist) {\n border-bottom: 0;\n padding: 0 calc(var(--design-unit) * 5px);\n column-gap: calc(var(--design-unit) * 5px);\n }\n\n .settings-modal-tabs::part(activeIndicator) {\n height: 2px;\n }\n\n .settings-modal-tab {\n padding: 0;\n font-weight: 600;\n gap: 6px;\n }\n\n .settings-modal-tab[aria-selected='true'] {\n color: var(--neutral-foreground-rest);\n }\n\n .settings-modal-tabs::part(tabpanel) {\n border-top: 1px solid var(--neutral-stroke-rest);\n }\n\n .settings-modal-tab-panel {\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1 1 auto;\n padding: 0;\n border-radius: 0;\n }\n\n .settings-modal-tab-panel[hidden] {\n display: none !important;\n }\n\n .settings-modal-body {\n overflow-y: auto;\n padding: 0 calc(var(--design-unit) * 5px) calc(var(--design-unit) * 2px);\n max-height: min(60vh, 520px);\n }\n\n .settings-modal-section {\n padding: calc(var(--design-unit) * 5px) 0;\n border-bottom: 1px solid var(--neutral-stroke-rest);\n }\n\n .settings-modal-section:last-child {\n border-bottom: none;\n }\n\n /*\n * Only the spacing. Everything else about this heading comes from the exported fragment\n * above, which the assistant and its hosts share; margin is deliberately not in there,\n * since the gap below a heading depends on the layout around it.\n */\n .ai-settings-section-title {\n margin: 0 0 calc(var(--design-unit) * 3px);\n }\n\n .settings-modal-section-note {\n margin: calc(var(--design-unit) * -2px) 0 calc(var(--design-unit) * 3px);\n font-size: 12px;\n line-height: 1.5;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-modal-section-body {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 4px);\n }\n\n .settings-toggle-row {\n display: flex;\n align-items: flex-start;\n gap: calc(var(--design-unit) * 3px);\n padding: 0 0 calc(var(--design-unit) * 4px);\n border-bottom: 1px solid var(--neutral-stroke-rest);\n }\n\n .settings-toggle-row:last-child {\n border-bottom: none;\n padding-bottom: calc(var(--design-unit) * 1px);\n }\n\n .settings-toggle-row.is-stacked {\n flex-direction: column;\n gap: calc(var(--design-unit) * 2px);\n }\n\n /*\n * For rows whose control is a button rather than a switch. The base row top-aligns, which suits\n * a switch (it lands level with the title), but a button is tall enough that top-aligning leaves\n * it above the title-plus-description block it acts on.\n */\n .settings-toggle-row.is-centered {\n align-items: center;\n }\n\n .settings-animation-list {\n display: flex;\n flex-direction: column;\n width: 100%;\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius) * 1.2px);\n padding: calc(var(--design-unit) * 2px);\n gap: calc(var(--design-unit) * 2px);\n }\n\n .settings-animation-list .settings-toggle-row {\n border: 0;\n }\n\n .settings-animation-category {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 4px);\n }\n\n .settings-animation-category-label {\n font-weight: 600;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-toggle-row + .settings-animation-category-label {\n border-top: 1px solid var(--neutral-stroke-rest);\n padding-top: calc(var(--design-unit) * 2px);\n }\n\n .settings-animation-option {\n padding: 0;\n margin: 0;\n }\n\n .settings-animation-option:last-child {\n border-bottom: none;\n padding-bottom: calc(var(--design-unit) * 2px);\n }\n\n .settings-toggle-text {\n flex: 1;\n min-width: 0;\n }\n\n .settings-toggle-title {\n font-size: 14px;\n font-weight: 500;\n color: var(--neutral-foreground-rest);\n }\n\n .settings-toggle-desc {\n font-size: 12px;\n color: var(--neutral-foreground-hint);\n line-height: 1.5;\n max-width: 92%;\n }\n\n .settings-toggle-control {\n flex: 0 0 auto;\n min-width: 0;\n }\n\n .settings-toggle-control-wide {\n width: 100%;\n max-width: 280px;\n }\n\n .settings-toggle-row.is-stacked .settings-toggle-desc {\n max-width: none;\n }\n\n .settings-toggle-row.is-stacked .settings-toggle-control-wide {\n width: 100%;\n max-width: none;\n }\n\n /*\n * Sub-heading over the provider toggle group. Unlike the section headings it sits INSIDE\n * .settings-modal-section-body, so the parent's 4-unit flex gap already separates it from the\n * first toggle — and flex does not collapse margins, so the shared rule's 3-unit margin-bottom\n * would add to that gap rather than replace it, leaving the label adrift from the rows it\n * names. Zero the margin and pull back 2 of the 4 gap units, expressed in the same token so it\n * tracks if that gap changes.\n */\n .settings-app-toggles-title {\n margin: 0 0 calc(var(--design-unit) * -2px);\n }\n\n .settings-app-toggle-block {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 1px);\n }\n\n .settings-toggle-hint {\n font-size: 12px;\n color: var(--neutral-foreground-hint);\n line-height: 1.4;\n padding-left: calc(var(--design-unit) * 1px);\n font-style: italic;\n }\n\n /* A row's own hint, under its description: lined up with it, not indented. */\n .settings-toggle-text .settings-toggle-hint {\n padding-left: 0;\n margin-top: calc(var(--design-unit) * 1px);\n }\n\n /*\n * The budget meter (GENC-1464) is the context indicator's money sibling and\n * shares its row anatomy 1:1, so the budget classes JOIN these rules rather\n * than restating them — one place to restyle the header/label/figures shape,\n * and the two indicators cannot drift apart. Design-system tokens only, and\n * unfallbacked: every token here ships a DS default, so a var(--x, y)\n * fallback would be dead code that hides a broken token name (#2411/#2436\n * review rule, pinned by settings-modal.styles.test.ts).\n */\n .settings-context-header,\n .settings-budget-header {\n display: flex;\n justify-content: space-between;\n gap: calc(var(--design-unit) * 2px);\n margin-bottom: calc(var(--design-unit) * 2px);\n font-size: 12px;\n }\n\n .settings-context-label,\n .settings-budget-label {\n color: var(--neutral-foreground-hint);\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n }\n\n .settings-context-tokens,\n .settings-budget-figures {\n color: var(--neutral-foreground-rest);\n }\n\n /*\n * Stacked budget bar (NEW-15): only drawn when the host broke a vendor's spend down.\n * Sized off the design system's progress element rather than a figure of its own, so the\n * segmented row and the plain one line up in the same meter — a vendor with a breakdown\n * and one without sit next to each other.\n *\n * The pieces are tones of ONE accent, not a palette: the assistant is themed by whatever\n * design system hosts it, so inventing chart colours here would collide with every one of\n * them. Tone is positional and carries no meaning on its own, which is why the legend\n * below is part of the drawing rather than an optional extra.\n */\n .settings-budget-stack {\n display: flex;\n overflow: hidden;\n width: 100%;\n\n /* The design system's own progress metrics, so a segmented row and a plain one are the\n same bar at the same height with the same rhythm around them. */\n height: calc(var(--design-unit) * 2px);\n margin: calc(var(--design-unit) * 1px) 0;\n border-radius: calc(var(--design-unit) * 1px);\n background: var(--neutral-fill-rest);\n }\n\n .settings-budget-segment {\n height: 100%;\n\n /* The fill colour the progress element's determinate bar uses, not the button accent. */\n background: var(--accent-foreground-rest);\n\n /*\n * Set per piece by the template. Unfallbacked like every token here: an unset custom\n * property makes the declaration invalid at computed-value time, which lands on opacity's\n * initial value of 1 — the same thing a fallback would say, without a second copy of it.\n */\n opacity: var(--segment-tone);\n }\n\n /*\n * A hairline in the track colour between adjacent pieces, so every boundary is visible even\n * where two pieces share a tone (from the fourth named segment on, the tones bottom out at a\n * floor and repeat). Drawn as a border, not a flex gap: with border-box sizing the hairline comes out of\n * the piece's own width, so the pieces still add up to what the arithmetic gave them.\n */\n .settings-budget-segment + .settings-budget-segment {\n border-left: 1px solid var(--neutral-fill-rest);\n }\n\n .settings-budget-legend {\n display: flex;\n flex-wrap: wrap;\n gap: calc(var(--design-unit) * 2px);\n margin-top: calc(var(--design-unit) * 1.5px);\n font-size: 11px;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-budget-legend-item {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n }\n\n .settings-budget-swatch {\n width: 8px;\n height: 8px;\n border-radius: 2px;\n background: var(--accent-foreground-rest);\n opacity: var(--segment-tone);\n }\n\n .settings-budget-legend-figures {\n color: var(--neutral-foreground-rest);\n }\n\n /* Freshness footer (GENC-1464): refresh button + label under the vendor\n rows, left-aligned — a footnote to the figures above it. The button's\n inline padding is pinned and cancelled by the container margin so the\n ICON GLYPH (not the button box) sits flush with the budget labels'\n left edge, whatever the density tokens say. */\n .settings-budget-toolbar {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n gap: 4px;\n margin-inline-start: -4px;\n }\n\n .settings-budget-refresh::part(control) {\n padding-inline: 4px;\n }\n\n .settings-budget-updated {\n color: var(--neutral-foreground-hint);\n font-size: 11px;\n }\n\n /*\n * ONE rhythm for every meter row. The outer wrapper holds the context\n * indicator and the budget meter; the inner one holds the budget meter's\n * vendor rows — and both gap by the same 2 units (half the section body's 4)\n * so that visually identical meter rows are evenly spaced whatever mix of\n * them is on screen. Without the wrapper the context row inherits the body's\n * 4-unit gap while the vendor rows keep 2, and three identical-looking rows\n * read as an uneven 4/2/2. The wrapper renders only when at least one meter\n * does — see settingsUsageMetersTemplate for why an always-on one would cost\n * a stray gap.\n */\n /* The vendor picker: one card per vendor, a native radio in each. */\n .settings-vendor-picker {\n margin: 0;\n padding: 0;\n border: none;\n min-width: 0;\n }\n\n .settings-vendor-legend {\n padding: 0;\n margin-bottom: calc(var(--design-unit) * 2px);\n font-weight: 600;\n }\n\n .settings-vendor-cards {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));\n gap: calc(var(--design-unit) * 2px);\n }\n\n .settings-vendor-card {\n display: flex;\n align-items: center;\n gap: calc(var(--design-unit) * 2px);\n padding: calc(var(--design-unit) * 3px);\n background: var(--neutral-layer-2);\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius) * 1.5px);\n cursor: pointer;\n }\n\n .settings-vendor-card:hover {\n border-color: var(--neutral-stroke-hover);\n }\n\n .settings-vendor-card.is-selected {\n border-color: var(--accent-fill-rest);\n }\n\n .settings-vendor-card:focus-within {\n outline: calc(var(--focus-stroke-width) * 1px) solid var(--focus-stroke-outer);\n outline-offset: 1px;\n }\n\n .settings-vendor-picker:disabled .settings-vendor-card {\n cursor: not-allowed;\n opacity: 0.6;\n }\n\n .settings-vendor-card input {\n margin: 0;\n accent-color: var(--accent-fill-rest);\n }\n\n .settings-vendor-elsewhere {\n margin: 0;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-usage-meters,\n .settings-budget-usage {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 2px);\n }\n\n .settings-current-build,\n .settings-lifetime-usage {\n background: var(--neutral-layer-2);\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius) * 1.5px);\n padding: calc(var(--design-unit) * 4px);\n margin: calc(var(--design-unit) * 3px) 0;\n }\n\n /*\n * Deliberately quieter than the live block: no pulsing badge and no accent, so the eye lands\n * on what is being built now — which is why that block leads the tab and this one follows,\n * under the history heading whose rows it totals.\n */\n .settings-lifetime-usage-top {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: calc(var(--design-unit) * 2px);\n margin-bottom: calc(var(--design-unit) * 3px);\n }\n\n .settings-lifetime-label {\n font-size: 10px;\n line-height: 1;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-current-build-top {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: calc(var(--design-unit) * 2px);\n margin-bottom: calc(var(--design-unit) * 3px);\n }\n\n /*\n * Optically centring these 10px caps against the 14px project name beside them. Flex offers\n * only two alignments and neither lands it, because a box centre and a text baseline are\n * different lines:\n * - align-items: center sits the badge baseline about 1.2px high\n * - align-items: baseline matches baselines, but the caps then read as bottom-aligned\n * against the name's ascenders, so the badge looks low\n * The eye wants the midpoint, so: centre the boxes, then translate down by the ~1px of\n * overshoot. This is a nudge, but it corrects a fixed relationship between two font sizes\n * rather than some neighbouring element's layout, so unlike a margin tuned to a sibling it\n * cannot rot when that sibling changes. In em, so it tracks the badge text.\n *\n * display: block, not inline-flex: a flex container has no text baseline of its own and\n * synthesizes one from its first child, which here is the dot, an empty span. As a block box\n * the badge takes the baseline of its first line, i.e. the text.\n */\n .settings-live-badge {\n display: block;\n font-size: 10px;\n line-height: 1;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: var(--accent-fill-rest);\n white-space: nowrap;\n transform: translateY(0.1em);\n }\n\n .settings-live-dot {\n display: inline-block;\n width: 7px;\n height: 7px;\n\n /* Replaces the flex gap the badge no longer has. */\n margin-right: calc(var(--design-unit) * 1px);\n\n /* Centres the dot on the text beside it without disturbing that text's baseline. */\n vertical-align: middle;\n border-radius: 50%;\n background: var(--accent-fill-rest);\n animation: settings-live-pulse 1.6s ease-out infinite;\n }\n\n @keyframes settings-live-pulse {\n 0% {\n box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-fill-rest) 55%, transparent);\n }\n\n 70% {\n box-shadow: 0 0 0 7px transparent;\n }\n\n 100% {\n box-shadow: 0 0 0 0 transparent;\n }\n }\n\n .settings-current-build-name {\n font-size: 14px;\n line-height: 1;\n font-weight: 600;\n }\n\n /*\n * Cost and the token buckets side by side: one number in its own box, the four buckets\n * sharing the box next to it. Stretch, so the two are the same height however tall the 22px\n * cost value makes the left one.\n */\n .settings-usage-row {\n display: flex;\n flex-wrap: wrap;\n align-items: stretch;\n gap: calc(var(--design-unit) * 3px);\n margin-bottom: calc(var(--design-unit) * 3px);\n }\n\n .settings-usage-row-tokens {\n display: flex;\n flex: 1 1 auto;\n min-width: 0;\n }\n\n .settings-build-stat {\n min-width: 0;\n background: var(--neutral-layer-1);\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius) * 1px);\n padding: calc(var(--design-unit) * 3px);\n }\n\n .settings-build-stat-label {\n font-size: 10px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-build-stat-value {\n font-size: 22px;\n font-weight: 700;\n margin-top: calc(var(--design-unit) * 1px);\n color: var(--neutral-foreground-rest);\n }\n\n .settings-build-stat-value .prefix,\n .settings-build-stat-value .suffix {\n color: var(--accent-fill-rest);\n }\n\n /*\n * Per-bucket token split, beneath the headline cost. Small paired label/value cells\n * rather than four more stat cards: they are the detail behind the cost above, so they\n * have to read as subordinate to it rather than compete with it. The four buckets ARE\n * the token figure now — there is no merged total anywhere for them to break down.\n */\n .settings-token-breakdown {\n display: flex;\n flex-direction: column;\n\n /*\n * Tight against the buckets below. One design unit rather than two, because each bucket\n * separates its own label from its value by only 2px — at two units the title sat four\n * times further from the bucket labels than they sit from their own numbers, which read\n * as a gap between unrelated blocks instead of a heading over its content.\n */\n gap: calc(var(--design-unit) * 1px);\n margin-bottom: calc(var(--design-unit) * 3px);\n padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 3px);\n background: var(--neutral-layer-1);\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius) * 1px);\n }\n\n /*\n * Titles the box, because nothing else in it named the unit. Same styling and position as\n * the cost box's label, so two boxes sitting side by side are titled the same way; the\n * hierarchy against the bucket labels comes from position, not a second type size.\n */\n .settings-token-breakdown-label {\n font-size: 10px;\n line-height: 1;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-token-buckets {\n display: flex;\n flex-wrap: wrap;\n gap: calc(var(--design-unit) * 4px);\n }\n\n .settings-token-bucket {\n display: flex;\n\n /*\n * min-content (not 0) so a bucket cannot be shrunk narrower than its own unbreakable label.\n * With the label set to nowrap, a zero minimum would overflow it into the next column instead\n * of wrapping — so the container's flex-wrap takes over and moves a bucket to a second row,\n * which is the degradation we want when the modal is dragged narrow.\n */\n min-width: min-content;\n flex-direction: column;\n gap: 2px;\n }\n\n .settings-token-bucket-label {\n font-size: 10px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: var(--neutral-foreground-hint);\n\n /*\n * One line, always. The rate marker is a separate inline box after collapsible whitespace, so\n * a wrappable label gives it a break opportunity of its own — in a narrow column it orphaned\n * onto line 2, which also pushed that bucket's value a line below the other three and broke\n * the row of figures. nowrap removes every break opportunity in the label, the space before\n * the marker included, so no glue character is needed.\n */\n white-space: nowrap;\n }\n\n .settings-token-bucket-value {\n font-size: 13px;\n font-weight: 600;\n color: var(--neutral-foreground-rest);\n }\n\n /*\n * The price-direction marker on a cache bucket's label — down for reads (a fraction of the\n * uncached input rate), up for writes (a premium over it). Three tiers, so a bucket with no\n * marker is the reference rate rather than an unlabelled fourth case.\n *\n * Carried by the label rather than the value, which is what this used to do: cache reads are\n * usually the largest bucket by a wide margin in an agentic session, so the value was muted to\n * stop the biggest number reading as the dominant cost driver. That priced the treatment to the\n * wrong thing — a dimmed 0 (every Gemini cache write) looked disabled next to a normal 0, and a\n * rate is a property of the bucket, not of this turn's figure.\n *\n * Sized down and nudged up rather than tinted: the label is already the hint colour, so a\n * dimmer marker would vanish and a brighter one would out-shout the word it qualifies.\n */\n .settings-token-bucket-rate {\n font-size: 8px;\n line-height: 1;\n vertical-align: 0.15em;\n letter-spacing: 0;\n }\n\n /*\n * Usage-row overrides. Placed after the base rules they refine rather than up beside\n * .settings-usage-row itself, because stylelint's no-descending-specificity rejects a\n * compound selector appearing before the plain one it overrides.\n */\n\n /* Sized by its content; the buckets take the rest, since four cells need the width. */\n .settings-usage-row > .settings-build-stat {\n flex: 0 1 auto;\n }\n\n .settings-usage-row .settings-token-breakdown {\n flex: 1 1 auto;\n\n /* The row owns the spacing now; this centres the column against the taller cost box. */\n justify-content: center;\n margin-bottom: 0;\n }\n\n /*\n * Basis auto, not 0: a zero basis splits the row into four equal columns, so CACHE WRITE is\n * squeezed exactly as hard as INPUT despite being twice the label. Sizing from content gives the\n * long labels the room their text needs and lets the short ones concede it, which is what makes\n * white-space: nowrap above safe — every column starts at least as wide as its own content,\n * then shares the slack. Still grows and shrinks, so the four stay flush edge to edge.\n */\n .settings-usage-row .settings-token-bucket {\n flex: 1 1 auto;\n }\n\n .settings-model-tags {\n display: flex;\n flex-wrap: wrap;\n gap: calc(var(--design-unit) * 2px);\n }\n\n .settings-model-tag {\n font-size: 11px;\n font-weight: 600;\n padding: 3px 9px;\n border-radius: 20px;\n font-family: ui-monospace, monospace;\n border: 1px solid var(--neutral-stroke-rest);\n }\n\n .settings-model-tag,\n .settings-cost-history-icon {\n --model-tag-color: var(--neutral-foreground-rest);\n\n background: color-mix(\n in srgb,\n var(--model-tag-color) var(--ai-tier-badge-bg-mix),\n var(--neutral-layer-1)\n );\n border-color: color-mix(in srgb, var(--model-tag-color) 20%, var(--neutral-layer-1));\n color: color-mix(in srgb, var(--model-tag-color), white var(--ai-tier-badge-text-lighten));\n }\n\n .settings-cost-history-title {\n font-size: 11px;\n text-transform: uppercase;\n letter-spacing: 0.08em;\n color: var(--neutral-foreground-hint);\n font-weight: 600;\n margin: calc(var(--design-unit) * 4px) 0 calc(var(--design-unit) * 2px);\n }\n\n /*\n * The heading labels the lifetime card as well as the rows, so the card gives up its own top\n * margin and the gap becomes the heading's alone. Adjacent siblings collapse to the LARGER of\n * the two margins, so leaving both would space the caps 3 units off the block they label while\n * the rows below sit at 2 — reading as though the heading belonged to neither.\n */\n .settings-cost-history-title + .settings-lifetime-usage {\n margin-top: 0;\n }\n\n .settings-cost-history {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 2px);\n padding-bottom: calc(var(--design-unit) * 2px);\n }\n\n .settings-cost-history-icon {\n flex: 0 0 auto;\n width: 36px;\n height: 36px;\n border-radius: calc(var(--control-corner-radius) * 1px);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n font-weight: 700;\n border: 1px solid var(--neutral-stroke-rest);\n }\n\n .settings-cost-history-row {\n display: flex;\n flex-direction: column;\n background: var(--neutral-layer-1);\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius) * 1.5px);\n padding: calc(var(--design-unit) * 4px);\n }\n\n .settings-cost-history-row-content {\n display: flex;\n align-items: flex-start;\n gap: calc(var(--design-unit) * 2px);\n }\n\n /*\n * All of these carry a ?hidden binding, and all declare display: flex — which silently beat the\n * UA [hidden] { display: none } rule, because author-origin declarations outrank user-agent\n * origin whatever the specificity. Without this, showTokens: false still rendered the full\n * breakdown in the lifetime block, the live block and every history row, and an empty row list\n * still occupied its padding under the lifetime total. Sibling elements that hide correctly do\n * so only by declaring no display at all. Same treatment as .settings-modal-tab-panel[hidden]\n * near the top of this file.\n */\n .settings-usage-row-tokens[hidden],\n .settings-cost-history[hidden],\n .settings-cost-history-row-content[hidden] {\n display: none !important;\n }\n\n /*\n * The buckets inside a history row drop the panel treatment they carry in the summary\n * blocks — the row is already a bordered card, and a second box inside it reads as a\n * nested panel. The adjacent-sibling rule above supplies the separator instead.\n */\n .settings-cost-history-row-breakdown .settings-token-breakdown {\n flex: 1 1 auto;\n margin-bottom: 0;\n padding: 0;\n background: none;\n border: none;\n }\n\n .settings-cost-history-row-content + .settings-cost-history-row-content {\n border-top: 1px solid var(--neutral-stroke-rest);\n margin-top: calc(var(--design-unit) * 2px);\n padding-top: calc(var(--design-unit) * 2px);\n }\n\n .settings-cost-history-row-body {\n flex: 1 1 auto;\n min-width: 0;\n display: flex;\n gap: calc(var(--design-unit) * 2px);\n justify-content: space-between;\n }\n\n /*\n * Holds the cost and the delete button as one centred pair. The button used to be a sibling\n * of the whole row body, kept in place by a -2px nudge tuned for when the metrics column had\n * two lines (cost plus a merged token total). Dropping that second line left the nudge\n * compensating for nothing. Centring the two against each other needs no magic number and\n * cannot drift again if the metrics content changes.\n *\n * NB this rule previously set align-items with no display:flex, so it had no effect at all.\n */\n .settings-cost-history-row-right {\n display: flex;\n align-items: center;\n gap: calc(var(--design-unit) * 1px);\n flex: 0 0 auto;\n }\n\n .settings-cost-history-row-cost,\n .settings-cost-history-row-title {\n font-size: 14px;\n font-weight: 600;\n color: var(--neutral-foreground-rest);\n min-width: 0;\n }\n\n .settings-cost-history-row-metrics {\n display: flex;\n flex-direction: column;\n flex: 0 0 auto;\n font-size: 13px;\n font-family: ui-monospace, monospace;\n color: var(--neutral-foreground-rest);\n white-space: nowrap;\n }\n\n .settings-cost-history-row-date {\n font-size: 12px;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-cost-history-delete {\n flex: 0 0 auto;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-cost-history-delete:hover {\n color: var(--error-color);\n }\n\n .settings-cost-history ::slotted(*) {\n display: block;\n }\n\n .settings-modal-footer {\n width: 100%;\n }\n\n .settings-done-button {\n margin-left: auto;\n }\n\n .settings-modal-footer-actions {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: calc(var(--design-unit) * 2px);\n width: 100%;\n }\n\n .settings-disclaimer {\n font-size: 12px;\n color: var(--neutral-foreground-hint);\n max-width: 60%;\n line-height: 1.4;\n }\n\n /* The agent-log row's two actions (Download / Send) side by side. */\n .agent-log-actions {\n display: flex;\n align-items: center;\n gap: calc(var(--design-unit) * 2px);\n }\n\n /*\n * Row + compose box. The row is normally the section's last child (no divider); inside\n * the wrapper it is only the last child while the box is closed, so drop the divider\n * explicitly and let the box supply its own spacing beneath the row.\n */\n .agent-log-block {\n display: flex;\n flex-direction: column;\n }\n\n .agent-log-block .settings-toggle-row {\n border-bottom: none;\n padding-bottom: calc(var(--design-unit) * 1px);\n }\n\n .agent-log-compose {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 2px);\n margin-top: calc(var(--design-unit) * 2px);\n }\n\n .agent-log-note {\n width: 100%;\n }\n\n .agent-log-note::part(control) {\n width: 100%;\n box-sizing: border-box;\n font-size: 13px;\n line-height: 1.5;\n }\n\n .agent-log-compose-footer {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: calc(var(--design-unit) * 3px);\n }\n\n /* Counter / validation / failure line. Hint-coloured until it carries an error. */\n .agent-log-compose-hint {\n font-size: 12px;\n color: var(--neutral-foreground-hint);\n min-width: 0;\n }\n\n /*\n * Failure state without leaning on --error-color: rapid's fixed brand red is 3.02:1 on a\n * light surface, under AA for 12px text, and the failure line is the one that most needs\n * reading. The contrast-adaptive foreground plus weight carries it; the text itself also\n * changes, so colour was never the only channel.\n */\n .agent-log-compose-hint.is-error {\n color: var(--neutral-foreground-rest);\n font-weight: 600;\n }\n\n /* Screen-reader-only live region for submission outcomes (same recipe as main.styles). */\n .visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n }\n\n /*\n * Inline spinner shown in the agent-log buttons (Download / Send) while the log\n * builds (GENC-1351 §5.8) — the lifetime-stitch path is an async provider\n * round-trip. Sized to the button label and tinted with currentColor so it tracks\n * the button's text colour in every appearance / theme.\n */\n [part='download-button'] .download-spinner,\n [part='submit-log-button'] .download-spinner,\n [part='agent-log-send-button'] .download-spinner {\n display: inline-block;\n width: 12px;\n height: 12px;\n margin-right: calc(var(--design-unit) * 1px);\n vertical-align: -1px;\n border: 2px solid currentColor;\n border-right-color: transparent;\n border-radius: 50%;\n animation: download-spin 0.6s linear infinite;\n }\n\n @keyframes download-spin {\n to {\n transform: rotate(360deg);\n }\n }\n`",
|
|
27629
27817
|
"description": "Styles for the assistant settings modal (tabs, sections, toggles, cost summary)."
|
|
27630
27818
|
}
|
|
27631
27819
|
],
|
|
@@ -27691,6 +27879,11 @@
|
|
|
27691
27879
|
}
|
|
27692
27880
|
]
|
|
27693
27881
|
},
|
|
27882
|
+
{
|
|
27883
|
+
"kind": "variable",
|
|
27884
|
+
"name": "settingsVendorTemplate",
|
|
27885
|
+
"default": "html<FoundationAiAssistant>`\n ${when(\n (x) => x.settingsVendorPickerVisible,\n html<FoundationAiAssistant>`\n <fieldset\n class=\"settings-vendor-picker\"\n part=\"settings-vendor-picker\"\n ?disabled=${(x) => x.settingsVendorPickerDisabled}\n >\n <legend class=\"settings-vendor-legend\">AI vendor</legend>\n <div class=\"settings-vendor-cards\">\n ${repeat(\n (x) => x.settingsVendorOptions,\n html<VendorPickerOption, FoundationAiAssistant>`\n <label\n class=\"settings-vendor-card ${(o) => (o.checked ? 'is-selected' : '')}\"\n part=\"settings-vendor-card\"\n >\n <input\n type=\"radio\"\n name=\"settings-ai-vendor\"\n value=${(o) => o.vendor}\n :checked=${(o) => o.checked}\n @change=${(o, c) => c.parent.selectSettingsVendor(o.vendor)}\n />\n <span class=\"settings-vendor-card-label\">${(o) => o.label}</span>\n </label>\n `,\n )}\n </div>\n </fieldset>\n `,\n )}\n ${when(\n (x) => x.settingsVendorSelectedElsewhere,\n html<FoundationAiAssistant>`\n <p class=\"settings-vendor-elsewhere\" part=\"settings-vendor-elsewhere\">\n ${(x) => vendorElsewhereLine(x.settingsVendorSelectedElsewhere)}\n </p>\n `,\n )}\n`"
|
|
27886
|
+
},
|
|
27694
27887
|
{
|
|
27695
27888
|
"kind": "function",
|
|
27696
27889
|
"name": "SettingsModalTemplate",
|
|
@@ -27727,6 +27920,14 @@
|
|
|
27727
27920
|
"module": "src/components/settings-modal/settings-modal.template.ts"
|
|
27728
27921
|
}
|
|
27729
27922
|
},
|
|
27923
|
+
{
|
|
27924
|
+
"kind": "js",
|
|
27925
|
+
"name": "settingsVendorTemplate",
|
|
27926
|
+
"declaration": {
|
|
27927
|
+
"name": "settingsVendorTemplate",
|
|
27928
|
+
"module": "src/components/settings-modal/settings-modal.template.ts"
|
|
27929
|
+
}
|
|
27930
|
+
},
|
|
27730
27931
|
{
|
|
27731
27932
|
"kind": "js",
|
|
27732
27933
|
"name": "SettingsModalTemplate",
|