@ponraaj/dimple-sdk 0.0.0-alpha.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.
- package/dist/config.d.ts +13 -0
- package/dist/dimple.d.ts +101 -0
- package/dist/errors.d.ts +63 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +8430 -0
- package/dist/indexer.d.ts +43 -0
- package/dist/internal/config/index.d.ts +4 -0
- package/dist/internal/config/loader.d.ts +9 -0
- package/dist/internal/config/schema.d.ts +176 -0
- package/dist/internal/config/service.d.ts +10 -0
- package/dist/internal/core/core.d.ts +95 -0
- package/dist/internal/core/index.d.ts +3 -0
- package/dist/internal/core/layer.d.ts +21 -0
- package/dist/internal/embedder/index.d.ts +4 -0
- package/dist/internal/embedder/openai.d.ts +8 -0
- package/dist/internal/embedder/provider.d.ts +29 -0
- package/dist/internal/embedder/registry.d.ts +10 -0
- package/dist/internal/embedder/transformers.d.ts +18 -0
- package/dist/internal/extractor/code-extractor.d.ts +15 -0
- package/dist/internal/extractor/content-handler.d.ts +17 -0
- package/dist/internal/extractor/index.d.ts +4 -0
- package/dist/internal/extractor/languages/index.d.ts +24 -0
- package/dist/internal/extractor/languages/javascript.d.ts +22 -0
- package/dist/internal/extractor/languages/typescript.d.ts +20 -0
- package/dist/internal/extractor/models/extraction.d.ts +53 -0
- package/dist/internal/llm/dream-classifier.d.ts +14 -0
- package/dist/internal/llm/index.d.ts +4 -0
- package/dist/internal/llm/llm.d.ts +54 -0
- package/dist/internal/llm/provider.d.ts +14 -0
- package/dist/internal/llm/service.d.ts +29 -0
- package/dist/internal/logger/format.d.ts +6 -0
- package/dist/internal/logger/index.d.ts +4 -0
- package/dist/internal/logger/ring.d.ts +33 -0
- package/dist/internal/logger/service.d.ts +50 -0
- package/dist/internal/logger/types.d.ts +39 -0
- package/dist/internal/parser/code-parser.d.ts +12 -0
- package/dist/internal/parser/index.d.ts +7 -0
- package/dist/internal/parser/language-store.d.ts +12 -0
- package/dist/internal/parser/models/parseRequest.d.ts +17 -0
- package/dist/internal/parser/models/treeHandle.d.ts +23 -0
- package/dist/internal/parser/tree-sitter-engine.d.ts +15 -0
- package/dist/internal/retriever/hybrid.d.ts +48 -0
- package/dist/internal/retriever/index.d.ts +3 -0
- package/dist/internal/retriever/rrf.d.ts +11 -0
- package/dist/internal/shared/errors/index.d.ts +2 -0
- package/dist/internal/shared/errors/parser.d.ts +21 -0
- package/dist/internal/shared/errors/wasm.d.ts +28 -0
- package/dist/internal/shared/types/index.d.ts +1 -0
- package/dist/internal/shared/types/language.d.ts +3 -0
- package/dist/internal/store/audit.d.ts +21 -0
- package/dist/internal/store/db-backend.d.ts +111 -0
- package/dist/internal/store/drizzle-schema.d.ts +1 -0
- package/dist/internal/store/error.d.ts +19 -0
- package/dist/internal/store/fnv1a32.d.ts +14 -0
- package/dist/internal/store/generated-migrations.d.ts +15 -0
- package/dist/internal/store/graph/candidates.d.ts +93 -0
- package/dist/internal/store/graph/concepts.d.ts +169 -0
- package/dist/internal/store/graph/dream.d.ts +171 -0
- package/dist/internal/store/graph/errors.d.ts +25 -0
- package/dist/internal/store/graph/index.d.ts +15 -0
- package/dist/internal/store/graph/observability.d.ts +37 -0
- package/dist/internal/store/graph/repair.d.ts +85 -0
- package/dist/internal/store/graph/retrieval-post-pass.d.ts +58 -0
- package/dist/internal/store/graph/traversal.d.ts +39 -0
- package/dist/internal/store/index.d.ts +38 -0
- package/dist/internal/store/libsql-backend.d.ts +18 -0
- package/dist/internal/store/models.d.ts +122 -0
- package/dist/internal/store/schema/graph.d.ts +970 -0
- package/dist/internal/store/schema/index.d.ts +7 -0
- package/dist/internal/store/schema/libsql.d.ts +2356 -0
- package/dist/internal/store/schema/metadata.d.ts +51 -0
- package/dist/internal/store/schema/topics.d.ts +1966 -0
- package/dist/internal/store/service.d.ts +162 -0
- package/dist/internal/store/store.d.ts +70 -0
- package/dist/internal/store/topics/errors.d.ts +39 -0
- package/dist/internal/store/topics/index.d.ts +24 -0
- package/dist/internal/store/topics/jobs.d.ts +149 -0
- package/dist/internal/store/topics/lifecycle.d.ts +126 -0
- package/dist/internal/store/topics/maintenance.d.ts +110 -0
- package/dist/internal/store/topics/observability.d.ts +102 -0
- package/dist/internal/store/topics/query.d.ts +43 -0
- package/dist/internal/store/topics/routing.d.ts +90 -0
- package/dist/internal/store/topics/topic-vectors.d.ts +24 -0
- package/dist/internal/store/topics/tree.d.ts +181 -0
- package/dist/internal/wasm/grammar-store.d.ts +14 -0
- package/dist/internal/wasm/index.d.ts +5 -0
- package/dist/internal/wasm/wasm-cache.d.ts +17 -0
- package/dist/internal/wasm/wasm-downloader.d.ts +10 -0
- package/dist/internal/wasm/wasm-registry.d.ts +16 -0
- package/dist/internal/workflow/config.d.ts +39 -0
- package/dist/internal/workflow/engine.d.ts +54 -0
- package/dist/internal/workflow/errors.d.ts +77 -0
- package/dist/internal/workflow/executor.d.ts +53 -0
- package/dist/internal/workflow/index.d.ts +13 -0
- package/dist/internal/workflow/persistence.d.ts +122 -0
- package/dist/internal/workflow/queue-store.d.ts +5 -0
- package/dist/internal/workflow/queue.d.ts +298 -0
- package/dist/internal/workflow/registry.d.ts +57 -0
- package/dist/internal/workflow/runtime.d.ts +161 -0
- package/dist/make.d.ts +27 -0
- package/package.json +45 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { ScoredMemory } from "../models.ts";
|
|
2
|
+
/**
|
|
3
|
+
* Retrieval post-pass — the deterministic, pure-JS augmentation of search
|
|
4
|
+
* results with graph context. No Effect, no DB: the store fetches the result set's edges via
|
|
5
|
+
* the Drizzle builder and this module transforms. Retrieval without edges is
|
|
6
|
+
* identical to today — the pass is a no-op on an empty graph.
|
|
7
|
+
*
|
|
8
|
+
* Rules applied (all deterministic — edges are sorted first, results keep
|
|
9
|
+
* their input rank order):
|
|
10
|
+
* - `memory_supersedes` (confirmed): a result that IS the OLD endpoint
|
|
11
|
+
* (`fromMemoryId`, the old → new direction) is demoted — `score ×
|
|
12
|
+
* supersedeDemotion` — and gets `supersededBy = successor id` (the first
|
|
13
|
+
* successor in sorted edge order wins when several supersede edges target
|
|
14
|
+
* the same result). Pending supersede candidates never demote.
|
|
15
|
+
* - `memory_contradicts` (pending OR confirmed): EITHER endpoint in the
|
|
16
|
+
* results surfaces `conflicts = [other endpoint id]` on BOTH sides;
|
|
17
|
+
* nothing is silently dropped (pending conflicts are visible).
|
|
18
|
+
* - `memory_supports` (confirmed): the result at the `toMemoryId` endpoint
|
|
19
|
+
* gains `supportedBy = [source ids]` — the "why this result" provenance.
|
|
20
|
+
*
|
|
21
|
+
* `conceptEdges` is accepted per the documented signature but attaches
|
|
22
|
+
* nothing in this pass — the concept filter consumes it later.
|
|
23
|
+
*/
|
|
24
|
+
/** A search result augmented with graph context. The base `ScoredMemory`
|
|
25
|
+
* fields are untouched unless a rule applies; un-affected results are
|
|
26
|
+
* returned by reference (bit-identical). */
|
|
27
|
+
export interface AugmentedMemory extends ScoredMemory {
|
|
28
|
+
/** Other endpoints of pending/confirmed `memory_contradicts` edges (both sides surface). */
|
|
29
|
+
readonly conflicts?: readonly string[];
|
|
30
|
+
/** Sources of confirmed `memory_supports` edges ("why this result" provenance). */
|
|
31
|
+
readonly supportedBy?: readonly string[];
|
|
32
|
+
/** Successor of a confirmed `memory_supersedes` edge — this result is the
|
|
33
|
+
* OLD endpoint, so its score was multiplied by `supersedeDemotion`. */
|
|
34
|
+
readonly supersededBy?: string;
|
|
35
|
+
}
|
|
36
|
+
/** One `artifact_edges` row as fetched by the store's post-pass query
|
|
37
|
+
* (non-rejected, non-expired — pending rows included so conflicts surface). */
|
|
38
|
+
export interface ResultEdge {
|
|
39
|
+
readonly fromMemoryId: string;
|
|
40
|
+
readonly toMemoryId: string;
|
|
41
|
+
readonly edgeKind: string;
|
|
42
|
+
readonly status: string;
|
|
43
|
+
}
|
|
44
|
+
/** One `memory_concepts` row (concept filter's input — accepted now,
|
|
45
|
+
* attached later). */
|
|
46
|
+
export interface ConceptEdge {
|
|
47
|
+
readonly memoryId: string;
|
|
48
|
+
readonly conceptId: string;
|
|
49
|
+
}
|
|
50
|
+
export interface AugmentResultsOptions {
|
|
51
|
+
/** Score multiplier applied to superseded results. */
|
|
52
|
+
readonly supersedeDemotion: number;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The deterministic graph post-pass over one search result set. Empty inputs
|
|
56
|
+
* ⇒ results mapped unchanged (the same array, bit-identical scores).
|
|
57
|
+
*/
|
|
58
|
+
export declare const augmentResults: (results: readonly ScoredMemory[], memoryEdges: readonly ResultEdge[], _conceptEdges: readonly ConceptEdge[], opts: AugmentResultsOptions) => readonly AugmentedMemory[];
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
/**
|
|
3
|
+
* Traversal row shapes + the ONE sanctioned boundary cast for graph
|
|
4
|
+
* traversal (raw SQL results carry no type info — `DbBackend.
|
|
5
|
+
* graphNeighbors` returns `Record<string, unknown>[]`; this module validates
|
|
6
|
+
* and maps them into the canonical camelCase shape once, at the store
|
|
7
|
+
* boundary — the mirror of the `ftsSearch`/`vectorSearch` casts).
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Canonical traversal row — the camelCase shape declared on the backend
|
|
11
|
+
* (`DbBackend.GraphNeighborRow`). One row = one edge of the neighborhood:
|
|
12
|
+
* the edge that reached this row's `to` endpoint (the seed query matches
|
|
13
|
+
* rows touching a frontier node on EITHER endpoint, so `from` may also be
|
|
14
|
+
* the frontier — `Store.explain` resolves reached nodes from both).
|
|
15
|
+
*/
|
|
16
|
+
export declare const GraphNeighborRow: Schema.Struct<{
|
|
17
|
+
/** The edge's `from` endpoint id. */
|
|
18
|
+
readonly fromId: Schema.String;
|
|
19
|
+
readonly fromKind: Schema.String;
|
|
20
|
+
/** The edge's `to` endpoint id. */
|
|
21
|
+
readonly toId: Schema.String;
|
|
22
|
+
readonly toKind: Schema.String;
|
|
23
|
+
readonly edgeKind: Schema.String;
|
|
24
|
+
readonly edgeStatus: Schema.String;
|
|
25
|
+
readonly weight: Schema.Number;
|
|
26
|
+
readonly edgeSource: Schema.String;
|
|
27
|
+
readonly depth: Schema.Number;
|
|
28
|
+
}>;
|
|
29
|
+
/** Decoded `GraphNeighborRow` — the canonical traversal row shape. */
|
|
30
|
+
export interface GraphNeighborRow extends Schema.Schema.Type<typeof GraphNeighborRow> {
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The sanctioned boundary cast for `DbBackend.graphNeighbors` rows:
|
|
34
|
+
* validates each raw row against the view's fixed shape and maps it to the
|
|
35
|
+
* canonical camelCase `GraphNeighborRow`. Throws (defect) on a row that
|
|
36
|
+
* does not match — the backend owns the query, so a mismatch is a real bug,
|
|
37
|
+
* not a runtime condition.
|
|
38
|
+
*/
|
|
39
|
+
export declare const fromNeighborRows: (rows: readonly Record<string, unknown>[]) => readonly GraphNeighborRow[];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Config } from "effect";
|
|
2
|
+
export { StoreError, NotFound, DuplicateActiveKey } from "./error.ts";
|
|
3
|
+
import * as topics from "./topics/index.ts";
|
|
4
|
+
export { topics };
|
|
5
|
+
export { auditWriteHandler, type AuditWriteHandler } from "./audit.ts";
|
|
6
|
+
export { TopicConfig } from "./schema/topics.ts";
|
|
7
|
+
export type { AddEdgeInput, ExplainResult } from "./service.ts";
|
|
8
|
+
export type { TopicHealth } from "./topics/observability.ts";
|
|
9
|
+
export type { TopicConfig as TopicConfigType } from "./schema/topics.ts";
|
|
10
|
+
export type { RetrievalAuditRow } from "./models.ts";
|
|
11
|
+
import * as graph from "./graph/index.ts";
|
|
12
|
+
export { graph };
|
|
13
|
+
export { augmentResults } from "./graph/retrieval-post-pass.ts";
|
|
14
|
+
export type { AugmentedMemory, ResultEdge, ConceptEdge, AugmentResultsOptions, } from "./graph/retrieval-post-pass.ts";
|
|
15
|
+
export { leafLocalCandidates } from "./graph/candidates.ts";
|
|
16
|
+
export type { CandidateMember, CandidateKind, EdgeCandidate, EdgeCandidateInfo, IsolatedMemory, GraphCandidatesOptions, GraphCandidatesResult, } from "./graph/candidates.ts";
|
|
17
|
+
export { farthestPointSeeds, kGroupLloyd, clusterMembers, clusterConceptId, conceptConfidence, clusterLeaf, clusterCorpus, conceptClusterHandler, } from "./graph/concepts.ts";
|
|
18
|
+
export type { ClusterResult, ClusterWriteResult, ConceptClusterHandler, ConceptClusterHandlerDeps, } from "./graph/concepts.ts";
|
|
19
|
+
export { graphDreamHandler, dreamStateDefaults } from "./graph/dream.ts";
|
|
20
|
+
export type { DreamPair, DreamRelation, DreamDerived, DreamClassification, DreamClassifier, DreamOutcome, DreamHandler, DreamHandlerDeps, } from "./graph/dream.ts";
|
|
21
|
+
export { graphCoverage } from "./graph/observability.ts";
|
|
22
|
+
export type { GraphCoverage } from "./graph/observability.ts";
|
|
23
|
+
export { graphRepairHandler } from "./graph/repair.ts";
|
|
24
|
+
export type { RepairResult, GraphRepairHandler, GraphRepairHandlerDeps } from "./graph/repair.ts";
|
|
25
|
+
export { parseMetadata, encodeMetadata, mergeMetadataBlob } from "./schema/metadata.ts";
|
|
26
|
+
export { Service as DbBackend, type DrizzleDB } from "./db-backend.ts";
|
|
27
|
+
export { Service as Store } from "./service.ts";
|
|
28
|
+
export * from "./models.ts";
|
|
29
|
+
export { layer as dbBackendLayer, layerConfig as dbBackendLayerConfig, layerFromConfig as dbBackendLayerFromConfig, } from "./libsql-backend.ts";
|
|
30
|
+
export { layer as storeLayer, layerConfig as storeLayerConfig, layerFromConfig as storeLayerFromConfig, } from "./store.ts";
|
|
31
|
+
export declare const layer: (url: string, options?: {
|
|
32
|
+
migrationFolder?: string;
|
|
33
|
+
}) => import("effect/Layer").Layer<import("./internal/logger/index.js").Logging | import("./db-backend.ts").Service | import("./service.ts").Service, import("./error.ts").StoreError, import("effect/Scope").Scope>;
|
|
34
|
+
export declare const layerConfig: (config: Config.Wrap<{
|
|
35
|
+
url: string;
|
|
36
|
+
}>, options?: {
|
|
37
|
+
migrationFolder?: string;
|
|
38
|
+
}) => import("effect/Layer").Layer<import("./internal/logger/index.js").Logging | import("./db-backend.ts").Service | import("./service.ts").Service, Config.ConfigError | import("./error.ts").StoreError, import("effect/Scope").Scope>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Layer, Config, Scope } from "effect";
|
|
2
|
+
import { StoreError } from "./error.ts";
|
|
3
|
+
import { Service } from "./db-backend.ts";
|
|
4
|
+
import { Service as ConfigService } from "./internal/config/index.js";
|
|
5
|
+
export declare const layer: (url: string, options?: {
|
|
6
|
+
migrationFolder?: string;
|
|
7
|
+
releaseClient?: boolean;
|
|
8
|
+
}) => Layer.Layer<Service, StoreError, never>;
|
|
9
|
+
export declare const layerConfig: (config: Config.Wrap<{
|
|
10
|
+
url: string;
|
|
11
|
+
}>, options?: {
|
|
12
|
+
migrationFolder?: string;
|
|
13
|
+
releaseClient?: boolean;
|
|
14
|
+
}) => Layer.Layer<Service, Config.ConfigError | StoreError, Scope.Scope>;
|
|
15
|
+
export declare const layerFromConfig: (options?: {
|
|
16
|
+
migrationFolder?: string;
|
|
17
|
+
releaseClient?: boolean;
|
|
18
|
+
}) => Layer.Layer<Service, StoreError, ConfigService | Scope.Scope>;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export { MemoryMetadata } from "./schema/metadata.ts";
|
|
3
|
+
export declare const MemoryState: Schema.Literals<readonly ["active", "superseded", "archived", "forgotten"]>;
|
|
4
|
+
export type MemoryState = Schema.Schema.Type<typeof MemoryState>;
|
|
5
|
+
export declare const MemoryEventType: Schema.Literals<readonly ["created", "superseded", "archived", "forgotten", "embedding_updated"]>;
|
|
6
|
+
export type MemoryEventType = Schema.Schema.Type<typeof MemoryEventType>;
|
|
7
|
+
export declare const MemoryUnit: Schema.Struct<{
|
|
8
|
+
readonly id: Schema.String;
|
|
9
|
+
readonly logicalKey: Schema.String;
|
|
10
|
+
readonly content: Schema.String;
|
|
11
|
+
readonly contentType: Schema.String;
|
|
12
|
+
readonly state: Schema.Literals<readonly ["active", "superseded", "archived", "forgotten"]>;
|
|
13
|
+
readonly createdAt: Schema.Number;
|
|
14
|
+
readonly ttlSecs: Schema.Number;
|
|
15
|
+
readonly namespace: Schema.String;
|
|
16
|
+
readonly metadata: Schema.optional<Schema.String>;
|
|
17
|
+
readonly embedding: Schema.optional<Schema.$Array<Schema.Number>>;
|
|
18
|
+
readonly embeddingModel: Schema.optional<Schema.String>;
|
|
19
|
+
}>;
|
|
20
|
+
export interface MemoryUnit extends Schema.Schema.Type<typeof MemoryUnit> {
|
|
21
|
+
}
|
|
22
|
+
export declare const WriteMemoryInput: Schema.Struct<{
|
|
23
|
+
readonly logicalKey: Schema.String;
|
|
24
|
+
readonly content: Schema.String;
|
|
25
|
+
readonly contentType: Schema.optional<Schema.String>;
|
|
26
|
+
readonly namespace: Schema.optional<Schema.String>;
|
|
27
|
+
readonly ttlSecs: Schema.optional<Schema.Number>;
|
|
28
|
+
readonly metadata: Schema.optional<Schema.String>;
|
|
29
|
+
/** Typed overlay merged INTO the raw metadata blob on write (unknown blob
|
|
30
|
+
* keys preserved. Takes precedence over `metadata`. */
|
|
31
|
+
readonly typedMetadata: Schema.optional<Schema.Struct<{
|
|
32
|
+
readonly topics: Schema.$Array<Schema.String>;
|
|
33
|
+
readonly sourceType: Schema.String;
|
|
34
|
+
readonly temporalContext: Schema.optional<Schema.Struct<{
|
|
35
|
+
readonly windowStart: Schema.Number;
|
|
36
|
+
readonly windowEnd: Schema.Number;
|
|
37
|
+
}>>;
|
|
38
|
+
readonly confidence: Schema.Number;
|
|
39
|
+
readonly affordances: Schema.$Array<Schema.String>;
|
|
40
|
+
readonly language: Schema.optional<Schema.String>;
|
|
41
|
+
readonly pinned: Schema.optional<Schema.Boolean>;
|
|
42
|
+
}>>;
|
|
43
|
+
}>;
|
|
44
|
+
export interface WriteMemoryInput extends Schema.Schema.Type<typeof WriteMemoryInput> {
|
|
45
|
+
}
|
|
46
|
+
export declare const ScoredMemory: Schema.Struct<{
|
|
47
|
+
readonly memory: Schema.Struct<{
|
|
48
|
+
readonly id: Schema.String;
|
|
49
|
+
readonly logicalKey: Schema.String;
|
|
50
|
+
readonly content: Schema.String;
|
|
51
|
+
readonly contentType: Schema.String;
|
|
52
|
+
readonly state: Schema.Literals<readonly ["active", "superseded", "archived", "forgotten"]>;
|
|
53
|
+
readonly createdAt: Schema.Number;
|
|
54
|
+
readonly ttlSecs: Schema.Number;
|
|
55
|
+
readonly namespace: Schema.String;
|
|
56
|
+
readonly metadata: Schema.optional<Schema.String>;
|
|
57
|
+
readonly embedding: Schema.optional<Schema.$Array<Schema.Number>>;
|
|
58
|
+
readonly embeddingModel: Schema.optional<Schema.String>;
|
|
59
|
+
}>;
|
|
60
|
+
readonly score: Schema.Number;
|
|
61
|
+
readonly rank: Schema.Number;
|
|
62
|
+
readonly source: Schema.String;
|
|
63
|
+
}>;
|
|
64
|
+
/** One `retrieval_log` row as built by the store's audit helper. The
|
|
65
|
+
* `audit.write` job def in `@dimple/workflow` decodes this shape
|
|
66
|
+
* structurally. */
|
|
67
|
+
export interface RetrievalAuditRow {
|
|
68
|
+
readonly id: string;
|
|
69
|
+
readonly queryHash: string;
|
|
70
|
+
readonly queryText: string;
|
|
71
|
+
readonly namespace: string;
|
|
72
|
+
readonly mode: string;
|
|
73
|
+
readonly queryProfile?: string | null;
|
|
74
|
+
readonly sources?: string | null;
|
|
75
|
+
readonly resultCount?: number | null;
|
|
76
|
+
readonly latencyMs: number;
|
|
77
|
+
readonly createdAt: number;
|
|
78
|
+
}
|
|
79
|
+
export interface ScoredMemory extends Schema.Schema.Type<typeof ScoredMemory> {
|
|
80
|
+
}
|
|
81
|
+
export declare const SweepResult: Schema.Struct<{
|
|
82
|
+
readonly archived: Schema.Number;
|
|
83
|
+
readonly forgotten: Schema.Number;
|
|
84
|
+
}>;
|
|
85
|
+
export interface SweepResult extends Schema.Schema.Type<typeof SweepResult> {
|
|
86
|
+
}
|
|
87
|
+
export declare const MemoryEvent: Schema.Struct<{
|
|
88
|
+
readonly id: Schema.Number;
|
|
89
|
+
readonly memoryId: Schema.String;
|
|
90
|
+
readonly eventType: Schema.Literals<readonly ["created", "superseded", "archived", "forgotten", "embedding_updated"]>;
|
|
91
|
+
readonly fromState: Schema.optional<Schema.Literals<readonly ["active", "superseded", "archived", "forgotten"]>>;
|
|
92
|
+
readonly toState: Schema.optional<Schema.Literals<readonly ["active", "superseded", "archived", "forgotten"]>>;
|
|
93
|
+
readonly reason: Schema.optional<Schema.String>;
|
|
94
|
+
readonly createdAt: Schema.Number;
|
|
95
|
+
}>;
|
|
96
|
+
export interface MemoryEvent extends Schema.Schema.Type<typeof MemoryEvent> {
|
|
97
|
+
}
|
|
98
|
+
export declare const Concept: Schema.Struct<{
|
|
99
|
+
readonly id: Schema.String;
|
|
100
|
+
readonly name: Schema.String;
|
|
101
|
+
readonly embedding: Schema.$Array<Schema.Number>;
|
|
102
|
+
readonly occurrenceCount: Schema.Number;
|
|
103
|
+
readonly firstSeen: Schema.Number;
|
|
104
|
+
readonly lastSeen: Schema.Number;
|
|
105
|
+
}>;
|
|
106
|
+
export interface Concept extends Schema.Schema.Type<typeof Concept> {
|
|
107
|
+
}
|
|
108
|
+
export declare const RetrievalLogEntry: Schema.Struct<{
|
|
109
|
+
readonly id: Schema.String;
|
|
110
|
+
readonly queryHash: Schema.String;
|
|
111
|
+
readonly queryText: Schema.String;
|
|
112
|
+
readonly namespace: Schema.String;
|
|
113
|
+
readonly mode: Schema.String;
|
|
114
|
+
readonly queryProfile: Schema.optional<Schema.String>;
|
|
115
|
+
/** Serialized query profile / result-source ids. */
|
|
116
|
+
readonly sources: Schema.optional<Schema.String>;
|
|
117
|
+
readonly resultCount: Schema.Number;
|
|
118
|
+
readonly latencyMs: Schema.Number;
|
|
119
|
+
readonly createdAt: Schema.Number;
|
|
120
|
+
}>;
|
|
121
|
+
export interface RetrievalLogEntry extends Schema.Schema.Type<typeof RetrievalLogEntry> {
|
|
122
|
+
}
|