@genesislcap/ai-assistant 15.52.0 → 15.53.0
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.
|
@@ -1754,211 +1754,6 @@
|
|
|
1754
1754
|
}
|
|
1755
1755
|
]
|
|
1756
1756
|
},
|
|
1757
|
-
{
|
|
1758
|
-
"kind": "javascript-module",
|
|
1759
|
-
"path": "src/config/config.ts",
|
|
1760
|
-
"declarations": [
|
|
1761
|
-
{
|
|
1762
|
-
"kind": "function",
|
|
1763
|
-
"name": "defineAgent",
|
|
1764
|
-
"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```"
|
|
1765
|
-
}
|
|
1766
|
-
],
|
|
1767
|
-
"exports": [
|
|
1768
|
-
{
|
|
1769
|
-
"kind": "js",
|
|
1770
|
-
"name": "CachePolicy",
|
|
1771
|
-
"declaration": {
|
|
1772
|
-
"name": "CachePolicy",
|
|
1773
|
-
"module": "src/config/config.ts"
|
|
1774
|
-
}
|
|
1775
|
-
},
|
|
1776
|
-
{
|
|
1777
|
-
"kind": "js",
|
|
1778
|
-
"name": "ChatFallback",
|
|
1779
|
-
"declaration": {
|
|
1780
|
-
"name": "ChatFallback",
|
|
1781
|
-
"module": "src/config/config.ts"
|
|
1782
|
-
}
|
|
1783
|
-
},
|
|
1784
|
-
{
|
|
1785
|
-
"kind": "js",
|
|
1786
|
-
"name": "ChatInputDuringExecutionMode",
|
|
1787
|
-
"declaration": {
|
|
1788
|
-
"name": "ChatInputDuringExecutionMode",
|
|
1789
|
-
"module": "src/config/config.ts"
|
|
1790
|
-
}
|
|
1791
|
-
},
|
|
1792
|
-
{
|
|
1793
|
-
"kind": "js",
|
|
1794
|
-
"name": "ChatThinkingPolicy",
|
|
1795
|
-
"declaration": {
|
|
1796
|
-
"name": "ChatThinkingPolicy",
|
|
1797
|
-
"module": "src/config/config.ts"
|
|
1798
|
-
}
|
|
1799
|
-
},
|
|
1800
|
-
{
|
|
1801
|
-
"kind": "js",
|
|
1802
|
-
"name": "ChatToolChoice",
|
|
1803
|
-
"declaration": {
|
|
1804
|
-
"name": "ChatToolChoice",
|
|
1805
|
-
"module": "src/config/config.ts"
|
|
1806
|
-
}
|
|
1807
|
-
},
|
|
1808
|
-
{
|
|
1809
|
-
"kind": "js",
|
|
1810
|
-
"name": "defineAgent",
|
|
1811
|
-
"declaration": {
|
|
1812
|
-
"name": "defineAgent",
|
|
1813
|
-
"module": "src/config/config.ts"
|
|
1814
|
-
}
|
|
1815
|
-
}
|
|
1816
|
-
]
|
|
1817
|
-
},
|
|
1818
|
-
{
|
|
1819
|
-
"kind": "javascript-module",
|
|
1820
|
-
"path": "src/config/define-stateful-agent.ts",
|
|
1821
|
-
"declarations": [
|
|
1822
|
-
{
|
|
1823
|
-
"kind": "function",
|
|
1824
|
-
"name": "restoreMachine",
|
|
1825
|
-
"return": {
|
|
1826
|
-
"type": {
|
|
1827
|
-
"text": "void"
|
|
1828
|
-
}
|
|
1829
|
-
},
|
|
1830
|
-
"parameters": [
|
|
1831
|
-
{
|
|
1832
|
-
"name": "machine",
|
|
1833
|
-
"type": {
|
|
1834
|
-
"text": "{ stop: () => void; start: (options?: { state?: unknown }) => void }"
|
|
1835
|
-
},
|
|
1836
|
-
"description": "the machine to restore (already constructed/started)."
|
|
1837
|
-
},
|
|
1838
|
-
{
|
|
1839
|
-
"name": "restored",
|
|
1840
|
-
"type": {
|
|
1841
|
-
"text": "unknown"
|
|
1842
|
-
},
|
|
1843
|
-
"description": "the agent's serialized image (`ctx.restored` in `init`)."
|
|
1844
|
-
},
|
|
1845
|
-
{
|
|
1846
|
-
"name": "key",
|
|
1847
|
-
"default": "'machine'",
|
|
1848
|
-
"description": "the property the machine occupies in the snapshot; defaults to\n`'machine'` to match the conventional `{ machine }` state bag."
|
|
1849
|
-
}
|
|
1850
|
-
],
|
|
1851
|
-
"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."
|
|
1852
|
-
},
|
|
1853
|
-
{
|
|
1854
|
-
"kind": "function",
|
|
1855
|
-
"name": "defineStatefulAgent",
|
|
1856
|
-
"return": {
|
|
1857
|
-
"type": {
|
|
1858
|
-
"text": "AgentConfig"
|
|
1859
|
-
}
|
|
1860
|
-
},
|
|
1861
|
-
"parameters": [
|
|
1862
|
-
{
|
|
1863
|
-
"name": "opts",
|
|
1864
|
-
"type": {
|
|
1865
|
-
"text": "StatefulAgentInit<S>"
|
|
1866
|
-
}
|
|
1867
|
-
}
|
|
1868
|
-
],
|
|
1869
|
-
"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."
|
|
1870
|
-
}
|
|
1871
|
-
],
|
|
1872
|
-
"exports": [
|
|
1873
|
-
{
|
|
1874
|
-
"kind": "js",
|
|
1875
|
-
"name": "restoreMachine",
|
|
1876
|
-
"declaration": {
|
|
1877
|
-
"name": "restoreMachine",
|
|
1878
|
-
"module": "src/config/define-stateful-agent.ts"
|
|
1879
|
-
}
|
|
1880
|
-
},
|
|
1881
|
-
{
|
|
1882
|
-
"kind": "js",
|
|
1883
|
-
"name": "defineStatefulAgent",
|
|
1884
|
-
"declaration": {
|
|
1885
|
-
"name": "defineStatefulAgent",
|
|
1886
|
-
"module": "src/config/define-stateful-agent.ts"
|
|
1887
|
-
}
|
|
1888
|
-
}
|
|
1889
|
-
]
|
|
1890
|
-
},
|
|
1891
|
-
{
|
|
1892
|
-
"kind": "javascript-module",
|
|
1893
|
-
"path": "src/config/fallback-agents.ts",
|
|
1894
|
-
"declarations": [
|
|
1895
|
-
{
|
|
1896
|
-
"kind": "variable",
|
|
1897
|
-
"name": "friendlyFallbackAgent",
|
|
1898
|
-
"type": {
|
|
1899
|
-
"text": "FallbackAgentConfig"
|
|
1900
|
-
},
|
|
1901
|
-
"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}",
|
|
1902
|
-
"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."
|
|
1903
|
-
},
|
|
1904
|
-
{
|
|
1905
|
-
"kind": "variable",
|
|
1906
|
-
"name": "strictFallbackAgent",
|
|
1907
|
-
"type": {
|
|
1908
|
-
"text": "FallbackAgentConfig"
|
|
1909
|
-
},
|
|
1910
|
-
"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}",
|
|
1911
|
-
"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."
|
|
1912
|
-
}
|
|
1913
|
-
],
|
|
1914
|
-
"exports": [
|
|
1915
|
-
{
|
|
1916
|
-
"kind": "js",
|
|
1917
|
-
"name": "friendlyFallbackAgent",
|
|
1918
|
-
"declaration": {
|
|
1919
|
-
"name": "friendlyFallbackAgent",
|
|
1920
|
-
"module": "src/config/fallback-agents.ts"
|
|
1921
|
-
}
|
|
1922
|
-
},
|
|
1923
|
-
{
|
|
1924
|
-
"kind": "js",
|
|
1925
|
-
"name": "strictFallbackAgent",
|
|
1926
|
-
"declaration": {
|
|
1927
|
-
"name": "strictFallbackAgent",
|
|
1928
|
-
"module": "src/config/fallback-agents.ts"
|
|
1929
|
-
}
|
|
1930
|
-
}
|
|
1931
|
-
]
|
|
1932
|
-
},
|
|
1933
|
-
{
|
|
1934
|
-
"kind": "javascript-module",
|
|
1935
|
-
"path": "src/config/index.ts",
|
|
1936
|
-
"declarations": [],
|
|
1937
|
-
"exports": [
|
|
1938
|
-
{
|
|
1939
|
-
"kind": "js",
|
|
1940
|
-
"name": "*",
|
|
1941
|
-
"declaration": {
|
|
1942
|
-
"name": "*",
|
|
1943
|
-
"package": "./config"
|
|
1944
|
-
}
|
|
1945
|
-
},
|
|
1946
|
-
{
|
|
1947
|
-
"kind": "js",
|
|
1948
|
-
"name": "*",
|
|
1949
|
-
"declaration": {
|
|
1950
|
-
"name": "*",
|
|
1951
|
-
"package": "./fallback-agents"
|
|
1952
|
-
}
|
|
1953
|
-
}
|
|
1954
|
-
]
|
|
1955
|
-
},
|
|
1956
|
-
{
|
|
1957
|
-
"kind": "javascript-module",
|
|
1958
|
-
"path": "src/config/validate-providers.ts",
|
|
1959
|
-
"declarations": [],
|
|
1960
|
-
"exports": []
|
|
1961
|
-
},
|
|
1962
1757
|
{
|
|
1963
1758
|
"kind": "javascript-module",
|
|
1964
1759
|
"path": "src/genesis/calendar.ts",
|
|
@@ -3144,52 +2939,257 @@
|
|
|
3144
2939
|
},
|
|
3145
2940
|
{
|
|
3146
2941
|
"kind": "javascript-module",
|
|
3147
|
-
"path": "src/
|
|
3148
|
-
"declarations": [
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
"exports": []
|
|
3156
|
-
},
|
|
3157
|
-
{
|
|
3158
|
-
"kind": "javascript-module",
|
|
3159
|
-
"path": "src/main/composer-menu-controller.ts",
|
|
3160
|
-
"declarations": [],
|
|
3161
|
-
"exports": []
|
|
3162
|
-
},
|
|
3163
|
-
{
|
|
3164
|
-
"kind": "javascript-module",
|
|
3165
|
-
"path": "src/main/composer-resize-controller.ts",
|
|
3166
|
-
"declarations": [],
|
|
3167
|
-
"exports": []
|
|
3168
|
-
},
|
|
3169
|
-
{
|
|
3170
|
-
"kind": "javascript-module",
|
|
3171
|
-
"path": "src/main/context-gate-controller.ts",
|
|
3172
|
-
"declarations": [],
|
|
3173
|
-
"exports": []
|
|
3174
|
-
},
|
|
3175
|
-
{
|
|
3176
|
-
"kind": "javascript-module",
|
|
3177
|
-
"path": "src/main/cost-ledger-controller.ts",
|
|
3178
|
-
"declarations": [],
|
|
3179
|
-
"exports": []
|
|
3180
|
-
},
|
|
3181
|
-
{
|
|
3182
|
-
"kind": "javascript-module",
|
|
3183
|
-
"path": "src/main/index.ts",
|
|
3184
|
-
"declarations": [],
|
|
2942
|
+
"path": "src/config/config.ts",
|
|
2943
|
+
"declarations": [
|
|
2944
|
+
{
|
|
2945
|
+
"kind": "function",
|
|
2946
|
+
"name": "defineAgent",
|
|
2947
|
+
"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```"
|
|
2948
|
+
}
|
|
2949
|
+
],
|
|
3185
2950
|
"exports": [
|
|
3186
2951
|
{
|
|
3187
2952
|
"kind": "js",
|
|
3188
|
-
"name": "
|
|
2953
|
+
"name": "CachePolicy",
|
|
3189
2954
|
"declaration": {
|
|
3190
|
-
"name": "
|
|
3191
|
-
"
|
|
3192
|
-
}
|
|
2955
|
+
"name": "CachePolicy",
|
|
2956
|
+
"module": "src/config/config.ts"
|
|
2957
|
+
}
|
|
2958
|
+
},
|
|
2959
|
+
{
|
|
2960
|
+
"kind": "js",
|
|
2961
|
+
"name": "ChatFallback",
|
|
2962
|
+
"declaration": {
|
|
2963
|
+
"name": "ChatFallback",
|
|
2964
|
+
"module": "src/config/config.ts"
|
|
2965
|
+
}
|
|
2966
|
+
},
|
|
2967
|
+
{
|
|
2968
|
+
"kind": "js",
|
|
2969
|
+
"name": "ChatInputDuringExecutionMode",
|
|
2970
|
+
"declaration": {
|
|
2971
|
+
"name": "ChatInputDuringExecutionMode",
|
|
2972
|
+
"module": "src/config/config.ts"
|
|
2973
|
+
}
|
|
2974
|
+
},
|
|
2975
|
+
{
|
|
2976
|
+
"kind": "js",
|
|
2977
|
+
"name": "ChatThinkingPolicy",
|
|
2978
|
+
"declaration": {
|
|
2979
|
+
"name": "ChatThinkingPolicy",
|
|
2980
|
+
"module": "src/config/config.ts"
|
|
2981
|
+
}
|
|
2982
|
+
},
|
|
2983
|
+
{
|
|
2984
|
+
"kind": "js",
|
|
2985
|
+
"name": "ChatToolChoice",
|
|
2986
|
+
"declaration": {
|
|
2987
|
+
"name": "ChatToolChoice",
|
|
2988
|
+
"module": "src/config/config.ts"
|
|
2989
|
+
}
|
|
2990
|
+
},
|
|
2991
|
+
{
|
|
2992
|
+
"kind": "js",
|
|
2993
|
+
"name": "defineAgent",
|
|
2994
|
+
"declaration": {
|
|
2995
|
+
"name": "defineAgent",
|
|
2996
|
+
"module": "src/config/config.ts"
|
|
2997
|
+
}
|
|
2998
|
+
}
|
|
2999
|
+
]
|
|
3000
|
+
},
|
|
3001
|
+
{
|
|
3002
|
+
"kind": "javascript-module",
|
|
3003
|
+
"path": "src/config/define-stateful-agent.ts",
|
|
3004
|
+
"declarations": [
|
|
3005
|
+
{
|
|
3006
|
+
"kind": "function",
|
|
3007
|
+
"name": "restoreMachine",
|
|
3008
|
+
"return": {
|
|
3009
|
+
"type": {
|
|
3010
|
+
"text": "void"
|
|
3011
|
+
}
|
|
3012
|
+
},
|
|
3013
|
+
"parameters": [
|
|
3014
|
+
{
|
|
3015
|
+
"name": "machine",
|
|
3016
|
+
"type": {
|
|
3017
|
+
"text": "{ stop: () => void; start: (options?: { state?: unknown }) => void }"
|
|
3018
|
+
},
|
|
3019
|
+
"description": "the machine to restore (already constructed/started)."
|
|
3020
|
+
},
|
|
3021
|
+
{
|
|
3022
|
+
"name": "restored",
|
|
3023
|
+
"type": {
|
|
3024
|
+
"text": "unknown"
|
|
3025
|
+
},
|
|
3026
|
+
"description": "the agent's serialized image (`ctx.restored` in `init`)."
|
|
3027
|
+
},
|
|
3028
|
+
{
|
|
3029
|
+
"name": "key",
|
|
3030
|
+
"default": "'machine'",
|
|
3031
|
+
"description": "the property the machine occupies in the snapshot; defaults to\n`'machine'` to match the conventional `{ machine }` state bag."
|
|
3032
|
+
}
|
|
3033
|
+
],
|
|
3034
|
+
"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."
|
|
3035
|
+
},
|
|
3036
|
+
{
|
|
3037
|
+
"kind": "function",
|
|
3038
|
+
"name": "defineStatefulAgent",
|
|
3039
|
+
"return": {
|
|
3040
|
+
"type": {
|
|
3041
|
+
"text": "AgentConfig"
|
|
3042
|
+
}
|
|
3043
|
+
},
|
|
3044
|
+
"parameters": [
|
|
3045
|
+
{
|
|
3046
|
+
"name": "opts",
|
|
3047
|
+
"type": {
|
|
3048
|
+
"text": "StatefulAgentInit<S>"
|
|
3049
|
+
}
|
|
3050
|
+
}
|
|
3051
|
+
],
|
|
3052
|
+
"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."
|
|
3053
|
+
}
|
|
3054
|
+
],
|
|
3055
|
+
"exports": [
|
|
3056
|
+
{
|
|
3057
|
+
"kind": "js",
|
|
3058
|
+
"name": "restoreMachine",
|
|
3059
|
+
"declaration": {
|
|
3060
|
+
"name": "restoreMachine",
|
|
3061
|
+
"module": "src/config/define-stateful-agent.ts"
|
|
3062
|
+
}
|
|
3063
|
+
},
|
|
3064
|
+
{
|
|
3065
|
+
"kind": "js",
|
|
3066
|
+
"name": "defineStatefulAgent",
|
|
3067
|
+
"declaration": {
|
|
3068
|
+
"name": "defineStatefulAgent",
|
|
3069
|
+
"module": "src/config/define-stateful-agent.ts"
|
|
3070
|
+
}
|
|
3071
|
+
}
|
|
3072
|
+
]
|
|
3073
|
+
},
|
|
3074
|
+
{
|
|
3075
|
+
"kind": "javascript-module",
|
|
3076
|
+
"path": "src/config/fallback-agents.ts",
|
|
3077
|
+
"declarations": [
|
|
3078
|
+
{
|
|
3079
|
+
"kind": "variable",
|
|
3080
|
+
"name": "friendlyFallbackAgent",
|
|
3081
|
+
"type": {
|
|
3082
|
+
"text": "FallbackAgentConfig"
|
|
3083
|
+
},
|
|
3084
|
+
"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}",
|
|
3085
|
+
"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."
|
|
3086
|
+
},
|
|
3087
|
+
{
|
|
3088
|
+
"kind": "variable",
|
|
3089
|
+
"name": "strictFallbackAgent",
|
|
3090
|
+
"type": {
|
|
3091
|
+
"text": "FallbackAgentConfig"
|
|
3092
|
+
},
|
|
3093
|
+
"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}",
|
|
3094
|
+
"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."
|
|
3095
|
+
}
|
|
3096
|
+
],
|
|
3097
|
+
"exports": [
|
|
3098
|
+
{
|
|
3099
|
+
"kind": "js",
|
|
3100
|
+
"name": "friendlyFallbackAgent",
|
|
3101
|
+
"declaration": {
|
|
3102
|
+
"name": "friendlyFallbackAgent",
|
|
3103
|
+
"module": "src/config/fallback-agents.ts"
|
|
3104
|
+
}
|
|
3105
|
+
},
|
|
3106
|
+
{
|
|
3107
|
+
"kind": "js",
|
|
3108
|
+
"name": "strictFallbackAgent",
|
|
3109
|
+
"declaration": {
|
|
3110
|
+
"name": "strictFallbackAgent",
|
|
3111
|
+
"module": "src/config/fallback-agents.ts"
|
|
3112
|
+
}
|
|
3113
|
+
}
|
|
3114
|
+
]
|
|
3115
|
+
},
|
|
3116
|
+
{
|
|
3117
|
+
"kind": "javascript-module",
|
|
3118
|
+
"path": "src/config/index.ts",
|
|
3119
|
+
"declarations": [],
|
|
3120
|
+
"exports": [
|
|
3121
|
+
{
|
|
3122
|
+
"kind": "js",
|
|
3123
|
+
"name": "*",
|
|
3124
|
+
"declaration": {
|
|
3125
|
+
"name": "*",
|
|
3126
|
+
"package": "./config"
|
|
3127
|
+
}
|
|
3128
|
+
},
|
|
3129
|
+
{
|
|
3130
|
+
"kind": "js",
|
|
3131
|
+
"name": "*",
|
|
3132
|
+
"declaration": {
|
|
3133
|
+
"name": "*",
|
|
3134
|
+
"package": "./fallback-agents"
|
|
3135
|
+
}
|
|
3136
|
+
}
|
|
3137
|
+
]
|
|
3138
|
+
},
|
|
3139
|
+
{
|
|
3140
|
+
"kind": "javascript-module",
|
|
3141
|
+
"path": "src/config/validate-providers.ts",
|
|
3142
|
+
"declarations": [],
|
|
3143
|
+
"exports": []
|
|
3144
|
+
},
|
|
3145
|
+
{
|
|
3146
|
+
"kind": "javascript-module",
|
|
3147
|
+
"path": "src/main/attachment-controller.ts",
|
|
3148
|
+
"declarations": [],
|
|
3149
|
+
"exports": []
|
|
3150
|
+
},
|
|
3151
|
+
{
|
|
3152
|
+
"kind": "javascript-module",
|
|
3153
|
+
"path": "src/main/budget-controller.ts",
|
|
3154
|
+
"declarations": [],
|
|
3155
|
+
"exports": []
|
|
3156
|
+
},
|
|
3157
|
+
{
|
|
3158
|
+
"kind": "javascript-module",
|
|
3159
|
+
"path": "src/main/composer-menu-controller.ts",
|
|
3160
|
+
"declarations": [],
|
|
3161
|
+
"exports": []
|
|
3162
|
+
},
|
|
3163
|
+
{
|
|
3164
|
+
"kind": "javascript-module",
|
|
3165
|
+
"path": "src/main/composer-resize-controller.ts",
|
|
3166
|
+
"declarations": [],
|
|
3167
|
+
"exports": []
|
|
3168
|
+
},
|
|
3169
|
+
{
|
|
3170
|
+
"kind": "javascript-module",
|
|
3171
|
+
"path": "src/main/context-gate-controller.ts",
|
|
3172
|
+
"declarations": [],
|
|
3173
|
+
"exports": []
|
|
3174
|
+
},
|
|
3175
|
+
{
|
|
3176
|
+
"kind": "javascript-module",
|
|
3177
|
+
"path": "src/main/cost-ledger-controller.ts",
|
|
3178
|
+
"declarations": [],
|
|
3179
|
+
"exports": []
|
|
3180
|
+
},
|
|
3181
|
+
{
|
|
3182
|
+
"kind": "javascript-module",
|
|
3183
|
+
"path": "src/main/index.ts",
|
|
3184
|
+
"declarations": [],
|
|
3185
|
+
"exports": [
|
|
3186
|
+
{
|
|
3187
|
+
"kind": "js",
|
|
3188
|
+
"name": "*",
|
|
3189
|
+
"declaration": {
|
|
3190
|
+
"name": "*",
|
|
3191
|
+
"package": "./main.template"
|
|
3192
|
+
}
|
|
3193
3193
|
},
|
|
3194
3194
|
{
|
|
3195
3195
|
"kind": "js",
|
|
@@ -6711,318 +6711,340 @@
|
|
|
6711
6711
|
},
|
|
6712
6712
|
{
|
|
6713
6713
|
"kind": "javascript-module",
|
|
6714
|
-
"path": "src/
|
|
6714
|
+
"path": "src/provider/ai-provider-switcher.ts",
|
|
6715
6715
|
"declarations": [
|
|
6716
|
-
{
|
|
6717
|
-
"kind": "function",
|
|
6718
|
-
"name": "createDefaultSessionState",
|
|
6719
|
-
"return": {
|
|
6720
|
-
"type": {
|
|
6721
|
-
"text": "AiAssistantSessionState"
|
|
6722
|
-
}
|
|
6723
|
-
},
|
|
6724
|
-
"description": "Build a fresh default session state. A factory (not just a shared const) so\neach call returns independent collections — `resetSession` can hand back a\nclean slate without aliasing the initial state's arrays."
|
|
6725
|
-
},
|
|
6726
6716
|
{
|
|
6727
6717
|
"kind": "variable",
|
|
6728
|
-
"name": "
|
|
6729
|
-
"
|
|
6730
|
-
"text": "AiAssistantSessionState"
|
|
6731
|
-
}
|
|
6732
|
-
},
|
|
6733
|
-
{
|
|
6734
|
-
"kind": "variable",
|
|
6735
|
-
"name": "aiAssistantSlice"
|
|
6718
|
+
"name": "AIProviderSwitcher",
|
|
6719
|
+
"description": "The DI token for the (AIProviderSwitcher:interface). Resolves a noop until the app\nregisters one."
|
|
6736
6720
|
}
|
|
6737
6721
|
],
|
|
6738
6722
|
"exports": [
|
|
6739
6723
|
{
|
|
6740
6724
|
"kind": "js",
|
|
6741
|
-
"name": "
|
|
6725
|
+
"name": "AIProviderSwitcher",
|
|
6742
6726
|
"declaration": {
|
|
6743
|
-
"name": "
|
|
6744
|
-
"module": "src/
|
|
6727
|
+
"name": "AIProviderSwitcher",
|
|
6728
|
+
"module": "src/provider/ai-provider-switcher.ts"
|
|
6745
6729
|
}
|
|
6746
|
-
}
|
|
6730
|
+
}
|
|
6731
|
+
]
|
|
6732
|
+
},
|
|
6733
|
+
{
|
|
6734
|
+
"kind": "javascript-module",
|
|
6735
|
+
"path": "src/provider/assistant-app-settings.ts",
|
|
6736
|
+
"declarations": [
|
|
6747
6737
|
{
|
|
6748
|
-
"kind": "
|
|
6749
|
-
"name": "
|
|
6750
|
-
"
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
},
|
|
6738
|
+
"kind": "variable",
|
|
6739
|
+
"name": "AssistantAppSettingsProvider",
|
|
6740
|
+
"description": "The DI token for the (AssistantAppSettingsProvider:interface). Resolves a noop\nuntil the host registers one."
|
|
6741
|
+
}
|
|
6742
|
+
],
|
|
6743
|
+
"exports": [
|
|
6755
6744
|
{
|
|
6756
6745
|
"kind": "js",
|
|
6757
|
-
"name": "
|
|
6746
|
+
"name": "AssistantAppSettingsProvider",
|
|
6758
6747
|
"declaration": {
|
|
6759
|
-
"name": "
|
|
6760
|
-
"module": "src/
|
|
6748
|
+
"name": "AssistantAppSettingsProvider",
|
|
6749
|
+
"module": "src/provider/assistant-app-settings.ts"
|
|
6761
6750
|
}
|
|
6762
6751
|
}
|
|
6763
6752
|
]
|
|
6764
6753
|
},
|
|
6765
6754
|
{
|
|
6766
6755
|
"kind": "javascript-module",
|
|
6767
|
-
"path": "src/
|
|
6756
|
+
"path": "src/provider/tiered-provider-switcher.ts",
|
|
6768
6757
|
"declarations": [
|
|
6769
6758
|
{
|
|
6770
|
-
"kind": "
|
|
6771
|
-
"
|
|
6772
|
-
"
|
|
6773
|
-
|
|
6774
|
-
},
|
|
6775
|
-
"default": "{\n 'turn.error': 'high',\n 'tool.failed': 'high',\n 'subagent.failed': 'high',\n 'file.read-failed': 'high',\n 'suggestions.failed': 'high',\n 'context.threshold-crossed': 'high',\n 'context.compacted': 'high',\n 'persistence.restore-orphan': 'high',\n // A save that did not land is silent data loss in progress: the transcript on screen\n // is no longer backed by the store, and every later turn widens the gap. GENC-1511.\n 'persistence.save-failed': 'high',\n\n 'assistant.connected': 'normal',\n 'assistant.disconnected': 'normal',\n 'assistant.popout': 'normal',\n 'assistant.popin': 'normal',\n 'driver.created': 'normal',\n 'state.changed': 'normal',\n 'turn.start': 'normal',\n 'turn.end': 'normal',\n 'turn.retry': 'normal',\n 'tool.unresolved': 'normal',\n 'subagent.started': 'normal',\n 'subagent.completed': 'normal',\n // One per routing decision, with what the classifier answered and what the call cost. Same\n // level as the handoff it produces: you read them together to follow how a turn was routed.\n 'routing.decided': 'normal',\n 'agent.handoff': 'normal',\n 'agent.pinned': 'normal',\n 'agent.unpinned': 'normal',\n 'provider.selected': 'normal',\n 'interaction.requested': 'normal',\n 'interaction.resolved': 'normal',\n // Bookkeeping about an already-finished turn; interesting when reconciling a session total.\n 'interaction.external-cost': 'normal',\n // Spend that was billed but could NOT be recorded (the message was trimmed/condensed away, or\n // the value was not real spend). 'high': it is the one way the session total goes quietly\n // wrong, so it must stand out when reconciling.\n 'interaction.external-cost-dropped': 'high',\n // What came of an answer, recorded by the tool that asked (see recordInteractionOutcome).\n 'interaction.outcome': 'normal',\n // An outcome that could not be recorded: the widget goes on showing only the answer.\n 'interaction.outcome-dropped': 'high',\n 'external-diagnostics.folded': 'normal',\n 'session.cleared': 'normal',\n 'session.switched': 'low',\n 'session.switch-deferred': 'low',\n 'persistence.restored': 'normal',\n 'persistence.suppressed': 'normal',\n 'persistence.not-resumable': 'normal',\n\n 'driver.wired': 'low',\n 'driver.unwired': 'low',\n 'context.updated': 'low',\n 'context.condensed': 'low',\n 'panel.toggled': 'low',\n 'persistence.toggled': 'low',\n 'persistence.saved': 'low',\n 'attachment.added': 'low',\n}",
|
|
6776
|
-
"description": "Importance is intrinsic to the event *type*, not the instance, so it's\ndefined once here and stamped automatically by recordMetaEvent — call\nsites never pass it. The `Record` is exhaustive: adding a `MetaEventType`\nwithout a level here is a compile error.\n\n- `high` — failures and hard limits you almost always want to see.\n- `normal` — meaningful session flow you read to follow what happened.\n- `low` — frequent UI / bookkeeping noise, usually safe to skip."
|
|
6777
|
-
},
|
|
6778
|
-
{
|
|
6779
|
-
"kind": "function",
|
|
6780
|
-
"name": "recordMetaEvent",
|
|
6781
|
-
"return": {
|
|
6782
|
-
"type": {
|
|
6783
|
-
"text": "void"
|
|
6784
|
-
}
|
|
6785
|
-
},
|
|
6786
|
-
"parameters": [
|
|
6759
|
+
"kind": "class",
|
|
6760
|
+
"description": "Which cloud vendor backs the tier-shaped provider registry, plus the means to move it at\nruntime (GENC-1610).",
|
|
6761
|
+
"name": "TieredAIProviderSwitcher",
|
|
6762
|
+
"members": [
|
|
6787
6763
|
{
|
|
6788
|
-
"
|
|
6764
|
+
"kind": "field",
|
|
6765
|
+
"name": "vendors",
|
|
6789
6766
|
"type": {
|
|
6790
|
-
"text": "
|
|
6791
|
-
}
|
|
6767
|
+
"text": "readonly AITierVendor[]"
|
|
6768
|
+
},
|
|
6769
|
+
"readonly": true
|
|
6792
6770
|
},
|
|
6793
6771
|
{
|
|
6794
|
-
"
|
|
6772
|
+
"kind": "field",
|
|
6773
|
+
"name": "options",
|
|
6795
6774
|
"type": {
|
|
6796
|
-
"text": "
|
|
6797
|
-
}
|
|
6775
|
+
"text": "TieredAIProviderSwitcherOptions"
|
|
6776
|
+
},
|
|
6777
|
+
"privacy": "private",
|
|
6778
|
+
"readonly": true,
|
|
6779
|
+
"default": "options"
|
|
6798
6780
|
},
|
|
6799
6781
|
{
|
|
6800
|
-
"
|
|
6801
|
-
"
|
|
6782
|
+
"kind": "field",
|
|
6783
|
+
"name": "defaultTier",
|
|
6802
6784
|
"type": {
|
|
6803
|
-
"text": "
|
|
6804
|
-
}
|
|
6805
|
-
|
|
6806
|
-
|
|
6807
|
-
|
|
6808
|
-
},
|
|
6809
|
-
{
|
|
6810
|
-
"kind": "function",
|
|
6811
|
-
"name": "recordTurnError",
|
|
6812
|
-
"return": {
|
|
6813
|
-
"type": {
|
|
6814
|
-
"text": "void"
|
|
6815
|
-
}
|
|
6816
|
-
},
|
|
6817
|
-
"parameters": [
|
|
6785
|
+
"text": "AITierId"
|
|
6786
|
+
},
|
|
6787
|
+
"privacy": "private",
|
|
6788
|
+
"readonly": true
|
|
6789
|
+
},
|
|
6818
6790
|
{
|
|
6819
|
-
"
|
|
6791
|
+
"kind": "field",
|
|
6792
|
+
"name": "registry",
|
|
6820
6793
|
"type": {
|
|
6821
|
-
"text": "
|
|
6822
|
-
}
|
|
6794
|
+
"text": "MutableAIProviderRegistry"
|
|
6795
|
+
},
|
|
6796
|
+
"privacy": "private",
|
|
6797
|
+
"readonly": true
|
|
6823
6798
|
},
|
|
6824
6799
|
{
|
|
6825
|
-
"
|
|
6826
|
-
"
|
|
6827
|
-
|
|
6828
|
-
|
|
6800
|
+
"kind": "field",
|
|
6801
|
+
"name": "listeners",
|
|
6802
|
+
"privacy": "private",
|
|
6803
|
+
"readonly": true,
|
|
6804
|
+
"default": "new Set<(vendor: AITierVendor) => void>()"
|
|
6829
6805
|
},
|
|
6830
6806
|
{
|
|
6831
|
-
"
|
|
6832
|
-
"
|
|
6807
|
+
"kind": "field",
|
|
6808
|
+
"name": "_vendor",
|
|
6833
6809
|
"type": {
|
|
6834
|
-
"text": "
|
|
6835
|
-
}
|
|
6836
|
-
|
|
6837
|
-
|
|
6838
|
-
"description": "Record a turn-ending failure (`turn.error`, importance `high`). The `reason`\nis typed so the high-importance triage surface stays consistent; pass any\ndiagnostic specifics (attempt counts, offending tool names, etc.) in `detail`."
|
|
6839
|
-
},
|
|
6840
|
-
{
|
|
6841
|
-
"kind": "function",
|
|
6842
|
-
"name": "recordTurnRetry",
|
|
6843
|
-
"return": {
|
|
6844
|
-
"type": {
|
|
6845
|
-
"text": "void"
|
|
6846
|
-
}
|
|
6847
|
-
},
|
|
6848
|
-
"parameters": [
|
|
6810
|
+
"text": "AITierVendor"
|
|
6811
|
+
},
|
|
6812
|
+
"privacy": "private"
|
|
6813
|
+
},
|
|
6849
6814
|
{
|
|
6850
|
-
"
|
|
6815
|
+
"kind": "field",
|
|
6816
|
+
"name": "vendor",
|
|
6851
6817
|
"type": {
|
|
6852
|
-
"text": "
|
|
6853
|
-
}
|
|
6818
|
+
"text": "AITierVendor"
|
|
6819
|
+
},
|
|
6820
|
+
"readonly": true
|
|
6854
6821
|
},
|
|
6855
6822
|
{
|
|
6856
|
-
"
|
|
6857
|
-
"
|
|
6858
|
-
|
|
6859
|
-
|
|
6823
|
+
"kind": "method",
|
|
6824
|
+
"name": "switchTo",
|
|
6825
|
+
"return": {
|
|
6826
|
+
"type": {
|
|
6827
|
+
"text": "void"
|
|
6828
|
+
}
|
|
6829
|
+
},
|
|
6830
|
+
"parameters": [
|
|
6831
|
+
{
|
|
6832
|
+
"name": "vendor",
|
|
6833
|
+
"type": {
|
|
6834
|
+
"text": "string"
|
|
6835
|
+
}
|
|
6836
|
+
}
|
|
6837
|
+
],
|
|
6838
|
+
"description": "A user-driven switch: move the registry, then tell the app so it can persist the choice.\nAn unknown vendor is ignored."
|
|
6860
6839
|
},
|
|
6861
6840
|
{
|
|
6862
|
-
"
|
|
6863
|
-
"
|
|
6864
|
-
"
|
|
6865
|
-
"
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
"parameters": [
|
|
6841
|
+
"kind": "method",
|
|
6842
|
+
"name": "adoptPersistedVendor",
|
|
6843
|
+
"return": {
|
|
6844
|
+
"type": {
|
|
6845
|
+
"text": "void"
|
|
6846
|
+
}
|
|
6847
|
+
},
|
|
6848
|
+
"parameters": [
|
|
6849
|
+
{
|
|
6850
|
+
"name": "vendor",
|
|
6851
|
+
"type": {
|
|
6852
|
+
"text": "string"
|
|
6853
|
+
}
|
|
6854
|
+
}
|
|
6855
|
+
],
|
|
6856
|
+
"description": "Adopt a vendor the app read back from its own store — the same registry move as\nTieredAIProviderSwitcher.switchTo, without the `onSwitch` callback, because this\nvalue came FROM the store and writing it back would be a pointless round-trip on load.\n\nExists because registration has to stay synchronous: an element that connects before the\ntoken is registered caches the platform's no-op fallback, so an app cannot await its\nstored preference before constructing this. It boots on `initialVendor` and adopts the\nstored one a moment later, through a registry that is mutable and held by reference."
|
|
6857
|
+
},
|
|
6880
6858
|
{
|
|
6881
|
-
"
|
|
6882
|
-
"
|
|
6883
|
-
|
|
6884
|
-
|
|
6859
|
+
"kind": "method",
|
|
6860
|
+
"name": "subscribe",
|
|
6861
|
+
"return": {
|
|
6862
|
+
"type": {
|
|
6863
|
+
"text": "() => void"
|
|
6864
|
+
}
|
|
6865
|
+
},
|
|
6866
|
+
"parameters": [
|
|
6867
|
+
{
|
|
6868
|
+
"name": "listener",
|
|
6869
|
+
"type": {
|
|
6870
|
+
"text": "(vendor: string) => void"
|
|
6871
|
+
}
|
|
6872
|
+
}
|
|
6873
|
+
]
|
|
6874
|
+
},
|
|
6875
|
+
{
|
|
6876
|
+
"kind": "method",
|
|
6877
|
+
"name": "apply",
|
|
6878
|
+
"privacy": "private",
|
|
6879
|
+
"return": {
|
|
6880
|
+
"type": {
|
|
6881
|
+
"text": "void"
|
|
6882
|
+
}
|
|
6883
|
+
},
|
|
6884
|
+
"parameters": [
|
|
6885
|
+
{
|
|
6886
|
+
"name": "vendor",
|
|
6887
|
+
"type": {
|
|
6888
|
+
"text": "AITierVendor"
|
|
6889
|
+
}
|
|
6890
|
+
}
|
|
6891
|
+
],
|
|
6892
|
+
"description": "The registry move both entry points share, and nothing else."
|
|
6893
|
+
},
|
|
6894
|
+
{
|
|
6895
|
+
"kind": "method",
|
|
6896
|
+
"name": "build",
|
|
6897
|
+
"privacy": "private",
|
|
6898
|
+
"return": {
|
|
6899
|
+
"type": {
|
|
6900
|
+
"text": "Record<string, AIProvider>"
|
|
6901
|
+
}
|
|
6902
|
+
},
|
|
6903
|
+
"parameters": [
|
|
6904
|
+
{
|
|
6905
|
+
"name": "vendor",
|
|
6906
|
+
"type": {
|
|
6907
|
+
"text": "AITierVendor"
|
|
6908
|
+
}
|
|
6909
|
+
}
|
|
6910
|
+
]
|
|
6911
|
+
},
|
|
6912
|
+
{
|
|
6913
|
+
"kind": "method",
|
|
6914
|
+
"name": "isKnownVendor",
|
|
6915
|
+
"privacy": "private",
|
|
6916
|
+
"return": {
|
|
6917
|
+
"type": {
|
|
6918
|
+
"text": "vendor is AITierVendor"
|
|
6919
|
+
}
|
|
6920
|
+
},
|
|
6921
|
+
"parameters": [
|
|
6922
|
+
{
|
|
6923
|
+
"name": "vendor",
|
|
6924
|
+
"type": {
|
|
6925
|
+
"text": "string"
|
|
6926
|
+
}
|
|
6927
|
+
}
|
|
6928
|
+
]
|
|
6885
6929
|
}
|
|
6886
|
-
]
|
|
6887
|
-
"description": "Returns the meta-event timeline for `key`, or an empty array if none recorded."
|
|
6930
|
+
]
|
|
6888
6931
|
},
|
|
6889
6932
|
{
|
|
6890
6933
|
"kind": "function",
|
|
6891
|
-
"name": "
|
|
6934
|
+
"name": "registerTieredAIProviders",
|
|
6892
6935
|
"return": {
|
|
6893
6936
|
"type": {
|
|
6894
|
-
"text": "
|
|
6937
|
+
"text": "TieredAIProviderSwitcher"
|
|
6895
6938
|
}
|
|
6896
6939
|
},
|
|
6897
6940
|
"parameters": [
|
|
6898
6941
|
{
|
|
6899
|
-
"name": "
|
|
6942
|
+
"name": "container",
|
|
6900
6943
|
"type": {
|
|
6901
|
-
"text": "
|
|
6944
|
+
"text": "Container"
|
|
6902
6945
|
}
|
|
6903
6946
|
},
|
|
6904
6947
|
{
|
|
6905
|
-
"name": "
|
|
6906
|
-
"type": {
|
|
6907
|
-
"text": "readonly MetaEvent[]"
|
|
6908
|
-
}
|
|
6909
|
-
}
|
|
6910
|
-
],
|
|
6911
|
-
"description": "Merge pre-built meta events into the timeline for `targetKey`, **preserving each\nevent's original `timestamp`** (so it interleaves chronologically on export)\nwhile re-indexing onto the target buffer's monotonic counter. Used to fold a\nsub-agent's harvested events into the parent session — see\n`ChatDriver.invokeSubAgent`. Unlike recordMetaEvent it does not stamp a\nfresh timestamp; the same non-`high` eviction policy is applied once after the\nbatch so the buffer stays bounded."
|
|
6912
|
-
},
|
|
6913
|
-
{
|
|
6914
|
-
"kind": "function",
|
|
6915
|
-
"name": "clearSession",
|
|
6916
|
-
"return": {
|
|
6917
|
-
"type": {
|
|
6918
|
-
"text": "void"
|
|
6919
|
-
}
|
|
6920
|
-
},
|
|
6921
|
-
"parameters": [
|
|
6922
|
-
{
|
|
6923
|
-
"name": "key",
|
|
6948
|
+
"name": "options",
|
|
6924
6949
|
"type": {
|
|
6925
|
-
"text": "
|
|
6950
|
+
"text": "Omit<TieredAIProviderSwitcherOptions, 'container'>"
|
|
6926
6951
|
}
|
|
6927
6952
|
}
|
|
6928
6953
|
],
|
|
6929
|
-
"description": "
|
|
6930
|
-
},
|
|
6931
|
-
{
|
|
6932
|
-
"kind": "variable",
|
|
6933
|
-
"name": "DEBUG_LOG_README",
|
|
6934
|
-
"type": {
|
|
6935
|
-
"text": "readonly string[]"
|
|
6936
|
-
},
|
|
6937
|
-
"default": "[\n 'This is an exported debug log for the Genesis AI assistant. Read it top-to-bottom.',\n \"`sessionUsage` is what this session spent: `costUsd` (USD, provider-reported per request and summed, cache discounts already applied) plus the four TOKEN BUCKETS — `uncachedInputTokens`, `cacheReadTokens`, `cacheWriteTokens`, `outputTokens`. Those four are disjoint and safe to add up for a total-tokens figure; the per-message fields further down are NOT (see kind:'message'). Each bucket bills at a different rate — cache reads a fraction of uncached input, cache writes a premium, output highest — so a big token count against a small cost means the prompt was mostly cache hits, not a missing charge. It covers sub-agent turns and spend a compaction banked, so for the CONVERSATION it is the authoritative total: prefer it over re-summing the timeline, which can be short by whatever the ring buffers evicted. The same figures appear under `meta.context`. It is as current as the snapshot it came from: the assistant's own download stamps a fresh one, but a log stitched by another tool can carry an older one — compare `meta.timestamp` with the last timeline entry, and if it is well behind, read these totals as historical and fall back to summing the timeline. One scope caveat: it is derived from the transcript, so it excludes billed calls that produced no message (a blank or refused attempt that was retried — see kind:'turn'.`usage`). Summing the turns can therefore come out HIGHER than this, and the difference is exactly that discarded spend, not a double-count.\",\n \"What 'session' means for those figures: the CURRENT conversation under this session key (a host-supplied per-project id, or the element id + header title when the host supplies none) — which is not necessarily everything in `timeline`. It is re-derived from the live transcript, so it spans page loads only when the chat is being remembered, and a Clear resets it to zero. `timeline` is append-only regardless: it keeps every page load and the pre-Clear conversation, with the session.cleared event as the boundary. So on a long-lived log, read these totals as the latest conversation's and the earlier sections as history — not as a total of the whole file.\",\n '`timeline` is the entire session as one array, already sorted chronologically by `timestamp` (ISO 8601). Every entry has a `kind`.',\n 'Timestamps are millisecond-resolution; entries that share the same millisecond are ordered by a fixed kind rank (event, then turn, then message), which is a heuristic and may not reflect exact causal order within that millisecond — e.g. a user message and the turn it triggered, or a final assistant message and its turn.end event, can appear in either order depending on whether they landed in the same millisecond. Read the logical structure of a turn rather than over-interpreting the micro-ordering of co-timestamped entries of different kinds.',\n \"kind:'message' — the conversation. `role` is user/assistant/tool/system-event/synthetic-user; `agentName` says which agent produced it; `toolCalls`/`toolResult`/`interaction` carry tool and widget activity; `inputTokens`/`outputTokens`/`cost` are per-message LLM usage, where `inputTokens` is the WHOLE prompt for that request and `cacheReadTokens`/`cacheWriteTokens` BREAK IT DOWN rather than add to it — uncached input is `inputTokens` minus those two, and adding the cache fields to `inputTokens` counts the prompt twice. The cache fields are absent on providers that report no cache split (Gemini reports reads only, since implicit caching bills no write) and on messages persisted before they existed, so read them as 0 when missing. Each bucket bills at a different rate — cache reads a fraction of uncached input, cache writes a premium, output highest — so a large token count at a small cost means the prompt was mostly cache hits. `externalCostUsd` is any non-LLM cost a widget reported for its own external service calls (folded into the session cost total alongside `cost`). On model-produced assistant messages, `model` is the concrete model id that generated it (e.g. 'gemini-2.5-flash-lite') and `providerName` is the registry slot it resolved under (e.g. a tier name like 'high'/'low', or the default); together they attribute the message — and any tool calls it carries — to an exact model even across a mid-session vendor/tier switch, where one slot name can map to different models before and after the switch. Both are undefined on any entry that is NOT an LLM response: non-assistant roles (user/tool/system-event) and 'synthetic-user' echoes; assistant interaction/widget entries (empty content carrying an `interaction` — a rendered widget, not a model turn); driver-authored assistant fallbacks (the timeout, repeated-malformed-call, and empty-response apology messages); and messages restored from a session persisted before these fields existed. One partial case: on a genuine model turn whose provider exposes no `getStatus` (or reports no model), `providerName` is still set but `model` alone is undefined. A 'synthetic-user' message is a display-only echo of an interaction outcome (e.g. the answer a widget reported): it renders on the user's side of the chat and `agentName` is the agent that created it, but it is never sent to the LLM — so it has no matching 'turn' and the model learns the outcome only from the corresponding tool result.\",\n \"Sub-agent messages appear inline. When a tool delegates to a sub-agent (via `requestSubAgent`), the sub-agent's whole conversation — its own assistant/tool messages, each with their own `content`/`thinking`/`toolCalls`/`toolResult` and per-message `model`/`providerName`/`inputTokens`/`outputTokens`/`cacheReadTokens`/`cacheWriteTokens`/`cost` — is hoisted into the timeline as ordinary kind:'message' entries, interleaved by timestamp right after the tool call that spawned them (so you read the delegation top-to-bottom). A hoisted entry is marked: `subAgentDepth` is its delegation depth (1 for a sub-agent, 2 for a sub-agent's sub-agent, …), `subAgentOf` is the id of the parent tool call that spawned it (correlates it back even when two sub-agents run in one parent turn), `subAgentName` is the sub-agent's own name, and `agentName` is rewritten to a `\\\"<parent> › <sub-agent>\\\"` breadcrumb (composing when nested, e.g. `\\\"UI Builder › Planner › Grounding\\\"`). The sub-agent's per-LLM-call snapshots also surface as kind:'turn' entries with an N-M `turnIndex`, and subagent.started/completed (or subagent.failed) events bracket the run. Per-message `cost` on hoisted entries is already part of the session total (it is summed from the un-flattened history), so summing the top-level timeline does NOT double-count.\",\n \"kind:'turn' — one LLM call. `turnIndex` is a string: a top-level turn is the bare counter ('0', '1', …); a sub-agent's turns are numbered under the parent turn that activated them ('3-1', '3-2', …, and a nested sub-agent contributes '3-2-1', …), and `agentName` names the agent that ran the turn. `systemPrompt` and `toolNames` are what the model saw. A systemPrompt of '<repeated — identical to turn N>' was byte-identical to turn N and de-duplicated; the full prompt is shown whenever it changes (often because a stateful agent advanced), so prompt evolution is visible.\",\n \"kind:'turn'.`model`/`providerName`/`provider` — which model ran that call: the concrete model id, the registry slot it resolved under (a tier name like 'high'/'low', or the default), and the vendor. Recorded per CALL, so an agent whose `provider` selector varies by state — a flow that plans on a high tier and executes on a low one — has every step attributed, including calls that produced no message. `model` is the SERVING model where the provider reports one, so a turn answered by a server-side fallback names the model that answered rather than the one requested; it always matches the `model` on the message that call produced. Absent when the provider exposes no `getStatus` and the transport stamped nothing.\",\n \"kind:'turn'.`usage` — what that ONE call cost, in the same four-bucket + `costUsd` shape as `sessionUsage`. Absent while a call is in flight and on providers that report no usage. This is the SAME money as the message the call produced, not extra money: never add turn usage to message usage, and read a turn plus its message as one charge. Its distinct value is the calls that produced NO message — a blank or refused response is billed and then discarded before the retry, so the turn entry is the only record of that spend, and a turn with `usage` but no message after it is exactly that. `costUsd: 0` alongside a nonzero token count means the provider reported no price, not that the call was free.\",\n \"kind:'turn'.`agentSnapshot` — the active agent's own view of its internal state, captured at that turn. An agent opts into this by exposing a `getDebugSnapshot()` that returns JSON-serializable per-state info; stateful/flow agents wire it automatically, so you can watch a flow advance turn-by-turn (e.g. current step, cursor, collected fields, pending changes). Absent for agents that don't expose one.\",\n \"kind:'event' — a meta/lifecycle event. `type` names it (see below); `detail` carries structured data. `detail.placement` is the emitting UI instance: 'bubble' (collapsed), 'panel' (popped-out), or 'standalone'.\",\n \"Each 'event' also has an `importance`: 'high' (failures/limits — turn.error, tool.failed, subagent.failed, file.read-failed, suggestions.failed, context.threshold-crossed), 'normal' (session flow — connects, turns, retries, handoffs, agent/provider changes, interactions, sub-agent start/complete), or 'low' (skippable UI/bookkeeping noise — panel.toggled, attachment.added, driver.wired/unwired, context.updated, context.condensed). To skim, ignore importance:'low'; to triage a failure, filter to importance:'high' then read the nearby messages and turns. A 'high' turn.error is often preceded by one or more 'normal' turn.retry events for the same reason — read them together to see how many attempts were made before bailing. 'message' and 'turn' entries carry no importance — they are the substance, always read them.\",\n 'Event types: assistant.connected/disconnected (mount + placement + whether the session was created or restored), assistant.popout/popin (window placement), driver.created/wired/unwired (which driver is live and why it stops/starts responding across a popout), state.changed (idle↔loading), turn.start/turn.end (turn boundary; turn.end carries durationMs), turn.retry (a recoverable in-turn retry — detail.reason plus attempt/maxAttempts; for malformed calls also finishMessage; for empty responses also the provider finishReason + thoughtsTokens + parts breakdown), turn.error (a turn failed or hit a guardrail — detail.reason is one of exception/malformed-function-call/empty-response/unknown-tool-limit/max-iterations/response-truncated/refusal/budget-exhausted/provider-refused/context-exhausted/ai-service-error, plus reason-specific diagnostics: attempts (for empty-response also finishReason + thoughtsTokens + a parts breakdown, distinguishing a thinking-only STOP from a truly empty turn), finishMessage, for response-truncated the model + maxTokens + outputTokens + tools, unknownTools (split into staleTools — real earlier this activation but retired by the current state or hidden behind an open exclusive fold — and hallucinatedTools — never advertised) + availableTools, iterations + limit, for budget-exhausted the budgetUsd + spentUsd figures reported by the proxy plus the resolved vendor, for provider-refused the kind (spend|auth) plus the upstream status and error type — the vendor refusing the ACCOUNT rather than us refusing to spend, so the remedy is a top-up or a key rotation rather than a raised cap, and the kind is the only place that distinction survives because the user-facing copy is deliberately cause-free, for context-exhausted the estimated contextTokens against the guard that stopped the turn plus the iterations reached — the driver ending a runaway tool loop at the edge of the context window rather than issuing a request the provider would reject, so the transcript survives intact and can still be compacted, for ai-service-error the code (one of AI_SERVICE_ERROR_CODES, e.g. NO_API_KEY) and the status the AI service answered with — its own text goes to the browser console only, or name + message for exceptions), tool.failed (a tool threw), tool.unresolved (the model called a tool that could not be dispatched — detail.kind is folded/fold-hidden/stale/unknown, plus tool + agent and, for the counted kinds, the consecutive streak; the recurring lead-up to an unknown-tool-limit turn.error), subagent.started/completed/failed (the lifecycle of a `requestSubAgent` delegation — detail.agent names the sub-agent; these bracket the sub-agent turns that appear as kind:turn entries with an N-M `turnIndex`; subagent.failed also carries detail.reason, one of max_iterations/malformed_tool_call/empty_response/unknown_tool_limit/timeout/response_truncated/refusal/budget_exhausted/provider_refused/context_exhausted/ai_service_error; budget_exhausted and provider_refused are terminal for the PARENT turn too, and so is ai_service_error when the refusal is about the service rather than the request and came from the vendor the parent calls — the parent stops rather than calling the model again into the same wall; after context_exhausted the parent goes on, but its own next call is likely to stop on the same guard), agent.handoff (routing; from=null is the initial activation), agent.pinned/unpinned (forced routing), routing.decided (ONE PER ROUTING DECISION — see its own paragraph below), provider.selected (the resolved provider for the upcoming turns — detail.provider is the registry SLOT/tier name, detail.model the concrete model behind it and detail.vendor its vendor; emitted only when the slot CHANGES, so read the per-turn `model` for the model of any given call rather than assuming the nearest event still applies), interaction.requested/resolved (blocking user widgets — explain quiet gaps; note that when a sub-agent opens a widget, detail.agent — and the agentName on the interaction message — is the HOST agent that owns the widget, NOT the sub-agent that asked, because widgets render and resolve on the host driver), context.updated/threshold-crossed (token + cost), context.condensed (a stale tool payload was collapsed out of the model-bound history by a `condenseWhen` declaration on the tool — detail.tool + toolCallId, target args|response, trigger (superseded:<key> or age:<n>), stubLen, and an estimated tokensSaved; stored history and this log keep the FULL payload, so the model-visible slice at any point is the full history minus the condensations recorded up to then), panel.toggled, attachment.added, file.read-failed, suggestions.failed.',\n 'Sub-agent meta events: a sub-agent\\'s own turn.retry/turn.error/tool.failed/tool.unresolved events are merged into this same timeline, tagged with `detail.subAgent` — a `\"<parent> › <sub-agent>\"` breadcrumb that composes when nested (e.g. `\"UI Builder › Planner › Grounding\"`) — and interleaved by their original timestamps within the subagent.started→completed/failed bracket. These are the per-attempt/per-failure signals that do NOT appear among the sub-agent\\'s (hoisted) messages: a malformed/empty attempt that gets retried produces no message, and the stale-vs-hallucinated split and streak counts live only on the event. A sub-agent\\'s high-volume, message-derivable events (turn.start/turn.end, provider.selected, context.updated) are intentionally NOT merged — read its hoisted messages for model/tokens/cost and turn-by-turn activity, and the bracketing subagent.* events for the run\\'s span.',\n \"`meta` holds context captured at export time: agentSummary (full agent configs), context (active model, contextTokens/contextLimit/contextUsagePercent for the last call, and the session totals — sessionCostUsd, sessionTokensConsumed, and the four-bucket sessionUsage lifted to the top of this log), activeDebugSnapshot (the active agent's `getDebugSnapshot()` taken fresh at export — reflects state NOW, which may have advanced beyond the last turn's agentSnapshot), debug (optional host-supplied debug state), host, and the export timestamp.\",\n 'Note the two different scopes in `meta.context`: `contextTokens` is the prompt size of the LAST call (against `contextLimit`, the model context window), while `sessionUsage`/`sessionTokensConsumed` are cumulative BILLED throughput. Every turn resends the conversation, so the cumulative figure counts each turn’s prompt again in the next turn’s and is expected to dwarf the context size — that is not double-counting.',\n \"kind:'event' type 'routing.decided' — how ONE turn was routed, emitted by the orchestrating driver before the agent runs (and again after every handoff). `decision` is why that agent was chosen: 'classified' (the classifier ran and picked one), 'no-match' (it ran and answered -1 — nothing listed covers the request), 'ballot-exhausted' (every eligible specialist had already handed off this turn, so the ballot was empty and NO call was made — distinct from 'no-match', where one ran and declined), 'pinned' (a user pin or an active stateful flow owned the turn, so no call was made), 'single-candidate'/'no-specialists' (configuration left nothing to decide), 'provider-unavailable' (the registry default exposes no chat()), 'classifier-failed' (every attempt threw — `error` carries the last one). `to` names the agent and `fallback` says whether that agent is the fallback. `candidates` is what was actually ON THE BALLOT, in ballot order, so `index` — the classifier's own answer — indexes it directly; `excluded` names the specialists left off because they already handed off this turn, so the full eligible set is `candidates` ∪ `excluded`. `candidates` is absent on the four decisions that put nothing to a vote — 'pinned', 'single-candidate', 'no-specialists', 'ballot-exhausted'. It IS present on 'provider-unavailable', which is not an exception worth removing: the ballot was built there, it simply never got sent. `attempts` covers the retry ladder. `durationMs` is on EVERY routing.decided, and is the field to read when a decision looks wrong: the four decisions that can reach the fallback are told apart by the clock as much as by their name, because a fallback routing that resolved in tens of milliseconds made no network call at all whatever its `decision` says.\",\n \"kind:'event' type 'routing.decided'.`usage` — what that classifier call cost, in the same four-bucket + costUsd shape as `sessionUsage`, plus `model`. Absent on the decisions that make no call (see 'pinned' and the configuration ones). THIS SPEND IS NOT IN `sessionUsage`: a classifier call never enters the transcript and `sessionUsage` is derived from the transcript, so classifier cost is missing from the session total by construction, not by accident. Sum these events to close that gap — it is the one component of a session's real spend that the totals cannot see.\",\n 'To debug a failure: find the last turn.error or tool.failed, then read upward for the user message, the turn(s), and the agent/provider/state events that led into it. For a turn that went to the wrong agent, read its routing.decided first — `decision` says whether anything was actually asked.',\n]",
|
|
6938
|
-
"description": "Human/agent-facing guide emitted as the first key of the exported debug log,\nso whoever opens the JSON (often an AI agent) knows how to read it without\nreverse-engineering the shape. Kept here next to the event catalogue it\ndescribes — but proximity alone demonstrably did NOT keep the two in sync\n(`refusal` was missing from both reason lists for a whole release), so\n`debug-event-log.test.ts` now asserts that every `TurnFailureReason` and every\n`SubAgentFailureReason` is named here, and fails the build when one is added\nwithout a matching sentence. Enumerations below read as exhaustive and WILL be\ntrusted by an agent reading the JSON — keep them so."
|
|
6954
|
+
"description": "Build a TieredAIProviderSwitcher — which registers the tier-shaped provider\nregistry — and put it on the (AIProviderSwitcher:variable) token. Call once at app\nbootstrap."
|
|
6939
6955
|
}
|
|
6940
6956
|
],
|
|
6941
6957
|
"exports": [
|
|
6942
6958
|
{
|
|
6943
6959
|
"kind": "js",
|
|
6944
|
-
"name": "
|
|
6945
|
-
"declaration": {
|
|
6946
|
-
"name": "META_EVENT_IMPORTANCE",
|
|
6947
|
-
"module": "src/state/debug-event-log.ts"
|
|
6948
|
-
}
|
|
6949
|
-
},
|
|
6950
|
-
{
|
|
6951
|
-
"kind": "js",
|
|
6952
|
-
"name": "recordMetaEvent",
|
|
6960
|
+
"name": "TieredAIProviderSwitcher",
|
|
6953
6961
|
"declaration": {
|
|
6954
|
-
"name": "
|
|
6955
|
-
"module": "src/
|
|
6962
|
+
"name": "TieredAIProviderSwitcher",
|
|
6963
|
+
"module": "src/provider/tiered-provider-switcher.ts"
|
|
6956
6964
|
}
|
|
6957
6965
|
},
|
|
6958
6966
|
{
|
|
6959
6967
|
"kind": "js",
|
|
6960
|
-
"name": "
|
|
6968
|
+
"name": "registerTieredAIProviders",
|
|
6961
6969
|
"declaration": {
|
|
6962
|
-
"name": "
|
|
6963
|
-
"module": "src/
|
|
6970
|
+
"name": "registerTieredAIProviders",
|
|
6971
|
+
"module": "src/provider/tiered-provider-switcher.ts"
|
|
6964
6972
|
}
|
|
6965
|
-
}
|
|
6973
|
+
}
|
|
6974
|
+
]
|
|
6975
|
+
},
|
|
6976
|
+
{
|
|
6977
|
+
"kind": "javascript-module",
|
|
6978
|
+
"path": "src/state/ai-assistant-slice.ts",
|
|
6979
|
+
"declarations": [
|
|
6966
6980
|
{
|
|
6967
|
-
"kind": "
|
|
6968
|
-
"name": "
|
|
6969
|
-
"
|
|
6970
|
-
"
|
|
6971
|
-
|
|
6972
|
-
|
|
6981
|
+
"kind": "function",
|
|
6982
|
+
"name": "createDefaultSessionState",
|
|
6983
|
+
"return": {
|
|
6984
|
+
"type": {
|
|
6985
|
+
"text": "AiAssistantSessionState"
|
|
6986
|
+
}
|
|
6987
|
+
},
|
|
6988
|
+
"description": "Build a fresh default session state. A factory (not just a shared const) so\neach call returns independent collections — `resetSession` can hand back a\nclean slate without aliasing the initial state's arrays."
|
|
6973
6989
|
},
|
|
6974
6990
|
{
|
|
6975
|
-
"kind": "
|
|
6976
|
-
"name": "
|
|
6977
|
-
"
|
|
6978
|
-
"
|
|
6979
|
-
"module": "src/state/debug-event-log.ts"
|
|
6991
|
+
"kind": "variable",
|
|
6992
|
+
"name": "defaultSessionState",
|
|
6993
|
+
"type": {
|
|
6994
|
+
"text": "AiAssistantSessionState"
|
|
6980
6995
|
}
|
|
6981
6996
|
},
|
|
6982
6997
|
{
|
|
6983
|
-
"kind": "
|
|
6984
|
-
"name": "
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
}
|
|
6989
|
-
},
|
|
6998
|
+
"kind": "variable",
|
|
6999
|
+
"name": "aiAssistantSlice"
|
|
7000
|
+
}
|
|
7001
|
+
],
|
|
7002
|
+
"exports": [
|
|
6990
7003
|
{
|
|
6991
7004
|
"kind": "js",
|
|
6992
|
-
"name": "
|
|
7005
|
+
"name": "createDefaultSessionState",
|
|
6993
7006
|
"declaration": {
|
|
6994
|
-
"name": "
|
|
6995
|
-
"module": "src/state/
|
|
7007
|
+
"name": "createDefaultSessionState",
|
|
7008
|
+
"module": "src/state/ai-assistant-slice.ts"
|
|
6996
7009
|
}
|
|
6997
7010
|
},
|
|
6998
7011
|
{
|
|
6999
7012
|
"kind": "js",
|
|
7000
|
-
"name": "
|
|
7013
|
+
"name": "defaultSessionState",
|
|
7001
7014
|
"declaration": {
|
|
7002
|
-
"name": "
|
|
7003
|
-
"module": "src/state/
|
|
7015
|
+
"name": "defaultSessionState",
|
|
7016
|
+
"module": "src/state/ai-assistant-slice.ts"
|
|
7004
7017
|
}
|
|
7005
7018
|
},
|
|
7006
7019
|
{
|
|
7007
7020
|
"kind": "js",
|
|
7008
|
-
"name": "
|
|
7021
|
+
"name": "aiAssistantSlice",
|
|
7009
7022
|
"declaration": {
|
|
7010
|
-
"name": "
|
|
7011
|
-
"module": "src/state/
|
|
7023
|
+
"name": "aiAssistantSlice",
|
|
7024
|
+
"module": "src/state/ai-assistant-slice.ts"
|
|
7012
7025
|
}
|
|
7013
7026
|
}
|
|
7014
7027
|
]
|
|
7015
7028
|
},
|
|
7016
7029
|
{
|
|
7017
7030
|
"kind": "javascript-module",
|
|
7018
|
-
"path": "src/state/
|
|
7031
|
+
"path": "src/state/debug-event-log.ts",
|
|
7019
7032
|
"declarations": [
|
|
7033
|
+
{
|
|
7034
|
+
"kind": "variable",
|
|
7035
|
+
"name": "META_EVENT_IMPORTANCE",
|
|
7036
|
+
"type": {
|
|
7037
|
+
"text": "Record<MetaEventType, MetaEventImportance>"
|
|
7038
|
+
},
|
|
7039
|
+
"default": "{\n 'turn.error': 'high',\n 'tool.failed': 'high',\n 'subagent.failed': 'high',\n 'file.read-failed': 'high',\n 'suggestions.failed': 'high',\n 'context.threshold-crossed': 'high',\n 'context.compacted': 'high',\n 'persistence.restore-orphan': 'high',\n // A save that did not land is silent data loss in progress: the transcript on screen\n // is no longer backed by the store, and every later turn widens the gap. GENC-1511.\n 'persistence.save-failed': 'high',\n\n 'assistant.connected': 'normal',\n 'assistant.disconnected': 'normal',\n 'assistant.popout': 'normal',\n 'assistant.popin': 'normal',\n 'driver.created': 'normal',\n 'state.changed': 'normal',\n 'turn.start': 'normal',\n 'turn.end': 'normal',\n 'turn.retry': 'normal',\n 'tool.unresolved': 'normal',\n 'subagent.started': 'normal',\n 'subagent.completed': 'normal',\n // One per routing decision, with what the classifier answered and what the call cost. Same\n // level as the handoff it produces: you read them together to follow how a turn was routed.\n 'routing.decided': 'normal',\n 'agent.handoff': 'normal',\n 'agent.pinned': 'normal',\n 'agent.unpinned': 'normal',\n 'provider.selected': 'normal',\n 'interaction.requested': 'normal',\n 'interaction.resolved': 'normal',\n // Bookkeeping about an already-finished turn; interesting when reconciling a session total.\n 'interaction.external-cost': 'normal',\n // Spend that was billed but could NOT be recorded (the message was trimmed/condensed away, or\n // the value was not real spend). 'high': it is the one way the session total goes quietly\n // wrong, so it must stand out when reconciling.\n 'interaction.external-cost-dropped': 'high',\n // What came of an answer, recorded by the tool that asked (see recordInteractionOutcome).\n 'interaction.outcome': 'normal',\n // An outcome that could not be recorded: the widget goes on showing only the answer.\n 'interaction.outcome-dropped': 'high',\n 'external-diagnostics.folded': 'normal',\n 'session.cleared': 'normal',\n 'session.switched': 'low',\n 'session.switch-deferred': 'low',\n 'persistence.restored': 'normal',\n 'persistence.suppressed': 'normal',\n 'persistence.not-resumable': 'normal',\n\n 'driver.wired': 'low',\n 'driver.unwired': 'low',\n 'context.updated': 'low',\n 'context.condensed': 'low',\n 'panel.toggled': 'low',\n 'persistence.toggled': 'low',\n 'persistence.saved': 'low',\n 'attachment.added': 'low',\n}",
|
|
7040
|
+
"description": "Importance is intrinsic to the event *type*, not the instance, so it's\ndefined once here and stamped automatically by recordMetaEvent — call\nsites never pass it. The `Record` is exhaustive: adding a `MetaEventType`\nwithout a level here is a compile error.\n\n- `high` — failures and hard limits you almost always want to see.\n- `normal` — meaningful session flow you read to follow what happened.\n- `low` — frequent UI / bookkeeping noise, usually safe to skip."
|
|
7041
|
+
},
|
|
7020
7042
|
{
|
|
7021
7043
|
"kind": "function",
|
|
7022
|
-
"name": "
|
|
7044
|
+
"name": "recordMetaEvent",
|
|
7023
7045
|
"return": {
|
|
7024
7046
|
"type": {
|
|
7025
|
-
"text": "
|
|
7047
|
+
"text": "void"
|
|
7026
7048
|
}
|
|
7027
7049
|
},
|
|
7028
7050
|
"parameters": [
|
|
@@ -7033,26 +7055,27 @@
|
|
|
7033
7055
|
}
|
|
7034
7056
|
},
|
|
7035
7057
|
{
|
|
7036
|
-
"name": "
|
|
7058
|
+
"name": "type",
|
|
7037
7059
|
"type": {
|
|
7038
|
-
"text": "
|
|
7060
|
+
"text": "MetaEventType"
|
|
7039
7061
|
}
|
|
7040
7062
|
},
|
|
7041
7063
|
{
|
|
7042
|
-
"name": "
|
|
7064
|
+
"name": "detail",
|
|
7065
|
+
"optional": true,
|
|
7043
7066
|
"type": {
|
|
7044
|
-
"text": "
|
|
7067
|
+
"text": "Record<string, unknown>"
|
|
7045
7068
|
}
|
|
7046
7069
|
}
|
|
7047
7070
|
],
|
|
7048
|
-
"description": "
|
|
7071
|
+
"description": "Append a meta event to the timeline for `key`. Once the buffer exceeds\nDEFAULT_MAX_META_EVENTS, evicts the oldest *non-`high`* event;\n`high`-importance events are never evicted. An empty `key` is bucketed under\n`''`, matching how drivers/stores handle an absent session identity, so\ncallers never need to guard."
|
|
7049
7072
|
},
|
|
7050
7073
|
{
|
|
7051
7074
|
"kind": "function",
|
|
7052
|
-
"name": "
|
|
7075
|
+
"name": "recordTurnError",
|
|
7053
7076
|
"return": {
|
|
7054
7077
|
"type": {
|
|
7055
|
-
"text": "
|
|
7078
|
+
"text": "void"
|
|
7056
7079
|
}
|
|
7057
7080
|
},
|
|
7058
7081
|
"parameters": [
|
|
@@ -7061,34 +7084,29 @@
|
|
|
7061
7084
|
"type": {
|
|
7062
7085
|
"text": "string"
|
|
7063
7086
|
}
|
|
7064
|
-
}
|
|
7065
|
-
],
|
|
7066
|
-
"description": "Returns the existing driver for the given key, or `undefined`."
|
|
7067
|
-
},
|
|
7068
|
-
{
|
|
7069
|
-
"kind": "function",
|
|
7070
|
-
"name": "getDriverAgentsKey",
|
|
7071
|
-
"return": {
|
|
7072
|
-
"type": {
|
|
7073
|
-
"text": "string | undefined"
|
|
7074
|
-
}
|
|
7075
|
-
},
|
|
7076
|
-
"parameters": [
|
|
7087
|
+
},
|
|
7077
7088
|
{
|
|
7078
|
-
"name": "
|
|
7089
|
+
"name": "reason",
|
|
7079
7090
|
"type": {
|
|
7080
|
-
"text": "
|
|
7091
|
+
"text": "TurnFailureReason"
|
|
7092
|
+
}
|
|
7093
|
+
},
|
|
7094
|
+
{
|
|
7095
|
+
"name": "detail",
|
|
7096
|
+
"optional": true,
|
|
7097
|
+
"type": {
|
|
7098
|
+
"text": "Record<string, unknown>"
|
|
7081
7099
|
}
|
|
7082
7100
|
}
|
|
7083
7101
|
],
|
|
7084
|
-
"description": "
|
|
7102
|
+
"description": "Record a turn-ending failure (`turn.error`, importance `high`). The `reason`\nis typed so the high-importance triage surface stays consistent; pass any\ndiagnostic specifics (attempt counts, offending tool names, etc.) in `detail`."
|
|
7085
7103
|
},
|
|
7086
7104
|
{
|
|
7087
7105
|
"kind": "function",
|
|
7088
|
-
"name": "
|
|
7106
|
+
"name": "recordTurnRetry",
|
|
7089
7107
|
"return": {
|
|
7090
7108
|
"type": {
|
|
7091
|
-
"text": "
|
|
7109
|
+
"text": "void"
|
|
7092
7110
|
}
|
|
7093
7111
|
},
|
|
7094
7112
|
"parameters": [
|
|
@@ -7097,62 +7115,29 @@
|
|
|
7097
7115
|
"type": {
|
|
7098
7116
|
"text": "string"
|
|
7099
7117
|
}
|
|
7118
|
+
},
|
|
7119
|
+
{
|
|
7120
|
+
"name": "reason",
|
|
7121
|
+
"type": {
|
|
7122
|
+
"text": "TurnFailureReason"
|
|
7123
|
+
}
|
|
7124
|
+
},
|
|
7125
|
+
{
|
|
7126
|
+
"name": "detail",
|
|
7127
|
+
"optional": true,
|
|
7128
|
+
"type": {
|
|
7129
|
+
"text": "Record<string, unknown>"
|
|
7130
|
+
}
|
|
7100
7131
|
}
|
|
7101
7132
|
],
|
|
7102
|
-
"description": "
|
|
7103
|
-
}
|
|
7104
|
-
],
|
|
7105
|
-
"exports": [
|
|
7106
|
-
{
|
|
7107
|
-
"kind": "js",
|
|
7108
|
-
"name": "getOrCreateDriver",
|
|
7109
|
-
"declaration": {
|
|
7110
|
-
"name": "getOrCreateDriver",
|
|
7111
|
-
"module": "src/state/driver-registry.ts"
|
|
7112
|
-
}
|
|
7113
|
-
},
|
|
7114
|
-
{
|
|
7115
|
-
"kind": "js",
|
|
7116
|
-
"name": "getDriver",
|
|
7117
|
-
"declaration": {
|
|
7118
|
-
"name": "getDriver",
|
|
7119
|
-
"module": "src/state/driver-registry.ts"
|
|
7120
|
-
}
|
|
7121
|
-
},
|
|
7122
|
-
{
|
|
7123
|
-
"kind": "js",
|
|
7124
|
-
"name": "getDriverAgentsKey",
|
|
7125
|
-
"declaration": {
|
|
7126
|
-
"name": "getDriverAgentsKey",
|
|
7127
|
-
"module": "src/state/driver-registry.ts"
|
|
7128
|
-
}
|
|
7133
|
+
"description": "Record a recoverable retry *within* a turn (`turn.retry`, importance `normal`)\n— e.g. one malformed/empty attempt that will be retried, as distinct from the\nfinal attempt that bails out as a `turn.error`. Include `attempt`/`maxAttempts`\nin `detail` so the timeline shows which try this was."
|
|
7129
7134
|
},
|
|
7130
|
-
{
|
|
7131
|
-
"kind": "js",
|
|
7132
|
-
"name": "deleteDriver",
|
|
7133
|
-
"declaration": {
|
|
7134
|
-
"name": "deleteDriver",
|
|
7135
|
-
"module": "src/state/driver-registry.ts"
|
|
7136
|
-
}
|
|
7137
|
-
}
|
|
7138
|
-
]
|
|
7139
|
-
},
|
|
7140
|
-
{
|
|
7141
|
-
"kind": "javascript-module",
|
|
7142
|
-
"path": "src/state/interaction-context.ts",
|
|
7143
|
-
"declarations": [],
|
|
7144
|
-
"exports": []
|
|
7145
|
-
},
|
|
7146
|
-
{
|
|
7147
|
-
"kind": "javascript-module",
|
|
7148
|
-
"path": "src/state/session-store.ts",
|
|
7149
|
-
"declarations": [
|
|
7150
7135
|
{
|
|
7151
7136
|
"kind": "function",
|
|
7152
|
-
"name": "
|
|
7137
|
+
"name": "getMetaEvents",
|
|
7153
7138
|
"return": {
|
|
7154
7139
|
"type": {
|
|
7155
|
-
"text": "
|
|
7140
|
+
"text": "ReadonlyArray<MetaEvent>"
|
|
7156
7141
|
}
|
|
7157
7142
|
},
|
|
7158
7143
|
"parameters": [
|
|
@@ -7161,38 +7146,37 @@
|
|
|
7161
7146
|
"type": {
|
|
7162
7147
|
"text": "string"
|
|
7163
7148
|
}
|
|
7164
|
-
},
|
|
7165
|
-
{
|
|
7166
|
-
"name": "devTools",
|
|
7167
|
-
"optional": true,
|
|
7168
|
-
"type": {
|
|
7169
|
-
"text": "boolean"
|
|
7170
|
-
}
|
|
7171
7149
|
}
|
|
7172
7150
|
],
|
|
7173
|
-
"description": "Returns the
|
|
7151
|
+
"description": "Returns the meta-event timeline for `key`, or an empty array if none recorded."
|
|
7174
7152
|
},
|
|
7175
7153
|
{
|
|
7176
7154
|
"kind": "function",
|
|
7177
|
-
"name": "
|
|
7155
|
+
"name": "mergeMetaEvents",
|
|
7178
7156
|
"return": {
|
|
7179
7157
|
"type": {
|
|
7180
|
-
"text": "
|
|
7158
|
+
"text": "void"
|
|
7181
7159
|
}
|
|
7182
7160
|
},
|
|
7183
7161
|
"parameters": [
|
|
7184
7162
|
{
|
|
7185
|
-
"name": "
|
|
7163
|
+
"name": "targetKey",
|
|
7186
7164
|
"type": {
|
|
7187
7165
|
"text": "string"
|
|
7188
7166
|
}
|
|
7167
|
+
},
|
|
7168
|
+
{
|
|
7169
|
+
"name": "events",
|
|
7170
|
+
"type": {
|
|
7171
|
+
"text": "readonly MetaEvent[]"
|
|
7172
|
+
}
|
|
7189
7173
|
}
|
|
7190
7174
|
],
|
|
7191
|
-
"description": "
|
|
7175
|
+
"description": "Merge pre-built meta events into the timeline for `targetKey`, **preserving each\nevent's original `timestamp`** (so it interleaves chronologically on export)\nwhile re-indexing onto the target buffer's monotonic counter. Used to fold a\nsub-agent's harvested events into the parent session — see\n`ChatDriver.invokeSubAgent`. Unlike recordMetaEvent it does not stamp a\nfresh timestamp; the same non-`high` eviction policy is applied once after the\nbatch so the buffer stays bounded."
|
|
7192
7176
|
},
|
|
7193
7177
|
{
|
|
7194
7178
|
"kind": "function",
|
|
7195
|
-
"name": "
|
|
7179
|
+
"name": "clearSession",
|
|
7196
7180
|
"return": {
|
|
7197
7181
|
"type": {
|
|
7198
7182
|
"text": "void"
|
|
@@ -7206,312 +7190,328 @@
|
|
|
7206
7190
|
}
|
|
7207
7191
|
}
|
|
7208
7192
|
],
|
|
7209
|
-
"description": "
|
|
7193
|
+
"description": "Drop the entire timeline for `key`. Used to discard a sub-agent's transient\nper-invocation session once its events have been harvested into the parent, so\nthe module registry doesn't accumulate one orphaned bucket per sub-agent run."
|
|
7194
|
+
},
|
|
7195
|
+
{
|
|
7196
|
+
"kind": "variable",
|
|
7197
|
+
"name": "DEBUG_LOG_README",
|
|
7198
|
+
"type": {
|
|
7199
|
+
"text": "readonly string[]"
|
|
7200
|
+
},
|
|
7201
|
+
"default": "[\n 'This is an exported debug log for the Genesis AI assistant. Read it top-to-bottom.',\n \"`sessionUsage` is what this session spent: `costUsd` (USD, provider-reported per request and summed, cache discounts already applied) plus the four TOKEN BUCKETS — `uncachedInputTokens`, `cacheReadTokens`, `cacheWriteTokens`, `outputTokens`. Those four are disjoint and safe to add up for a total-tokens figure; the per-message fields further down are NOT (see kind:'message'). Each bucket bills at a different rate — cache reads a fraction of uncached input, cache writes a premium, output highest — so a big token count against a small cost means the prompt was mostly cache hits, not a missing charge. It covers sub-agent turns and spend a compaction banked, so for the CONVERSATION it is the authoritative total: prefer it over re-summing the timeline, which can be short by whatever the ring buffers evicted. The same figures appear under `meta.context`. It is as current as the snapshot it came from: the assistant's own download stamps a fresh one, but a log stitched by another tool can carry an older one — compare `meta.timestamp` with the last timeline entry, and if it is well behind, read these totals as historical and fall back to summing the timeline. One scope caveat: it is derived from the transcript, so it excludes billed calls that produced no message (a blank or refused attempt that was retried — see kind:'turn'.`usage`). Summing the turns can therefore come out HIGHER than this, and the difference is exactly that discarded spend, not a double-count.\",\n \"What 'session' means for those figures: the CURRENT conversation under this session key (a host-supplied per-project id, or the element id + header title when the host supplies none) — which is not necessarily everything in `timeline`. It is re-derived from the live transcript, so it spans page loads only when the chat is being remembered, and a Clear resets it to zero. `timeline` is append-only regardless: it keeps every page load and the pre-Clear conversation, with the session.cleared event as the boundary. So on a long-lived log, read these totals as the latest conversation's and the earlier sections as history — not as a total of the whole file.\",\n '`timeline` is the entire session as one array, already sorted chronologically by `timestamp` (ISO 8601). Every entry has a `kind`.',\n 'Timestamps are millisecond-resolution; entries that share the same millisecond are ordered by a fixed kind rank (event, then turn, then message), which is a heuristic and may not reflect exact causal order within that millisecond — e.g. a user message and the turn it triggered, or a final assistant message and its turn.end event, can appear in either order depending on whether they landed in the same millisecond. Read the logical structure of a turn rather than over-interpreting the micro-ordering of co-timestamped entries of different kinds.',\n \"kind:'message' — the conversation. `role` is user/assistant/tool/system-event/synthetic-user; `agentName` says which agent produced it; `toolCalls`/`toolResult`/`interaction` carry tool and widget activity; `inputTokens`/`outputTokens`/`cost` are per-message LLM usage, where `inputTokens` is the WHOLE prompt for that request and `cacheReadTokens`/`cacheWriteTokens` BREAK IT DOWN rather than add to it — uncached input is `inputTokens` minus those two, and adding the cache fields to `inputTokens` counts the prompt twice. The cache fields are absent on providers that report no cache split (Gemini reports reads only, since implicit caching bills no write) and on messages persisted before they existed, so read them as 0 when missing. Each bucket bills at a different rate — cache reads a fraction of uncached input, cache writes a premium, output highest — so a large token count at a small cost means the prompt was mostly cache hits. `externalCostUsd` is any non-LLM cost a widget reported for its own external service calls (folded into the session cost total alongside `cost`). On model-produced assistant messages, `model` is the concrete model id that generated it (e.g. 'gemini-2.5-flash-lite') and `providerName` is the registry slot it resolved under (e.g. a tier name like 'high'/'low', or the default); together they attribute the message — and any tool calls it carries — to an exact model even across a mid-session vendor/tier switch, where one slot name can map to different models before and after the switch. Both are undefined on any entry that is NOT an LLM response: non-assistant roles (user/tool/system-event) and 'synthetic-user' echoes; assistant interaction/widget entries (empty content carrying an `interaction` — a rendered widget, not a model turn); driver-authored assistant fallbacks (the timeout, repeated-malformed-call, and empty-response apology messages); and messages restored from a session persisted before these fields existed. One partial case: on a genuine model turn whose provider exposes no `getStatus` (or reports no model), `providerName` is still set but `model` alone is undefined. A 'synthetic-user' message is a display-only echo of an interaction outcome (e.g. the answer a widget reported): it renders on the user's side of the chat and `agentName` is the agent that created it, but it is never sent to the LLM — so it has no matching 'turn' and the model learns the outcome only from the corresponding tool result.\",\n \"Sub-agent messages appear inline. When a tool delegates to a sub-agent (via `requestSubAgent`), the sub-agent's whole conversation — its own assistant/tool messages, each with their own `content`/`thinking`/`toolCalls`/`toolResult` and per-message `model`/`providerName`/`inputTokens`/`outputTokens`/`cacheReadTokens`/`cacheWriteTokens`/`cost` — is hoisted into the timeline as ordinary kind:'message' entries, interleaved by timestamp right after the tool call that spawned them (so you read the delegation top-to-bottom). A hoisted entry is marked: `subAgentDepth` is its delegation depth (1 for a sub-agent, 2 for a sub-agent's sub-agent, …), `subAgentOf` is the id of the parent tool call that spawned it (correlates it back even when two sub-agents run in one parent turn), `subAgentName` is the sub-agent's own name, and `agentName` is rewritten to a `\\\"<parent> › <sub-agent>\\\"` breadcrumb (composing when nested, e.g. `\\\"UI Builder › Planner › Grounding\\\"`). The sub-agent's per-LLM-call snapshots also surface as kind:'turn' entries with an N-M `turnIndex`, and subagent.started/completed (or subagent.failed) events bracket the run. Per-message `cost` on hoisted entries is already part of the session total (it is summed from the un-flattened history), so summing the top-level timeline does NOT double-count.\",\n \"kind:'turn' — one LLM call. `turnIndex` is a string: a top-level turn is the bare counter ('0', '1', …); a sub-agent's turns are numbered under the parent turn that activated them ('3-1', '3-2', …, and a nested sub-agent contributes '3-2-1', …), and `agentName` names the agent that ran the turn. `systemPrompt` and `toolNames` are what the model saw. A systemPrompt of '<repeated — identical to turn N>' was byte-identical to turn N and de-duplicated; the full prompt is shown whenever it changes (often because a stateful agent advanced), so prompt evolution is visible.\",\n \"kind:'turn'.`model`/`providerName`/`provider` — which model ran that call: the concrete model id, the registry slot it resolved under (a tier name like 'high'/'low', or the default), and the vendor. Recorded per CALL, so an agent whose `provider` selector varies by state — a flow that plans on a high tier and executes on a low one — has every step attributed, including calls that produced no message. `model` is the SERVING model where the provider reports one, so a turn answered by a server-side fallback names the model that answered rather than the one requested; it always matches the `model` on the message that call produced. Absent when the provider exposes no `getStatus` and the transport stamped nothing.\",\n \"kind:'turn'.`usage` — what that ONE call cost, in the same four-bucket + `costUsd` shape as `sessionUsage`. Absent while a call is in flight and on providers that report no usage. This is the SAME money as the message the call produced, not extra money: never add turn usage to message usage, and read a turn plus its message as one charge. Its distinct value is the calls that produced NO message — a blank or refused response is billed and then discarded before the retry, so the turn entry is the only record of that spend, and a turn with `usage` but no message after it is exactly that. `costUsd: 0` alongside a nonzero token count means the provider reported no price, not that the call was free.\",\n \"kind:'turn'.`agentSnapshot` — the active agent's own view of its internal state, captured at that turn. An agent opts into this by exposing a `getDebugSnapshot()` that returns JSON-serializable per-state info; stateful/flow agents wire it automatically, so you can watch a flow advance turn-by-turn (e.g. current step, cursor, collected fields, pending changes). Absent for agents that don't expose one.\",\n \"kind:'event' — a meta/lifecycle event. `type` names it (see below); `detail` carries structured data. `detail.placement` is the emitting UI instance: 'bubble' (collapsed), 'panel' (popped-out), or 'standalone'.\",\n \"Each 'event' also has an `importance`: 'high' (failures/limits — turn.error, tool.failed, subagent.failed, file.read-failed, suggestions.failed, context.threshold-crossed), 'normal' (session flow — connects, turns, retries, handoffs, agent/provider changes, interactions, sub-agent start/complete), or 'low' (skippable UI/bookkeeping noise — panel.toggled, attachment.added, driver.wired/unwired, context.updated, context.condensed). To skim, ignore importance:'low'; to triage a failure, filter to importance:'high' then read the nearby messages and turns. A 'high' turn.error is often preceded by one or more 'normal' turn.retry events for the same reason — read them together to see how many attempts were made before bailing. 'message' and 'turn' entries carry no importance — they are the substance, always read them.\",\n 'Event types: assistant.connected/disconnected (mount + placement + whether the session was created or restored), assistant.popout/popin (window placement), driver.created/wired/unwired (which driver is live and why it stops/starts responding across a popout), state.changed (idle↔loading), turn.start/turn.end (turn boundary; turn.end carries durationMs), turn.retry (a recoverable in-turn retry — detail.reason plus attempt/maxAttempts; for malformed calls also finishMessage; for empty responses also the provider finishReason + thoughtsTokens + parts breakdown), turn.error (a turn failed or hit a guardrail — detail.reason is one of exception/malformed-function-call/empty-response/unknown-tool-limit/max-iterations/response-truncated/refusal/budget-exhausted/provider-refused/context-exhausted/ai-service-error, plus reason-specific diagnostics: attempts (for empty-response also finishReason + thoughtsTokens + a parts breakdown, distinguishing a thinking-only STOP from a truly empty turn), finishMessage, for response-truncated the model + maxTokens + outputTokens + tools, unknownTools (split into staleTools — real earlier this activation but retired by the current state or hidden behind an open exclusive fold — and hallucinatedTools — never advertised) + availableTools, iterations + limit, for budget-exhausted the budgetUsd + spentUsd figures reported by the proxy plus the resolved vendor, for provider-refused the kind (spend|auth) plus the upstream status and error type — the vendor refusing the ACCOUNT rather than us refusing to spend, so the remedy is a top-up or a key rotation rather than a raised cap, and the kind is the only place that distinction survives because the user-facing copy is deliberately cause-free, for context-exhausted the estimated contextTokens against the guard that stopped the turn plus the iterations reached — the driver ending a runaway tool loop at the edge of the context window rather than issuing a request the provider would reject, so the transcript survives intact and can still be compacted, for ai-service-error the code (one of AI_SERVICE_ERROR_CODES, e.g. NO_API_KEY) and the status the AI service answered with — its own text goes to the browser console only, or name + message for exceptions), tool.failed (a tool threw), tool.unresolved (the model called a tool that could not be dispatched — detail.kind is folded/fold-hidden/stale/unknown, plus tool + agent and, for the counted kinds, the consecutive streak; the recurring lead-up to an unknown-tool-limit turn.error), subagent.started/completed/failed (the lifecycle of a `requestSubAgent` delegation — detail.agent names the sub-agent; these bracket the sub-agent turns that appear as kind:turn entries with an N-M `turnIndex`; subagent.failed also carries detail.reason, one of max_iterations/malformed_tool_call/empty_response/unknown_tool_limit/timeout/response_truncated/refusal/budget_exhausted/provider_refused/context_exhausted/ai_service_error; budget_exhausted and provider_refused are terminal for the PARENT turn too, and so is ai_service_error when the refusal is about the service rather than the request and came from the vendor the parent calls — the parent stops rather than calling the model again into the same wall; after context_exhausted the parent goes on, but its own next call is likely to stop on the same guard), agent.handoff (routing; from=null is the initial activation), agent.pinned/unpinned (forced routing), routing.decided (ONE PER ROUTING DECISION — see its own paragraph below), provider.selected (the resolved provider for the upcoming turns — detail.provider is the registry SLOT/tier name, detail.model the concrete model behind it and detail.vendor its vendor; emitted only when the slot CHANGES, so read the per-turn `model` for the model of any given call rather than assuming the nearest event still applies), interaction.requested/resolved (blocking user widgets — explain quiet gaps; note that when a sub-agent opens a widget, detail.agent — and the agentName on the interaction message — is the HOST agent that owns the widget, NOT the sub-agent that asked, because widgets render and resolve on the host driver), context.updated/threshold-crossed (token + cost), context.condensed (a stale tool payload was collapsed out of the model-bound history by a `condenseWhen` declaration on the tool — detail.tool + toolCallId, target args|response, trigger (superseded:<key> or age:<n>), stubLen, and an estimated tokensSaved; stored history and this log keep the FULL payload, so the model-visible slice at any point is the full history minus the condensations recorded up to then), panel.toggled, attachment.added, file.read-failed, suggestions.failed.',\n 'Sub-agent meta events: a sub-agent\\'s own turn.retry/turn.error/tool.failed/tool.unresolved events are merged into this same timeline, tagged with `detail.subAgent` — a `\"<parent> › <sub-agent>\"` breadcrumb that composes when nested (e.g. `\"UI Builder › Planner › Grounding\"`) — and interleaved by their original timestamps within the subagent.started→completed/failed bracket. These are the per-attempt/per-failure signals that do NOT appear among the sub-agent\\'s (hoisted) messages: a malformed/empty attempt that gets retried produces no message, and the stale-vs-hallucinated split and streak counts live only on the event. A sub-agent\\'s high-volume, message-derivable events (turn.start/turn.end, provider.selected, context.updated) are intentionally NOT merged — read its hoisted messages for model/tokens/cost and turn-by-turn activity, and the bracketing subagent.* events for the run\\'s span.',\n \"`meta` holds context captured at export time: agentSummary (full agent configs), context (active model, contextTokens/contextLimit/contextUsagePercent for the last call, and the session totals — sessionCostUsd, sessionTokensConsumed, and the four-bucket sessionUsage lifted to the top of this log), activeDebugSnapshot (the active agent's `getDebugSnapshot()` taken fresh at export — reflects state NOW, which may have advanced beyond the last turn's agentSnapshot), debug (optional host-supplied debug state), host, and the export timestamp.\",\n 'Note the two different scopes in `meta.context`: `contextTokens` is the prompt size of the LAST call (against `contextLimit`, the model context window), while `sessionUsage`/`sessionTokensConsumed` are cumulative BILLED throughput. Every turn resends the conversation, so the cumulative figure counts each turn’s prompt again in the next turn’s and is expected to dwarf the context size — that is not double-counting.',\n \"kind:'event' type 'routing.decided' — how ONE turn was routed, emitted by the orchestrating driver before the agent runs (and again after every handoff). `decision` is why that agent was chosen: 'classified' (the classifier ran and picked one), 'no-match' (it ran and answered -1 — nothing listed covers the request), 'ballot-exhausted' (every eligible specialist had already handed off this turn, so the ballot was empty and NO call was made — distinct from 'no-match', where one ran and declined), 'pinned' (a user pin or an active stateful flow owned the turn, so no call was made), 'single-candidate'/'no-specialists' (configuration left nothing to decide), 'provider-unavailable' (the registry default exposes no chat()), 'classifier-failed' (every attempt threw — `error` carries the last one). `to` names the agent and `fallback` says whether that agent is the fallback. `candidates` is what was actually ON THE BALLOT, in ballot order, so `index` — the classifier's own answer — indexes it directly; `excluded` names the specialists left off because they already handed off this turn, so the full eligible set is `candidates` ∪ `excluded`. `candidates` is absent on the four decisions that put nothing to a vote — 'pinned', 'single-candidate', 'no-specialists', 'ballot-exhausted'. It IS present on 'provider-unavailable', which is not an exception worth removing: the ballot was built there, it simply never got sent. `attempts` covers the retry ladder. `durationMs` is on EVERY routing.decided, and is the field to read when a decision looks wrong: the four decisions that can reach the fallback are told apart by the clock as much as by their name, because a fallback routing that resolved in tens of milliseconds made no network call at all whatever its `decision` says.\",\n \"kind:'event' type 'routing.decided'.`usage` — what that classifier call cost, in the same four-bucket + costUsd shape as `sessionUsage`, plus `model`. Absent on the decisions that make no call (see 'pinned' and the configuration ones). THIS SPEND IS NOT IN `sessionUsage`: a classifier call never enters the transcript and `sessionUsage` is derived from the transcript, so classifier cost is missing from the session total by construction, not by accident. Sum these events to close that gap — it is the one component of a session's real spend that the totals cannot see.\",\n 'To debug a failure: find the last turn.error or tool.failed, then read upward for the user message, the turn(s), and the agent/provider/state events that led into it. For a turn that went to the wrong agent, read its routing.decided first — `decision` says whether anything was actually asked.',\n]",
|
|
7202
|
+
"description": "Human/agent-facing guide emitted as the first key of the exported debug log,\nso whoever opens the JSON (often an AI agent) knows how to read it without\nreverse-engineering the shape. Kept here next to the event catalogue it\ndescribes — but proximity alone demonstrably did NOT keep the two in sync\n(`refusal` was missing from both reason lists for a whole release), so\n`debug-event-log.test.ts` now asserts that every `TurnFailureReason` and every\n`SubAgentFailureReason` is named here, and fails the build when one is added\nwithout a matching sentence. Enumerations below read as exhaustive and WILL be\ntrusted by an agent reading the JSON — keep them so."
|
|
7210
7203
|
}
|
|
7211
7204
|
],
|
|
7212
7205
|
"exports": [
|
|
7213
7206
|
{
|
|
7214
7207
|
"kind": "js",
|
|
7215
|
-
"name": "
|
|
7208
|
+
"name": "META_EVENT_IMPORTANCE",
|
|
7216
7209
|
"declaration": {
|
|
7217
|
-
"name": "
|
|
7218
|
-
"module": "src/state/
|
|
7210
|
+
"name": "META_EVENT_IMPORTANCE",
|
|
7211
|
+
"module": "src/state/debug-event-log.ts"
|
|
7219
7212
|
}
|
|
7220
7213
|
},
|
|
7221
7214
|
{
|
|
7222
7215
|
"kind": "js",
|
|
7223
|
-
"name": "
|
|
7216
|
+
"name": "recordMetaEvent",
|
|
7224
7217
|
"declaration": {
|
|
7225
|
-
"name": "
|
|
7226
|
-
"module": "src/state/
|
|
7218
|
+
"name": "recordMetaEvent",
|
|
7219
|
+
"module": "src/state/debug-event-log.ts"
|
|
7227
7220
|
}
|
|
7228
7221
|
},
|
|
7229
7222
|
{
|
|
7230
7223
|
"kind": "js",
|
|
7231
|
-
"name": "
|
|
7224
|
+
"name": "TurnFailureReason",
|
|
7232
7225
|
"declaration": {
|
|
7233
|
-
"name": "
|
|
7234
|
-
"module": "src/state/
|
|
7226
|
+
"name": "TurnFailureReason",
|
|
7227
|
+
"module": "src/state/debug-event-log.ts"
|
|
7235
7228
|
}
|
|
7236
7229
|
},
|
|
7237
7230
|
{
|
|
7238
7231
|
"kind": "js",
|
|
7239
|
-
"name": "
|
|
7232
|
+
"name": "recordTurnError",
|
|
7240
7233
|
"declaration": {
|
|
7241
|
-
"name": "
|
|
7242
|
-
"module": "src/state/
|
|
7234
|
+
"name": "recordTurnError",
|
|
7235
|
+
"module": "src/state/debug-event-log.ts"
|
|
7243
7236
|
}
|
|
7244
7237
|
},
|
|
7245
7238
|
{
|
|
7246
7239
|
"kind": "js",
|
|
7247
|
-
"name": "
|
|
7240
|
+
"name": "recordTurnRetry",
|
|
7248
7241
|
"declaration": {
|
|
7249
|
-
"name": "
|
|
7250
|
-
"module": "src/state/
|
|
7242
|
+
"name": "recordTurnRetry",
|
|
7243
|
+
"module": "src/state/debug-event-log.ts"
|
|
7251
7244
|
}
|
|
7252
|
-
}
|
|
7253
|
-
]
|
|
7254
|
-
},
|
|
7255
|
-
{
|
|
7256
|
-
"kind": "javascript-module",
|
|
7257
|
-
"path": "src/provider/ai-provider-switcher.ts",
|
|
7258
|
-
"declarations": [
|
|
7245
|
+
},
|
|
7259
7246
|
{
|
|
7260
|
-
"kind": "
|
|
7261
|
-
"name": "
|
|
7262
|
-
"
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7247
|
+
"kind": "js",
|
|
7248
|
+
"name": "getMetaEvents",
|
|
7249
|
+
"declaration": {
|
|
7250
|
+
"name": "getMetaEvents",
|
|
7251
|
+
"module": "src/state/debug-event-log.ts"
|
|
7252
|
+
}
|
|
7253
|
+
},
|
|
7266
7254
|
{
|
|
7267
7255
|
"kind": "js",
|
|
7268
|
-
"name": "
|
|
7256
|
+
"name": "mergeMetaEvents",
|
|
7269
7257
|
"declaration": {
|
|
7270
|
-
"name": "
|
|
7271
|
-
"module": "src/
|
|
7258
|
+
"name": "mergeMetaEvents",
|
|
7259
|
+
"module": "src/state/debug-event-log.ts"
|
|
7272
7260
|
}
|
|
7273
|
-
}
|
|
7274
|
-
]
|
|
7275
|
-
},
|
|
7276
|
-
{
|
|
7277
|
-
"kind": "javascript-module",
|
|
7278
|
-
"path": "src/provider/assistant-app-settings.ts",
|
|
7279
|
-
"declarations": [
|
|
7261
|
+
},
|
|
7280
7262
|
{
|
|
7281
|
-
"kind": "
|
|
7282
|
-
"name": "
|
|
7283
|
-
"
|
|
7284
|
-
|
|
7285
|
-
|
|
7286
|
-
|
|
7263
|
+
"kind": "js",
|
|
7264
|
+
"name": "clearSession",
|
|
7265
|
+
"declaration": {
|
|
7266
|
+
"name": "clearSession",
|
|
7267
|
+
"module": "src/state/debug-event-log.ts"
|
|
7268
|
+
}
|
|
7269
|
+
},
|
|
7287
7270
|
{
|
|
7288
7271
|
"kind": "js",
|
|
7289
|
-
"name": "
|
|
7272
|
+
"name": "DEBUG_LOG_README",
|
|
7290
7273
|
"declaration": {
|
|
7291
|
-
"name": "
|
|
7292
|
-
"module": "src/
|
|
7274
|
+
"name": "DEBUG_LOG_README",
|
|
7275
|
+
"module": "src/state/debug-event-log.ts"
|
|
7293
7276
|
}
|
|
7294
7277
|
}
|
|
7295
7278
|
]
|
|
7296
7279
|
},
|
|
7297
7280
|
{
|
|
7298
7281
|
"kind": "javascript-module",
|
|
7299
|
-
"path": "src/
|
|
7282
|
+
"path": "src/state/driver-registry.ts",
|
|
7300
7283
|
"declarations": [
|
|
7301
7284
|
{
|
|
7302
|
-
"kind": "
|
|
7303
|
-
"
|
|
7304
|
-
"
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
"
|
|
7313
|
-
|
|
7314
|
-
|
|
7315
|
-
"kind": "field",
|
|
7316
|
-
"name": "options",
|
|
7317
|
-
"type": {
|
|
7318
|
-
"text": "TieredAIProviderSwitcherOptions"
|
|
7319
|
-
},
|
|
7320
|
-
"privacy": "private",
|
|
7321
|
-
"readonly": true,
|
|
7322
|
-
"default": "options"
|
|
7323
|
-
},
|
|
7324
|
-
{
|
|
7325
|
-
"kind": "field",
|
|
7326
|
-
"name": "defaultTier",
|
|
7327
|
-
"type": {
|
|
7328
|
-
"text": "AITierId"
|
|
7329
|
-
},
|
|
7330
|
-
"privacy": "private",
|
|
7331
|
-
"readonly": true
|
|
7332
|
-
},
|
|
7333
|
-
{
|
|
7334
|
-
"kind": "field",
|
|
7335
|
-
"name": "registry",
|
|
7336
|
-
"type": {
|
|
7337
|
-
"text": "MutableAIProviderRegistry"
|
|
7338
|
-
},
|
|
7339
|
-
"privacy": "private",
|
|
7340
|
-
"readonly": true
|
|
7341
|
-
},
|
|
7342
|
-
{
|
|
7343
|
-
"kind": "field",
|
|
7344
|
-
"name": "listeners",
|
|
7345
|
-
"privacy": "private",
|
|
7346
|
-
"readonly": true,
|
|
7347
|
-
"default": "new Set<(vendor: AITierVendor) => void>()"
|
|
7348
|
-
},
|
|
7349
|
-
{
|
|
7350
|
-
"kind": "field",
|
|
7351
|
-
"name": "_vendor",
|
|
7352
|
-
"type": {
|
|
7353
|
-
"text": "AITierVendor"
|
|
7354
|
-
},
|
|
7355
|
-
"privacy": "private"
|
|
7356
|
-
},
|
|
7357
|
-
{
|
|
7358
|
-
"kind": "field",
|
|
7359
|
-
"name": "vendor",
|
|
7360
|
-
"type": {
|
|
7361
|
-
"text": "AITierVendor"
|
|
7362
|
-
},
|
|
7363
|
-
"readonly": true
|
|
7364
|
-
},
|
|
7365
|
-
{
|
|
7366
|
-
"kind": "method",
|
|
7367
|
-
"name": "switchTo",
|
|
7368
|
-
"return": {
|
|
7369
|
-
"type": {
|
|
7370
|
-
"text": "void"
|
|
7371
|
-
}
|
|
7372
|
-
},
|
|
7373
|
-
"parameters": [
|
|
7374
|
-
{
|
|
7375
|
-
"name": "vendor",
|
|
7376
|
-
"type": {
|
|
7377
|
-
"text": "string"
|
|
7378
|
-
}
|
|
7379
|
-
}
|
|
7380
|
-
],
|
|
7381
|
-
"description": "A user-driven switch: move the registry, then tell the app so it can persist the choice.\nAn unknown vendor is ignored."
|
|
7382
|
-
},
|
|
7383
|
-
{
|
|
7384
|
-
"kind": "method",
|
|
7385
|
-
"name": "adoptPersistedVendor",
|
|
7386
|
-
"return": {
|
|
7387
|
-
"type": {
|
|
7388
|
-
"text": "void"
|
|
7389
|
-
}
|
|
7390
|
-
},
|
|
7391
|
-
"parameters": [
|
|
7392
|
-
{
|
|
7393
|
-
"name": "vendor",
|
|
7394
|
-
"type": {
|
|
7395
|
-
"text": "string"
|
|
7396
|
-
}
|
|
7397
|
-
}
|
|
7398
|
-
],
|
|
7399
|
-
"description": "Adopt a vendor the app read back from its own store — the same registry move as\nTieredAIProviderSwitcher.switchTo, without the `onSwitch` callback, because this\nvalue came FROM the store and writing it back would be a pointless round-trip on load.\n\nExists because registration has to stay synchronous: an element that connects before the\ntoken is registered caches the platform's no-op fallback, so an app cannot await its\nstored preference before constructing this. It boots on `initialVendor` and adopts the\nstored one a moment later, through a registry that is mutable and held by reference."
|
|
7400
|
-
},
|
|
7401
|
-
{
|
|
7402
|
-
"kind": "method",
|
|
7403
|
-
"name": "subscribe",
|
|
7404
|
-
"return": {
|
|
7405
|
-
"type": {
|
|
7406
|
-
"text": "() => void"
|
|
7407
|
-
}
|
|
7408
|
-
},
|
|
7409
|
-
"parameters": [
|
|
7410
|
-
{
|
|
7411
|
-
"name": "listener",
|
|
7412
|
-
"type": {
|
|
7413
|
-
"text": "(vendor: string) => void"
|
|
7414
|
-
}
|
|
7415
|
-
}
|
|
7416
|
-
]
|
|
7417
|
-
},
|
|
7418
|
-
{
|
|
7419
|
-
"kind": "method",
|
|
7420
|
-
"name": "apply",
|
|
7421
|
-
"privacy": "private",
|
|
7422
|
-
"return": {
|
|
7423
|
-
"type": {
|
|
7424
|
-
"text": "void"
|
|
7425
|
-
}
|
|
7426
|
-
},
|
|
7427
|
-
"parameters": [
|
|
7428
|
-
{
|
|
7429
|
-
"name": "vendor",
|
|
7430
|
-
"type": {
|
|
7431
|
-
"text": "AITierVendor"
|
|
7432
|
-
}
|
|
7433
|
-
}
|
|
7434
|
-
],
|
|
7435
|
-
"description": "The registry move both entry points share, and nothing else."
|
|
7285
|
+
"kind": "function",
|
|
7286
|
+
"name": "getOrCreateDriver",
|
|
7287
|
+
"return": {
|
|
7288
|
+
"type": {
|
|
7289
|
+
"text": "AiDriver"
|
|
7290
|
+
}
|
|
7291
|
+
},
|
|
7292
|
+
"parameters": [
|
|
7293
|
+
{
|
|
7294
|
+
"name": "key",
|
|
7295
|
+
"type": {
|
|
7296
|
+
"text": "string"
|
|
7297
|
+
}
|
|
7436
7298
|
},
|
|
7437
7299
|
{
|
|
7438
|
-
"
|
|
7439
|
-
"
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
"type": {
|
|
7443
|
-
"text": "Record<string, AIProvider>"
|
|
7444
|
-
}
|
|
7445
|
-
},
|
|
7446
|
-
"parameters": [
|
|
7447
|
-
{
|
|
7448
|
-
"name": "vendor",
|
|
7449
|
-
"type": {
|
|
7450
|
-
"text": "AITierVendor"
|
|
7451
|
-
}
|
|
7452
|
-
}
|
|
7453
|
-
]
|
|
7300
|
+
"name": "agentsKey",
|
|
7301
|
+
"type": {
|
|
7302
|
+
"text": "string"
|
|
7303
|
+
}
|
|
7454
7304
|
},
|
|
7455
7305
|
{
|
|
7456
|
-
"
|
|
7457
|
-
"
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
"type": {
|
|
7461
|
-
"text": "vendor is AITierVendor"
|
|
7462
|
-
}
|
|
7463
|
-
},
|
|
7464
|
-
"parameters": [
|
|
7465
|
-
{
|
|
7466
|
-
"name": "vendor",
|
|
7467
|
-
"type": {
|
|
7468
|
-
"text": "string"
|
|
7469
|
-
}
|
|
7470
|
-
}
|
|
7471
|
-
]
|
|
7306
|
+
"name": "factory",
|
|
7307
|
+
"type": {
|
|
7308
|
+
"text": "() => AiDriver"
|
|
7309
|
+
}
|
|
7472
7310
|
}
|
|
7473
|
-
]
|
|
7311
|
+
],
|
|
7312
|
+
"description": "Returns the existing driver for the given key, or calls the factory to create\nand register a new one. `agentsKey` is the fingerprint of the agents the\ndriver is being built for; it is recorded only when a driver is created (a\nreused driver keeps the fingerprint it was originally built with)."
|
|
7474
7313
|
},
|
|
7475
7314
|
{
|
|
7476
7315
|
"kind": "function",
|
|
7477
|
-
"name": "
|
|
7316
|
+
"name": "getDriver",
|
|
7478
7317
|
"return": {
|
|
7479
7318
|
"type": {
|
|
7480
|
-
"text": "
|
|
7319
|
+
"text": "AiDriver | undefined"
|
|
7481
7320
|
}
|
|
7482
7321
|
},
|
|
7483
7322
|
"parameters": [
|
|
7484
7323
|
{
|
|
7485
|
-
"name": "
|
|
7324
|
+
"name": "key",
|
|
7486
7325
|
"type": {
|
|
7487
|
-
"text": "
|
|
7326
|
+
"text": "string"
|
|
7327
|
+
}
|
|
7328
|
+
}
|
|
7329
|
+
],
|
|
7330
|
+
"description": "Returns the existing driver for the given key, or `undefined`."
|
|
7331
|
+
},
|
|
7332
|
+
{
|
|
7333
|
+
"kind": "function",
|
|
7334
|
+
"name": "getDriverAgentsKey",
|
|
7335
|
+
"return": {
|
|
7336
|
+
"type": {
|
|
7337
|
+
"text": "string | undefined"
|
|
7338
|
+
}
|
|
7339
|
+
},
|
|
7340
|
+
"parameters": [
|
|
7341
|
+
{
|
|
7342
|
+
"name": "key",
|
|
7343
|
+
"type": {
|
|
7344
|
+
"text": "string"
|
|
7345
|
+
}
|
|
7346
|
+
}
|
|
7347
|
+
],
|
|
7348
|
+
"description": "The agents fingerprint the registry driver for `key` was built with, or\n`undefined` if no driver is registered. Used by `agentsChanged` to decide\nwhether a sibling has already rebuilt the shared driver to the desired agents."
|
|
7349
|
+
},
|
|
7350
|
+
{
|
|
7351
|
+
"kind": "function",
|
|
7352
|
+
"name": "deleteDriver",
|
|
7353
|
+
"return": {
|
|
7354
|
+
"type": {
|
|
7355
|
+
"text": "AiDriver | undefined"
|
|
7356
|
+
}
|
|
7357
|
+
},
|
|
7358
|
+
"parameters": [
|
|
7359
|
+
{
|
|
7360
|
+
"name": "key",
|
|
7361
|
+
"type": {
|
|
7362
|
+
"text": "string"
|
|
7363
|
+
}
|
|
7364
|
+
}
|
|
7365
|
+
],
|
|
7366
|
+
"description": "Removes and returns the driver for the given key.\nUsed when agents change (driver must be rebuilt) or on explicit session teardown."
|
|
7367
|
+
}
|
|
7368
|
+
],
|
|
7369
|
+
"exports": [
|
|
7370
|
+
{
|
|
7371
|
+
"kind": "js",
|
|
7372
|
+
"name": "getOrCreateDriver",
|
|
7373
|
+
"declaration": {
|
|
7374
|
+
"name": "getOrCreateDriver",
|
|
7375
|
+
"module": "src/state/driver-registry.ts"
|
|
7376
|
+
}
|
|
7377
|
+
},
|
|
7378
|
+
{
|
|
7379
|
+
"kind": "js",
|
|
7380
|
+
"name": "getDriver",
|
|
7381
|
+
"declaration": {
|
|
7382
|
+
"name": "getDriver",
|
|
7383
|
+
"module": "src/state/driver-registry.ts"
|
|
7384
|
+
}
|
|
7385
|
+
},
|
|
7386
|
+
{
|
|
7387
|
+
"kind": "js",
|
|
7388
|
+
"name": "getDriverAgentsKey",
|
|
7389
|
+
"declaration": {
|
|
7390
|
+
"name": "getDriverAgentsKey",
|
|
7391
|
+
"module": "src/state/driver-registry.ts"
|
|
7392
|
+
}
|
|
7393
|
+
},
|
|
7394
|
+
{
|
|
7395
|
+
"kind": "js",
|
|
7396
|
+
"name": "deleteDriver",
|
|
7397
|
+
"declaration": {
|
|
7398
|
+
"name": "deleteDriver",
|
|
7399
|
+
"module": "src/state/driver-registry.ts"
|
|
7400
|
+
}
|
|
7401
|
+
}
|
|
7402
|
+
]
|
|
7403
|
+
},
|
|
7404
|
+
{
|
|
7405
|
+
"kind": "javascript-module",
|
|
7406
|
+
"path": "src/state/interaction-context.ts",
|
|
7407
|
+
"declarations": [],
|
|
7408
|
+
"exports": []
|
|
7409
|
+
},
|
|
7410
|
+
{
|
|
7411
|
+
"kind": "javascript-module",
|
|
7412
|
+
"path": "src/state/session-store.ts",
|
|
7413
|
+
"declarations": [
|
|
7414
|
+
{
|
|
7415
|
+
"kind": "function",
|
|
7416
|
+
"name": "getSessionStore",
|
|
7417
|
+
"return": {
|
|
7418
|
+
"type": {
|
|
7419
|
+
"text": "SessionStoreReturn"
|
|
7420
|
+
}
|
|
7421
|
+
},
|
|
7422
|
+
"parameters": [
|
|
7423
|
+
{
|
|
7424
|
+
"name": "key",
|
|
7425
|
+
"type": {
|
|
7426
|
+
"text": "string"
|
|
7488
7427
|
}
|
|
7489
7428
|
},
|
|
7490
7429
|
{
|
|
7491
|
-
"name": "
|
|
7430
|
+
"name": "devTools",
|
|
7431
|
+
"optional": true,
|
|
7492
7432
|
"type": {
|
|
7493
|
-
"text": "
|
|
7433
|
+
"text": "boolean"
|
|
7494
7434
|
}
|
|
7495
7435
|
}
|
|
7496
7436
|
],
|
|
7497
|
-
"description": "
|
|
7437
|
+
"description": "Returns the session store for the given key, creating one if it does not\nalready exist. Omit `devTools` (or pass `undefined`) to defer to `isDev()`.\nPass `true` to force-enable or `false` to force-disable Redux DevTools."
|
|
7438
|
+
},
|
|
7439
|
+
{
|
|
7440
|
+
"kind": "function",
|
|
7441
|
+
"name": "hasSessionStore",
|
|
7442
|
+
"return": {
|
|
7443
|
+
"type": {
|
|
7444
|
+
"text": "boolean"
|
|
7445
|
+
}
|
|
7446
|
+
},
|
|
7447
|
+
"parameters": [
|
|
7448
|
+
{
|
|
7449
|
+
"name": "key",
|
|
7450
|
+
"type": {
|
|
7451
|
+
"text": "string"
|
|
7452
|
+
}
|
|
7453
|
+
}
|
|
7454
|
+
],
|
|
7455
|
+
"description": "Returns true if a session store already exists for the given key."
|
|
7456
|
+
},
|
|
7457
|
+
{
|
|
7458
|
+
"kind": "function",
|
|
7459
|
+
"name": "deleteSessionStore",
|
|
7460
|
+
"return": {
|
|
7461
|
+
"type": {
|
|
7462
|
+
"text": "void"
|
|
7463
|
+
}
|
|
7464
|
+
},
|
|
7465
|
+
"parameters": [
|
|
7466
|
+
{
|
|
7467
|
+
"name": "key",
|
|
7468
|
+
"type": {
|
|
7469
|
+
"text": "string"
|
|
7470
|
+
}
|
|
7471
|
+
}
|
|
7472
|
+
],
|
|
7473
|
+
"description": "Deletes the session store for the given key."
|
|
7498
7474
|
}
|
|
7499
7475
|
],
|
|
7500
7476
|
"exports": [
|
|
7501
7477
|
{
|
|
7502
7478
|
"kind": "js",
|
|
7503
|
-
"name": "
|
|
7479
|
+
"name": "getSessionStore",
|
|
7504
7480
|
"declaration": {
|
|
7505
|
-
"name": "
|
|
7506
|
-
"module": "src/
|
|
7481
|
+
"name": "getSessionStore",
|
|
7482
|
+
"module": "src/state/session-store.ts"
|
|
7507
7483
|
}
|
|
7508
7484
|
},
|
|
7509
7485
|
{
|
|
7510
7486
|
"kind": "js",
|
|
7511
|
-
"name": "
|
|
7487
|
+
"name": "hasSessionStore",
|
|
7512
7488
|
"declaration": {
|
|
7513
|
-
"name": "
|
|
7514
|
-
"module": "src/
|
|
7489
|
+
"name": "hasSessionStore",
|
|
7490
|
+
"module": "src/state/session-store.ts"
|
|
7491
|
+
}
|
|
7492
|
+
},
|
|
7493
|
+
{
|
|
7494
|
+
"kind": "js",
|
|
7495
|
+
"name": "deleteSessionStore",
|
|
7496
|
+
"declaration": {
|
|
7497
|
+
"name": "deleteSessionStore",
|
|
7498
|
+
"module": "src/state/session-store.ts"
|
|
7499
|
+
}
|
|
7500
|
+
},
|
|
7501
|
+
{
|
|
7502
|
+
"kind": "js",
|
|
7503
|
+
"name": "SessionStoreReturn",
|
|
7504
|
+
"declaration": {
|
|
7505
|
+
"name": "SessionStoreReturn",
|
|
7506
|
+
"module": "src/state/session-store.ts"
|
|
7507
|
+
}
|
|
7508
|
+
},
|
|
7509
|
+
{
|
|
7510
|
+
"kind": "js",
|
|
7511
|
+
"name": "AiAssistantSessionState",
|
|
7512
|
+
"declaration": {
|
|
7513
|
+
"name": "AiAssistantSessionState",
|
|
7514
|
+
"module": "src/state/session-store.ts"
|
|
7515
7515
|
}
|
|
7516
7516
|
}
|
|
7517
7517
|
]
|
|
@@ -11161,6 +11161,25 @@
|
|
|
11161
11161
|
}
|
|
11162
11162
|
]
|
|
11163
11163
|
},
|
|
11164
|
+
{
|
|
11165
|
+
"kind": "method",
|
|
11166
|
+
"name": "findAssistant",
|
|
11167
|
+
"privacy": "private",
|
|
11168
|
+
"return": {
|
|
11169
|
+
"type": {
|
|
11170
|
+
"text": "Element | null"
|
|
11171
|
+
}
|
|
11172
|
+
},
|
|
11173
|
+
"parameters": [
|
|
11174
|
+
{
|
|
11175
|
+
"name": "nodes",
|
|
11176
|
+
"optional": true,
|
|
11177
|
+
"type": {
|
|
11178
|
+
"text": "HTMLElement[]"
|
|
11179
|
+
}
|
|
11180
|
+
}
|
|
11181
|
+
]
|
|
11182
|
+
},
|
|
11164
11183
|
{
|
|
11165
11184
|
"kind": "method",
|
|
11166
11185
|
"name": "injectCloseButton",
|
|
@@ -11174,6 +11193,11 @@
|
|
|
11174
11193
|
}
|
|
11175
11194
|
]
|
|
11176
11195
|
},
|
|
11196
|
+
{
|
|
11197
|
+
"kind": "method",
|
|
11198
|
+
"name": "removeCloseButton",
|
|
11199
|
+
"privacy": "private"
|
|
11200
|
+
},
|
|
11177
11201
|
{
|
|
11178
11202
|
"kind": "method",
|
|
11179
11203
|
"name": "onBubbleMouseDown",
|