@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.
- package/LICENSE +21 -0
- package/README.md +93 -0
- package/dist-lib/Canvas3D-C5og4ZIQ.js +62011 -0
- package/dist-lib/F8GraphCanvas-Db7vzDtJ.js +11085 -0
- package/dist-lib/abap-Bs8kvjsq.js +1398 -0
- package/dist-lib/apex-Dspwrl5m.js +326 -0
- package/dist-lib/azcli-k1BiOau1.js +68 -0
- package/dist-lib/bat-BIP72KWc.js +100 -0
- package/dist-lib/bicep-VhQeYhS3.js +102 -0
- package/dist-lib/cameligo-DnuAXtHg.js +174 -0
- package/dist-lib/canvas.js +13 -0
- package/dist-lib/clojure-BAuDPsal.js +761 -0
- package/dist-lib/coffee-BV06qSnj.js +232 -0
- package/dist-lib/cpp-Cz8Jeyrf.js +389 -0
- package/dist-lib/csharp-F6hhlXFb.js +326 -0
- package/dist-lib/csp-KzlEHCyI.js +53 -0
- package/dist-lib/css-e4FKntZ3.js +187 -0
- package/dist-lib/cssMode-Czf2vRA3.js +1571 -0
- package/dist-lib/cypher-CpvDGKRr.js +263 -0
- package/dist-lib/dart-DdHeFWR0.js +281 -0
- package/dist-lib/dockerfile-aoNXDcio.js +130 -0
- package/dist-lib/ecl-C4Q0DYuA.js +456 -0
- package/dist-lib/elixir-C9X42b0T.js +569 -0
- package/dist-lib/f8-studio.css +1 -0
- package/dist-lib/f8-studio.js +16 -0
- package/dist-lib/flow9-Bff42pfB.js +142 -0
- package/dist-lib/freemarker2-BtInkOsd.js +989 -0
- package/dist-lib/fsharp-C6vPAsHG.js +217 -0
- package/dist-lib/go-DEr8zx9f.js +218 -0
- package/dist-lib/graphql-BiNBBRFh.js +151 -0
- package/dist-lib/handlebars-UwZ7mBGA.js +419 -0
- package/dist-lib/hcl-2T9lKuFg.js +183 -0
- package/dist-lib/html-BXX93YIe.js +308 -0
- package/dist-lib/htmlMode-BCqQu1PO.js +1581 -0
- package/dist-lib/index-DFm6T7Un.js +132450 -0
- package/dist-lib/ini-CZGtssYM.js +71 -0
- package/dist-lib/java-B260NeH3.js +232 -0
- package/dist-lib/javascript-CK1z7Ynl.js +70 -0
- package/dist-lib/jsonMode-C4Q3fVvV.js +1996 -0
- package/dist-lib/julia-kuNLM9c5.js +511 -0
- package/dist-lib/kotlin-Bz6kAefA.js +253 -0
- package/dist-lib/less-AZUtS89I.js +162 -0
- package/dist-lib/lexon-BcmgnyRb.js +157 -0
- package/dist-lib/liquid-BnCUERBj.js +240 -0
- package/dist-lib/lua-Dz1RbATg.js +162 -0
- package/dist-lib/m3-CIMooLFn.js +210 -0
- package/dist-lib/markdown-C1BsCK9P.js +229 -0
- package/dist-lib/mdx-D2enmFMs.js +165 -0
- package/dist-lib/mips-BovsnfLQ.js +198 -0
- package/dist-lib/msdax-CiRB2ZB-.js +375 -0
- package/dist-lib/mysql-BwdpPE19.js +878 -0
- package/dist-lib/objective-c-D4nfHfso.js +183 -0
- package/dist-lib/pascal--j5-PYtz.js +251 -0
- package/dist-lib/pascaligo-C7TcJxNL.js +164 -0
- package/dist-lib/perl-BzEWqUb5.js +626 -0
- package/dist-lib/pgsql-B_KZ0mGX.js +851 -0
- package/dist-lib/php-A19QHzQV.js +500 -0
- package/dist-lib/pla-COeKY1hA.js +137 -0
- package/dist-lib/postiats-BfMp7zJL.js +907 -0
- package/dist-lib/powerquery-B0TS_5Gb.js +890 -0
- package/dist-lib/powershell-5jSbKdYB.js +239 -0
- package/dist-lib/protobuf-YgnOutn3.js +420 -0
- package/dist-lib/pug-DLej6kn5.js +402 -0
- package/dist-lib/python-DJvSF53q.js +301 -0
- package/dist-lib/qsharp-AhjqtSHB.js +301 -0
- package/dist-lib/r-D-F4P80w.js +243 -0
- package/dist-lib/razor-RerkagjP.js +550 -0
- package/dist-lib/redis-hwwIlMnV.js +302 -0
- package/dist-lib/redshift-Bcm_kjEG.js +809 -0
- package/dist-lib/restructuredtext-CrdzfPP-.js +174 -0
- package/dist-lib/ruby-QC2UNm1s.js +511 -0
- package/dist-lib/rust-5aqiQ3L5.js +343 -0
- package/dist-lib/sb-B1g1ZfLJ.js +115 -0
- package/dist-lib/scala-C2U4R5Gb.js +370 -0
- package/dist-lib/scheme-DeFRbslr.js +108 -0
- package/dist-lib/scss-RSTCiCmI.js +262 -0
- package/dist-lib/shell-BpF-iNu8.js +221 -0
- package/dist-lib/solidity-C00r2mbQ.js +1367 -0
- package/dist-lib/sophia-DVW5ZKDB.js +199 -0
- package/dist-lib/sparql-B0nmpxeX.js +201 -0
- package/dist-lib/sql-CJwKPERn.js +853 -0
- package/dist-lib/st-DPlKG5DT.js +416 -0
- package/dist-lib/swift-YZBAbVHV.js +309 -0
- package/dist-lib/systemverilog-CDQSaH63.js +576 -0
- package/dist-lib/tcl-Dlu8sp6Q.js +232 -0
- package/dist-lib/tsMode-C-6d-f_-.js +886 -0
- package/dist-lib/twig-C5TO7-kw.js +392 -0
- package/dist-lib/types/api/changefeed.d.ts +113 -0
- package/dist-lib/types/api/client.d.ts +81 -0
- package/dist-lib/types/api/endpoints.d.ts +197 -0
- package/dist-lib/types/api/queries.d.ts +8 -0
- package/dist-lib/types/api/types.d.ts +1032 -0
- package/dist-lib/types/app/AppShell.d.ts +10 -0
- package/dist-lib/types/app/NamespaceScope.d.ts +11 -0
- package/dist-lib/types/app/applyStudioConfig.d.ts +18 -0
- package/dist-lib/types/app/mount.d.ts +19 -0
- package/dist-lib/types/app/nav.d.ts +91 -0
- package/dist-lib/types/app/routes.d.ts +9 -0
- package/dist-lib/types/app/studioConfig.d.ts +106 -0
- package/dist-lib/types/canvas/Canvas2D.d.ts +18 -0
- package/dist-lib/types/canvas/Canvas3D.d.ts +14 -0
- package/dist-lib/types/canvas/ConnectPanel.d.ts +10 -0
- package/dist-lib/types/canvas/FindPanel.d.ts +14 -0
- package/dist-lib/types/canvas/GraphCanvas.d.ts +66 -0
- package/dist-lib/types/canvas/StylePanel.d.ts +7 -0
- package/dist-lib/types/canvas/eclipse.d.ts +136 -0
- package/dist-lib/types/canvas/imageAssets.d.ts +3 -0
- package/dist-lib/types/canvas/styleConfig.d.ts +48 -0
- package/dist-lib/types/canvas/styleEngine.d.ts +125 -0
- package/dist-lib/types/canvas/styling.d.ts +15 -0
- package/dist-lib/types/components/AdjacencyPanel.d.ts +11 -0
- package/dist-lib/types/components/AnalyticsRunner.d.ts +1 -0
- package/dist-lib/types/components/ConfigurationPanel.d.ts +1 -0
- package/dist-lib/types/components/ConfirmDialog.d.ts +18 -0
- package/dist-lib/types/components/DurabilityNotice.d.ts +18 -0
- package/dist-lib/types/components/ElementDetail.d.ts +11 -0
- package/dist-lib/types/components/ElementTable.d.ts +19 -0
- package/dist-lib/types/components/EmbeddingsTab.d.ts +15 -0
- package/dist-lib/types/components/ErrorBox.d.ts +8 -0
- package/dist-lib/types/components/EventFeedBell.d.ts +16 -0
- package/dist-lib/types/components/EventFeedPanel.d.ts +10 -0
- package/dist-lib/types/components/Field.d.ts +14 -0
- package/dist-lib/types/components/GraphShapePanel.d.ts +1 -0
- package/dist-lib/types/components/InspectLink.d.ts +5 -0
- package/dist-lib/types/components/ListCapNote.d.ts +10 -0
- package/dist-lib/types/components/MutationsPanel.d.ts +1 -0
- package/dist-lib/types/components/NamespaceSwitcher.d.ts +22 -0
- package/dist-lib/types/components/NamespacesPanel.d.ts +11 -0
- package/dist-lib/types/components/NeighborhoodPreview.d.ts +10 -0
- package/dist-lib/types/components/PluginsPanel.d.ts +9 -0
- package/dist-lib/types/components/PropertiesTab.d.ts +4 -0
- package/dist-lib/types/components/PropertyListEditor.d.ts +26 -0
- package/dist-lib/types/components/SampleGraphsPanel.d.ts +3 -0
- package/dist-lib/types/components/SectionHelp.d.ts +11 -0
- package/dist-lib/types/components/SemanticBlockEditor.d.ts +29 -0
- package/dist-lib/types/components/SemanticQueryEditor.d.ts +15 -0
- package/dist-lib/types/components/SettingRow.d.ts +15 -0
- package/dist-lib/types/components/Stat.d.ts +10 -0
- package/dist-lib/types/components/StoredQueriesPanel.d.ts +14 -0
- package/dist-lib/types/components/StoredQueryControls.d.ts +29 -0
- package/dist-lib/types/components/Truncated.d.ts +17 -0
- package/dist-lib/types/components/TruncationBadge.d.ts +6 -0
- package/dist-lib/types/components/TypedLiteralEditor.d.ts +13 -0
- package/dist-lib/types/components/VertexFilterSlot.d.ts +25 -0
- package/dist-lib/types/delegate/DelegateEditor.d.ts +10 -0
- package/dist-lib/types/delegate/DelegateSlot.d.ts +18 -0
- package/dist-lib/types/delegate/editorOptions.d.ts +25 -0
- package/dist-lib/types/delegate/kinds.d.ts +19 -0
- package/dist-lib/types/delegate/markers.d.ts +21 -0
- package/dist-lib/types/delegate/monacoSetup.d.ts +3 -0
- package/dist-lib/types/delegate/nl/NlAssistPanel.d.ts +10 -0
- package/dist-lib/types/delegate/nl/NlBackendConfig.d.ts +12 -0
- package/dist-lib/types/delegate/nl/NlDraftList.d.ts +42 -0
- package/dist-lib/types/delegate/nl/config.d.ts +105 -0
- package/dist-lib/types/delegate/nl/feedback.d.ts +30 -0
- package/dist-lib/types/delegate/nl/format.d.ts +6 -0
- package/dist-lib/types/delegate/nl/generate.d.ts +57 -0
- package/dist-lib/types/delegate/nl/prompt.d.ts +21 -0
- package/dist-lib/types/delegate/nl/useNlRun.d.ts +24 -0
- package/dist-lib/types/delegate/providers.d.ts +26 -0
- package/dist-lib/types/delegate/snippets.d.ts +25 -0
- package/dist-lib/types/embed/F8GraphCanvas.d.ts +37 -0
- package/dist-lib/types/embed/canvas.d.ts +23 -0
- package/dist-lib/types/embed/index.d.ts +14 -0
- package/dist-lib/types/firstrun/FirstRunOverlay.d.ts +10 -0
- package/dist-lib/types/firstrun/FirstRunShow.d.ts +22 -0
- package/dist-lib/types/firstrun/beats.d.ts +23 -0
- package/dist-lib/types/firstrun/firstRunStore.d.ts +38 -0
- package/dist-lib/types/firstrun/mockGraph.d.ts +56 -0
- package/dist-lib/types/firstrun/useBeatTimeline.d.ts +35 -0
- package/dist-lib/types/firstrun/useReducedMotion.d.ts +7 -0
- package/dist-lib/types/instances/registry.d.ts +83 -0
- package/dist-lib/types/instances/types.d.ts +49 -0
- package/dist-lib/types/lib/canvasCap.d.ts +7 -0
- package/dist-lib/types/lib/connectPaths.d.ts +55 -0
- package/dist-lib/types/lib/embeddingProperties.d.ts +6 -0
- package/dist-lib/types/lib/fieldHelp.d.ts +139 -0
- package/dist-lib/types/lib/format.d.ts +16 -0
- package/dist-lib/types/lib/hydrate.d.ts +37 -0
- package/dist-lib/types/lib/indexCapabilities.d.ts +17 -0
- package/dist-lib/types/lib/jsonlGraph.d.ts +42 -0
- package/dist-lib/types/lib/listCaps.d.ts +48 -0
- package/dist-lib/types/lib/literals.d.ts +36 -0
- package/dist-lib/types/lib/namespaceName.d.ts +10 -0
- package/dist-lib/types/lib/neighborhood.d.ts +37 -0
- package/dist-lib/types/lib/patternValidation.d.ts +12 -0
- package/dist-lib/types/lib/restartCopy.d.ts +11 -0
- package/dist-lib/types/lib/sampleLoader.d.ts +95 -0
- package/dist-lib/types/lib/samples.d.ts +87 -0
- package/dist-lib/types/lib/sbomGraph.d.ts +58 -0
- package/dist-lib/types/lib/sectionHelp.d.ts +39 -0
- package/dist-lib/types/lib/semantic.d.ts +95 -0
- package/dist-lib/types/lib/storedQueries.d.ts +43 -0
- package/dist-lib/types/lib/truncate.d.ts +34 -0
- package/dist-lib/types/lib/truncation.d.ts +7 -0
- package/dist-lib/types/lib/vector.d.ts +13 -0
- package/dist-lib/types/main.d.ts +1 -0
- package/dist-lib/types/plugin/PluginEditor.d.ts +20 -0
- package/dist-lib/types/plugin/nl/PluginNlAssistPanel.d.ts +13 -0
- package/dist-lib/types/plugin/nl/pluginPrompt.d.ts +48 -0
- package/dist-lib/types/plugin/scaffolds.d.ts +26 -0
- package/dist-lib/types/screens/AnalyticsScreen.d.ts +8 -0
- package/dist-lib/types/screens/BenchmarkScreen.d.ts +1 -0
- package/dist-lib/types/screens/BrowserScreen.d.ts +6 -0
- package/dist-lib/types/screens/CanvasScreen.d.ts +10 -0
- package/dist-lib/types/screens/ConnectScreen.d.ts +1 -0
- package/dist-lib/types/screens/DashboardScreen.d.ts +13 -0
- package/dist-lib/types/screens/IndexesScreen.d.ts +8 -0
- package/dist-lib/types/screens/IntegrationsScreen.d.ts +14 -0
- package/dist-lib/types/screens/KnowledgeScreen.d.ts +1 -0
- package/dist-lib/types/screens/PathScreen.d.ts +9 -0
- package/dist-lib/types/screens/PluginsScreen.d.ts +1 -0
- package/dist-lib/types/screens/QueryScreen.d.ts +1 -0
- package/dist-lib/types/screens/SamplesScreen.d.ts +7 -0
- package/dist-lib/types/screens/SaveGamesScreen.d.ts +7 -0
- package/dist-lib/types/screens/SubgraphScreen.d.ts +1 -0
- package/dist-lib/types/state/eventFeed.d.ts +63 -0
- package/dist-lib/types/state/feedFilter.d.ts +42 -0
- package/dist-lib/types/state/graphShape.d.ts +37 -0
- package/dist-lib/types/state/instanceStore.d.ts +280 -0
- package/dist-lib/types/state/integrations.d.ts +25 -0
- package/dist-lib/types/state/liveFeed.d.ts +37 -0
- package/dist-lib/types/state/scopeKey.d.ts +8 -0
- package/dist-lib/types/state/status.d.ts +21 -0
- package/dist-lib/typescript-aCo3H3H0.js +343 -0
- package/dist-lib/typespec-BsmjDEu7.js +117 -0
- package/dist-lib/vb-ChHvIDrk.js +372 -0
- package/dist-lib/wgsl-XEp1ju8c.js +439 -0
- package/dist-lib/xml-CSt-F-dl.js +95 -0
- package/dist-lib/yaml-kSsc3ru_.js +206 -0
- package/package.json +98 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { EmbeddingProviderStatsREST, GraphStatisticsREST } from "../api/types";
|
|
2
|
+
import type { InstanceConfig } from "../instances/types";
|
|
3
|
+
/** The reserved property-key prefix element embeddings are stored under (server contract). */
|
|
4
|
+
export declare const EMBEDDING_PROPERTY_PREFIX = "$embedding:";
|
|
5
|
+
/** The reserved prefix carrying an embedding's model stamp (server contract, paired with the above). */
|
|
6
|
+
export declare const EMBEDDING_MODEL_PROPERTY_PREFIX = "$embeddingModel:";
|
|
7
|
+
/**
|
|
8
|
+
* The per-instance graph-shape snapshot (feature studio-coverage): one react-query cache
|
|
9
|
+
* entry shared by every consumer. `enabled: false` — the endpoint is a budgeted O(V+E)
|
|
10
|
+
* pass behind a rate limiter, so ONLY the Graph shape panel's Compute button (refetch())
|
|
11
|
+
* ever triggers it; other screens just read whatever snapshot exists. This is the schema
|
|
12
|
+
* cache that closes gap G-3: label / property-key / index-id suggestions everywhere ids
|
|
13
|
+
* are free-form, with free-form input still working when no snapshot has been computed.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useGraphShape(instance: InstanceConfig): import("@tanstack/react-query").UseQueryResult<NoInfer<GraphStatisticsREST | null>, Error>;
|
|
16
|
+
export interface ShapeSuggestions {
|
|
17
|
+
vertexLabels: string[];
|
|
18
|
+
edgeLabels: string[];
|
|
19
|
+
propertyKeys: string[];
|
|
20
|
+
indexIds: string[];
|
|
21
|
+
/**
|
|
22
|
+
* Embedding names seen on the graph (feature element-embeddings): derived from the
|
|
23
|
+
* reserved "$embedding:<name>" property keys in the shape snapshot, since embeddings
|
|
24
|
+
* are stored as reserved properties. Empty until a shape is computed.
|
|
25
|
+
*/
|
|
26
|
+
embeddingNames: string[];
|
|
27
|
+
}
|
|
28
|
+
/** Datalist feeds from a snapshot; all empty when none has been computed yet. */
|
|
29
|
+
export declare function shapeSuggestions(shape: GraphStatisticsREST | null | undefined): ShapeSuggestions;
|
|
30
|
+
/**
|
|
31
|
+
* The live embedding-provider state (feature embedding-out-of-box): read from the cheap,
|
|
32
|
+
* periodically-refreshed /status surface, with the graph-shape snapshot as fallback for
|
|
33
|
+
* servers predating the /status field. null = genuinely unknown (no answer yet, or an old
|
|
34
|
+
* server without a computed shape) — the UI treats that like "not confirmed enabled":
|
|
35
|
+
* text-in controls stay disabled while bring-your-own-vector paths always work.
|
|
36
|
+
*/
|
|
37
|
+
export declare function useEmbeddingProvider(instance: InstanceConfig): EmbeddingProviderStatsREST | null;
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import { type UseBoundStore, type StoreApi } from "zustand";
|
|
2
|
+
import type { BinaryOperatorName, EdgeREST, PathREST, PatternSpecification, PropertyREST, VertexREST } from "../api/types";
|
|
3
|
+
import { type StyleConfig } from "../canvas/styleConfig";
|
|
4
|
+
import { type SemanticDraft, type SemanticQueryDraft, type SlotMode } from "../lib/semantic";
|
|
5
|
+
import type { TypedValue } from "../lib/literals";
|
|
6
|
+
import type { IndexCapability } from "../lib/indexCapabilities";
|
|
7
|
+
import { type FeedFilterDraft } from "./feedFilter";
|
|
8
|
+
/**
|
|
9
|
+
* Per-instance workspace state (FR-1c), via a memoized store factory. Each instance id
|
|
10
|
+
* owns exactly one store persisted under its own local-storage key, so canvas contents,
|
|
11
|
+
* drafts, and result sets can never mix across instances - mixing is structurally
|
|
12
|
+
* unrepresentable, not merely discouraged.
|
|
13
|
+
*/
|
|
14
|
+
/** Scalar property snapshot for data-driven styling (studio-canvas-viz FR-11). */
|
|
15
|
+
export type CanvasProps = Record<string, string | number | boolean>;
|
|
16
|
+
export interface CanvasNode {
|
|
17
|
+
id: number;
|
|
18
|
+
label: string | null;
|
|
19
|
+
props?: CanvasProps;
|
|
20
|
+
}
|
|
21
|
+
export interface CanvasEdge {
|
|
22
|
+
id: number;
|
|
23
|
+
source: number;
|
|
24
|
+
target: number;
|
|
25
|
+
edgePropertyId: string | null;
|
|
26
|
+
/** The element's actual label (null when unset) - never a copy of edgePropertyId. */
|
|
27
|
+
label: string | null;
|
|
28
|
+
props?: CanvasProps;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The one display rule for an edge's name: the human-facing label when present, else the
|
|
32
|
+
* always-present type (edgePropertyId). Used by both canvases and the label color scale.
|
|
33
|
+
*/
|
|
34
|
+
export declare function edgeDisplayName(edge: Pick<CanvasEdge, "label" | "edgePropertyId">): string | null;
|
|
35
|
+
/** Longest property string kept on the canvas snapshot (FR-11: styling never needs more). */
|
|
36
|
+
export declare const CANVAS_PROP_MAX_STRING = 200;
|
|
37
|
+
/** Scalars only — arrays/objects (e.g. embeddings) are style-less and must not bloat local storage. */
|
|
38
|
+
export declare function snapshotProps(properties: PropertyREST[] | null | undefined): CanvasProps;
|
|
39
|
+
export interface CanvasModel {
|
|
40
|
+
nodes: Record<number, CanvasNode>;
|
|
41
|
+
edges: Record<number, CanvasEdge>;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* REST elements → canvas model, merge-only over an optional base. An edge can only
|
|
45
|
+
* render when both endpoints are present, so unhydrated endpoints get stub nodes —
|
|
46
|
+
* expand-on-demand and previews stay merge-only. Shared by mergeIntoCanvas and the
|
|
47
|
+
* adjacency preview (feature adjacency-preview).
|
|
48
|
+
*/
|
|
49
|
+
export declare function buildCanvasModel(vertices: VertexREST[], edges: EdgeREST[], base?: CanvasModel): CanvasModel;
|
|
50
|
+
/**
|
|
51
|
+
* What the last "Show whole graph" load fetched vs the namespace's true counts (feature
|
|
52
|
+
* canvas-view-controls FR-3). Persisted alongside the canvas it describes, so the honest
|
|
53
|
+
* truncation notice survives leaving and returning; cleared with the canvas. Only set
|
|
54
|
+
* when something was actually truncated.
|
|
55
|
+
*/
|
|
56
|
+
export interface WholeGraphTruncation {
|
|
57
|
+
fetchedVertices: number;
|
|
58
|
+
fetchedEdges: number;
|
|
59
|
+
totalVertices: number;
|
|
60
|
+
totalEdges: number;
|
|
61
|
+
}
|
|
62
|
+
export interface ResultSet {
|
|
63
|
+
id: string;
|
|
64
|
+
title: string;
|
|
65
|
+
createdAt: number;
|
|
66
|
+
elementIds: number[];
|
|
67
|
+
}
|
|
68
|
+
/** Where a path/subgraph run takes its fragments from (concept spec §5.1). */
|
|
69
|
+
export type FilterSource = "inline" | "stored";
|
|
70
|
+
export interface PathDraft {
|
|
71
|
+
from: string;
|
|
72
|
+
to: string;
|
|
73
|
+
algorithm: string;
|
|
74
|
+
maxDepth: number;
|
|
75
|
+
maxResults: number;
|
|
76
|
+
maxPathWeight: number;
|
|
77
|
+
vertexFilter: string;
|
|
78
|
+
edgeFilter: string;
|
|
79
|
+
edgePropertyFilter: string;
|
|
80
|
+
vertexCost: string;
|
|
81
|
+
edgeCost: string;
|
|
82
|
+
filterSource: FilterSource;
|
|
83
|
+
storedQuery: string;
|
|
84
|
+
/** Declarative semantic-traversal block (feature element-embeddings). */
|
|
85
|
+
semantic: SemanticDraft;
|
|
86
|
+
}
|
|
87
|
+
export declare const DEFAULT_PATH_DRAFT: PathDraft;
|
|
88
|
+
/**
|
|
89
|
+
* The Query screen's whole input form (feature index-workspace). Persisted per instance
|
|
90
|
+
* so leaving for the Canvas and coming back restores it exactly — results are re-run on
|
|
91
|
+
* demand (kept out of the lean persisted store). Reset via the screen's Clear button.
|
|
92
|
+
*/
|
|
93
|
+
export interface QueryDraft {
|
|
94
|
+
mode: "property" | "index";
|
|
95
|
+
/** Property-scan scope: one named "key" (typed operator) or "any" property (contains search). */
|
|
96
|
+
propertyScope: "key" | "any";
|
|
97
|
+
propertyId: string;
|
|
98
|
+
/** All-property search term (propertyScope === "any"): a case-insensitive substring. */
|
|
99
|
+
searchTerm: string;
|
|
100
|
+
/** All-property search label restrictor (propertyScope === "any"); empty scans every label. */
|
|
101
|
+
searchLabel: string;
|
|
102
|
+
indexId: string;
|
|
103
|
+
form: IndexCapability;
|
|
104
|
+
operator: BinaryOperatorName;
|
|
105
|
+
resultType: "Vertices" | "Edges" | "Both";
|
|
106
|
+
literal: TypedValue;
|
|
107
|
+
leftLimit: TypedValue;
|
|
108
|
+
rightLimit: TypedValue;
|
|
109
|
+
includeLeft: boolean;
|
|
110
|
+
includeRight: boolean;
|
|
111
|
+
fulltextQuery: string;
|
|
112
|
+
spatialElementId: string;
|
|
113
|
+
spatialDistance: string;
|
|
114
|
+
vectorText: string;
|
|
115
|
+
vectorK: string;
|
|
116
|
+
vectorKind: "any" | "vertex" | "edge";
|
|
117
|
+
vectorLabel: string;
|
|
118
|
+
vectorSource: "vector" | "text";
|
|
119
|
+
vectorSearchText: string;
|
|
120
|
+
}
|
|
121
|
+
export declare const DEFAULT_QUERY_DRAFT: QueryDraft;
|
|
122
|
+
/**
|
|
123
|
+
* One pattern row of the subgraph builder: a pattern spec plus a stable list key and the
|
|
124
|
+
* step's vertex-slot state (feature subgraph-semantic-thresholds) — the slot MODE and the
|
|
125
|
+
* threshold as editable text (the wire `semanticMinScore` number is derived on build).
|
|
126
|
+
*/
|
|
127
|
+
export type SubgraphPatternDraft = Omit<PatternSpecification, "semanticMinScore"> & {
|
|
128
|
+
key: string;
|
|
129
|
+
/** Vertex steps only; edge steps ignore it. */
|
|
130
|
+
filterMode: SlotMode;
|
|
131
|
+
/** Threshold text for the semantic mode (parsed on build). */
|
|
132
|
+
semanticMinScore: string;
|
|
133
|
+
};
|
|
134
|
+
/** The Subgraph "create" form, persisted per instance so navigation never wipes it. */
|
|
135
|
+
export interface SubgraphDraft {
|
|
136
|
+
name: string;
|
|
137
|
+
fromSubGraph: string;
|
|
138
|
+
/** The top-level vertex pre-filter slot's mode (one owner per slot, structural). */
|
|
139
|
+
vertexFilterMode: SlotMode;
|
|
140
|
+
/** The slot's fragment text — kept across mode switches so nothing is lost. */
|
|
141
|
+
vertexFilter: string;
|
|
142
|
+
/** The slot's threshold text for the semantic mode (parsed on build). */
|
|
143
|
+
vertexMinScore: string;
|
|
144
|
+
edgeFilter: string;
|
|
145
|
+
patterns: SubgraphPatternDraft[];
|
|
146
|
+
filterSource: FilterSource;
|
|
147
|
+
storedQuery: string;
|
|
148
|
+
/** The ONE semantic query per request every semantic threshold scores against. */
|
|
149
|
+
semanticQuery: SemanticQueryDraft;
|
|
150
|
+
}
|
|
151
|
+
export declare const DEFAULT_SUBGRAPH_DRAFT: SubgraphDraft;
|
|
152
|
+
/** The Browser screen's lookup + bulk inputs, persisted per instance. */
|
|
153
|
+
export interface BrowserDraft {
|
|
154
|
+
idInput: string;
|
|
155
|
+
lookupKind: "graphelement" | "vertex" | "edge";
|
|
156
|
+
maxElements: number;
|
|
157
|
+
bulkFilter: string;
|
|
158
|
+
detailTab: "properties" | "embeddings";
|
|
159
|
+
}
|
|
160
|
+
export declare const DEFAULT_BROWSER_DRAFT: BrowserDraft;
|
|
161
|
+
/** The Analytics runner's algorithm pick + tuning inputs, persisted per instance. */
|
|
162
|
+
export interface AnalyticsDraft {
|
|
163
|
+
algorithm: string;
|
|
164
|
+
vertexLabel: string;
|
|
165
|
+
edgePropertyId: string;
|
|
166
|
+
direction: string;
|
|
167
|
+
maxResults: string;
|
|
168
|
+
maxIterations: string;
|
|
169
|
+
timeBudget: string;
|
|
170
|
+
damping: string;
|
|
171
|
+
epsilon: string;
|
|
172
|
+
showWriteBack: boolean;
|
|
173
|
+
writeBack: boolean;
|
|
174
|
+
writeBackKey: string;
|
|
175
|
+
}
|
|
176
|
+
export declare const DEFAULT_ANALYTICS_DRAFT: AnalyticsDraft;
|
|
177
|
+
/**
|
|
178
|
+
* The Canvas right-panel tool strip's inputs (feature canvas-find-connect), persisted per
|
|
179
|
+
* instance so leaving the canvas and returning restores the active tab and each tool's form.
|
|
180
|
+
* The Find result list, Connect found paths, and Connect picked-vertex ids are ephemeral session
|
|
181
|
+
* state (re-run on demand), exactly like every other result in the studio - only the inputs here
|
|
182
|
+
* persist.
|
|
183
|
+
*/
|
|
184
|
+
export interface CanvasToolsDraft {
|
|
185
|
+
/** Which right-panel tab is active: styling, element search, or path connecting. */
|
|
186
|
+
tab: "style" | "find" | "connect";
|
|
187
|
+
/** Find: the all-property contains term (fed to POST /scan/graph/properties). */
|
|
188
|
+
findTerm: string;
|
|
189
|
+
/** Find: optional exact-match label restrictor; empty searches every label. */
|
|
190
|
+
findLabel: string;
|
|
191
|
+
/** Find: restrict matches to vertices, edges, or both. */
|
|
192
|
+
findResultType: "Vertices" | "Edges" | "Both";
|
|
193
|
+
/** Connect: max hops per pairwise path search (maps to the path spec's maxDepth). */
|
|
194
|
+
connectMaxDepth: number;
|
|
195
|
+
/** Connect: use every canvas vertex, or only a picked subset, as the pair endpoints. */
|
|
196
|
+
connectScope: "all" | "pick";
|
|
197
|
+
}
|
|
198
|
+
export declare const DEFAULT_CANVAS_TOOLS_DRAFT: CanvasToolsDraft;
|
|
199
|
+
/** One-shot navigation intent: "open Query with this index preselected" (cleared on consume). */
|
|
200
|
+
export interface ScanPrefill {
|
|
201
|
+
indexId: string;
|
|
202
|
+
}
|
|
203
|
+
export interface WorkspaceState {
|
|
204
|
+
/** The Events panel's interest filter (feature studio-event-feed, see feedFilter.ts). */
|
|
205
|
+
feedFilter: FeedFilterDraft;
|
|
206
|
+
/** One-shot navigation intent: "open the Browser inspecting this element id". */
|
|
207
|
+
inspectPrefill: number | null;
|
|
208
|
+
canvasNodes: Record<number, CanvasNode>;
|
|
209
|
+
canvasEdges: Record<number, CanvasEdge>;
|
|
210
|
+
styleConfig: StyleConfig;
|
|
211
|
+
pathOverlay: PathREST | null;
|
|
212
|
+
wholeGraphTruncation: WholeGraphTruncation | null;
|
|
213
|
+
resultSets: ResultSet[];
|
|
214
|
+
pathDraft: PathDraft;
|
|
215
|
+
queryDraft: QueryDraft;
|
|
216
|
+
subgraphDraft: SubgraphDraft;
|
|
217
|
+
browserDraft: BrowserDraft;
|
|
218
|
+
analyticsDraft: AnalyticsDraft;
|
|
219
|
+
canvasToolsDraft: CanvasToolsDraft;
|
|
220
|
+
scanPrefill: ScanPrefill | null;
|
|
221
|
+
mergeIntoCanvas: (vertices: VertexREST[], edges: EdgeREST[]) => void;
|
|
222
|
+
removeFromCanvas: (kind: "node" | "edge", id: number) => void;
|
|
223
|
+
clearCanvas: () => void;
|
|
224
|
+
setWholeGraphTruncation: (truncation: WholeGraphTruncation | null) => void;
|
|
225
|
+
setStyleConfig: (patch: Partial<StyleConfig>) => void;
|
|
226
|
+
setPathOverlay: (path: PathREST | null) => void;
|
|
227
|
+
addResultSet: (title: string, elementIds: number[]) => void;
|
|
228
|
+
removeResultSet: (id: string) => void;
|
|
229
|
+
setPathDraft: (patch: Partial<PathDraft>) => void;
|
|
230
|
+
resetPathDraft: () => void;
|
|
231
|
+
setQueryDraft: (patch: Partial<QueryDraft>) => void;
|
|
232
|
+
resetQueryDraft: () => void;
|
|
233
|
+
setSubgraphDraft: (patch: Partial<SubgraphDraft>) => void;
|
|
234
|
+
resetSubgraphDraft: () => void;
|
|
235
|
+
setBrowserDraft: (patch: Partial<BrowserDraft>) => void;
|
|
236
|
+
resetBrowserDraft: () => void;
|
|
237
|
+
setAnalyticsDraft: (patch: Partial<AnalyticsDraft>) => void;
|
|
238
|
+
resetAnalyticsDraft: () => void;
|
|
239
|
+
setCanvasToolsDraft: (patch: Partial<CanvasToolsDraft>) => void;
|
|
240
|
+
setScanPrefill: (prefill: ScanPrefill | null) => void;
|
|
241
|
+
setFeedFilter: (patch: Partial<FeedFilterDraft>) => void;
|
|
242
|
+
setInspectPrefill: (id: number | null) => void;
|
|
243
|
+
}
|
|
244
|
+
type WorkspaceStore = UseBoundStore<StoreApi<WorkspaceState>>;
|
|
245
|
+
/**
|
|
246
|
+
* Returns the one store belonging to this instance id + namespace (memoized). The
|
|
247
|
+
* "default" namespace keeps the pre-namespace key (`f8.workspace.<id>`) so an existing
|
|
248
|
+
* workspace is adopted as default's with no migration; other namespaces persist under
|
|
249
|
+
* `f8.workspace.<id>/<ns>` (feature graph-namespaces). Also accepts a pre-bound
|
|
250
|
+
* "<id>/<namespace>" compound as the first argument (the bound instance view's id, see
|
|
251
|
+
* useInstanceStore) — both call shapes resolve to the same canonical key. Registry ids
|
|
252
|
+
* never contain "/".
|
|
253
|
+
*/
|
|
254
|
+
export declare function getInstanceStore(instanceId: string, namespace?: string): WorkspaceStore;
|
|
255
|
+
/**
|
|
256
|
+
* Drops a namespace's memoized store AND its persisted state (feature graph-namespaces):
|
|
257
|
+
* after a drop, a recreate, or a factory reset the old canvas/results would reference
|
|
258
|
+
* elements that no longer exist (or worse, ids now naming different elements).
|
|
259
|
+
*/
|
|
260
|
+
export declare function purgeInstanceStore(instanceId: string, namespace?: string): void;
|
|
261
|
+
/** Purges EVERY namespace's workspace of one instance (the factory-reset blast radius). */
|
|
262
|
+
export declare function purgeAllInstanceStores(instanceId: string): void;
|
|
263
|
+
/**
|
|
264
|
+
* Moves a namespace's persisted workspace to its new name — rename is a pure address
|
|
265
|
+
* change, so canvas/drafts must follow. Both memoized stores are dropped (a store's
|
|
266
|
+
* persist key is baked in at creation), so the next access rehydrates from the moved state.
|
|
267
|
+
*/
|
|
268
|
+
export declare function migrateInstanceStore(instanceId: string, from: string, to: string): void;
|
|
269
|
+
/**
|
|
270
|
+
* Drops every memoized store (persisted state untouched), so the next access recreates it
|
|
271
|
+
* against the CURRENT storage prefix. A store bakes its persist key in at creation
|
|
272
|
+
* (`workspaceStorageName`), and the memo map is keyed by scope alone, so a mount that
|
|
273
|
+
* changes `storageNamespace` (feature studio-embeddable) must clear the map or a colliding
|
|
274
|
+
* instance id + namespace would hand the new mount the previous one's live store - reading
|
|
275
|
+
* its graph data and writing to its key. Called from applyStudioConfig on every mount.
|
|
276
|
+
*/
|
|
277
|
+
export declare function dropMemoizedWorkspaceStores(): void;
|
|
278
|
+
/** Test hook: same drop, named for its use at test setup. */
|
|
279
|
+
export declare const resetInstanceStoresForTests: typeof dropMemoizedWorkspaceStores;
|
|
280
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { InstanceConfig } from "../instances/types";
|
|
2
|
+
import type { IntegrationProvider } from "../api/types";
|
|
3
|
+
/**
|
|
4
|
+
* The integrations capability of one instance (feature integrations), read from the one route that
|
|
5
|
+
* answers it: the provider catalog.
|
|
6
|
+
*
|
|
7
|
+
* There is no `/status` block to read, deliberately - the runtime is a separate deployable and the
|
|
8
|
+
* instance publishes nothing about it - so the catalog IS the probe. The interesting states are
|
|
9
|
+
* three: it answered (the screen works), it refused the capability (the screen and its rail entry
|
|
10
|
+
* are ABSENT), or the instance itself is unwell (that is the shell's business, not this screen's).
|
|
11
|
+
*
|
|
12
|
+
* A refusal is 403 on an instance with an API key configured and 401 on an open one, because the
|
|
13
|
+
* standing capability policy challenges before it forbids. Both mean the same thing here, and
|
|
14
|
+
* keying on one status code would hide the screen on secured instances only.
|
|
15
|
+
*/
|
|
16
|
+
export type IntegrationsCapability = "checking" | "available" | "absent" | "unreachable";
|
|
17
|
+
export declare function useIntegrationProviders(instance: InstanceConfig | null): import("@tanstack/react-query").UseQueryResult<NoInfer<IntegrationProvider[] | null>, unknown>;
|
|
18
|
+
/** Whether a failure is the capability being off rather than the instance being unwell. */
|
|
19
|
+
export declare function isCapabilityRefusal(error: unknown): boolean;
|
|
20
|
+
/** The capability verdict of a providers query, for the rail and for a deep link. */
|
|
21
|
+
export declare function capabilityOf(query: {
|
|
22
|
+
isError: boolean;
|
|
23
|
+
isSuccess: boolean;
|
|
24
|
+
error: unknown;
|
|
25
|
+
}): IntegrationsCapability;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type QueryClient } from "@tanstack/react-query";
|
|
2
|
+
import type { InstanceConfig } from "../instances/types";
|
|
3
|
+
import { type ChangeEvent } from "../api/changefeed";
|
|
4
|
+
/**
|
|
5
|
+
* Live mode (feature change-feed, spec §3.7): ONE stream per ACTIVE instance, torn down
|
|
6
|
+
* on instance switch (FR-1c isolation), turning committed mutations into UI updates.
|
|
7
|
+
*
|
|
8
|
+
* Integration approach - targeted query invalidation, not hand-rolled cache surgery:
|
|
9
|
+
* every screen already reads through react-query keys scoped as [instance.id, ...], so
|
|
10
|
+
* invalidating the relevant keys (debounced against event bursts) makes every screen
|
|
11
|
+
* live without per-element cache merging. The canvas is the exception (it is a curated
|
|
12
|
+
* zustand store, not a query), so it gets the direct minimum: removed elements are
|
|
13
|
+
* dropped, and a created edge between two on-screen vertices is fetched and merged.
|
|
14
|
+
*
|
|
15
|
+
* Resync handling is mandatory, not optional: on ANY resync every query of the instance
|
|
16
|
+
* is invalidated (the same fetches the screens issued to render initially); for reason
|
|
17
|
+
* trim/tabulaRasa/load every held element id is invalid, so the canvas state is cleared.
|
|
18
|
+
*/
|
|
19
|
+
export type LiveFeedStatus = "off" | "connecting" | "live" | "unavailable";
|
|
20
|
+
export interface LiveFeedContext {
|
|
21
|
+
instance: InstanceConfig;
|
|
22
|
+
queryClient: QueryClient;
|
|
23
|
+
/** Invalidation debounce window against event bursts (default 300ms). */
|
|
24
|
+
debounceMs?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface LiveFeedHandlers {
|
|
27
|
+
onEvent: (event: ChangeEvent) => void;
|
|
28
|
+
onResync: (event: ChangeEvent) => void;
|
|
29
|
+
dispose: () => void;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Builds the event handlers for one instance's stream. Exported separately from the
|
|
33
|
+
* hook so the semantics are unit-testable without a component tree.
|
|
34
|
+
*/
|
|
35
|
+
export declare function createLiveFeedHandlers(ctx: LiveFeedContext): LiveFeedHandlers;
|
|
36
|
+
export declare function bumpFeedGeneration(): void;
|
|
37
|
+
export declare function useLiveChangeFeed(instance: InstanceConfig | null): LiveFeedStatus;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ONE per-instance-per-namespace scope rule, shared by the workspace store
|
|
3
|
+
* (instanceStore) and the event feed (eventFeed): accepts a pre-bound compound
|
|
4
|
+
* "<id>/<namespace>" or an (id, namespace) pair, and collapses the reserved "default"
|
|
5
|
+
* namespace onto the bare instance id - so a pre-namespace workspace is adopted as
|
|
6
|
+
* default's with no migration (feature graph-namespaces). Registry ids never contain "/".
|
|
7
|
+
*/
|
|
8
|
+
export declare function scopeKey(instanceId: string, namespace?: string): string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { InstanceConfig } from "../instances/types";
|
|
2
|
+
/**
|
|
3
|
+
* The shared /status cache entry. Same query key as the AppShell health probe, so every
|
|
4
|
+
* consumer reads one cache row and rides its periodic refresh; /status is the cheap
|
|
5
|
+
* discovery surface (available plugins + live index inventory — feature
|
|
6
|
+
* studio-index-discovery), unlike the budgeted Graph-shape pass in graphShape.ts.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useStatus(instance: InstanceConfig): import("@tanstack/react-query").UseQueryResult<NoInfer<import("../api/types").StatusREST | null>, Error>;
|
|
9
|
+
/**
|
|
10
|
+
* The instance's configuration (features instance-config and writable-instance-config): the setting
|
|
11
|
+
* inventory, the semantic providers and the observability posture behind the Connect Configuration
|
|
12
|
+
* section. Fallen-8-level, so it is keyed by the RAW instance id (not per namespace) and API-key
|
|
13
|
+
* gated server-side.
|
|
14
|
+
*
|
|
15
|
+
* Pass poll: false while the operator has unsaved edits. The panel is an editor now, and a ten second
|
|
16
|
+
* refetch would otherwise replace the value under a half-typed field: the poll exists so model
|
|
17
|
+
* residency updates on its own, which is never worth losing someone's input over.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useConfig(instance: InstanceConfig, options?: {
|
|
20
|
+
poll?: boolean;
|
|
21
|
+
}): import("@tanstack/react-query").UseQueryResult<NoInfer<import("../api/types").ConfigREST | null>, Error>;
|