@gmickel/gno 2.7.0 → 2.8.0
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/README.md +26 -30
- package/assets/skill/SKILL.md +8 -1
- package/assets/skill/cli-reference.md +8 -1
- package/assets/skill/examples.md +2 -1
- package/assets/skill/mcp-reference.md +3 -1
- package/assets/spa-production.json.gz +0 -0
- package/browser-extension/artifacts/{gno-browser-clipper-v2.7.0.zip → gno-browser-clipper-v2.8.0.zip} +0 -0
- package/browser-extension/artifacts/gno-browser-clipper-v2.8.0.zip.sha256 +1 -0
- package/browser-extension/dist/manifest.json +1 -1
- package/package.json +2 -1
- package/spec/cli.md +48 -6
- package/spec/db/schema.sql +0 -1
- package/spec/mcp.md +18 -3
- package/spec/output-schemas/audit-report.schema.json +18 -4
- package/spec/output-schemas/backlinks.schema.json +4 -0
- package/spec/output-schemas/collection-list.schema.json +15 -2
- package/spec/output-schemas/graph.schema.json +2 -0
- package/spec/output-schemas/links-list.schema.json +4 -0
- package/spec/output-schemas/status.schema.json +27 -16
- package/src/cli/commands/ask.ts +31 -12
- package/src/cli/commands/audit.ts +23 -4
- package/src/cli/commands/collection/list.ts +39 -5
- package/src/cli/commands/embed.ts +3 -3
- package/src/cli/commands/links.ts +34 -131
- package/src/cli/commands/ls.ts +6 -1
- package/src/cli/commands/shared.ts +7 -0
- package/src/cli/commands/status.ts +5 -0
- package/src/cli/program.ts +12 -2
- package/src/config/loader.ts +43 -0
- package/src/config/types.ts +8 -0
- package/src/core/audit-contract.ts +16 -4
- package/src/core/audit-freshness.ts +11 -1
- package/src/core/audit-links.ts +145 -25
- package/src/core/audit-provenance.ts +11 -4
- package/src/core/audit-workspace.ts +19 -4
- package/src/core/audit.ts +67 -15
- package/src/core/context-compiler.ts +3 -0
- package/src/core/context-evidence.ts +11 -0
- package/src/core/graph-edge-confidence.ts +23 -1
- package/src/core/host-paths.ts +24 -5
- package/src/core/knowledge-impact.ts +28 -0
- package/src/core/link-workspace.ts +324 -0
- package/src/core/request-receipts.ts +63 -9
- package/src/core/retrieval-replay-candidate.ts +6 -0
- package/src/core/retrieval-trace-request.ts +3 -0
- package/src/core/windows-private-path.ts +136 -1
- package/src/embed/backlog.ts +22 -10
- package/src/embed/variant-backlog.ts +34 -9
- package/src/index.ts +14 -1
- package/src/ingestion/graph-reconciliation.ts +77 -15
- package/src/ingestion/source-availability/darwin-path.ts +9 -3
- package/src/ingestion/sync.ts +22 -1
- package/src/ingestion/types.ts +14 -0
- package/src/llm/inference-scope.ts +19 -0
- package/src/mcp/http-egress.ts +42 -3
- package/src/mcp/tools/audit.ts +11 -2
- package/src/mcp/tools/changes.ts +1 -0
- package/src/mcp/tools/links.ts +3 -0
- package/src/mcp/tools/sessions.ts +33 -4
- package/src/mcp/tools/status.ts +22 -6
- package/src/pipeline/expansion.ts +19 -31
- package/src/pipeline/graph-retrieval.ts +22 -2
- package/src/pipeline/hybrid.ts +1 -1
- package/src/pipeline/types.ts +6 -3
- package/src/serve/embed-scheduler.ts +2 -2
- package/src/serve/findings-pass.ts +1 -1
- package/src/serve/host-path-redaction.ts +51 -14
- package/src/serve/public/components/BootstrapStatus.tsx +5 -3
- package/src/serve/public/components/CaptureModal.tsx +1 -1
- package/src/serve/public/components/CollectionModelDialog.tsx +16 -13
- package/src/serve/public/components/CollectionsEmptyState.tsx +5 -3
- package/src/serve/public/components/FirstRunWizard.tsx +4 -2
- package/src/serve/public/components/sessions/SourcesPanel.tsx +77 -60
- package/src/serve/public/pages/Collections.tsx +16 -13
- package/src/serve/public/pages/Connectors.tsx +7 -4
- package/src/serve/public/pages/Dashboard.tsx +8 -6
- package/src/serve/public/pages/GraphView.tsx +2 -0
- package/src/serve/resident-runtime.ts +7 -0
- package/src/serve/routes/changes.ts +6 -1
- package/src/serve/routes/links.ts +13 -0
- package/src/serve/routes/sessions.ts +81 -37
- package/src/serve/server.ts +5 -3
- package/src/serve/status-model.ts +10 -6
- package/src/serve/status.ts +2 -7
- package/src/sessions/config-refresh.ts +111 -0
- package/src/store/migrations/033-drop-documents-active-index.ts +30 -0
- package/src/store/migrations/034-collection-link-workspace.ts +47 -0
- package/src/store/migrations/index.ts +4 -0
- package/src/store/sqlite/adapter.ts +392 -233
- package/src/store/sqlite/change-journal-store.ts +1 -1
- package/src/store/sqlite/eligibility.ts +8 -2
- package/src/store/sqlite/graph-link-resolver.ts +252 -5
- package/src/store/sqlite/graph-neighbors.ts +147 -40
- package/src/store/sqlite/graph-reference-state.ts +13 -2
- package/src/store/sqlite/legacy-vector-ownership.ts +2 -1
- package/src/store/sqlite/workspace-link-resolver.ts +654 -0
- package/src/store/types.ts +49 -3
- package/src/store/vector/stats.ts +1 -1
- package/browser-extension/artifacts/gno-browser-clipper-v2.7.0.zip.sha256 +0 -1
package/src/store/types.ts
CHANGED
|
@@ -20,6 +20,7 @@ import type {
|
|
|
20
20
|
FileRefactorRecoveryReceipt,
|
|
21
21
|
FileRefactorRecoveryReceiptDraft,
|
|
22
22
|
} from "../core/file-refactor-journal";
|
|
23
|
+
import type { LinkWorkspaceSource } from "../core/link-workspace";
|
|
23
24
|
import type { MetadataPredicate, TypedMetadata } from "../core/typed-metadata";
|
|
24
25
|
import type {
|
|
25
26
|
ChunkingPolicyToken,
|
|
@@ -113,6 +114,14 @@ export interface CollectionRow {
|
|
|
113
114
|
egressPolicy: EgressPolicy;
|
|
114
115
|
/** Whether policy was explicit or supplied by a safe default. */
|
|
115
116
|
egressPolicySource: EgressPolicySource;
|
|
117
|
+
/** Canonical collection root (real path), when resolvable. */
|
|
118
|
+
realPath?: string | null;
|
|
119
|
+
/** Effective link workspace root; null means collection-scoped links. */
|
|
120
|
+
workspaceRoot?: string | null;
|
|
121
|
+
/** How the workspace root was established. */
|
|
122
|
+
workspaceSource?: LinkWorkspaceSource;
|
|
123
|
+
/** Collection-relative prefixes of nested vaults with their own workspace. */
|
|
124
|
+
workspaceNested?: string[];
|
|
116
125
|
syncedAt: string;
|
|
117
126
|
}
|
|
118
127
|
|
|
@@ -351,6 +360,8 @@ export interface BacklinkRow {
|
|
|
351
360
|
sourceDocUri: string;
|
|
352
361
|
/** Source document title */
|
|
353
362
|
sourceDocTitle: string | null;
|
|
363
|
+
/** Collection of the source document */
|
|
364
|
+
sourceCollection?: string;
|
|
354
365
|
/** Link display text */
|
|
355
366
|
linkText: string | null;
|
|
356
367
|
/** 1-based line number in source */
|
|
@@ -793,6 +804,10 @@ export interface CollectionStatus {
|
|
|
793
804
|
egressPolicy: EgressPolicy;
|
|
794
805
|
/** Whether policy was explicit or supplied by a safe default. */
|
|
795
806
|
egressPolicySource: EgressPolicySource;
|
|
807
|
+
/** Effective link workspace root (host path); null when collection-scoped. */
|
|
808
|
+
workspaceRoot?: string | null;
|
|
809
|
+
/** How the link workspace was established. */
|
|
810
|
+
workspaceSource?: LinkWorkspaceSource;
|
|
796
811
|
totalDocuments: number;
|
|
797
812
|
activeDocuments: number;
|
|
798
813
|
errorDocuments: number;
|
|
@@ -876,6 +891,10 @@ export interface GraphEdgeAudit {
|
|
|
876
891
|
resolution:
|
|
877
892
|
| "exact-title"
|
|
878
893
|
| "exact-path"
|
|
894
|
+
/** Only file with that name (or path suffix) in its link workspace. */
|
|
895
|
+
| "exact-name"
|
|
896
|
+
/** Won over same-named files by the same-folder / shallower tie-break. */
|
|
897
|
+
| "tie-break"
|
|
879
898
|
| "path-fallback"
|
|
880
899
|
| "ambiguous-fallback"
|
|
881
900
|
| "similarity";
|
|
@@ -1066,6 +1085,12 @@ export interface GetGraphNeighborsOptions {
|
|
|
1066
1085
|
seedDocumentIds: number[];
|
|
1067
1086
|
/** Filter neighbors to a single collection */
|
|
1068
1087
|
collection?: string;
|
|
1088
|
+
/**
|
|
1089
|
+
* Graph allowlist: every edge's resolved source and target must be in one
|
|
1090
|
+
* of these collections. Takes precedence over `collection`; empty denies
|
|
1091
|
+
* all. Undefined (with no `collection`) is unrestricted.
|
|
1092
|
+
*/
|
|
1093
|
+
collections?: string[];
|
|
1069
1094
|
/** Max edges to return (default 10000) */
|
|
1070
1095
|
limitEdges?: number;
|
|
1071
1096
|
}
|
|
@@ -1113,6 +1138,11 @@ export interface GraphQueryEdge {
|
|
|
1113
1138
|
export interface GraphQueryOptions {
|
|
1114
1139
|
direction?: GraphQueryDirection;
|
|
1115
1140
|
edgeType?: DocEdgeType;
|
|
1141
|
+
/**
|
|
1142
|
+
* Collection allowlist: only documents in these collections are visited
|
|
1143
|
+
* (the root must be in scope too). Undefined means every collection.
|
|
1144
|
+
*/
|
|
1145
|
+
collections?: string[];
|
|
1116
1146
|
maxDepth?: number;
|
|
1117
1147
|
maxNodes?: number;
|
|
1118
1148
|
frontierLimit?: number;
|
|
@@ -1599,6 +1629,14 @@ export interface StorePort {
|
|
|
1599
1629
|
*/
|
|
1600
1630
|
getCollections(): Promise<StoreResult<CollectionRow[]>>;
|
|
1601
1631
|
|
|
1632
|
+
/**
|
|
1633
|
+
* Re-detect nested vaults below a collection root from its indexed
|
|
1634
|
+
* document directories; returns whether stored membership changed.
|
|
1635
|
+
*/
|
|
1636
|
+
refreshCollectionNestedWorkspaces?(
|
|
1637
|
+
collection: string
|
|
1638
|
+
): Promise<StoreResult<boolean>>;
|
|
1639
|
+
|
|
1602
1640
|
/**
|
|
1603
1641
|
* Get all contexts from DB.
|
|
1604
1642
|
*/
|
|
@@ -2242,18 +2280,26 @@ export interface StorePort {
|
|
|
2242
2280
|
): Promise<StoreResult<BacklinkRow[]>>;
|
|
2243
2281
|
|
|
2244
2282
|
/**
|
|
2245
|
-
* Resolve link targets to their documents.
|
|
2246
|
-
*
|
|
2283
|
+
* Resolve link targets to their documents with the shared link resolver.
|
|
2284
|
+
* With `source`, plain wiki links from a document inside a link workspace
|
|
2285
|
+
* resolve across the workspace. Returns resolved docs (or null for
|
|
2286
|
+
* unresolved and tied links) matching input order.
|
|
2247
2287
|
*/
|
|
2248
2288
|
resolveLinks(
|
|
2249
2289
|
targets: Array<{
|
|
2250
2290
|
targetRefNorm: string;
|
|
2251
2291
|
targetCollection: string;
|
|
2252
2292
|
linkType: "wiki" | "markdown";
|
|
2293
|
+
source?: { collection: string; relPath: string; explicit: boolean };
|
|
2253
2294
|
}>
|
|
2254
2295
|
): Promise<
|
|
2255
2296
|
StoreResult<
|
|
2256
|
-
Array<{
|
|
2297
|
+
Array<{
|
|
2298
|
+
docid: string;
|
|
2299
|
+
uri: string;
|
|
2300
|
+
title: string | null;
|
|
2301
|
+
collection?: string;
|
|
2302
|
+
} | null>
|
|
2257
2303
|
>
|
|
2258
2304
|
>;
|
|
2259
2305
|
|
|
@@ -34,7 +34,7 @@ export function createVectorStatsPort(db: Database): VectorStatsPort {
|
|
|
34
34
|
return {
|
|
35
35
|
sql: `
|
|
36
36
|
EXISTS (
|
|
37
|
-
SELECT 1 FROM documents d
|
|
37
|
+
SELECT 1 FROM documents d INDEXED BY idx_documents_mirror_hash
|
|
38
38
|
WHERE d.mirror_hash = c.mirror_hash AND d.active = 1 AND d.collection = ?
|
|
39
39
|
)
|
|
40
40
|
`,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2116eeada49b4479ac5967ec1bb79d1288b70529aba691b2b4ddaf33d131bc2e gno-browser-clipper-v2.7.0.zip
|