@fallen-8/studio 0.0.32

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 (231) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +93 -0
  3. package/dist-lib/Canvas3D-C5og4ZIQ.js +62011 -0
  4. package/dist-lib/F8GraphCanvas-Db7vzDtJ.js +11085 -0
  5. package/dist-lib/abap-Bs8kvjsq.js +1398 -0
  6. package/dist-lib/apex-Dspwrl5m.js +326 -0
  7. package/dist-lib/azcli-k1BiOau1.js +68 -0
  8. package/dist-lib/bat-BIP72KWc.js +100 -0
  9. package/dist-lib/bicep-VhQeYhS3.js +102 -0
  10. package/dist-lib/cameligo-DnuAXtHg.js +174 -0
  11. package/dist-lib/canvas.js +13 -0
  12. package/dist-lib/clojure-BAuDPsal.js +761 -0
  13. package/dist-lib/coffee-BV06qSnj.js +232 -0
  14. package/dist-lib/cpp-Cz8Jeyrf.js +389 -0
  15. package/dist-lib/csharp-F6hhlXFb.js +326 -0
  16. package/dist-lib/csp-KzlEHCyI.js +53 -0
  17. package/dist-lib/css-e4FKntZ3.js +187 -0
  18. package/dist-lib/cssMode-Czf2vRA3.js +1571 -0
  19. package/dist-lib/cypher-CpvDGKRr.js +263 -0
  20. package/dist-lib/dart-DdHeFWR0.js +281 -0
  21. package/dist-lib/dockerfile-aoNXDcio.js +130 -0
  22. package/dist-lib/ecl-C4Q0DYuA.js +456 -0
  23. package/dist-lib/elixir-C9X42b0T.js +569 -0
  24. package/dist-lib/f8-studio.css +1 -0
  25. package/dist-lib/f8-studio.js +16 -0
  26. package/dist-lib/flow9-Bff42pfB.js +142 -0
  27. package/dist-lib/freemarker2-BtInkOsd.js +989 -0
  28. package/dist-lib/fsharp-C6vPAsHG.js +217 -0
  29. package/dist-lib/go-DEr8zx9f.js +218 -0
  30. package/dist-lib/graphql-BiNBBRFh.js +151 -0
  31. package/dist-lib/handlebars-UwZ7mBGA.js +419 -0
  32. package/dist-lib/hcl-2T9lKuFg.js +183 -0
  33. package/dist-lib/html-BXX93YIe.js +308 -0
  34. package/dist-lib/htmlMode-BCqQu1PO.js +1581 -0
  35. package/dist-lib/index-DFm6T7Un.js +132450 -0
  36. package/dist-lib/ini-CZGtssYM.js +71 -0
  37. package/dist-lib/java-B260NeH3.js +232 -0
  38. package/dist-lib/javascript-CK1z7Ynl.js +70 -0
  39. package/dist-lib/jsonMode-C4Q3fVvV.js +1996 -0
  40. package/dist-lib/julia-kuNLM9c5.js +511 -0
  41. package/dist-lib/kotlin-Bz6kAefA.js +253 -0
  42. package/dist-lib/less-AZUtS89I.js +162 -0
  43. package/dist-lib/lexon-BcmgnyRb.js +157 -0
  44. package/dist-lib/liquid-BnCUERBj.js +240 -0
  45. package/dist-lib/lua-Dz1RbATg.js +162 -0
  46. package/dist-lib/m3-CIMooLFn.js +210 -0
  47. package/dist-lib/markdown-C1BsCK9P.js +229 -0
  48. package/dist-lib/mdx-D2enmFMs.js +165 -0
  49. package/dist-lib/mips-BovsnfLQ.js +198 -0
  50. package/dist-lib/msdax-CiRB2ZB-.js +375 -0
  51. package/dist-lib/mysql-BwdpPE19.js +878 -0
  52. package/dist-lib/objective-c-D4nfHfso.js +183 -0
  53. package/dist-lib/pascal--j5-PYtz.js +251 -0
  54. package/dist-lib/pascaligo-C7TcJxNL.js +164 -0
  55. package/dist-lib/perl-BzEWqUb5.js +626 -0
  56. package/dist-lib/pgsql-B_KZ0mGX.js +851 -0
  57. package/dist-lib/php-A19QHzQV.js +500 -0
  58. package/dist-lib/pla-COeKY1hA.js +137 -0
  59. package/dist-lib/postiats-BfMp7zJL.js +907 -0
  60. package/dist-lib/powerquery-B0TS_5Gb.js +890 -0
  61. package/dist-lib/powershell-5jSbKdYB.js +239 -0
  62. package/dist-lib/protobuf-YgnOutn3.js +420 -0
  63. package/dist-lib/pug-DLej6kn5.js +402 -0
  64. package/dist-lib/python-DJvSF53q.js +301 -0
  65. package/dist-lib/qsharp-AhjqtSHB.js +301 -0
  66. package/dist-lib/r-D-F4P80w.js +243 -0
  67. package/dist-lib/razor-RerkagjP.js +550 -0
  68. package/dist-lib/redis-hwwIlMnV.js +302 -0
  69. package/dist-lib/redshift-Bcm_kjEG.js +809 -0
  70. package/dist-lib/restructuredtext-CrdzfPP-.js +174 -0
  71. package/dist-lib/ruby-QC2UNm1s.js +511 -0
  72. package/dist-lib/rust-5aqiQ3L5.js +343 -0
  73. package/dist-lib/sb-B1g1ZfLJ.js +115 -0
  74. package/dist-lib/scala-C2U4R5Gb.js +370 -0
  75. package/dist-lib/scheme-DeFRbslr.js +108 -0
  76. package/dist-lib/scss-RSTCiCmI.js +262 -0
  77. package/dist-lib/shell-BpF-iNu8.js +221 -0
  78. package/dist-lib/solidity-C00r2mbQ.js +1367 -0
  79. package/dist-lib/sophia-DVW5ZKDB.js +199 -0
  80. package/dist-lib/sparql-B0nmpxeX.js +201 -0
  81. package/dist-lib/sql-CJwKPERn.js +853 -0
  82. package/dist-lib/st-DPlKG5DT.js +416 -0
  83. package/dist-lib/swift-YZBAbVHV.js +309 -0
  84. package/dist-lib/systemverilog-CDQSaH63.js +576 -0
  85. package/dist-lib/tcl-Dlu8sp6Q.js +232 -0
  86. package/dist-lib/tsMode-C-6d-f_-.js +886 -0
  87. package/dist-lib/twig-C5TO7-kw.js +392 -0
  88. package/dist-lib/types/api/changefeed.d.ts +113 -0
  89. package/dist-lib/types/api/client.d.ts +81 -0
  90. package/dist-lib/types/api/endpoints.d.ts +197 -0
  91. package/dist-lib/types/api/queries.d.ts +8 -0
  92. package/dist-lib/types/api/types.d.ts +1032 -0
  93. package/dist-lib/types/app/AppShell.d.ts +10 -0
  94. package/dist-lib/types/app/NamespaceScope.d.ts +11 -0
  95. package/dist-lib/types/app/applyStudioConfig.d.ts +18 -0
  96. package/dist-lib/types/app/mount.d.ts +19 -0
  97. package/dist-lib/types/app/nav.d.ts +91 -0
  98. package/dist-lib/types/app/routes.d.ts +9 -0
  99. package/dist-lib/types/app/studioConfig.d.ts +106 -0
  100. package/dist-lib/types/canvas/Canvas2D.d.ts +18 -0
  101. package/dist-lib/types/canvas/Canvas3D.d.ts +14 -0
  102. package/dist-lib/types/canvas/ConnectPanel.d.ts +10 -0
  103. package/dist-lib/types/canvas/FindPanel.d.ts +14 -0
  104. package/dist-lib/types/canvas/GraphCanvas.d.ts +66 -0
  105. package/dist-lib/types/canvas/StylePanel.d.ts +7 -0
  106. package/dist-lib/types/canvas/eclipse.d.ts +136 -0
  107. package/dist-lib/types/canvas/imageAssets.d.ts +3 -0
  108. package/dist-lib/types/canvas/styleConfig.d.ts +48 -0
  109. package/dist-lib/types/canvas/styleEngine.d.ts +125 -0
  110. package/dist-lib/types/canvas/styling.d.ts +15 -0
  111. package/dist-lib/types/components/AdjacencyPanel.d.ts +11 -0
  112. package/dist-lib/types/components/AnalyticsRunner.d.ts +1 -0
  113. package/dist-lib/types/components/ConfigurationPanel.d.ts +1 -0
  114. package/dist-lib/types/components/ConfirmDialog.d.ts +18 -0
  115. package/dist-lib/types/components/DurabilityNotice.d.ts +18 -0
  116. package/dist-lib/types/components/ElementDetail.d.ts +11 -0
  117. package/dist-lib/types/components/ElementTable.d.ts +19 -0
  118. package/dist-lib/types/components/EmbeddingsTab.d.ts +15 -0
  119. package/dist-lib/types/components/ErrorBox.d.ts +8 -0
  120. package/dist-lib/types/components/EventFeedBell.d.ts +16 -0
  121. package/dist-lib/types/components/EventFeedPanel.d.ts +10 -0
  122. package/dist-lib/types/components/Field.d.ts +14 -0
  123. package/dist-lib/types/components/GraphShapePanel.d.ts +1 -0
  124. package/dist-lib/types/components/InspectLink.d.ts +5 -0
  125. package/dist-lib/types/components/ListCapNote.d.ts +10 -0
  126. package/dist-lib/types/components/MutationsPanel.d.ts +1 -0
  127. package/dist-lib/types/components/NamespaceSwitcher.d.ts +22 -0
  128. package/dist-lib/types/components/NamespacesPanel.d.ts +11 -0
  129. package/dist-lib/types/components/NeighborhoodPreview.d.ts +10 -0
  130. package/dist-lib/types/components/PluginsPanel.d.ts +9 -0
  131. package/dist-lib/types/components/PropertiesTab.d.ts +4 -0
  132. package/dist-lib/types/components/PropertyListEditor.d.ts +26 -0
  133. package/dist-lib/types/components/SampleGraphsPanel.d.ts +3 -0
  134. package/dist-lib/types/components/SectionHelp.d.ts +11 -0
  135. package/dist-lib/types/components/SemanticBlockEditor.d.ts +29 -0
  136. package/dist-lib/types/components/SemanticQueryEditor.d.ts +15 -0
  137. package/dist-lib/types/components/SettingRow.d.ts +15 -0
  138. package/dist-lib/types/components/Stat.d.ts +10 -0
  139. package/dist-lib/types/components/StoredQueriesPanel.d.ts +14 -0
  140. package/dist-lib/types/components/StoredQueryControls.d.ts +29 -0
  141. package/dist-lib/types/components/Truncated.d.ts +17 -0
  142. package/dist-lib/types/components/TruncationBadge.d.ts +6 -0
  143. package/dist-lib/types/components/TypedLiteralEditor.d.ts +13 -0
  144. package/dist-lib/types/components/VertexFilterSlot.d.ts +25 -0
  145. package/dist-lib/types/delegate/DelegateEditor.d.ts +10 -0
  146. package/dist-lib/types/delegate/DelegateSlot.d.ts +18 -0
  147. package/dist-lib/types/delegate/editorOptions.d.ts +25 -0
  148. package/dist-lib/types/delegate/kinds.d.ts +19 -0
  149. package/dist-lib/types/delegate/markers.d.ts +21 -0
  150. package/dist-lib/types/delegate/monacoSetup.d.ts +3 -0
  151. package/dist-lib/types/delegate/nl/NlAssistPanel.d.ts +10 -0
  152. package/dist-lib/types/delegate/nl/NlBackendConfig.d.ts +12 -0
  153. package/dist-lib/types/delegate/nl/NlDraftList.d.ts +42 -0
  154. package/dist-lib/types/delegate/nl/config.d.ts +105 -0
  155. package/dist-lib/types/delegate/nl/feedback.d.ts +30 -0
  156. package/dist-lib/types/delegate/nl/format.d.ts +6 -0
  157. package/dist-lib/types/delegate/nl/generate.d.ts +57 -0
  158. package/dist-lib/types/delegate/nl/prompt.d.ts +21 -0
  159. package/dist-lib/types/delegate/nl/useNlRun.d.ts +24 -0
  160. package/dist-lib/types/delegate/providers.d.ts +26 -0
  161. package/dist-lib/types/delegate/snippets.d.ts +25 -0
  162. package/dist-lib/types/embed/F8GraphCanvas.d.ts +37 -0
  163. package/dist-lib/types/embed/canvas.d.ts +23 -0
  164. package/dist-lib/types/embed/index.d.ts +14 -0
  165. package/dist-lib/types/firstrun/FirstRunOverlay.d.ts +10 -0
  166. package/dist-lib/types/firstrun/FirstRunShow.d.ts +22 -0
  167. package/dist-lib/types/firstrun/beats.d.ts +23 -0
  168. package/dist-lib/types/firstrun/firstRunStore.d.ts +38 -0
  169. package/dist-lib/types/firstrun/mockGraph.d.ts +56 -0
  170. package/dist-lib/types/firstrun/useBeatTimeline.d.ts +35 -0
  171. package/dist-lib/types/firstrun/useReducedMotion.d.ts +7 -0
  172. package/dist-lib/types/instances/registry.d.ts +83 -0
  173. package/dist-lib/types/instances/types.d.ts +49 -0
  174. package/dist-lib/types/lib/canvasCap.d.ts +7 -0
  175. package/dist-lib/types/lib/connectPaths.d.ts +55 -0
  176. package/dist-lib/types/lib/embeddingProperties.d.ts +6 -0
  177. package/dist-lib/types/lib/fieldHelp.d.ts +139 -0
  178. package/dist-lib/types/lib/format.d.ts +16 -0
  179. package/dist-lib/types/lib/hydrate.d.ts +37 -0
  180. package/dist-lib/types/lib/indexCapabilities.d.ts +17 -0
  181. package/dist-lib/types/lib/jsonlGraph.d.ts +42 -0
  182. package/dist-lib/types/lib/listCaps.d.ts +48 -0
  183. package/dist-lib/types/lib/literals.d.ts +36 -0
  184. package/dist-lib/types/lib/namespaceName.d.ts +10 -0
  185. package/dist-lib/types/lib/neighborhood.d.ts +37 -0
  186. package/dist-lib/types/lib/patternValidation.d.ts +12 -0
  187. package/dist-lib/types/lib/restartCopy.d.ts +11 -0
  188. package/dist-lib/types/lib/sampleLoader.d.ts +95 -0
  189. package/dist-lib/types/lib/samples.d.ts +87 -0
  190. package/dist-lib/types/lib/sbomGraph.d.ts +58 -0
  191. package/dist-lib/types/lib/sectionHelp.d.ts +39 -0
  192. package/dist-lib/types/lib/semantic.d.ts +95 -0
  193. package/dist-lib/types/lib/storedQueries.d.ts +43 -0
  194. package/dist-lib/types/lib/truncate.d.ts +34 -0
  195. package/dist-lib/types/lib/truncation.d.ts +7 -0
  196. package/dist-lib/types/lib/vector.d.ts +13 -0
  197. package/dist-lib/types/main.d.ts +1 -0
  198. package/dist-lib/types/plugin/PluginEditor.d.ts +20 -0
  199. package/dist-lib/types/plugin/nl/PluginNlAssistPanel.d.ts +13 -0
  200. package/dist-lib/types/plugin/nl/pluginPrompt.d.ts +48 -0
  201. package/dist-lib/types/plugin/scaffolds.d.ts +26 -0
  202. package/dist-lib/types/screens/AnalyticsScreen.d.ts +8 -0
  203. package/dist-lib/types/screens/BenchmarkScreen.d.ts +1 -0
  204. package/dist-lib/types/screens/BrowserScreen.d.ts +6 -0
  205. package/dist-lib/types/screens/CanvasScreen.d.ts +10 -0
  206. package/dist-lib/types/screens/ConnectScreen.d.ts +1 -0
  207. package/dist-lib/types/screens/DashboardScreen.d.ts +13 -0
  208. package/dist-lib/types/screens/IndexesScreen.d.ts +8 -0
  209. package/dist-lib/types/screens/IntegrationsScreen.d.ts +14 -0
  210. package/dist-lib/types/screens/KnowledgeScreen.d.ts +1 -0
  211. package/dist-lib/types/screens/PathScreen.d.ts +9 -0
  212. package/dist-lib/types/screens/PluginsScreen.d.ts +1 -0
  213. package/dist-lib/types/screens/QueryScreen.d.ts +1 -0
  214. package/dist-lib/types/screens/SamplesScreen.d.ts +7 -0
  215. package/dist-lib/types/screens/SaveGamesScreen.d.ts +7 -0
  216. package/dist-lib/types/screens/SubgraphScreen.d.ts +1 -0
  217. package/dist-lib/types/state/eventFeed.d.ts +63 -0
  218. package/dist-lib/types/state/feedFilter.d.ts +42 -0
  219. package/dist-lib/types/state/graphShape.d.ts +37 -0
  220. package/dist-lib/types/state/instanceStore.d.ts +280 -0
  221. package/dist-lib/types/state/integrations.d.ts +25 -0
  222. package/dist-lib/types/state/liveFeed.d.ts +37 -0
  223. package/dist-lib/types/state/scopeKey.d.ts +8 -0
  224. package/dist-lib/types/state/status.d.ts +21 -0
  225. package/dist-lib/typescript-aCo3H3H0.js +343 -0
  226. package/dist-lib/typespec-BsmjDEu7.js +117 -0
  227. package/dist-lib/vb-ChHvIDrk.js +372 -0
  228. package/dist-lib/wgsl-XEp1ju8c.js +439 -0
  229. package/dist-lib/xml-CSt-F-dl.js +95 -0
  230. package/dist-lib/yaml-kSsc3ru_.js +206 -0
  231. package/package.json +98 -0
@@ -0,0 +1,25 @@
1
+ import type { DelegateKind } from "../api/types";
2
+ /**
3
+ * Snippet library (FR-22), mirroring the prototype's set. Each entry names the kinds it
4
+ * fits; the NL assist reuses the matching entries as required few-shot examples
5
+ * (nl-assist spec FR-26.5).
6
+ */
7
+ export interface Snippet {
8
+ title: string;
9
+ description: string;
10
+ kinds: DelegateKind[];
11
+ code: string;
12
+ }
13
+ export declare const SNIPPET_LIBRARY: Snippet[];
14
+ export declare function snippetsForKind(kind: DelegateKind): Snippet[];
15
+ /**
16
+ * Rewrites a fragment's parameter identifier to the slot's parameter name so inserting
17
+ * "Label match" into an EdgeFilter yields `return (e) => e.Label == ...`. Every fragment
18
+ * shown to the user or the NL model must go through this - a `v` example in a `ge` slot
19
+ * is exactly the mismatch that made phi4-mini wrap the idiom in an inline-invoked lambda
20
+ * (field failure, 2026-07-17). It only rewrites identifier-with-dot occurrences (plus the
21
+ * parameter list), so keep fragment string literals free of `v.`/`e.`/`ge.`/`p.` and
22
+ * dot-less parameter references out of cross-kind fragments.
23
+ */
24
+ export declare function rewriteParameterName(code: string, parameterName: string): string;
25
+ export declare function snippetCodeFor(snippet: Snippet, parameterName: string): string;
@@ -0,0 +1,37 @@
1
+ import { type Ref } from "react";
2
+ import { type ElementRef, type F8GraphCanvasHandle } from "../canvas/GraphCanvas";
3
+ import { type StyleConfig } from "../canvas/styleConfig";
4
+ import type { CanvasEdge, CanvasNode } from "../state/instanceStore";
5
+ import type { PathREST } from "../api/types";
6
+ import { type ThemeTokens } from "../app/studioConfig";
7
+ /**
8
+ * The component-level embed (feature studio-embeddable): Studio's graph canvas as a
9
+ * standalone, data-in/callback-out component for host pages that want an interactive graph
10
+ * without mounting all of Studio. This prop shape is the FROZEN public contract - changing
11
+ * `CanvasNode`/`CanvasEdge`/`StyleConfig`/`ElementRef` in a breaking way breaks hosts, which
12
+ * is why it stays the minimal surface GraphCanvas actually reads (internal-only props such
13
+ * as the adjacency-preview emphasis set are deliberately not part of it).
14
+ */
15
+ export interface F8GraphCanvasProps {
16
+ nodes: Record<number, CanvasNode>;
17
+ edges: Record<number, CanvasEdge>;
18
+ /** Style rules + renderer choice; defaults to Studio's canvas defaults. */
19
+ config?: StyleConfig;
20
+ /** A path result to spotlight (members highlighted, the rest dimmed). */
21
+ pathOverlay?: PathREST | null;
22
+ /** Transient node spotlight (the "eclipse" corona). */
23
+ highlight?: ElementRef | null;
24
+ onSelect?: (ref: ElementRef | null) => void;
25
+ /** Token overrides for this embed; anything omitted keeps Studio's dark defaults. */
26
+ theme?: Partial<ThemeTokens>;
27
+ /**
28
+ * Camera handle (feature canvas-host-controls): `fitToView`, `getCameraRatio`,
29
+ * `setCameraRatio`. Optional like everything else here, and attaching it changes no rendering.
30
+ */
31
+ ref?: Ref<F8GraphCanvasHandle>;
32
+ }
33
+ /**
34
+ * Renders inside its own `.f8-studio` scope root, so the canvas styling works on a page
35
+ * that never mounted the Studio shell. Sized by the host: the wrapper fills its parent.
36
+ */
37
+ export declare function F8GraphCanvas({ nodes, edges, config, pathOverlay, highlight, onSelect, theme, ref, }: F8GraphCanvasProps): import("react").JSX.Element;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * The canvas-only export surface, published as the package subpath `./canvas`. This is the
3
+ * ONE home for what a canvas host may import; the whole-Studio entry (index.ts) re-exports
4
+ * this list rather than repeating it, so the two entries can never drift.
5
+ *
6
+ * Why a second entry exists: importing the canvas from the main entry drags the app shell's
7
+ * module graph (the Monaco editor above all) into the host's bundle. A host that wants a
8
+ * graph and nothing else imports `@fallen-8/studio/canvas` and pays for the graph only -
9
+ * scripts/check-lib-artifact.mjs fails the build if the editor leaks back in.
10
+ */
11
+ export { F8GraphCanvas, type F8GraphCanvasProps } from "./F8GraphCanvas";
12
+ export type { ElementRef, F8GraphCanvasHandle } from "../canvas/GraphCanvas";
13
+ export { DEFAULT_STYLE_CONFIG } from "../canvas/styleConfig";
14
+ export type { StyleConfig } from "../canvas/styleConfig";
15
+ export type { CanvasEdge, CanvasNode } from "../state/instanceStore";
16
+ export type { PathREST } from "../api/types";
17
+ export type { ThemeTokens } from "../app/studioConfig";
18
+ /**
19
+ * The documented default magnitudes. A host that computes its own sizes (say, scaling with
20
+ * its container) needs to know what it is scaling FROM, so the defaults are part of the
21
+ * contract rather than private constants.
22
+ */
23
+ export { EDGE_LABEL_SIZE_DEFAULT, EDGE_WIDTH_DEFAULT, EDGE_WIDTH_RANGE, LABEL_SIZE_DEFAULT, NODE_SIZE_DEFAULT, NODE_SIZE_RANGE, PATH_EDGE_MIN_WIDTH, PATH_NODE_MIN_SIZE, } from "../canvas/styleEngine";
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The whole-Studio export surface (feature studio-embeddable). What a host may import is
3
+ * exactly what is re-exported here - the packaging phase turns this module into the library
4
+ * entry point, so anything not on this list is internal. Spec:
5
+ * features/done/studio-embeddable/spec.md.
6
+ *
7
+ * The canvas half of the surface is NOT repeated here: ./canvas owns it (and is published as
8
+ * the package's "./canvas" subpath for hosts that want the graph without the app shell), so
9
+ * the two entries cannot drift.
10
+ */
11
+ export { mountStudio, F8Studio } from "../app/mount";
12
+ export type { StudioConfig } from "../app/studioConfig";
13
+ export type { InstanceAuth, InstanceConfig } from "../instances/types";
14
+ export * from "./canvas";
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Manual-replay overlay (feature studio-first-run). Renders the SAME <FirstRunShow> the
3
+ * Dashboard auto-shows, on top of the current screen, from beat 1. Radix Dialog gives the focus
4
+ * trap, Escape-to-close, and focus restore for free. Closing never touches the dismissed flag.
5
+ *
6
+ * The show creates NOTHING: its handoff buttons only navigate (to the Sample gallery or the
7
+ * import screen) or dismiss. The unit-test graph endpoint is deliberately never wired in (see
8
+ * CLAUDE.md); newcomers reach a populated graph through the curated Sample gallery.
9
+ */
10
+ export declare function FirstRunOverlay(): import("react").JSX.Element;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The first-run show (feature studio-first-run): a short, mostly-passive, code-driven animated
3
+ * walkthrough of Fallen-8's five core capabilities (graph, path, analytics, subgraph, vectors)
4
+ * on the canned {@link MOCK_GRAPH}, ending on an opt-in handoff.
5
+ *
6
+ * It CREATES NOTHING: it renders a hardcoded mock as SVG and animates it with CSS. It issues no
7
+ * network request of its own. Only the handoff buttons perform a real action, on click, through
8
+ * the injected handlers - so the auto-show (rendered inline by the Dashboard on an empty graph)
9
+ * and the manual replay (rendered by <FirstRunOverlay>) are the SAME component with the same
10
+ * contract; only the entry point differs. Prev/Next/dots let a viewer step through at their pace.
11
+ */
12
+ export interface FirstRunShowProps {
13
+ /** "auto" = inline empty-state on the Dashboard; "replay" = manual overlay. Used only for labels. */
14
+ variant: "auto" | "replay";
15
+ /** Dismiss into the app (auto: remember dismissal; replay: close the overlay). */
16
+ onExplore: () => void;
17
+ /** Jump to the Sample gallery (the newcomer's path from empty to a populated, curated graph). */
18
+ onBrowseSamples: () => void;
19
+ /** Point the user at the JSONL import location. */
20
+ onImport: () => void;
21
+ }
22
+ export declare function FirstRunShow({ variant, onExplore, onBrowseSamples, onImport }: FirstRunShowProps): import("react").JSX.Element;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * The first-run show's beats (feature studio-first-run). One line of real-text caption per beat
3
+ * (never baked into an image), an endpoint shown as text only, and a story tie-in drawn from the
4
+ * "Asymmetric Cyber Warfare" mock graph. All copy is concise and uses no em dashes.
5
+ *
6
+ * Beats run at 10s each so a newcomer can read each one; the show is skippable and steppable
7
+ * (Prev/Next/dots), so the length is a comfortable ceiling, not a wait.
8
+ */
9
+ export type BeatId = "bloom" | "path" | "rank" | "subgraph" | "semantic";
10
+ export interface Beat {
11
+ id: BeatId;
12
+ /** Short label for the progress dots / navigation. */
13
+ title: string;
14
+ caption: string;
15
+ /** The real REST endpoint, shown as monospace text only (the show never calls it). */
16
+ endpoint?: string;
17
+ /** A one-line story tie-in for this beat. */
18
+ note?: string;
19
+ durationMs: number;
20
+ }
21
+ export declare const BEATS: readonly Beat[];
22
+ /** Stable reference for the timeline hook's effect dependency. */
23
+ export declare const BEAT_DURATIONS: readonly number[];
@@ -0,0 +1,38 @@
1
+ /**
2
+ * First-run show state (feature studio-first-run).
3
+ *
4
+ * `dismissed` remembers, per bound namespace key (`<instanceId>/<ns>`), that the newcomer
5
+ * dismissed the auto-show so a returning user is not nagged on a graph that has simply stayed
6
+ * empty. It is cleared the moment the namespace is observed non-empty, so the show auto-shows
7
+ * again if the graph genuinely empties later. Only this map is persisted.
8
+ *
9
+ * `replayOpen` is the transient manual-replay overlay flag (never persisted): the persistent
10
+ * rail control opens the same <FirstRunShow> from anywhere, ignoring `dismissed`.
11
+ */
12
+ export interface FirstRunState {
13
+ dismissed: Record<string, boolean>;
14
+ replayOpen: boolean;
15
+ /** Auto-show path only: remember the newcomer dismissed the show for this namespace. */
16
+ dismiss: (key: string) => void;
17
+ /** Re-arm the auto-show for a namespace once it is seen non-empty (called on populate). */
18
+ clearIfPopulated: (key: string) => void;
19
+ openReplay: () => void;
20
+ closeReplay: () => void;
21
+ }
22
+ export declare const useFirstRun: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<FirstRunState>, "setState" | "persist"> & {
23
+ setState(partial: FirstRunState | Partial<FirstRunState> | ((state: FirstRunState) => FirstRunState | Partial<FirstRunState>), replace?: false | undefined): unknown;
24
+ setState(state: FirstRunState | ((state: FirstRunState) => FirstRunState), replace: true): unknown;
25
+ persist: {
26
+ setOptions: (options: Partial<import("zustand/middleware").PersistOptions<FirstRunState, {
27
+ dismissed: Record<string, boolean>;
28
+ }, unknown>>) => void;
29
+ clearStorage: () => void;
30
+ rehydrate: () => Promise<void> | void;
31
+ hasHydrated: () => boolean;
32
+ onHydrate: (fn: (state: FirstRunState) => void) => () => void;
33
+ onFinishHydration: (fn: (state: FirstRunState) => void) => () => void;
34
+ getOptions: () => Partial<import("zustand/middleware").PersistOptions<FirstRunState, {
35
+ dismissed: Record<string, boolean>;
36
+ }, unknown>>;
37
+ };
38
+ }>;
@@ -0,0 +1,56 @@
1
+ /**
2
+ * The first-run show's canned mock graph (feature studio-first-run): "Asymmetric Cyber Warfare".
3
+ *
4
+ * A tiny, story-driven graph: an elite threat actor weaponizes a compromised supply-chain tool
5
+ * to strike multiple targets, while a SOC and its analyst defend. Six entities, five directed
6
+ * relationships. It tells the graph pitch in one glance: the full blast radius of a compromise
7
+ * is a single native traversal here, versus brittle multi-table joins in a relational store.
8
+ *
9
+ * This is the show's ASSET SEAM: pure, hardcoded data drawn as SVG by <FirstRunShow>. It is
10
+ * never the user's data and is never read from or written to the engine. The same graph ships
11
+ * as a loadable sample (scripts/samples/cyberWarfare.ts); a designer who later produces a
12
+ * Lottie/.riv can replace the code animation behind this boundary without touching the
13
+ * empty-state detection or the replay wiring.
14
+ *
15
+ * Positions are laid out by hand in the viewBox so the attack fans out left-to-right and the
16
+ * defenders sit below. `rank` is a precomputed mock PageRank (0..1) that drives the analytics
17
+ * beat's sizing; `emoji` is the node glyph.
18
+ */
19
+ export interface MockVertex {
20
+ id: number;
21
+ label: string;
22
+ emoji: string;
23
+ x: number;
24
+ y: number;
25
+ rank: number;
26
+ }
27
+ export interface MockEdge {
28
+ id: string;
29
+ source: number;
30
+ target: number;
31
+ label: string;
32
+ }
33
+ export interface MockGraph {
34
+ viewBox: string;
35
+ vertices: readonly MockVertex[];
36
+ edges: readonly MockEdge[];
37
+ /** Path beat: the highlighted route (the attack's blast radius), as an ordered vertex-id list. */
38
+ path: readonly number[];
39
+ /** Subgraph beat: the member vertex ids; member edges are those with both endpoints inside. */
40
+ subgraph: readonly number[];
41
+ /** Semantic beat: the query point, the "nearest" vertices, and the neighbor expanded into. */
42
+ semantic: {
43
+ query: {
44
+ x: number;
45
+ y: number;
46
+ };
47
+ nearest: readonly number[];
48
+ expandFrom: number;
49
+ expandTo: number;
50
+ };
51
+ }
52
+ export declare const MOCK_GRAPH: MockGraph;
53
+ /** Whether an edge lies on the highlighted path (directed, consecutive), for the path beat. */
54
+ export declare function isPathEdge(edge: MockEdge, path: readonly number[]): boolean;
55
+ /** Whether an edge is inside the subgraph (both endpoints are members), for the subgraph beat. */
56
+ export declare function isSubgraphEdge(edge: MockEdge, subgraph: readonly number[]): boolean;
@@ -0,0 +1,35 @@
1
+ export interface Timeline {
2
+ /** The active beat index while playing, or null once the show has settled on the handoff. */
3
+ beat: number | null;
4
+ /** True once the show has settled: it finished playing, was skipped, or reduced-motion. */
5
+ resting: boolean;
6
+ /** True while the tab is hidden (motion is held so the show never runs past unseen). */
7
+ paused: boolean;
8
+ /** True while auto-advancing; manual navigation turns it off, Replay turns it back on. */
9
+ autoplay: boolean;
10
+ /** Step to the next beat (or the handoff after the last one). Pauses autoplay. */
11
+ next: () => void;
12
+ /** Step to the previous beat. Pauses autoplay. */
13
+ prev: () => void;
14
+ /** Jump directly to a beat by index. Pauses autoplay. */
15
+ goTo: (index: number) => void;
16
+ /** Jump straight to the handoff. Pauses autoplay. */
17
+ skip: () => void;
18
+ /** Restart from beat 0 and resume auto-advancing. */
19
+ replay: () => void;
20
+ }
21
+ /**
22
+ * Drives the first-run show's beat sequence (feature studio-first-run). Advances one beat at a
23
+ * time on `durations`, settling on the handoff (index === beatCount) after the last beat.
24
+ *
25
+ * - Auto-advances only while `autoplay` is on. Any manual navigation (next/prev/goTo/skip) turns
26
+ * autoplay off so the timer never yanks the view while the user is exploring; Replay turns it
27
+ * back on from the top.
28
+ * - Pauses while the tab is hidden (`visibilitychange`) so the show never plays unseen; on return
29
+ * the current beat's timer restarts from full (pausing, not to-the-millisecond resume).
30
+ * - Under `reducedMotion` it opens already settled on the handoff with autoplay off (no motion),
31
+ * yet the user can still step through the beats manually (the CSS neutralizes their motion).
32
+ *
33
+ * `durations` must be a stable reference (a module constant) - it is an effect dependency.
34
+ */
35
+ export declare function useBeatTimeline(beatCount: number, durations: readonly number[], reducedMotion: boolean): Timeline;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Tracks the OS "reduce motion" preference (feature studio-first-run). Guards against a
3
+ * missing `matchMedia` (jsdom under vitest) by reading `false` there, and subscribes so a
4
+ * live preference change re-renders. In reduced-motion the show renders its rested final
5
+ * state instead of autoplaying.
6
+ */
7
+ export declare function useReducedMotion(): boolean;
@@ -0,0 +1,83 @@
1
+ import type { InstanceConfig } from "./types";
2
+ /**
3
+ * Global instance registry (FR-1a) + the single active instance (FR-1b).
4
+ * Persisted in local storage; per-instance workspace state lives elsewhere
5
+ * (state/instanceStore.ts) keyed by instance id (FR-1c).
6
+ */
7
+ export declare const DEFAULT_NAMESPACE = "default";
8
+ export interface RegistryState {
9
+ instances: InstanceConfig[];
10
+ activeId: string | null;
11
+ /** The active namespace per instance id (feature graph-namespaces); absent = "default". */
12
+ activeNamespaces: Record<string, string>;
13
+ /**
14
+ * Whether an instance's server supports namespaces (probed via GET /ns): true/false once
15
+ * known, absent while unknown. A pre-namespace server (false) gets UNBOUND instances —
16
+ * bare paths — so the previous release keeps working instead of 404ing on /ns/default.
17
+ */
18
+ namespaceSupport: Record<string, boolean>;
19
+ addInstance: (instance: Omit<InstanceConfig, "id">) => InstanceConfig;
20
+ updateInstance: (id: string, patch: Partial<Omit<InstanceConfig, "id">>) => void;
21
+ removeInstance: (id: string) => void;
22
+ setActive: (id: string) => void;
23
+ setActiveNamespace: (instanceId: string, namespace: string) => void;
24
+ setNamespaceSupport: (instanceId: string, supported: boolean) => void;
25
+ }
26
+ /**
27
+ * The data-plane endpoint injected by config.js (feature standalone-ui): a classic
28
+ * `<script src="/config.js">` sets `window.__F8_CONFIG__` before this module evaluates, so a
29
+ * standalone Studio build can be pointed at any REST origin at container start. Absent or empty
30
+ * means same-origin (the all-in-one default). Read through normalizeBaseUrl so a trailing slash in
31
+ * F8_API_URL cannot corrupt buildUrl concatenation, and as a function (not an inline const) so it
32
+ * stays unit-testable after the global is set.
33
+ */
34
+ export declare function configuredApiUrl(): string;
35
+ /** The instance the app is served from - always available, never removable by accident. */
36
+ export declare const SAME_ORIGIN_INSTANCE: InstanceConfig;
37
+ export declare function isManagedInstance(id: string): boolean;
38
+ export declare const useRegistry: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<RegistryState>, "setState" | "persist"> & {
39
+ setState(partial: RegistryState | Partial<RegistryState> | ((state: RegistryState) => RegistryState | Partial<RegistryState>), replace?: false | undefined): unknown;
40
+ setState(state: RegistryState | ((state: RegistryState) => RegistryState), replace: true): unknown;
41
+ persist: {
42
+ setOptions: (options: Partial<import("zustand/middleware").PersistOptions<RegistryState, {
43
+ instances: InstanceConfig[];
44
+ activeId: string | null;
45
+ activeNamespaces: Record<string, string>;
46
+ }, unknown>>) => void;
47
+ clearStorage: () => void;
48
+ rehydrate: () => Promise<void> | void;
49
+ hasHydrated: () => boolean;
50
+ onHydrate: (fn: (state: RegistryState) => void) => () => void;
51
+ onFinishHydration: (fn: (state: RegistryState) => void) => () => void;
52
+ getOptions: () => Partial<import("zustand/middleware").PersistOptions<RegistryState, {
53
+ instances: InstanceConfig[];
54
+ activeId: string | null;
55
+ activeNamespaces: Record<string, string>;
56
+ }, unknown>>;
57
+ };
58
+ }>;
59
+ /**
60
+ * Re-point and re-hydrate the registry after a mount set its StudioConfig (feature
61
+ * studio-embeddable). The store is created at module import, before any config exists, so a
62
+ * host mount re-runs persistence against the (possibly prefixed) storage key; `merge` above
63
+ * then injects the host's managed instances and applies its activeInstanceId/namespace knobs.
64
+ * The standalone mount runs this too, with the default config it is a no-op re-hydration.
65
+ */
66
+ export declare function applyStudioConfigToRegistry(): Promise<void>;
67
+ /** The active instance's active namespace (feature graph-namespaces); "default" until set. */
68
+ export declare function useActiveNamespace(): string;
69
+ export declare function useActiveInstance(): InstanceConfig | null;
70
+ /**
71
+ * The active instance plus its per-namespace workspace store - the preamble every connected
72
+ * screen needs (the AppShell connection gate guarantees an active instance, hence the non-null).
73
+ * The returned instance is NAMESPACE-BOUND (feature graph-namespaces): its API calls address
74
+ * /ns/{activeNamespace}/… explicitly, and the workspace store is keyed per namespace so
75
+ * results, drafts and canvas state never cross namespaces.
76
+ */
77
+ export declare function useInstanceStore(): {
78
+ instance: InstanceConfig;
79
+ store: {
80
+ (): import("../state/instanceStore").WorkspaceState;
81
+ <U>(selector: (state: import("../state/instanceStore").WorkspaceState) => U): U;
82
+ } & import("zustand").StoreApi<import("../state/instanceStore").WorkspaceState>;
83
+ };
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Instance registry model (FR-1a).
3
+ *
4
+ * Auth is intentionally a discriminated union (feature web-ui, lightweight auth): the
5
+ * Fallen-8 apiApp accepts its static API key either in a header (default X-Api-Key) or as
6
+ * an RFC 6750-shaped `Authorization: Bearer <key>`.
7
+ *
8
+ * `bearer` is the host-embed arm (feature studio-embeddable): the token comes from a
9
+ * host-supplied provider callback, so lifetime and refresh stay the host's job and no
10
+ * long-lived secret ever reaches Studio. The callback makes it non-serializable BY DESIGN -
11
+ * bearer instances arrive via StudioConfig as managed instances and are never persisted.
12
+ * Being async, it resolves only at the transport choke points (client.ts
13
+ * resolveAuthHeaders); the sync authHeaders keeps serving the standalone kinds.
14
+ */
15
+ export type InstanceAuth = {
16
+ kind: "none";
17
+ } | {
18
+ kind: "apiKey";
19
+ key: string;
20
+ useBearer?: boolean;
21
+ header?: string;
22
+ } | {
23
+ kind: "bearer";
24
+ getToken: () => Promise<string>;
25
+ };
26
+ export interface InstanceConfig {
27
+ id: string;
28
+ name: string;
29
+ /** Base URL without a trailing slash; "" means the origin the app is served from. */
30
+ baseUrl: string;
31
+ auth: InstanceAuth;
32
+ /**
33
+ * The ADDRESSED namespace (feature graph-namespaces): when set, every namespace-scoped
34
+ * request goes to /ns/{namespace}/… — explicitly, "default" included. Never persisted on
35
+ * the registry record; useInstanceStore() binds it from the active-namespace state, so a
36
+ * bound view of the instance flows to the screens' API calls.
37
+ */
38
+ namespace?: string;
39
+ }
40
+ export declare function normalizeBaseUrl(url: string): string;
41
+ export declare function describeEndpoint(instance: InstanceConfig): string;
42
+ /**
43
+ * A cross-origin instance is one whose baseUrl resolves to a different origin than the page the
44
+ * Studio is served from. It matters for diagnostics (feature standalone-ui): when such an
45
+ * instance's /status probe fails at the fetch layer, a missing CORS allow-list entry on the data
46
+ * plane is indistinguishable from "server down", so the Connect screen surfaces a CORS hint for
47
+ * exactly these. Same-origin ("") is never cross-origin.
48
+ */
49
+ export declare function isCrossOriginInstance(baseUrl: string): boolean;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The one canvas element cap (feature canvas-view-controls): the upper bound on elements
3
+ * fetched into the canvas working set PER KIND, since `GET /graph?maxElements=` caps
4
+ * vertices and edges independently (the server clamps each to 100,000). Used by the
5
+ * sample-graph loaders and the Canvas screen's "Show whole graph" load.
6
+ */
7
+ export declare const CANVAS_ELEMENT_CAP = 20000;
@@ -0,0 +1,55 @@
1
+ import type { EdgeREST, PathREST } from "../api/types";
2
+ /**
3
+ * Pure logic for the Canvas "Connect" tab (feature canvas-find-connect): pairwise shortest-path
4
+ * discovery over the canvas vertices, and the selective add/remove bookkeeping that keeps the
5
+ * canvas honest. Kept DOM-free so every decision below is unit-tested without a render.
6
+ *
7
+ * BLS expands frontiers over incoming AND outgoing edges, so a->b finds the same connection as
8
+ * b->a; Connect therefore runs ONE query per UNORDERED pair (lower id as source), never both
9
+ * directions. See features/open/canvas-find-connect/spec.md.
10
+ */
11
+ /**
12
+ * The most pairs a single Connect run will search. Above this the run is refused, not silently
13
+ * truncated: a partial pairwise sweep would report "no path" for pairs it never tried, which is
14
+ * a lie. 500 pairs is ~32 vertices in all-scope. One tuning home.
15
+ */
16
+ export declare const CONNECT_PAIR_CAP = 500;
17
+ /** How many pair path-searches run concurrently in one batched round (bounds in-flight fetches). */
18
+ export declare const CONNECT_BATCH_SIZE = 8;
19
+ /** The canvas element ids at the moment a Connect run starts - the baseline every path is diffed against. */
20
+ export interface CanvasBaseline {
21
+ nodes: Set<number>;
22
+ edges: Set<number>;
23
+ }
24
+ /** The vertices and edges a path would introduce over the run baseline (its endpoints excluded). */
25
+ export interface IntroducedSets {
26
+ nodeIds: Set<number>;
27
+ edgeIds: Set<number>;
28
+ }
29
+ /**
30
+ * Every unordered pair of the given vertex ids as `[lowId, highId]`, in ascending, deterministic
31
+ * order. Duplicate ids collapse and self-pairs are excluded, so N distinct ids yield exactly
32
+ * N*(N-1)/2 pairs.
33
+ */
34
+ export declare function buildPairs(vertexIds: number[]): [number, number][];
35
+ /** How many unordered pairs `vertexCount` DISTINCT vertices produce (N*(N-1)/2, never negative). */
36
+ export declare function pairCount(vertexCount: number): number;
37
+ /**
38
+ * What a path would ADD to the canvas: its vertices and edges minus everything already in the
39
+ * baseline. A pair's endpoints are baseline vertices by construction, so a direct-edge path
40
+ * introduces just the edge; a multi-hop path introduces its intermediate vertices and hop edges.
41
+ */
42
+ export declare function introducedSets(path: PathREST, baseline: CanvasBaseline): IntroducedSets;
43
+ /**
44
+ * What actually LEAVES the canvas when `target` is retracted: the elements it introduced that no
45
+ * OTHER still-added path also introduced. A shared intermediate therefore survives until its last
46
+ * claiming path is removed. `others` must exclude `target` itself (pass the remaining added paths).
47
+ */
48
+ export declare function removalSet(target: IntroducedSets, others: IntroducedSets[]): IntroducedSets;
49
+ /**
50
+ * Canvas edges synthesized from a path's hops (id, endpoints, type). The same shape the Path
51
+ * screen's overlay builds; label/props are null here because a path element carries only the
52
+ * edge's type, not its full property set (a later real merge fills them in). The caller filters
53
+ * these to the ids it actually wants to add.
54
+ */
55
+ export declare function synthesizeEdges(path: PathREST): EdgeREST[];
@@ -0,0 +1,6 @@
1
+ /** A property is reserved (embedding state) when it uses either embedding prefix. */
2
+ export declare function isReservedEmbeddingProperty(propertyId: string): boolean;
3
+ /** A one-line preview of a stored vector value. The REST egress sends Single[] values as
4
+ * the bracketed string form (see AGraphElement.FormatPropertyValue), so both shapes are
5
+ * truncated — a 1024-dim embedding must never dump raw into the table. */
6
+ export declare function previewVector(value: unknown): string;