@genesislcap/ai-assistant 15.46.5 → 15.47.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 +426 -214
- package/dist/dts/genesis/config.d.ts +30 -6
- package/dist/dts/genesis/config.d.ts.map +1 -1
- package/dist/dts/genesis/consumes.d.ts.map +1 -1
- package/dist/dts/genesis/event-fields.d.ts.map +1 -1
- package/dist/dts/genesis/filter-fields.d.ts +31 -0
- package/dist/dts/genesis/filter-fields.d.ts.map +1 -1
- package/dist/dts/genesis/index.d.ts +3 -1
- package/dist/dts/genesis/index.d.ts.map +1 -1
- package/dist/dts/genesis/reference-check.d.ts +83 -0
- package/dist/dts/genesis/reference-check.d.ts.map +1 -0
- package/dist/dts/genesis/reference-existence.d.ts +110 -0
- package/dist/dts/genesis/reference-existence.d.ts.map +1 -0
- package/dist/dts/genesis/resource-tools.d.ts +4 -4
- package/dist/dts/genesis/resource-tools.d.ts.map +1 -1
- package/dist/dts/genesis/review-model.d.ts +2 -2
- package/dist/dts/genesis/review-model.d.ts.map +1 -1
- package/dist/dts/genesis/row-source.d.ts +32 -0
- package/dist/dts/genesis/row-source.d.ts.map +1 -1
- package/dist/dts/genesis/server-text.d.ts +29 -0
- package/dist/dts/genesis/server-text.d.ts.map +1 -1
- package/dist/dts/genesis/types.d.ts +32 -5
- package/dist/dts/genesis/types.d.ts.map +1 -1
- package/dist/dts/genesis/write-payload.d.ts +14 -1
- package/dist/dts/genesis/write-payload.d.ts.map +1 -1
- package/dist/dts/genesis/write-plan.d.ts +8 -2
- package/dist/dts/genesis/write-plan.d.ts.map +1 -1
- package/dist/dts/genesis/write-tools.d.ts +5 -3
- package/dist/dts/genesis/write-tools.d.ts.map +1 -1
- package/dist/dts/genesis/write-turn.d.ts +4 -1
- package/dist/dts/genesis/write-turn.d.ts.map +1 -1
- package/dist/esm/genesis/config.js +152 -20
- package/dist/esm/genesis/consumes.js +2 -1
- package/dist/esm/genesis/event-fields.js +5 -8
- package/dist/esm/genesis/filter-fields.js +159 -78
- package/dist/esm/genesis/index.js +1 -0
- package/dist/esm/genesis/reference-check.js +132 -0
- package/dist/esm/genesis/reference-existence.js +283 -0
- package/dist/esm/genesis/resource-tools.js +135 -18
- package/dist/esm/genesis/review-model.js +3 -1
- package/dist/esm/genesis/row-source.js +107 -16
- package/dist/esm/genesis/server-text.js +52 -0
- package/dist/esm/genesis/write-payload.js +32 -4
- package/dist/esm/genesis/write-plan.js +3 -2
- package/dist/esm/genesis/write-tools.js +248 -44
- package/dist/genesis-consumes.cjs +3 -2
- package/dist/genesis-consumes.cjs.map +2 -2
- package/dist/genesis-consumes.mjs +3 -2
- package/dist/genesis-consumes.mjs.map +2 -2
- package/docs/genesis.md +131 -21
- package/package.json +17 -17
- package/scripts/smoke-genesis-consumes-node.mjs +2 -2
|
@@ -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",
|
|
@@ -1799,6 +2004,24 @@
|
|
|
1799
2004
|
],
|
|
1800
2005
|
"description": "The model-facing tool name for a resource. Deterministic and collision-free (resource names\nare unique), and trivially mapped back to the resource in a debug log. What the tool is FOR\nreaches the model through its description, not its name."
|
|
1801
2006
|
},
|
|
2007
|
+
{
|
|
2008
|
+
"kind": "function",
|
|
2009
|
+
"name": "validateGenesisAiConfig",
|
|
2010
|
+
"return": {
|
|
2011
|
+
"type": {
|
|
2012
|
+
"text": "GenesisAiConfigCheck"
|
|
2013
|
+
}
|
|
2014
|
+
},
|
|
2015
|
+
"parameters": [
|
|
2016
|
+
{
|
|
2017
|
+
"name": "config",
|
|
2018
|
+
"type": {
|
|
2019
|
+
"text": "unknown"
|
|
2020
|
+
}
|
|
2021
|
+
}
|
|
2022
|
+
],
|
|
2023
|
+
"description": "Checks a generated AI config before anything is registered, and says what can be kept."
|
|
2024
|
+
},
|
|
1802
2025
|
{
|
|
1803
2026
|
"kind": "function",
|
|
1804
2027
|
"name": "customCodeOf",
|
|
@@ -1843,6 +2066,14 @@
|
|
|
1843
2066
|
"module": "src/genesis/config.ts"
|
|
1844
2067
|
}
|
|
1845
2068
|
},
|
|
2069
|
+
{
|
|
2070
|
+
"kind": "js",
|
|
2071
|
+
"name": "validateGenesisAiConfig",
|
|
2072
|
+
"declaration": {
|
|
2073
|
+
"name": "validateGenesisAiConfig",
|
|
2074
|
+
"module": "src/genesis/config.ts"
|
|
2075
|
+
}
|
|
2076
|
+
},
|
|
1846
2077
|
{
|
|
1847
2078
|
"kind": "js",
|
|
1848
2079
|
"name": "customCodeOf",
|
|
@@ -2017,6 +2248,30 @@
|
|
|
2017
2248
|
"module": "./consumes"
|
|
2018
2249
|
}
|
|
2019
2250
|
},
|
|
2251
|
+
{
|
|
2252
|
+
"kind": "js",
|
|
2253
|
+
"name": "validateGenesisAiConfig",
|
|
2254
|
+
"declaration": {
|
|
2255
|
+
"name": "validateGenesisAiConfig",
|
|
2256
|
+
"module": "./config"
|
|
2257
|
+
}
|
|
2258
|
+
},
|
|
2259
|
+
{
|
|
2260
|
+
"kind": "js",
|
|
2261
|
+
"name": "DroppedResource",
|
|
2262
|
+
"declaration": {
|
|
2263
|
+
"name": "DroppedResource",
|
|
2264
|
+
"module": "./config"
|
|
2265
|
+
}
|
|
2266
|
+
},
|
|
2267
|
+
{
|
|
2268
|
+
"kind": "js",
|
|
2269
|
+
"name": "GenesisAiConfigCheck",
|
|
2270
|
+
"declaration": {
|
|
2271
|
+
"name": "GenesisAiConfigCheck",
|
|
2272
|
+
"module": "./config"
|
|
2273
|
+
}
|
|
2274
|
+
},
|
|
2020
2275
|
{
|
|
2021
2276
|
"kind": "js",
|
|
2022
2277
|
"name": "GenesisFilter",
|
|
@@ -2241,6 +2496,14 @@
|
|
|
2241
2496
|
"module": "./types"
|
|
2242
2497
|
}
|
|
2243
2498
|
},
|
|
2499
|
+
{
|
|
2500
|
+
"kind": "js",
|
|
2501
|
+
"name": "GenesisReference",
|
|
2502
|
+
"declaration": {
|
|
2503
|
+
"name": "GenesisReference",
|
|
2504
|
+
"module": "./types"
|
|
2505
|
+
}
|
|
2506
|
+
},
|
|
2244
2507
|
{
|
|
2245
2508
|
"kind": "js",
|
|
2246
2509
|
"name": "GenesisResourceKind",
|
|
@@ -2261,14 +2524,169 @@
|
|
|
2261
2524
|
},
|
|
2262
2525
|
{
|
|
2263
2526
|
"kind": "javascript-module",
|
|
2264
|
-
"path": "src/genesis/
|
|
2527
|
+
"path": "src/genesis/reference-check.ts",
|
|
2265
2528
|
"declarations": [
|
|
2266
2529
|
{
|
|
2267
|
-
"kind": "
|
|
2268
|
-
"name": "
|
|
2269
|
-
"
|
|
2270
|
-
"
|
|
2271
|
-
|
|
2530
|
+
"kind": "function",
|
|
2531
|
+
"name": "tableOf",
|
|
2532
|
+
"return": {
|
|
2533
|
+
"type": {
|
|
2534
|
+
"text": "string"
|
|
2535
|
+
}
|
|
2536
|
+
},
|
|
2537
|
+
"parameters": [
|
|
2538
|
+
{
|
|
2539
|
+
"name": "resource",
|
|
2540
|
+
"type": {
|
|
2541
|
+
"text": "string"
|
|
2542
|
+
}
|
|
2543
|
+
}
|
|
2544
|
+
],
|
|
2545
|
+
"description": "The table a `REQ_<T>` reads."
|
|
2546
|
+
},
|
|
2547
|
+
{
|
|
2548
|
+
"kind": "function",
|
|
2549
|
+
"name": "notAcceptedHere",
|
|
2550
|
+
"return": {
|
|
2551
|
+
"type": {
|
|
2552
|
+
"text": "string"
|
|
2553
|
+
}
|
|
2554
|
+
},
|
|
2555
|
+
"parameters": [
|
|
2556
|
+
{
|
|
2557
|
+
"name": "field",
|
|
2558
|
+
"type": {
|
|
2559
|
+
"text": "string"
|
|
2560
|
+
}
|
|
2561
|
+
},
|
|
2562
|
+
{
|
|
2563
|
+
"name": "{ resource, reason }",
|
|
2564
|
+
"type": {
|
|
2565
|
+
"text": "UncheckedField"
|
|
2566
|
+
}
|
|
2567
|
+
}
|
|
2568
|
+
],
|
|
2569
|
+
"description": "What an insert says about a value it cannot check."
|
|
2570
|
+
},
|
|
2571
|
+
{
|
|
2572
|
+
"kind": "function",
|
|
2573
|
+
"name": "cannotBeChanged",
|
|
2574
|
+
"return": {
|
|
2575
|
+
"type": {
|
|
2576
|
+
"text": "string"
|
|
2577
|
+
}
|
|
2578
|
+
},
|
|
2579
|
+
"parameters": [
|
|
2580
|
+
{
|
|
2581
|
+
"name": "field",
|
|
2582
|
+
"type": {
|
|
2583
|
+
"text": "string"
|
|
2584
|
+
}
|
|
2585
|
+
},
|
|
2586
|
+
{
|
|
2587
|
+
"name": "{ resource, reason }",
|
|
2588
|
+
"type": {
|
|
2589
|
+
"text": "UncheckedField"
|
|
2590
|
+
}
|
|
2591
|
+
}
|
|
2592
|
+
],
|
|
2593
|
+
"description": "What a modify says about a new value it cannot check."
|
|
2594
|
+
}
|
|
2595
|
+
],
|
|
2596
|
+
"exports": [
|
|
2597
|
+
{
|
|
2598
|
+
"kind": "js",
|
|
2599
|
+
"name": "tableOf",
|
|
2600
|
+
"declaration": {
|
|
2601
|
+
"name": "tableOf",
|
|
2602
|
+
"module": "src/genesis/reference-check.ts"
|
|
2603
|
+
}
|
|
2604
|
+
},
|
|
2605
|
+
{
|
|
2606
|
+
"kind": "js",
|
|
2607
|
+
"name": "notAcceptedHere",
|
|
2608
|
+
"declaration": {
|
|
2609
|
+
"name": "notAcceptedHere",
|
|
2610
|
+
"module": "src/genesis/reference-check.ts"
|
|
2611
|
+
}
|
|
2612
|
+
},
|
|
2613
|
+
{
|
|
2614
|
+
"kind": "js",
|
|
2615
|
+
"name": "cannotBeChanged",
|
|
2616
|
+
"declaration": {
|
|
2617
|
+
"name": "cannotBeChanged",
|
|
2618
|
+
"module": "src/genesis/reference-check.ts"
|
|
2619
|
+
}
|
|
2620
|
+
}
|
|
2621
|
+
]
|
|
2622
|
+
},
|
|
2623
|
+
{
|
|
2624
|
+
"kind": "javascript-module",
|
|
2625
|
+
"path": "src/genesis/reference-existence.ts",
|
|
2626
|
+
"declarations": [
|
|
2627
|
+
{
|
|
2628
|
+
"kind": "variable",
|
|
2629
|
+
"name": "MAX_REFERENCE_CHECKS",
|
|
2630
|
+
"type": {
|
|
2631
|
+
"text": "number"
|
|
2632
|
+
},
|
|
2633
|
+
"default": "50",
|
|
2634
|
+
"description": "The most distinct values one call may check."
|
|
2635
|
+
},
|
|
2636
|
+
{
|
|
2637
|
+
"kind": "function",
|
|
2638
|
+
"name": "withReferenceProblems",
|
|
2639
|
+
"return": {
|
|
2640
|
+
"type": {
|
|
2641
|
+
"text": "T[]"
|
|
2642
|
+
}
|
|
2643
|
+
},
|
|
2644
|
+
"parameters": [
|
|
2645
|
+
{
|
|
2646
|
+
"name": "rows",
|
|
2647
|
+
"type": {
|
|
2648
|
+
"text": "readonly T[]"
|
|
2649
|
+
}
|
|
2650
|
+
},
|
|
2651
|
+
{
|
|
2652
|
+
"name": "problems",
|
|
2653
|
+
"type": {
|
|
2654
|
+
"text": "ReadonlyMap<number, string[]>"
|
|
2655
|
+
}
|
|
2656
|
+
}
|
|
2657
|
+
],
|
|
2658
|
+
"description": "The rows with what the check found added to their problems."
|
|
2659
|
+
}
|
|
2660
|
+
],
|
|
2661
|
+
"exports": [
|
|
2662
|
+
{
|
|
2663
|
+
"kind": "js",
|
|
2664
|
+
"name": "MAX_REFERENCE_CHECKS",
|
|
2665
|
+
"declaration": {
|
|
2666
|
+
"name": "MAX_REFERENCE_CHECKS",
|
|
2667
|
+
"module": "src/genesis/reference-existence.ts"
|
|
2668
|
+
}
|
|
2669
|
+
},
|
|
2670
|
+
{
|
|
2671
|
+
"kind": "js",
|
|
2672
|
+
"name": "withReferenceProblems",
|
|
2673
|
+
"declaration": {
|
|
2674
|
+
"name": "withReferenceProblems",
|
|
2675
|
+
"module": "src/genesis/reference-existence.ts"
|
|
2676
|
+
}
|
|
2677
|
+
}
|
|
2678
|
+
]
|
|
2679
|
+
},
|
|
2680
|
+
{
|
|
2681
|
+
"kind": "javascript-module",
|
|
2682
|
+
"path": "src/genesis/register-genesis-assistant.ts",
|
|
2683
|
+
"declarations": [
|
|
2684
|
+
{
|
|
2685
|
+
"kind": "variable",
|
|
2686
|
+
"name": "GENESIS_AGENT_NAME",
|
|
2687
|
+
"type": {
|
|
2688
|
+
"text": "string"
|
|
2689
|
+
},
|
|
2272
2690
|
"default": "'genesis-assistant'",
|
|
2273
2691
|
"description": "The name of the agent registerGenesisAssistant builds."
|
|
2274
2692
|
},
|
|
@@ -2562,8 +2980,7 @@
|
|
|
2562
2980
|
}
|
|
2563
2981
|
},
|
|
2564
2982
|
{
|
|
2565
|
-
"name": "{ op, preImage }",
|
|
2566
|
-
"default": "{}",
|
|
2983
|
+
"name": "{ op, preImage, unchecked }",
|
|
2567
2984
|
"type": {
|
|
2568
2985
|
"text": "BuildPayloadOptions"
|
|
2569
2986
|
}
|
|
@@ -2616,7 +3033,7 @@
|
|
|
2616
3033
|
"name": "createGenesisWriteTools",
|
|
2617
3034
|
"return": {
|
|
2618
3035
|
"type": {
|
|
2619
|
-
"text": "{\n toolDefinitions: () => Promise<ChatToolDefinition[]>;\n toolHandlers: ChatToolHandlers;\n /**\n * The events that can get a write tool, as far as the config can tell: an event refused for its\n * op
|
|
3036
|
+
"text": "{\n toolDefinitions: () => Promise<ChatToolDefinition[]>;\n toolHandlers: ChatToolHandlers;\n /**\n * The events that can get a write tool, as far as the config can tell: an event refused for its\n * op, its rowSources entry or a malformed references, or a modify or delete with no row source,\n * is not among them. Their metadata, read when the tools are first listed, can still withhold one.\n */\n writableEvents: readonly string[];\n}"
|
|
2620
3037
|
}
|
|
2621
3038
|
},
|
|
2622
3039
|
"parameters": [
|
|
@@ -2654,211 +3071,6 @@
|
|
|
2654
3071
|
"declarations": [],
|
|
2655
3072
|
"exports": []
|
|
2656
3073
|
},
|
|
2657
|
-
{
|
|
2658
|
-
"kind": "javascript-module",
|
|
2659
|
-
"path": "src/config/config.ts",
|
|
2660
|
-
"declarations": [
|
|
2661
|
-
{
|
|
2662
|
-
"kind": "function",
|
|
2663
|
-
"name": "defineAgent",
|
|
2664
|
-
"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```"
|
|
2665
|
-
}
|
|
2666
|
-
],
|
|
2667
|
-
"exports": [
|
|
2668
|
-
{
|
|
2669
|
-
"kind": "js",
|
|
2670
|
-
"name": "CachePolicy",
|
|
2671
|
-
"declaration": {
|
|
2672
|
-
"name": "CachePolicy",
|
|
2673
|
-
"module": "src/config/config.ts"
|
|
2674
|
-
}
|
|
2675
|
-
},
|
|
2676
|
-
{
|
|
2677
|
-
"kind": "js",
|
|
2678
|
-
"name": "ChatFallback",
|
|
2679
|
-
"declaration": {
|
|
2680
|
-
"name": "ChatFallback",
|
|
2681
|
-
"module": "src/config/config.ts"
|
|
2682
|
-
}
|
|
2683
|
-
},
|
|
2684
|
-
{
|
|
2685
|
-
"kind": "js",
|
|
2686
|
-
"name": "ChatInputDuringExecutionMode",
|
|
2687
|
-
"declaration": {
|
|
2688
|
-
"name": "ChatInputDuringExecutionMode",
|
|
2689
|
-
"module": "src/config/config.ts"
|
|
2690
|
-
}
|
|
2691
|
-
},
|
|
2692
|
-
{
|
|
2693
|
-
"kind": "js",
|
|
2694
|
-
"name": "ChatThinkingPolicy",
|
|
2695
|
-
"declaration": {
|
|
2696
|
-
"name": "ChatThinkingPolicy",
|
|
2697
|
-
"module": "src/config/config.ts"
|
|
2698
|
-
}
|
|
2699
|
-
},
|
|
2700
|
-
{
|
|
2701
|
-
"kind": "js",
|
|
2702
|
-
"name": "ChatToolChoice",
|
|
2703
|
-
"declaration": {
|
|
2704
|
-
"name": "ChatToolChoice",
|
|
2705
|
-
"module": "src/config/config.ts"
|
|
2706
|
-
}
|
|
2707
|
-
},
|
|
2708
|
-
{
|
|
2709
|
-
"kind": "js",
|
|
2710
|
-
"name": "defineAgent",
|
|
2711
|
-
"declaration": {
|
|
2712
|
-
"name": "defineAgent",
|
|
2713
|
-
"module": "src/config/config.ts"
|
|
2714
|
-
}
|
|
2715
|
-
}
|
|
2716
|
-
]
|
|
2717
|
-
},
|
|
2718
|
-
{
|
|
2719
|
-
"kind": "javascript-module",
|
|
2720
|
-
"path": "src/config/define-stateful-agent.ts",
|
|
2721
|
-
"declarations": [
|
|
2722
|
-
{
|
|
2723
|
-
"kind": "function",
|
|
2724
|
-
"name": "restoreMachine",
|
|
2725
|
-
"return": {
|
|
2726
|
-
"type": {
|
|
2727
|
-
"text": "void"
|
|
2728
|
-
}
|
|
2729
|
-
},
|
|
2730
|
-
"parameters": [
|
|
2731
|
-
{
|
|
2732
|
-
"name": "machine",
|
|
2733
|
-
"type": {
|
|
2734
|
-
"text": "{ stop: () => void; start: (options?: { state?: unknown }) => void }"
|
|
2735
|
-
},
|
|
2736
|
-
"description": "the machine to restore (already constructed/started)."
|
|
2737
|
-
},
|
|
2738
|
-
{
|
|
2739
|
-
"name": "restored",
|
|
2740
|
-
"type": {
|
|
2741
|
-
"text": "unknown"
|
|
2742
|
-
},
|
|
2743
|
-
"description": "the agent's serialized image (`ctx.restored` in `init`)."
|
|
2744
|
-
},
|
|
2745
|
-
{
|
|
2746
|
-
"name": "key",
|
|
2747
|
-
"default": "'machine'",
|
|
2748
|
-
"description": "the property the machine occupies in the snapshot; defaults to\n`'machine'` to match the conventional `{ machine }` state bag."
|
|
2749
|
-
}
|
|
2750
|
-
],
|
|
2751
|
-
"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."
|
|
2752
|
-
},
|
|
2753
|
-
{
|
|
2754
|
-
"kind": "function",
|
|
2755
|
-
"name": "defineStatefulAgent",
|
|
2756
|
-
"return": {
|
|
2757
|
-
"type": {
|
|
2758
|
-
"text": "AgentConfig"
|
|
2759
|
-
}
|
|
2760
|
-
},
|
|
2761
|
-
"parameters": [
|
|
2762
|
-
{
|
|
2763
|
-
"name": "opts",
|
|
2764
|
-
"type": {
|
|
2765
|
-
"text": "StatefulAgentInit<S>"
|
|
2766
|
-
}
|
|
2767
|
-
}
|
|
2768
|
-
],
|
|
2769
|
-
"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."
|
|
2770
|
-
}
|
|
2771
|
-
],
|
|
2772
|
-
"exports": [
|
|
2773
|
-
{
|
|
2774
|
-
"kind": "js",
|
|
2775
|
-
"name": "restoreMachine",
|
|
2776
|
-
"declaration": {
|
|
2777
|
-
"name": "restoreMachine",
|
|
2778
|
-
"module": "src/config/define-stateful-agent.ts"
|
|
2779
|
-
}
|
|
2780
|
-
},
|
|
2781
|
-
{
|
|
2782
|
-
"kind": "js",
|
|
2783
|
-
"name": "defineStatefulAgent",
|
|
2784
|
-
"declaration": {
|
|
2785
|
-
"name": "defineStatefulAgent",
|
|
2786
|
-
"module": "src/config/define-stateful-agent.ts"
|
|
2787
|
-
}
|
|
2788
|
-
}
|
|
2789
|
-
]
|
|
2790
|
-
},
|
|
2791
|
-
{
|
|
2792
|
-
"kind": "javascript-module",
|
|
2793
|
-
"path": "src/config/fallback-agents.ts",
|
|
2794
|
-
"declarations": [
|
|
2795
|
-
{
|
|
2796
|
-
"kind": "variable",
|
|
2797
|
-
"name": "friendlyFallbackAgent",
|
|
2798
|
-
"type": {
|
|
2799
|
-
"text": "FallbackAgentConfig"
|
|
2800
|
-
},
|
|
2801
|
-
"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}",
|
|
2802
|
-
"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."
|
|
2803
|
-
},
|
|
2804
|
-
{
|
|
2805
|
-
"kind": "variable",
|
|
2806
|
-
"name": "strictFallbackAgent",
|
|
2807
|
-
"type": {
|
|
2808
|
-
"text": "FallbackAgentConfig"
|
|
2809
|
-
},
|
|
2810
|
-
"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}",
|
|
2811
|
-
"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."
|
|
2812
|
-
}
|
|
2813
|
-
],
|
|
2814
|
-
"exports": [
|
|
2815
|
-
{
|
|
2816
|
-
"kind": "js",
|
|
2817
|
-
"name": "friendlyFallbackAgent",
|
|
2818
|
-
"declaration": {
|
|
2819
|
-
"name": "friendlyFallbackAgent",
|
|
2820
|
-
"module": "src/config/fallback-agents.ts"
|
|
2821
|
-
}
|
|
2822
|
-
},
|
|
2823
|
-
{
|
|
2824
|
-
"kind": "js",
|
|
2825
|
-
"name": "strictFallbackAgent",
|
|
2826
|
-
"declaration": {
|
|
2827
|
-
"name": "strictFallbackAgent",
|
|
2828
|
-
"module": "src/config/fallback-agents.ts"
|
|
2829
|
-
}
|
|
2830
|
-
}
|
|
2831
|
-
]
|
|
2832
|
-
},
|
|
2833
|
-
{
|
|
2834
|
-
"kind": "javascript-module",
|
|
2835
|
-
"path": "src/config/index.ts",
|
|
2836
|
-
"declarations": [],
|
|
2837
|
-
"exports": [
|
|
2838
|
-
{
|
|
2839
|
-
"kind": "js",
|
|
2840
|
-
"name": "*",
|
|
2841
|
-
"declaration": {
|
|
2842
|
-
"name": "*",
|
|
2843
|
-
"package": "./config"
|
|
2844
|
-
}
|
|
2845
|
-
},
|
|
2846
|
-
{
|
|
2847
|
-
"kind": "js",
|
|
2848
|
-
"name": "*",
|
|
2849
|
-
"declaration": {
|
|
2850
|
-
"name": "*",
|
|
2851
|
-
"package": "./fallback-agents"
|
|
2852
|
-
}
|
|
2853
|
-
}
|
|
2854
|
-
]
|
|
2855
|
-
},
|
|
2856
|
-
{
|
|
2857
|
-
"kind": "javascript-module",
|
|
2858
|
-
"path": "src/config/validate-providers.ts",
|
|
2859
|
-
"declarations": [],
|
|
2860
|
-
"exports": []
|
|
2861
|
-
},
|
|
2862
3074
|
{
|
|
2863
3075
|
"kind": "javascript-module",
|
|
2864
3076
|
"path": "src/main/attachment-controller.ts",
|