@genesislcap/ai-assistant 14.491.0 → 14.492.0-FUI-2571.4

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.
Files changed (47) hide show
  1. package/dist/ai-assistant.api.json +619 -68
  2. package/dist/ai-assistant.d.ts +158 -17
  3. package/dist/custom-elements.json +90 -0
  4. package/dist/dts/components/ai-driver/ai-driver.d.ts +8 -0
  5. package/dist/dts/components/ai-driver/ai-driver.d.ts.map +1 -1
  6. package/dist/dts/components/chat-driver/chat-driver.d.ts +17 -0
  7. package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
  8. package/dist/dts/components/chat-interaction-wrapper/chat-interaction-wrapper.d.ts +5 -0
  9. package/dist/dts/components/chat-interaction-wrapper/chat-interaction-wrapper.d.ts.map +1 -1
  10. package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts +2 -0
  11. package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts.map +1 -1
  12. package/dist/dts/index.d.ts +2 -1
  13. package/dist/dts/index.d.ts.map +1 -1
  14. package/dist/dts/main/main.d.ts +9 -0
  15. package/dist/dts/main/main.d.ts.map +1 -1
  16. package/dist/dts/state/interaction-context.d.ts +26 -0
  17. package/dist/dts/state/interaction-context.d.ts.map +1 -0
  18. package/dist/dts/state/interaction-context.test.d.ts +2 -0
  19. package/dist/dts/state/interaction-context.test.d.ts.map +1 -0
  20. package/dist/dts/types/ai-chat-widget.d.ts +46 -15
  21. package/dist/dts/types/ai-chat-widget.d.ts.map +1 -1
  22. package/dist/dts/types/interaction-context.d.ts +78 -0
  23. package/dist/dts/types/interaction-context.d.ts.map +1 -0
  24. package/dist/esm/components/chat-driver/chat-driver.js +35 -1
  25. package/dist/esm/components/chat-driver/chat-driver.test.js +32 -0
  26. package/dist/esm/components/chat-interaction-wrapper/chat-interaction-wrapper.js +53 -35
  27. package/dist/esm/components/chat-interaction-wrapper/chat-interaction-wrapper.test.js +33 -6
  28. package/dist/esm/components/orchestrating-driver/orchestrating-driver.js +3 -0
  29. package/dist/esm/main/main.js +11 -0
  30. package/dist/esm/state/interaction-context.js +82 -0
  31. package/dist/esm/state/interaction-context.test.js +78 -0
  32. package/dist/esm/types/interaction-context.js +1 -0
  33. package/dist/tsconfig.tsbuildinfo +1 -1
  34. package/docs/migration-GENC-1390.md +441 -0
  35. package/package.json +17 -17
  36. package/src/components/ai-driver/ai-driver.ts +9 -0
  37. package/src/components/chat-driver/chat-driver.test.ts +48 -0
  38. package/src/components/chat-driver/chat-driver.ts +37 -0
  39. package/src/components/chat-interaction-wrapper/chat-interaction-wrapper.test.ts +50 -11
  40. package/src/components/chat-interaction-wrapper/chat-interaction-wrapper.ts +71 -43
  41. package/src/components/orchestrating-driver/orchestrating-driver.ts +5 -0
  42. package/src/index.ts +2 -1
  43. package/src/main/main.ts +12 -0
  44. package/src/state/interaction-context.test.ts +90 -0
  45. package/src/state/interaction-context.ts +101 -0
  46. package/src/types/ai-chat-widget.ts +52 -17
  47. package/src/types/interaction-context.ts +82 -0
@@ -1957,6 +1957,90 @@
1957
1957
  "endIndex": 2
1958
1958
  }
1959
1959
  },
1960
+ {
1961
+ "kind": "TypeAlias",
1962
+ "canonicalReference": "@genesislcap/ai-assistant!AiChatInteraction:type",
1963
+ "docComment": "/**\n * The two mutually-exclusive states an interaction widget is ever in (GENC-1390). Modelling them as a discriminated union makes illegal combinations unrepresentable — a resolved widget cannot carry a live `interactionContext` or a `shouldAutoFocus`, and a pending widget cannot be read for a `result`.\n *\n * The host sets the widget's `interaction` on mount and REPLACES it (pending → resolved) on completion.\n *\n * @beta\n */\n",
1964
+ "excerptTokens": [
1965
+ {
1966
+ "kind": "Content",
1967
+ "text": "export type AiChatInteraction<TData = "
1968
+ },
1969
+ {
1970
+ "kind": "Content",
1971
+ "text": "unknown"
1972
+ },
1973
+ {
1974
+ "kind": "Content",
1975
+ "text": ", TResult = "
1976
+ },
1977
+ {
1978
+ "kind": "Content",
1979
+ "text": "unknown"
1980
+ },
1981
+ {
1982
+ "kind": "Content",
1983
+ "text": "> = "
1984
+ },
1985
+ {
1986
+ "kind": "Content",
1987
+ "text": "{\n status: 'pending';\n data: TData;\n shouldAutoFocus: boolean;\n interactionContext: "
1988
+ },
1989
+ {
1990
+ "kind": "Reference",
1991
+ "text": "InteractionContext",
1992
+ "canonicalReference": "@genesislcap/ai-assistant!InteractionContext:interface"
1993
+ },
1994
+ {
1995
+ "kind": "Content",
1996
+ "text": ";\n} | {\n status: 'resolved';\n data: TData;\n result: "
1997
+ },
1998
+ {
1999
+ "kind": "Reference",
2000
+ "text": "InteractionResult",
2001
+ "canonicalReference": "@genesislcap/foundation-ai!InteractionResult:type"
2002
+ },
2003
+ {
2004
+ "kind": "Content",
2005
+ "text": "<TResult>;\n}"
2006
+ },
2007
+ {
2008
+ "kind": "Content",
2009
+ "text": ";"
2010
+ }
2011
+ ],
2012
+ "fileUrlPath": "src/types/ai-chat-widget.ts",
2013
+ "releaseTag": "Beta",
2014
+ "name": "AiChatInteraction",
2015
+ "typeParameters": [
2016
+ {
2017
+ "typeParameterName": "TData",
2018
+ "constraintTokenRange": {
2019
+ "startIndex": 0,
2020
+ "endIndex": 0
2021
+ },
2022
+ "defaultTypeTokenRange": {
2023
+ "startIndex": 1,
2024
+ "endIndex": 2
2025
+ }
2026
+ },
2027
+ {
2028
+ "typeParameterName": "TResult",
2029
+ "constraintTokenRange": {
2030
+ "startIndex": 0,
2031
+ "endIndex": 0
2032
+ },
2033
+ "defaultTypeTokenRange": {
2034
+ "startIndex": 3,
2035
+ "endIndex": 4
2036
+ }
2037
+ }
2038
+ ],
2039
+ "typeTokenRange": {
2040
+ "startIndex": 5,
2041
+ "endIndex": 10
2042
+ }
2043
+ },
1960
2044
  {
1961
2045
  "kind": "Class",
1962
2046
  "canonicalReference": "@genesislcap/ai-assistant!AiChatMarkdown:class",
@@ -2022,62 +2106,75 @@
2022
2106
  {
2023
2107
  "kind": "Interface",
2024
2108
  "canonicalReference": "@genesislcap/ai-assistant!AiChatWidget:interface",
2025
- "docComment": "/**\n * Interface that AI inline interaction components can implement. The `AiChatInteractionWrapper` always sets `data`, `resolved`, and `shouldAutoFocus` on the rendered element.\n *\n * @beta\n */\n",
2109
+ "docComment": "/**\n * Interface that AI inline interaction components implement. The `AiChatInteractionWrapper` sets `interactionId` and `interaction` on the rendered element on every (re)mount, and replaces `interaction` (pending → resolved) when the interaction completes.\n *\n * @remarks\n *\n * GENC-1390 replaced the previous flat `data` / `resolved` / `shouldAutoFocus` surface with the discriminated {@link AiChatInteraction}. This is a breaking change on this `@beta` interface — widgets read `this.interaction` (narrowing on `status`) instead of the removed flat fields.\n *\n * @beta\n */\n",
2026
2110
  "excerptTokens": [
2027
2111
  {
2028
2112
  "kind": "Content",
2029
- "text": "export interface AiChatWidget "
2113
+ "text": "export interface AiChatWidget<TData = "
2114
+ },
2115
+ {
2116
+ "kind": "Content",
2117
+ "text": "unknown"
2118
+ },
2119
+ {
2120
+ "kind": "Content",
2121
+ "text": ", TResult = "
2122
+ },
2123
+ {
2124
+ "kind": "Content",
2125
+ "text": "unknown"
2126
+ },
2127
+ {
2128
+ "kind": "Content",
2129
+ "text": "> "
2030
2130
  }
2031
2131
  ],
2032
2132
  "fileUrlPath": "src/types/ai-chat-widget.ts",
2033
2133
  "releaseTag": "Beta",
2034
- "name": "AiChatWidget",
2035
- "preserveMemberOrder": false,
2036
- "members": [
2134
+ "typeParameters": [
2037
2135
  {
2038
- "kind": "PropertySignature",
2039
- "canonicalReference": "@genesislcap/ai-assistant!AiChatWidget#data:member",
2040
- "docComment": "",
2041
- "excerptTokens": [
2042
- {
2043
- "kind": "Content",
2044
- "text": "data: "
2045
- },
2046
- {
2047
- "kind": "Content",
2048
- "text": "unknown"
2049
- },
2050
- {
2051
- "kind": "Content",
2052
- "text": ";"
2053
- }
2054
- ],
2055
- "isReadonly": false,
2056
- "isOptional": false,
2057
- "releaseTag": "Beta",
2058
- "name": "data",
2059
- "propertyTypeTokenRange": {
2136
+ "typeParameterName": "TData",
2137
+ "constraintTokenRange": {
2138
+ "startIndex": 0,
2139
+ "endIndex": 0
2140
+ },
2141
+ "defaultTypeTokenRange": {
2060
2142
  "startIndex": 1,
2061
2143
  "endIndex": 2
2062
2144
  }
2063
2145
  },
2146
+ {
2147
+ "typeParameterName": "TResult",
2148
+ "constraintTokenRange": {
2149
+ "startIndex": 0,
2150
+ "endIndex": 0
2151
+ },
2152
+ "defaultTypeTokenRange": {
2153
+ "startIndex": 3,
2154
+ "endIndex": 4
2155
+ }
2156
+ }
2157
+ ],
2158
+ "name": "AiChatWidget",
2159
+ "preserveMemberOrder": false,
2160
+ "members": [
2064
2161
  {
2065
2162
  "kind": "PropertySignature",
2066
- "canonicalReference": "@genesislcap/ai-assistant!AiChatWidget#resolved:member",
2067
- "docComment": "/**\n * The result when the interaction has been resolved. Truthy = resolved; value contains status/payload for display.\n */\n",
2163
+ "canonicalReference": "@genesislcap/ai-assistant!AiChatWidget#interaction:member",
2164
+ "docComment": "/**\n * The current interaction state (pending or resolved).\n */\n",
2068
2165
  "excerptTokens": [
2069
2166
  {
2070
2167
  "kind": "Content",
2071
- "text": "resolved?: "
2168
+ "text": "interaction: "
2072
2169
  },
2073
2170
  {
2074
2171
  "kind": "Reference",
2075
- "text": "InteractionResult",
2076
- "canonicalReference": "@genesislcap/foundation-ai!InteractionResult:type"
2172
+ "text": "AiChatInteraction",
2173
+ "canonicalReference": "@genesislcap/ai-assistant!AiChatInteraction:type"
2077
2174
  },
2078
2175
  {
2079
2176
  "kind": "Content",
2080
- "text": "<unknown>"
2177
+ "text": "<TData, TResult>"
2081
2178
  },
2082
2179
  {
2083
2180
  "kind": "Content",
@@ -2085,9 +2182,9 @@
2085
2182
  }
2086
2183
  ],
2087
2184
  "isReadonly": false,
2088
- "isOptional": true,
2185
+ "isOptional": false,
2089
2186
  "releaseTag": "Beta",
2090
- "name": "resolved",
2187
+ "name": "interaction",
2091
2188
  "propertyTypeTokenRange": {
2092
2189
  "startIndex": 1,
2093
2190
  "endIndex": 3
@@ -2095,16 +2192,16 @@
2095
2192
  },
2096
2193
  {
2097
2194
  "kind": "PropertySignature",
2098
- "canonicalReference": "@genesislcap/ai-assistant!AiChatWidget#shouldAutoFocus:member",
2099
- "docComment": "/**\n * True when the widget is being mounted fresh and the assistant currently has the user's engagement (last pointer/focus interaction was inside the assistant). Widgets with input fields should use this to decide whether to call `.focus()` on mount. False when: - the user has interacted with something outside the assistant, or - this widget has already been resolved (we're re-rendering history due to a layout-lifecycle remount, dock/undock, etc.).\n */\n",
2195
+ "canonicalReference": "@genesislcap/ai-assistant!AiChatWidget#interactionId:member",
2196
+ "docComment": "/**\n * Stable per-interaction UUID; constant across remounts, present in both states.\n */\n",
2100
2197
  "excerptTokens": [
2101
2198
  {
2102
2199
  "kind": "Content",
2103
- "text": "shouldAutoFocus?: "
2200
+ "text": "interactionId: "
2104
2201
  },
2105
2202
  {
2106
2203
  "kind": "Content",
2107
- "text": "boolean"
2204
+ "text": "string"
2108
2205
  },
2109
2206
  {
2110
2207
  "kind": "Content",
@@ -2112,9 +2209,9 @@
2112
2209
  }
2113
2210
  ],
2114
2211
  "isReadonly": false,
2115
- "isOptional": true,
2212
+ "isOptional": false,
2116
2213
  "releaseTag": "Beta",
2117
- "name": "shouldAutoFocus",
2214
+ "name": "interactionId",
2118
2215
  "propertyTypeTokenRange": {
2119
2216
  "startIndex": 1,
2120
2217
  "endIndex": 2
@@ -2537,6 +2634,56 @@
2537
2634
  "parameters": [],
2538
2635
  "name": "getActiveProviderName"
2539
2636
  },
2637
+ {
2638
+ "kind": "MethodSignature",
2639
+ "canonicalReference": "@genesislcap/ai-assistant!AiDriver#getInteractionContext:member(1)",
2640
+ "docComment": "/**\n * The live {@link InteractionContext} for a pending interaction (GENC-1390), or `undefined` if the interaction is resolved/evicted or the driver owns no interactions. Pierced by `AiChatInteractionWrapper` to build the widget's `interaction` descriptor. Optional — only interaction-owning drivers implement it.\n */\n",
2641
+ "excerptTokens": [
2642
+ {
2643
+ "kind": "Content",
2644
+ "text": "getInteractionContext?(interactionId: "
2645
+ },
2646
+ {
2647
+ "kind": "Content",
2648
+ "text": "string"
2649
+ },
2650
+ {
2651
+ "kind": "Content",
2652
+ "text": "): "
2653
+ },
2654
+ {
2655
+ "kind": "Reference",
2656
+ "text": "InteractionContext",
2657
+ "canonicalReference": "@genesislcap/ai-assistant!InteractionContext:interface"
2658
+ },
2659
+ {
2660
+ "kind": "Content",
2661
+ "text": " | undefined"
2662
+ },
2663
+ {
2664
+ "kind": "Content",
2665
+ "text": ";"
2666
+ }
2667
+ ],
2668
+ "isOptional": true,
2669
+ "returnTypeTokenRange": {
2670
+ "startIndex": 3,
2671
+ "endIndex": 5
2672
+ },
2673
+ "releaseTag": "Beta",
2674
+ "overloadIndex": 1,
2675
+ "parameters": [
2676
+ {
2677
+ "parameterName": "interactionId",
2678
+ "parameterTypeTokenRange": {
2679
+ "startIndex": 1,
2680
+ "endIndex": 2
2681
+ },
2682
+ "isOptional": false
2683
+ }
2684
+ ],
2685
+ "name": "getInteractionContext"
2686
+ },
2540
2687
  {
2541
2688
  "kind": "MethodSignature",
2542
2689
  "canonicalReference": "@genesislcap/ai-assistant!AiDriver#getRawHistory:member(1)",
@@ -4436,6 +4583,59 @@
4436
4583
  "isAbstract": false,
4437
4584
  "name": "getHistory"
4438
4585
  },
4586
+ {
4587
+ "kind": "Method",
4588
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#getInteractionContext:member(1)",
4589
+ "docComment": "/**\n * The live {@link InteractionContext} for a pending interaction (GENC-1390), or `undefined` once resolved/evicted. Read by `AiChatInteractionWrapper` (via the host) to build the widget's pending `interaction` descriptor.\n */\n",
4590
+ "excerptTokens": [
4591
+ {
4592
+ "kind": "Content",
4593
+ "text": "getInteractionContext(interactionId: "
4594
+ },
4595
+ {
4596
+ "kind": "Content",
4597
+ "text": "string"
4598
+ },
4599
+ {
4600
+ "kind": "Content",
4601
+ "text": "): "
4602
+ },
4603
+ {
4604
+ "kind": "Reference",
4605
+ "text": "InteractionContext",
4606
+ "canonicalReference": "@genesislcap/ai-assistant!InteractionContext:interface"
4607
+ },
4608
+ {
4609
+ "kind": "Content",
4610
+ "text": " | undefined"
4611
+ },
4612
+ {
4613
+ "kind": "Content",
4614
+ "text": ";"
4615
+ }
4616
+ ],
4617
+ "isStatic": false,
4618
+ "returnTypeTokenRange": {
4619
+ "startIndex": 3,
4620
+ "endIndex": 5
4621
+ },
4622
+ "releaseTag": "Beta",
4623
+ "isProtected": false,
4624
+ "overloadIndex": 1,
4625
+ "parameters": [
4626
+ {
4627
+ "parameterName": "interactionId",
4628
+ "parameterTypeTokenRange": {
4629
+ "startIndex": 1,
4630
+ "endIndex": 2
4631
+ },
4632
+ "isOptional": false
4633
+ }
4634
+ ],
4635
+ "isOptional": false,
4636
+ "isAbstract": false,
4637
+ "name": "getInteractionContext"
4638
+ },
4439
4639
  {
4440
4640
  "kind": "Method",
4441
4641
  "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#getRawHistory:member(1)",
@@ -11943,47 +12143,345 @@
11943
12143
  }
11944
12144
  },
11945
12145
  {
11946
- "kind": "Function",
11947
- "canonicalReference": "@genesislcap/ai-assistant!isAiAssistantDocked:function(1)",
11948
- "docComment": "/**\n * True when the assistant is active in the layout panel (docked) rather than the bubble.\n */\n",
12146
+ "kind": "Interface",
12147
+ "canonicalReference": "@genesislcap/ai-assistant!InteractionContext:interface",
12148
+ "docComment": "/**\n * A live, per-interaction scratch space owned by the chat host (keyed by `interactionId`) and handed to a widget on every (re)mount.\n *\n * WHY: an interaction widget element is destroyed+recreated on layout reflow (GoldenLayout rebuilds/reparents on panel add/remove AND on drag), on dock/undock, and on transcript re-render (the keyless `repeat`). The element cannot hold anything live across that; this object can, because the host keeps it alive for the interaction's lifetime, independent of the element. (GENC-1390)\n *\n * LIVE-ONLY — never persisted. A reload / project switch / session restore wipes it; the interaction is then rebuilt purely from the serialisable `data` + `result`. Never store here anything that must survive a reload: durable inputs belong in the interaction's `data`, the outcome in its resolved payload.\n *\n * LIFETIME — created lazily when the interaction is requested, reused for every remount of that same `interactionId`. Torn down (its `onDispose` callbacks fire once) when the interaction RESOLVES or is evicted — NOT when the element unmounts. That inversion is the point: a transient unmount (drag, re-render) must leave context-owned resources (sockets, timers) untouched; only completion ends them.\n *\n * NOTE: `subscribe`/`notify` are a plain observer list, not a reactivity engine and not a FAST dependency. `notify()` renders nothing — it signals the currently-mounted element \"state changed, re-read\", and the element updates its own observables and re-renders with whatever primitives it has.\n *\n * @beta\n */\n",
11949
12149
  "excerptTokens": [
11950
12150
  {
11951
12151
  "kind": "Content",
11952
- "text": "export declare function isAiAssistantDocked(): "
12152
+ "text": "export interface InteractionContext<TState extends "
11953
12153
  },
11954
12154
  {
11955
12155
  "kind": "Content",
11956
- "text": "boolean"
12156
+ "text": "object"
11957
12157
  },
11958
12158
  {
11959
12159
  "kind": "Content",
11960
- "text": ";"
11961
- }
11962
- ],
11963
- "fileUrlPath": "src/components/popout-manager/popout-manager.ts",
11964
- "returnTypeTokenRange": {
11965
- "startIndex": 1,
11966
- "endIndex": 2
11967
- },
11968
- "releaseTag": "Public",
11969
- "overloadIndex": 1,
11970
- "parameters": [],
11971
- "name": "isAiAssistantDocked"
11972
- },
11973
- {
11974
- "kind": "Interface",
11975
- "canonicalReference": "@genesislcap/ai-assistant!ManualSelectionConfig:interface",
11976
- "docComment": "/**\n * Opts an agent in to manual selection from the assistant's agent picker.\n *\n * Only applies to top-level agents — sub-agents are never user-selectable. Has no effect unless the assistant's `agentPicker` is also enabled.\n *\n * @beta\n */\n",
11977
- "excerptTokens": [
12160
+ "text": " = "
12161
+ },
12162
+ {
12163
+ "kind": "Reference",
12164
+ "text": "Record",
12165
+ "canonicalReference": "!Record:type"
12166
+ },
11978
12167
  {
11979
12168
  "kind": "Content",
11980
- "text": "export interface ManualSelectionConfig "
12169
+ "text": "<string, unknown>"
12170
+ },
12171
+ {
12172
+ "kind": "Content",
12173
+ "text": "> "
11981
12174
  }
11982
12175
  ],
11983
- "fileUrlPath": "src/config/config.ts",
12176
+ "fileUrlPath": "src/types/interaction-context.ts",
11984
12177
  "releaseTag": "Beta",
11985
- "name": "ManualSelectionConfig",
11986
- "preserveMemberOrder": false,
12178
+ "typeParameters": [
12179
+ {
12180
+ "typeParameterName": "TState",
12181
+ "constraintTokenRange": {
12182
+ "startIndex": 1,
12183
+ "endIndex": 2
12184
+ },
12185
+ "defaultTypeTokenRange": {
12186
+ "startIndex": 3,
12187
+ "endIndex": 5
12188
+ }
12189
+ }
12190
+ ],
12191
+ "name": "InteractionContext",
12192
+ "preserveMemberOrder": false,
12193
+ "members": [
12194
+ {
12195
+ "kind": "PropertySignature",
12196
+ "canonicalReference": "@genesislcap/ai-assistant!InteractionContext#interactionId:member",
12197
+ "docComment": "/**\n * Stable id of the interaction this context belongs to.\n */\n",
12198
+ "excerptTokens": [
12199
+ {
12200
+ "kind": "Content",
12201
+ "text": "readonly interactionId: "
12202
+ },
12203
+ {
12204
+ "kind": "Content",
12205
+ "text": "string"
12206
+ },
12207
+ {
12208
+ "kind": "Content",
12209
+ "text": ";"
12210
+ }
12211
+ ],
12212
+ "isReadonly": true,
12213
+ "isOptional": false,
12214
+ "releaseTag": "Beta",
12215
+ "name": "interactionId",
12216
+ "propertyTypeTokenRange": {
12217
+ "startIndex": 1,
12218
+ "endIndex": 2
12219
+ }
12220
+ },
12221
+ {
12222
+ "kind": "MethodSignature",
12223
+ "canonicalReference": "@genesislcap/ai-assistant!InteractionContext#notify:member(1)",
12224
+ "docComment": "/**\n * Signal that `state` changed so subscribers re-read. NOT a renderer — just a change ping; the subscribing element updates its own observables.\n */\n",
12225
+ "excerptTokens": [
12226
+ {
12227
+ "kind": "Content",
12228
+ "text": "notify(): "
12229
+ },
12230
+ {
12231
+ "kind": "Content",
12232
+ "text": "void"
12233
+ },
12234
+ {
12235
+ "kind": "Content",
12236
+ "text": ";"
12237
+ }
12238
+ ],
12239
+ "isOptional": false,
12240
+ "returnTypeTokenRange": {
12241
+ "startIndex": 1,
12242
+ "endIndex": 2
12243
+ },
12244
+ "releaseTag": "Beta",
12245
+ "overloadIndex": 1,
12246
+ "parameters": [],
12247
+ "name": "notify"
12248
+ },
12249
+ {
12250
+ "kind": "MethodSignature",
12251
+ "canonicalReference": "@genesislcap/ai-assistant!InteractionContext#once:member(1)",
12252
+ "docComment": "/**\n * Run `factory` at most once for this interaction's lifetime and memoise the result; every later call with the same `key` (including after a remount) returns the stored value without re-running. Covers one-shot side effects and create-once live resources alike:\n * ```ts\n * ctx.once('open-panel', () => this.dispatchEvent(openPanelEvent)); // fires once, ever\n * const ws = ctx.once('ws', () => new TestDataWebSocketService()); // same instance each remount\n * ```\n *\n * Returns `null` once the interaction has ended (resolve/timeout/evict): the factory is NOT run, because a resource created on a disposed context would never be torn down (its `onDispose` has already fired). A widget that opens a live resource here must guard on the resolved state and stop touching `once` when the interaction completes — a stray late call (e.g. an async callback landing after a `timeoutMs` timeout) gets `null` rather than a leaked resource.\n */\n",
12253
+ "excerptTokens": [
12254
+ {
12255
+ "kind": "Content",
12256
+ "text": "once<T>(key: "
12257
+ },
12258
+ {
12259
+ "kind": "Content",
12260
+ "text": "string"
12261
+ },
12262
+ {
12263
+ "kind": "Content",
12264
+ "text": ", factory: "
12265
+ },
12266
+ {
12267
+ "kind": "Content",
12268
+ "text": "() => T"
12269
+ },
12270
+ {
12271
+ "kind": "Content",
12272
+ "text": "): "
12273
+ },
12274
+ {
12275
+ "kind": "Content",
12276
+ "text": "T | null"
12277
+ },
12278
+ {
12279
+ "kind": "Content",
12280
+ "text": ";"
12281
+ }
12282
+ ],
12283
+ "isOptional": false,
12284
+ "returnTypeTokenRange": {
12285
+ "startIndex": 5,
12286
+ "endIndex": 6
12287
+ },
12288
+ "releaseTag": "Beta",
12289
+ "overloadIndex": 1,
12290
+ "parameters": [
12291
+ {
12292
+ "parameterName": "key",
12293
+ "parameterTypeTokenRange": {
12294
+ "startIndex": 1,
12295
+ "endIndex": 2
12296
+ },
12297
+ "isOptional": false
12298
+ },
12299
+ {
12300
+ "parameterName": "factory",
12301
+ "parameterTypeTokenRange": {
12302
+ "startIndex": 3,
12303
+ "endIndex": 4
12304
+ },
12305
+ "isOptional": false
12306
+ }
12307
+ ],
12308
+ "typeParameters": [
12309
+ {
12310
+ "typeParameterName": "T",
12311
+ "constraintTokenRange": {
12312
+ "startIndex": 0,
12313
+ "endIndex": 0
12314
+ },
12315
+ "defaultTypeTokenRange": {
12316
+ "startIndex": 0,
12317
+ "endIndex": 0
12318
+ }
12319
+ }
12320
+ ],
12321
+ "name": "once"
12322
+ },
12323
+ {
12324
+ "kind": "MethodSignature",
12325
+ "canonicalReference": "@genesislcap/ai-assistant!InteractionContext#onDispose:member(1)",
12326
+ "docComment": "/**\n * Register a teardown run exactly once when the interaction ends (resolve or evict) — the correct home for closing sockets/timers created via `once`. Decoupled from the element's `disconnectedCallback`, which fires on every transient unmount and must NOT tear these down. Registering after the context has already been disposed runs `fn` immediately.\n */\n",
12327
+ "excerptTokens": [
12328
+ {
12329
+ "kind": "Content",
12330
+ "text": "onDispose(fn: "
12331
+ },
12332
+ {
12333
+ "kind": "Content",
12334
+ "text": "() => void"
12335
+ },
12336
+ {
12337
+ "kind": "Content",
12338
+ "text": "): "
12339
+ },
12340
+ {
12341
+ "kind": "Content",
12342
+ "text": "void"
12343
+ },
12344
+ {
12345
+ "kind": "Content",
12346
+ "text": ";"
12347
+ }
12348
+ ],
12349
+ "isOptional": false,
12350
+ "returnTypeTokenRange": {
12351
+ "startIndex": 3,
12352
+ "endIndex": 4
12353
+ },
12354
+ "releaseTag": "Beta",
12355
+ "overloadIndex": 1,
12356
+ "parameters": [
12357
+ {
12358
+ "parameterName": "fn",
12359
+ "parameterTypeTokenRange": {
12360
+ "startIndex": 1,
12361
+ "endIndex": 2
12362
+ },
12363
+ "isOptional": false
12364
+ }
12365
+ ],
12366
+ "name": "onDispose"
12367
+ },
12368
+ {
12369
+ "kind": "PropertySignature",
12370
+ "canonicalReference": "@genesislcap/ai-assistant!InteractionContext#state:member",
12371
+ "docComment": "/**\n * Durable, remount-surviving source of truth for the interaction — a socket handle, the current phase, a half-typed draft. A plain object, deliberately NOT reactive: a widget renders from its own observables and reads/writes this on mount and on change so the next remount can recover.\n */\n",
12372
+ "excerptTokens": [
12373
+ {
12374
+ "kind": "Content",
12375
+ "text": "readonly state: "
12376
+ },
12377
+ {
12378
+ "kind": "Content",
12379
+ "text": "TState"
12380
+ },
12381
+ {
12382
+ "kind": "Content",
12383
+ "text": ";"
12384
+ }
12385
+ ],
12386
+ "isReadonly": true,
12387
+ "isOptional": false,
12388
+ "releaseTag": "Beta",
12389
+ "name": "state",
12390
+ "propertyTypeTokenRange": {
12391
+ "startIndex": 1,
12392
+ "endIndex": 2
12393
+ }
12394
+ },
12395
+ {
12396
+ "kind": "MethodSignature",
12397
+ "canonicalReference": "@genesislcap/ai-assistant!InteractionContext#subscribe:member(1)",
12398
+ "docComment": "/**\n * Observe `state` changes. Call in `connectedCallback`; call the returned unsubscribe in `disconnectedCallback`.\n */\n",
12399
+ "excerptTokens": [
12400
+ {
12401
+ "kind": "Content",
12402
+ "text": "subscribe(listener: "
12403
+ },
12404
+ {
12405
+ "kind": "Content",
12406
+ "text": "() => void"
12407
+ },
12408
+ {
12409
+ "kind": "Content",
12410
+ "text": "): "
12411
+ },
12412
+ {
12413
+ "kind": "Content",
12414
+ "text": "() => void"
12415
+ },
12416
+ {
12417
+ "kind": "Content",
12418
+ "text": ";"
12419
+ }
12420
+ ],
12421
+ "isOptional": false,
12422
+ "returnTypeTokenRange": {
12423
+ "startIndex": 3,
12424
+ "endIndex": 4
12425
+ },
12426
+ "releaseTag": "Beta",
12427
+ "overloadIndex": 1,
12428
+ "parameters": [
12429
+ {
12430
+ "parameterName": "listener",
12431
+ "parameterTypeTokenRange": {
12432
+ "startIndex": 1,
12433
+ "endIndex": 2
12434
+ },
12435
+ "isOptional": false
12436
+ }
12437
+ ],
12438
+ "name": "subscribe"
12439
+ }
12440
+ ],
12441
+ "extendsTokenRanges": []
12442
+ },
12443
+ {
12444
+ "kind": "Function",
12445
+ "canonicalReference": "@genesislcap/ai-assistant!isAiAssistantDocked:function(1)",
12446
+ "docComment": "/**\n * True when the assistant is active in the layout panel (docked) rather than the bubble.\n */\n",
12447
+ "excerptTokens": [
12448
+ {
12449
+ "kind": "Content",
12450
+ "text": "export declare function isAiAssistantDocked(): "
12451
+ },
12452
+ {
12453
+ "kind": "Content",
12454
+ "text": "boolean"
12455
+ },
12456
+ {
12457
+ "kind": "Content",
12458
+ "text": ";"
12459
+ }
12460
+ ],
12461
+ "fileUrlPath": "src/components/popout-manager/popout-manager.ts",
12462
+ "returnTypeTokenRange": {
12463
+ "startIndex": 1,
12464
+ "endIndex": 2
12465
+ },
12466
+ "releaseTag": "Public",
12467
+ "overloadIndex": 1,
12468
+ "parameters": [],
12469
+ "name": "isAiAssistantDocked"
12470
+ },
12471
+ {
12472
+ "kind": "Interface",
12473
+ "canonicalReference": "@genesislcap/ai-assistant!ManualSelectionConfig:interface",
12474
+ "docComment": "/**\n * Opts an agent in to manual selection from the assistant's agent picker.\n *\n * Only applies to top-level agents — sub-agents are never user-selectable. Has no effect unless the assistant's `agentPicker` is also enabled.\n *\n * @beta\n */\n",
12475
+ "excerptTokens": [
12476
+ {
12477
+ "kind": "Content",
12478
+ "text": "export interface ManualSelectionConfig "
12479
+ }
12480
+ ],
12481
+ "fileUrlPath": "src/config/config.ts",
12482
+ "releaseTag": "Beta",
12483
+ "name": "ManualSelectionConfig",
12484
+ "preserveMemberOrder": false,
11987
12485
  "members": [
11988
12486
  {
11989
12487
  "kind": "PropertySignature",
@@ -12454,6 +12952,59 @@
12454
12952
  "isAbstract": false,
12455
12953
  "name": "getActiveProviderName"
12456
12954
  },
12955
+ {
12956
+ "kind": "Method",
12957
+ "canonicalReference": "@genesislcap/ai-assistant!OrchestratingDriver#getInteractionContext:member(1)",
12958
+ "docComment": "",
12959
+ "excerptTokens": [
12960
+ {
12961
+ "kind": "Content",
12962
+ "text": "getInteractionContext(interactionId: "
12963
+ },
12964
+ {
12965
+ "kind": "Content",
12966
+ "text": "string"
12967
+ },
12968
+ {
12969
+ "kind": "Content",
12970
+ "text": "): "
12971
+ },
12972
+ {
12973
+ "kind": "Reference",
12974
+ "text": "InteractionContext",
12975
+ "canonicalReference": "@genesislcap/ai-assistant!InteractionContext:interface"
12976
+ },
12977
+ {
12978
+ "kind": "Content",
12979
+ "text": " | undefined"
12980
+ },
12981
+ {
12982
+ "kind": "Content",
12983
+ "text": ";"
12984
+ }
12985
+ ],
12986
+ "isStatic": false,
12987
+ "returnTypeTokenRange": {
12988
+ "startIndex": 3,
12989
+ "endIndex": 5
12990
+ },
12991
+ "releaseTag": "Beta",
12992
+ "isProtected": false,
12993
+ "overloadIndex": 1,
12994
+ "parameters": [
12995
+ {
12996
+ "parameterName": "interactionId",
12997
+ "parameterTypeTokenRange": {
12998
+ "startIndex": 1,
12999
+ "endIndex": 2
13000
+ },
13001
+ "isOptional": false
13002
+ }
13003
+ ],
13004
+ "isOptional": false,
13005
+ "isAbstract": false,
13006
+ "name": "getInteractionContext"
13007
+ },
12457
13008
  {
12458
13009
  "kind": "Method",
12459
13010
  "canonicalReference": "@genesislcap/ai-assistant!OrchestratingDriver#getRawHistory:member(1)",