@gmickel/gno 2.11.0 → 2.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/README.md +1 -1
  2. package/assets/skill/SKILL.md +3 -2
  3. package/assets/spa-production.json.gz +0 -0
  4. package/browser-extension/artifacts/{gno-browser-clipper-v2.11.0.zip → gno-browser-clipper-v2.12.1.zip} +0 -0
  5. package/browser-extension/artifacts/gno-browser-clipper-v2.12.1.zip.sha256 +1 -0
  6. package/browser-extension/dist/manifest.json +1 -1
  7. package/package.json +8 -5
  8. package/spec/cli.md +100 -34
  9. package/spec/evals-agentic.md +3 -1
  10. package/spec/mcp.md +9 -3
  11. package/spec/output-schemas/status.schema.json +28 -0
  12. package/src/app/context-agent-projection.ts +10 -1
  13. package/src/cli/commands/agents/block.ts +2 -2
  14. package/src/cli/commands/agents/commands.ts +6 -5
  15. package/src/cli/commands/agents/engine.ts +15 -2
  16. package/src/cli/commands/agents/harnesses.ts +21 -14
  17. package/src/cli/commands/cleanup.ts +46 -6
  18. package/src/cli/commands/collection/remove.ts +1 -0
  19. package/src/cli/commands/collection/rename.ts +1 -0
  20. package/src/cli/commands/doctor.ts +37 -0
  21. package/src/cli/commands/mcp/paths.ts +2 -1
  22. package/src/cli/commands/setup-semantic.ts +6 -1
  23. package/src/cli/commands/shared.ts +26 -1
  24. package/src/cli/commands/skill/paths.ts +20 -2
  25. package/src/cli/commands/status.ts +89 -15
  26. package/src/cli/program.ts +25 -5
  27. package/src/core/activation-probe-plan.ts +0 -1
  28. package/src/core/config-mutation.ts +72 -55
  29. package/src/core/memory-remember.ts +0 -1
  30. package/src/core/module-path.ts +33 -0
  31. package/src/core/runtime-entrypoint.ts +3 -1
  32. package/src/ingestion/file-processor.ts +6 -3
  33. package/src/ingestion/prepare-file.ts +14 -4
  34. package/src/ingestion/source-availability/root.ts +138 -0
  35. package/src/ingestion/sync.ts +5 -19
  36. package/src/llm/native-worker/client.ts +8 -4
  37. package/src/llm/native-worker/errors.ts +26 -3
  38. package/src/mcp/http-transport.ts +7 -2
  39. package/src/mcp/server.ts +3 -0
  40. package/src/mcp/tool-descriptions-core.ts +2 -2
  41. package/src/mcp/tools/index.ts +30 -1
  42. package/src/mcp/tools/status.ts +17 -2
  43. package/src/pipeline/query-snippet.ts +266 -0
  44. package/src/pipeline/search.ts +149 -19
  45. package/src/sdk/client.ts +14 -2
  46. package/src/sdk/types.ts +6 -1
  47. package/src/serve/public/components/ThoroughnessSelector.tsx +1 -1
  48. package/src/serve/public/globals.built.css +1 -1
  49. package/src/serve/public/index.html +5 -0
  50. package/src/serve/public/pages/Collections.tsx +8 -0
  51. package/src/serve/public/pages/Search.tsx +9 -1
  52. package/src/serve/resident-request.ts +8 -0
  53. package/src/serve/resident-runtime.ts +25 -3
  54. package/src/serve/spa-production-build.ts +7 -3
  55. package/src/serve/status-model.ts +2 -0
  56. package/src/serve/status.ts +29 -0
  57. package/src/sessions/config-refresh.ts +6 -0
  58. package/src/sessions/import-child.ts +4 -1
  59. package/src/store/sqlite/adapter.ts +349 -200
  60. package/src/store/types.ts +45 -7
  61. package/browser-extension/artifacts/gno-browser-clipper-v2.11.0.zip.sha256 +0 -1
@@ -68,7 +68,23 @@ export type StoreErrorCode =
68
68
  | "VEC_REBUILD_FAILED"
69
69
  | "VEC_SYNC_FAILED"
70
70
  /** Embedding would build a separate vector partition without confirmation. */
71
- | "VECTOR_PARTITION_FORK";
71
+ | "VECTOR_PARTITION_FORK"
72
+ /** The index holds indexed collections the opening config does not list. */
73
+ | "STALE_COLLECTIONS";
74
+
75
+ /** How a config sync treats collections the config no longer lists. */
76
+ export interface SyncCollectionsOptions {
77
+ /** Explicitly removed names, or every unlisted collection ("stale"). */
78
+ remove?: readonly string[] | "stale";
79
+ /** Leave unlisted collections untouched instead of failing. */
80
+ keepStale?: boolean;
81
+ }
82
+
83
+ /** A collection in the index that the opening config does not list. */
84
+ export interface StaleCollection {
85
+ name: string;
86
+ documents: number;
87
+ }
72
88
 
73
89
  /** Store error with structured details */
74
90
  export interface StoreError {
@@ -738,8 +754,6 @@ export interface FtsSearchOptions extends DocumentEligibilityOptions {
738
754
  * so runtime language filtering is not currently implemented.
739
755
  */
740
756
  language?: string;
741
- /** Include snippet with highlights */
742
- snippet?: boolean;
743
757
  /** Match documents containing ANY positive term instead of ALL of them. */
744
758
  anyTerm?: boolean;
745
759
  /**
@@ -770,7 +784,6 @@ export interface FtsResult {
770
784
  mirrorHash: string;
771
785
  seq: number;
772
786
  score: number;
773
- snippet?: string;
774
787
  // Joined from documents table
775
788
  docid?: string;
776
789
  uri?: string;
@@ -1614,10 +1627,21 @@ export interface StorePort {
1614
1627
  // ─────────────────────────────────────────────────────────────────────────
1615
1628
 
1616
1629
  /**
1617
- * Sync collections from config to DB.
1618
- * Adds new, updates existing, removes deleted.
1630
+ * Sync collections from config to DB: adds new and updates existing ones.
1631
+ * A collection in the index but not in `collections` is deleted only when
1632
+ * `options.remove` names it (or is "stale"). One that holds documents
1633
+ * otherwise fails the sync with STALE_COLLECTIONS and changes nothing,
1634
+ * unless `keepStale` leaves it untouched.
1619
1635
  */
1620
- syncCollections(collections: Collection[]): Promise<StoreResult<void>>;
1636
+ syncCollections(
1637
+ collections: Collection[],
1638
+ options?: SyncCollectionsOptions
1639
+ ): Promise<StoreResult<void>>;
1640
+
1641
+ /** Collections in the index that `configured` does not list, with counts. */
1642
+ listStaleCollections(
1643
+ configured: readonly string[]
1644
+ ): Promise<StoreResult<StaleCollection[]>>;
1621
1645
 
1622
1646
  /**
1623
1647
  * Sync contexts from config to DB.
@@ -2159,6 +2183,20 @@ export interface StorePort {
2159
2183
  keys: { mirrorHash: string; seq: number }[]
2160
2184
  ): Promise<StoreResult<Map<string, ChunkRow[]>>>;
2161
2185
 
2186
+ /**
2187
+ * Optional: for every chunk of the given documents, which of the given
2188
+ * lowercase terms occur in its text (substring match on ASCII-lowercased
2189
+ * text), computed in the database so chunk text is never loaded. Rows are
2190
+ * ordered by mirrorHash, then seq; `present[i]` answers `terms[i]`. Callers
2191
+ * fall back to getChunksBatch when this capability is absent.
2192
+ */
2193
+ getChunkTermPresence?(
2194
+ mirrorHashes: string[],
2195
+ terms: string[]
2196
+ ): Promise<
2197
+ StoreResult<{ mirrorHash: string; seq: number; present: boolean[] }[]>
2198
+ >;
2199
+
2162
2200
  // ─────────────────────────────────────────────────────────────────────────
2163
2201
  // FTS Search
2164
2202
  // ─────────────────────────────────────────────────────────────────────────
@@ -1 +0,0 @@
1
- 589f77b3c4d48d0922fccb9598fc5e07dc32e9f56afa899998d49a735309eae5 gno-browser-clipper-v2.11.0.zip