@geminilight/mindos 0.7.2 → 0.7.4
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/_standalone/.mindos-build-version +1 -1
- package/_standalone/.next/BUILD_ID +1 -1
- package/_standalone/.next/app-path-routes-manifest.json +19 -19
- package/_standalone/.next/build-manifest.json +3 -3
- package/_standalone/.next/cache/.previewinfo +1 -1
- package/_standalone/.next/cache/.rscinfo +1 -1
- package/_standalone/.next/cache/config.json +3 -3
- package/_standalone/.next/prerender-manifest.json +3 -3
- package/_standalone/.next/react-loadable-manifest.json +4 -4
- package/_standalone/.next/server/app/.well-known/agent-card.json/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/_global-error.html +2 -2
- package/_standalone/.next/server/app/_global-error.rsc +1 -1
- package/_standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/_standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/_standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/_standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/_standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/_standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/_standalone/.next/server/app/_not-found/page.js +1 -1
- package/_standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/agents/[agentKey]/page.js +1 -1
- package/_standalone/.next/server/app/agents/[agentKey]/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/agents/[agentKey]/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/agents/page.js +1 -1
- package/_standalone/.next/server/app/agents/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/agents/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/a2a/agents/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/a2a/delegations/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/a2a/discover/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/a2a/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/acp/config/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/acp/detect/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/acp/install/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/acp/registry/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/acp/session/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/agent-activity/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/agents/copy-skill/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/agents/custom/detect/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/agents/custom/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/ask/route.js +4 -4
- package/_standalone/.next/server/app/api/ask/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/ask-sessions/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/auth/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/backlinks/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/bootstrap/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/changes/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/channels/verify/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/connect/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/embedding/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/export/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/extract-docx/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/extract-pdf/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/file/import/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/file/raw/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/file/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/graph/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/im/activity/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/im/config/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/im/feishu/long-connection/event/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/im/feishu/long-connection/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/im/status/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/im/test/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/im/webhook/feishu/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/im/webhook-status/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/inbox/clip/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/inbox/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/lint/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/agents/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/direct-tools/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/install/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/install-skill/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/restart/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/status/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/tools/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/uninstall/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/monitoring/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/obsidian/compat-report/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/obsidian/import/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/recent-files/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/restart/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/search/prewarm/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/settings/list-models/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/settings/reset-token/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/settings/test-key/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/setup/check-path/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/setup/check-port/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/setup/generate-token/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/setup/ls/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/setup/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/space-overview/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/sync/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/tree-version/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/uninstall/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/update-check/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/update-status/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/workflows/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/capture/history/page.js +1 -1
- package/_standalone/.next/server/app/capture/history/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/capture/history/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/capture/page.js +1 -1
- package/_standalone/.next/server/app/capture/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/capture/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/changelog/page.js +1 -1
- package/_standalone/.next/server/app/changelog/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/changelog/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/changes/page.js +1 -1
- package/_standalone/.next/server/app/changes/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/changes/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/echo/[segment]/page.js +1 -1
- package/_standalone/.next/server/app/echo/[segment]/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/echo/[segment]/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/echo/page.js +1 -1
- package/_standalone/.next/server/app/echo/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/echo/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/explore/page.js +1 -1
- package/_standalone/.next/server/app/explore/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/explore/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/help/page.js +1 -1
- package/_standalone/.next/server/app/help/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/help/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/inbox/history/page.js +1 -1
- package/_standalone/.next/server/app/inbox/history/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/inbox/history/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/login/page.js +1 -1
- package/_standalone/.next/server/app/login/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/page.js +1 -1
- package/_standalone/.next/server/app/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/setup/page.js +1 -1
- package/_standalone/.next/server/app/setup/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/todo/page.js +1 -1
- package/_standalone/.next/server/app/todo/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/todo/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/trash/page.js +2 -2
- package/_standalone/.next/server/app/trash/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/view/[...path]/page.js +2 -2
- package/_standalone/.next/server/app/view/[...path]/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/view/[...path]/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/wiki/page.js +2 -0
- package/_standalone/.next/server/app/wiki/page.js.nft.json +1 -0
- package/_standalone/.next/server/app/wiki/page_client-reference-manifest.js +1 -0
- package/_standalone/.next/server/app-paths-manifest.json +19 -19
- package/_standalone/.next/server/chunks/2250.js +1 -1
- package/_standalone/.next/server/chunks/{1057.js → 3861.js} +2 -2
- package/_standalone/.next/server/chunks/4802.js +30 -30
- package/_standalone/.next/server/chunks/8388.js +1 -1
- package/_standalone/.next/server/middleware-build-manifest.js +1 -1
- package/_standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/_standalone/.next/server/pages/500.html +2 -2
- package/_standalone/.next/server/server-reference-manifest.js +1 -1
- package/_standalone/.next/server/server-reference-manifest.json +1 -1
- package/_standalone/.next/static/chunks/{5581-bae715e40d227b5f.js → 5581-beecbc4ca5625aa9.js} +2 -2
- package/_standalone/.next/static/chunks/6762.c871d0bf3f45ba87.js +1 -0
- package/_standalone/.next/static/chunks/{8064-e65acd2762132099.js → 8064-acac37daf946082b.js} +1 -1
- package/_standalone/.next/static/chunks/{3985.695651f6b5cd768c.js → 8984.91fb8cde1983c564.js} +2 -2
- package/_standalone/.next/static/chunks/app/{layout-0cf6f2a65f605a0d.js → layout-20faba3bc0af7cd2.js} +19 -19
- package/_standalone/.next/static/chunks/app/trash/page-0c2c67929b71ef71.js +1 -0
- package/_standalone/.next/static/chunks/app/view/[...path]/not-found-fd06cc989103ebe7.js +1 -0
- package/_standalone/.next/static/chunks/app/view/[...path]/page-dba70888697ba910.js +12 -0
- package/_standalone/.next/static/chunks/app/wiki/page-9bc1fec84d343290.js +14 -0
- package/_standalone/.next/static/chunks/webpack-3c1d0331f1da64b8.js +1 -0
- package/_standalone/.next/trace +97 -97
- package/_standalone/MINDOS_ARCHITECTURE_DIAGRAM.md +488 -0
- package/_standalone/MINDOS_EXPLORATION_SUMMARY.md +229 -0
- package/_standalone/MINDOS_INFRASTRUCTURE_ANALYSIS.md +732 -0
- package/_standalone/__tests__/api/mcp-install.test.ts +8 -2
- package/_standalone/__tests__/core/embedding-provider.test.ts +78 -0
- package/_standalone/__tests__/skills/mindos-skill-copy-alignment.test.ts +10 -4
- package/_standalone/components/ask/AskHeader.tsx +25 -18
- package/_standalone/components/ask/SessionHistoryPanel.tsx +21 -12
- package/_standalone/components/settings/AiTab.tsx +3 -0
- package/_standalone/data/skills/mindos/SKILL.md +269 -0
- package/_standalone/data/skills/mindos/references/write-supplement.md +119 -0
- package/_standalone/data/skills/mindos-zh/SKILL.md +227 -0
- package/_standalone/data/skills/mindos-zh/references/write-supplement.md +119 -0
- package/app/__tests__/api/mcp-install.test.ts +8 -2
- package/app/__tests__/core/embedding-provider.test.ts +78 -0
- package/app/__tests__/skills/mindos-skill-copy-alignment.test.ts +10 -4
- package/app/app/api/ask/route.ts +14 -9
- package/app/app/view/[...path]/ViewPageClient.tsx +15 -12
- package/app/app/view/[...path]/not-found.tsx +9 -5
- package/app/components/ask/AskHeader.tsx +25 -18
- package/app/components/ask/SessionHistoryPanel.tsx +21 -12
- package/app/components/settings/AiTab.tsx +3 -0
- package/app/eslint.config.mjs +18 -0
- package/app/lib/core/embedding-provider.ts +12 -4
- package/app/lib/i18n/modules/settings.ts +2 -0
- package/app/package-lock.json +20214 -0
- package/app/tsconfig.tsbuildinfo +1 -0
- package/app/vitest.config.ts +14 -0
- package/assets/demo-flow-zh.html +622 -0
- package/assets/images/demo-flow-dark.png +0 -0
- package/assets/images/demo-flow-dark.webp +0 -0
- package/assets/images/demo-flow-light.png +0 -0
- package/assets/images/demo-flow-light.webp +0 -0
- package/assets/images/demo-flow-zh-dark.png +0 -0
- package/assets/images/demo-flow-zh-dark.webp +0 -0
- package/assets/images/demo-flow-zh-light.png +0 -0
- package/assets/images/demo-flow-zh-light.webp +0 -0
- package/assets/images/gui-sync-cv.png +0 -0
- package/assets/images/gui-sync-cv.webp +0 -0
- package/assets/images/mindos-chat.png +0 -0
- package/assets/images/mindos-chat.webp +0 -0
- package/assets/images/mindos-dashboard.png +0 -0
- package/assets/images/mindos-dashboard.webp +0 -0
- package/assets/images/mindos-echo.png +0 -0
- package/assets/images/mindos-echo.webp +0 -0
- package/assets/images/mindos-home.png +0 -0
- package/assets/images/mindos-home.webp +0 -0
- package/assets/images/wechat-qr.png +0 -0
- package/bin/lib/mcp-build.js +8 -0
- package/mcp/package-lock.json +2202 -0
- package/mcp/src/index.ts +783 -0
- package/package.json +13 -1
- package/.env.local.example +0 -38
- package/.playwright-cli/page-2026-04-12T12-26-53-393Z.yml +0 -6
- package/.playwright-cli/page-2026-04-12T12-27-20-256Z.yml +0 -120
- package/.syncinclude +0 -105
- package/MINDOS_SEARCH_DIAGRAM.txt +0 -243
- package/_standalone/.next/static/chunks/576.3cae31209383ddbd.js +0 -1
- package/_standalone/.next/static/chunks/app/trash/page-085f121c0815d542.js +0 -1
- package/_standalone/.next/static/chunks/app/view/[...path]/not-found-2a6eec67e91eaaf9.js +0 -1
- package/_standalone/.next/static/chunks/app/view/[...path]/page-faeaf8c09c1c6d7c.js +0 -12
- package/_standalone/.next/static/chunks/webpack-a1bb35f2d540e463.js +0 -1
- package/scripts/build-runtime-archive.sh +0 -151
- package/scripts/fix-postcss-deps.cjs +0 -75
- package/scripts/gen-renderer-index.js +0 -64
- package/scripts/hooks/block-public-merge.sh +0 -42
- package/scripts/hooks/pre-merge-commit +0 -4
- package/scripts/hooks/pre-push +0 -37
- package/scripts/hooks/prepare-commit-msg +0 -12
- package/scripts/migrate-agent-audit-log.js +0 -170
- package/scripts/migrate-agent-diff.js +0 -146
- package/scripts/parse-syncinclude.sh +0 -92
- package/scripts/prepare-standalone.mjs +0 -83
- package/scripts/release.sh +0 -145
- package/scripts/setup.js +0 -1427
- package/scripts/test-oss-upload.sh +0 -100
- package/scripts/verify-standalone.mjs +0 -129
- package/scripts/write-build-stamp.js +0 -40
- /package/_standalone/.next/static/{q5RP_Mx8BrCfvVDnLpRRc → 0UlbV2rA2i4B-8YYg41wQ}/_buildManifest.js +0 -0
- /package/_standalone/.next/static/{q5RP_Mx8BrCfvVDnLpRRc → 0UlbV2rA2i4B-8YYg41wQ}/_ssgManifest.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geminilight/mindos",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"description": "MindOS — Human-Agent Collaborative Mind System. Local-first knowledge base that syncs your mind to all AI Agents via MCP.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mindos",
|
|
@@ -26,6 +26,18 @@
|
|
|
26
26
|
"bin": {
|
|
27
27
|
"mindos": "bin/cli.js"
|
|
28
28
|
},
|
|
29
|
+
"files": [
|
|
30
|
+
"bin/",
|
|
31
|
+
"app/",
|
|
32
|
+
"mcp/",
|
|
33
|
+
"assets/",
|
|
34
|
+
"skills/",
|
|
35
|
+
"templates/",
|
|
36
|
+
"_standalone/",
|
|
37
|
+
"README.md",
|
|
38
|
+
"README_zh.md",
|
|
39
|
+
"LICENSE"
|
|
40
|
+
],
|
|
29
41
|
"scripts": {
|
|
30
42
|
"prepack": "rm -rf _standalone && cd mcp && npm install --include=dev && npm run build && cd ../app && npm install --no-workspaces && NODE_OPTIONS=\"--max-old-space-size=8192\" ./node_modules/.bin/next build --webpack && cd .. && node scripts/prepare-standalone.mjs && rm -rf app/node_modules app/.next mcp/node_modules _standalone/node_modules",
|
|
31
43
|
"setup": "node scripts/setup.js",
|
package/.env.local.example
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# MindOS Environment Variables Reference
|
|
2
|
-
#
|
|
3
|
-
# These variables are normally managed automatically via `mindos init`,
|
|
4
|
-
# which writes them to ~/.mindos/config.json and injects them at startup.
|
|
5
|
-
#
|
|
6
|
-
# You can override any variable by setting it in your shell environment
|
|
7
|
-
# before running `mindos dev` / `mindos start`. Shell env vars take precedence
|
|
8
|
-
# over ~/.mindos/config.json.
|
|
9
|
-
#
|
|
10
|
-
# Manual setup (advanced): copy this file to .env.local and fill in the values.
|
|
11
|
-
# This is only needed if you run `next dev` directly instead of `mindos dev`.
|
|
12
|
-
|
|
13
|
-
# Knowledge base root directory (absolute path)
|
|
14
|
-
MIND_ROOT=/path/to/my-mind
|
|
15
|
-
|
|
16
|
-
# Web app port (default: 3456)
|
|
17
|
-
MINDOS_WEB_PORT=3456
|
|
18
|
-
|
|
19
|
-
# AI Provider: "anthropic" (default) or "openai"
|
|
20
|
-
AI_PROVIDER=anthropic
|
|
21
|
-
|
|
22
|
-
# Anthropic
|
|
23
|
-
ANTHROPIC_API_KEY=sk-ant-...
|
|
24
|
-
ANTHROPIC_MODEL=claude-sonnet-4-6
|
|
25
|
-
|
|
26
|
-
# OpenAI (if AI_PROVIDER=openai)
|
|
27
|
-
# OPENAI_API_KEY=sk-...
|
|
28
|
-
# OPENAI_MODEL=gpt-5.4
|
|
29
|
-
# OPENAI_BASE_URL= # only needed for proxies or OpenAI-compatible endpoints
|
|
30
|
-
|
|
31
|
-
# Optional: protect /api/* and MCP HTTP /mcp with bearer token auth.
|
|
32
|
-
# When set, all requests must include "Authorization: Bearer <token>".
|
|
33
|
-
# Strongly recommended when the app is exposed to a network.
|
|
34
|
-
# AUTH_TOKEN=your-secret-token
|
|
35
|
-
|
|
36
|
-
# Optional: protect the web UI with a password (separate from AUTH_TOKEN).
|
|
37
|
-
# When set, visiting the app in a browser requires entering this password first.
|
|
38
|
-
# WEB_PASSWORD=your-ui-password
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
- generic [ref=e2]:
|
|
2
|
-
- heading "Example Domain" [level=1] [ref=e3]
|
|
3
|
-
- paragraph [ref=e4]: This domain is for use in documentation examples without needing permission. Avoid use in operations.
|
|
4
|
-
- paragraph [ref=e5]:
|
|
5
|
-
- link "Learn more" [ref=e6] [cursor=pointer]:
|
|
6
|
-
- /url: https://iana.org/domains/example
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
- generic [active] [ref=e1]:
|
|
2
|
-
- banner [ref=e2]:
|
|
3
|
-
- generic [ref=e3]:
|
|
4
|
-
- link "Homepage" [ref=e5] [cursor=pointer]:
|
|
5
|
-
- /url: /
|
|
6
|
-
- img "Homepage" [ref=e6]
|
|
7
|
-
- generic [ref=e7]:
|
|
8
|
-
- list:
|
|
9
|
-
- listitem [ref=e8]:
|
|
10
|
-
- link "Domains" [ref=e9] [cursor=pointer]:
|
|
11
|
-
- /url: /domains
|
|
12
|
-
- listitem [ref=e10]:
|
|
13
|
-
- link "Protocols" [ref=e11] [cursor=pointer]:
|
|
14
|
-
- /url: /protocols
|
|
15
|
-
- listitem [ref=e12]:
|
|
16
|
-
- link "Numbers" [ref=e13] [cursor=pointer]:
|
|
17
|
-
- /url: /numbers
|
|
18
|
-
- listitem [ref=e14]:
|
|
19
|
-
- link "About" [ref=e15] [cursor=pointer]:
|
|
20
|
-
- /url: /about
|
|
21
|
-
- article [ref=e17]:
|
|
22
|
-
- main [ref=e18]:
|
|
23
|
-
- generic [ref=e19]:
|
|
24
|
-
- heading "Example Domains" [level=1] [ref=e20]
|
|
25
|
-
- paragraph [ref=e21]:
|
|
26
|
-
- text: As described in
|
|
27
|
-
- link "RFC 2606" [ref=e22] [cursor=pointer]:
|
|
28
|
-
- /url: /go/rfc2606
|
|
29
|
-
- text: and
|
|
30
|
-
- link "RFC 6761" [ref=e23] [cursor=pointer]:
|
|
31
|
-
- /url: /go/rfc6761
|
|
32
|
-
- text: ", a number of domains such as example.com and example.org are maintained for documentation purposes. These domains may be used as illustrative examples in documents without prior coordination with us. They are not available for registration or transfer."
|
|
33
|
-
- paragraph [ref=e24]: We provide a web service on the example domain hosts to provide basic information on the purpose of the domain. These web services are provided as best effort, but are not designed to support production applications. While incidental traffic for incorrectly configured applications is expected, please do not design applications that require the example domains to have operating HTTP service.
|
|
34
|
-
- heading "Further Reading" [level=2] [ref=e25]
|
|
35
|
-
- list [ref=e26]:
|
|
36
|
-
- listitem [ref=e27]:
|
|
37
|
-
- link "IANA-managed Reserved Domains" [ref=e28] [cursor=pointer]:
|
|
38
|
-
- /url: /domains/reserved
|
|
39
|
-
- generic [ref=e29]: Last revised 2017-05-13.
|
|
40
|
-
- navigation
|
|
41
|
-
- contentinfo [ref=e30]:
|
|
42
|
-
- generic [ref=e31]:
|
|
43
|
-
- table [ref=e32]:
|
|
44
|
-
- rowgroup [ref=e33]:
|
|
45
|
-
- row "Domain Names Root Zone Registry .INT Registry .ARPA Registry IDN Repository" [ref=e34]:
|
|
46
|
-
- cell "Domain Names" [ref=e35]:
|
|
47
|
-
- link "Domain Names" [ref=e36] [cursor=pointer]:
|
|
48
|
-
- /url: /domains
|
|
49
|
-
- cell "Root Zone Registry .INT Registry .ARPA Registry IDN Repository" [ref=e37]:
|
|
50
|
-
- list:
|
|
51
|
-
- listitem [ref=e38]:
|
|
52
|
-
- link "Root Zone Registry" [ref=e39] [cursor=pointer]:
|
|
53
|
-
- /url: /domains/root
|
|
54
|
-
- listitem [ref=e40]:
|
|
55
|
-
- link ".INT Registry" [ref=e41] [cursor=pointer]:
|
|
56
|
-
- /url: /domains/int
|
|
57
|
-
- listitem [ref=e42]:
|
|
58
|
-
- link ".ARPA Registry" [ref=e43] [cursor=pointer]:
|
|
59
|
-
- /url: /domains/arpa
|
|
60
|
-
- listitem [ref=e44]:
|
|
61
|
-
- link "IDN Repository" [ref=e45] [cursor=pointer]:
|
|
62
|
-
- /url: /domains/idn-tables
|
|
63
|
-
- row "Number Resources Abuse Information" [ref=e46]:
|
|
64
|
-
- cell "Number Resources" [ref=e47]:
|
|
65
|
-
- link "Number Resources" [ref=e48] [cursor=pointer]:
|
|
66
|
-
- /url: /numbers
|
|
67
|
-
- cell "Abuse Information" [ref=e49]:
|
|
68
|
-
- list:
|
|
69
|
-
- listitem [ref=e50]:
|
|
70
|
-
- link "Abuse Information" [ref=e51] [cursor=pointer]:
|
|
71
|
-
- /url: /abuse
|
|
72
|
-
- row "Protocols Protocol Registries Time Zone Database" [ref=e52]:
|
|
73
|
-
- cell "Protocols" [ref=e53]:
|
|
74
|
-
- link "Protocols" [ref=e54] [cursor=pointer]:
|
|
75
|
-
- /url: /protocols
|
|
76
|
-
- cell "Protocol Registries Time Zone Database" [ref=e55]:
|
|
77
|
-
- list:
|
|
78
|
-
- listitem [ref=e56]:
|
|
79
|
-
- link "Protocol Registries" [ref=e57] [cursor=pointer]:
|
|
80
|
-
- /url: /protocols
|
|
81
|
-
- listitem [ref=e58]:
|
|
82
|
-
- link "Time Zone Database" [ref=e59] [cursor=pointer]:
|
|
83
|
-
- /url: /time-zones
|
|
84
|
-
- row "About Us News Performance Excellence Archive Contact Us" [ref=e60]:
|
|
85
|
-
- cell "About Us" [ref=e61]:
|
|
86
|
-
- link "About Us" [ref=e62] [cursor=pointer]:
|
|
87
|
-
- /url: /about
|
|
88
|
-
- cell "News Performance Excellence Archive Contact Us" [ref=e63]:
|
|
89
|
-
- list:
|
|
90
|
-
- listitem [ref=e64]:
|
|
91
|
-
- link "News" [ref=e65] [cursor=pointer]:
|
|
92
|
-
- /url: /news
|
|
93
|
-
- listitem [ref=e66]:
|
|
94
|
-
- link "Performance" [ref=e67] [cursor=pointer]:
|
|
95
|
-
- /url: /performance
|
|
96
|
-
- listitem [ref=e68]:
|
|
97
|
-
- link "Excellence" [ref=e69] [cursor=pointer]:
|
|
98
|
-
- /url: /about/excellence
|
|
99
|
-
- listitem [ref=e70]:
|
|
100
|
-
- link "Archive" [ref=e71] [cursor=pointer]:
|
|
101
|
-
- /url: /archive
|
|
102
|
-
- listitem [ref=e72]:
|
|
103
|
-
- link "Contact Us" [ref=e73] [cursor=pointer]:
|
|
104
|
-
- /url: /contact
|
|
105
|
-
- paragraph [ref=e75]:
|
|
106
|
-
- text: The IANA functions coordinate the Internet’s globally unique identifiers, and are provided by
|
|
107
|
-
- link "Public Technical Identifiers" [ref=e76] [cursor=pointer]:
|
|
108
|
-
- /url: https://pti.icann.org
|
|
109
|
-
- text: ", an affiliate of"
|
|
110
|
-
- link "ICANN" [ref=e77] [cursor=pointer]:
|
|
111
|
-
- /url: https://www.icann.org/
|
|
112
|
-
- text: .
|
|
113
|
-
- generic [ref=e78]:
|
|
114
|
-
- list:
|
|
115
|
-
- listitem [ref=e79]:
|
|
116
|
-
- link "Privacy Policy" [ref=e80] [cursor=pointer]:
|
|
117
|
-
- /url: https://www.icann.org/privacy/policy
|
|
118
|
-
- listitem [ref=e81]:
|
|
119
|
-
- link "Terms of Service" [ref=e82] [cursor=pointer]:
|
|
120
|
-
- /url: https://www.icann.org/privacy/tos
|
package/.syncinclude
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
# Public Sync Whitelist
|
|
2
|
-
# =====================
|
|
3
|
-
# Single source of truth: only paths listed here are synced to GeminiLight/MindOS.
|
|
4
|
-
# Everything else in mindos-dev stays PRIVATE by default.
|
|
5
|
-
#
|
|
6
|
-
# Consumed by: scripts/parse-syncinclude.sh → CI workflow + pre-push hook
|
|
7
|
-
# Modify with care — changes affect what becomes PUBLIC.
|
|
8
|
-
|
|
9
|
-
# ─── Directories to sync ─────────────────────────────────────────────────────
|
|
10
|
-
# Only these top-level directories are copied to public repo.
|
|
11
|
-
# New directories are PRIVATE until explicitly added here.
|
|
12
|
-
directories:
|
|
13
|
-
- app
|
|
14
|
-
- mcp
|
|
15
|
-
- desktop
|
|
16
|
-
- shared
|
|
17
|
-
- skills
|
|
18
|
-
- templates
|
|
19
|
-
- assets
|
|
20
|
-
- bin
|
|
21
|
-
- scripts
|
|
22
|
-
- tests
|
|
23
|
-
- docs
|
|
24
|
-
- wiki
|
|
25
|
-
- browser-extension
|
|
26
|
-
|
|
27
|
-
# ─── Root files to sync ──────────────────────────────────────────────────────
|
|
28
|
-
# Only these individual files at the repo root are copied.
|
|
29
|
-
# New root files are PRIVATE until explicitly added here.
|
|
30
|
-
root_files:
|
|
31
|
-
- package.json
|
|
32
|
-
- package-lock.json
|
|
33
|
-
- README.md
|
|
34
|
-
- README_zh.md
|
|
35
|
-
- LICENSE
|
|
36
|
-
- AGENTS.md
|
|
37
|
-
- CLAUDE.md
|
|
38
|
-
- .env.local.example
|
|
39
|
-
- TROUBLESHOOTING.md
|
|
40
|
-
- .gitignore
|
|
41
|
-
|
|
42
|
-
# ─── Wiki exclusions ─────────────────────────────────────────────────────────
|
|
43
|
-
# Even though wiki/ is whitelisted above, these patterns within it are excluded.
|
|
44
|
-
wiki_exclude:
|
|
45
|
-
- "0*.md"
|
|
46
|
-
- specs/
|
|
47
|
-
- discussions/
|
|
48
|
-
- reviews/
|
|
49
|
-
- 85-backlog.md
|
|
50
|
-
- project-status-report.md
|
|
51
|
-
- implementation-roadmap.md
|
|
52
|
-
- architecture-review-summary.md
|
|
53
|
-
- "ui-audit-*.md"
|
|
54
|
-
|
|
55
|
-
# ─── Global rsync exclusions ─────────────────────────────────────────────────
|
|
56
|
-
# Applied to every directory sync. Build artifacts and tool dirs.
|
|
57
|
-
global_exclude:
|
|
58
|
-
- node_modules/
|
|
59
|
-
- .next/
|
|
60
|
-
- .claude/
|
|
61
|
-
- dist/
|
|
62
|
-
- dist-electron/
|
|
63
|
-
- dist-renderer/
|
|
64
|
-
- TASKS.md
|
|
65
|
-
|
|
66
|
-
# ─── Blocked patterns (defense-in-depth) ─────────────────────────────────────
|
|
67
|
-
# Even if the whitelist is misconfigured, these patterns ALWAYS block the sync.
|
|
68
|
-
# CI aborts with an error if any of these appear in the staged public commit.
|
|
69
|
-
blocked_patterns:
|
|
70
|
-
- startup/
|
|
71
|
-
- .claude-internal/
|
|
72
|
-
- .claude/
|
|
73
|
-
- marketing/
|
|
74
|
-
- human-insights/
|
|
75
|
-
- my-skills/
|
|
76
|
-
- activities/
|
|
77
|
-
- "0_TASKS"
|
|
78
|
-
- "0_BUGS"
|
|
79
|
-
- "0_DONE"
|
|
80
|
-
- "0_NOTE"
|
|
81
|
-
- "0_TEST"
|
|
82
|
-
- "0_TODO"
|
|
83
|
-
- SKILL_BAD_CASES
|
|
84
|
-
- AUTONOMOUS-WORKFLOW
|
|
85
|
-
- HUMAN-INSIGHTS.md
|
|
86
|
-
- MULTI_AGENT_WORKFLOW
|
|
87
|
-
- Dockerfile
|
|
88
|
-
- docker-compose
|
|
89
|
-
- .npmrc
|
|
90
|
-
- .dockerignore
|
|
91
|
-
- .gitignore.prod
|
|
92
|
-
- .vscode/
|
|
93
|
-
- sync-to-mindos.yml
|
|
94
|
-
- ci.yml
|
|
95
|
-
- cli-note.md
|
|
96
|
-
- experience.md
|
|
97
|
-
- knowledge.md
|
|
98
|
-
- npm_experience
|
|
99
|
-
- GIT_UPDATE
|
|
100
|
-
- SERVER_DEV
|
|
101
|
-
- DOCKER.md
|
|
102
|
-
- note.md
|
|
103
|
-
- todo.md
|
|
104
|
-
# NOTE: TODO.md removed from blocked patterns — templates/*/TODO.md is legitimate.
|
|
105
|
-
# Root-level TODO.md is excluded via global_exclude instead.
|
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
================================================================================
|
|
2
|
-
MINDOS SEARCH & RETRIEVAL ARCHITECTURE
|
|
3
|
-
================================================================================
|
|
4
|
-
|
|
5
|
-
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
6
|
-
│ SYSTEM PROMPT LAYER (SKILL.md) │
|
|
7
|
-
├─────────────────────────────────────────────────────────────────────────────┤
|
|
8
|
-
│ │
|
|
9
|
-
│ PROACTIVE BEHAVIOR: │
|
|
10
|
-
│ ├─ (1) Past decisions/discussions exist? → Search MindOS FIRST │
|
|
11
|
-
│ ├─ (2) After valuable work → Offer to save │
|
|
12
|
-
│ └─ (3) Long conversation → Suggest persistence │
|
|
13
|
-
│ │
|
|
14
|
-
│ TRIGGERS: │
|
|
15
|
-
│ ├─ English: save, record, search, organize, run SOP, capture... │
|
|
16
|
-
│ ├─ Chinese: 帮我记下来, 搜一下笔记, 查一下之前的... │
|
|
17
|
-
│ └─ Implicit: "What did we decide?" → SEARCH automatically │
|
|
18
|
-
│ │
|
|
19
|
-
└─────────────────────────────────────────────────────────────────────────────┘
|
|
20
|
-
↓
|
|
21
|
-
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
22
|
-
│ DECISION TREE (Read vs Write) │
|
|
23
|
-
├─────────────────────────────────────────────────────────────────────────────┤
|
|
24
|
-
│ │
|
|
25
|
-
│ Lookup / Summarize / Quote? → [READ-ONLY] │
|
|
26
|
-
│ │ • search → read → answer │
|
|
27
|
-
│ │ • cite file path │
|
|
28
|
-
│ │ │
|
|
29
|
-
│ Save / Record / Update? → [WRITE] │
|
|
30
|
-
│ │ • create/edit files │
|
|
31
|
-
│ │ • sync backlinks │
|
|
32
|
-
│ │ │
|
|
33
|
-
│ Ambiguous? → [ASK] │
|
|
34
|
-
│ • present 2-3 options │
|
|
35
|
-
│ │
|
|
36
|
-
└─────────────────────────────────────────────────────────────────────────────┘
|
|
37
|
-
↓
|
|
38
|
-
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
39
|
-
│ AI TOOL INVOCATION LAYER │
|
|
40
|
-
├─────────────────────────────────────────────────────────────────────────────┤
|
|
41
|
-
│ │
|
|
42
|
-
│ Available Tools: │
|
|
43
|
-
│ ├─ search("query") [PRIMARY - Full-text BM25] │
|
|
44
|
-
│ ├─ list_files(path, depth) [Directory tree browsing] │
|
|
45
|
-
│ ├─ read_file(path) [Load full content] │
|
|
46
|
-
│ ├─ read_file_chunk(path,L1,L2) [Partial read] │
|
|
47
|
-
│ ├─ get_recent(limit) [Recently modified] │
|
|
48
|
-
│ ├─ get_backlinks(path) [References to this file] │
|
|
49
|
-
│ └─ [Write tools...] [Not in read-only mode] │
|
|
50
|
-
│ │
|
|
51
|
-
└─────────────────────────────────────────────────────────────────────────────┘
|
|
52
|
-
↓
|
|
53
|
-
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
54
|
-
│ SEARCH TOOL PIPELINE │
|
|
55
|
-
├─────────────────────────────────────────────────────────────────────────────┤
|
|
56
|
-
│ │
|
|
57
|
-
│ searchFiles(mindRoot, "query", options) │
|
|
58
|
-
│ │ │
|
|
59
|
-
│ ├─→ [1] INDEX INITIALIZATION (Lazy) │
|
|
60
|
-
│ │ ├─ isBuiltFor(mindRoot)? │
|
|
61
|
-
│ │ ├─ YES → Use in-memory index │
|
|
62
|
-
│ │ └─ NO → Try load from ~/.mindos/search-index.json │
|
|
63
|
-
│ │ ├─ SUCCESS → Validate staleness → Use persisted │
|
|
64
|
-
│ │ └─ FAIL → rebuild(mindRoot) → rebuild from scratch │
|
|
65
|
-
│ │ └─ scan all files, tokenize, build inverted │
|
|
66
|
-
│ │ │
|
|
67
|
-
│ ├─→ [2] QUERY TOKENIZATION │
|
|
68
|
-
│ │ ├─ Split on whitespace: "auth bug fix" → ["auth", "bug", "fix"] │
|
|
69
|
-
│ │ ├─ Latin: split non-alpha, filter <2 chars, lowercase │
|
|
70
|
-
│ │ └─ CJK: Intl.Segmenter for word boundaries │
|
|
71
|
-
│ │ (fallback to bigrams if unavailable) │
|
|
72
|
-
│ │ │
|
|
73
|
-
│ ├─→ [3] CANDIDATE FILE SELECTION (UNION) │
|
|
74
|
-
│ │ ├─ getCandidatesUnion(query) │
|
|
75
|
-
│ │ ├─ For each token, get files from inverted index │
|
|
76
|
-
│ │ ├─ UNION all sets (any file matching ANY term) │
|
|
77
|
-
│ │ └─ Result: C candidates << N total files │
|
|
78
|
-
│ │ (massive speedup via inverted index) │
|
|
79
|
-
│ │ │
|
|
80
|
-
│ ├─→ [4] BM25 SCORING (per document) │
|
|
81
|
-
│ │ ├─ For each candidate file: │
|
|
82
|
-
│ │ │ ├─ Read file content │
|
|
83
|
-
│ │ │ ├─ For each query term: │
|
|
84
|
-
│ │ │ │ ├─ Count occurrences (TF) │
|
|
85
|
-
│ │ │ │ ├─ Compute IDF = log((N-df+0.5)/(df+0.5)+1) │
|
|
86
|
-
│ │ │ │ └─ BM25 = IDF × (TF×(K1+1))/(TF+K1×(1-B+B×L/avgL)) │
|
|
87
|
-
│ │ │ │ where K1=1.2, B=0.75 │
|
|
88
|
-
│ │ │ └─ Sum scores across all query terms │
|
|
89
|
-
│ │ │ │
|
|
90
|
-
│ │ ├─ Rare terms score HIGH (low df) │
|
|
91
|
-
│ │ ├─ Common terms score LOW (high df) │
|
|
92
|
-
│ │ └─ Shorter docs rank higher (length normalization) │
|
|
93
|
-
│ │ │
|
|
94
|
-
│ ├─→ [5] SNIPPET EXTRACTION │
|
|
95
|
-
│ │ ├─ Find first match position │
|
|
96
|
-
│ │ ├─ Look for paragraph boundaries (\\n\\n) in context │
|
|
97
|
-
│ │ ├─ Fallback to 200-char window if no boundaries │
|
|
98
|
-
│ │ └─ Extract ~400 chars total around match │
|
|
99
|
-
│ │ │
|
|
100
|
-
│ ├─→ [6] SORT & TRUNCATE │
|
|
101
|
-
│ │ ├─ Sort by BM25 score (descending) │
|
|
102
|
-
│ │ ├─ Return top N results (default: 20, max: 50) │
|
|
103
|
-
│ │ └─ Output: [{path, snippet, score, occurrences}, ...] │
|
|
104
|
-
│ │ │
|
|
105
|
-
│ └─→ [RETURN] Markdown: "- **path**: snippet" │
|
|
106
|
-
│ │
|
|
107
|
-
└─────────────────────────────────────────────────────────────────────────────┘
|
|
108
|
-
↓
|
|
109
|
-
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
110
|
-
│ SEARCH INDEX ARCHITECTURE │
|
|
111
|
-
├─────────────────────────────────────────────────────────────────────────────┤
|
|
112
|
-
│ │
|
|
113
|
-
│ IN-MEMORY INVERTED INDEX: │
|
|
114
|
-
│ ┌──────────────────────────────────────────┐ │
|
|
115
|
-
│ │ Map<token, Set<filePath>> │ │
|
|
116
|
-
│ ├──────────────────────────────────────────┤ │
|
|
117
|
-
│ │ "authentication" → {auth.md, oauth.md} │ │
|
|
118
|
-
│ │ "jwt" → {auth.md} │ │
|
|
119
|
-
│ │ "decision" → {decisions.md, ...} │ │
|
|
120
|
-
│ │ "知识" → {knowledge.md, ...} │ │
|
|
121
|
-
│ └──────────────────────────────────────────┘ │
|
|
122
|
-
│ │
|
|
123
|
-
│ BM25 STATISTICS: │
|
|
124
|
-
│ ├─ docLengths: Map<filePath, charCount> │
|
|
125
|
-
│ ├─ totalChars: sum of all document lengths │
|
|
126
|
-
│ ├─ fileCount: number of indexed files │
|
|
127
|
-
│ └─ avgDocLength = totalChars / fileCount │
|
|
128
|
-
│ │
|
|
129
|
-
│ REVERSE MAP (for incremental updates): │
|
|
130
|
-
│ ├─ fileTokens: Map<filePath, Set<token>> │
|
|
131
|
-
│ └─ Enables O(tokens-in-file) removal instead of O(all-tokens) │
|
|
132
|
-
│ │
|
|
133
|
-
│ PERSISTENCE: │
|
|
134
|
-
│ ├─ Location: ~/.mindos/search-index.json │
|
|
135
|
-
│ ├─ Format: JSON {version, builtForRoot, fileCount, docLengths, index} │
|
|
136
|
-
│ ├─ Staleness checks: │
|
|
137
|
-
│ │ ├─ Version & root must match │
|
|
138
|
-
│ │ ├─ File count must match (detects adds/deletes) │
|
|
139
|
-
│ │ └─ Sampled mtimes must be ≤ index timestamp │
|
|
140
|
-
│ └─ 5-second debounced write after modifications │
|
|
141
|
-
│ │
|
|
142
|
-
└─────────────────────────────────────────────────────────────────────────────┘
|
|
143
|
-
↓
|
|
144
|
-
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
145
|
-
│ INCREMENTAL INDEX UPDATES │
|
|
146
|
-
├─────────────────────────────────────────────────────────────────────────────┤
|
|
147
|
-
│ │
|
|
148
|
-
│ FILE WRITE: │
|
|
149
|
-
│ └─ updateSearchIndexFile(mindRoot, filePath) │
|
|
150
|
-
│ ├─ Remove old tokens from inverted index (via reverse map) │
|
|
151
|
-
│ ├─ Read new file content │
|
|
152
|
-
│ ├─ Tokenize & add to inverted index │
|
|
153
|
-
│ └─ Update docLengths, BM25 stats │
|
|
154
|
-
│ Complexity: O(tokens-in-file) ≪ O(all-files) │
|
|
155
|
-
│ │
|
|
156
|
-
│ FILE CREATE: │
|
|
157
|
-
│ └─ addSearchIndexFile(mindRoot, filePath) │
|
|
158
|
-
│ ├─ Read new file │
|
|
159
|
-
│ ├─ Tokenize & add to inverted index │
|
|
160
|
-
│ └─ Update counts │
|
|
161
|
-
│ │
|
|
162
|
-
│ FILE DELETE: │
|
|
163
|
-
│ └─ removeSearchIndexFile(filePath) │
|
|
164
|
-
│ ├─ Get tokens from reverse map │
|
|
165
|
-
│ ├─ Remove filePath from each token's set │
|
|
166
|
-
│ └─ Update stats │
|
|
167
|
-
│ │
|
|
168
|
-
└─────────────────────────────────────────────────────────────────────────────┘
|
|
169
|
-
↓
|
|
170
|
-
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
171
|
-
│ FILE TREE NAVIGATION │
|
|
172
|
-
├─────────────────────────────────────────────────────────────────────────────┤
|
|
173
|
-
│ │
|
|
174
|
-
│ list_files(path?, depth?) → │
|
|
175
|
-
│ ├─ Build hierarchical tree via getFileTree() │
|
|
176
|
-
│ ├─ Filter ignored dirs: .git, node_modules, .next, app, .DS_Store, mcp │
|
|
177
|
-
│ ├─ Include only: .md, .csv files │
|
|
178
|
-
│ ├─ Sort: directories first, then alphabetical │
|
|
179
|
-
│ ├─ Show nested structure up to depth (default: 3) │
|
|
180
|
-
│ └─ Beyond depth: "... (N items)" │
|
|
181
|
-
│ │
|
|
182
|
-
│ collectAllFiles() → │
|
|
183
|
-
│ ├─ Flat list of all file paths │
|
|
184
|
-
│ ├─ Used by search as initial candidate list │
|
|
185
|
-
│ └─ Respects ignored dirs & system files │
|
|
186
|
-
│ │
|
|
187
|
-
│ EXAMPLE OUTPUT (depth=2): │
|
|
188
|
-
│ └─ Decisions/ │
|
|
189
|
-
│ ├─ Architecture/ │
|
|
190
|
-
│ │ ├─ authentication.md │
|
|
191
|
-
│ │ └─ database.md │
|
|
192
|
-
│ └─ Meetings/ │
|
|
193
|
-
│ └─ ... (5 items) │
|
|
194
|
-
│ │
|
|
195
|
-
└─────────────────────────────────────────────────────────────────────────────┘
|
|
196
|
-
↓
|
|
197
|
-
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
198
|
-
│ READ-ONLY ANSWER PATH │
|
|
199
|
-
├─────────────────────────────────────────────────────────────────────────────┤
|
|
200
|
-
│ │
|
|
201
|
-
│ [Search results received] │
|
|
202
|
-
│ ↓ │
|
|
203
|
-
│ 1. AI selects relevant results (top 1-3) │
|
|
204
|
-
│ ↓ │
|
|
205
|
-
│ 2. read_file(path) for full content of top results │
|
|
206
|
-
│ ↓ │
|
|
207
|
-
│ 3. Extract relevant excerpt (max 20k chars per file) │
|
|
208
|
-
│ ↓ │
|
|
209
|
-
│ 4. Generate answer with CITATIONS │
|
|
210
|
-
│ Example: "Based on Decisions/Architecture/authentication.md, you │
|
|
211
|
-
│ decided to use JWT tokens because..." │
|
|
212
|
-
│ ↓ │
|
|
213
|
-
│ 5. Return answer with file paths cited │
|
|
214
|
-
│ │
|
|
215
|
-
└─────────────────────────────────────────────────────────────────────────────┘
|
|
216
|
-
|
|
217
|
-
================================================================================
|
|
218
|
-
PERFORMANCE SUMMARY
|
|
219
|
-
================================================================================
|
|
220
|
-
|
|
221
|
-
Search Complexity:
|
|
222
|
-
├─ Index rebuild: O(N·T) [N files, T tokens/file, lazy one-time]
|
|
223
|
-
├─ Index lookup: O(log T) [Token map lookup]
|
|
224
|
-
├─ Candidate narrow: O(C) [C candidates << N]
|
|
225
|
-
├─ BM25 scoring: O(C·Q·M) [C candidates, Q terms, M matches/term]
|
|
226
|
-
└─ TOTAL per search: O(C·Q·M) [Fast because C ≪ N]
|
|
227
|
-
|
|
228
|
-
Memory Usage:
|
|
229
|
-
├─ Inverted index: ~50-100 bytes per unique token
|
|
230
|
-
├─ Doc lengths: 8 bytes per file
|
|
231
|
-
├─ File tokens: 2-3× inverted index size
|
|
232
|
-
└─ TYPICAL: 50-500MB for 10k-100k files
|
|
233
|
-
|
|
234
|
-
Optimizations:
|
|
235
|
-
├─ Lazy rebuild on first search (not startup)
|
|
236
|
-
├─ Persistent index (loaded from ~/.mindos/search-index.json)
|
|
237
|
-
├─ Staleness validation (file count & mtime sampling)
|
|
238
|
-
├─ Incremental updates O(tokens-in-file) not O(all-files)
|
|
239
|
-
├─ File system watcher (500ms debounce for real-time invalidation)
|
|
240
|
-
├─ Candidate pruning for high-token queries (e.g., CJK bigrams)
|
|
241
|
-
└─ Snippet extraction (avoids loading full files for UI)
|
|
242
|
-
|
|
243
|
-
================================================================================
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[576],{70576:(e,s,t)=>{t.r(s),t.d(s,{default:()=>h});var a=t(95155),r=t(12115),n=t(47650),i=t(33210),l=t(86901),o=t(41585),c=t(38798),d=t(6296),u=t(73321),m=t(91337),x=t(9339);let p=(0,x.createServerReference)("70ca3bb479db3eb8e727cb8bb2a175833dbd13e573",x.callServer,void 0,x.findSourceMapURL,"createSpaceAction");var b=t(5292),f=t(70620);function h({t:e,dirPaths:s}){let t=(0,u.useRouter)(),[x,h]=(0,r.useState)(!1),[g,v]=(0,r.useState)(""),[N,j]=(0,r.useState)(""),[w,y]=(0,r.useState)(""),[k,S]=(0,r.useState)(!1),[C,A]=(0,r.useState)(""),[E,I]=(0,r.useState)(""),[L,z]=(0,r.useState)(null),[R,D]=(0,r.useState)(!0),K=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=()=>{h(!0),A(""),I(""),setTimeout(()=>K.current?.focus(),80)};return window.addEventListener("mindos:create-space",e),()=>window.removeEventListener("mindos:create-space",e)},[]),(0,r.useEffect)(()=>{x&&null===L&&(0,b.w)().then(e=>{z(e),D(e)})},[x,L]);let M=(0,r.useCallback)(()=>{h(!1),v(""),j(""),y(""),A(""),I(""),z(null)},[]),P=(0,r.useCallback)(s=>s.includes("/")||s.includes("\\")?(I(e.home.spaceNameNoSlash??"Name cannot contain / or \\"),!1):(I(""),!0),[e]),T=(0,r.useMemo)(()=>{let e=g.trim();return e?(w?w+"/":"")+e+"/":""},[g,w]),$=(0,r.useCallback)(async()=>{if(!g.trim()||k||!P(g))return;S(!0),A("");let s=g.trim(),a=await p(s,N,w);if(a.success){let e=a.path??s;R&&L&&(0,b.V)(s,e,N),M(),t.refresh(),window.dispatchEvent(new Event("mindos:files-changed")),t.push(`/view/${(0,m.O0)(e+"/")}`)}else(a.error??"").includes("already exists")?A(e.home.spaceExists??"A space with this name already exists"):A(e.home.spaceCreateFailed??"Failed to create space");S(!1)},[g,N,w,k,M,t,e,P,R,L]),_=(0,r.useCallback)(e=>{"Escape"===e.key&&M(),"Enter"===e.key&&!e.shiftKey&&e.target instanceof HTMLInputElement&&(e.preventDefault(),$())},[M,$]);if(!x)return null;let F=e.home;return(0,n.createPortal)((0,a.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",onKeyDown:_,children:[(0,a.jsx)("div",{className:"absolute inset-0 overlay-backdrop",onClick:M}),(0,a.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":F.newSpace,className:"relative w-full max-w-md mx-4 rounded-2xl border border-border bg-card shadow-xl",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-5 pt-5 pb-3",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-foreground",children:F.newSpace}),(0,a.jsx)("button",{onClick:M,className:"p-1 rounded-md text-muted-foreground hover:bg-muted transition-colors",children:(0,a.jsx)(i.A,{size:14})})]}),(0,a.jsxs)("div",{className:"px-5 pb-5 flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:F.spaceLocation??"Location"}),(0,a.jsx)(f.A,{dirPaths:s,value:w,onChange:y,rootLabel:F.rootLevel??"Root"})]}),(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:F.spaceName}),(0,a.jsx)("input",{ref:K,type:"text",value:g,onChange:e=>{v(e.target.value),A(""),P(e.target.value)},placeholder:"e.g. \uD83D\uDCDD Notes",maxLength:80,"aria-invalid":!!E,"aria-describedby":E?"space-name-hint":void 0,className:`w-full px-3 py-2 text-sm rounded-lg border bg-background outline-none transition-colors ${E?"border-error focus-visible:border-error":"border-border focus-visible:ring-1 focus-visible:ring-ring"}`}),E&&(0,a.jsx)("span",{id:"space-name-hint",className:"text-xs text-error",children:E})]}),(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)("label",{className:"text-xs font-medium text-muted-foreground",children:[F.spaceDescription," ",(0,a.jsxs)("span",{className:"opacity-50",children:["(",F.optional??"optional",")"]})]}),(0,a.jsx)("input",{type:"text",value:N,onChange:e=>j(e.target.value),placeholder:F.spaceDescPlaceholder??"Describe the purpose of this space",maxLength:200,className:"w-full px-3 py-2 text-sm rounded-lg border border-border bg-background text-foreground placeholder:text-muted-foreground outline-none focus-visible:ring-1 focus-visible:ring-ring transition-colors"})]}),(0,a.jsxs)("div",{className:"flex items-start gap-2.5 px-1 py-1",children:[(0,a.jsx)("button",{type:"button",role:"switch","aria-checked":R,disabled:!L,title:L?void 0:e.hints.configureAiKey,onClick:()=>D(e=>!e),className:`relative mt-0.5 inline-flex shrink-0 h-4 w-7 cursor-pointer rounded-full border-2 border-transparent transition-colors focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 ${R?"bg-[var(--amber)]":"bg-muted"}`,children:(0,a.jsx)("span",{className:`pointer-events-none inline-block h-3 w-3 rounded-full bg-white shadow-sm transition-transform ${R?"translate-x-3":"translate-x-0"}`})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)(l.A,{size:12,className:"text-[var(--amber)] shrink-0"}),(0,a.jsx)("span",{className:"text-xs font-medium text-foreground",children:F.aiInit??"AI initialize content"})]}),!1===L&&(0,a.jsxs)("p",{className:"text-2xs text-muted-foreground mt-0.5 flex items-center gap-1",children:[(0,a.jsx)(o.A,{size:10,className:"text-[var(--amber)] shrink-0"}),F.aiInitNoKey??"Configure an API key in Settings → AI to enable"]}),L&&R&&(0,a.jsx)("p",{className:"text-2xs text-muted-foreground mt-0.5",children:F.aiInitHint??"AI will generate README and INSTRUCTION for this space"})]})]}),T&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground font-mono px-1",children:[(0,a.jsx)(c.A,{size:12,className:"shrink-0 text-[var(--amber)]"}),(0,a.jsx)("span",{className:"truncate",children:T})]}),C&&(0,a.jsx)("span",{role:"alert",className:"text-xs text-error px-1",children:C}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-1",children:[(0,a.jsx)("button",{onClick:M,className:"px-4 py-2 rounded-lg text-sm font-medium text-muted-foreground transition-colors hover:bg-muted",children:F.cancelCreate}),(0,a.jsxs)("button",{onClick:$,disabled:!g.trim()||k||!!E,className:"flex items-center gap-1.5 px-4 py-2 rounded-lg text-sm font-medium bg-[var(--amber)] text-[var(--amber-foreground)] transition-colors hover:opacity-90 disabled:opacity-50 disabled:cursor-not-allowed",children:[k&&(0,a.jsx)(d.A,{size:14,className:"animate-spin"}),F.createSpace]})]})]})]})]}),document.body)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1227],{1934:(e,t,r)=>{"use strict";r.d(t,{v:()=>i});var s=r(12115);let a=e=>{let t,r=new Set,s=(e,s)=>{let a="function"==typeof e?e(t):e;if(!Object.is(a,t)){let e=t;t=(null!=s?s:"object"!=typeof a||null===a)?a:Object.assign({},t,a),r.forEach(r=>r(t,e))}},a=()=>t,l={setState:s,getState:a,getInitialState:()=>i,subscribe:e=>(r.add(e),()=>r.delete(e))},i=t=e(s,a,l);return l},l=e=>{let t=e?a(e):a,r=e=>(function(e,t=e=>e){let r=s.useSyncExternalStore(e.subscribe,s.useCallback(()=>t(e.getState()),[e,t]),s.useCallback(()=>t(e.getInitialState()),[e,t]));return s.useDebugValue(r),r})(t,e);return Object.assign(r,t),r},i=e=>e?l(e):l},6296:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(90425).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},8784:(e,t,r)=>{"use strict";r.d(t,{default:()=>j});var s=r(95155),a=r(12115),l=r(68459),i=r(38798),n=r(33078),d=r(48368),o=r(41585),c=r(6296),u=r(9199),m=r(33210),h=r(73321),x=r(35581),f=r(9339);let p=(0,f.createServerReference)("60f61cf428093e652184e577c52132a9cc9986be3d",f.callServer,void 0,f.findSourceMapURL,"restoreFromTrashAction"),b=(0,f.createServerReference)("40d56258c510a70c53edd23afa63bfad4a18f95ca8",f.callServer,void 0,f.findSourceMapURL,"permanentlyDeleteAction"),v=(0,f.createServerReference)("0049b0e97dd1acf6f2db1c2846a57a4e3150062163",f.callServer,void 0,f.findSourceMapURL,"emptyTrashAction");var g=r(39498),y=r(4235);function j({initialItems:e}){let{t}=(0,x.Y)(),r=(0,h.useRouter)(),[f,j]=(0,a.useState)(e),[N,k]=(0,a.useTransition)(),[A,w]=(0,a.useState)(!1),[M,C]=(0,a.useState)(null),[S,R]=(0,a.useState)(null),[z,P]=(0,a.useState)(null),L=(0,a.useCallback)(async e=>{P(e.id);try{let s=await p(e.id,"restore");s.success?(j(t=>t.filter(t=>t.id!==e.id)),y.oR.success(t.trash.restored),r.refresh()):s.conflict?R(e):y.oR.error(s.error??t.trash.restoreFailed)}finally{P(null)}},[t,r]),T=(0,a.useCallback)(async e=>{if(!S)return;let s=await p(S.id,e);s.success?(j(e=>e.filter(e=>e.id!==S.id)),y.oR.success(t.trash.restored),R(null),r.refresh()):y.oR.error(s.error??t.trash.restoreFailed)},[S,t,r]),_=(0,a.useCallback)(async()=>{if(!M)return;let e=await b(M.id);e.success?(j(e=>e.filter(e=>e.id!==M.id)),y.oR.success(t.trash.deleted)):y.oR.error(e.error??t.trash.deleteFailed),C(null)},[M,t]),E=(0,a.useCallback)(async()=>{k(async()=>{let e=await v();e.success?(j([]),y.oR.success(t.trash.emptied(e.count??0))):y.oR.error(e.error??t.trash.emptyFailed),w(!1)})},[t]);return(0,s.jsxs)("div",{className:"min-h-screen",children:[(0,s.jsx)("div",{className:"px-4 md:px-6 pt-6 md:pt-8",children:(0,s.jsx)("div",{className:"content-width xl:mr-[220px] rounded-xl border border-border bg-card px-4 py-3 md:px-5 md:py-4",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-foreground",children:[(0,s.jsx)(l.A,{size:15}),t.trash.title]}),(0,s.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:t.trash.subtitle}),f.length>0&&(0,s.jsx)("div",{className:"mt-2 text-xs text-muted-foreground",children:t.trash.itemCount(f.length)})]}),f.length>0&&(0,s.jsx)("button",{type:"button",onClick:()=>w(!0),disabled:N,className:"px-2.5 py-1.5 rounded-md text-xs font-medium bg-error/10 text-error hover:bg-error/20 transition-colors disabled:opacity-50",children:t.trash.emptyTrash})]})})}),(0,s.jsx)("div",{className:"px-4 md:px-6 py-4 md:py-6",children:(0,s.jsx)("div",{className:"content-width xl:mr-[220px]",children:0===f.length?(0,s.jsxs)("div",{className:"rounded-xl border border-border/40 bg-card/30 p-12 text-center",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-12 h-12 rounded-full bg-muted/60 mb-4",children:(0,s.jsx)(l.A,{size:22,className:"text-muted-foreground/40"})}),(0,s.jsx)("p",{className:"text-sm font-medium text-muted-foreground/70",children:t.trash.empty}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground/40 mt-1 max-w-xs mx-auto leading-relaxed",children:t.trash.emptySubtext})]}):(0,s.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:f.map(e=>{let r=Math.max(0,Math.ceil((new Date(e.expiresAt).getTime()-Date.now())/864e5)),a=r<=3;return(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-card p-4 flex flex-col gap-3 hover:border-border/80 transition-colors",children:[(0,s.jsxs)("div",{className:"flex items-start gap-3 min-w-0",children:[(0,s.jsx)("div",{className:"w-9 h-9 rounded-lg bg-muted/50 flex items-center justify-center shrink-0",children:e.isDirectory?(0,s.jsx)(i.A,{size:16,className:"text-muted-foreground"}):e.fileName.endsWith(".csv")?(0,s.jsx)(n.A,{size:16,className:"text-success"}):(0,s.jsx)(d.A,{size:16,className:"text-muted-foreground"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium text-foreground truncate",title:e.fileName,children:e.fileName}),(0,s.jsxs)("p",{className:"text-xs text-muted-foreground truncate mt-0.5",title:e.originalPath,children:[t.trash.from,": ",e.originalPath.split("/").slice(0,-1).join("/")||"/"]})]})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,s.jsx)("span",{className:"text-2xs text-muted-foreground",children:t.trash.deletedAgo(function(e,t){let r=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(r<1)return t.justNow??"just now";if(r<60)return t.minutesAgo?.(r)??`${r}m ago`;let s=Math.floor(r/60);if(s<24)return t.hoursAgo?.(s)??`${s}h ago`;let a=Math.floor(s/24);return t.daysAgo?.(a)??`${a}d ago`}(e.deletedAt,t.trash))}),(0,s.jsxs)("span",{className:`text-2xs ${a?"text-error":"text-muted-foreground/60"}`,children:[a&&(0,s.jsx)(o.A,{size:9,className:"inline mr-0.5"}),t.trash.expiresIn(r)]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>L(e),disabled:z===e.id,className:"inline-flex items-center gap-1 px-2 py-1 rounded-md text-xs font-medium bg-success/10 text-success hover:bg-success/20 transition-colors disabled:opacity-50",children:[z===e.id?(0,s.jsx)(c.A,{size:11,className:"animate-spin"}):(0,s.jsx)(u.A,{size:11}),t.trash.restore]}),(0,s.jsx)("button",{type:"button",onClick:()=>C(e),className:"p-1 rounded-md text-muted-foreground hover:text-error hover:bg-error/10 transition-colors",title:t.trash.deletePermanently,children:(0,s.jsx)(m.A,{size:13})})]})]})]},e.id)})})})}),(0,s.jsx)(g.TM,{open:A,title:t.trash.emptyTrash,message:t.trash.emptyTrashConfirm,confirmLabel:t.trash.emptyTrash,cancelLabel:t.trash.cancel??"Cancel",onConfirm:()=>void E(),onCancel:()=>w(!1),variant:"destructive"}),(0,s.jsx)(g.TM,{open:!!M,title:t.trash.deletePermanently,message:M?t.trash.deletePermanentlyConfirm(M.fileName):"",confirmLabel:t.trash.deletePermanently,cancelLabel:t.trash.cancel??"Cancel",onConfirm:()=>void _(),onCancel:()=>C(null),variant:"destructive"}),S&&(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center modal-backdrop",children:(0,s.jsxs)("div",{className:"bg-card border border-border rounded-xl shadow-xl max-w-sm w-full mx-4 p-5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,s.jsx)(o.A,{size:16,className:"text-[var(--amber)]"}),(0,s.jsx)("h3",{className:"text-sm font-semibold",children:t.trash.restoreConflict})]}),(0,s.jsxs)("p",{className:"text-xs text-muted-foreground mb-4",children:['"',S.fileName,'" — ',S.originalPath]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 justify-end",children:[(0,s.jsx)("button",{type:"button",onClick:()=>R(null),className:"px-3 py-1.5 rounded-md text-xs font-medium text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",children:t.trash.cancel??"Cancel"}),(0,s.jsx)("button",{type:"button",onClick:()=>void T("copy"),className:"px-3 py-1.5 rounded-md text-xs font-medium bg-muted text-foreground hover:bg-muted/80 transition-colors",children:t.trash.saveAsCopy}),(0,s.jsx)("button",{type:"button",onClick:()=>void T("overwrite"),className:"px-3 py-1.5 rounded-md text-xs font-medium bg-[var(--amber-dim)] text-[var(--amber-text)] hover:opacity-80 transition-colors",children:t.trash.overwrite})]})]})})]})}},9199:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(90425).A)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},9339:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={callServer:function(){return l.callServer},createServerReference:function(){return n.createServerReference},findSourceMapURL:function(){return i.findSourceMapURL}};for(var a in s)Object.defineProperty(t,a,{enumerable:!0,get:s[a]});let l=r(77304),i=r(4060),n=r(77197)},33078:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(90425).A)("table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]])},33210:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(90425).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},38798:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(90425).A)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]])},41585:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(90425).A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},48368:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(90425).A)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},51914:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(90425).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},54839:(e,t,r)=>{Promise.resolve().then(r.bind(r,8784))},68459:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(90425).A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},73321:(e,t,r)=>{"use strict";var s=r(74645);r.o(s,"usePathname")&&r.d(t,{usePathname:function(){return s.usePathname}}),r.o(s,"useRouter")&&r.d(t,{useRouter:function(){return s.useRouter}}),r.o(s,"useSearchParams")&&r.d(t,{useSearchParams:function(){return s.useSearchParams}})},90425:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var s=r(12115);let a=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(),l=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let n=(0,s.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:l,className:n="",children:d,iconNode:o,...c},u)=>(0,s.createElement)("svg",{ref:u,...i,width:t,height:t,stroke:e,strokeWidth:l?24*Number(r)/Number(t):r,className:a("lucide",n),...!d&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(c)&&{"aria-hidden":"true"},...c},[...o.map(([e,t])=>(0,s.createElement)(e,t)),...Array.isArray(d)?d:[d]])),d=(e,t)=>{let r=(0,s.forwardRef)(({className:r,...i},d)=>(0,s.createElement)(n,{ref:d,iconNode:t,className:a(`lucide-${l(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,r),...i}));return r.displayName=l(e),r}}},e=>{e.O(0,[5581,8252,8441,3794,7358],()=>e(e.s=54839)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7875],{23074:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>c});var o=r(95155),s=r(73321),n=r(93631),a=r(80723),i=r(66614),d=r(12115),l=r(35581),u=r(91337);function c(){let e=(0,s.usePathname)(),t=(0,s.useRouter)(),{t:r}=(0,l.Y)(),[c,m]=(0,d.useState)(!1),h=e.startsWith("/view/")?decodeURIComponent(e.slice(6)):"",p=h.includes("/")?h.split("/").slice(0,-1).join("/"):"",f=h.endsWith(".md")||!h.includes("."),x=h||"unknown",g=r.notFound,w=async()=>{m(!0);try{let e=f&&!h.includes(".")?`${h}.md`:h;(await fetch("/api/files",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,content:""})})).ok&&(t.replace(`/view/${(0,u.O0)(e)}`),t.refresh())}catch{}finally{m(!1)}};return(0,o.jsxs)("div",{className:"content-width px-4 md:px-6 py-16 md:py-24 flex flex-col items-center text-center",children:[(0,o.jsx)("div",{className:"w-12 h-12 rounded-xl bg-muted flex items-center justify-center mb-6",children:(0,o.jsx)(n.A,{size:24,className:"text-muted-foreground"})}),(0,o.jsx)("h1",{className:"text-lg font-semibold tracking-tight text-foreground mb-2",children:g?.title??"File not found"}),(0,o.jsx)("p",{className:"text-sm text-muted-foreground mb-1",children:(0,o.jsx)("code",{className:"px-1.5 py-0.5 rounded bg-muted font-mono text-xs",children:x})}),(0,o.jsx)("p",{className:"text-sm text-muted-foreground mb-8",children:g?.description??"This file does not exist in your knowledge base."}),(0,o.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-3",children:[f&&(0,o.jsxs)("button",{onClick:w,disabled:c,className:"flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg transition-colors disabled:opacity-50",style:{background:"var(--amber)",color:"var(--amber-foreground)"},children:[(0,o.jsx)(n.A,{size:14}),c?g?.creating??"Creating...":g?.createButton??"Create this file"]}),p&&(0,o.jsxs)("button",{onClick:()=>t.push(`/view/${(0,u.O0)(p)}`),className:"flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg border border-border text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",children:[(0,o.jsx)(a.A,{size:14}),g?.goToParent??"Go to parent folder"]}),(0,o.jsxs)("button",{onClick:()=>t.push("/"),className:"flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg border border-border text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",children:[(0,o.jsx)(i.A,{size:14}),g?.goHome??"Home"]})]})]})}},63381:(e,t,r)=>{Promise.resolve().then(r.bind(r,23074))},66614:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});let o=(0,r(90425).A)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]])},73321:(e,t,r)=>{"use strict";var o=r(74645);r.o(o,"usePathname")&&r.d(t,{usePathname:function(){return o.usePathname}}),r.o(o,"useRouter")&&r.d(t,{useRouter:function(){return o.useRouter}}),r.o(o,"useSearchParams")&&r.d(t,{useSearchParams:function(){return o.useSearchParams}})},80723:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});let o=(0,r(90425).A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},90425:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var o=r(12115);let s=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(),n=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,o.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:d,iconNode:l,...u},c)=>(0,o.createElement)("svg",{ref:c,...a,width:t,height:t,stroke:e,strokeWidth:n?24*Number(r)/Number(t):r,className:s("lucide",i),...!d&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(u)&&{"aria-hidden":"true"},...u},[...l.map(([e,t])=>(0,o.createElement)(e,t)),...Array.isArray(d)?d:[d]])),d=(e,t)=>{let r=(0,o.forwardRef)(({className:r,...a},d)=>(0,o.createElement)(i,{ref:d,iconNode:t,className:s(`lucide-${n(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,r),...a}));return r.displayName=n(e),r}},91337:(e,t,r)=>{"use strict";r.d(t,{IX:()=>d,KW:()=>i,O0:()=>a,cn:()=>n,vr:()=>l});var o=r(29722),s=r(622);function n(...e){return(0,s.QP)((0,o.$)(e))}function a(e){return e.split("/").map(encodeURIComponent).join("/")}function i(e,t){let r=Date.now()-e,o=Math.floor(r/6e4),s=Math.floor(r/36e5),n=Math.floor(r/864e5);return o<1?t.justNow:o<60?t.minutesAgo(o):s<24?t.hoursAgo(s):n<7?t.daysAgo(n):new Date(e).toLocaleDateString()}function d(e){let t=e.match(/^[\p{Emoji_Presentation}\p{Extended_Pictographic}]+/u);return t?.[0]??""}function l(e){return e.replace(/^[\p{Emoji_Presentation}\p{Extended_Pictographic}\s]+/u,"")||e}},93631:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});let o=(0,r(90425).A)("file-plus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]])}},e=>{e.O(0,[854,5581,8441,3794,7358],()=>e(e.s=63381)),_N_E=e.O()}]);
|