@avantf/dsh-mem 0.6.4 → 0.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 +15 -10
- package/lib/client.js +1146 -2300
- package/lib/dsh-build.json +5 -5
- package/lib/engine/mem/config/config_files.d.ts +1 -1
- package/lib/engine/mem/facts_io.d.ts +288 -0
- package/lib/engine/mem/index.d.ts +4 -0
- package/lib/engine/mem/maintenance_paths.d.ts +41 -0
- package/lib/engine/mem/runtime.d.ts +57 -3
- package/lib/engine/mem/store/facts_restore.d.ts +116 -0
- package/lib/engine/mem/store/memory.d.ts +16 -0
- package/lib/engine/mem-contract/tools.d.ts +55 -1
- package/lib/index.js +4301 -2614
- package/lib/types/command.d.ts +61 -0
- package/lib/types/command.d.ts.map +1 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/interface_gate.d.ts +9 -9
- package/lib/types/remote.d.ts +9 -2
- package/lib/types/remote.d.ts.map +1 -1
- package/lib/types/render.d.ts +3 -3
- package/package.json +6 -6
|
@@ -48,6 +48,13 @@ export declare const FACT_VIEW_ADMIN_ACTIONS: readonly ["list", "detail"];
|
|
|
48
48
|
* explicitly with `mem_admin`'s diagnostic actions.
|
|
49
49
|
*/
|
|
50
50
|
export declare function modelFacingToolResult(toolKey: string, action: unknown, value: unknown): unknown;
|
|
51
|
+
/**
|
|
52
|
+
* The statuses an export may narrow to. Declared here (next to the tool schema that exposes it) so
|
|
53
|
+
* the core export path, the CLI flag validation and the admin action read ONE set: a value added
|
|
54
|
+
* here moves the contract, the CLI and the engine together.
|
|
55
|
+
*/
|
|
56
|
+
export declare const EXPORT_STATUSES: readonly ["active", "archived", "all"];
|
|
57
|
+
export type ExportStatus = (typeof EXPORT_STATUSES)[number];
|
|
51
58
|
export declare const REMEMBER_ACTIONS: readonly ["add", "update", "remove", "helpful", "unhelpful"];
|
|
52
59
|
export declare const RememberUnion: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
53
60
|
action: z.ZodLiteral<"add">;
|
|
@@ -78,6 +85,13 @@ export declare const RememberUnion: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
78
85
|
fact_id: z.ZodNumber;
|
|
79
86
|
}, z.core.$strip>], "action">;
|
|
80
87
|
export type RememberRequest = z.infer<typeof RememberUnion>;
|
|
88
|
+
/**
|
|
89
|
+
* The writes the model may make. `helpful` / `unhelpful` are operator feedback: the model cannot
|
|
90
|
+
* observe the retention clocks they move, and a model that could would be able to "refresh" a fact by
|
|
91
|
+
* voting on it — the exact behaviour the retention policy exists to prevent.
|
|
92
|
+
*/
|
|
93
|
+
export declare const MODEL_REMEMBER_ACTIONS: readonly ["add", "update", "remove"];
|
|
94
|
+
export declare const ModelRememberUnion: z.ZodDiscriminatedUnion<readonly z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>[], string>;
|
|
81
95
|
export declare const RECALL_ACTIONS: readonly ["search", "ask", "chain", "probe", "reason", "related", "contradict"];
|
|
82
96
|
export declare const RecallUnion: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
83
97
|
action: z.ZodLiteral<"search">;
|
|
@@ -125,7 +139,14 @@ export declare const RecallUnion: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
125
139
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
126
140
|
}, z.core.$strip>], "action">;
|
|
127
141
|
export type RecallRequest = z.infer<typeof RecallUnion>;
|
|
128
|
-
|
|
142
|
+
/**
|
|
143
|
+
* The retrieval actions the model may call. `chain` and `related` are operator graph views
|
|
144
|
+
* (the settings page and the CLI use them); the model reaches the same facts through
|
|
145
|
+
* `search`/`probe`/`ask`/`reason`, so the two graph shapes are not part of its tool.
|
|
146
|
+
*/
|
|
147
|
+
export declare const MODEL_RECALL_ACTIONS: readonly ["search", "ask", "probe", "reason", "contradict"];
|
|
148
|
+
export declare const ModelRecallUnion: z.ZodDiscriminatedUnion<readonly z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>[], string>;
|
|
149
|
+
export declare const ADMIN_ACTIONS: readonly ["stats", "list", "detail", "archive", "restore", "pin", "unpin", "trust_diagnose", "vectors_diagnose", "vectors_fix", "contradict_check", "contradict_resolve", "maintenance", "export", "import", "merge", "restore_snapshot"];
|
|
129
150
|
export declare const AdminUnion: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
130
151
|
action: z.ZodLiteral<"stats">;
|
|
131
152
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -177,8 +198,41 @@ export declare const AdminUnion: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
177
198
|
loser_fact_id: z.ZodOptional<z.ZodNumber>;
|
|
178
199
|
}, z.core.$strip>, z.ZodObject<{
|
|
179
200
|
action: z.ZodLiteral<"maintenance">;
|
|
201
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
202
|
+
action: z.ZodLiteral<"export">;
|
|
203
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
204
|
+
active: "active";
|
|
205
|
+
archived: "archived";
|
|
206
|
+
all: "all";
|
|
207
|
+
}>>;
|
|
208
|
+
file: z.ZodOptional<z.ZodString>;
|
|
209
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
210
|
+
action: z.ZodLiteral<"import">;
|
|
211
|
+
file: z.ZodString;
|
|
212
|
+
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
213
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
214
|
+
action: z.ZodLiteral<"merge">;
|
|
215
|
+
file: z.ZodString;
|
|
216
|
+
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
217
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
218
|
+
action: z.ZodLiteral<"restore_snapshot">;
|
|
219
|
+
file: z.ZodString;
|
|
220
|
+
confirm: z.ZodLiteral<true>;
|
|
221
|
+
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
180
222
|
}, z.core.$strip>], "action">;
|
|
181
223
|
export type AdminRequest = z.infer<typeof AdminUnion>;
|
|
224
|
+
/**
|
|
225
|
+
* The admin actions the model may call: a fact page plus the backup/restore family.
|
|
226
|
+
*
|
|
227
|
+
* Everything else is OPERATOR machinery: diagnostics and repairs (the model cannot see trust values
|
|
228
|
+
* and must not rerun the embedding strategy), curation (pin/archive/contradiction verdicts), and
|
|
229
|
+
* duplicates of what is already model-facing (`detail` is a single-fact view of the same page;
|
|
230
|
+
* `contradict_check` is the write-side half of `mem_recall.contradict`; `merge` is what `import`
|
|
231
|
+
* now does automatically for a SQLite file). The full union stays for the runtime, the Remote
|
|
232
|
+
* gateway (the settings page drives every action) and the CLI.
|
|
233
|
+
*/
|
|
234
|
+
export declare const MODEL_ADMIN_ACTIONS: readonly ["list", "export", "import", "restore_snapshot"];
|
|
235
|
+
export declare const ModelAdminUnion: z.ZodDiscriminatedUnion<readonly z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>[], string>;
|
|
182
236
|
/** The `source` a write gets when it omits one; a document's identity is `(domain, source, title)`. */
|
|
183
237
|
export declare const DEFAULT_KB_SOURCE = "default";
|
|
184
238
|
export declare const KbUnion: z.ZodDiscriminatedUnion<[z.ZodObject<{
|