@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,1032 @@
1
+ /**
2
+ * REST DTO shapes, mirroring features/done/web-ui/openapi-v0.1.json (camelCase on the wire).
3
+ * This hand-curated file is the intentional client contract. The contract test
4
+ * (tests/api-contract.test.ts) asserts every route used by the client exists in that OpenAPI
5
+ * snapshot with the method we call it with, so route/method drift between these shapes and the
6
+ * server surfaces loudly.
7
+ */
8
+ /** A registered index: id + plugin type (on /status and in save-game KPIs). */
9
+ export interface IndexDescription {
10
+ indexId: string;
11
+ pluginType: string | null;
12
+ /**
13
+ * For a vector index BOUND to an element embedding (feature element-embeddings), the
14
+ * embedding name it projects; null for a raw/unbound index and every other family. A
15
+ * bound index maintains itself — explicit vector adds are rejected. Populated only by
16
+ * the live /status inventory, never in save-game KPIs. Optional so older servers parse.
17
+ */
18
+ embeddingName?: string | null;
19
+ /** The declared model-identity string a vector index expects, or null. Diagnostic only. */
20
+ model?: string | null;
21
+ /**
22
+ * The query families this index answers (feature index-workspace) — the derivation
23
+ * contract lives on the server's IndexDescriptionREST. Live /status inventory only,
24
+ * absent on older servers (lib/indexCapabilities.ts holds the client fallback).
25
+ */
26
+ capabilities?: string[] | null;
27
+ /** CountOfKeys() / CountOfValues() snapshots — live /status inventory only. */
28
+ keys?: number | null;
29
+ values?: number | null;
30
+ }
31
+ /** Save-game registry (feature save-games). */
32
+ export interface SaveGameKpis {
33
+ vertexCount: number;
34
+ edgeCount: number;
35
+ usedMemoryBytes: number;
36
+ indices: IndexDescription[];
37
+ availableIndexPlugins: string[];
38
+ availablePathPlugins: string[];
39
+ availableServicePlugins: string[];
40
+ subGraphs: string[];
41
+ }
42
+ /** One namespace inside a save game (feature graph-namespaces, registry schema v2). */
43
+ export interface SaveGameNamespace {
44
+ name: string;
45
+ location: string;
46
+ fileCount: number;
47
+ totalBytes: number;
48
+ kpis: SaveGameKpis;
49
+ }
50
+ export interface SaveGame {
51
+ id: string;
52
+ savedAt: string;
53
+ trigger: "api" | "shutdown" | "imported";
54
+ /** Null on multi-namespace entries (the per-member locations live in `namespaces`). */
55
+ location: string | null;
56
+ fileCount: number;
57
+ totalBytes: number;
58
+ engineVersion: string | null;
59
+ kpis: SaveGameKpis | null;
60
+ /** Null/absent on pre-namespace (v1) entries, which are default-only saves. */
61
+ namespaces?: SaveGameNamespace[] | null;
62
+ }
63
+ /**
64
+ * The PATCH /ns/{name} override vocabulary (feature namespace-startup-load): "inherit" CLEARS
65
+ * the override and falls back to the server's configured default. One type because the server
66
+ * parses every one of its tri-state fields through one parser.
67
+ */
68
+ export type NamespaceTriState = "enabled" | "disabled" | "inherit";
69
+ /** GET /ns — one namespace of the Fallen-8 (feature graph-namespaces). */
70
+ export interface NamespaceEntry {
71
+ name: string;
72
+ /**
73
+ * "notLoaded" is a namespace this Fallen-8 catalogs but did not load into the running
74
+ * process (feature namespace-startup-load). It is LISTED anyway: hiding it would reach
75
+ * the "recreate or switch" recover state by absence, and that state's primary action
76
+ * recreates the namespace empty over data that is still on disk.
77
+ */
78
+ state: "ready" | "creating" | "notLoaded";
79
+ /**
80
+ * Null for a "notLoaded" namespace: the server reports no count rather than 0, because a
81
+ * zero reads as "this graph is empty" - which is what drives the first-run walkthrough and
82
+ * the Samples panel's no-wipe fast path. Treat null as UNKNOWN, never as empty.
83
+ */
84
+ vertexCount: number | null;
85
+ /** Null for a "notLoaded" namespace (see `vertexCount`). */
86
+ edgeCount: number | null;
87
+ createdAt: string;
88
+ /**
89
+ * Whether the NEXT boot loads this namespace: true/false when set explicitly, null when it
90
+ * inherits the server's Fallen8:Namespaces:LoadOnStartup default. Independent of `state` -
91
+ * it describes the next process, not this one.
92
+ */
93
+ loadOnStartupEnabled: boolean | null;
94
+ }
95
+ export interface NamespacesResponse {
96
+ namespaces: NamespaceEntry[];
97
+ maxNamespaces: number;
98
+ /**
99
+ * The instance-wide startup-load default this boot ran with, which is what a namespace set to
100
+ * "inherit" resolves to (feature writable-instance-config). Published UNCOMPOSED, i.e. with
101
+ * `startupLoadMode` NOT folded in, so a client can say "the default is skip AND the mode is
102
+ * overriding it" rather than showing a composed value that makes saving skip look broken. Optional
103
+ * so an instance predating the field still parses.
104
+ */
105
+ loadOnStartupDefault?: boolean;
106
+ /**
107
+ * The startup mode this boot ran with. Both "all" and "defaultOnly" SHORT-CIRCUIT every
108
+ * per-namespace preference, so a namespace showing "skip" can still have been loaded.
109
+ */
110
+ startupLoadMode?: "catalog" | "all" | "defaultOnly";
111
+ }
112
+ /**
113
+ * POST /ns/{name}/activate (feature namespace-startup-load): the namespace as it stands after
114
+ * the call, plus whether THIS call is what loaded it. `activated: false` is a success, not a
115
+ * conflict - the namespace was already loaded and nothing was restored, and this flag is the
116
+ * only way a caller can tell the two apart. It says nothing about the persisted startup-load
117
+ * policy, which activation deliberately leaves alone (`NamespaceEntry.loadOnStartupEnabled`).
118
+ */
119
+ export interface NamespaceActivationREST {
120
+ namespace: NamespaceEntry;
121
+ activated: boolean;
122
+ detail: string | null;
123
+ }
124
+ /** POST /bulk/import success summary (feature bulk-import-export). */
125
+ export interface BulkImportResultREST {
126
+ verticesCreated: number;
127
+ edgesCreated: number;
128
+ linesRead: number;
129
+ }
130
+ /**
131
+ * GET /ns/{ns}/generate - what a benchmark-graph generation created. Generation is ADDITIVE, so
132
+ * the created counts and the resulting totals are both reported, and `namespace` names the graph
133
+ * that grew (the endpoint has no default-namespace alias).
134
+ */
135
+ export interface GraphGenerationResult {
136
+ namespace: string;
137
+ verticesCreated: number;
138
+ edgesCreated: number;
139
+ distribution: "uniform" | "preferential";
140
+ elapsedMilliseconds: number;
141
+ vertexCountAfter: number;
142
+ edgeCountAfter: number;
143
+ }
144
+ /** GET /ns/{ns}/benchmark - structured edge-traversal statistics (TPS = traversals/second). */
145
+ export interface BenchmarkResult {
146
+ iterations: number;
147
+ edgesTraversed: number;
148
+ averageTps: number;
149
+ medianTps: number;
150
+ standardDeviationTps: number;
151
+ }
152
+ export interface StatusREST {
153
+ /**
154
+ * The addressed namespace's residency (feature namespace-startup-load): "ready", or
155
+ * "notLoaded" when the server catalogs this namespace but did not load it. /status is the
156
+ * ONE namespace-scoped route that still answers in that state; every other one refuses with
157
+ * 503. Optional so instances predating the field still parse.
158
+ */
159
+ namespaceState?: "ready" | "creating" | "notLoaded" | null;
160
+ /**
161
+ * Null when the addressed namespace is "notLoaded" - the server omits every engine-derived
162
+ * field rather than reporting zeros, so null means UNKNOWN and must never be read as empty.
163
+ */
164
+ vertexCount: number | null;
165
+ /** Null when the addressed namespace is "notLoaded" (see `vertexCount`). */
166
+ edgeCount: number | null;
167
+ usedMemory: number;
168
+ indices?: IndexDescription[] | null;
169
+ availableIndexPlugins: string[];
170
+ availablePathPlugins: string[];
171
+ availableAnalyticsPlugins: string[];
172
+ availableServicePlugins: string[];
173
+ apiKeyRequired?: boolean;
174
+ authenticated?: boolean;
175
+ embedding?: EmbeddingProviderStatsREST | null;
176
+ chat?: ChatProviderStatsREST | null;
177
+ ingestion?: IngestionStats | null;
178
+ nlp?: NlpStats | null;
179
+ durability?: DurabilityREST | null;
180
+ }
181
+ /**
182
+ * What the engine knows about its own durability, read as one group so the fields always describe
183
+ * a single outcome. The reason it is on the cheap status surface at all: a client that reconciles
184
+ * against the graph and then deletes what nothing asserts any more would otherwise draw that
185
+ * conclusion from truncated history with no way to know. The integrations runtime does exactly
186
+ * that and defers deletion on this block; a human watching a dashboard deserves the same signal.
187
+ */
188
+ export interface DurabilityREST {
189
+ walEnabled: boolean;
190
+ /** The log's failure fence has tripped, or an anchored log awaits its paired load: commits are
191
+ * landing in memory but not durably. */
192
+ degraded: boolean;
193
+ recoveryRan: boolean;
194
+ /** The last replay stopped before the end of the log, so the graph is a PREFIX of history. */
195
+ lastRecoveryTruncated: boolean;
196
+ lastRecoveryReplayedEntries: number;
197
+ /** Indexes the last checkpoint could not write: they will be absent after the next load. */
198
+ lastCheckpointDroppedIndices: number;
199
+ }
200
+ /** The entity/key-term enrichment sidecar's state. Off means chunks land without entities. */
201
+ export interface NlpStats {
202
+ enabled: boolean;
203
+ configured: boolean;
204
+ reachable: boolean;
205
+ }
206
+ export interface IngestionStats {
207
+ enabled: boolean;
208
+ textFormats: string[];
209
+ binaryFormats: string[];
210
+ docling: {
211
+ configured: boolean;
212
+ reachable: boolean;
213
+ };
214
+ limits: {
215
+ maxUploadBytes: number;
216
+ maxPages: number;
217
+ maxChunksPerDocument: number;
218
+ maxChunksPerNamespace: number;
219
+ maxLinksPerChunk: number;
220
+ };
221
+ embeddingName: string;
222
+ vectorIndexId?: string | null;
223
+ fulltextIndexId?: string | null;
224
+ }
225
+ export interface DocumentSummary {
226
+ documentId: number;
227
+ name: string;
228
+ sourceFormat: string;
229
+ sourceUri?: string;
230
+ status: "processing" | "indexed" | "failed";
231
+ error?: string;
232
+ chunkCount: number;
233
+ pageCount?: number;
234
+ contentHash: string;
235
+ converter: string;
236
+ chunkerConfig?: string;
237
+ embeddingModel?: string;
238
+ embeddingDimension?: number;
239
+ embedded: boolean;
240
+ embeddingModelStale: boolean;
241
+ }
242
+ export interface DocumentList {
243
+ documents: DocumentSummary[];
244
+ namespaceChunkCount: number;
245
+ chunkCeiling: number;
246
+ currentEmbeddingModel?: string;
247
+ }
248
+ export interface ChunkSummary {
249
+ chunkId: number;
250
+ order: number;
251
+ kind: string;
252
+ headingPath?: string;
253
+ pageFrom?: number;
254
+ pageTo?: number;
255
+ identifiers?: string[];
256
+ textPreview: string;
257
+ }
258
+ export interface DocumentDetail {
259
+ summary: DocumentSummary;
260
+ chunks: ChunkSummary[];
261
+ }
262
+ export interface IngestTextSpecification {
263
+ name: string;
264
+ text: string;
265
+ format?: "markdown" | "plain";
266
+ embed?: boolean;
267
+ properties?: Record<string, string>;
268
+ sourceUri?: string;
269
+ replaceDocumentId?: number;
270
+ link?: {
271
+ indexIds: string[];
272
+ maxLinksPerChunk?: number;
273
+ };
274
+ }
275
+ export interface DocumentSearchSpecification {
276
+ queryText?: string;
277
+ queryVector?: number[];
278
+ mode?: "fused" | "dense" | "lexical";
279
+ k?: number;
280
+ window?: number;
281
+ groupByDocument?: boolean;
282
+ }
283
+ export interface ChunkHit {
284
+ chunkId: number;
285
+ documentId?: number;
286
+ score: number;
287
+ order: number;
288
+ text: string;
289
+ headingPath?: string;
290
+ pageFrom?: number;
291
+ pageTo?: number;
292
+ identifiers?: string[];
293
+ window?: {
294
+ chunkId: number;
295
+ order: number;
296
+ text: string;
297
+ }[];
298
+ }
299
+ export interface DocumentSearchResult {
300
+ modeUsed: "fused" | "dense" | "lexical";
301
+ hits?: ChunkHit[];
302
+ documents?: {
303
+ document?: DocumentSummary;
304
+ bestScore: number;
305
+ chunks: ChunkHit[];
306
+ }[];
307
+ }
308
+ /** One index role in the binding: whether it is required, exists, and is usable. */
309
+ export interface DocumentBindingRole {
310
+ role: "vector" | "fulltext" | "entity";
311
+ indexId: string;
312
+ required: boolean;
313
+ exists: boolean;
314
+ ready: boolean;
315
+ detail?: string;
316
+ }
317
+ /** The semantic layer's index binding: ingestion is refused (428) until `ready`. */
318
+ export interface DocumentBinding {
319
+ ready: boolean;
320
+ vector: DocumentBindingRole;
321
+ fulltext: DocumentBindingRole;
322
+ entity: DocumentBindingRole;
323
+ }
324
+ /** A deduplicated entity the corpus mentions; the id is a graph vertex (a valid seed). */
325
+ export interface DocumentEntity {
326
+ id: number;
327
+ text: string;
328
+ type: string;
329
+ mentionCount: number;
330
+ }
331
+ export interface DocumentEntityList {
332
+ entities: DocumentEntity[];
333
+ total: number;
334
+ }
335
+ export interface PropertyREST {
336
+ propertyId: string;
337
+ propertyValue: unknown;
338
+ fullQualifiedTypeName?: string;
339
+ }
340
+ export interface AGraphElementREST {
341
+ id: number;
342
+ creationDate: string;
343
+ modificationDate: string;
344
+ label?: string | null;
345
+ properties?: PropertyREST[] | null;
346
+ }
347
+ export interface VertexREST extends AGraphElementREST {
348
+ kind?: "vertex";
349
+ }
350
+ export interface EdgeREST extends AGraphElementREST {
351
+ sourceVertex: number;
352
+ targetVertex: number;
353
+ edgePropertyId?: string | null;
354
+ kind?: "edge";
355
+ }
356
+ /**
357
+ * One element as POST /graphelements/get returns it: identity, stamps, label, properties and kind -
358
+ * and deliberately NOT adjacency, which is why this is its own type rather than VertexREST | EdgeREST.
359
+ *
360
+ * A `vertex` projection IS a complete VertexREST (a vertex carries no adjacency in this API), so
361
+ * hydration uses it directly. An `edge` projection is NOT a complete EdgeREST: it has no endpoints,
362
+ * and the canvas cannot draw an edge without them, so hydration re-reads those one by one. Typing
363
+ * them the same would have hidden exactly that difference.
364
+ */
365
+ export interface GraphElementProjectionREST extends AGraphElementREST {
366
+ kind: "vertex" | "edge";
367
+ }
368
+ /**
369
+ * Result of POST /graphelements/get: the elements that exist, plus the ids that do not. notFound is
370
+ * explicit because "gone" and "has no properties" are different conclusions.
371
+ */
372
+ export interface GraphElementBatchREST {
373
+ elements: GraphElementProjectionREST[];
374
+ notFound: number[];
375
+ }
376
+ export interface GraphREST {
377
+ vertices: VertexREST[];
378
+ edges: EdgeREST[];
379
+ }
380
+ /**
381
+ * GET /statistics — graph-shape snapshot (feature observability; surfaced by feature
382
+ * studio-coverage). When sampled=true, per-name counts and distinct totals are
383
+ * within-the-sample; multiply counts by sampleStride to extrapolate.
384
+ */
385
+ export interface NamedCountREST {
386
+ name: string | null;
387
+ count: number;
388
+ }
389
+ export interface CardinalityStatsREST {
390
+ top: NamedCountREST[] | null;
391
+ distinctTotal: number;
392
+ }
393
+ export interface DegreeStatsREST {
394
+ min: number;
395
+ max: number;
396
+ mean: number;
397
+ p50: number;
398
+ p90: number;
399
+ p99: number;
400
+ }
401
+ export interface IndexStatsREST {
402
+ name: string | null;
403
+ type: string | null;
404
+ keys: number;
405
+ values: number;
406
+ }
407
+ export interface MemoryStatsREST {
408
+ processWorkingSetBytes: number;
409
+ gcHeapBytes: number;
410
+ gcLastHeapSizeBytes: number;
411
+ gcFragmentedBytes: number;
412
+ }
413
+ /**
414
+ * The active embedding provider (feature embedding-provider), surfaced on /statistics.
415
+ * Reading it never loads a model. null when the server predates the provider feature.
416
+ */
417
+ export interface EmbeddingProviderStatsREST {
418
+ enabled: boolean;
419
+ backend: string | null;
420
+ modelName: string | null;
421
+ modelVersion: string | null;
422
+ dimension: number;
423
+ intendedMetric: string | null;
424
+ loaded: boolean;
425
+ resident?: boolean | null;
426
+ gpu?: boolean | null;
427
+ }
428
+ export interface ChatProviderStatsREST {
429
+ enabled: boolean;
430
+ backend: string | null;
431
+ model: string | null;
432
+ loaded: boolean;
433
+ resident?: boolean | null;
434
+ gpu?: boolean | null;
435
+ }
436
+ export interface ObservabilityConfigREST {
437
+ otlpEnabled: boolean;
438
+ otlpEndpoint: string | null;
439
+ prometheusEnabled: boolean;
440
+ prometheusRequireApiKey: boolean;
441
+ tracingSamplingRatio: number;
442
+ statisticsElementBudget: number;
443
+ statisticsTopN: number;
444
+ }
445
+ export interface SemanticConfigREST {
446
+ embedding?: EmbeddingProviderStatsREST | null;
447
+ chat?: ChatProviderStatsREST | null;
448
+ }
449
+ export type ConfigSettingTier = "live" | "restart" | "notWritable";
450
+ export type ConfigSettingApplyMode = "live" | "liveForNewWork" | "restart" | "never";
451
+ export type ConfigSettingKind = "bool" | "int" | "double" | "string" | "enum" | "array";
452
+ export type ConfigSettingSource = "default" | "appSettings" | "userSecrets" | "environment" | "commandLine" | "host" | "override";
453
+ export interface SettingREST {
454
+ key: string;
455
+ kind: ConfigSettingKind;
456
+ tier: ConfigSettingTier;
457
+ applyMode: ConfigSettingApplyMode;
458
+ value?: string | null;
459
+ valueWithheld?: boolean;
460
+ source: ConfigSettingSource;
461
+ restartPending: boolean;
462
+ minimum?: number | null;
463
+ maximum?: number | null;
464
+ allowedValues?: string[] | null;
465
+ rule?: string | null;
466
+ reason?: string | null;
467
+ }
468
+ export interface PendingRestartREST {
469
+ key: string;
470
+ runningValue: string | null;
471
+ pendingValue: string | null;
472
+ }
473
+ export interface ConfigREST {
474
+ semantic: SemanticConfigREST;
475
+ observability: ObservabilityConfigREST;
476
+ apiKeyRequired: boolean;
477
+ /**
478
+ * Whether this instance accepts PATCH /config at all (both operator acts are in place: an API key
479
+ * AND Fallen8:Security:EnableConfigurationWrite). The panel renders the settings read-only when
480
+ * false, because offering a Save that the server would always refuse is worse than saying why.
481
+ * Optional so an older instance parses; absent means no write route exists, so read-only is right.
482
+ */
483
+ configWriteEnabled?: boolean;
484
+ settings?: SettingREST[];
485
+ pendingRestart?: PendingRestartREST[];
486
+ }
487
+ export interface ConfigWriteSpec {
488
+ settings: Record<string, string | null>;
489
+ }
490
+ export interface ConfigWriteResultREST {
491
+ key: string;
492
+ value: string | null;
493
+ coerced: boolean;
494
+ cleared: boolean;
495
+ applyMode: ConfigSettingApplyMode;
496
+ restartPending: boolean;
497
+ applyFailure?: string | null;
498
+ }
499
+ export interface ConfigWriteREST {
500
+ results: ConfigWriteResultREST[];
501
+ pendingRestart: PendingRestartREST[];
502
+ }
503
+ export interface ChatMessageREST {
504
+ role: string;
505
+ content: string;
506
+ }
507
+ export interface ChatCompletionSpec {
508
+ messages: ChatMessageREST[];
509
+ options?: {
510
+ temperature?: number;
511
+ };
512
+ }
513
+ export interface ChatCompletionStatsREST {
514
+ promptTokens?: number | null;
515
+ completionTokens?: number | null;
516
+ durationMs?: number | null;
517
+ tokensPerSecond?: number | null;
518
+ }
519
+ export interface ChatCompletionResultREST {
520
+ content: string;
521
+ model: string | null;
522
+ stats?: ChatCompletionStatsREST | null;
523
+ }
524
+ export interface GraphStatisticsREST {
525
+ vertexCount: number;
526
+ edgeCount: number;
527
+ vertexLabels: CardinalityStatsREST;
528
+ edgeLabels: CardinalityStatsREST;
529
+ inDegree: DegreeStatsREST;
530
+ outDegree: DegreeStatsREST;
531
+ totalDegree: DegreeStatsREST;
532
+ propertyKeys: CardinalityStatsREST;
533
+ indices: IndexStatsREST[] | null;
534
+ memory: MemoryStatsREST;
535
+ computedInMs: number;
536
+ sampled: boolean;
537
+ sampleStride: number;
538
+ /** The embedding provider snapshot; null on servers predating the provider feature. */
539
+ embedding?: EmbeddingProviderStatsREST | null;
540
+ }
541
+ /** Typed literal (FR-9): { value | propertyValue, fullQualifiedTypeName } */
542
+ export interface LiteralSpecification {
543
+ value: string;
544
+ fullQualifiedTypeName: string;
545
+ }
546
+ export interface PropertySpecification {
547
+ propertyId: string;
548
+ propertyValue: string;
549
+ fullQualifiedTypeName: string;
550
+ }
551
+ /** PUT /vertex and PUT /edge return 202 with no body - the created id is not reported. */
552
+ export interface VertexSpecification {
553
+ label?: string;
554
+ creationDate: number;
555
+ properties?: PropertySpecification[];
556
+ }
557
+ export interface EdgeSpecification {
558
+ creationDate: number;
559
+ sourceVertex: number;
560
+ targetVertex: number;
561
+ edgePropertyId: string;
562
+ label?: string;
563
+ properties?: PropertySpecification[];
564
+ }
565
+ /**
566
+ * BinaryOperator travels as an INTEGER on the wire (the OpenAPI sample "Equal" is one of
567
+ * the stale doc-comment samples spec §5 warns about); resultType travels as a string.
568
+ */
569
+ export declare const BINARY_OPERATORS: {
570
+ readonly Equals: 0;
571
+ readonly Greater: 1;
572
+ readonly GreaterOrEquals: 2;
573
+ readonly Lower: 3;
574
+ readonly LowerOrEquals: 4;
575
+ readonly NotEquals: 5;
576
+ };
577
+ export type BinaryOperatorName = keyof typeof BINARY_OPERATORS;
578
+ export interface ScanSpecification {
579
+ operator: number;
580
+ literal: LiteralSpecification;
581
+ resultType: "Vertices" | "Edges" | "Both";
582
+ }
583
+ /**
584
+ * The all-property discovery scan (feature all-property-search): a case-insensitive substring
585
+ * over EVERY property value, with no operator or typed literal - just a term. The plural
586
+ * companion of the singular named-key property scan.
587
+ */
588
+ export interface PropertySearchSpecification {
589
+ searchTerm: string;
590
+ label?: string;
591
+ resultType: "Vertices" | "Edges" | "Both";
592
+ }
593
+ export interface IndexScanSpecification extends ScanSpecification {
594
+ indexId: string;
595
+ }
596
+ export interface RangeIndexScanSpecification {
597
+ indexId: string;
598
+ leftLimit: LiteralSpecification;
599
+ rightLimit: LiteralSpecification;
600
+ includeLeft: boolean;
601
+ includeRight: boolean;
602
+ resultType: "Vertices" | "Edges" | "Both";
603
+ }
604
+ export interface FulltextIndexScanSpecification {
605
+ indexId: string;
606
+ requestString: string;
607
+ }
608
+ export interface SearchDistanceSpecification {
609
+ indexId: string;
610
+ graphElementId: number;
611
+ distance: number;
612
+ }
613
+ export interface FulltextSearchResultElementREST {
614
+ graphElementId: number;
615
+ highlights: string[];
616
+ score: number;
617
+ }
618
+ export interface FulltextSearchResultREST {
619
+ maximumScore: number;
620
+ elements: FulltextSearchResultElementREST[];
621
+ }
622
+ export interface PluginSpecification {
623
+ uniqueId: string;
624
+ pluginType: string;
625
+ pluginOptions?: Record<string, PropertySpecification>;
626
+ }
627
+ /**
628
+ * Vector index (feature vector-index; surfaced by studio-coverage). Scores are RAW —
629
+ * interpret via metric/higherIsBetter (L2: lower is better), never re-derive client-side.
630
+ */
631
+ export interface VectorIndexScanSpecification {
632
+ indexId: string;
633
+ query: number[];
634
+ k: number;
635
+ kind?: "vertex" | "edge" | "any";
636
+ label?: string;
637
+ }
638
+ export interface VectorScoredElementREST {
639
+ graphElementId: number;
640
+ score: number;
641
+ }
642
+ export interface VectorSearchResultREST {
643
+ metric: string | null;
644
+ higherIsBetter: boolean;
645
+ results: VectorScoredElementREST[] | null;
646
+ }
647
+ /** Exactly one mode: explicit vector, or propertyId naming a float[] property. */
648
+ export interface VectorIndexAddSpecification {
649
+ graphElementId: number;
650
+ vector?: number[];
651
+ propertyId?: string;
652
+ }
653
+ /**
654
+ * Element embeddings (feature element-embeddings). A named embedding is durable element
655
+ * state written through the typed /graphelement/{id}/embedding/{name} routes; the element
656
+ * is the source of truth and a bound vector index projects from it. The studio reads a
657
+ * stored embedding straight off the element's (folded) reserved properties, so there is no
658
+ * client GET helper — only the write DTO. (The server GET returns ElementEmbeddingREST.)
659
+ */
660
+ export interface EmbeddingWriteSpecification {
661
+ vector: number[];
662
+ }
663
+ /**
664
+ * Text-in embedding (feature embedding-provider) — capability-gated (403 when the
665
+ * provider is off). name defaults to "default" server-side.
666
+ */
667
+ export interface EmbedElementSpecification {
668
+ graphElementId: number;
669
+ text: string;
670
+ name?: string;
671
+ }
672
+ /** Semantic search: embed a query text once, then kNN against a vector index. */
673
+ export interface EmbeddingSearchSpecification {
674
+ indexId: string;
675
+ text: string;
676
+ k: number;
677
+ kind?: "vertex" | "edge" | "any";
678
+ label?: string;
679
+ }
680
+ /**
681
+ * An index key on the wire: PropertySpecification minus the property id — the server's
682
+ * add/remove-key endpoints read only propertyValue + type (see GraphController.Index).
683
+ */
684
+ export interface IndexKeySpecification {
685
+ propertyValue: string;
686
+ fullQualifiedTypeName: string;
687
+ }
688
+ export interface IndexAddToSpecification {
689
+ graphElementId: number;
690
+ key: IndexKeySpecification;
691
+ }
692
+ /**
693
+ * The declarative semantic block (feature element-embeddings) on POST /path and
694
+ * PUT /subgraph. Carries the query vector (or queryText, embedded once by the provider —
695
+ * mutually exclusive) plus code-free similarity filter/cost. Pure data: it compiles no C#.
696
+ * minScore filters vertices by similarity; costBySimilarity (path only) weights a DIJKSTRA
697
+ * search by it. See the element-embeddings README.
698
+ */
699
+ export interface SemanticTraversalSpecification {
700
+ queryVector?: number[];
701
+ queryText?: string;
702
+ embeddingName?: string;
703
+ metric?: "Cosine" | "DotProduct" | "L2";
704
+ minScore?: number;
705
+ costBySimilarity?: boolean;
706
+ }
707
+ export interface PathFilterSpecification {
708
+ vertexFilter?: string;
709
+ edgeFilter?: string;
710
+ edgePropertyFilter?: string;
711
+ }
712
+ export interface PathCostSpecification {
713
+ vertexCost?: string;
714
+ edgeCost?: string;
715
+ }
716
+ export interface PathSpecification {
717
+ pathAlgorithmName: string;
718
+ maxDepth: number;
719
+ maxResults: number;
720
+ maxPathWeight: number;
721
+ filter?: PathFilterSpecification;
722
+ cost?: PathCostSpecification;
723
+ /** Stored query of kind Path — mutually exclusive with filter/cost (server 400s on mix). */
724
+ storedQuery?: string;
725
+ /** Declarative semantic block (feature element-embeddings); pure data, compiles no C#. */
726
+ semantic?: SemanticTraversalSpecification;
727
+ }
728
+ export interface PathElementREST {
729
+ sourceVertexId: number;
730
+ targetVertexId: number;
731
+ edgeId: number;
732
+ edgePropertyId?: string | null;
733
+ direction?: string;
734
+ weight: number;
735
+ }
736
+ export interface PathREST {
737
+ pathElements: PathElementREST[];
738
+ totalWeight: number;
739
+ }
740
+ export interface PatternSpecification {
741
+ type: "Vertex" | "Edge" | "VariableLengthEdge";
742
+ patternName?: string;
743
+ direction?: "OutgoingEdge" | "IncomingEdge" | "UndirectedEdge";
744
+ minLength?: number;
745
+ maxLength?: number;
746
+ vertexFilter?: string;
747
+ edgeFilter?: string;
748
+ edgePropertyFilter?: string;
749
+ /**
750
+ * Declarative semantic threshold for a Vertex step (feature
751
+ * subgraph-semantic-thresholds) — scores against the request's semantic query. Owns the
752
+ * step's filter slot (400 together with vertexFilter); 400 on edge steps, without a
753
+ * semantic block, and in stored SubGraph templates.
754
+ */
755
+ semanticMinScore?: number;
756
+ }
757
+ export interface SubGraphSpecification {
758
+ name: string;
759
+ additionalInformation?: string;
760
+ vertexFilter?: string;
761
+ edgeFilter?: string;
762
+ patterns?: PatternSpecification[];
763
+ /** Stored query of kind SubGraph — mutually exclusive with filters/patterns (server 400s on mix). */
764
+ storedQuery?: string;
765
+ /**
766
+ * Declarative semantic block (feature element-embeddings), bound at REGISTRATION;
767
+ * minScore becomes the vertex pre-filter. costBySimilarity is path-only (400 here); not
768
+ * available on a stored-template invocation (400).
769
+ */
770
+ semantic?: SemanticTraversalSpecification;
771
+ }
772
+ /**
773
+ * The bound semantic state echoed on a registered subgraph's summary (feature
774
+ * subgraph-semantic-thresholds) — never the raw vector, only its dimension.
775
+ */
776
+ export interface SubGraphSemanticSummary {
777
+ embeddingName: string;
778
+ metric: string;
779
+ dimension: number;
780
+ /** The registration queryText, when one was used (the bound vector stays the truth). */
781
+ queryText?: string | null;
782
+ /** The top-level vertex pre-filter threshold, when set. */
783
+ minScore?: number | null;
784
+ /** Vertex pattern steps carrying a threshold (pattern = patternName or step index). */
785
+ patternThresholds?: {
786
+ pattern: string;
787
+ minScore: number;
788
+ }[] | null;
789
+ }
790
+ export interface SubGraphSummary {
791
+ name: string;
792
+ vertexCount: number;
793
+ edgeCount: number;
794
+ algorithmPluginName?: string | null;
795
+ sourceFallen8Id?: string | null;
796
+ canRecalculate?: boolean;
797
+ additionalInformation?: string | null;
798
+ /** Present only for semantic subgraphs. */
799
+ semantic?: SubGraphSemanticSummary | null;
800
+ }
801
+ /**
802
+ * Stored query library (feature stored-query-library; surfaced by studio-coverage).
803
+ * Blocks hold exactly the per-template parts; numeric bounds and instance names stay
804
+ * per-request. Entries are immutable: delete + re-register is the edit flow.
805
+ */
806
+ export type StoredQueryKind = "Path" | "SubGraph";
807
+ export interface StoredPathQueryBlock {
808
+ filter?: PathFilterSpecification;
809
+ cost?: PathCostSpecification;
810
+ }
811
+ export interface StoredSubGraphQueryBlock {
812
+ vertexFilter?: string;
813
+ edgeFilter?: string;
814
+ patterns?: PatternSpecification[];
815
+ }
816
+ export interface StoredQuerySpecification {
817
+ name: string;
818
+ kind: StoredQueryKind;
819
+ description?: string;
820
+ path?: StoredPathQueryBlock;
821
+ subGraph?: StoredSubGraphQueryBlock;
822
+ }
823
+ /** compileState: Compiled (invocable) | Failed (invoking 409s) | SourceOnly. */
824
+ export interface StoredQuerySummaryREST {
825
+ name: string | null;
826
+ kind: string | null;
827
+ description: string | null;
828
+ createdAt: string;
829
+ compileState: string | null;
830
+ }
831
+ export interface StoredQueryDetailREST extends StoredQuerySummaryREST {
832
+ specificationJson: string | null;
833
+ compileDiagnostics: string | null;
834
+ }
835
+ /**
836
+ * Plugin registration (feature plugin-registration) — the whole-TYPE sibling of the
837
+ * stored-query library: C# source authored in the browser, compile-validated and
838
+ * registered per namespace, then invoked by name. An `algorithm` implements a contract
839
+ * (Path/SubGraph/Analytics) and runs transparently through the existing path/subgraph/
840
+ * analytics endpoints; a `function` implements IGraphFunction and is invoked here. Entries
841
+ * are immutable: delete + re-register is the edit flow. Registration + validate require the
842
+ * dynamic-plugin gate (server 403 when disabled).
843
+ */
844
+ export type PluginAuthoringCategory = "algorithm" | "function";
845
+ export type AlgorithmContract = "Path" | "SubGraph" | "Analytics";
846
+ /** POST /plugins/algorithm body. */
847
+ export interface AlgorithmPluginRegistration {
848
+ name: string;
849
+ contract: AlgorithmContract;
850
+ description?: string;
851
+ sourceCode: string;
852
+ }
853
+ /** POST /plugins/function body (the function category has one contract — no discriminator). */
854
+ export interface FunctionPluginRegistration {
855
+ name: string;
856
+ description?: string;
857
+ sourceCode: string;
858
+ }
859
+ /**
860
+ * POST /plugins/{algorithm,function}/validate body: shares the registration fields, minus
861
+ * side effects. `contract` is read only on the algorithm endpoint (ignored for function).
862
+ */
863
+ export interface PluginValidationSpecification {
864
+ name: string;
865
+ contract?: AlgorithmContract;
866
+ sourceCode: string;
867
+ }
868
+ /** POST /plugins/{algorithm,function}/validate result — side-effect-free compile check. */
869
+ export interface PluginValidationResult {
870
+ valid: boolean;
871
+ error: string | null;
872
+ }
873
+ /** POST /plugins/function/{name}/invoke body — string-valued parameter bag in v1. */
874
+ export interface GraphFunctionInvocation {
875
+ parameters?: Record<string, string>;
876
+ }
877
+ /**
878
+ * POST /plugins/function/{name}/invoke result — a view of existing elements, projected with
879
+ * the SAME Vertex/Edge DTOs as GET /vertex/{id} / GET /edge/{id}.
880
+ */
881
+ export interface GraphFunctionResultREST {
882
+ vertices: VertexREST[];
883
+ edges: EdgeREST[];
884
+ }
885
+ /**
886
+ * category: "Algorithm" | "Function"; contract: "Path" | "SubGraph" | "Analytics" |
887
+ * "GraphFunction". compileState: Compiled (invocable) | Failed (invoking 409s) | SourceOnly.
888
+ */
889
+ export interface PluginSummaryREST {
890
+ name: string | null;
891
+ category: string | null;
892
+ contract: string | null;
893
+ description: string | null;
894
+ createdAt: string;
895
+ compileState: string | null;
896
+ }
897
+ export interface PluginDetailREST extends PluginSummaryREST {
898
+ sourceCode: string | null;
899
+ compileDiagnostics: string | null;
900
+ }
901
+ /**
902
+ * Graph analytics (feature graph-analytics; surfaced by studio-coverage). Runs are
903
+ * synchronous one-shots with budgets — there is no job store, and the UI must not
904
+ * fabricate one. Top-K/partition rows are the response; full results travel via
905
+ * write-back (snapshot-durable only).
906
+ */
907
+ export interface AnalyticsSpecification {
908
+ vertexLabel?: string;
909
+ edgePropertyId?: string;
910
+ direction?: "in" | "out" | "both";
911
+ maxIterations?: number;
912
+ epsilon?: number;
913
+ timeBudgetSeconds?: number;
914
+ parameters?: Record<string, number>;
915
+ maxResults?: number;
916
+ offset?: number;
917
+ writeBack?: boolean;
918
+ writeBackPropertyKey?: string;
919
+ }
920
+ export interface ScoredVertexREST {
921
+ graphElementId: number;
922
+ score: number;
923
+ }
924
+ export interface PartitionSummaryREST {
925
+ partitionId: number;
926
+ size: number;
927
+ }
928
+ export interface WriteBackResultREST {
929
+ propertyKey: string | null;
930
+ verticesWritten: number;
931
+ chunks: number;
932
+ }
933
+ export interface AnalyticsResultREST {
934
+ algorithm: string | null;
935
+ converged: boolean;
936
+ iterationsRun: number;
937
+ elapsedMs: number;
938
+ budgetExhausted: boolean;
939
+ vertexCount: number;
940
+ statistics: Record<string, number> | null;
941
+ results: ScoredVertexREST[] | null;
942
+ partitions: PartitionSummaryREST[] | null;
943
+ writeBack: WriteBackResultREST | null;
944
+ }
945
+ /** One partition's membership page — re-runs the specification (exact only when quiescent). */
946
+ export interface PartitionMembersREST {
947
+ partitionId: number;
948
+ size: number;
949
+ offset: number;
950
+ members: number[] | null;
951
+ }
952
+ /** POST /delegates/validate (gap G-2, added by this feature) */
953
+ export type DelegateKind = "VertexFilter" | "EdgeFilter" | "EdgePropertyFilter" | "VertexCost" | "EdgeCost" | "GraphElementFilter";
954
+ export interface DelegateDiagnostic {
955
+ line: number;
956
+ column: number;
957
+ endLine: number;
958
+ endColumn: number;
959
+ id: string;
960
+ message: string;
961
+ severity: "error" | "warning" | "info";
962
+ }
963
+ export interface DelegateValidationResult {
964
+ valid: boolean;
965
+ diagnostics: DelegateDiagnostic[];
966
+ }
967
+ /** What kind of value a provider setting takes, which is all a form needs to render it. */
968
+ export type SettingKind = "Text" | "Number" | "Boolean" | "Url" | "Credential";
969
+ /** One setting, as data. `help` says where to find the value in the source system. */
970
+ export interface IntegrationSetting {
971
+ key: string;
972
+ label: string;
973
+ kind: SettingKind;
974
+ required: boolean;
975
+ help: string;
976
+ defaultValue?: string | null;
977
+ }
978
+ /**
979
+ * What an integration IS, as data that is true before any run exists. A form is rendered from
980
+ * `kind`, `required` and `help` alone, which is what makes "a fourth integration needs no Studio
981
+ * change" true rather than aspirational.
982
+ */
983
+ export interface IntegrationProvider {
984
+ id: string;
985
+ displayName: string;
986
+ description: string;
987
+ settings: IntegrationSetting[];
988
+ entityKinds: string[];
989
+ claimTypes: string[];
990
+ relationTypes: string[];
991
+ canObserveCompleteState: boolean;
992
+ readOnly: boolean;
993
+ entitySummaryTemplate?: string | null;
994
+ }
995
+ /** Something a run needs a reader to know, with a stable code to grep for and alert on. */
996
+ export interface IntegrationDiagnostic {
997
+ code: string;
998
+ message: string;
999
+ subject?: string | null;
1000
+ }
1001
+ /**
1002
+ * The whole configuration of one run. A credential setting's value arrives in `credentialValues` and
1003
+ * never in `settings`: the runtime leases and redacts the first and treats the second as ordinary data.
1004
+ */
1005
+ export interface IntegrationJobRequest {
1006
+ providerId: string;
1007
+ integrationInstanceId: string;
1008
+ namespace?: string;
1009
+ settings: Record<string, string>;
1010
+ /** Secrets. Held for the run and dropped; never persisted here, never echoed back. */
1011
+ credentialValues: Record<string, string>;
1012
+ embedSummaries?: boolean;
1013
+ }
1014
+ /** The only account of a job, because the runtime keeps none. */
1015
+ export interface IntegrationJobReport {
1016
+ providerId: string;
1017
+ integrationInstanceId: string;
1018
+ startedUtc: string;
1019
+ durationMilliseconds: number;
1020
+ elementsCreated: number;
1021
+ elementsMatched: number;
1022
+ edgesCreated: number;
1023
+ claimsWithdrawn: number;
1024
+ elementsDeleted: number;
1025
+ deletionsDeferred: number;
1026
+ issuedMutations: boolean;
1027
+ summariesEmbedded?: number;
1028
+ error?: string | null;
1029
+ errorKind?: string | null;
1030
+ credentialFingerprint?: string | null;
1031
+ diagnostics: IntegrationDiagnostic[];
1032
+ }