@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,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SPDX SBOM → Fallen-8 graph (feature sample-graphs). ONE transform, two consumers: the
|
|
3
|
+
* build script bakes the fallen-8-core default (fallen8-deps.jsonl), and the Studio's
|
|
4
|
+
* GitHub card runs it in the browser on any public repo's SBOM fetched just-in-time from
|
|
5
|
+
* api.github.com. Output is the jsonlGraph vertex/edge shape, so both paths hand it to
|
|
6
|
+
* the same importer + loader.
|
|
7
|
+
*/
|
|
8
|
+
import type { JsonlEdge, JsonlVertex } from "./jsonlGraph";
|
|
9
|
+
/** The subset of the SPDX SBOM document we read (GitHub's dependency-graph export). */
|
|
10
|
+
export interface SpdxSbom {
|
|
11
|
+
packages?: SpdxPackage[];
|
|
12
|
+
relationships?: SpdxRelationship[];
|
|
13
|
+
}
|
|
14
|
+
interface SpdxPackage {
|
|
15
|
+
name: string;
|
|
16
|
+
SPDXID: string;
|
|
17
|
+
versionInfo?: string;
|
|
18
|
+
licenseConcluded?: string;
|
|
19
|
+
licenseDeclared?: string;
|
|
20
|
+
externalRefs?: Array<{
|
|
21
|
+
referenceType?: string;
|
|
22
|
+
referenceLocator?: string;
|
|
23
|
+
}>;
|
|
24
|
+
}
|
|
25
|
+
interface SpdxRelationship {
|
|
26
|
+
spdxElementId: string;
|
|
27
|
+
relatedSpdxElement: string;
|
|
28
|
+
relationshipType: string;
|
|
29
|
+
}
|
|
30
|
+
export interface SbomGraphResult {
|
|
31
|
+
vertices: JsonlVertex[];
|
|
32
|
+
edges: JsonlEdge[];
|
|
33
|
+
/** Ecosystem → package count, for the caller's summary/messaging. */
|
|
34
|
+
ecosystemCounts: Record<string, number>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Transforms an SPDX SBOM into a dependency graph. Nodes are packages (label =
|
|
38
|
+
* ecosystem); edges are DEPENDS_ON relationships. A package referenced only by a
|
|
39
|
+
* relationship (no package entry) is skipped, so every edge resolves — the importer
|
|
40
|
+
* requires it. Deterministic: packages keep their SBOM order for stable ids.
|
|
41
|
+
*/
|
|
42
|
+
export declare function sbomToGraph(sbom: SpdxSbom): SbomGraphResult;
|
|
43
|
+
/** GitHub's rate-limit headers, passed through so the message can name a retry time. */
|
|
44
|
+
export interface GithubRateLimit {
|
|
45
|
+
remaining: string | null;
|
|
46
|
+
reset: string | null;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Turns a non-OK GitHub SBOM response into a SPECIFIC, actionable message (feature
|
|
50
|
+
* sample-graphs). The `GET /repos/{repo}/dependency-graph/sbom` endpoint answers 404 for
|
|
51
|
+
* THREE different causes — the repo is missing, it's private, or its dependency graph is
|
|
52
|
+
* disabled — so the old "not found (or private, or has no dependency graph)" lumped all
|
|
53
|
+
* three and buried the one the user can act on. GitHub's own error body carries a `message`
|
|
54
|
+
* that distinguishes them (notably "Dependency graph is disabled…"); we lead with that.
|
|
55
|
+
* Pure + parameterized on `now` so it is unit-testable.
|
|
56
|
+
*/
|
|
57
|
+
export declare function describeGithubSbomFailure(repo: string, status: number, githubMessage: string, rateLimit: GithubRateLimit, now: number): string;
|
|
58
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-section "How does this work?" help (feature studio-section-help): the ONE home for
|
|
3
|
+
* mapping each Studio main section to the 1-3 docs pages that explain it. Keys are the same
|
|
4
|
+
* `leaf` strings used by the NAV array in app/AppShell.tsx; the shell renders <SectionHelp/>
|
|
5
|
+
* once, keyed by the active leaf. The explanation of every feature lives on its docs page -
|
|
6
|
+
* this module only wires a section to the pages, it does not re-narrate them (one-home rule).
|
|
7
|
+
*
|
|
8
|
+
* Blurbs mirror each page's frontmatter `description` in short form. A vitest drift guard
|
|
9
|
+
* asserts every `slug` here resolves to a real docs/src/content/docs/<slug>.(md|mdx) file, and
|
|
10
|
+
* a coverage test asserts every NAV leaf has an entry here.
|
|
11
|
+
*/
|
|
12
|
+
/** Published Starlight docs origin. The single home for the docs URL, shared with the
|
|
13
|
+
* top-bar "docs" pill in AppShell so there is one origin constant, not two. */
|
|
14
|
+
export declare const DOCS_BASE = "https://docs.fallen-8.com/";
|
|
15
|
+
/** Absolute URL of a docs page from its slug (e.g. "path-finding" -> ".../path-finding/"). */
|
|
16
|
+
export declare const docUrl: (slug: string) => string;
|
|
17
|
+
/** One row in a section's help popover: a docs page, its title, and a one-line blurb. */
|
|
18
|
+
export interface SectionDocLink {
|
|
19
|
+
/** Docs page slug, e.g. "path-finding" (NOT a full URL). Resolved via docUrl. */
|
|
20
|
+
slug: string;
|
|
21
|
+
/** Page title shown as the row label. */
|
|
22
|
+
title: string;
|
|
23
|
+
/** One-line description (mirrors the page's frontmatter description in short form). */
|
|
24
|
+
blurb: string;
|
|
25
|
+
}
|
|
26
|
+
/** The help content for one Studio section: a heading plus 1-3 doc links, primary first. */
|
|
27
|
+
export interface SectionHelpEntry {
|
|
28
|
+
/** Popover heading, e.g. "How path finding works". Also the button's title tooltip. */
|
|
29
|
+
heading: string;
|
|
30
|
+
/** Ordered primary-first, length 1..3 (enforced by test). */
|
|
31
|
+
links: SectionDocLink[];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Keyed by the SAME leaf strings as AppShell's NAV array. Flat/unscoped sections carry a
|
|
35
|
+
* leading slash ("/", "/save-games", "/integrations"); scoped sections are bare leaves.
|
|
36
|
+
*/
|
|
37
|
+
export declare const SECTION_HELP: Record<string, SectionHelpEntry>;
|
|
38
|
+
/** Accessor: the help entry for a section leaf, or undefined when the leaf has no mapping. */
|
|
39
|
+
export declare const sectionHelp: (leaf: string | null | undefined) => SectionHelpEntry | undefined;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { SemanticTraversalSpecification, SubGraphSemanticSummary } from "../api/types";
|
|
2
|
+
/**
|
|
3
|
+
* The declarative semantic-traversal drafts (features element-embeddings and
|
|
4
|
+
* subgraph-semantic-thresholds), as edited in the studio and built into requests. Pure
|
|
5
|
+
* logic here so the gating rules — which mirror the server's one-owner-per-slot and
|
|
6
|
+
* metric constraints — are unit-testable without a screen.
|
|
7
|
+
*
|
|
8
|
+
* Two shapes share one query core:
|
|
9
|
+
* - The Path screen edits a {@link SemanticDraft}: the query plus the block-local
|
|
10
|
+
* minScore filter / costBySimilarity cost switches.
|
|
11
|
+
* - The Subgraph screen edits a bare {@link SemanticQueryDraft}: one query per request;
|
|
12
|
+
* the thresholds live on the vertex-filter SLOTS (top level and per vertex pattern
|
|
13
|
+
* step), not in the block.
|
|
14
|
+
*
|
|
15
|
+
* Reference for the rules: features/done/element-embeddings/README.md, "Semantic traversal".
|
|
16
|
+
*/
|
|
17
|
+
export type SemanticSource = "vector" | "text";
|
|
18
|
+
export type SemanticMetric = "Cosine" | "DotProduct" | "L2";
|
|
19
|
+
/**
|
|
20
|
+
* How a vertex-filter slot is filled (feature subgraph-semantic-thresholds): nothing, a
|
|
21
|
+
* compiled C# fragment, or a declarative semantic threshold. One owner per slot is
|
|
22
|
+
* structural — a slot has exactly one mode.
|
|
23
|
+
*/
|
|
24
|
+
export type SlotMode = "everything" | "fragment" | "semantic";
|
|
25
|
+
/** The query core: what the traversal scores against, without any slot decisions. */
|
|
26
|
+
export interface SemanticQueryDraft {
|
|
27
|
+
source: SemanticSource;
|
|
28
|
+
vectorText: string;
|
|
29
|
+
queryText: string;
|
|
30
|
+
embeddingName: string;
|
|
31
|
+
metric: SemanticMetric;
|
|
32
|
+
}
|
|
33
|
+
export declare const DEFAULT_SEMANTIC_QUERY_DRAFT: SemanticQueryDraft;
|
|
34
|
+
/** The Path screen's block: the query plus its declarative filter/cost switches. */
|
|
35
|
+
export interface SemanticDraft extends SemanticQueryDraft {
|
|
36
|
+
/** Whether the block is active (sent, and owning its declarative slots). */
|
|
37
|
+
enabled: boolean;
|
|
38
|
+
/** Apply the declarative minScore vertex filter. */
|
|
39
|
+
minScoreEnabled: boolean;
|
|
40
|
+
minScore: string;
|
|
41
|
+
/** Apply the declarative similarity vertex cost (path only, non-DotProduct). */
|
|
42
|
+
costBySimilarity: boolean;
|
|
43
|
+
}
|
|
44
|
+
export declare const DEFAULT_SEMANTIC_DRAFT: SemanticDraft;
|
|
45
|
+
/**
|
|
46
|
+
* The block owns the vertex-FILTER slot whenever the server installs a filter closure into
|
|
47
|
+
* it: for the minScore threshold, and ALSO for costBySimilarity alone, which carries an
|
|
48
|
+
* implied "has the named embedding" filter (a cost is only defined over embedded vertices).
|
|
49
|
+
* See SemanticTraversalHelper.TryBuild's `if (MinScore) … else if (CostBySimilarity)`.
|
|
50
|
+
*/
|
|
51
|
+
export declare function semanticOwnsVertexFilter(draft: SemanticDraft): boolean;
|
|
52
|
+
/** The block owns the vertex-COST slot when costBySimilarity is active (path only). */
|
|
53
|
+
export declare function semanticOwnsVertexCost(draft: SemanticDraft): boolean;
|
|
54
|
+
export type SemanticQueryBuild = {
|
|
55
|
+
ok: true;
|
|
56
|
+
spec: SemanticTraversalSpecification;
|
|
57
|
+
} | {
|
|
58
|
+
ok: false;
|
|
59
|
+
error: string;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Builds the query core of a semantic block from a draft — the one implementation both
|
|
63
|
+
* screens validate with. `providerEnabled` is the resolved provider state (null =
|
|
64
|
+
* unknown/not-yet-computed): queryText needs it true.
|
|
65
|
+
*/
|
|
66
|
+
export declare function buildSemanticQuery(draft: SemanticQueryDraft, options: {
|
|
67
|
+
providerEnabled: boolean | null;
|
|
68
|
+
}): SemanticQueryBuild;
|
|
69
|
+
/**
|
|
70
|
+
* Threshold text → finite number; empty or non-numeric is undefined (an empty input is
|
|
71
|
+
* NOT silently zero). The one parser every threshold slot builds and validates with.
|
|
72
|
+
*/
|
|
73
|
+
export declare function parseThreshold(text: string): number | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* One line for the subgraph list's semantic badge tooltip: what the registered subgraph
|
|
76
|
+
* was bound to and where its thresholds sit.
|
|
77
|
+
*/
|
|
78
|
+
export declare function describeSemanticSummary(summary: SubGraphSemanticSummary): string;
|
|
79
|
+
export type SemanticBuild = {
|
|
80
|
+
ok: true;
|
|
81
|
+
spec: SemanticTraversalSpecification | undefined;
|
|
82
|
+
} | {
|
|
83
|
+
ok: false;
|
|
84
|
+
error: string;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Builds the Path screen's block from a draft, applying the same guards the server
|
|
88
|
+
* enforces so an invalid request is structurally caught before submit. `allowCost` is
|
|
89
|
+
* false where costBySimilarity cannot apply. Returns spec: undefined when the block is
|
|
90
|
+
* disabled.
|
|
91
|
+
*/
|
|
92
|
+
export declare function buildSemanticSpec(draft: SemanticDraft, options: {
|
|
93
|
+
allowCost: boolean;
|
|
94
|
+
providerEnabled: boolean | null;
|
|
95
|
+
}): SemanticBuild;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { PathSpecification, PatternSpecification, SemanticTraversalSpecification, StoredPathQueryBlock, StoredSubGraphQueryBlock } from "../api/types";
|
|
2
|
+
import type { PathDraft, SubgraphPatternDraft } from "../state/instanceStore";
|
|
3
|
+
/**
|
|
4
|
+
* Pure stored-query logic (concept spec §5): spec builders that make the server's
|
|
5
|
+
* "storedQuery is mutually exclusive with inline fragments" 400 structurally
|
|
6
|
+
* unreachable, block extraction for "Save as stored query…", and the read-only
|
|
7
|
+
* preview rows rendered under the picker.
|
|
8
|
+
*/
|
|
9
|
+
/** Server-side name rule: always a safe URL path segment, compared case-sensitively. */
|
|
10
|
+
export declare const STORED_QUERY_NAME: RegExp;
|
|
11
|
+
/**
|
|
12
|
+
* The whole spec from a draft — stored and inline fragments never travel together. The
|
|
13
|
+
* semantic block (feature element-embeddings) attaches regardless of the filter source
|
|
14
|
+
* (it supplies the query vector to declarative closures, inline fragments, or a stored
|
|
15
|
+
* path query's fragments alike).
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildPathSpecification(draft: PathDraft, semantic?: SemanticTraversalSpecification): PathSpecification;
|
|
18
|
+
/** The draft's committed fragments as a registration block (empty parts omitted). */
|
|
19
|
+
export declare function pathBlockFromDraft(draft: PathDraft): StoredPathQueryBlock;
|
|
20
|
+
export declare function hasAnyPathFragment(draft: PathDraft): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Strips builder-only keys and normalizes per-type fields the way the create form
|
|
23
|
+
* always has (shared by PUT /subgraph and stored-query registration). A vertex step's
|
|
24
|
+
* filter slot sends exactly what its MODE says (feature subgraph-semantic-thresholds):
|
|
25
|
+
* the fragment, the parsed threshold, or nothing — the other representation stays in the
|
|
26
|
+
* draft, so switching modes never loses input.
|
|
27
|
+
*/
|
|
28
|
+
export declare function normalizePatterns(patterns: SubgraphPatternDraft[]): PatternSpecification[];
|
|
29
|
+
export declare function subGraphBlock(vertexFilter: string, edgeFilter: string, patterns: PatternSpecification[]): StoredSubGraphQueryBlock;
|
|
30
|
+
export interface StoredFragmentRow {
|
|
31
|
+
label: string;
|
|
32
|
+
fragment: string;
|
|
33
|
+
}
|
|
34
|
+
export interface StoredSpecificationPreview {
|
|
35
|
+
rows: StoredFragmentRow[];
|
|
36
|
+
note: string | null;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Renders a stored entry's specificationJson as label/fragment rows — best-effort:
|
|
40
|
+
* the JSON is the server's own stored document, but an unparseable one degrades to a
|
|
41
|
+
* note instead of a crash.
|
|
42
|
+
*/
|
|
43
|
+
export declare function describeStoredSpecification(kind: string | null, specificationJson: string | null): StoredSpecificationPreview;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The display caps, in characters, for each kind of user-controlled string — the one home
|
|
3
|
+
* for "a number of chars that makes sense". Values are never lost: the full string always
|
|
4
|
+
* rides in the title tooltip (see <Truncated>). Tune here, not per call site.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DISPLAY_CAP: {
|
|
7
|
+
/** Names/ids: namespace, instance, index, stored-query, subgraph, algorithm, plugin. */
|
|
8
|
+
readonly name: 40;
|
|
9
|
+
/** Names inside fixed-width chrome (dropdown rows, badges, chips). */
|
|
10
|
+
readonly chipName: 28;
|
|
11
|
+
/** Property keys / edge-property ids. */
|
|
12
|
+
readonly propertyKey: 40;
|
|
13
|
+
/** Property values (a vector is pre-shrunk by previewVector first). */
|
|
14
|
+
readonly propertyValue: 80;
|
|
15
|
+
/** CLR / fully-qualified type names. */
|
|
16
|
+
readonly typeName: 36;
|
|
17
|
+
/** Vertex/edge labels. */
|
|
18
|
+
readonly label: 40;
|
|
19
|
+
/** Path- / URL-shaped values (use middle mode so the tail stays readable). */
|
|
20
|
+
readonly path: 48;
|
|
21
|
+
/** Free-form status/error lines interpolating user text. */
|
|
22
|
+
readonly message: 140;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Clips <paramref name="text"/> to at most <paramref name="max"/> characters (the ellipsis
|
|
26
|
+
* included in that budget). End mode (default) keeps the head — `"fraud-quarterly" → "fraud-q…"`;
|
|
27
|
+
* middle mode keeps both ends, best for paths/URLs whose tail carries meaning —
|
|
28
|
+
* `"/ns/fraud-quarterly/status" → "/ns/fr…status"`.
|
|
29
|
+
*/
|
|
30
|
+
export declare function truncateChars(text: string, max: number, options?: {
|
|
31
|
+
middle?: boolean;
|
|
32
|
+
}): string;
|
|
33
|
+
/** Whether {@link truncateChars} would actually shorten this text (i.e. a title tooltip helps). */
|
|
34
|
+
export declare function isTruncated(text: string, max: number): boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { GraphREST } from "../api/types";
|
|
2
|
+
/**
|
|
3
|
+
* FR-7: GET /graph?maxElements=N truncates silently (no paging, no marker). The only
|
|
4
|
+
* reliable signal is the returned element count reaching the requested cap, so whenever
|
|
5
|
+
* that happens the UI must show an explicit "truncated at N" indicator.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isTruncated(graph: GraphREST, requestedMax: number): boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Query-vector input parsing (concept spec §6): vectors are PASTED (a JSON array or
|
|
3
|
+
* comma/whitespace-separated floats), never typed — this validates client-side so a
|
|
4
|
+
* dimension mismatch or a NaN is caught before the server's 400.
|
|
5
|
+
*/
|
|
6
|
+
export type ParsedVector = {
|
|
7
|
+
ok: true;
|
|
8
|
+
vector: number[];
|
|
9
|
+
} | {
|
|
10
|
+
ok: false;
|
|
11
|
+
error: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function parseVector(text: string): ParsedVector;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { InstanceConfig } from "../instances/types";
|
|
2
|
+
/**
|
|
3
|
+
* The whole-type plugin authoring editor (feature plugin-registration §6): pick a category
|
|
4
|
+
* (+ contract for an algorithm), load a per-category scaffold into a full-file Monaco C#
|
|
5
|
+
* editor, compile-validate it debounced through POST /plugins/{category}/validate (the
|
|
6
|
+
* whole-type sibling of the delegate editor's /delegates/validate loop), then register into
|
|
7
|
+
* the addressed namespace. Registration + validate are gated: a 403 surfaces as a friendly
|
|
8
|
+
* "registration is disabled" line, exactly like the delegate editor's 401 auth-gate message.
|
|
9
|
+
*
|
|
10
|
+
* The plugin validate contract returns a plain-text `error` (not positioned diagnostics), so
|
|
11
|
+
* — unlike the delegate editor's markers.ts path — diagnostics render as text; the Monaco
|
|
12
|
+
* setup and the full-file csharp editor are the shared pieces.
|
|
13
|
+
*/
|
|
14
|
+
export declare const PLUGIN_NAME: RegExp;
|
|
15
|
+
export declare const PLUGIN_GATE_MESSAGE = "plugin registration is disabled on this server (enable the dynamic-plugin capability to author plugins)";
|
|
16
|
+
export declare function PluginEditor({ instance, onRegistered, onCancel, }: {
|
|
17
|
+
instance: InstanceConfig;
|
|
18
|
+
onRegistered: (name: string) => void;
|
|
19
|
+
onCancel: () => void;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AlgorithmContract, PluginAuthoringCategory, PluginValidationResult } from "../../api/types";
|
|
2
|
+
interface PluginNlAssistPanelProps {
|
|
3
|
+
category: PluginAuthoringCategory;
|
|
4
|
+
contract: AlgorithmContract;
|
|
5
|
+
name: string;
|
|
6
|
+
scaffold: string;
|
|
7
|
+
currentSource: string;
|
|
8
|
+
onDraft: (source: string) => void;
|
|
9
|
+
validateDraft: (source: string) => Promise<PluginValidationResult | null>;
|
|
10
|
+
drivingRef: React.MutableRefObject<boolean>;
|
|
11
|
+
}
|
|
12
|
+
export declare const PluginNlAssistPanel: (props: PluginNlAssistPanelProps) => import("react").ReactElement<PluginNlAssistPanelProps, string | import("react").JSXElementConstructor<any>> | null;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { NlPrompt } from "../../delegate/nl/prompt";
|
|
2
|
+
import type { AlgorithmContract, PluginAuthoringCategory } from "../../api/types";
|
|
3
|
+
/**
|
|
4
|
+
* Whole-type generation prompt assembly for plugin authoring (feature plugin-registration §6).
|
|
5
|
+
* The delegate NL path (src/delegate/nl/prompt.ts) drafts a single lambda BODY; a plugin is a
|
|
6
|
+
* whole type, so the shape rules, the per-contract member guidance, the few-shot (the scaffold
|
|
7
|
+
* itself), and the output extractor all differ. The model backend transport (generate.ts) and
|
|
8
|
+
* the backend-config store (config.ts) are shared unchanged.
|
|
9
|
+
*/
|
|
10
|
+
interface PluginPromptInput {
|
|
11
|
+
category: PluginAuthoringCategory;
|
|
12
|
+
contract: AlgorithmContract;
|
|
13
|
+
/** The exact registration name — must be the type's PluginName (server-validated). */
|
|
14
|
+
name: string;
|
|
15
|
+
/** The current scaffold: the shape to complete (correct usings, class, IPlugin members). */
|
|
16
|
+
scaffold: string;
|
|
17
|
+
intent: string;
|
|
18
|
+
priorDrafts?: string[];
|
|
19
|
+
}
|
|
20
|
+
export declare function buildPluginGenerationPrompt(input: PluginPromptInput): NlPrompt;
|
|
21
|
+
/** Follow-up turn for the refine loop: the failed source + the compiler/contract diagnostics. */
|
|
22
|
+
export declare function buildPluginRefinePrompt(input: {
|
|
23
|
+
category: PluginAuthoringCategory;
|
|
24
|
+
contract: AlgorithmContract;
|
|
25
|
+
name: string;
|
|
26
|
+
source: string;
|
|
27
|
+
error: string;
|
|
28
|
+
}): string;
|
|
29
|
+
/**
|
|
30
|
+
* Output handling for a whole type: prefer a fenced ```csharp block; otherwise strip any leading
|
|
31
|
+
* prose before the first C# construct. Unlike the fragment extractor it does NOT truncate at the
|
|
32
|
+
* first ";" — a plugin is a whole file, not a single statement.
|
|
33
|
+
*/
|
|
34
|
+
export declare function extractType(raw: string): string;
|
|
35
|
+
/**
|
|
36
|
+
* Guarantees a model draft carries the usings its contract needs, whatever the model dropped
|
|
37
|
+
* (feature plugin-registration §6). The whole-type plugin surface is the ONLY NL path where the
|
|
38
|
+
* model authors its own using directives (the delegate/fragment path emits a bare lambda body and
|
|
39
|
+
* the server harness supplies the usings), and a small model routinely regenerates the scaffold
|
|
40
|
+
* minus one line, most damagingly `NoSQL.GraphDB.Core.Plugins`, which holds IGraphFunction and
|
|
41
|
+
* GraphFunctionResult, so the type "could not be found". This unions the scaffold's known-required
|
|
42
|
+
* usings into the draft (adding usings never breaks the compile: the scaffold's own set compiles,
|
|
43
|
+
* so a subset re-added to a draft cannot introduce an ambiguity the scaffold does not already
|
|
44
|
+
* have), and adds System.Linq when the body calls a LINQ operator without it. It repairs only the
|
|
45
|
+
* import lines; genuine body mistakes still surface through the compile-and-refine loop.
|
|
46
|
+
*/
|
|
47
|
+
export declare function ensureRequiredUsings(draft: string, scaffold: string): string;
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { AlgorithmContract, PluginAuthoringCategory } from "../api/types";
|
|
2
|
+
/**
|
|
3
|
+
* Per-category/-contract authoring scaffolds (feature plugin-registration §6): the starter
|
|
4
|
+
* WHOLE type — correct usings, the contract interface, the IPlugin members and the contract
|
|
5
|
+
* method stubbed — so the author fills in the body, not the boilerplate. This is the
|
|
6
|
+
* whole-type analogue of the delegate editor's opening snippet (src/delegate/kinds.ts).
|
|
7
|
+
*
|
|
8
|
+
* The scaffold's PluginName string is the exact registration name (the server validates
|
|
9
|
+
* equality); the C# class identifier is a sanitized form, since a plugin name may contain a
|
|
10
|
+
* dash while a C# identifier may not. Algorithm contract methods are stubbed with
|
|
11
|
+
* NotImplementedException (they compile and satisfy the one-implementor contract, so the
|
|
12
|
+
* skeleton validates immediately); the function scaffold ships a working label scan.
|
|
13
|
+
*/
|
|
14
|
+
/** The algorithm contracts a scaffold can target, and the interface each implements. */
|
|
15
|
+
export declare const ALGORITHM_CONTRACTS: AlgorithmContract[];
|
|
16
|
+
/** The interface the source must implement for a given category/contract (for display). */
|
|
17
|
+
export declare function contractInterface(category: PluginAuthoringCategory, contract: AlgorithmContract): string;
|
|
18
|
+
/** A sensible default registration name per category (also a valid C# identifier). */
|
|
19
|
+
export declare const DEFAULT_PLUGIN_NAME: Record<PluginAuthoringCategory, string>;
|
|
20
|
+
/** Turns a registration name into a legal C# type identifier (dash → underscore, etc.). */
|
|
21
|
+
export declare function toClassIdentifier(name: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* The starter source for a category (+ contract for an algorithm), with the registration
|
|
24
|
+
* name interpolated as both the PluginName string and the C# class identifier.
|
|
25
|
+
*/
|
|
26
|
+
export declare function scaffoldFor(category: PluginAuthoringCategory, contract: AlgorithmContract, name: string): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Analytics (feature studio-coverage §3/§4): understand the graph's shape, then compute
|
|
3
|
+
* over it. The Graph shape panel is the ONLY caller of GET /statistics (on demand — the
|
|
4
|
+
* pass is budgeted and rate-limited); its snapshot doubles as the schema cache feeding
|
|
5
|
+
* identifier suggestions across the Studio (gap G-3). The runner mirrors the backend's
|
|
6
|
+
* one-shot design: no history, no queueing — 429/408 are first-class outcomes.
|
|
7
|
+
*/
|
|
8
|
+
export declare function AnalyticsScreen(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function BenchmarkScreen(): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Element browser (FR-5/6/7): fetch a vertex/edge/graph element by id with typed
|
|
3
|
+
* properties; one-click adjacency + degrees; bulk view with the mandatory truncation
|
|
4
|
+
* indicator; "send to canvas".
|
|
5
|
+
*/
|
|
6
|
+
export declare function BrowserScreen(): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Graph canvas screen (FR-18/19/20 + studio-canvas-viz + canvas-view-controls): renders the
|
|
3
|
+
* active instance's canvas store in 2D or 3D, a sectioned style panel (data-driven
|
|
4
|
+
* color/size/image/width, layouts, render toggles), a color legend, selection-driven detail
|
|
5
|
+
* panel, remove-from-view (view only!), expand-on-demand which merges a vertex's edges +
|
|
6
|
+
* neighbors, and the working-set controls: "Show whole graph" (an explicit, capped,
|
|
7
|
+
* merge-only load; the canvas still never auto-loads anything) and "Clear view" (empties
|
|
8
|
+
* the working set including the selection; style config and result sets survive).
|
|
9
|
+
*/
|
|
10
|
+
export declare function CanvasScreen(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ConnectScreen(): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dashboard (FR-2/3/4): the status overview for the active namespace — vertex/edge counts
|
|
3
|
+
* and memory, from /status. It is deliberately lean: the sample gallery, the persistence/
|
|
4
|
+
* administration actions, the stored-query library, the plugin registry, and the instance
|
|
5
|
+
* configuration (semantic providers, observability) each have their own home (Samples, Save
|
|
6
|
+
* games, Query, Plugins, and the Connect Configuration section).
|
|
7
|
+
*
|
|
8
|
+
* On an empty, not-yet-dismissed namespace this is also the home of the first-run show
|
|
9
|
+
* (feature studio-first-run): instead of three zeroed tiles a newcomer gets an animated,
|
|
10
|
+
* read-only walkthrough that creates nothing. It is dismissed per namespace and re-armed the
|
|
11
|
+
* moment the namespace is seen non-empty, so a returning user is never nagged.
|
|
12
|
+
*/
|
|
13
|
+
export declare function DashboardScreen(): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Indexes workspace (feature index-workspace): the top-level home for index OBJECTS —
|
|
3
|
+
* live inventory (id, type, capabilities, counts, embedding binding), create, delete
|
|
4
|
+
* behind a typed confirmation, and per-index content management over the full REST
|
|
5
|
+
* surface. Querying an index lives on the Query screen; the Query row action jumps
|
|
6
|
+
* there with the index preselected.
|
|
7
|
+
*/
|
|
8
|
+
export declare function IndexesScreen(): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Integrations (feature integrations): the integrations this instance's runtime ships, a settings
|
|
3
|
+
* form for the selected one, and the report of the run it submits.
|
|
4
|
+
*
|
|
5
|
+
* The form is rendered from the DESCRIPTOR alone - from each setting's kind, required flag and help
|
|
6
|
+
* text - and there is deliberately no switch on provider id anywhere in this file. A provider that
|
|
7
|
+
* needed its own component would be a contract failure rather than a UI task, and the agent that
|
|
8
|
+
* writes the fourth integration cannot write a React component for it anyway.
|
|
9
|
+
*
|
|
10
|
+
* There is no schedule, no run history and no saved job list here, because the runtime keeps none:
|
|
11
|
+
* timing belongs to whoever wants the data, and a Studio-side copy would be a second home for a
|
|
12
|
+
* decision this screen cannot judge. Submitting is a one-shot action.
|
|
13
|
+
*/
|
|
14
|
+
export declare function IntegrationsScreen(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function KnowledgeScreen(): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Path finder (FR-12/13/14): BLS vs Dijkstra with the explainer, defaults pre-filled,
|
|
3
|
+
* the five delegate slots as the advanced tier (all optional, empty by default), results
|
|
4
|
+
* as ordered element lists + canvas overlay. Fragments were already validated in the
|
|
5
|
+
* editor - /path swallows compile errors, so an empty result here is "no paths found",
|
|
6
|
+
* never an error (FR-13). Filters come from inline fragments or a stored query — the
|
|
7
|
+
* source toggle keeps the two mutually exclusive (concept spec §5.1).
|
|
8
|
+
*/
|
|
9
|
+
export declare function PathScreen(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function PluginsScreen(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function QueryScreen(): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Samples (feature sample-graphs): the one-click demo gallery, promoted from the Dashboard
|
|
3
|
+
* to its own rail entry so every card spans the full width and carries its "what you can
|
|
4
|
+
* test" steps, with a tag bar to filter by capability. Namespace-scoped — a load replaces
|
|
5
|
+
* the active namespace's graph (SampleGraphsPanel owns the loader + typed-confirm wipe).
|
|
6
|
+
*/
|
|
7
|
+
export declare function SamplesScreen(): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SaveGame, SaveGameNamespace } from "../api/types";
|
|
2
|
+
/**
|
|
3
|
+
* The namespaces an entry effectively contains — mirrors the server's normalization: a
|
|
4
|
+
* pre-namespace (v1) entry is a default-only save described by its top-level fields.
|
|
5
|
+
*/
|
|
6
|
+
export declare function effectiveNamespaces(game: SaveGame): SaveGameNamespace[];
|
|
7
|
+
export declare function SaveGamesScreen(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SubgraphScreen(): import("react").JSX.Element;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { type UseBoundStore, type StoreApi } from "zustand";
|
|
2
|
+
import type { ChangeEvent } from "../api/changefeed";
|
|
3
|
+
/**
|
|
4
|
+
* Per-namespace event-feed state (feature studio-event-feed): the newest
|
|
5
|
+
* {@link EVENT_FEED_CAPACITY} RAW change-feed events of one namespace, the bell's unread
|
|
6
|
+
* accounting, and the catch-up position (`since`). Deliberately NOT persisted: there is
|
|
7
|
+
* no history read API, so a reload starting empty is honest - replaying a stale buffer
|
|
8
|
+
* would fake a history the server does not serve. The interest FILTER, in contrast, is
|
|
9
|
+
* a lasting preference and persists in the workspace store (see feedFilter.ts).
|
|
10
|
+
*
|
|
11
|
+
* Events are stored unfiltered so a filter change is a pure view re-evaluation: instant,
|
|
12
|
+
* no network, and it can reveal already-observed events the previous filter hid.
|
|
13
|
+
*/
|
|
14
|
+
export declare const EVENT_FEED_CAPACITY = 100;
|
|
15
|
+
export interface FeedEntry {
|
|
16
|
+
/** Stable list key: `seq` alone can repeat after an epoch change or a replay. */
|
|
17
|
+
key: number;
|
|
18
|
+
event: ChangeEvent;
|
|
19
|
+
/** Client receipt time - the timestamp fallback for events without a usable `ts`. */
|
|
20
|
+
receivedAt: number;
|
|
21
|
+
}
|
|
22
|
+
export interface EventFeedState {
|
|
23
|
+
/** Newest first, capped at {@link EVENT_FEED_CAPACITY}; includes resync entries. */
|
|
24
|
+
entries: FeedEntry[];
|
|
25
|
+
/** Interest-matching events observed while the panel was closed. */
|
|
26
|
+
unread: number;
|
|
27
|
+
/** A resync arrived while the panel was closed: continuity was lost unseen. */
|
|
28
|
+
resyncSinceOpen: boolean;
|
|
29
|
+
panelOpen: boolean;
|
|
30
|
+
/** Last seen SSE `id:` (`epoch:seq`) - the `since` position for a resubscribe. */
|
|
31
|
+
lastEventId: string | null;
|
|
32
|
+
/**
|
|
33
|
+
* Buffers one event. Unread accrues only while the panel is closed (visible = read):
|
|
34
|
+
* a resync raises the distinct flag instead of counting; element events count when
|
|
35
|
+
* they match the interest filter (the caller evaluates the filter - this store stays
|
|
36
|
+
* filter-agnostic).
|
|
37
|
+
*/
|
|
38
|
+
record: (event: ChangeEvent, matchesInterest: boolean) => void;
|
|
39
|
+
setLastEventId: (id: string) => void;
|
|
40
|
+
/** Opening resets unread and the resync flag; closing just flips the gate back on. */
|
|
41
|
+
setPanelOpen: (open: boolean) => void;
|
|
42
|
+
/** Full reset (buffer, unread, flag, catch-up position) - the namespace was recreated. */
|
|
43
|
+
clear: () => void;
|
|
44
|
+
}
|
|
45
|
+
type EventFeedStore = UseBoundStore<StoreApi<EventFeedState>>;
|
|
46
|
+
/** Returns the one feed belonging to this instance id + namespace (memoized). */
|
|
47
|
+
export declare function getEventFeed(instanceId: string, namespace?: string): EventFeedStore;
|
|
48
|
+
/**
|
|
49
|
+
* Drops a namespace's feed - called alongside instanceStore.purgeInstanceStore when the
|
|
50
|
+
* namespace is dropped or recreated in place: the buffered events describe a dead graph,
|
|
51
|
+
* and a stale `since` against its successor's feed would be meaningless.
|
|
52
|
+
*/
|
|
53
|
+
export declare function purgeEventFeed(instanceId: string, namespace?: string): void;
|
|
54
|
+
/** Drops EVERY namespace's feed of one instance (the factory-reset blast radius). */
|
|
55
|
+
export declare function purgeAllEventFeeds(instanceId: string): void;
|
|
56
|
+
/**
|
|
57
|
+
* Follows a namespace rename: the graph (and its feed epoch/sequence) is unchanged, so
|
|
58
|
+
* the buffer and the catch-up position stay valid under the new address.
|
|
59
|
+
*/
|
|
60
|
+
export declare function migrateEventFeed(instanceId: string, from: string, to: string): void;
|
|
61
|
+
/** Test hook: drop all memoized feeds. */
|
|
62
|
+
export declare function resetEventFeedsForTests(): void;
|
|
63
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ChangeElementType, ChangeEvent, ChangeFeedFilter } from "../api/changefeed";
|
|
2
|
+
/**
|
|
3
|
+
* The Events panel's interest filter (feature studio-event-feed): the configuration
|
|
4
|
+
* vocabulary IS the REST filter grammar - same dimensions, same semantics - applied
|
|
5
|
+
* client-side over the raw event buffer (the panel rides the one shared stream, it
|
|
6
|
+
* never opens a second filtered subscription). Pinned to server parity by tests:
|
|
7
|
+
* AND across dimensions, OR within one, exact case-sensitive matches, an unlabeled
|
|
8
|
+
* element never matches a `labels` filter, and only property events carry a key (so a
|
|
9
|
+
* `keys` filter hides creates/removes). `resync` is exempt - always shown, mirroring
|
|
10
|
+
* "resync is always delivered".
|
|
11
|
+
*
|
|
12
|
+
* The draft persists per instance + namespace inside the workspace store
|
|
13
|
+
* (instanceStore.ts) - a lasting preference, unlike the session-only event buffer.
|
|
14
|
+
*/
|
|
15
|
+
export declare const ELEMENT_EVENT_KINDS: readonly ["vertexCreated", "vertexRemoved", "edgeCreated", "edgeRemoved", "propertySet", "propertyRemoved"];
|
|
16
|
+
export type ElementEventKind = (typeof ELEMENT_EVENT_KINDS)[number];
|
|
17
|
+
export declare const ELEMENT_TYPES: readonly ["vertex", "edge"];
|
|
18
|
+
/**
|
|
19
|
+
* Checkbox semantics: `kinds`/`elements` hold the ENABLED values (all enabled = the
|
|
20
|
+
* wildcard); `labels`/`keys` hold exact values (empty = the wildcard). An empty
|
|
21
|
+
* `kinds`/`elements` selection matches nothing - expressible here, not over REST
|
|
22
|
+
* (see {@link toChangeFeedFilter}).
|
|
23
|
+
*/
|
|
24
|
+
export interface FeedFilterDraft {
|
|
25
|
+
kinds: ElementEventKind[];
|
|
26
|
+
elements: ChangeElementType[];
|
|
27
|
+
labels: string[];
|
|
28
|
+
keys: string[];
|
|
29
|
+
}
|
|
30
|
+
export declare const DEFAULT_FEED_FILTER: FeedFilterDraft;
|
|
31
|
+
/** Server-parity event matching; see the module doc for the pinned semantics. */
|
|
32
|
+
export declare function matchesFilter(event: ChangeEvent, filter: FeedFilterDraft): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Whether the draft is expressible as a `GET /changefeed` query: the REST grammar has
|
|
35
|
+
* wildcards but no "match nothing", so an empty kinds/elements selection is not.
|
|
36
|
+
*/
|
|
37
|
+
export declare function isExpressibleAsRest(filter: FeedFilterDraft): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* The draft as the wire filter, wildcard dimensions omitted and kinds/elements in
|
|
40
|
+
* canonical order - feed it to buildChangeFeedQuery for the copy-as-REST string.
|
|
41
|
+
*/
|
|
42
|
+
export declare function toChangeFeedFilter(filter: FeedFilterDraft): ChangeFeedFilter;
|