@gmickel/gno 1.12.3 → 1.12.4
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/assets/skill/SKILL.md +1 -1
- package/package.json +1 -1
- package/src/core/context-resolver.ts +285 -0
- package/src/mcp/tools/index.ts +3 -3
- package/src/pipeline/answer-prompt.ts +80 -0
- package/src/pipeline/answer.ts +12 -26
- package/src/pipeline/hybrid.ts +2 -0
- package/src/pipeline/result-context.ts +51 -0
- package/src/pipeline/search.ts +5 -1
- package/src/pipeline/vsearch.ts +2 -0
- package/src/serve/public/globals.built.css +1 -1
- package/src/store/sqlite/adapter.ts +7 -0
- package/src/store/types.ts +6 -0
|
@@ -278,6 +278,7 @@ export class SqliteAdapter implements StorePort, SqliteDbProvider {
|
|
|
278
278
|
private configPath = ""; // Set by CLI layer for status output
|
|
279
279
|
private txDepth = 0; // Transaction nesting depth
|
|
280
280
|
private txCounter = 0; // Savepoint counter for unique names
|
|
281
|
+
private contextGeneration = 0;
|
|
281
282
|
|
|
282
283
|
// ─────────────────────────────────────────────────────────────────────────
|
|
283
284
|
// Lifecycle
|
|
@@ -341,6 +342,7 @@ export class SqliteAdapter implements StorePort, SqliteDbProvider {
|
|
|
341
342
|
return result;
|
|
342
343
|
}
|
|
343
344
|
|
|
345
|
+
this.contextGeneration += 1;
|
|
344
346
|
return result;
|
|
345
347
|
} catch (cause) {
|
|
346
348
|
const message =
|
|
@@ -517,6 +519,7 @@ export class SqliteAdapter implements StorePort, SqliteDbProvider {
|
|
|
517
519
|
});
|
|
518
520
|
|
|
519
521
|
transaction();
|
|
522
|
+
this.contextGeneration += 1;
|
|
520
523
|
return ok(undefined);
|
|
521
524
|
} catch (cause) {
|
|
522
525
|
return err(
|
|
@@ -559,6 +562,10 @@ export class SqliteAdapter implements StorePort, SqliteDbProvider {
|
|
|
559
562
|
}
|
|
560
563
|
}
|
|
561
564
|
|
|
565
|
+
getContextGeneration(): number {
|
|
566
|
+
return this.contextGeneration;
|
|
567
|
+
}
|
|
568
|
+
|
|
562
569
|
// ─────────────────────────────────────────────────────────────────────────
|
|
563
570
|
// Documents
|
|
564
571
|
// ─────────────────────────────────────────────────────────────────────────
|
package/src/store/types.ts
CHANGED
|
@@ -800,6 +800,12 @@ export interface StorePort {
|
|
|
800
800
|
*/
|
|
801
801
|
syncContexts(contexts: Context[]): Promise<StoreResult<void>>;
|
|
802
802
|
|
|
803
|
+
/**
|
|
804
|
+
* Monotonic in-process generation for the persisted context snapshot.
|
|
805
|
+
* Changes after a successful context sync or when the store is reopened.
|
|
806
|
+
*/
|
|
807
|
+
getContextGeneration(): number;
|
|
808
|
+
|
|
803
809
|
/**
|
|
804
810
|
* Get all collections from DB.
|
|
805
811
|
*/
|