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
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* 後方互換ラッパーは queries.ts を参照。
|
|
5
5
|
*/
|
|
6
6
|
import type Database from "better-sqlite3";
|
|
7
|
-
import type { ClaimRow, ClaimHistoryRow, ClaimRelationRow, ClaimEvidenceRow, ClaimCheckRow, DecisionRow, AuditLogRow, EpisodeRow, TheoryRow, InsightRow, ModelRow, TopicSummary, StaleClaimRow, GroomingEpisodeRow } from "../types.js";
|
|
7
|
+
import type { ClaimRow, ClaimHistoryRow, ClaimRelationRow, ClaimEvidenceRow, ClaimCheckRow, DecisionRow, AuditLogRow, EpisodeRow, TheoryRow, InsightRow, ModelRow, TopicSummary, StaleClaimRow, GroomingEpisodeRow, UserFileRow } from "../types.js";
|
|
8
8
|
import type { ProvenanceData } from "../provenance.js";
|
|
9
9
|
/**
|
|
10
10
|
* FTS5クエリのサニタイズ
|
|
@@ -26,9 +26,10 @@ export declare function insertClaim(db: Database.Database, params: {
|
|
|
26
26
|
search_summary?: string;
|
|
27
27
|
l1_embedding?: Buffer | null;
|
|
28
28
|
source_tool?: string;
|
|
29
|
-
|
|
29
|
+
session_id?: string;
|
|
30
30
|
client_name?: string | null;
|
|
31
31
|
client_version?: string | null;
|
|
32
|
+
user_input?: string;
|
|
32
33
|
}): ClaimRow;
|
|
33
34
|
export declare function getClaimById(db: Database.Database, id: string): ClaimRow | undefined;
|
|
34
35
|
export declare function updateClaim(db: Database.Database, id: string, updates: Record<string, unknown>, reason: string): ClaimRow | undefined;
|
|
@@ -67,6 +68,7 @@ export declare function insertDecision(db: Database.Database, params: {
|
|
|
67
68
|
user_input?: string;
|
|
68
69
|
l1_embedding?: Buffer | null;
|
|
69
70
|
source_tool?: string;
|
|
71
|
+
session_id?: string | null;
|
|
70
72
|
client_name?: string | null;
|
|
71
73
|
client_version?: string | null;
|
|
72
74
|
}): DecisionRow;
|
|
@@ -376,6 +378,27 @@ export declare function listModels(db: Database.Database, params: {
|
|
|
376
378
|
}): ModelRow[];
|
|
377
379
|
/** Model の l1_embedding を更新 */
|
|
378
380
|
export declare function updateModelL1Embedding(db: Database.Database, id: string, l1_embedding: Buffer): void;
|
|
381
|
+
/** Theory/Insight/Model の共通フィールドを更新 (Issue #3 user_issue) */
|
|
382
|
+
export declare function updateKnowledge(db: Database.Database, kind: "theory" | "insight" | "model", id: string, updates: {
|
|
383
|
+
title?: string;
|
|
384
|
+
description?: string;
|
|
385
|
+
l1_content?: string;
|
|
386
|
+
l2_core_thesis?: string;
|
|
387
|
+
l2_principles?: string[];
|
|
388
|
+
l2_trigger_conditions?: string[];
|
|
389
|
+
l2_resolution_steps?: string[];
|
|
390
|
+
l2_applicable_context?: string;
|
|
391
|
+
non_goals?: string[];
|
|
392
|
+
open_questions?: string[];
|
|
393
|
+
supporting_episode_ids?: string[];
|
|
394
|
+
supporting_claim_ids?: string[];
|
|
395
|
+
evidence_refs?: string[];
|
|
396
|
+
tags?: string[];
|
|
397
|
+
scope?: string;
|
|
398
|
+
confidence?: number;
|
|
399
|
+
search_summary?: string;
|
|
400
|
+
validity_status?: string;
|
|
401
|
+
}): TheoryRow | InsightRow | ModelRow | undefined;
|
|
379
402
|
/** l1_embedding が NULL の active Model を取得(バックフィル用) */
|
|
380
403
|
export declare function getModelsWithoutL1Embedding(db: Database.Database, limit: number): ModelRow[];
|
|
381
404
|
export declare function getModelsWithL1Embedding(db: Database.Database, scope?: string, limit?: number): ModelRow[];
|
|
@@ -401,7 +424,8 @@ export declare function updateUserMemo(db: Database.Database, id: string, update
|
|
|
401
424
|
tags?: string[];
|
|
402
425
|
scope?: string;
|
|
403
426
|
search_summary?: string;
|
|
404
|
-
|
|
427
|
+
memo_status?: string;
|
|
428
|
+
is_archived?: number;
|
|
405
429
|
}): UserMemoRow | undefined;
|
|
406
430
|
export declare function listUserMemos(db: Database.Database, params: {
|
|
407
431
|
query?: string;
|
|
@@ -437,7 +461,8 @@ export declare function updateUserPlan(db: Database.Database, id: string, update
|
|
|
437
461
|
tags?: string[];
|
|
438
462
|
scope?: string;
|
|
439
463
|
search_summary?: string;
|
|
440
|
-
|
|
464
|
+
plan_status?: string;
|
|
465
|
+
is_archived?: number;
|
|
441
466
|
}): UserPlanRow | undefined;
|
|
442
467
|
export declare function listUserPlans(db: Database.Database, params: {
|
|
443
468
|
query?: string;
|
|
@@ -483,12 +508,14 @@ export declare function updateUserIssue(db: Database.Database, id: string, updat
|
|
|
483
508
|
title?: string;
|
|
484
509
|
l1_content?: string;
|
|
485
510
|
entries?: string;
|
|
511
|
+
l1_embedding?: Buffer | null;
|
|
486
512
|
priority?: string;
|
|
487
513
|
usage_policy?: string;
|
|
488
514
|
tags?: string[];
|
|
489
515
|
scope?: string;
|
|
490
516
|
search_summary?: string;
|
|
491
|
-
|
|
517
|
+
issue_status?: string;
|
|
518
|
+
is_archived?: number;
|
|
492
519
|
}): UserIssueRow | undefined;
|
|
493
520
|
export declare function listUserIssues(db: Database.Database, params: {
|
|
494
521
|
query?: string;
|
|
@@ -502,6 +529,46 @@ export declare function listUserIssues(db: Database.Database, params: {
|
|
|
502
529
|
export declare function updateUserIssueL1Embedding(db: Database.Database, id: string, l1_embedding: Buffer): void;
|
|
503
530
|
export declare function getUserIssuesWithoutL1Embedding(db: Database.Database, limit: number): UserIssueRow[];
|
|
504
531
|
export declare function getUserIssuesWithL1Embedding(db: Database.Database, scope?: string, limit?: number): UserIssueRow[];
|
|
532
|
+
import type { UserTopicRow } from "../types.js";
|
|
533
|
+
export declare function insertUserTopic(db: Database.Database, params: {
|
|
534
|
+
title: string;
|
|
535
|
+
summary: string;
|
|
536
|
+
device_id?: string | null;
|
|
537
|
+
cwd?: string | null;
|
|
538
|
+
conversation_id?: string | null;
|
|
539
|
+
priority?: string;
|
|
540
|
+
tags: string[];
|
|
541
|
+
scope?: string;
|
|
542
|
+
search_summary?: string;
|
|
543
|
+
l1_embedding?: Buffer | null;
|
|
544
|
+
source_tool?: string;
|
|
545
|
+
client_name?: string | null;
|
|
546
|
+
client_version?: string | null;
|
|
547
|
+
}): UserTopicRow;
|
|
548
|
+
export declare function getUserTopicById(db: Database.Database, id: string): UserTopicRow | undefined;
|
|
549
|
+
export declare function updateUserTopic(db: Database.Database, id: string, updates: {
|
|
550
|
+
title?: string;
|
|
551
|
+
summary?: string;
|
|
552
|
+
conversation_id?: string;
|
|
553
|
+
cwd?: string;
|
|
554
|
+
priority?: string;
|
|
555
|
+
tags?: string[];
|
|
556
|
+
scope?: string;
|
|
557
|
+
search_summary?: string;
|
|
558
|
+
topic_status?: string;
|
|
559
|
+
is_archived?: number;
|
|
560
|
+
}): UserTopicRow | undefined;
|
|
561
|
+
export declare function listUserTopics(db: Database.Database, params: {
|
|
562
|
+
query?: string;
|
|
563
|
+
tag?: string;
|
|
564
|
+
priority?: string;
|
|
565
|
+
scope?: string;
|
|
566
|
+
status?: string;
|
|
567
|
+
limit?: number;
|
|
568
|
+
}): UserTopicRow[];
|
|
569
|
+
export declare function updateUserTopicL1Embedding(db: Database.Database, id: string, l1_embedding: Buffer): void;
|
|
570
|
+
export declare function getUserTopicsWithoutL1Embedding(db: Database.Database, limit: number): UserTopicRow[];
|
|
571
|
+
export declare function getUserTopicsWithL1Embedding(db: Database.Database, scope?: string, limit?: number): UserTopicRow[];
|
|
505
572
|
import type { UnifiedSearchRow } from "../types.js";
|
|
506
573
|
/**
|
|
507
574
|
* 横断検索(FTS5 + LIKEフォールバック)
|
|
@@ -565,4 +632,41 @@ export declare function insertTombstone(db: Database.Database, entityType: strin
|
|
|
565
632
|
* @returns 削除された件数
|
|
566
633
|
*/
|
|
567
634
|
export declare function applyTombstones(db: Database.Database): number;
|
|
635
|
+
export declare function insertUserFile(db: Database.Database, params: {
|
|
636
|
+
title: string;
|
|
637
|
+
description?: string | null;
|
|
638
|
+
device_id?: string | null;
|
|
639
|
+
original_filename: string;
|
|
640
|
+
original_encoding?: string;
|
|
641
|
+
file_data: string;
|
|
642
|
+
file_hash: string;
|
|
643
|
+
file_size: number;
|
|
644
|
+
tags: string[];
|
|
645
|
+
scope?: string;
|
|
646
|
+
search_summary?: string;
|
|
647
|
+
l1_embedding?: Buffer | null;
|
|
648
|
+
source_tool?: string;
|
|
649
|
+
client_name?: string | null;
|
|
650
|
+
client_version?: string | null;
|
|
651
|
+
}): UserFileRow;
|
|
652
|
+
export declare function getUserFileById(db: Database.Database, id: string): UserFileRow | undefined;
|
|
653
|
+
export declare function getUserFileByTitle(db: Database.Database, title: string): UserFileRow | undefined;
|
|
654
|
+
export declare function updateUserFile(db: Database.Database, id: string, updates: {
|
|
655
|
+
title?: string;
|
|
656
|
+
description?: string;
|
|
657
|
+
file_data?: string;
|
|
658
|
+
file_hash?: string;
|
|
659
|
+
file_size?: number;
|
|
660
|
+
tags?: string[];
|
|
661
|
+
scope?: string;
|
|
662
|
+
search_summary?: string;
|
|
663
|
+
file_status?: string;
|
|
664
|
+
is_archived?: number;
|
|
665
|
+
}): UserFileRow | undefined;
|
|
666
|
+
export declare function listUserFiles(db: Database.Database, params: {
|
|
667
|
+
scope?: string;
|
|
668
|
+
tags?: string[];
|
|
669
|
+
file_status?: string;
|
|
670
|
+
is_archived?: number;
|
|
671
|
+
}): Omit<UserFileRow, "file_data" | "l1_embedding">[];
|
|
568
672
|
//# sourceMappingURL=queries-core.d.ts.map
|