@gmickel/gno 2.5.1 → 2.7.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 +60 -5
- package/assets/skill/README.md +5 -1
- package/assets/skill/SKILL.md +80 -4
- package/assets/skill/cli-reference.md +132 -2
- package/assets/skill/examples.md +30 -0
- package/assets/skill/mcp-reference.md +54 -1
- package/assets/skill/recipes/capture-and-file.md +6 -0
- package/assets/skill/recipes/memory-file-decision.md +6 -0
- package/assets/skill/recipes/memory-supersede-fact.md +5 -0
- package/assets/skill/recipes/session-evidence-lookup.md +98 -0
- package/assets/spa-production.json.gz +0 -0
- package/browser-extension/artifacts/{gno-browser-clipper-v2.5.1.zip → gno-browser-clipper-v2.7.0.zip} +0 -0
- package/browser-extension/artifacts/gno-browser-clipper-v2.7.0.zip.sha256 +1 -0
- package/browser-extension/dist/manifest.json +1 -1
- package/package.json +2 -1
- package/spec/cli.md +449 -35
- package/spec/mcp.md +234 -4
- package/spec/output-schemas/ask.schema.json +1 -1
- package/spec/output-schemas/capture-receipt.schema.json +4 -1
- package/spec/output-schemas/doctor.schema.json +88 -0
- package/spec/output-schemas/error.schema.json +11 -2
- package/spec/output-schemas/get.schema.json +1 -1
- package/spec/output-schemas/mcp-capture-result.schema.json +4 -2
- package/spec/output-schemas/memory-remember.schema.json +10 -4
- package/spec/output-schemas/multi-get.schema.json +4 -1
- package/spec/output-schemas/peek.schema.json +2 -9
- package/spec/output-schemas/request-status.schema.json +113 -0
- package/spec/output-schemas/resident-status.schema.json +22 -0
- package/spec/output-schemas/search-result.schema.json +1 -1
- package/spec/output-schemas/search-results.schema.json +1 -1
- package/spec/output-schemas/sessions-automation-run.schema.json +46 -0
- package/spec/output-schemas/sessions-discovery.schema.json +38 -0
- package/spec/output-schemas/sessions-import-receipt.schema.json +156 -0
- package/spec/output-schemas/sessions-status.schema.json +432 -0
- package/spec/output-schemas/status.schema.json +98 -0
- package/src/cli/commands/ask.ts +14 -2
- package/src/cli/commands/capture.ts +55 -96
- package/src/cli/commands/daemon.ts +41 -0
- package/src/cli/commands/doctor.ts +54 -20
- package/src/cli/commands/embed.ts +41 -3
- package/src/cli/commands/ls.ts +3 -0
- package/src/cli/commands/memory.ts +12 -3
- package/src/cli/commands/query.ts +5 -0
- package/src/cli/commands/request-status.ts +59 -0
- package/src/cli/commands/reset.ts +39 -5
- package/src/cli/commands/sessions.ts +713 -0
- package/src/cli/commands/shared.ts +14 -1
- package/src/cli/commands/status.ts +63 -5
- package/src/cli/commands/vec.ts +54 -0
- package/src/cli/detach.ts +29 -1
- package/src/cli/errors.ts +13 -9
- package/src/cli/program.ts +441 -2
- package/src/cli/session-binding.ts +49 -0
- package/src/config/types.ts +8 -0
- package/src/core/capture-publish.ts +239 -0
- package/src/core/capture-sync.ts +12 -2
- package/src/core/host-paths.ts +31 -0
- package/src/core/memory-remember.ts +234 -122
- package/src/core/memory-types.ts +11 -0
- package/src/core/network-boundary-inventory.ts +8 -0
- package/src/core/request-receipts.ts +671 -0
- package/src/core/shutdown-budget.ts +6 -0
- package/src/core/vector-partition-status.ts +52 -0
- package/src/embed/backlog.ts +124 -18
- package/src/embed/fingerprint.ts +6 -3
- package/src/embed/retry.ts +66 -27
- package/src/embed/variant-backlog.ts +15 -10
- package/src/embed/variant-retry.ts +31 -22
- package/src/index.ts +30 -2
- package/src/llm/native-worker/dispatcher.ts +2 -0
- package/src/llm/native-worker/embedding-identity.ts +42 -0
- package/src/llm/native-worker/protocol.ts +1 -0
- package/src/llm/types.ts +3 -0
- package/src/mcp/context.ts +17 -0
- package/src/mcp/http-egress.ts +4 -0
- package/src/mcp/http-transport.ts +2 -0
- package/src/mcp/resources/index.ts +6 -5
- package/src/mcp/tool-descriptions-core.ts +1 -1
- package/src/mcp/tools/capture.ts +87 -85
- package/src/mcp/tools/index.ts +77 -4
- package/src/mcp/tools/memory-remember.ts +8 -1
- package/src/mcp/tools/memory-shared.ts +7 -1
- package/src/mcp/tools/request-status.ts +73 -0
- package/src/mcp/tools/sessions.ts +208 -0
- package/src/mcp/tools/status.ts +4 -0
- package/src/pipeline/hybrid.ts +37 -7
- package/src/pipeline/vsearch.ts +14 -2
- package/src/sdk/client.ts +180 -84
- package/src/sdk/index.ts +6 -0
- package/src/sdk/types.ts +54 -2
- package/src/serve/capture-service.ts +98 -32
- package/src/serve/config-sync.ts +3 -2
- package/src/serve/embed-scheduler.ts +133 -19
- package/src/serve/host-path-redaction.ts +79 -0
- package/src/serve/public/app.tsx +4 -1
- package/src/serve/public/components/CaptureModal.tsx +26 -8
- package/src/serve/public/components/sessions/AutomationPanel.tsx +800 -0
- package/src/serve/public/components/sessions/ImportReceipt.tsx +238 -0
- package/src/serve/public/components/sessions/SessionSearch.tsx +286 -0
- package/src/serve/public/components/sessions/SourcesPanel.tsx +541 -0
- package/src/serve/public/components/sessions/api.ts +40 -0
- package/src/serve/public/globals.built.css +1 -1
- package/src/serve/public/hooks/use-api.ts +26 -3
- package/src/serve/public/lib/request-intent.ts +77 -0
- package/src/serve/public/lib/snippet.tsx +52 -0
- package/src/serve/public/lib/workspace-actions.ts +12 -1
- package/src/serve/public/lib/workspace-tabs.ts +2 -0
- package/src/serve/public/pages/Dashboard.tsx +22 -9
- package/src/serve/public/pages/DocView.tsx +25 -6
- package/src/serve/public/pages/DocumentEditor.tsx +224 -104
- package/src/serve/public/pages/Search.tsx +1 -41
- package/src/serve/public/pages/Sessions.tsx +350 -0
- package/src/serve/resident-runtime.ts +69 -4
- package/src/serve/resident-status.ts +13 -1
- package/src/serve/routes/api.ts +476 -147
- package/src/serve/routes/sessions.ts +766 -0
- package/src/serve/security.ts +9 -0
- package/src/serve/server.ts +215 -10
- package/src/serve/session-automation.ts +146 -0
- package/src/serve/status-model.ts +16 -0
- package/src/serve/status.ts +2 -0
- package/src/serve/watch-reconciliation-shared.ts +3 -0
- package/src/serve/watch-service-events.ts +3 -2
- package/src/serve/watch-service-run-flush.ts +35 -2
- package/src/serve/watch-service.ts +5 -0
- package/src/sessions/archive.ts +348 -0
- package/src/sessions/automation-state.ts +444 -0
- package/src/sessions/automation-status.ts +239 -0
- package/src/sessions/automation.ts +1169 -0
- package/src/sessions/binding.ts +105 -0
- package/src/sessions/claude-hook.ts +240 -0
- package/src/sessions/config.ts +176 -0
- package/src/sessions/format.ts +191 -0
- package/src/sessions/import-child-env.ts +8 -0
- package/src/sessions/import-child.ts +152 -0
- package/src/sessions/parsers/claude-code.ts +259 -0
- package/src/sessions/parsers/codex.ts +303 -0
- package/src/sessions/parsers/hermes.ts +248 -0
- package/src/sessions/parsers/openclaw.ts +496 -0
- package/src/sessions/parsers/shared.ts +184 -0
- package/src/sessions/sanitize.ts +222 -0
- package/src/sessions/service.ts +1533 -0
- package/src/sessions/setup.ts +477 -0
- package/src/sessions/sources.ts +518 -0
- package/src/sessions/state.ts +118 -0
- package/src/sessions/types.ts +457 -0
- package/src/store/migrations/031-runtime-independent-vectors.ts +29 -0
- package/src/store/migrations/032-vector-runtime-callers.ts +17 -0
- package/src/store/migrations/index.ts +4 -0
- package/src/store/sqlite/adapter.ts +76 -16
- package/src/store/sqlite/scoped-index.ts +9 -0
- package/src/store/types.ts +11 -1
- package/src/store/vector/lazy.ts +46 -43
- package/src/store/vector/runtime-compat.ts +651 -0
- package/src/store/vector/sqlite-vec.ts +20 -2
- package/src/store/vector/status.ts +276 -35
- package/src/store/vector/types.ts +2 -0
- package/src/store/vector/variant-search.ts +71 -23
- package/src/store/vector/variants.ts +49 -14
- package/browser-extension/artifacts/gno-browser-clipper-v2.5.1.zip.sha256 +0 -1
|
@@ -2,6 +2,7 @@ import type { Config } from "../../config/types";
|
|
|
2
2
|
|
|
3
3
|
import { getIndexDbPath } from "../../app/constants";
|
|
4
4
|
import { indexesMatch } from "../../core/indexed-reference";
|
|
5
|
+
import { assertSessionBinding } from "../../sessions/binding";
|
|
5
6
|
import { SqliteAdapter } from "./adapter";
|
|
6
7
|
|
|
7
8
|
export interface ScopedIndexStore {
|
|
@@ -36,6 +37,14 @@ export async function openScopedIndexStore(options: {
|
|
|
36
37
|
);
|
|
37
38
|
}
|
|
38
39
|
|
|
40
|
+
// A session archive index only opens with its own archive config.
|
|
41
|
+
await assertSessionBinding({
|
|
42
|
+
config: options.config,
|
|
43
|
+
configPath: options.configPath ?? "<inline-config>",
|
|
44
|
+
indexName: requestedIndexName ?? "default",
|
|
45
|
+
dbPath,
|
|
46
|
+
});
|
|
47
|
+
|
|
39
48
|
const store = new SqliteAdapter();
|
|
40
49
|
store.setConfigPath(options.configPath ?? "<inline-config>");
|
|
41
50
|
const openResult = await store.open(
|
package/src/store/types.ts
CHANGED
|
@@ -26,6 +26,10 @@ import type {
|
|
|
26
26
|
ChunkingStatus,
|
|
27
27
|
PendingChunkingMirror,
|
|
28
28
|
} from "./chunking";
|
|
29
|
+
import type {
|
|
30
|
+
VectorPartitionStatus,
|
|
31
|
+
VectorRuntimeStatus,
|
|
32
|
+
} from "./vector/status";
|
|
29
33
|
|
|
30
34
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
31
35
|
// Error Types
|
|
@@ -61,7 +65,9 @@ export type StoreErrorCode =
|
|
|
61
65
|
| "VEC_SEARCH_UNAVAILABLE"
|
|
62
66
|
| "VEC_SEARCH_FAILED"
|
|
63
67
|
| "VEC_REBUILD_FAILED"
|
|
64
|
-
| "VEC_SYNC_FAILED"
|
|
68
|
+
| "VEC_SYNC_FAILED"
|
|
69
|
+
/** Embedding would build a separate vector partition without confirmation. */
|
|
70
|
+
| "VECTOR_PARTITION_FORK";
|
|
65
71
|
|
|
66
72
|
/** Store error with structured details */
|
|
67
73
|
export interface StoreError {
|
|
@@ -820,6 +826,10 @@ export interface IndexStatus {
|
|
|
820
826
|
totalChunks: number;
|
|
821
827
|
/** Chunks without embeddings */
|
|
822
828
|
embeddingBacklog: number;
|
|
829
|
+
/** Vector partitions of the status model; counts use the `retrieval` one. */
|
|
830
|
+
vectorPartitions?: VectorPartitionStatus[];
|
|
831
|
+
/** This process's runtime, resolved by retrieval's own selection rule. */
|
|
832
|
+
vectorRuntime?: VectorRuntimeStatus;
|
|
823
833
|
/** Configuration and applied cached layouts; separate from source freshness. */
|
|
824
834
|
chunking?: ChunkingStatus;
|
|
825
835
|
/** Recent ingest errors (last 24h) */
|
package/src/store/vector/lazy.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { EmbeddingPort } from "../../llm/types";
|
|
|
5
5
|
import type { VectorIndexPort } from "./types";
|
|
6
6
|
|
|
7
7
|
import { getStoredEmbeddingDimensions } from "./freshness";
|
|
8
|
-
import { createVectorIndexPort } from "./sqlite-vec";
|
|
8
|
+
import { bindVectorIndexDatabase, createVectorIndexPort } from "./sqlite-vec";
|
|
9
9
|
|
|
10
10
|
export async function createLazyVectorIndex(
|
|
11
11
|
db: Database,
|
|
@@ -35,47 +35,50 @@ export async function createLazyVectorIndex(
|
|
|
35
35
|
});
|
|
36
36
|
return loading;
|
|
37
37
|
};
|
|
38
|
-
return
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
return bindVectorIndexDatabase(
|
|
39
|
+
{
|
|
40
|
+
model,
|
|
41
|
+
get dimensions() {
|
|
42
|
+
return current?.dimensions ?? embedPort.dimensions();
|
|
43
|
+
},
|
|
44
|
+
get searchAvailable() {
|
|
45
|
+
return current?.searchAvailable ?? true;
|
|
46
|
+
},
|
|
47
|
+
get loadError() {
|
|
48
|
+
return current?.loadError;
|
|
49
|
+
},
|
|
50
|
+
get guidance() {
|
|
51
|
+
return current?.guidance;
|
|
52
|
+
},
|
|
53
|
+
get vecDirty() {
|
|
54
|
+
return current?.vecDirty ?? dirty;
|
|
55
|
+
},
|
|
56
|
+
set vecDirty(value) {
|
|
57
|
+
dirty = value;
|
|
58
|
+
if (current) current.vecDirty = value;
|
|
59
|
+
},
|
|
60
|
+
async upsertVectors(rows) {
|
|
61
|
+
return (await get()).upsertVectors(rows);
|
|
62
|
+
},
|
|
63
|
+
async upsertVectorsChecked(rows, checkpoint) {
|
|
64
|
+
const port = await get();
|
|
65
|
+
if (!port.upsertVectorsChecked)
|
|
66
|
+
throw new Error("Atomic vector checkpoint unavailable");
|
|
67
|
+
return port.upsertVectorsChecked(rows, checkpoint);
|
|
68
|
+
},
|
|
69
|
+
async deleteVectorsForMirror(hash) {
|
|
70
|
+
return (await get()).deleteVectorsForMirror(hash);
|
|
71
|
+
},
|
|
72
|
+
async searchNearest(embedding, k, options) {
|
|
73
|
+
return (await get()).searchNearest(embedding, k, options);
|
|
74
|
+
},
|
|
75
|
+
async rebuildVecIndex() {
|
|
76
|
+
return (await get()).rebuildVecIndex();
|
|
77
|
+
},
|
|
78
|
+
async syncVecIndex() {
|
|
79
|
+
return (await get()).syncVecIndex();
|
|
80
|
+
},
|
|
42
81
|
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
get loadError() {
|
|
47
|
-
return current?.loadError;
|
|
48
|
-
},
|
|
49
|
-
get guidance() {
|
|
50
|
-
return current?.guidance;
|
|
51
|
-
},
|
|
52
|
-
get vecDirty() {
|
|
53
|
-
return current?.vecDirty ?? dirty;
|
|
54
|
-
},
|
|
55
|
-
set vecDirty(value) {
|
|
56
|
-
dirty = value;
|
|
57
|
-
if (current) current.vecDirty = value;
|
|
58
|
-
},
|
|
59
|
-
async upsertVectors(rows) {
|
|
60
|
-
return (await get()).upsertVectors(rows);
|
|
61
|
-
},
|
|
62
|
-
async upsertVectorsChecked(rows, checkpoint) {
|
|
63
|
-
const port = await get();
|
|
64
|
-
if (!port.upsertVectorsChecked)
|
|
65
|
-
throw new Error("Atomic vector checkpoint unavailable");
|
|
66
|
-
return port.upsertVectorsChecked(rows, checkpoint);
|
|
67
|
-
},
|
|
68
|
-
async deleteVectorsForMirror(hash) {
|
|
69
|
-
return (await get()).deleteVectorsForMirror(hash);
|
|
70
|
-
},
|
|
71
|
-
async searchNearest(embedding, k, options) {
|
|
72
|
-
return (await get()).searchNearest(embedding, k, options);
|
|
73
|
-
},
|
|
74
|
-
async rebuildVecIndex() {
|
|
75
|
-
return (await get()).rebuildVecIndex();
|
|
76
|
-
},
|
|
77
|
-
async syncVecIndex() {
|
|
78
|
-
return (await get()).syncVecIndex();
|
|
79
|
-
},
|
|
80
|
-
};
|
|
82
|
+
db
|
|
83
|
+
);
|
|
81
84
|
}
|