@genesislcap/ai-assistant 15.51.1 → 15.52.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.
- package/dist/custom-elements.json +600 -600
- package/package.json +17 -17
|
@@ -1754,6 +1754,211 @@
|
|
|
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
|
+
},
|
|
1757
1962
|
{
|
|
1758
1963
|
"kind": "javascript-module",
|
|
1759
1964
|
"path": "src/genesis/calendar.ts",
|
|
@@ -2939,253 +3144,48 @@
|
|
|
2939
3144
|
},
|
|
2940
3145
|
{
|
|
2941
3146
|
"kind": "javascript-module",
|
|
2942
|
-
"path": "src/
|
|
2943
|
-
"declarations": [
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
],
|
|
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": [],
|
|
2950
3185
|
"exports": [
|
|
2951
3186
|
{
|
|
2952
3187
|
"kind": "js",
|
|
2953
|
-
"name": "
|
|
2954
|
-
"declaration": {
|
|
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": "*",
|
|
3188
|
+
"name": "*",
|
|
3189
3189
|
"declaration": {
|
|
3190
3190
|
"name": "*",
|
|
3191
3191
|
"package": "./main.template"
|
|
@@ -6711,415 +6711,151 @@
|
|
|
6711
6711
|
},
|
|
6712
6712
|
{
|
|
6713
6713
|
"kind": "javascript-module",
|
|
6714
|
-
"path": "src/
|
|
6714
|
+
"path": "src/state/ai-assistant-slice.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
|
+
},
|
|
6716
6726
|
{
|
|
6717
6727
|
"kind": "variable",
|
|
6718
|
-
"name": "
|
|
6719
|
-
"
|
|
6728
|
+
"name": "defaultSessionState",
|
|
6729
|
+
"type": {
|
|
6730
|
+
"text": "AiAssistantSessionState"
|
|
6731
|
+
}
|
|
6732
|
+
},
|
|
6733
|
+
{
|
|
6734
|
+
"kind": "variable",
|
|
6735
|
+
"name": "aiAssistantSlice"
|
|
6720
6736
|
}
|
|
6721
6737
|
],
|
|
6722
6738
|
"exports": [
|
|
6723
6739
|
{
|
|
6724
6740
|
"kind": "js",
|
|
6725
|
-
"name": "
|
|
6741
|
+
"name": "createDefaultSessionState",
|
|
6726
6742
|
"declaration": {
|
|
6727
|
-
"name": "
|
|
6728
|
-
"module": "src/
|
|
6743
|
+
"name": "createDefaultSessionState",
|
|
6744
|
+
"module": "src/state/ai-assistant-slice.ts"
|
|
6729
6745
|
}
|
|
6730
|
-
}
|
|
6731
|
-
]
|
|
6732
|
-
},
|
|
6733
|
-
{
|
|
6734
|
-
"kind": "javascript-module",
|
|
6735
|
-
"path": "src/provider/assistant-app-settings.ts",
|
|
6736
|
-
"declarations": [
|
|
6746
|
+
},
|
|
6737
6747
|
{
|
|
6738
|
-
"kind": "
|
|
6739
|
-
"name": "
|
|
6740
|
-
"
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
|
|
6748
|
+
"kind": "js",
|
|
6749
|
+
"name": "defaultSessionState",
|
|
6750
|
+
"declaration": {
|
|
6751
|
+
"name": "defaultSessionState",
|
|
6752
|
+
"module": "src/state/ai-assistant-slice.ts"
|
|
6753
|
+
}
|
|
6754
|
+
},
|
|
6744
6755
|
{
|
|
6745
6756
|
"kind": "js",
|
|
6746
|
-
"name": "
|
|
6757
|
+
"name": "aiAssistantSlice",
|
|
6747
6758
|
"declaration": {
|
|
6748
|
-
"name": "
|
|
6749
|
-
"module": "src/
|
|
6759
|
+
"name": "aiAssistantSlice",
|
|
6760
|
+
"module": "src/state/ai-assistant-slice.ts"
|
|
6750
6761
|
}
|
|
6751
6762
|
}
|
|
6752
6763
|
]
|
|
6753
6764
|
},
|
|
6754
6765
|
{
|
|
6755
6766
|
"kind": "javascript-module",
|
|
6756
|
-
"path": "src/
|
|
6767
|
+
"path": "src/state/debug-event-log.ts",
|
|
6757
6768
|
"declarations": [
|
|
6758
6769
|
{
|
|
6759
|
-
"kind": "
|
|
6760
|
-
"
|
|
6761
|
-
"
|
|
6762
|
-
|
|
6770
|
+
"kind": "variable",
|
|
6771
|
+
"name": "META_EVENT_IMPORTANCE",
|
|
6772
|
+
"type": {
|
|
6773
|
+
"text": "Record<MetaEventType, MetaEventImportance>"
|
|
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": [
|
|
6763
6787
|
{
|
|
6764
|
-
"
|
|
6765
|
-
"name": "vendors",
|
|
6788
|
+
"name": "key",
|
|
6766
6789
|
"type": {
|
|
6767
|
-
"text": "
|
|
6768
|
-
}
|
|
6769
|
-
"readonly": true
|
|
6790
|
+
"text": "string"
|
|
6791
|
+
}
|
|
6770
6792
|
},
|
|
6771
6793
|
{
|
|
6772
|
-
"
|
|
6773
|
-
"name": "options",
|
|
6794
|
+
"name": "type",
|
|
6774
6795
|
"type": {
|
|
6775
|
-
"text": "
|
|
6776
|
-
}
|
|
6777
|
-
"privacy": "private",
|
|
6778
|
-
"readonly": true,
|
|
6779
|
-
"default": "options"
|
|
6796
|
+
"text": "MetaEventType"
|
|
6797
|
+
}
|
|
6780
6798
|
},
|
|
6781
6799
|
{
|
|
6782
|
-
"
|
|
6783
|
-
"
|
|
6800
|
+
"name": "detail",
|
|
6801
|
+
"optional": true,
|
|
6784
6802
|
"type": {
|
|
6785
|
-
"text": "
|
|
6786
|
-
}
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6803
|
+
"text": "Record<string, unknown>"
|
|
6804
|
+
}
|
|
6805
|
+
}
|
|
6806
|
+
],
|
|
6807
|
+
"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."
|
|
6808
|
+
},
|
|
6809
|
+
{
|
|
6810
|
+
"kind": "function",
|
|
6811
|
+
"name": "recordTurnError",
|
|
6812
|
+
"return": {
|
|
6813
|
+
"type": {
|
|
6814
|
+
"text": "void"
|
|
6815
|
+
}
|
|
6816
|
+
},
|
|
6817
|
+
"parameters": [
|
|
6790
6818
|
{
|
|
6791
|
-
"
|
|
6792
|
-
"name": "registry",
|
|
6819
|
+
"name": "key",
|
|
6793
6820
|
"type": {
|
|
6794
|
-
"text": "
|
|
6795
|
-
}
|
|
6796
|
-
"privacy": "private",
|
|
6797
|
-
"readonly": true
|
|
6798
|
-
},
|
|
6799
|
-
{
|
|
6800
|
-
"kind": "field",
|
|
6801
|
-
"name": "listeners",
|
|
6802
|
-
"privacy": "private",
|
|
6803
|
-
"readonly": true,
|
|
6804
|
-
"default": "new Set<(vendor: AITierVendor) => void>()"
|
|
6821
|
+
"text": "string"
|
|
6822
|
+
}
|
|
6805
6823
|
},
|
|
6806
6824
|
{
|
|
6807
|
-
"
|
|
6808
|
-
"name": "_vendor",
|
|
6825
|
+
"name": "reason",
|
|
6809
6826
|
"type": {
|
|
6810
|
-
"text": "
|
|
6811
|
-
}
|
|
6812
|
-
"privacy": "private"
|
|
6827
|
+
"text": "TurnFailureReason"
|
|
6828
|
+
}
|
|
6813
6829
|
},
|
|
6814
6830
|
{
|
|
6815
|
-
"
|
|
6816
|
-
"
|
|
6831
|
+
"name": "detail",
|
|
6832
|
+
"optional": true,
|
|
6817
6833
|
"type": {
|
|
6818
|
-
"text": "
|
|
6819
|
-
}
|
|
6820
|
-
"readonly": true
|
|
6821
|
-
},
|
|
6822
|
-
{
|
|
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."
|
|
6839
|
-
},
|
|
6840
|
-
{
|
|
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
|
-
},
|
|
6858
|
-
{
|
|
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
|
-
]
|
|
6834
|
+
"text": "Record<string, unknown>"
|
|
6835
|
+
}
|
|
6929
6836
|
}
|
|
6930
|
-
]
|
|
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`."
|
|
6931
6839
|
},
|
|
6932
6840
|
{
|
|
6933
6841
|
"kind": "function",
|
|
6934
|
-
"name": "
|
|
6842
|
+
"name": "recordTurnRetry",
|
|
6935
6843
|
"return": {
|
|
6936
6844
|
"type": {
|
|
6937
|
-
"text": "
|
|
6845
|
+
"text": "void"
|
|
6938
6846
|
}
|
|
6939
6847
|
},
|
|
6940
6848
|
"parameters": [
|
|
6941
6849
|
{
|
|
6942
|
-
"name": "
|
|
6850
|
+
"name": "key",
|
|
6943
6851
|
"type": {
|
|
6944
|
-
"text": "
|
|
6852
|
+
"text": "string"
|
|
6945
6853
|
}
|
|
6946
6854
|
},
|
|
6947
6855
|
{
|
|
6948
|
-
"name": "
|
|
6856
|
+
"name": "reason",
|
|
6949
6857
|
"type": {
|
|
6950
|
-
"text": "
|
|
6951
|
-
}
|
|
6952
|
-
}
|
|
6953
|
-
],
|
|
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."
|
|
6955
|
-
}
|
|
6956
|
-
],
|
|
6957
|
-
"exports": [
|
|
6958
|
-
{
|
|
6959
|
-
"kind": "js",
|
|
6960
|
-
"name": "TieredAIProviderSwitcher",
|
|
6961
|
-
"declaration": {
|
|
6962
|
-
"name": "TieredAIProviderSwitcher",
|
|
6963
|
-
"module": "src/provider/tiered-provider-switcher.ts"
|
|
6964
|
-
}
|
|
6965
|
-
},
|
|
6966
|
-
{
|
|
6967
|
-
"kind": "js",
|
|
6968
|
-
"name": "registerTieredAIProviders",
|
|
6969
|
-
"declaration": {
|
|
6970
|
-
"name": "registerTieredAIProviders",
|
|
6971
|
-
"module": "src/provider/tiered-provider-switcher.ts"
|
|
6972
|
-
}
|
|
6973
|
-
}
|
|
6974
|
-
]
|
|
6975
|
-
},
|
|
6976
|
-
{
|
|
6977
|
-
"kind": "javascript-module",
|
|
6978
|
-
"path": "src/state/ai-assistant-slice.ts",
|
|
6979
|
-
"declarations": [
|
|
6980
|
-
{
|
|
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."
|
|
6989
|
-
},
|
|
6990
|
-
{
|
|
6991
|
-
"kind": "variable",
|
|
6992
|
-
"name": "defaultSessionState",
|
|
6993
|
-
"type": {
|
|
6994
|
-
"text": "AiAssistantSessionState"
|
|
6995
|
-
}
|
|
6996
|
-
},
|
|
6997
|
-
{
|
|
6998
|
-
"kind": "variable",
|
|
6999
|
-
"name": "aiAssistantSlice"
|
|
7000
|
-
}
|
|
7001
|
-
],
|
|
7002
|
-
"exports": [
|
|
7003
|
-
{
|
|
7004
|
-
"kind": "js",
|
|
7005
|
-
"name": "createDefaultSessionState",
|
|
7006
|
-
"declaration": {
|
|
7007
|
-
"name": "createDefaultSessionState",
|
|
7008
|
-
"module": "src/state/ai-assistant-slice.ts"
|
|
7009
|
-
}
|
|
7010
|
-
},
|
|
7011
|
-
{
|
|
7012
|
-
"kind": "js",
|
|
7013
|
-
"name": "defaultSessionState",
|
|
7014
|
-
"declaration": {
|
|
7015
|
-
"name": "defaultSessionState",
|
|
7016
|
-
"module": "src/state/ai-assistant-slice.ts"
|
|
7017
|
-
}
|
|
7018
|
-
},
|
|
7019
|
-
{
|
|
7020
|
-
"kind": "js",
|
|
7021
|
-
"name": "aiAssistantSlice",
|
|
7022
|
-
"declaration": {
|
|
7023
|
-
"name": "aiAssistantSlice",
|
|
7024
|
-
"module": "src/state/ai-assistant-slice.ts"
|
|
7025
|
-
}
|
|
7026
|
-
}
|
|
7027
|
-
]
|
|
7028
|
-
},
|
|
7029
|
-
{
|
|
7030
|
-
"kind": "javascript-module",
|
|
7031
|
-
"path": "src/state/debug-event-log.ts",
|
|
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
|
-
},
|
|
7042
|
-
{
|
|
7043
|
-
"kind": "function",
|
|
7044
|
-
"name": "recordMetaEvent",
|
|
7045
|
-
"return": {
|
|
7046
|
-
"type": {
|
|
7047
|
-
"text": "void"
|
|
7048
|
-
}
|
|
7049
|
-
},
|
|
7050
|
-
"parameters": [
|
|
7051
|
-
{
|
|
7052
|
-
"name": "key",
|
|
7053
|
-
"type": {
|
|
7054
|
-
"text": "string"
|
|
7055
|
-
}
|
|
7056
|
-
},
|
|
7057
|
-
{
|
|
7058
|
-
"name": "type",
|
|
7059
|
-
"type": {
|
|
7060
|
-
"text": "MetaEventType"
|
|
7061
|
-
}
|
|
7062
|
-
},
|
|
7063
|
-
{
|
|
7064
|
-
"name": "detail",
|
|
7065
|
-
"optional": true,
|
|
7066
|
-
"type": {
|
|
7067
|
-
"text": "Record<string, unknown>"
|
|
7068
|
-
}
|
|
7069
|
-
}
|
|
7070
|
-
],
|
|
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."
|
|
7072
|
-
},
|
|
7073
|
-
{
|
|
7074
|
-
"kind": "function",
|
|
7075
|
-
"name": "recordTurnError",
|
|
7076
|
-
"return": {
|
|
7077
|
-
"type": {
|
|
7078
|
-
"text": "void"
|
|
7079
|
-
}
|
|
7080
|
-
},
|
|
7081
|
-
"parameters": [
|
|
7082
|
-
{
|
|
7083
|
-
"name": "key",
|
|
7084
|
-
"type": {
|
|
7085
|
-
"text": "string"
|
|
7086
|
-
}
|
|
7087
|
-
},
|
|
7088
|
-
{
|
|
7089
|
-
"name": "reason",
|
|
7090
|
-
"type": {
|
|
7091
|
-
"text": "TurnFailureReason"
|
|
7092
|
-
}
|
|
7093
|
-
},
|
|
7094
|
-
{
|
|
7095
|
-
"name": "detail",
|
|
7096
|
-
"optional": true,
|
|
7097
|
-
"type": {
|
|
7098
|
-
"text": "Record<string, unknown>"
|
|
7099
|
-
}
|
|
7100
|
-
}
|
|
7101
|
-
],
|
|
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`."
|
|
7103
|
-
},
|
|
7104
|
-
{
|
|
7105
|
-
"kind": "function",
|
|
7106
|
-
"name": "recordTurnRetry",
|
|
7107
|
-
"return": {
|
|
7108
|
-
"type": {
|
|
7109
|
-
"text": "void"
|
|
7110
|
-
}
|
|
7111
|
-
},
|
|
7112
|
-
"parameters": [
|
|
7113
|
-
{
|
|
7114
|
-
"name": "key",
|
|
7115
|
-
"type": {
|
|
7116
|
-
"text": "string"
|
|
7117
|
-
}
|
|
7118
|
-
},
|
|
7119
|
-
{
|
|
7120
|
-
"name": "reason",
|
|
7121
|
-
"type": {
|
|
7122
|
-
"text": "TurnFailureReason"
|
|
6858
|
+
"text": "TurnFailureReason"
|
|
7123
6859
|
}
|
|
7124
6860
|
},
|
|
7125
6861
|
{
|
|
@@ -7516,6 +7252,270 @@
|
|
|
7516
7252
|
}
|
|
7517
7253
|
]
|
|
7518
7254
|
},
|
|
7255
|
+
{
|
|
7256
|
+
"kind": "javascript-module",
|
|
7257
|
+
"path": "src/provider/ai-provider-switcher.ts",
|
|
7258
|
+
"declarations": [
|
|
7259
|
+
{
|
|
7260
|
+
"kind": "variable",
|
|
7261
|
+
"name": "AIProviderSwitcher",
|
|
7262
|
+
"description": "The DI token for the (AIProviderSwitcher:interface). Resolves a noop until the app\nregisters one."
|
|
7263
|
+
}
|
|
7264
|
+
],
|
|
7265
|
+
"exports": [
|
|
7266
|
+
{
|
|
7267
|
+
"kind": "js",
|
|
7268
|
+
"name": "AIProviderSwitcher",
|
|
7269
|
+
"declaration": {
|
|
7270
|
+
"name": "AIProviderSwitcher",
|
|
7271
|
+
"module": "src/provider/ai-provider-switcher.ts"
|
|
7272
|
+
}
|
|
7273
|
+
}
|
|
7274
|
+
]
|
|
7275
|
+
},
|
|
7276
|
+
{
|
|
7277
|
+
"kind": "javascript-module",
|
|
7278
|
+
"path": "src/provider/assistant-app-settings.ts",
|
|
7279
|
+
"declarations": [
|
|
7280
|
+
{
|
|
7281
|
+
"kind": "variable",
|
|
7282
|
+
"name": "AssistantAppSettingsProvider",
|
|
7283
|
+
"description": "The DI token for the (AssistantAppSettingsProvider:interface). Resolves a noop\nuntil the host registers one."
|
|
7284
|
+
}
|
|
7285
|
+
],
|
|
7286
|
+
"exports": [
|
|
7287
|
+
{
|
|
7288
|
+
"kind": "js",
|
|
7289
|
+
"name": "AssistantAppSettingsProvider",
|
|
7290
|
+
"declaration": {
|
|
7291
|
+
"name": "AssistantAppSettingsProvider",
|
|
7292
|
+
"module": "src/provider/assistant-app-settings.ts"
|
|
7293
|
+
}
|
|
7294
|
+
}
|
|
7295
|
+
]
|
|
7296
|
+
},
|
|
7297
|
+
{
|
|
7298
|
+
"kind": "javascript-module",
|
|
7299
|
+
"path": "src/provider/tiered-provider-switcher.ts",
|
|
7300
|
+
"declarations": [
|
|
7301
|
+
{
|
|
7302
|
+
"kind": "class",
|
|
7303
|
+
"description": "Which cloud vendor backs the tier-shaped provider registry, plus the means to move it at\nruntime (GENC-1610).",
|
|
7304
|
+
"name": "TieredAIProviderSwitcher",
|
|
7305
|
+
"members": [
|
|
7306
|
+
{
|
|
7307
|
+
"kind": "field",
|
|
7308
|
+
"name": "vendors",
|
|
7309
|
+
"type": {
|
|
7310
|
+
"text": "readonly AITierVendor[]"
|
|
7311
|
+
},
|
|
7312
|
+
"readonly": true
|
|
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."
|
|
7436
|
+
},
|
|
7437
|
+
{
|
|
7438
|
+
"kind": "method",
|
|
7439
|
+
"name": "build",
|
|
7440
|
+
"privacy": "private",
|
|
7441
|
+
"return": {
|
|
7442
|
+
"type": {
|
|
7443
|
+
"text": "Record<string, AIProvider>"
|
|
7444
|
+
}
|
|
7445
|
+
},
|
|
7446
|
+
"parameters": [
|
|
7447
|
+
{
|
|
7448
|
+
"name": "vendor",
|
|
7449
|
+
"type": {
|
|
7450
|
+
"text": "AITierVendor"
|
|
7451
|
+
}
|
|
7452
|
+
}
|
|
7453
|
+
]
|
|
7454
|
+
},
|
|
7455
|
+
{
|
|
7456
|
+
"kind": "method",
|
|
7457
|
+
"name": "isKnownVendor",
|
|
7458
|
+
"privacy": "private",
|
|
7459
|
+
"return": {
|
|
7460
|
+
"type": {
|
|
7461
|
+
"text": "vendor is AITierVendor"
|
|
7462
|
+
}
|
|
7463
|
+
},
|
|
7464
|
+
"parameters": [
|
|
7465
|
+
{
|
|
7466
|
+
"name": "vendor",
|
|
7467
|
+
"type": {
|
|
7468
|
+
"text": "string"
|
|
7469
|
+
}
|
|
7470
|
+
}
|
|
7471
|
+
]
|
|
7472
|
+
}
|
|
7473
|
+
]
|
|
7474
|
+
},
|
|
7475
|
+
{
|
|
7476
|
+
"kind": "function",
|
|
7477
|
+
"name": "registerTieredAIProviders",
|
|
7478
|
+
"return": {
|
|
7479
|
+
"type": {
|
|
7480
|
+
"text": "TieredAIProviderSwitcher"
|
|
7481
|
+
}
|
|
7482
|
+
},
|
|
7483
|
+
"parameters": [
|
|
7484
|
+
{
|
|
7485
|
+
"name": "container",
|
|
7486
|
+
"type": {
|
|
7487
|
+
"text": "Container"
|
|
7488
|
+
}
|
|
7489
|
+
},
|
|
7490
|
+
{
|
|
7491
|
+
"name": "options",
|
|
7492
|
+
"type": {
|
|
7493
|
+
"text": "Omit<TieredAIProviderSwitcherOptions, 'container'>"
|
|
7494
|
+
}
|
|
7495
|
+
}
|
|
7496
|
+
],
|
|
7497
|
+
"description": "Build a TieredAIProviderSwitcher — which registers the tier-shaped provider\nregistry — and put it on the (AIProviderSwitcher:variable) token. Call once at app\nbootstrap."
|
|
7498
|
+
}
|
|
7499
|
+
],
|
|
7500
|
+
"exports": [
|
|
7501
|
+
{
|
|
7502
|
+
"kind": "js",
|
|
7503
|
+
"name": "TieredAIProviderSwitcher",
|
|
7504
|
+
"declaration": {
|
|
7505
|
+
"name": "TieredAIProviderSwitcher",
|
|
7506
|
+
"module": "src/provider/tiered-provider-switcher.ts"
|
|
7507
|
+
}
|
|
7508
|
+
},
|
|
7509
|
+
{
|
|
7510
|
+
"kind": "js",
|
|
7511
|
+
"name": "registerTieredAIProviders",
|
|
7512
|
+
"declaration": {
|
|
7513
|
+
"name": "registerTieredAIProviders",
|
|
7514
|
+
"module": "src/provider/tiered-provider-switcher.ts"
|
|
7515
|
+
}
|
|
7516
|
+
}
|
|
7517
|
+
]
|
|
7518
|
+
},
|
|
7519
7519
|
{
|
|
7520
7520
|
"kind": "javascript-module",
|
|
7521
7521
|
"path": "src/styles/ai-colours.ts",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/ai-assistant",
|
|
3
3
|
"description": "Genesis AI Assistant micro-frontend",
|
|
4
|
-
"version": "15.
|
|
4
|
+
"version": "15.52.0",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/ai-assistant.d.ts",
|
|
@@ -92,31 +92,31 @@
|
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
|
-
"@genesislcap/foundation-comms": "15.
|
|
96
|
-
"@genesislcap/foundation-testing": "15.
|
|
97
|
-
"@genesislcap/genx": "15.
|
|
98
|
-
"@genesislcap/ts-builder": "15.
|
|
99
|
-
"@genesislcap/uvu-playwright-builder": "15.
|
|
100
|
-
"@genesislcap/vite-builder": "15.
|
|
101
|
-
"@genesislcap/webpack-builder": "15.
|
|
95
|
+
"@genesislcap/foundation-comms": "15.52.0",
|
|
96
|
+
"@genesislcap/foundation-testing": "15.52.0",
|
|
97
|
+
"@genesislcap/genx": "15.52.0",
|
|
98
|
+
"@genesislcap/ts-builder": "15.52.0",
|
|
99
|
+
"@genesislcap/uvu-playwright-builder": "15.52.0",
|
|
100
|
+
"@genesislcap/vite-builder": "15.52.0",
|
|
101
|
+
"@genesislcap/webpack-builder": "15.52.0",
|
|
102
102
|
"@types/dompurify": "^3.0.5",
|
|
103
103
|
"@types/marked": "^5.0.2",
|
|
104
104
|
"esbuild": "0.25.12"
|
|
105
105
|
},
|
|
106
106
|
"dependencies": {
|
|
107
|
-
"@genesislcap/foundation-ai": "15.
|
|
108
|
-
"@genesislcap/foundation-logger": "15.
|
|
109
|
-
"@genesislcap/foundation-notifications": "15.
|
|
110
|
-
"@genesislcap/foundation-redux": "15.
|
|
111
|
-
"@genesislcap/foundation-ui": "15.
|
|
112
|
-
"@genesislcap/foundation-utils": "15.
|
|
113
|
-
"@genesislcap/rapid-design-system": "15.
|
|
114
|
-
"@genesislcap/web-core": "15.
|
|
107
|
+
"@genesislcap/foundation-ai": "15.52.0",
|
|
108
|
+
"@genesislcap/foundation-logger": "15.52.0",
|
|
109
|
+
"@genesislcap/foundation-notifications": "15.52.0",
|
|
110
|
+
"@genesislcap/foundation-redux": "15.52.0",
|
|
111
|
+
"@genesislcap/foundation-ui": "15.52.0",
|
|
112
|
+
"@genesislcap/foundation-utils": "15.52.0",
|
|
113
|
+
"@genesislcap/rapid-design-system": "15.52.0",
|
|
114
|
+
"@genesislcap/web-core": "15.52.0",
|
|
115
115
|
"dompurify": "^3.3.1",
|
|
116
116
|
"marked": "^17.0.3"
|
|
117
117
|
},
|
|
118
118
|
"peerDependencies": {
|
|
119
|
-
"@genesislcap/foundation-comms": "^15.
|
|
119
|
+
"@genesislcap/foundation-comms": "^15.52.0"
|
|
120
120
|
},
|
|
121
121
|
"peerDependenciesMeta": {
|
|
122
122
|
"@genesislcap/foundation-comms": {
|