watashi-db 0.0.13 → 0.0.15
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/CLAUDE.md +36 -0
- package/LICENSE +1 -1
- package/README.md +64 -2
- package/cowork-plugin/skills/groom/SKILL.md +51 -15
- package/cowork-plugin/skills/recall/SKILL.md +5 -6
- package/cowork-plugin/skills/reflect/SKILL.md +4 -4
- package/cowork-plugin/skills/remember/SKILL.md +3 -3
- package/cowork-plugin/skills/session-start/SKILL.md +3 -3
- package/dist/auth/token.d.ts +7 -0
- package/dist/auth/token.js +14 -0
- package/dist/auth/token.js.map +1 -0
- package/dist/config/schema.js +1 -1
- package/dist/constants.d.ts +9 -9
- package/dist/constants.js +29 -43
- package/dist/constants.js.map +1 -1
- package/dist/database/archive.js +6 -6
- package/dist/database/groom.js +5 -5
- package/dist/database/groom.js.map +1 -1
- package/dist/database/queries-core.d.ts +109 -5
- package/dist/database/queries-core.js +546 -186
- package/dist/database/queries-core.js.map +1 -1
- package/dist/database/queries.d.ts +85 -5
- package/dist/database/queries.js +33 -0
- package/dist/database/queries.js.map +1 -1
- package/dist/database/schema.d.ts +1 -0
- package/dist/database/schema.js +2299 -406
- package/dist/database/schema.js.map +1 -1
- package/dist/embedding/embed-on-write.d.ts +7 -1
- package/dist/embedding/embed-on-write.js +8 -3
- package/dist/embedding/embed-on-write.js.map +1 -1
- package/dist/hook.js +17 -9
- package/dist/hook.js.map +1 -1
- package/dist/http-server.d.ts +6 -0
- package/dist/http-server.js +235 -0
- package/dist/http-server.js.map +1 -0
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/dist/resources/config-guide-content.d.ts +1 -1
- package/dist/resources/config-guide-content.js +2 -2
- package/dist/server-core.d.ts +15 -0
- package/dist/server-core.js +113 -0
- package/dist/server-core.js.map +1 -0
- package/dist/server-instructions.js +27 -24
- package/dist/server-instructions.js.map +1 -1
- package/dist/server.d.ts +4 -1
- package/dist/server.js +9 -103
- package/dist/server.js.map +1 -1
- package/dist/setup.js +5 -6
- package/dist/setup.js.map +1 -1
- package/dist/store/federation.d.ts +12 -1
- package/dist/store/federation.js +38 -0
- package/dist/store/federation.js.map +1 -1
- package/dist/store/sync-manager.d.ts +1 -1
- package/dist/store/sync-manager.js +9 -9
- package/dist/tools/claim-tools.d.ts +1 -1
- package/dist/tools/claim-tools.js +30 -17
- package/dist/tools/claim-tools.js.map +1 -1
- package/dist/tools/decision-tools.d.ts +1 -1
- package/dist/tools/decision-tools.js +23 -7
- package/dist/tools/decision-tools.js.map +1 -1
- package/dist/tools/episode-tools.d.ts +1 -1
- package/dist/tools/episode-tools.js +28 -7
- package/dist/tools/episode-tools.js.map +1 -1
- package/dist/tools/file-tools.d.ts +3 -0
- package/dist/tools/file-tools.js +350 -0
- package/dist/tools/file-tools.js.map +1 -0
- package/dist/tools/get-tools.d.ts +1 -1
- package/dist/tools/get-tools.js +39 -5
- package/dist/tools/get-tools.js.map +1 -1
- package/dist/tools/helpers.d.ts +40 -0
- package/dist/tools/helpers.js +69 -0
- package/dist/tools/helpers.js.map +1 -1
- package/dist/tools/knowledge-tools.d.ts +1 -1
- package/dist/tools/knowledge-tools.js +38 -6
- package/dist/tools/knowledge-tools.js.map +1 -1
- package/dist/tools/maintenance-tools.d.ts +1 -1
- package/dist/tools/maintenance-tools.js +95 -52
- package/dist/tools/maintenance-tools.js.map +1 -1
- package/dist/tools/memo-tools.d.ts +7 -11
- package/dist/tools/memo-tools.js +509 -309
- package/dist/tools/memo-tools.js.map +1 -1
- package/dist/tools/query-tools.d.ts +1 -1
- package/dist/tools/query-tools.js +266 -242
- package/dist/tools/query-tools.js.map +1 -1
- package/dist/types.d.ts +513 -76
- package/dist/types.js +185 -33
- package/dist/types.js.map +1 -1
- package/misc/20260316_110841_groom-recipe.md +483 -0
- package/misc/20260316_xaml-testing-library-recipe.md +817 -0
- package/misc/20260331_remote-transport-recipe.md +316 -0
- package/package.json +4 -2
- package/scripts/update-license-version.sh +7 -0
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { CLAIM_CATEGORIES, CLAIM_SCOPES,
|
|
2
|
+
import { CLAIM_CATEGORIES, CLAIM_SCOPES, VALIDITY_STATUSES, USER_MEMO_STATUSES, USER_MEMO_USAGE_POLICIES, USER_PLAN_STATUSES, USER_ISSUE_STATUSES, USER_ISSUE_PRIORITIES, USER_TOPIC_STATUSES, USER_TOPIC_PRIORITIES, USER_FILE_STATUSES } from "./constants.js";
|
|
3
3
|
export declare const ScopeSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
4
4
|
export declare const StoreClaimSchema: z.ZodObject<{
|
|
5
5
|
subject: z.ZodString;
|
|
@@ -13,8 +13,9 @@ export declare const StoreClaimSchema: z.ZodObject<{
|
|
|
13
13
|
falsifier: z.ZodOptional<z.ZodString>;
|
|
14
14
|
l1_content: z.ZodOptional<z.ZodString>;
|
|
15
15
|
search_summary: z.ZodOptional<z.ZodString>;
|
|
16
|
+
user_input: z.ZodOptional<z.ZodString>;
|
|
16
17
|
source_tool: z.ZodOptional<z.ZodString>;
|
|
17
|
-
|
|
18
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
18
19
|
}, "strip", z.ZodTypeAny, {
|
|
19
20
|
object: string;
|
|
20
21
|
scope: string;
|
|
@@ -25,10 +26,11 @@ export declare const StoreClaimSchema: z.ZodObject<{
|
|
|
25
26
|
evidence?: string | undefined;
|
|
26
27
|
falsifier?: string | undefined;
|
|
27
28
|
search_summary?: string | undefined;
|
|
29
|
+
user_input?: string | undefined;
|
|
30
|
+
session_id?: string | undefined;
|
|
28
31
|
reasoning?: string | undefined;
|
|
29
32
|
l1_content?: string | undefined;
|
|
30
33
|
source_tool?: string | undefined;
|
|
31
|
-
source_session?: string | undefined;
|
|
32
34
|
}, {
|
|
33
35
|
object: string;
|
|
34
36
|
subject: string;
|
|
@@ -38,11 +40,12 @@ export declare const StoreClaimSchema: z.ZodObject<{
|
|
|
38
40
|
falsifier?: string | undefined;
|
|
39
41
|
scope?: string | undefined;
|
|
40
42
|
search_summary?: string | undefined;
|
|
43
|
+
user_input?: string | undefined;
|
|
44
|
+
session_id?: string | undefined;
|
|
41
45
|
confidence?: number | undefined;
|
|
42
46
|
reasoning?: string | undefined;
|
|
43
47
|
l1_content?: string | undefined;
|
|
44
48
|
source_tool?: string | undefined;
|
|
45
|
-
source_session?: string | undefined;
|
|
46
49
|
}>;
|
|
47
50
|
export declare const UpdateClaimSchema: z.ZodObject<{
|
|
48
51
|
id: z.ZodString;
|
|
@@ -55,7 +58,8 @@ export declare const UpdateClaimSchema: z.ZodObject<{
|
|
|
55
58
|
evidence: z.ZodOptional<z.ZodString>;
|
|
56
59
|
l1_content: z.ZodOptional<z.ZodString>;
|
|
57
60
|
search_summary: z.ZodOptional<z.ZodString>;
|
|
58
|
-
|
|
61
|
+
validity_status: z.ZodOptional<z.ZodEnum<["invalidated"]>>;
|
|
62
|
+
is_archived: z.ZodOptional<z.ZodBoolean>;
|
|
59
63
|
reason: z.ZodString;
|
|
60
64
|
}, "strip", z.ZodTypeAny, {
|
|
61
65
|
id: string;
|
|
@@ -64,7 +68,8 @@ export declare const UpdateClaimSchema: z.ZodObject<{
|
|
|
64
68
|
evidence?: string | undefined;
|
|
65
69
|
scope?: string | undefined;
|
|
66
70
|
search_summary?: string | undefined;
|
|
67
|
-
|
|
71
|
+
validity_status?: "invalidated" | undefined;
|
|
72
|
+
is_archived?: boolean | undefined;
|
|
68
73
|
subject?: string | undefined;
|
|
69
74
|
predicate?: string | undefined;
|
|
70
75
|
category?: "preference" | "identity" | "skill" | "value" | "workflow" | "knowledge" | "custom" | undefined;
|
|
@@ -77,7 +82,8 @@ export declare const UpdateClaimSchema: z.ZodObject<{
|
|
|
77
82
|
evidence?: string | undefined;
|
|
78
83
|
scope?: string | undefined;
|
|
79
84
|
search_summary?: string | undefined;
|
|
80
|
-
|
|
85
|
+
validity_status?: "invalidated" | undefined;
|
|
86
|
+
is_archived?: boolean | undefined;
|
|
81
87
|
subject?: string | undefined;
|
|
82
88
|
predicate?: string | undefined;
|
|
83
89
|
category?: "preference" | "identity" | "skill" | "value" | "workflow" | "knowledge" | "custom" | undefined;
|
|
@@ -89,6 +95,7 @@ export declare const LogDecisionSchema: z.ZodObject<{
|
|
|
89
95
|
title: z.ZodOptional<z.ZodString>;
|
|
90
96
|
description: z.ZodOptional<z.ZodString>;
|
|
91
97
|
l1_content: z.ZodOptional<z.ZodString>;
|
|
98
|
+
auto_l1: z.ZodOptional<z.ZodBoolean>;
|
|
92
99
|
l2_reasoning: z.ZodOptional<z.ZodString>;
|
|
93
100
|
l2_alternatives: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodString, string[], string>]>>;
|
|
94
101
|
related_claim_ids: z.ZodDefault<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodString, string[], string>]>>;
|
|
@@ -106,6 +113,7 @@ export declare const LogDecisionSchema: z.ZodObject<{
|
|
|
106
113
|
id?: string | undefined;
|
|
107
114
|
title?: string | undefined;
|
|
108
115
|
description?: string | undefined;
|
|
116
|
+
auto_l1?: boolean | undefined;
|
|
109
117
|
l2_reasoning?: string | undefined;
|
|
110
118
|
l2_alternatives?: string[] | undefined;
|
|
111
119
|
}, {
|
|
@@ -117,6 +125,7 @@ export declare const LogDecisionSchema: z.ZodObject<{
|
|
|
117
125
|
id?: string | undefined;
|
|
118
126
|
title?: string | undefined;
|
|
119
127
|
description?: string | undefined;
|
|
128
|
+
auto_l1?: boolean | undefined;
|
|
120
129
|
l2_reasoning?: string | undefined;
|
|
121
130
|
l2_alternatives?: string | string[] | undefined;
|
|
122
131
|
related_claim_ids?: string | string[] | undefined;
|
|
@@ -193,8 +202,7 @@ export declare const StoreClaimCheckSchema: z.ZodObject<{
|
|
|
193
202
|
}>;
|
|
194
203
|
export type ClaimCategory = typeof CLAIM_CATEGORIES[number];
|
|
195
204
|
export type ClaimScope = typeof CLAIM_SCOPES[number];
|
|
196
|
-
export type
|
|
197
|
-
export type DecisionStatus = typeof DECISION_STATUSES[number];
|
|
205
|
+
export type ValidityStatus = typeof VALIDITY_STATUSES[number];
|
|
198
206
|
export type RelationType = typeof RELATION_TYPES[number];
|
|
199
207
|
export type EvidenceType = typeof EVIDENCE_TYPES[number];
|
|
200
208
|
export type CheckType = typeof CHECK_TYPES[number];
|
|
@@ -210,10 +218,13 @@ export interface ClaimRow {
|
|
|
210
218
|
l2_evidence: string | null;
|
|
211
219
|
l2_falsifier: string | null;
|
|
212
220
|
source_tool: string | null;
|
|
213
|
-
|
|
221
|
+
session_id: string | null;
|
|
214
222
|
client_name: string | null;
|
|
215
223
|
client_version: string | null;
|
|
216
|
-
|
|
224
|
+
user_input: string | null;
|
|
225
|
+
validity_status: ValidityStatus;
|
|
226
|
+
is_archived: number;
|
|
227
|
+
promoted_to: string | null;
|
|
217
228
|
hit_count: number;
|
|
218
229
|
last_hit_at: string | null;
|
|
219
230
|
search_summary: string | null;
|
|
@@ -236,8 +247,11 @@ export interface DecisionRow {
|
|
|
236
247
|
l1_embedding: Buffer | null;
|
|
237
248
|
promoted_from_store: string | null;
|
|
238
249
|
promoted_from_id: string | null;
|
|
239
|
-
|
|
250
|
+
validity_status: ValidityStatus;
|
|
251
|
+
is_archived: number;
|
|
252
|
+
promoted_to: string | null;
|
|
240
253
|
source_tool: string | null;
|
|
254
|
+
session_id: string | null;
|
|
241
255
|
client_name: string | null;
|
|
242
256
|
client_version: string | null;
|
|
243
257
|
user_input: string | null;
|
|
@@ -287,11 +301,9 @@ export interface AuditLogRow {
|
|
|
287
301
|
client_version: string | null;
|
|
288
302
|
session_id: string | null;
|
|
289
303
|
source_tool: string | null;
|
|
290
|
-
|
|
304
|
+
device_id: string | null;
|
|
291
305
|
created_at: string;
|
|
292
306
|
}
|
|
293
|
-
export declare const EPISODE_STATUSES: readonly ["active", "archived", "promoted"];
|
|
294
|
-
export type EpisodeStatus = typeof EPISODE_STATUSES[number];
|
|
295
307
|
export interface ClaimCheckRow {
|
|
296
308
|
id: string;
|
|
297
309
|
claim_id: string;
|
|
@@ -319,7 +331,9 @@ export interface EpisodeRow {
|
|
|
319
331
|
l1_embedding: Buffer | null;
|
|
320
332
|
promoted_from_store: string | null;
|
|
321
333
|
promoted_from_id: string | null;
|
|
322
|
-
|
|
334
|
+
validity_status: ValidityStatus;
|
|
335
|
+
is_archived: number;
|
|
336
|
+
promoted_to: string | null;
|
|
323
337
|
groomed_at: string | null;
|
|
324
338
|
source_tool: string | null;
|
|
325
339
|
session_id: string | null;
|
|
@@ -334,6 +348,7 @@ export declare const LogEpisodeSchema: z.ZodObject<{
|
|
|
334
348
|
id: z.ZodOptional<z.ZodString>;
|
|
335
349
|
title: z.ZodOptional<z.ZodString>;
|
|
336
350
|
l1_content: z.ZodOptional<z.ZodString>;
|
|
351
|
+
auto_l1: z.ZodOptional<z.ZodBoolean>;
|
|
337
352
|
l2_context: z.ZodOptional<z.ZodString>;
|
|
338
353
|
l2_trigger: z.ZodOptional<z.ZodString>;
|
|
339
354
|
l2_problems: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodString, string[], string>]>>;
|
|
@@ -357,6 +372,7 @@ export declare const LogEpisodeSchema: z.ZodObject<{
|
|
|
357
372
|
source_tool?: string | undefined;
|
|
358
373
|
id?: string | undefined;
|
|
359
374
|
title?: string | undefined;
|
|
375
|
+
auto_l1?: boolean | undefined;
|
|
360
376
|
l2_context?: string | undefined;
|
|
361
377
|
l2_trigger?: string | undefined;
|
|
362
378
|
l2_problems?: string[] | undefined;
|
|
@@ -374,6 +390,7 @@ export declare const LogEpisodeSchema: z.ZodObject<{
|
|
|
374
390
|
source_tool?: string | undefined;
|
|
375
391
|
id?: string | undefined;
|
|
376
392
|
title?: string | undefined;
|
|
393
|
+
auto_l1?: boolean | undefined;
|
|
377
394
|
l2_context?: string | undefined;
|
|
378
395
|
l2_trigger?: string | undefined;
|
|
379
396
|
l2_problems?: string | string[] | undefined;
|
|
@@ -382,7 +399,6 @@ export declare const LogEpisodeSchema: z.ZodObject<{
|
|
|
382
399
|
l2_outcomes?: string | string[] | undefined;
|
|
383
400
|
l2_principles?: string | string[] | undefined;
|
|
384
401
|
}>;
|
|
385
|
-
export type TheoryStatus = typeof THEORY_STATUSES[number];
|
|
386
402
|
export interface TheoryRow {
|
|
387
403
|
id: string;
|
|
388
404
|
title: string;
|
|
@@ -405,7 +421,9 @@ export interface TheoryRow {
|
|
|
405
421
|
evidence_refs: string;
|
|
406
422
|
promoted_from_store: string | null;
|
|
407
423
|
promoted_from_id: string | null;
|
|
408
|
-
|
|
424
|
+
validity_status: ValidityStatus;
|
|
425
|
+
is_archived: number;
|
|
426
|
+
promoted_to: string | null;
|
|
409
427
|
source_tool: string | null;
|
|
410
428
|
session_id: string | null;
|
|
411
429
|
client_name: string | null;
|
|
@@ -453,6 +471,7 @@ export interface TopicSummary {
|
|
|
453
471
|
activeInsights: number;
|
|
454
472
|
activeModels: number;
|
|
455
473
|
activeMemos: number;
|
|
474
|
+
activeFiles: number;
|
|
456
475
|
};
|
|
457
476
|
}
|
|
458
477
|
export interface GroomingEpisodeRow extends EpisodeRow {
|
|
@@ -510,7 +529,6 @@ export interface GroomingReport {
|
|
|
510
529
|
claims: GroomingClaimRow[];
|
|
511
530
|
conflicts: ConflictCandidate[];
|
|
512
531
|
}
|
|
513
|
-
export type InsightStatus = typeof INSIGHT_STATUSES[number];
|
|
514
532
|
export interface InsightRow {
|
|
515
533
|
id: string;
|
|
516
534
|
title: string;
|
|
@@ -531,7 +549,9 @@ export interface InsightRow {
|
|
|
531
549
|
evidence_refs: string;
|
|
532
550
|
promoted_from_store: string | null;
|
|
533
551
|
promoted_from_id: string | null;
|
|
534
|
-
|
|
552
|
+
validity_status: ValidityStatus;
|
|
553
|
+
is_archived: number;
|
|
554
|
+
promoted_to: string | null;
|
|
535
555
|
source_tool: string | null;
|
|
536
556
|
session_id: string | null;
|
|
537
557
|
client_name: string | null;
|
|
@@ -540,7 +560,6 @@ export interface InsightRow {
|
|
|
540
560
|
updated_at: string;
|
|
541
561
|
store_name?: string;
|
|
542
562
|
}
|
|
543
|
-
export type ModelStatus = typeof MODEL_STATUSES[number];
|
|
544
563
|
export interface ModelRow {
|
|
545
564
|
id: string;
|
|
546
565
|
title: string;
|
|
@@ -563,7 +582,9 @@ export interface ModelRow {
|
|
|
563
582
|
evidence_refs: string;
|
|
564
583
|
promoted_from_store: string | null;
|
|
565
584
|
promoted_from_id: string | null;
|
|
566
|
-
|
|
585
|
+
validity_status: ValidityStatus;
|
|
586
|
+
is_archived: number;
|
|
587
|
+
promoted_to: string | null;
|
|
567
588
|
source_tool: string | null;
|
|
568
589
|
session_id: string | null;
|
|
569
590
|
client_name: string | null;
|
|
@@ -572,7 +593,7 @@ export interface ModelRow {
|
|
|
572
593
|
updated_at: string;
|
|
573
594
|
store_name?: string;
|
|
574
595
|
}
|
|
575
|
-
export type
|
|
596
|
+
export type UserMemoDomainStatus = typeof USER_MEMO_STATUSES[number];
|
|
576
597
|
export type UserMemoUsagePolicy = typeof USER_MEMO_USAGE_POLICIES[number];
|
|
577
598
|
export interface UserMemoRow {
|
|
578
599
|
id: string;
|
|
@@ -583,7 +604,8 @@ export interface UserMemoRow {
|
|
|
583
604
|
scope: string;
|
|
584
605
|
search_summary: string | null;
|
|
585
606
|
user_input: string | null;
|
|
586
|
-
|
|
607
|
+
memo_status: UserMemoDomainStatus;
|
|
608
|
+
is_archived: number;
|
|
587
609
|
l1_embedding: Buffer | null;
|
|
588
610
|
client_name: string | null;
|
|
589
611
|
client_version: string | null;
|
|
@@ -593,7 +615,6 @@ export interface UserMemoRow {
|
|
|
593
615
|
store_name?: string;
|
|
594
616
|
}
|
|
595
617
|
export declare const StoreUserMemoSchema: z.ZodObject<{
|
|
596
|
-
kind: z.ZodDefault<z.ZodEnum<["memo", "plan", "issue", "discussion"]>>;
|
|
597
618
|
title: z.ZodString;
|
|
598
619
|
l1_content: z.ZodString;
|
|
599
620
|
usage_policy: z.ZodOptional<z.ZodEnum<["auto", "on_request", "human_directed"]>>;
|
|
@@ -602,9 +623,147 @@ export declare const StoreUserMemoSchema: z.ZodObject<{
|
|
|
602
623
|
search_summary: z.ZodOptional<z.ZodString>;
|
|
603
624
|
user_input: z.ZodOptional<z.ZodString>;
|
|
604
625
|
source_tool: z.ZodOptional<z.ZodString>;
|
|
626
|
+
}, "strip", z.ZodTypeAny, {
|
|
627
|
+
scope: string;
|
|
628
|
+
tags: string[];
|
|
629
|
+
l1_content: string;
|
|
630
|
+
title: string;
|
|
631
|
+
search_summary?: string | undefined;
|
|
632
|
+
user_input?: string | undefined;
|
|
633
|
+
source_tool?: string | undefined;
|
|
634
|
+
usage_policy?: "auto" | "on_request" | "human_directed" | undefined;
|
|
635
|
+
}, {
|
|
636
|
+
l1_content: string;
|
|
637
|
+
title: string;
|
|
638
|
+
scope?: string | undefined;
|
|
639
|
+
search_summary?: string | undefined;
|
|
640
|
+
user_input?: string | undefined;
|
|
641
|
+
tags?: string | string[] | undefined;
|
|
642
|
+
source_tool?: string | undefined;
|
|
643
|
+
usage_policy?: "auto" | "on_request" | "human_directed" | undefined;
|
|
644
|
+
}>;
|
|
645
|
+
export declare const UpdateUserMemoSchema: z.ZodObject<{
|
|
646
|
+
id: z.ZodString;
|
|
647
|
+
title: z.ZodOptional<z.ZodString>;
|
|
648
|
+
l1_content: z.ZodOptional<z.ZodString>;
|
|
649
|
+
usage_policy: z.ZodOptional<z.ZodEnum<["auto", "on_request", "human_directed"]>>;
|
|
650
|
+
tags: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodString, string[], string>]>>;
|
|
651
|
+
scope: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
652
|
+
search_summary: z.ZodOptional<z.ZodString>;
|
|
653
|
+
memo_status: z.ZodOptional<z.ZodEnum<["active"]>>;
|
|
654
|
+
is_archived: z.ZodOptional<z.ZodBoolean>;
|
|
655
|
+
reason: z.ZodString;
|
|
656
|
+
}, "strip", z.ZodTypeAny, {
|
|
657
|
+
id: string;
|
|
658
|
+
reason: string;
|
|
659
|
+
scope?: string | undefined;
|
|
660
|
+
search_summary?: string | undefined;
|
|
661
|
+
tags?: string[] | undefined;
|
|
662
|
+
is_archived?: boolean | undefined;
|
|
663
|
+
memo_status?: "active" | undefined;
|
|
664
|
+
l1_content?: string | undefined;
|
|
665
|
+
title?: string | undefined;
|
|
666
|
+
usage_policy?: "auto" | "on_request" | "human_directed" | undefined;
|
|
667
|
+
}, {
|
|
668
|
+
id: string;
|
|
669
|
+
reason: string;
|
|
670
|
+
scope?: string | undefined;
|
|
671
|
+
search_summary?: string | undefined;
|
|
672
|
+
tags?: string | string[] | undefined;
|
|
673
|
+
is_archived?: boolean | undefined;
|
|
674
|
+
memo_status?: "active" | undefined;
|
|
675
|
+
l1_content?: string | undefined;
|
|
676
|
+
title?: string | undefined;
|
|
677
|
+
usage_policy?: "auto" | "on_request" | "human_directed" | undefined;
|
|
678
|
+
}>;
|
|
679
|
+
export declare const StoreUserPlanSchema: z.ZodObject<{
|
|
680
|
+
title: z.ZodString;
|
|
681
|
+
l1_content: z.ZodString;
|
|
682
|
+
usage_policy: z.ZodOptional<z.ZodEnum<["auto", "on_request", "human_directed"]>>;
|
|
683
|
+
tags: z.ZodDefault<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodString, string[], string>]>>;
|
|
684
|
+
scope: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
685
|
+
search_summary: z.ZodOptional<z.ZodString>;
|
|
686
|
+
user_input: z.ZodOptional<z.ZodString>;
|
|
687
|
+
source_tool: z.ZodOptional<z.ZodString>;
|
|
688
|
+
}, "strip", z.ZodTypeAny, {
|
|
689
|
+
scope: string;
|
|
690
|
+
tags: string[];
|
|
691
|
+
l1_content: string;
|
|
692
|
+
title: string;
|
|
693
|
+
search_summary?: string | undefined;
|
|
694
|
+
user_input?: string | undefined;
|
|
695
|
+
source_tool?: string | undefined;
|
|
696
|
+
usage_policy?: "auto" | "on_request" | "human_directed" | undefined;
|
|
697
|
+
}, {
|
|
698
|
+
l1_content: string;
|
|
699
|
+
title: string;
|
|
700
|
+
scope?: string | undefined;
|
|
701
|
+
search_summary?: string | undefined;
|
|
702
|
+
user_input?: string | undefined;
|
|
703
|
+
tags?: string | string[] | undefined;
|
|
704
|
+
source_tool?: string | undefined;
|
|
705
|
+
usage_policy?: "auto" | "on_request" | "human_directed" | undefined;
|
|
706
|
+
}>;
|
|
707
|
+
export declare const UpdateUserPlanSchema: z.ZodObject<{
|
|
708
|
+
id: z.ZodString;
|
|
709
|
+
title: z.ZodOptional<z.ZodString>;
|
|
710
|
+
l1_content: z.ZodOptional<z.ZodString>;
|
|
711
|
+
usage_policy: z.ZodOptional<z.ZodEnum<["auto", "on_request", "human_directed"]>>;
|
|
712
|
+
tags: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodString, string[], string>]>>;
|
|
713
|
+
scope: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
714
|
+
search_summary: z.ZodOptional<z.ZodString>;
|
|
715
|
+
plan_status: z.ZodOptional<z.ZodEnum<["active", "completed"]>>;
|
|
716
|
+
is_archived: z.ZodOptional<z.ZodBoolean>;
|
|
717
|
+
reason: z.ZodString;
|
|
718
|
+
}, "strip", z.ZodTypeAny, {
|
|
719
|
+
id: string;
|
|
720
|
+
reason: string;
|
|
721
|
+
scope?: string | undefined;
|
|
722
|
+
search_summary?: string | undefined;
|
|
723
|
+
tags?: string[] | undefined;
|
|
724
|
+
is_archived?: boolean | undefined;
|
|
725
|
+
plan_status?: "active" | "completed" | undefined;
|
|
726
|
+
l1_content?: string | undefined;
|
|
727
|
+
title?: string | undefined;
|
|
728
|
+
usage_policy?: "auto" | "on_request" | "human_directed" | undefined;
|
|
729
|
+
}, {
|
|
730
|
+
id: string;
|
|
731
|
+
reason: string;
|
|
732
|
+
scope?: string | undefined;
|
|
733
|
+
search_summary?: string | undefined;
|
|
734
|
+
tags?: string | string[] | undefined;
|
|
735
|
+
is_archived?: boolean | undefined;
|
|
736
|
+
plan_status?: "active" | "completed" | undefined;
|
|
737
|
+
l1_content?: string | undefined;
|
|
738
|
+
title?: string | undefined;
|
|
739
|
+
usage_policy?: "auto" | "on_request" | "human_directed" | undefined;
|
|
740
|
+
}>;
|
|
741
|
+
export declare const CheckUserPlanSchema: z.ZodObject<{
|
|
742
|
+
id: z.ZodString;
|
|
743
|
+
item: z.ZodOptional<z.ZodString>;
|
|
744
|
+
index: z.ZodOptional<z.ZodNumber>;
|
|
745
|
+
}, "strip", z.ZodTypeAny, {
|
|
746
|
+
id: string;
|
|
747
|
+
item?: string | undefined;
|
|
748
|
+
index?: number | undefined;
|
|
749
|
+
}, {
|
|
750
|
+
id: string;
|
|
751
|
+
item?: string | undefined;
|
|
752
|
+
index?: number | undefined;
|
|
753
|
+
}>;
|
|
754
|
+
export declare const StoreUserIssueSchema: z.ZodObject<{
|
|
755
|
+
title: z.ZodString;
|
|
756
|
+
l1_content: z.ZodString;
|
|
757
|
+
kind: z.ZodDefault<z.ZodEnum<["issue", "discussion"]>>;
|
|
605
758
|
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
|
|
759
|
+
usage_policy: z.ZodOptional<z.ZodEnum<["auto", "on_request", "human_directed"]>>;
|
|
760
|
+
tags: z.ZodDefault<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodString, string[], string>]>>;
|
|
761
|
+
scope: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
762
|
+
search_summary: z.ZodOptional<z.ZodString>;
|
|
763
|
+
user_input: z.ZodOptional<z.ZodString>;
|
|
764
|
+
source_tool: z.ZodOptional<z.ZodString>;
|
|
606
765
|
}, "strip", z.ZodTypeAny, {
|
|
607
|
-
kind: "
|
|
766
|
+
kind: "issue" | "discussion";
|
|
608
767
|
scope: string;
|
|
609
768
|
tags: string[];
|
|
610
769
|
l1_content: string;
|
|
@@ -617,7 +776,7 @@ export declare const StoreUserMemoSchema: z.ZodObject<{
|
|
|
617
776
|
}, {
|
|
618
777
|
l1_content: string;
|
|
619
778
|
title: string;
|
|
620
|
-
kind?: "
|
|
779
|
+
kind?: "issue" | "discussion" | undefined;
|
|
621
780
|
scope?: string | undefined;
|
|
622
781
|
search_summary?: string | undefined;
|
|
623
782
|
user_input?: string | undefined;
|
|
@@ -626,40 +785,26 @@ export declare const StoreUserMemoSchema: z.ZodObject<{
|
|
|
626
785
|
usage_policy?: "auto" | "on_request" | "human_directed" | undefined;
|
|
627
786
|
priority?: "low" | "medium" | "high" | "critical" | undefined;
|
|
628
787
|
}>;
|
|
629
|
-
export declare const
|
|
630
|
-
kind: z.ZodDefault<z.ZodEnum<["memo", "plan", "issue", "discussion"]>>;
|
|
788
|
+
export declare const UpdateUserIssueSchema: z.ZodObject<{
|
|
631
789
|
id: z.ZodString;
|
|
632
790
|
title: z.ZodOptional<z.ZodString>;
|
|
633
791
|
l1_content: z.ZodOptional<z.ZodString>;
|
|
792
|
+
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
|
|
634
793
|
usage_policy: z.ZodOptional<z.ZodEnum<["auto", "on_request", "human_directed"]>>;
|
|
635
794
|
tags: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodString, string[], string>]>>;
|
|
636
795
|
scope: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
637
796
|
search_summary: z.ZodOptional<z.ZodString>;
|
|
638
|
-
|
|
797
|
+
issue_status: z.ZodOptional<z.ZodEnum<["open", "closed"]>>;
|
|
798
|
+
is_archived: z.ZodOptional<z.ZodBoolean>;
|
|
639
799
|
reason: z.ZodString;
|
|
640
|
-
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
|
|
641
|
-
entries: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
642
|
-
author: z.ZodString;
|
|
643
|
-
content: z.ZodString;
|
|
644
|
-
}, "strip", z.ZodTypeAny, {
|
|
645
|
-
author: string;
|
|
646
|
-
content: string;
|
|
647
|
-
}, {
|
|
648
|
-
author: string;
|
|
649
|
-
content: string;
|
|
650
|
-
}>, "many">>;
|
|
651
800
|
}, "strip", z.ZodTypeAny, {
|
|
652
|
-
kind: "memo" | "plan" | "issue" | "discussion";
|
|
653
801
|
id: string;
|
|
654
802
|
reason: string;
|
|
655
803
|
scope?: string | undefined;
|
|
656
804
|
search_summary?: string | undefined;
|
|
657
805
|
tags?: string[] | undefined;
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
content: string;
|
|
661
|
-
}[] | undefined;
|
|
662
|
-
status?: string | undefined;
|
|
806
|
+
is_archived?: boolean | undefined;
|
|
807
|
+
issue_status?: "open" | "closed" | undefined;
|
|
663
808
|
l1_content?: string | undefined;
|
|
664
809
|
title?: string | undefined;
|
|
665
810
|
usage_policy?: "auto" | "on_request" | "human_directed" | undefined;
|
|
@@ -667,21 +812,27 @@ export declare const UpdateUserMemoSchema: z.ZodObject<{
|
|
|
667
812
|
}, {
|
|
668
813
|
id: string;
|
|
669
814
|
reason: string;
|
|
670
|
-
kind?: "memo" | "plan" | "issue" | "discussion" | undefined;
|
|
671
815
|
scope?: string | undefined;
|
|
672
816
|
search_summary?: string | undefined;
|
|
673
817
|
tags?: string | string[] | undefined;
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
content: string;
|
|
677
|
-
}[] | undefined;
|
|
678
|
-
status?: string | undefined;
|
|
818
|
+
is_archived?: boolean | undefined;
|
|
819
|
+
issue_status?: "open" | "closed" | undefined;
|
|
679
820
|
l1_content?: string | undefined;
|
|
680
821
|
title?: string | undefined;
|
|
681
822
|
usage_policy?: "auto" | "on_request" | "human_directed" | undefined;
|
|
682
823
|
priority?: "low" | "medium" | "high" | "critical" | undefined;
|
|
683
824
|
}>;
|
|
684
|
-
export
|
|
825
|
+
export declare const CommentUserIssueSchema: z.ZodObject<{
|
|
826
|
+
id: z.ZodString;
|
|
827
|
+
comment: z.ZodString;
|
|
828
|
+
}, "strip", z.ZodTypeAny, {
|
|
829
|
+
id: string;
|
|
830
|
+
comment: string;
|
|
831
|
+
}, {
|
|
832
|
+
id: string;
|
|
833
|
+
comment: string;
|
|
834
|
+
}>;
|
|
835
|
+
export type UserPlanDomainStatus = typeof USER_PLAN_STATUSES[number];
|
|
685
836
|
export interface UserPlanRow {
|
|
686
837
|
id: string;
|
|
687
838
|
title: string;
|
|
@@ -691,7 +842,8 @@ export interface UserPlanRow {
|
|
|
691
842
|
scope: string;
|
|
692
843
|
search_summary: string | null;
|
|
693
844
|
user_input: string | null;
|
|
694
|
-
|
|
845
|
+
plan_status: UserPlanDomainStatus;
|
|
846
|
+
is_archived: number;
|
|
695
847
|
l1_embedding: Buffer | null;
|
|
696
848
|
client_name: string | null;
|
|
697
849
|
client_version: string | null;
|
|
@@ -700,7 +852,7 @@ export interface UserPlanRow {
|
|
|
700
852
|
updated_at: string;
|
|
701
853
|
store_name?: string;
|
|
702
854
|
}
|
|
703
|
-
export type
|
|
855
|
+
export type UserIssueDomainStatus = typeof USER_ISSUE_STATUSES[number];
|
|
704
856
|
export type UserIssuePriority = typeof USER_ISSUE_PRIORITIES[number];
|
|
705
857
|
export interface UserIssueRow {
|
|
706
858
|
id: string;
|
|
@@ -714,7 +866,124 @@ export interface UserIssueRow {
|
|
|
714
866
|
scope: string;
|
|
715
867
|
search_summary: string | null;
|
|
716
868
|
user_input: string | null;
|
|
717
|
-
|
|
869
|
+
issue_status: UserIssueDomainStatus;
|
|
870
|
+
is_archived: number;
|
|
871
|
+
l1_embedding: Buffer | null;
|
|
872
|
+
client_name: string | null;
|
|
873
|
+
client_version: string | null;
|
|
874
|
+
source_tool: string | null;
|
|
875
|
+
created_at: string;
|
|
876
|
+
updated_at: string;
|
|
877
|
+
store_name?: string;
|
|
878
|
+
}
|
|
879
|
+
export type UserTopicDomainStatus = typeof USER_TOPIC_STATUSES[number];
|
|
880
|
+
export type UserTopicPriority = typeof USER_TOPIC_PRIORITIES[number];
|
|
881
|
+
export interface UserTopicRow {
|
|
882
|
+
id: string;
|
|
883
|
+
title: string;
|
|
884
|
+
summary: string;
|
|
885
|
+
device_id: string | null;
|
|
886
|
+
cwd: string | null;
|
|
887
|
+
conversation_id: string | null;
|
|
888
|
+
priority: UserTopicPriority;
|
|
889
|
+
tags: string;
|
|
890
|
+
scope: string;
|
|
891
|
+
search_summary: string | null;
|
|
892
|
+
user_input: string | null;
|
|
893
|
+
topic_status: UserTopicDomainStatus;
|
|
894
|
+
is_archived: number;
|
|
895
|
+
l1_embedding: Buffer | null;
|
|
896
|
+
client_name: string | null;
|
|
897
|
+
client_version: string | null;
|
|
898
|
+
source_tool: string | null;
|
|
899
|
+
created_at: string;
|
|
900
|
+
updated_at: string;
|
|
901
|
+
store_name?: string;
|
|
902
|
+
}
|
|
903
|
+
export declare const StoreUserTopicSchema: z.ZodObject<{
|
|
904
|
+
title: z.ZodString;
|
|
905
|
+
summary: z.ZodString;
|
|
906
|
+
conversation_id: z.ZodString;
|
|
907
|
+
cwd: z.ZodString;
|
|
908
|
+
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
|
|
909
|
+
tags: z.ZodDefault<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodString, string[], string>]>>;
|
|
910
|
+
scope: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
911
|
+
search_summary: z.ZodOptional<z.ZodString>;
|
|
912
|
+
}, "strip", z.ZodTypeAny, {
|
|
913
|
+
scope: string;
|
|
914
|
+
tags: string[];
|
|
915
|
+
title: string;
|
|
916
|
+
summary: string;
|
|
917
|
+
conversation_id: string;
|
|
918
|
+
cwd: string;
|
|
919
|
+
search_summary?: string | undefined;
|
|
920
|
+
priority?: "low" | "medium" | "high" | "critical" | undefined;
|
|
921
|
+
}, {
|
|
922
|
+
title: string;
|
|
923
|
+
summary: string;
|
|
924
|
+
conversation_id: string;
|
|
925
|
+
cwd: string;
|
|
926
|
+
scope?: string | undefined;
|
|
927
|
+
search_summary?: string | undefined;
|
|
928
|
+
tags?: string | string[] | undefined;
|
|
929
|
+
priority?: "low" | "medium" | "high" | "critical" | undefined;
|
|
930
|
+
}>;
|
|
931
|
+
export declare const UpdateUserTopicSchema: z.ZodObject<{
|
|
932
|
+
id: z.ZodString;
|
|
933
|
+
title: z.ZodOptional<z.ZodString>;
|
|
934
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
935
|
+
conversation_id: z.ZodOptional<z.ZodString>;
|
|
936
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
937
|
+
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
|
|
938
|
+
tags: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodString, string[], string>]>>;
|
|
939
|
+
scope: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
940
|
+
search_summary: z.ZodOptional<z.ZodString>;
|
|
941
|
+
topic_status: z.ZodOptional<z.ZodEnum<["active", "closed"]>>;
|
|
942
|
+
is_archived: z.ZodOptional<z.ZodBoolean>;
|
|
943
|
+
reason: z.ZodString;
|
|
944
|
+
}, "strip", z.ZodTypeAny, {
|
|
945
|
+
id: string;
|
|
946
|
+
reason: string;
|
|
947
|
+
scope?: string | undefined;
|
|
948
|
+
search_summary?: string | undefined;
|
|
949
|
+
tags?: string[] | undefined;
|
|
950
|
+
is_archived?: boolean | undefined;
|
|
951
|
+
topic_status?: "active" | "closed" | undefined;
|
|
952
|
+
title?: string | undefined;
|
|
953
|
+
priority?: "low" | "medium" | "high" | "critical" | undefined;
|
|
954
|
+
summary?: string | undefined;
|
|
955
|
+
conversation_id?: string | undefined;
|
|
956
|
+
cwd?: string | undefined;
|
|
957
|
+
}, {
|
|
958
|
+
id: string;
|
|
959
|
+
reason: string;
|
|
960
|
+
scope?: string | undefined;
|
|
961
|
+
search_summary?: string | undefined;
|
|
962
|
+
tags?: string | string[] | undefined;
|
|
963
|
+
is_archived?: boolean | undefined;
|
|
964
|
+
topic_status?: "active" | "closed" | undefined;
|
|
965
|
+
title?: string | undefined;
|
|
966
|
+
priority?: "low" | "medium" | "high" | "critical" | undefined;
|
|
967
|
+
summary?: string | undefined;
|
|
968
|
+
conversation_id?: string | undefined;
|
|
969
|
+
cwd?: string | undefined;
|
|
970
|
+
}>;
|
|
971
|
+
export type UserFileDomainStatus = typeof USER_FILE_STATUSES[number];
|
|
972
|
+
export interface UserFileRow {
|
|
973
|
+
id: string;
|
|
974
|
+
title: string;
|
|
975
|
+
description: string | null;
|
|
976
|
+
device_id: string | null;
|
|
977
|
+
original_filename: string;
|
|
978
|
+
original_encoding: string;
|
|
979
|
+
file_data: string;
|
|
980
|
+
file_hash: string;
|
|
981
|
+
file_size: number;
|
|
982
|
+
tags: string;
|
|
983
|
+
scope: string;
|
|
984
|
+
search_summary: string | null;
|
|
985
|
+
file_status: UserFileDomainStatus;
|
|
986
|
+
is_archived: number;
|
|
718
987
|
l1_embedding: Buffer | null;
|
|
719
988
|
client_name: string | null;
|
|
720
989
|
client_version: string | null;
|
|
@@ -723,7 +992,102 @@ export interface UserIssueRow {
|
|
|
723
992
|
updated_at: string;
|
|
724
993
|
store_name?: string;
|
|
725
994
|
}
|
|
726
|
-
export declare const
|
|
995
|
+
export declare const StoreUserFileSchema: z.ZodObject<{
|
|
996
|
+
source_path: z.ZodString;
|
|
997
|
+
title: z.ZodString;
|
|
998
|
+
description: z.ZodOptional<z.ZodString>;
|
|
999
|
+
original_encoding: z.ZodDefault<z.ZodString>;
|
|
1000
|
+
tags: z.ZodDefault<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodString, string[], string>]>>;
|
|
1001
|
+
scope: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
1002
|
+
search_summary: z.ZodOptional<z.ZodString>;
|
|
1003
|
+
}, "strip", z.ZodTypeAny, {
|
|
1004
|
+
scope: string;
|
|
1005
|
+
tags: string[];
|
|
1006
|
+
title: string;
|
|
1007
|
+
source_path: string;
|
|
1008
|
+
original_encoding: string;
|
|
1009
|
+
search_summary?: string | undefined;
|
|
1010
|
+
description?: string | undefined;
|
|
1011
|
+
}, {
|
|
1012
|
+
title: string;
|
|
1013
|
+
source_path: string;
|
|
1014
|
+
scope?: string | undefined;
|
|
1015
|
+
search_summary?: string | undefined;
|
|
1016
|
+
tags?: string | string[] | undefined;
|
|
1017
|
+
description?: string | undefined;
|
|
1018
|
+
original_encoding?: string | undefined;
|
|
1019
|
+
}>;
|
|
1020
|
+
export declare const RestoreUserFileSchema: z.ZodObject<{
|
|
1021
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1022
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1023
|
+
dest_path: z.ZodString;
|
|
1024
|
+
overwrite: z.ZodDefault<z.ZodBoolean>;
|
|
1025
|
+
dry_run: z.ZodDefault<z.ZodBoolean>;
|
|
1026
|
+
}, "strip", z.ZodTypeAny, {
|
|
1027
|
+
dest_path: string;
|
|
1028
|
+
overwrite: boolean;
|
|
1029
|
+
dry_run: boolean;
|
|
1030
|
+
id?: string | undefined;
|
|
1031
|
+
title?: string | undefined;
|
|
1032
|
+
}, {
|
|
1033
|
+
dest_path: string;
|
|
1034
|
+
id?: string | undefined;
|
|
1035
|
+
title?: string | undefined;
|
|
1036
|
+
overwrite?: boolean | undefined;
|
|
1037
|
+
dry_run?: boolean | undefined;
|
|
1038
|
+
}>;
|
|
1039
|
+
export declare const UpdateUserFileSchema: z.ZodObject<{
|
|
1040
|
+
id: z.ZodString;
|
|
1041
|
+
source_path: z.ZodOptional<z.ZodString>;
|
|
1042
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1043
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1044
|
+
tags: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodString, string[], string>]>>;
|
|
1045
|
+
scope: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
1046
|
+
search_summary: z.ZodOptional<z.ZodString>;
|
|
1047
|
+
file_status: z.ZodOptional<z.ZodEnum<["active"]>>;
|
|
1048
|
+
is_archived: z.ZodOptional<z.ZodBoolean>;
|
|
1049
|
+
reason: z.ZodString;
|
|
1050
|
+
}, "strip", z.ZodTypeAny, {
|
|
1051
|
+
id: string;
|
|
1052
|
+
reason: string;
|
|
1053
|
+
scope?: string | undefined;
|
|
1054
|
+
search_summary?: string | undefined;
|
|
1055
|
+
tags?: string[] | undefined;
|
|
1056
|
+
is_archived?: boolean | undefined;
|
|
1057
|
+
file_status?: "active" | undefined;
|
|
1058
|
+
title?: string | undefined;
|
|
1059
|
+
description?: string | undefined;
|
|
1060
|
+
source_path?: string | undefined;
|
|
1061
|
+
}, {
|
|
1062
|
+
id: string;
|
|
1063
|
+
reason: string;
|
|
1064
|
+
scope?: string | undefined;
|
|
1065
|
+
search_summary?: string | undefined;
|
|
1066
|
+
tags?: string | string[] | undefined;
|
|
1067
|
+
is_archived?: boolean | undefined;
|
|
1068
|
+
file_status?: "active" | undefined;
|
|
1069
|
+
title?: string | undefined;
|
|
1070
|
+
description?: string | undefined;
|
|
1071
|
+
source_path?: string | undefined;
|
|
1072
|
+
}>;
|
|
1073
|
+
export declare const ListUserFilesSchema: z.ZodObject<{
|
|
1074
|
+
scope: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
1075
|
+
tags: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodString, string[], string>]>>;
|
|
1076
|
+
file_status: z.ZodDefault<z.ZodEnum<["active"]>>;
|
|
1077
|
+
is_archived: z.ZodDefault<z.ZodBoolean>;
|
|
1078
|
+
}, "strip", z.ZodTypeAny, {
|
|
1079
|
+
is_archived: boolean;
|
|
1080
|
+
file_status: "active";
|
|
1081
|
+
scope?: string | undefined;
|
|
1082
|
+
tags?: string[] | undefined;
|
|
1083
|
+
}, {
|
|
1084
|
+
scope?: string | undefined;
|
|
1085
|
+
tags?: string | string[] | undefined;
|
|
1086
|
+
is_archived?: boolean | undefined;
|
|
1087
|
+
file_status?: "active" | undefined;
|
|
1088
|
+
}>;
|
|
1089
|
+
export declare const UNIFIED_ENTITY_TYPE_VALUES: readonly ["claim", "episode", "decision", "theory", "insight", "model", "user_memo", "user_plan", "user_issue", "user_topic", "user_file"];
|
|
1090
|
+
export declare const DEFAULT_SEARCH_ENTITY_TYPES: readonly UnifiedEntityType[];
|
|
727
1091
|
export type UnifiedEntityType = typeof UNIFIED_ENTITY_TYPE_VALUES[number];
|
|
728
1092
|
export interface UnifiedSearchRow {
|
|
729
1093
|
entity_type: UnifiedEntityType;
|
|
@@ -743,11 +1107,12 @@ export interface UnifiedSearchRow {
|
|
|
743
1107
|
export declare const UnifiedSearchSchema: z.ZodObject<{
|
|
744
1108
|
query: z.ZodOptional<z.ZodString>;
|
|
745
1109
|
scope: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
746
|
-
entity_types: z.ZodOptional<z.ZodArray<z.ZodEnum<["claim", "episode", "decision", "theory", "insight", "model", "user_memo", "user_plan", "user_issue"]>, "many">>;
|
|
1110
|
+
entity_types: z.ZodOptional<z.ZodArray<z.ZodEnum<["claim", "episode", "decision", "theory", "insight", "model", "user_memo", "user_plan", "user_issue", "user_topic", "user_file"]>, "many">>;
|
|
747
1111
|
status: z.ZodOptional<z.ZodString>;
|
|
748
1112
|
tag: z.ZodOptional<z.ZodString>;
|
|
749
1113
|
category: z.ZodOptional<z.ZodEnum<["preference", "identity", "skill", "value", "workflow", "knowledge", "custom"]>>;
|
|
750
1114
|
usage_policy: z.ZodOptional<z.ZodEnum<["auto", "on_request", "human_directed"]>>;
|
|
1115
|
+
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
|
|
751
1116
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
752
1117
|
}, "strip", z.ZodTypeAny, {
|
|
753
1118
|
limit: number;
|
|
@@ -755,31 +1120,33 @@ export declare const UnifiedSearchSchema: z.ZodObject<{
|
|
|
755
1120
|
status?: string | undefined;
|
|
756
1121
|
category?: "preference" | "identity" | "skill" | "value" | "workflow" | "knowledge" | "custom" | undefined;
|
|
757
1122
|
usage_policy?: "auto" | "on_request" | "human_directed" | undefined;
|
|
1123
|
+
priority?: "low" | "medium" | "high" | "critical" | undefined;
|
|
758
1124
|
query?: string | undefined;
|
|
759
|
-
entity_types?: ("
|
|
1125
|
+
entity_types?: ("theory" | "insight" | "model" | "claim" | "episode" | "decision" | "user_memo" | "user_plan" | "user_issue" | "user_topic" | "user_file")[] | undefined;
|
|
760
1126
|
tag?: string | undefined;
|
|
761
1127
|
}, {
|
|
762
1128
|
scope?: string | undefined;
|
|
763
1129
|
status?: string | undefined;
|
|
764
1130
|
category?: "preference" | "identity" | "skill" | "value" | "workflow" | "knowledge" | "custom" | undefined;
|
|
765
1131
|
usage_policy?: "auto" | "on_request" | "human_directed" | undefined;
|
|
1132
|
+
priority?: "low" | "medium" | "high" | "critical" | undefined;
|
|
766
1133
|
query?: string | undefined;
|
|
767
|
-
entity_types?: ("
|
|
1134
|
+
entity_types?: ("theory" | "insight" | "model" | "claim" | "episode" | "decision" | "user_memo" | "user_plan" | "user_issue" | "user_topic" | "user_file")[] | undefined;
|
|
768
1135
|
tag?: string | undefined;
|
|
769
1136
|
limit?: number | undefined;
|
|
770
1137
|
}>;
|
|
771
1138
|
export declare const GetEntitySchema: z.ZodObject<{
|
|
772
|
-
entity_type: z.ZodOptional<z.ZodEnum<["claim", "episode", "decision", "theory", "insight", "model", "user_memo", "user_plan", "user_issue", "profile"]>>;
|
|
1139
|
+
entity_type: z.ZodOptional<z.ZodEnum<["claim", "episode", "decision", "theory", "insight", "model", "user_memo", "user_plan", "user_issue", "user_topic", "profile"]>>;
|
|
773
1140
|
id: z.ZodOptional<z.ZodString>;
|
|
774
1141
|
scope: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
775
1142
|
}, "strip", z.ZodTypeAny, {
|
|
776
1143
|
scope?: string | undefined;
|
|
777
1144
|
id?: string | undefined;
|
|
778
|
-
entity_type?: "
|
|
1145
|
+
entity_type?: "theory" | "insight" | "model" | "claim" | "episode" | "decision" | "user_memo" | "user_plan" | "user_issue" | "user_topic" | "profile" | undefined;
|
|
779
1146
|
}, {
|
|
780
1147
|
scope?: string | undefined;
|
|
781
1148
|
id?: string | undefined;
|
|
782
|
-
entity_type?: "
|
|
1149
|
+
entity_type?: "theory" | "insight" | "model" | "claim" | "episode" | "decision" | "user_memo" | "user_plan" | "user_issue" | "user_topic" | "profile" | undefined;
|
|
783
1150
|
}>;
|
|
784
1151
|
export declare const StoreKnowledgeSchema: z.ZodObject<{
|
|
785
1152
|
kind: z.ZodEnum<["theory", "insight", "model"]>;
|
|
@@ -842,6 +1209,76 @@ export declare const StoreKnowledgeSchema: z.ZodObject<{
|
|
|
842
1209
|
supporting_episode_ids?: string | string[] | undefined;
|
|
843
1210
|
supporting_claim_ids?: string | string[] | undefined;
|
|
844
1211
|
}>;
|
|
1212
|
+
export declare const UpdateKnowledgeSchema: z.ZodObject<{
|
|
1213
|
+
id: z.ZodString;
|
|
1214
|
+
kind: z.ZodEnum<["theory", "insight", "model"]>;
|
|
1215
|
+
reason: z.ZodString;
|
|
1216
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1217
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1218
|
+
l1_content: z.ZodOptional<z.ZodString>;
|
|
1219
|
+
l2_core_thesis: z.ZodOptional<z.ZodString>;
|
|
1220
|
+
l2_principles: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodString, string[], string>]>>;
|
|
1221
|
+
l2_trigger_conditions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodString, string[], string>]>>;
|
|
1222
|
+
l2_resolution_steps: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodString, string[], string>]>>;
|
|
1223
|
+
l2_applicable_context: z.ZodOptional<z.ZodString>;
|
|
1224
|
+
non_goals: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodString, string[], string>]>>;
|
|
1225
|
+
open_questions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodString, string[], string>]>>;
|
|
1226
|
+
supporting_episode_ids: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodString, string[], string>]>>;
|
|
1227
|
+
supporting_claim_ids: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodString, string[], string>]>>;
|
|
1228
|
+
evidence_refs: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodString, string[], string>]>>;
|
|
1229
|
+
tags: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodString, string[], string>]>>;
|
|
1230
|
+
scope: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
1231
|
+
confidence: z.ZodOptional<z.ZodNumber>;
|
|
1232
|
+
search_summary: z.ZodOptional<z.ZodString>;
|
|
1233
|
+
validity_status: z.ZodOptional<z.ZodEnum<["active", "invalidated", "superseded"]>>;
|
|
1234
|
+
source_tool: z.ZodOptional<z.ZodString>;
|
|
1235
|
+
}, "strip", z.ZodTypeAny, {
|
|
1236
|
+
kind: "theory" | "insight" | "model";
|
|
1237
|
+
id: string;
|
|
1238
|
+
reason: string;
|
|
1239
|
+
scope?: string | undefined;
|
|
1240
|
+
search_summary?: string | undefined;
|
|
1241
|
+
evidence_refs?: string[] | undefined;
|
|
1242
|
+
tags?: string[] | undefined;
|
|
1243
|
+
validity_status?: "active" | "invalidated" | "superseded" | undefined;
|
|
1244
|
+
confidence?: number | undefined;
|
|
1245
|
+
l1_content?: string | undefined;
|
|
1246
|
+
source_tool?: string | undefined;
|
|
1247
|
+
title?: string | undefined;
|
|
1248
|
+
description?: string | undefined;
|
|
1249
|
+
l2_principles?: string[] | undefined;
|
|
1250
|
+
l2_core_thesis?: string | undefined;
|
|
1251
|
+
l2_trigger_conditions?: string[] | undefined;
|
|
1252
|
+
l2_resolution_steps?: string[] | undefined;
|
|
1253
|
+
l2_applicable_context?: string | undefined;
|
|
1254
|
+
non_goals?: string[] | undefined;
|
|
1255
|
+
open_questions?: string[] | undefined;
|
|
1256
|
+
supporting_episode_ids?: string[] | undefined;
|
|
1257
|
+
supporting_claim_ids?: string[] | undefined;
|
|
1258
|
+
}, {
|
|
1259
|
+
kind: "theory" | "insight" | "model";
|
|
1260
|
+
id: string;
|
|
1261
|
+
reason: string;
|
|
1262
|
+
scope?: string | undefined;
|
|
1263
|
+
search_summary?: string | undefined;
|
|
1264
|
+
evidence_refs?: string | string[] | undefined;
|
|
1265
|
+
tags?: string | string[] | undefined;
|
|
1266
|
+
validity_status?: "active" | "invalidated" | "superseded" | undefined;
|
|
1267
|
+
confidence?: number | undefined;
|
|
1268
|
+
l1_content?: string | undefined;
|
|
1269
|
+
source_tool?: string | undefined;
|
|
1270
|
+
title?: string | undefined;
|
|
1271
|
+
description?: string | undefined;
|
|
1272
|
+
l2_principles?: string | string[] | undefined;
|
|
1273
|
+
l2_core_thesis?: string | undefined;
|
|
1274
|
+
l2_trigger_conditions?: string | string[] | undefined;
|
|
1275
|
+
l2_resolution_steps?: string | string[] | undefined;
|
|
1276
|
+
l2_applicable_context?: string | undefined;
|
|
1277
|
+
non_goals?: string | string[] | undefined;
|
|
1278
|
+
open_questions?: string | string[] | undefined;
|
|
1279
|
+
supporting_episode_ids?: string | string[] | undefined;
|
|
1280
|
+
supporting_claim_ids?: string | string[] | undefined;
|
|
1281
|
+
}>;
|
|
845
1282
|
export declare const MaintainSchema: z.ZodObject<{
|
|
846
1283
|
action: z.ZodEnum<["stats", "archive_logs", "backfill_embeddings", "groom_claims", "groom_episodes", "mark_groomed", "review_stale", "check_retraction_impact", "archive_episodes", "archive_decisions", "backup", "export_json", "promote", "list_stores", "switch_context", "sync_status", "update_search_summary", "delete"]>;
|
|
847
1284
|
vacuum: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -849,7 +1286,7 @@ export declare const MaintainSchema: z.ZodObject<{
|
|
|
849
1286
|
older_than_days: z.ZodDefault<z.ZodNumber>;
|
|
850
1287
|
tables: z.ZodDefault<z.ZodArray<z.ZodEnum<["audit_log", "claim_history"]>, "many">>;
|
|
851
1288
|
dry_run: z.ZodDefault<z.ZodBoolean>;
|
|
852
|
-
entity_type: z.ZodOptional<z.ZodEnum<["claim", "decision", "episode", "theory", "insight", "model", "user_memo", "user_plan", "user_issue"]>>;
|
|
1289
|
+
entity_type: z.ZodOptional<z.ZodEnum<["claim", "decision", "episode", "theory", "insight", "model", "user_memo", "user_plan", "user_issue", "user_topic"]>>;
|
|
853
1290
|
batch_size: z.ZodDefault<z.ZodNumber>;
|
|
854
1291
|
scope: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
855
1292
|
category: z.ZodOptional<z.ZodEnum<["preference", "identity", "skill", "value", "workflow", "knowledge", "custom"]>>;
|
|
@@ -872,17 +1309,17 @@ export declare const MaintainSchema: z.ZodObject<{
|
|
|
872
1309
|
search_summary_entity_id: z.ZodOptional<z.ZodString>;
|
|
873
1310
|
search_summary: z.ZodOptional<z.ZodString>;
|
|
874
1311
|
delete_entity_id: z.ZodOptional<z.ZodString>;
|
|
875
|
-
delete_entity_type: z.ZodOptional<z.ZodEnum<["claim", "decision", "episode", "theory", "insight", "model", "user_memo", "user_plan", "user_issue"]>>;
|
|
1312
|
+
delete_entity_type: z.ZodOptional<z.ZodEnum<["claim", "decision", "episode", "theory", "insight", "model", "user_memo", "user_plan", "user_issue", "user_topic"]>>;
|
|
876
1313
|
delete_reason: z.ZodOptional<z.ZodString>;
|
|
877
1314
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
878
1315
|
}, "strip", z.ZodTypeAny, {
|
|
1316
|
+
dry_run: boolean;
|
|
879
1317
|
limit: number;
|
|
880
1318
|
action: "promote" | "stats" | "archive_logs" | "backfill_embeddings" | "groom_claims" | "groom_episodes" | "mark_groomed" | "review_stale" | "check_retraction_impact" | "archive_episodes" | "archive_decisions" | "backup" | "export_json" | "list_stores" | "switch_context" | "sync_status" | "update_search_summary" | "delete";
|
|
881
1319
|
vacuum: boolean;
|
|
882
1320
|
optimize: boolean;
|
|
883
1321
|
older_than_days: number;
|
|
884
1322
|
tables: ("audit_log" | "claim_history")[];
|
|
885
|
-
dry_run: boolean;
|
|
886
1323
|
batch_size: number;
|
|
887
1324
|
include_groomed: boolean;
|
|
888
1325
|
max_depth: number;
|
|
@@ -893,11 +1330,11 @@ export declare const MaintainSchema: z.ZodObject<{
|
|
|
893
1330
|
category?: "preference" | "identity" | "skill" | "value" | "workflow" | "knowledge" | "custom" | undefined;
|
|
894
1331
|
claim_id?: string | undefined;
|
|
895
1332
|
tag?: string | undefined;
|
|
896
|
-
entity_type?: "
|
|
1333
|
+
entity_type?: "theory" | "insight" | "model" | "claim" | "episode" | "decision" | "user_memo" | "user_plan" | "user_issue" | "user_topic" | undefined;
|
|
897
1334
|
episode_ids?: string[] | undefined;
|
|
898
1335
|
archive_entity_ids?: string[] | undefined;
|
|
899
1336
|
archive_keep_latest?: number | undefined;
|
|
900
|
-
promote_entity_type?: "
|
|
1337
|
+
promote_entity_type?: "theory" | "insight" | "model" | "claim" | "episode" | "decision" | undefined;
|
|
901
1338
|
promote_entity_id?: string | undefined;
|
|
902
1339
|
source_store?: string | undefined;
|
|
903
1340
|
target_store?: string | undefined;
|
|
@@ -906,7 +1343,7 @@ export declare const MaintainSchema: z.ZodObject<{
|
|
|
906
1343
|
store_name?: string | undefined;
|
|
907
1344
|
search_summary_entity_id?: string | undefined;
|
|
908
1345
|
delete_entity_id?: string | undefined;
|
|
909
|
-
delete_entity_type?: "
|
|
1346
|
+
delete_entity_type?: "theory" | "insight" | "model" | "claim" | "episode" | "decision" | "user_memo" | "user_plan" | "user_issue" | "user_topic" | undefined;
|
|
910
1347
|
delete_reason?: string | undefined;
|
|
911
1348
|
}, {
|
|
912
1349
|
action: "promote" | "stats" | "archive_logs" | "backfill_embeddings" | "groom_claims" | "groom_episodes" | "mark_groomed" | "review_stale" | "check_retraction_impact" | "archive_episodes" | "archive_decisions" | "backup" | "export_json" | "list_stores" | "switch_context" | "sync_status" | "update_search_summary" | "delete";
|
|
@@ -915,14 +1352,14 @@ export declare const MaintainSchema: z.ZodObject<{
|
|
|
915
1352
|
destination?: string | undefined;
|
|
916
1353
|
category?: "preference" | "identity" | "skill" | "value" | "workflow" | "knowledge" | "custom" | undefined;
|
|
917
1354
|
claim_id?: string | undefined;
|
|
1355
|
+
dry_run?: boolean | undefined;
|
|
918
1356
|
tag?: string | undefined;
|
|
919
1357
|
limit?: number | undefined;
|
|
920
|
-
entity_type?: "
|
|
1358
|
+
entity_type?: "theory" | "insight" | "model" | "claim" | "episode" | "decision" | "user_memo" | "user_plan" | "user_issue" | "user_topic" | undefined;
|
|
921
1359
|
vacuum?: boolean | undefined;
|
|
922
1360
|
optimize?: boolean | undefined;
|
|
923
1361
|
older_than_days?: number | undefined;
|
|
924
1362
|
tables?: ("audit_log" | "claim_history")[] | undefined;
|
|
925
|
-
dry_run?: boolean | undefined;
|
|
926
1363
|
batch_size?: number | undefined;
|
|
927
1364
|
include_groomed?: boolean | undefined;
|
|
928
1365
|
episode_ids?: string[] | undefined;
|
|
@@ -930,7 +1367,7 @@ export declare const MaintainSchema: z.ZodObject<{
|
|
|
930
1367
|
archive_keep_latest?: number | undefined;
|
|
931
1368
|
max_depth?: number | undefined;
|
|
932
1369
|
include_retracted?: boolean | undefined;
|
|
933
|
-
promote_entity_type?: "
|
|
1370
|
+
promote_entity_type?: "theory" | "insight" | "model" | "claim" | "episode" | "decision" | undefined;
|
|
934
1371
|
promote_entity_id?: string | undefined;
|
|
935
1372
|
source_store?: string | undefined;
|
|
936
1373
|
target_store?: string | undefined;
|
|
@@ -939,7 +1376,7 @@ export declare const MaintainSchema: z.ZodObject<{
|
|
|
939
1376
|
store_name?: string | undefined;
|
|
940
1377
|
search_summary_entity_id?: string | undefined;
|
|
941
1378
|
delete_entity_id?: string | undefined;
|
|
942
|
-
delete_entity_type?: "
|
|
1379
|
+
delete_entity_type?: "theory" | "insight" | "model" | "claim" | "episode" | "decision" | "user_memo" | "user_plan" | "user_issue" | "user_topic" | undefined;
|
|
943
1380
|
delete_reason?: string | undefined;
|
|
944
1381
|
}>;
|
|
945
1382
|
export declare const ManageClaimSchema: z.ZodObject<{
|
|
@@ -975,7 +1412,7 @@ export declare const ManageClaimSchema: z.ZodObject<{
|
|
|
975
1412
|
old_claim_id?: string | undefined;
|
|
976
1413
|
new_claim_id?: string | undefined;
|
|
977
1414
|
decision_id?: string | undefined;
|
|
978
|
-
decision_status?: "
|
|
1415
|
+
decision_status?: "obsolete" | "reversed" | "archived" | undefined;
|
|
979
1416
|
}, {
|
|
980
1417
|
action: "link" | "supersede" | "log_check" | "manage_decision";
|
|
981
1418
|
confidence?: number | undefined;
|
|
@@ -992,7 +1429,7 @@ export declare const ManageClaimSchema: z.ZodObject<{
|
|
|
992
1429
|
old_claim_id?: string | undefined;
|
|
993
1430
|
new_claim_id?: string | undefined;
|
|
994
1431
|
decision_id?: string | undefined;
|
|
995
|
-
decision_status?: "
|
|
1432
|
+
decision_status?: "obsolete" | "reversed" | "archived" | undefined;
|
|
996
1433
|
}>;
|
|
997
1434
|
export interface EscalationCandidate {
|
|
998
1435
|
id: string;
|