watashi-db 0.0.7 → 0.0.8
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 +120 -63
- package/Usersj.miyamoto.watashi-dbdefault.db +0 -0
- package/cowork-plugin/.claude-plugin/plugin.json +1 -1
- package/cowork-plugin/.mcp.json +1 -1
- package/cowork-plugin/hooks/hooks.json +7 -0
- package/cowork-plugin/skills/recall/SKILL.md +6 -3
- package/dist/config/loader.js +25 -1
- package/dist/config/loader.js.map +1 -1
- package/dist/config/schema.d.ts +53 -0
- package/dist/config/schema.js +9 -0
- package/dist/config/schema.js.map +1 -1
- package/dist/config/validator.js +11 -0
- package/dist/config/validator.js.map +1 -1
- package/dist/constants.d.ts +9 -1
- package/dist/constants.js +51 -3
- package/dist/constants.js.map +1 -1
- package/dist/context-pack.d.ts +7 -2
- package/dist/context-pack.js +137 -31
- package/dist/context-pack.js.map +1 -1
- package/dist/database/archive.d.ts +39 -0
- package/dist/database/archive.js +180 -0
- package/dist/database/archive.js.map +1 -0
- package/dist/database/groom.d.ts +39 -0
- package/dist/database/groom.js +246 -0
- package/dist/database/groom.js.map +1 -0
- package/dist/database/maintain.d.ts +39 -0
- package/dist/database/maintain.js +62 -0
- package/dist/database/maintain.js.map +1 -0
- package/dist/database/queries-core.d.ts +320 -12
- package/dist/database/queries-core.js +1834 -56
- package/dist/database/queries-core.js.map +1 -1
- package/dist/database/queries.d.ts +213 -12
- package/dist/database/queries.js +109 -0
- package/dist/database/queries.js.map +1 -1
- package/dist/database/schema.js +4199 -1
- package/dist/database/schema.js.map +1 -1
- package/dist/embedding/embed-on-write.d.ts +98 -0
- package/dist/embedding/embed-on-write.js +104 -0
- package/dist/embedding/embed-on-write.js.map +1 -0
- package/dist/embedding/ollama.d.ts +18 -0
- package/dist/embedding/ollama.js +67 -0
- package/dist/embedding/ollama.js.map +1 -0
- package/dist/embedding/openai.d.ts +17 -0
- package/dist/embedding/openai.js +77 -0
- package/dist/embedding/openai.js.map +1 -0
- package/dist/embedding/provider.d.ts +34 -0
- package/dist/embedding/provider.js +92 -0
- package/dist/embedding/provider.js.map +1 -0
- package/dist/embedding/search.d.ts +61 -0
- package/dist/embedding/search.js +165 -0
- package/dist/embedding/search.js.map +1 -0
- package/dist/embedding/similarity.d.ts +21 -0
- package/dist/embedding/similarity.js +48 -0
- package/dist/embedding/similarity.js.map +1 -0
- package/dist/embedding/transformers-local.d.ts +24 -0
- package/dist/embedding/transformers-local.js +65 -0
- package/dist/embedding/transformers-local.js.map +1 -0
- package/dist/embedding/types.d.ts +27 -0
- package/dist/embedding/types.js +6 -0
- package/dist/embedding/types.js.map +1 -0
- package/dist/hook.d.ts +54 -1
- package/dist/hook.js +560 -7
- package/dist/hook.js.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/policy.d.ts +7 -1
- package/dist/policy.js +30 -0
- package/dist/policy.js.map +1 -1
- package/dist/project-detect.d.ts +8 -0
- package/dist/project-detect.js +36 -0
- package/dist/project-detect.js.map +1 -0
- package/dist/prompts/bootstrap-prompts.js +48 -0
- package/dist/prompts/bootstrap-prompts.js.map +1 -1
- package/dist/resources/config-guide-content.d.ts +7 -0
- package/dist/resources/config-guide-content.js +180 -0
- package/dist/resources/config-guide-content.js.map +1 -0
- package/dist/resources/context-resources.js +18 -1
- package/dist/resources/context-resources.js.map +1 -1
- package/dist/server-instructions.js +60 -3
- package/dist/server-instructions.js.map +1 -1
- package/dist/server.js +26 -18
- package/dist/server.js.map +1 -1
- package/dist/setup.d.ts +14 -0
- package/dist/setup.js +132 -10
- package/dist/setup.js.map +1 -1
- package/dist/store/federation.d.ts +126 -2
- package/dist/store/federation.js +719 -2
- package/dist/store/federation.js.map +1 -1
- package/dist/store/merge.d.ts +11 -0
- package/dist/store/merge.js +38 -8
- package/dist/store/merge.js.map +1 -1
- package/dist/store/session-state.d.ts +12 -0
- package/dist/store/session-state.js +27 -1
- package/dist/store/session-state.js.map +1 -1
- package/dist/store/sync-manager.d.ts +7 -5
- package/dist/store/sync-manager.js +134 -58
- package/dist/store/sync-manager.js.map +1 -1
- package/dist/tools/claim-tools.d.ts +7 -1
- package/dist/tools/claim-tools.js +328 -178
- package/dist/tools/claim-tools.js.map +1 -1
- package/dist/tools/decision-tools.d.ts +3 -2
- package/dist/tools/decision-tools.js +48 -131
- package/dist/tools/decision-tools.js.map +1 -1
- package/dist/tools/episode-tools.d.ts +2 -3
- package/dist/tools/episode-tools.js +59 -130
- package/dist/tools/episode-tools.js.map +1 -1
- package/dist/tools/export-tools.d.ts +7 -1
- package/dist/tools/export-tools.js +90 -68
- package/dist/tools/export-tools.js.map +1 -1
- package/dist/tools/get-tools.d.ts +11 -0
- package/dist/tools/get-tools.js +282 -0
- package/dist/tools/get-tools.js.map +1 -0
- package/dist/tools/groom-tools.d.ts +13 -0
- package/dist/tools/groom-tools.js +197 -0
- package/dist/tools/groom-tools.js.map +1 -0
- package/dist/tools/helpers.d.ts +10 -0
- package/dist/tools/helpers.js +10 -0
- package/dist/tools/helpers.js.map +1 -0
- package/dist/tools/insight-tools.d.ts +11 -0
- package/dist/tools/insight-tools.js +167 -0
- package/dist/tools/insight-tools.js.map +1 -0
- package/dist/tools/knowledge-tools.d.ts +7 -0
- package/dist/tools/knowledge-tools.js +151 -0
- package/dist/tools/knowledge-tools.js.map +1 -0
- package/dist/tools/maintenance-tools.d.ts +11 -0
- package/dist/tools/maintenance-tools.js +1074 -0
- package/dist/tools/maintenance-tools.js.map +1 -0
- package/dist/tools/memo-tools.d.ts +15 -0
- package/dist/tools/memo-tools.js +370 -0
- package/dist/tools/memo-tools.js.map +1 -0
- package/dist/tools/model-tools.d.ts +11 -0
- package/dist/tools/model-tools.js +175 -0
- package/dist/tools/model-tools.js.map +1 -0
- package/dist/tools/profile-tools.d.ts +13 -1
- package/dist/tools/profile-tools.js +80 -113
- package/dist/tools/profile-tools.js.map +1 -1
- package/dist/tools/promote-tools.js +91 -4
- package/dist/tools/promote-tools.js.map +1 -1
- package/dist/tools/query-tools.d.ts +13 -1
- package/dist/tools/query-tools.js +358 -121
- package/dist/tools/query-tools.js.map +1 -1
- package/dist/tools/store-tools.d.ts +5 -2
- package/dist/tools/store-tools.js +94 -74
- package/dist/tools/store-tools.js.map +1 -1
- package/dist/tools/theory-tools.js +24 -0
- package/dist/tools/theory-tools.js.map +1 -1
- package/dist/types.d.ts +641 -229
- package/dist/types.js +186 -134
- package/dist/types.js.map +1 -1
- package/misc/work-notes/main 20260224.txt +98 -0
- package/misc/work-notes/plans/20260220084456_UNKNOWN_Issue-#24-Episode/343/202/277/343/202/244/343/203/210/343/203/253/343/201/256-Qiita/346/226/271/345/274/217/343/202/254/343/202/244.md +52 -0
- package/misc/work-notes/plans/20260220095602_UNKNOWN_Issue-#10-/346/233/270/343/201/215/350/276/274/343/201/277/346/231/202/343/201/256/343/202/263/343/203/263/343/203/206/343/203/263/343/203/204Lint/346/251/237.md +120 -0
- package/misc/work-notes/plans/20260220100439_UNKNOWN_Issue-#10-/346/233/270/343/201/215/350/276/274/343/201/277/346/231/202/343/201/256/343/202/263/343/203/263/343/203/206/343/203/263/343/203/204Lint/346/251/237.md +156 -0
- package/misc/work-notes/plans/20260220110445_UNKNOWN_Issue-#11-/343/203/227/343/203/255/343/203/225/343/202/241/343/202/244/343/203/253/350/246/201/347/264/204/343/201/256/343/202/271/343/202/263/343/202/242/343/203/252/303/243.md +154 -0
- package/misc/work-notes/plans/20260220114035_UNKNOWN_Issue-#15-/343/202/263/343/203/263/343/203/206/343/202/255/343/202/271/343/203/210/344/272/210/347/256/227API/357/274/210token-budg.md +178 -0
- package/misc/work-notes/plans/20260220133902_UNKNOWN_Issue-#16-/343/202/257/343/203/251/343/202/244/343/202/242/343/203/263/343/203/210/345/210/245/343/203/235/343/203/252/343/202/267/343/203/274/345/261/244/357/274/210r.md +284 -0
- package/misc/work-notes/plans/20260220151356_UNKNOWN_Issue-#28-V9/343/203/236/343/202/244/343/202/260/343/203/254/343/203/274/343/202/267/343/203/247/343/203/263/347/265/261/345/220/210/357/274/210#23-+.md +178 -0
- package/misc/work-notes/plans/20260227042805_UNKNOWN_config.json-/343/202/254/343/202/244/343/203/211/346/225/264/345/202/231-+-MCP-resourceprompt-/303/250.md +90 -0
- package/misc/work-notes/plans/20260302113135_UNKNOWN_MCP/343/203/204/343/203/274/343/203/253/343/203/210/343/203/274/343/202/257/343/203/263/343/203/200/343/202/244/343/202/250/343/203/203/343/203/210-(~17,370-/303/242.md +152 -0
- package/misc/work-notes/plans/20260302151940_UNKNOWN_README.md-/347/217/276/350/241/214API/345/217/215/346/230/240/343/202/242/343/203/203/343/203/227/343/203/207/343/203/274/343/203/210.md +87 -0
- package/misc/work-notes/plans/20260302173113_UNKNOWN_watashi-manage-claim-/343/202/250/343/203/251/343/203/274/346/224/271/345/226/204-+-search-summ.md +70 -0
- package/misc/work-notes/plans/20260303091511_UNKNOWN_Issue-#60-entity-type-/347/234/201/347/225/245/345/257/276/345/277/234-/342/200/224-ID/345/206/205/351/203/250/350/247/243.md +205 -0
- package/misc/work-notes/plans/20260304152700_UNKNOWN_Issue-#61-setup-/343/202/263/343/203/236/343/203/263/343/203/211/343/201/247-MCP-/343/202/265/343/203/274/343/203/220/343/203/274/303/247/302/231.md +67 -0
- package/misc/work-notes/plans/20260304170153_UNKNOWN_Issue-#54-user-memoplanissue-/343/201/256-content-/342/206/222-l1-co.md +76 -0
- package/package.json +12 -2
- package/scripts/backfill-search-summary.mjs +219 -0
- package/scripts/migrate-theories.mjs +231 -0
- package/{watashi-db-cowork-plugin.zip → watashi-db-plugin.zip} +0 -0
- package/dist/config/instance.d.ts +0 -10
- package/dist/config/instance.js +0 -39
- package/dist/config/instance.js.map +0 -1
- package/dist/config/types.d.ts +0 -116
- package/dist/config/types.js +0 -37
- package/dist/config/types.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "watashi-db",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "わたしDB - User-owned personal context database as an MCP server for AI tools",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"keywords": [
|
|
6
|
+
"keywords": [
|
|
7
|
+
"mcp",
|
|
8
|
+
"ai",
|
|
9
|
+
"personal-database",
|
|
10
|
+
"context",
|
|
11
|
+
"sqlite",
|
|
12
|
+
"knowledge-graph"
|
|
13
|
+
],
|
|
7
14
|
"engines": {
|
|
8
15
|
"node": ">=18.0.0"
|
|
9
16
|
},
|
|
@@ -39,6 +46,9 @@
|
|
|
39
46
|
"url": "https://github.com/bareforge/watashi-db/issues"
|
|
40
47
|
},
|
|
41
48
|
"license": "MIT",
|
|
49
|
+
"optionalDependencies": {
|
|
50
|
+
"@huggingface/transformers": "^3.8.1"
|
|
51
|
+
},
|
|
42
52
|
"devDependencies": {
|
|
43
53
|
"@types/better-sqlite3": "^7.6.13",
|
|
44
54
|
"@types/node": "^22.13.4",
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* search_summary バックフィルスクリプト(ワンショット)
|
|
3
|
+
* null の search_summary を持つ全レコードにキーワードを生成して UPDATE する。
|
|
4
|
+
* FTS トリガーにより FTS インデックスも自動更新される。
|
|
5
|
+
*
|
|
6
|
+
* 使い方: node scripts/backfill-search-summary.mjs
|
|
7
|
+
*/
|
|
8
|
+
import Database from "better-sqlite3";
|
|
9
|
+
import { homedir } from "os";
|
|
10
|
+
import { join } from "path";
|
|
11
|
+
|
|
12
|
+
const dbPath = join(homedir(), ".watashi-db", "watashi.db");
|
|
13
|
+
const db = new Database(dbPath);
|
|
14
|
+
|
|
15
|
+
// --- Claims ---
|
|
16
|
+
const claimUpdates = [
|
|
17
|
+
{
|
|
18
|
+
id: "01KJ0E9R2ZF2V17M0VDFQJ368K",
|
|
19
|
+
search_summary: "GitHub アカウント 複数 匿名 実名 仕事用 個人 開示方針 multi-account anonymous real-name work personal",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: "01KJ0CT8V3CGD28C2Q71WYJFSQ",
|
|
23
|
+
search_summary: "PC 開発環境 家 Dragonfly 仕事 複数端末 メイン development environment home work multi-device desktop",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: "01KJ0CTAPH6PX6TXPEYG3WQ556",
|
|
27
|
+
search_summary: "姉 PC 導入予定 watashi-db 家族 共有 deployment family sister shared",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: "01KJ06E819QT3ER6RN9DJRPSK3",
|
|
31
|
+
search_summary: "Gemini CLI Google 未活用 利用可能 AI ツール available unused alternative",
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: "01KHYX5VGJRGT0MG2DY3ZT61RV",
|
|
35
|
+
search_summary: "外部インターフェース 会話 他者 わたし 表現 ペルソナ ビジョン 構想 external interface conversation persona vision",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: "01KHYX5S0418RW84Q7XTEWSWM0",
|
|
39
|
+
search_summary: "対価 お礼 OSS 課金 マイクロペイメント リターン 意識改革 価値観 payment gratitude open-source micro-payment value ethics",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: "01KHV33B6ABEXC1R09Q1W7XPFC",
|
|
43
|
+
search_summary: "テーブル カラム 並び順 ライフサイクル 監査 created_at updated_at 末尾 スキーマ設計 column order lifecycle audit schema design",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: "01KH5WNZF692P1FV723NJJ0JN8",
|
|
47
|
+
search_summary: "Clipse クリップボード マネージャー clipboard manager tool utility",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: "01KH5WNY38BBDH0YGFC08G8RGP",
|
|
51
|
+
search_summary: "JetBrains IDE IntelliJ IDEA WebStorm Rider エディタ 開発ツール editor development",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: "01KH5WNX3T7YN926ZH533RP5C2",
|
|
55
|
+
search_summary: "VS Code Visual Studio Code エディタ 開発ツール editor IDE lightweight",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
id: "01KH5WNW2YMNJDPBDJZZAEBQTB",
|
|
59
|
+
search_summary: "デスクトップアプリ 開発分野 WPF Electron ネイティブ desktop application native development field",
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: "01KH5WNV40HXV17AEG19WCJW2P",
|
|
63
|
+
search_summary: "AI LLM ツール開発 機械学習 生成AI 開発分野 artificial intelligence machine learning generative tool development",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: "01KH5WNT37PSFR737TW9VTFA57",
|
|
67
|
+
search_summary: "Web アプリ フロントエンド バックエンド 開発分野 web application frontend backend development field",
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: "01KH5WNRYPSZH71SEKFWN0F7PJ",
|
|
71
|
+
search_summary: "SQL MySQL Oracle データベース クエリ RDB プログラミング言語 database query relational programming language",
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
id: "01KH5WNQXP5KZ335RN0WD5YG1T",
|
|
75
|
+
search_summary: "Java Spring Boot バックエンド サーバーサイド フレームワーク プログラミング言語 backend server-side framework programming language",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
id: "01KH5WNQ43CV3V41556XVAAN0G",
|
|
79
|
+
search_summary: "TypeScript JavaScript フロントエンド Node.js 型安全 プログラミング言語 type-safe frontend programming language",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: "01KH5WNP4VAW1DR8Y5HV60NGZ7",
|
|
83
|
+
search_summary: "C# .NET WPF MAUI デスクトップ プログラミング言語 desktop framework programming language",
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: "01KH5WEA7PXRBXAEBCD1Q12353",
|
|
87
|
+
search_summary: "Codex CLI OpenAI コードレビュー AI支援 自動レビュー code review AI-assisted automated",
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: "01KH5WEA70KDE5MHBZ7WERJKWP",
|
|
91
|
+
search_summary: "Claude Code CLI Anthropic ターミナル 開発ツール AI支援 terminal development tool AI-assisted",
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: "01KH5WEA624XXR1VT7GN8AWJBC",
|
|
95
|
+
search_summary: "Windows 11 Pro OS 開発環境 プラットフォーム operating system platform development environment",
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
id: "01KH5WE7M3V17K5XE2FJ4HC7DA",
|
|
99
|
+
search_summary: "作業メモ セッション引き継ぎ working_memo ドキュメント ワークフロー session continuity documentation workflow",
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
id: "01KH5WE7KEWR73ABE8NSNPBN04",
|
|
103
|
+
search_summary: "コメントアウト 履歴保持 コード修正 削除しない 変更履歴 comment-out history preservation code modification",
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: "01KH5WE7JJYTD7Q7QCAFN599SH",
|
|
107
|
+
search_summary: "日本語 言語設定 回答 説明 コメント 技術用語 英語併記 Japanese language setting bilingual",
|
|
108
|
+
},
|
|
109
|
+
];
|
|
110
|
+
|
|
111
|
+
// --- Decisions ---
|
|
112
|
+
const decisionUpdates = [
|
|
113
|
+
{
|
|
114
|
+
id: "01KJ096Q0RS0YNR3X6DGX75EN8",
|
|
115
|
+
search_summary: "npm publish 配布方法 GitHub Releases better-sqlite3 ネイティブアドオン npx distribution method native addon package registry",
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: "01KJ03S2CKER5VJ6WTP3QHH857",
|
|
119
|
+
search_summary: "長期ビジョン 外部インターフェース マイクロペイメント Issue化 OSS 課金モデル 透明性 long-term vision external interface micro-payment open-source monetization",
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
id: "01KHSPVSPETJATB212RD65PDRF",
|
|
123
|
+
search_summary: "L2 Why Pathway evidence_type user_statement reasoning 推論根拠 claim_evidence エビデンス種別 evidence type classification",
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
id: "01KHFJ75CYPCBSK0MZHP9AJWXP",
|
|
127
|
+
search_summary: "共有DB 排他制御 instance-lock writer_instance_id SQLite Google Drive ネットワークFS ファイルロック 書き込み権限 shared database exclusive lock network filesystem",
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
id: "01KHFJ6P96REGT551H05SPP6Z1",
|
|
131
|
+
search_summary: "ActiveStore パターン マルチStore queries.ts 無変更 getDatabase 接続層 後方互換 multi-store active store pattern backward compatibility connection layer",
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
id: "01KH64455KNCJH3PTM7CHN5XKE",
|
|
135
|
+
search_summary: "v0.1.0 ロードマップ Codex レビュー 権限境界 L2最小要件 Provenance FTS 日本語 公開準備 roadmap code review permission boundary release preparation",
|
|
136
|
+
},
|
|
137
|
+
];
|
|
138
|
+
|
|
139
|
+
// --- Episodes ---
|
|
140
|
+
const episodeUpdates = [
|
|
141
|
+
{
|
|
142
|
+
id: "01KJ0KFA8T8EMYD5JWDZMBAWX1",
|
|
143
|
+
search_summary: "Issue#35 Hook トピック一覧 動的注入 watashi_list_topics getTopicSummary MCP ESM createRequire Codex レビュー topic injection hook dynamic context",
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: "01KJ0FJA76CHQPWY7E7FNWN35Q",
|
|
147
|
+
search_summary: "v0.0.7 セットアップ 統合完了 マイルストーン Hook setup Cowork watashi-db milestone integration complete",
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
id: "01KJ0EDF54S5BQ219CX9NK12KF",
|
|
151
|
+
search_summary: "GitHub Contributors プライバシー jomiyamoto bareforge refs/pull スカッシュマージ 匿名リポジトリ 実名紐付き contributor privacy anonymous repository real-name link",
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
id: "01KJ0DNZT6SBCTVXQTYVC7SD8V",
|
|
155
|
+
search_summary: "npm publish 2FA セキュリティキー Granular Access Token README 整備 ツール数修正 two-factor authentication security key access token documentation",
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
id: "01KJ096PYVANHP6DR61VX1MHMX",
|
|
159
|
+
search_summary: "Hook Node.js化 setup コマンド Cowork対応 Python依存排除 サブコマンドルーター pretest tsc Codex レビュー Node.js migration setup wizard",
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
id: "01KHSQ7N4R9J6CZ5K049PDCSFC",
|
|
163
|
+
search_summary: "Episode Theory 設計方針 Qiita FTS拡張 検索性 タイトル形式 問題解決 抽象具体分離 search design title format problem-solution abstraction",
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
id: "01KHSPVPNSABFQYXJ6JSSS1N52",
|
|
167
|
+
search_summary: "L2 Why Pathway claim_evidence reasoning StoreClaimSchema server-instructions insertClaimEvidence evidence pathway implementation",
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
id: "01KHFJ643RTDTSGJP0DYPG153K",
|
|
171
|
+
search_summary: "マルチStore ActiveStore パターン フェデレーション config.json StoreManager instance-lock withStore 後方互換 multi-store federation backward compatibility architecture",
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
id: "01KHBQ5ZGWWGFEK09204HCR64Q",
|
|
175
|
+
search_summary: "GitHub 初回push bareforge プライベートリポジトリ PAT認証 author書き換え 資格情報マネージャー first push private repository authentication",
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
id: "01KHBMF4CF7KJ0F1NNDZEA6YY4",
|
|
179
|
+
search_summary: "GitHub リポジトリ戦略 匿名個人 法人移管 kyowa-sd 商用化 Transfer 公開パス repository strategy anonymous corporate transfer commercialization",
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
id: "01KHBK87RDJTPM3ZHJJHSECQ52",
|
|
183
|
+
search_summary: "Episode 運用設計 記録タイミング ワークフロー L1 L2 context厚め 自動記録 20件検証 operational design recording timing workflow",
|
|
184
|
+
},
|
|
185
|
+
];
|
|
186
|
+
|
|
187
|
+
// --- 実行 ---
|
|
188
|
+
const updateClaim = db.prepare("UPDATE claims SET search_summary = ? WHERE id = ? AND search_summary IS NULL");
|
|
189
|
+
const updateDecision = db.prepare("UPDATE decisions SET search_summary = ? WHERE id = ? AND search_summary IS NULL");
|
|
190
|
+
const updateEpisode = db.prepare("UPDATE episodes SET search_summary = ? WHERE id = ? AND search_summary IS NULL");
|
|
191
|
+
|
|
192
|
+
const results = { claims: 0, decisions: 0, episodes: 0 };
|
|
193
|
+
|
|
194
|
+
db.transaction(() => {
|
|
195
|
+
for (const { id, search_summary } of claimUpdates) {
|
|
196
|
+
const r = updateClaim.run(search_summary, id);
|
|
197
|
+
results.claims += r.changes;
|
|
198
|
+
}
|
|
199
|
+
for (const { id, search_summary } of decisionUpdates) {
|
|
200
|
+
const r = updateDecision.run(search_summary, id);
|
|
201
|
+
results.decisions += r.changes;
|
|
202
|
+
}
|
|
203
|
+
for (const { id, search_summary } of episodeUpdates) {
|
|
204
|
+
const r = updateEpisode.run(search_summary, id);
|
|
205
|
+
results.episodes += r.changes;
|
|
206
|
+
}
|
|
207
|
+
})();
|
|
208
|
+
|
|
209
|
+
console.log("Backfill complete:", results);
|
|
210
|
+
|
|
211
|
+
// 検証: まだ null のレコードがないか確認
|
|
212
|
+
const remaining = {
|
|
213
|
+
claims: db.prepare("SELECT COUNT(*) as c FROM claims WHERE search_summary IS NULL AND status = 'active'").get(),
|
|
214
|
+
decisions: db.prepare("SELECT COUNT(*) as c FROM decisions WHERE search_summary IS NULL AND status = 'active'").get(),
|
|
215
|
+
episodes: db.prepare("SELECT COUNT(*) as c FROM episodes WHERE search_summary IS NULL AND status = 'active'").get(),
|
|
216
|
+
};
|
|
217
|
+
console.log("Remaining null search_summary:", remaining);
|
|
218
|
+
|
|
219
|
+
db.close();
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theory → Insight / Model 移行スクリプト(ワンショット)
|
|
3
|
+
* 2026-02-23 作成 (Issue #40): エンティティ分類体系の再設計 Phase 1
|
|
4
|
+
*
|
|
5
|
+
* 5件の既存TheoryをInsight/Modelに再分類する。
|
|
6
|
+
* - → Insight: グレースフルデグレード / 既存コードへの影響最小化 / modman仕様書フレームワーク
|
|
7
|
+
* - → Model: 個人プロジェクトの成長パス / 情報設計の逆算原則
|
|
8
|
+
* - 元のtheoriesレコードは status='archived' に変更(--keep-sourceで元データ維持)
|
|
9
|
+
* - 監査ログに移行記録
|
|
10
|
+
*
|
|
11
|
+
* 使い方: node scripts/migrate-theories.mjs [--dry-run] [--keep-source]
|
|
12
|
+
*
|
|
13
|
+
* オプション:
|
|
14
|
+
* --dry-run 実際の変更は行わず対象件数のみ表示
|
|
15
|
+
* --keep-source 元のTheoryをarchivedにせずactiveのまま維持
|
|
16
|
+
* (queryContextがInsight/Modelに未対応の間はこのオプションを推奨)
|
|
17
|
+
*
|
|
18
|
+
* 前提: V12スキーマが適用済みであること
|
|
19
|
+
*/
|
|
20
|
+
import Database from "better-sqlite3";
|
|
21
|
+
import { homedir } from "os";
|
|
22
|
+
import { join } from "path";
|
|
23
|
+
import { randomBytes } from "crypto";
|
|
24
|
+
|
|
25
|
+
const dryRun = process.argv.includes("--dry-run");
|
|
26
|
+
const keepSource = process.argv.includes("--keep-source");
|
|
27
|
+
const dbPath = join(homedir(), ".watashi-db", "watashi.db");
|
|
28
|
+
|
|
29
|
+
console.log(`DB: ${dbPath}`);
|
|
30
|
+
console.log(`Mode: ${dryRun ? "DRY RUN" : "EXECUTE"}`);
|
|
31
|
+
console.log(`Keep source: ${keepSource ? "YES (元のTheoryはactiveのまま)" : "NO (archivedに変更)"}`);
|
|
32
|
+
console.log("");
|
|
33
|
+
|
|
34
|
+
const db = new Database(dbPath);
|
|
35
|
+
db.pragma("journal_mode = WAL");
|
|
36
|
+
db.pragma("foreign_keys = ON");
|
|
37
|
+
|
|
38
|
+
// スキーマバージョン確認
|
|
39
|
+
const version = db.prepare("SELECT MAX(version) as version FROM schema_version").get();
|
|
40
|
+
if (version.version < 12) {
|
|
41
|
+
console.error(`エラー: V12スキーマが必要です(現在: V${version.version})`);
|
|
42
|
+
console.error("先にサーバーを起動してスキーマを更新してください。");
|
|
43
|
+
db.close();
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** ULID風のID生成(簡易版) */
|
|
48
|
+
function generateId() {
|
|
49
|
+
const timestamp = Date.now().toString(36).padStart(10, "0").toUpperCase();
|
|
50
|
+
const random = randomBytes(10).toString("hex").slice(0, 16).toUpperCase();
|
|
51
|
+
return `01${timestamp}${random}`;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// 移行対象のTheoryを検索
|
|
55
|
+
const theories = db.prepare(`
|
|
56
|
+
SELECT * FROM theories WHERE status = 'active'
|
|
57
|
+
`).all();
|
|
58
|
+
|
|
59
|
+
console.log(`Active theories: ${theories.length}件`);
|
|
60
|
+
console.log("");
|
|
61
|
+
|
|
62
|
+
// 各Theoryのタイトルで移行先を判定
|
|
63
|
+
const migrations = [];
|
|
64
|
+
|
|
65
|
+
for (const theory of theories) {
|
|
66
|
+
const title = theory.title || "";
|
|
67
|
+
let target = null;
|
|
68
|
+
|
|
69
|
+
// タイトルによる振り分け
|
|
70
|
+
if (title.includes("グレースフルデグレード")) {
|
|
71
|
+
target = "insight";
|
|
72
|
+
} else if (title.includes("既存コードへの影響最小化") || title.includes("接続層")) {
|
|
73
|
+
target = "insight";
|
|
74
|
+
} else if (title.includes("modman") || title.includes("仕様書") && title.includes("フレームワーク")) {
|
|
75
|
+
target = "insight";
|
|
76
|
+
} else if (title.includes("個人プロジェクト") || title.includes("成長パス")) {
|
|
77
|
+
target = "model";
|
|
78
|
+
} else if (title.includes("情報設計") || title.includes("逆算")) {
|
|
79
|
+
target = "model";
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (target) {
|
|
83
|
+
migrations.push({ theory, target });
|
|
84
|
+
console.log(` [${target.toUpperCase().padEnd(7)}] ${title}`);
|
|
85
|
+
} else {
|
|
86
|
+
console.log(` [SKIP ] ${title} (移行対象外)`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
console.log("");
|
|
91
|
+
console.log(`移行対象: ${migrations.length}件`);
|
|
92
|
+
|
|
93
|
+
if (dryRun) {
|
|
94
|
+
console.log("\nDRY RUN: 実際の変更は行いません。");
|
|
95
|
+
db.close();
|
|
96
|
+
process.exit(0);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (migrations.length === 0) {
|
|
100
|
+
console.log("移行対象がありません。");
|
|
101
|
+
db.close();
|
|
102
|
+
process.exit(0);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// トランザクションで移行実行
|
|
106
|
+
const now = new Date().toISOString().replace("T", " ").slice(0, 19);
|
|
107
|
+
|
|
108
|
+
const insertInsight = db.prepare(`
|
|
109
|
+
INSERT INTO insights (id, title, description, core_thesis, principles,
|
|
110
|
+
supporting_episode_ids, supporting_claim_ids, tags, scope, confidence,
|
|
111
|
+
status, search_summary, embedding,
|
|
112
|
+
source_tool, session_id, client_name, client_version,
|
|
113
|
+
created_at, updated_at)
|
|
114
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'active', ?, ?,
|
|
115
|
+
'migrate-theories-script', NULL, 'migrate-theories', '1.0',
|
|
116
|
+
?, ?)
|
|
117
|
+
`);
|
|
118
|
+
|
|
119
|
+
const insertModel = db.prepare(`
|
|
120
|
+
INSERT INTO models (id, title, description, core_thesis, principles,
|
|
121
|
+
non_goals, open_questions,
|
|
122
|
+
supporting_episode_ids, supporting_claim_ids, tags, scope, confidence,
|
|
123
|
+
status, search_summary, embedding,
|
|
124
|
+
source_tool, session_id, client_name, client_version,
|
|
125
|
+
created_at, updated_at)
|
|
126
|
+
VALUES (?, ?, ?, ?, ?, ?, ?,
|
|
127
|
+
?, ?, ?, ?, ?, 'active', ?, ?,
|
|
128
|
+
'migrate-theories-script', NULL, 'migrate-theories', '1.0',
|
|
129
|
+
?, ?)
|
|
130
|
+
`);
|
|
131
|
+
|
|
132
|
+
const archiveTheory = db.prepare(`
|
|
133
|
+
UPDATE theories SET status = 'archived', updated_at = ? WHERE id = ?
|
|
134
|
+
`);
|
|
135
|
+
|
|
136
|
+
const insertAuditLog = db.prepare(`
|
|
137
|
+
INSERT INTO audit_log (id, operation, entity_type, entity_id, summary,
|
|
138
|
+
source_tool, client_name, client_version, created_at)
|
|
139
|
+
VALUES (?, 'create', ?, ?, ?, 'migrate-theories-script', 'migrate-theories', '1.0', ?)
|
|
140
|
+
`);
|
|
141
|
+
|
|
142
|
+
const insertArchiveAuditLog = db.prepare(`
|
|
143
|
+
INSERT INTO audit_log (id, operation, entity_type, entity_id, summary,
|
|
144
|
+
source_tool, client_name, client_version, created_at)
|
|
145
|
+
VALUES (?, 'update', 'theory', ?, ?, 'migrate-theories-script', 'migrate-theories', '1.0', ?)
|
|
146
|
+
`);
|
|
147
|
+
|
|
148
|
+
const migrate = db.transaction(() => {
|
|
149
|
+
for (const { theory, target } of migrations) {
|
|
150
|
+
const newId = generateId();
|
|
151
|
+
|
|
152
|
+
if (target === "insight") {
|
|
153
|
+
insertInsight.run(
|
|
154
|
+
newId,
|
|
155
|
+
theory.title,
|
|
156
|
+
theory.description,
|
|
157
|
+
theory.core_thesis,
|
|
158
|
+
theory.principles, // JSON文字列のまま
|
|
159
|
+
theory.supporting_episode_ids,
|
|
160
|
+
theory.supporting_claim_ids,
|
|
161
|
+
theory.tags,
|
|
162
|
+
theory.scope,
|
|
163
|
+
theory.confidence,
|
|
164
|
+
theory.search_summary,
|
|
165
|
+
theory.embedding,
|
|
166
|
+
theory.created_at,
|
|
167
|
+
now,
|
|
168
|
+
);
|
|
169
|
+
|
|
170
|
+
insertAuditLog.run(
|
|
171
|
+
generateId(),
|
|
172
|
+
"insight",
|
|
173
|
+
newId,
|
|
174
|
+
`Theory→Insight移行: ${theory.title}(元Theory ID: ${theory.id})`,
|
|
175
|
+
now,
|
|
176
|
+
);
|
|
177
|
+
} else if (target === "model") {
|
|
178
|
+
insertModel.run(
|
|
179
|
+
newId,
|
|
180
|
+
theory.title,
|
|
181
|
+
theory.description,
|
|
182
|
+
theory.core_thesis,
|
|
183
|
+
theory.principles,
|
|
184
|
+
theory.non_goals,
|
|
185
|
+
theory.open_questions,
|
|
186
|
+
theory.supporting_episode_ids,
|
|
187
|
+
theory.supporting_claim_ids,
|
|
188
|
+
theory.tags,
|
|
189
|
+
theory.scope,
|
|
190
|
+
theory.confidence,
|
|
191
|
+
theory.search_summary,
|
|
192
|
+
theory.embedding,
|
|
193
|
+
theory.created_at,
|
|
194
|
+
now,
|
|
195
|
+
);
|
|
196
|
+
|
|
197
|
+
insertAuditLog.run(
|
|
198
|
+
generateId(),
|
|
199
|
+
"model",
|
|
200
|
+
newId,
|
|
201
|
+
`Theory→Model移行: ${theory.title}(元Theory ID: ${theory.id})`,
|
|
202
|
+
now,
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// 2026-02-23 修正 (Codex P2): --keep-sourceの場合は元のTheoryをactiveのまま維持
|
|
207
|
+
// queryContextがInsight/Modelに未対応の間、archivedにするとデータが検索から消えるため
|
|
208
|
+
if (!keepSource) {
|
|
209
|
+
archiveTheory.run(now, theory.id);
|
|
210
|
+
|
|
211
|
+
insertArchiveAuditLog.run(
|
|
212
|
+
generateId(),
|
|
213
|
+
theory.id,
|
|
214
|
+
`Insight/Model移行のためarchived: ${theory.title} → ${target} (ID: ${newId})`,
|
|
215
|
+
now,
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
console.log(` ✓ ${theory.title} → ${target} (new ID: ${newId})${keepSource ? " [source kept active]" : ""}`);
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
try {
|
|
224
|
+
migrate();
|
|
225
|
+
console.log(`\n移行完了: ${migrations.length}件を処理しました。`);
|
|
226
|
+
} catch (error) {
|
|
227
|
+
console.error("\nエラー:", error.message);
|
|
228
|
+
process.exit(1);
|
|
229
|
+
} finally {
|
|
230
|
+
db.close();
|
|
231
|
+
}
|
|
Binary file
|
package/dist/config/instance.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* インスタンスID管理
|
|
3
|
-
* 各watashi-dbインスタンスに一意のIDを付与し、共有DB(sqlite-shared)の
|
|
4
|
-
* 書き込み排他制御に使用する。
|
|
5
|
-
* 初回起動時にULIDを生成し、~/.watashi-db/instance_id に保存。
|
|
6
|
-
*/
|
|
7
|
-
import fs from "node:fs";
|
|
8
|
-
import path from "node:path";
|
|
9
|
-
import { ulid } from "ulid";
|
|
10
|
-
import { DB_DIR } from "../constants.js";
|
|
11
|
-
const INSTANCE_ID_FILE = path.join(DB_DIR, "instance_id");
|
|
12
|
-
let cachedInstanceId = null;
|
|
13
|
-
/**
|
|
14
|
-
* このインスタンスのIDを取得する。
|
|
15
|
-
* ファイルが存在しなければ新規生成して保存する。
|
|
16
|
-
*/
|
|
17
|
-
export function getInstanceId() {
|
|
18
|
-
if (cachedInstanceId)
|
|
19
|
-
return cachedInstanceId;
|
|
20
|
-
// ディレクトリが無ければ作成
|
|
21
|
-
if (!fs.existsSync(DB_DIR)) {
|
|
22
|
-
fs.mkdirSync(DB_DIR, { recursive: true });
|
|
23
|
-
}
|
|
24
|
-
if (fs.existsSync(INSTANCE_ID_FILE)) {
|
|
25
|
-
cachedInstanceId = fs.readFileSync(INSTANCE_ID_FILE, "utf-8").trim();
|
|
26
|
-
return cachedInstanceId;
|
|
27
|
-
}
|
|
28
|
-
// 初回起動: ULIDを生成して保存
|
|
29
|
-
cachedInstanceId = ulid();
|
|
30
|
-
fs.writeFileSync(INSTANCE_ID_FILE, cachedInstanceId, "utf-8");
|
|
31
|
-
return cachedInstanceId;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* テスト用: インスタンスIDをリセットする
|
|
35
|
-
*/
|
|
36
|
-
export function _resetInstanceIdForTesting() {
|
|
37
|
-
cachedInstanceId = null;
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=instance.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"instance.js","sourceRoot":"","sources":["../../src/config/instance.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAE1D,IAAI,gBAAgB,GAAkB,IAAI,CAAC;AAE3C;;;GAGG;AACH,MAAM,UAAU,aAAa;IAC3B,IAAI,gBAAgB;QAAE,OAAO,gBAAgB,CAAC;IAE9C,gBAAgB;IAChB,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3B,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,IAAI,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,CAAC;QACpC,gBAAgB,GAAG,EAAE,CAAC,YAAY,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;QACrE,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,oBAAoB;IACpB,gBAAgB,GAAG,IAAI,EAAE,CAAC;IAC1B,EAAE,CAAC,aAAa,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;IAC9D,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,0BAA0B;IACxC,gBAAgB,GAAG,IAAI,CAAC;AAC1B,CAAC"}
|
package/dist/config/types.d.ts
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Store設定の型定義・Zodスキーマ
|
|
3
|
-
* config.json の構造を定義する。
|
|
4
|
-
*/
|
|
5
|
-
import { z } from "zod";
|
|
6
|
-
export declare const STORE_KINDS: readonly ["sqlite-local", "sqlite-shared", "remote-mcp"];
|
|
7
|
-
export type StoreKind = typeof STORE_KINDS[number];
|
|
8
|
-
export declare const StoreConfigSchema: z.ZodObject<{
|
|
9
|
-
kind: z.ZodEnum<["sqlite-local", "sqlite-shared", "remote-mcp"]>;
|
|
10
|
-
path: z.ZodOptional<z.ZodString>;
|
|
11
|
-
label: z.ZodOptional<z.ZodString>;
|
|
12
|
-
writable: z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"instance-lock">]>>;
|
|
13
|
-
url: z.ZodOptional<z.ZodString>;
|
|
14
|
-
auth: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
15
|
-
}, "strip", z.ZodTypeAny, {
|
|
16
|
-
kind: "sqlite-local" | "sqlite-shared" | "remote-mcp";
|
|
17
|
-
writable: boolean | "instance-lock";
|
|
18
|
-
path?: string | undefined;
|
|
19
|
-
label?: string | undefined;
|
|
20
|
-
url?: string | undefined;
|
|
21
|
-
auth?: Record<string, string> | undefined;
|
|
22
|
-
}, {
|
|
23
|
-
kind: "sqlite-local" | "sqlite-shared" | "remote-mcp";
|
|
24
|
-
path?: string | undefined;
|
|
25
|
-
label?: string | undefined;
|
|
26
|
-
writable?: boolean | "instance-lock" | undefined;
|
|
27
|
-
url?: string | undefined;
|
|
28
|
-
auth?: Record<string, string> | undefined;
|
|
29
|
-
}>;
|
|
30
|
-
export declare const SearchConfigSchema: z.ZodObject<{
|
|
31
|
-
targets: z.ZodArray<z.ZodString, "many">;
|
|
32
|
-
priority: z.ZodArray<z.ZodString, "many">;
|
|
33
|
-
}, "strip", z.ZodTypeAny, {
|
|
34
|
-
targets: string[];
|
|
35
|
-
priority: string[];
|
|
36
|
-
}, {
|
|
37
|
-
targets: string[];
|
|
38
|
-
priority: string[];
|
|
39
|
-
}>;
|
|
40
|
-
export declare const WatashiConfigSchema: z.ZodObject<{
|
|
41
|
-
defaultStore: z.ZodDefault<z.ZodString>;
|
|
42
|
-
stores: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
43
|
-
kind: z.ZodEnum<["sqlite-local", "sqlite-shared", "remote-mcp"]>;
|
|
44
|
-
path: z.ZodOptional<z.ZodString>;
|
|
45
|
-
label: z.ZodOptional<z.ZodString>;
|
|
46
|
-
writable: z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"instance-lock">]>>;
|
|
47
|
-
url: z.ZodOptional<z.ZodString>;
|
|
48
|
-
auth: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
49
|
-
}, "strip", z.ZodTypeAny, {
|
|
50
|
-
kind: "sqlite-local" | "sqlite-shared" | "remote-mcp";
|
|
51
|
-
writable: boolean | "instance-lock";
|
|
52
|
-
path?: string | undefined;
|
|
53
|
-
label?: string | undefined;
|
|
54
|
-
url?: string | undefined;
|
|
55
|
-
auth?: Record<string, string> | undefined;
|
|
56
|
-
}, {
|
|
57
|
-
kind: "sqlite-local" | "sqlite-shared" | "remote-mcp";
|
|
58
|
-
path?: string | undefined;
|
|
59
|
-
label?: string | undefined;
|
|
60
|
-
writable?: boolean | "instance-lock" | undefined;
|
|
61
|
-
url?: string | undefined;
|
|
62
|
-
auth?: Record<string, string> | undefined;
|
|
63
|
-
}>>;
|
|
64
|
-
search: z.ZodOptional<z.ZodObject<{
|
|
65
|
-
targets: z.ZodArray<z.ZodString, "many">;
|
|
66
|
-
priority: z.ZodArray<z.ZodString, "many">;
|
|
67
|
-
}, "strip", z.ZodTypeAny, {
|
|
68
|
-
targets: string[];
|
|
69
|
-
priority: string[];
|
|
70
|
-
}, {
|
|
71
|
-
targets: string[];
|
|
72
|
-
priority: string[];
|
|
73
|
-
}>>;
|
|
74
|
-
}, "strip", z.ZodTypeAny, {
|
|
75
|
-
defaultStore: string;
|
|
76
|
-
stores: Record<string, {
|
|
77
|
-
kind: "sqlite-local" | "sqlite-shared" | "remote-mcp";
|
|
78
|
-
writable: boolean | "instance-lock";
|
|
79
|
-
path?: string | undefined;
|
|
80
|
-
label?: string | undefined;
|
|
81
|
-
url?: string | undefined;
|
|
82
|
-
auth?: Record<string, string> | undefined;
|
|
83
|
-
}>;
|
|
84
|
-
search?: {
|
|
85
|
-
targets: string[];
|
|
86
|
-
priority: string[];
|
|
87
|
-
} | undefined;
|
|
88
|
-
}, {
|
|
89
|
-
stores: Record<string, {
|
|
90
|
-
kind: "sqlite-local" | "sqlite-shared" | "remote-mcp";
|
|
91
|
-
path?: string | undefined;
|
|
92
|
-
label?: string | undefined;
|
|
93
|
-
writable?: boolean | "instance-lock" | undefined;
|
|
94
|
-
url?: string | undefined;
|
|
95
|
-
auth?: Record<string, string> | undefined;
|
|
96
|
-
}>;
|
|
97
|
-
defaultStore?: string | undefined;
|
|
98
|
-
search?: {
|
|
99
|
-
targets: string[];
|
|
100
|
-
priority: string[];
|
|
101
|
-
} | undefined;
|
|
102
|
-
}>;
|
|
103
|
-
export type StoreConfig = z.infer<typeof StoreConfigSchema>;
|
|
104
|
-
export type SearchConfig = z.infer<typeof SearchConfigSchema>;
|
|
105
|
-
export type WatashiConfig = z.infer<typeof WatashiConfigSchema>;
|
|
106
|
-
export interface StoreInfo {
|
|
107
|
-
id: string;
|
|
108
|
-
kind: StoreKind;
|
|
109
|
-
label: string;
|
|
110
|
-
path?: string;
|
|
111
|
-
writable: boolean | "instance-lock";
|
|
112
|
-
isActive: boolean;
|
|
113
|
-
isDefault: boolean;
|
|
114
|
-
effectiveWritable: boolean;
|
|
115
|
-
}
|
|
116
|
-
//# sourceMappingURL=types.d.ts.map
|