@gmickel/gno 1.34.5 → 1.35.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 +22 -1
- package/browser-extension/artifacts/{gno-browser-clipper-v1.34.5.zip → gno-browser-clipper-v1.35.0.zip} +0 -0
- package/browser-extension/artifacts/gno-browser-clipper-v1.35.0.zip.sha256 +1 -0
- package/browser-extension/dist/manifest.json +1 -1
- package/package.json +4 -1
- package/spec/cli.md +43 -0
- package/spec/output-schemas/mcp-job-status.schema.json +6 -2
- package/src/config/index.ts +4 -0
- package/src/config/types.ts +14 -0
- package/src/core/path-rules.ts +34 -0
- package/src/ingestion/index.ts +21 -0
- package/src/ingestion/record-container.ts +23 -1
- package/src/ingestion/source-availability/darwin-io.ts +295 -0
- package/src/ingestion/source-availability/darwin-path.ts +58 -0
- package/src/ingestion/source-availability/directory.ts +402 -0
- package/src/ingestion/source-availability/index.ts +74 -0
- package/src/ingestion/source-availability/readers.ts +360 -0
- package/src/ingestion/source-availability/resolve.ts +28 -0
- package/src/ingestion/source-availability/types.ts +170 -0
- package/src/ingestion/sync.ts +565 -108
- package/src/ingestion/types.ts +45 -3
- package/src/ingestion/walker.ts +263 -5
- package/src/serve/public/globals.built.css +1 -1
- package/src/serve/watch-reconciliation-fallback-disk.ts +359 -0
- package/src/serve/watch-reconciliation-fallback.ts +434 -0
- package/src/serve/watch-reconciliation-shared.ts +348 -0
- package/src/serve/watch-reconciliation.ts +129 -0
- package/src/serve/watch-service-events.ts +261 -0
- package/src/serve/watch-service-flush-generation.ts +140 -0
- package/src/serve/watch-service-flush-helpers.ts +147 -0
- package/src/serve/watch-service-flush.ts +443 -0
- package/src/serve/watch-service-hosts.ts +109 -0
- package/src/serve/watch-service-lifecycle.ts +221 -0
- package/src/serve/watch-service-run-flush.ts +236 -0
- package/src/serve/watch-service-snapshot.ts +125 -0
- package/src/serve/watch-service-state.ts +146 -0
- package/src/serve/watch-service.ts +266 -306
- package/src/serve/watch-snapshot-availability.ts +51 -0
- package/src/serve/watch-snapshot-handles.ts +365 -0
- package/src/serve/watch-snapshot-libc.ts +510 -0
- package/src/serve/watch-snapshot-ops.ts +541 -0
- package/src/serve/watch-snapshot-resolve.ts +246 -0
- package/src/serve/watch-snapshot-scan.ts +300 -0
- package/src/serve/watch-snapshot-types.ts +392 -0
- package/src/serve/watch-snapshot.ts +51 -0
- package/src/store/index.ts +1 -1
- package/src/store/sqlite/adapter.ts +191 -0
- package/src/store/types.ts +66 -0
- package/browser-extension/artifacts/gno-browser-clipper-v1.34.5.zip.sha256 +0 -1
package/src/store/types.ts
CHANGED
|
@@ -24,6 +24,13 @@ import type {
|
|
|
24
24
|
// Error Types
|
|
25
25
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Fixed service default maximum for watcher active source-path queries.
|
|
29
|
+
* Callers (watcher fallback later) pass this explicitly; methods never invent
|
|
30
|
+
* an unbounded success path.
|
|
31
|
+
*/
|
|
32
|
+
export const WATCHER_ACTIVE_SOURCE_PATH_MAX = 100_000;
|
|
33
|
+
|
|
27
34
|
/** Store error codes */
|
|
28
35
|
export type StoreErrorCode =
|
|
29
36
|
| "NOT_FOUND"
|
|
@@ -38,6 +45,8 @@ export type StoreErrorCode =
|
|
|
38
45
|
| "IO_ERROR"
|
|
39
46
|
| "INTERNAL"
|
|
40
47
|
| "EGRESS_DENIED"
|
|
48
|
+
/** Result set exceeded the caller-supplied positive maximum (never truncated). */
|
|
49
|
+
| "OVERFLOW"
|
|
41
50
|
// Vector-specific error codes (EPIC 7)
|
|
42
51
|
| "VECTOR_WRITE_FAILED"
|
|
43
52
|
| "VECTOR_DELETE_FAILED"
|
|
@@ -1688,6 +1697,63 @@ export interface StorePort {
|
|
|
1688
1697
|
sourcePath: string
|
|
1689
1698
|
): Promise<StoreResult<DocumentRow[]>>;
|
|
1690
1699
|
|
|
1700
|
+
/**
|
|
1701
|
+
* List distinct effective source paths of ACTIVE documents that are direct
|
|
1702
|
+
* children of `dirRelPath` within `collection`.
|
|
1703
|
+
*
|
|
1704
|
+
* Effective source path is `COALESCE(NULLIF(record_source_path, ''), rel_path)`
|
|
1705
|
+
* so record-container logical documents resolve to their physical container
|
|
1706
|
+
* path. Deeper descendants, inactive rows, and other collections are excluded.
|
|
1707
|
+
*
|
|
1708
|
+
* `dirRelPath` is collection-relative and POSIX-style; the collection root is
|
|
1709
|
+
* `""`. Paths that escape the collection root are rejected with
|
|
1710
|
+
* `INVALID_INPUT`. An empty successful result is distinct from query failure.
|
|
1711
|
+
*
|
|
1712
|
+
* `max` must be a positive integer (see `WATCHER_ACTIVE_SOURCE_PATH_MAX` for
|
|
1713
|
+
* the fixed service default the watcher will pass). Matching rows beyond
|
|
1714
|
+
* `max` yield `OVERFLOW` — never a truncated successful list.
|
|
1715
|
+
*/
|
|
1716
|
+
listActiveDirectChildSourcePaths(
|
|
1717
|
+
collection: string,
|
|
1718
|
+
dirRelPath: string,
|
|
1719
|
+
max: number
|
|
1720
|
+
): Promise<StoreResult<string[]>>;
|
|
1721
|
+
|
|
1722
|
+
/**
|
|
1723
|
+
* List distinct effective source paths of ACTIVE documents anywhere beneath
|
|
1724
|
+
* `dirRelPath` (direct children and deeper descendants).
|
|
1725
|
+
*
|
|
1726
|
+
* Used when a directory is gone from disk so the whole removed subtree can be
|
|
1727
|
+
* reconciled. Prefix containment is exact (`dir1` never matches `dir10/x.md`).
|
|
1728
|
+
*
|
|
1729
|
+
* `dirRelPath` must name a directory below the collection root: `""` is
|
|
1730
|
+
* rejected with `INVALID_INPUT` because a root-wide scan is intentionally out
|
|
1731
|
+
* of scope for this bounded seam. Escaping paths are also `INVALID_INPUT`.
|
|
1732
|
+
*
|
|
1733
|
+
* `max` must be a positive integer (see `WATCHER_ACTIVE_SOURCE_PATH_MAX` for
|
|
1734
|
+
* the fixed service default the watcher will pass). Matching rows beyond
|
|
1735
|
+
* `max` yield `OVERFLOW` — never a truncated successful list.
|
|
1736
|
+
*/
|
|
1737
|
+
listActiveDescendantSourcePaths(
|
|
1738
|
+
collection: string,
|
|
1739
|
+
dirRelPath: string,
|
|
1740
|
+
max: number
|
|
1741
|
+
): Promise<StoreResult<string[]>>;
|
|
1742
|
+
|
|
1743
|
+
/**
|
|
1744
|
+
* Root-wide bounded DISTINCT active physical source paths for one collection.
|
|
1745
|
+
*
|
|
1746
|
+
* Effective source path is `COALESCE(NULLIF(record_source_path, ''), rel_path)`.
|
|
1747
|
+
* Overflow is decided after DISTINCT collapse (`LIMIT max+1`), never on raw
|
|
1748
|
+
* logical document row counts. Inactive rows and other collections are excluded.
|
|
1749
|
+
* Results are ordered ascending. Matching unique sources beyond `max` yield
|
|
1750
|
+
* `OVERFLOW` — never a truncated successful list.
|
|
1751
|
+
*/
|
|
1752
|
+
listActiveSourcePaths(
|
|
1753
|
+
collection: string,
|
|
1754
|
+
max: number
|
|
1755
|
+
): Promise<StoreResult<string[]>>;
|
|
1756
|
+
|
|
1691
1757
|
/**
|
|
1692
1758
|
* Fetch documents by mirror hashes in batch.
|
|
1693
1759
|
* Useful for retrieval pipelines to avoid full document scans.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
76359ca49f27bb28c897a0e6620e4a151734be0e100530be67b9915b369c0b0e gno-browser-clipper-v1.34.5.zip
|