memkin 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +191 -0
- package/README.en.md +934 -0
- package/README.md +934 -0
- package/README.zh-CN.md +825 -0
- package/bin/memkin.mjs +41 -0
- package/dist/adapters/file.d.ts +19 -0
- package/dist/adapters/file.d.ts.map +1 -0
- package/dist/adapters/file.js +61 -0
- package/dist/adapters/file.js.map +1 -0
- package/dist/adapters/gbrain.d.ts +29 -0
- package/dist/adapters/gbrain.d.ts.map +1 -0
- package/dist/adapters/gbrain.js +622 -0
- package/dist/adapters/gbrain.js.map +1 -0
- package/dist/adapters/index.d.ts +6 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +5 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/registry.d.ts +18 -0
- package/dist/adapters/registry.d.ts.map +1 -0
- package/dist/adapters/registry.js +18 -0
- package/dist/adapters/registry.js.map +1 -0
- package/dist/adapters/stdout.d.ts +12 -0
- package/dist/adapters/stdout.d.ts.map +1 -0
- package/dist/adapters/stdout.js +29 -0
- package/dist/adapters/stdout.js.map +1 -0
- package/dist/adapters/store.d.ts +47 -0
- package/dist/adapters/store.d.ts.map +1 -0
- package/dist/adapters/store.js +642 -0
- package/dist/adapters/store.js.map +1 -0
- package/dist/cli-helpers.d.ts +12 -0
- package/dist/cli-helpers.d.ts.map +1 -0
- package/dist/cli-helpers.js +11 -0
- package/dist/cli-helpers.js.map +1 -0
- package/dist/cli-stores.d.ts +61 -0
- package/dist/cli-stores.d.ts.map +1 -0
- package/dist/cli-stores.js +130 -0
- package/dist/cli-stores.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +1579 -0
- package/dist/cli.js.map +1 -0
- package/dist/collectors/agent/claude-code.d.ts +12 -0
- package/dist/collectors/agent/claude-code.d.ts.map +1 -0
- package/dist/collectors/agent/claude-code.js +94 -0
- package/dist/collectors/agent/claude-code.js.map +1 -0
- package/dist/collectors/agent/codex.d.ts +16 -0
- package/dist/collectors/agent/codex.d.ts.map +1 -0
- package/dist/collectors/agent/codex.js +149 -0
- package/dist/collectors/agent/codex.js.map +1 -0
- package/dist/collectors/agent/collector.d.ts +20 -0
- package/dist/collectors/agent/collector.d.ts.map +1 -0
- package/dist/collectors/agent/collector.js +108 -0
- package/dist/collectors/agent/collector.js.map +1 -0
- package/dist/collectors/agent/hermes.d.ts +13 -0
- package/dist/collectors/agent/hermes.d.ts.map +1 -0
- package/dist/collectors/agent/hermes.js +90 -0
- package/dist/collectors/agent/hermes.js.map +1 -0
- package/dist/collectors/agent/index.d.ts +6 -0
- package/dist/collectors/agent/index.d.ts.map +1 -0
- package/dist/collectors/agent/index.js +5 -0
- package/dist/collectors/agent/index.js.map +1 -0
- package/dist/collectors/agent/types.d.ts +61 -0
- package/dist/collectors/agent/types.d.ts.map +1 -0
- package/dist/collectors/agent/types.js +6 -0
- package/dist/collectors/agent/types.js.map +1 -0
- package/dist/collectors/feishu/auth.d.ts +13 -0
- package/dist/collectors/feishu/auth.d.ts.map +1 -0
- package/dist/collectors/feishu/auth.js +72 -0
- package/dist/collectors/feishu/auth.js.map +1 -0
- package/dist/collectors/feishu/chat-name-resolver.d.ts +33 -0
- package/dist/collectors/feishu/chat-name-resolver.d.ts.map +1 -0
- package/dist/collectors/feishu/chat-name-resolver.js +63 -0
- package/dist/collectors/feishu/chat-name-resolver.js.map +1 -0
- package/dist/collectors/feishu/collector.d.ts +27 -0
- package/dist/collectors/feishu/collector.d.ts.map +1 -0
- package/dist/collectors/feishu/collector.js +136 -0
- package/dist/collectors/feishu/collector.js.map +1 -0
- package/dist/collectors/feishu/cursor-staging.d.ts +11 -0
- package/dist/collectors/feishu/cursor-staging.d.ts.map +1 -0
- package/dist/collectors/feishu/cursor-staging.js +37 -0
- package/dist/collectors/feishu/cursor-staging.js.map +1 -0
- package/dist/collectors/feishu/docs/blocks.d.ts +25 -0
- package/dist/collectors/feishu/docs/blocks.d.ts.map +1 -0
- package/dist/collectors/feishu/docs/blocks.js +34 -0
- package/dist/collectors/feishu/docs/blocks.js.map +1 -0
- package/dist/collectors/feishu/docs/candidate.d.ts +17 -0
- package/dist/collectors/feishu/docs/candidate.d.ts.map +1 -0
- package/dist/collectors/feishu/docs/candidate.js +36 -0
- package/dist/collectors/feishu/docs/candidate.js.map +1 -0
- package/dist/collectors/feishu/docs/config.d.ts +41 -0
- package/dist/collectors/feishu/docs/config.d.ts.map +1 -0
- package/dist/collectors/feishu/docs/config.js +30 -0
- package/dist/collectors/feishu/docs/config.js.map +1 -0
- package/dist/collectors/feishu/docs/decision.d.ts +14 -0
- package/dist/collectors/feishu/docs/decision.d.ts.map +1 -0
- package/dist/collectors/feishu/docs/decision.js +43 -0
- package/dist/collectors/feishu/docs/decision.js.map +1 -0
- package/dist/collectors/feishu/docs/full-builder.d.ts +17 -0
- package/dist/collectors/feishu/docs/full-builder.d.ts.map +1 -0
- package/dist/collectors/feishu/docs/full-builder.js +136 -0
- package/dist/collectors/feishu/docs/full-builder.js.map +1 -0
- package/dist/collectors/feishu/docs/hash.d.ts +8 -0
- package/dist/collectors/feishu/docs/hash.d.ts.map +1 -0
- package/dist/collectors/feishu/docs/hash.js +15 -0
- package/dist/collectors/feishu/docs/hash.js.map +1 -0
- package/dist/collectors/feishu/docs/ingest.d.ts +54 -0
- package/dist/collectors/feishu/docs/ingest.d.ts.map +1 -0
- package/dist/collectors/feishu/docs/ingest.js +120 -0
- package/dist/collectors/feishu/docs/ingest.js.map +1 -0
- package/dist/collectors/feishu/docs/llm-json.d.ts +13 -0
- package/dist/collectors/feishu/docs/llm-json.d.ts.map +1 -0
- package/dist/collectors/feishu/docs/llm-json.js +40 -0
- package/dist/collectors/feishu/docs/llm-json.js.map +1 -0
- package/dist/collectors/feishu/docs/pointer-builder.d.ts +7 -0
- package/dist/collectors/feishu/docs/pointer-builder.d.ts.map +1 -0
- package/dist/collectors/feishu/docs/pointer-builder.js +11 -0
- package/dist/collectors/feishu/docs/pointer-builder.js.map +1 -0
- package/dist/collectors/feishu/docs/render.d.ts +8 -0
- package/dist/collectors/feishu/docs/render.d.ts.map +1 -0
- package/dist/collectors/feishu/docs/render.js +105 -0
- package/dist/collectors/feishu/docs/render.js.map +1 -0
- package/dist/collectors/feishu/docs/run.d.ts +37 -0
- package/dist/collectors/feishu/docs/run.d.ts.map +1 -0
- package/dist/collectors/feishu/docs/run.js +143 -0
- package/dist/collectors/feishu/docs/run.js.map +1 -0
- package/dist/collectors/feishu/docs/status.d.ts +16 -0
- package/dist/collectors/feishu/docs/status.d.ts.map +1 -0
- package/dist/collectors/feishu/docs/status.js +24 -0
- package/dist/collectors/feishu/docs/status.js.map +1 -0
- package/dist/collectors/feishu/docs/store-writer.d.ts +32 -0
- package/dist/collectors/feishu/docs/store-writer.d.ts.map +1 -0
- package/dist/collectors/feishu/docs/store-writer.js +71 -0
- package/dist/collectors/feishu/docs/store-writer.js.map +1 -0
- package/dist/collectors/feishu/docs/toc.d.ts +3 -0
- package/dist/collectors/feishu/docs/toc.d.ts.map +1 -0
- package/dist/collectors/feishu/docs/toc.js +19 -0
- package/dist/collectors/feishu/docs/toc.js.map +1 -0
- package/dist/collectors/feishu/docs/triggers.d.ts +7 -0
- package/dist/collectors/feishu/docs/triggers.d.ts.map +1 -0
- package/dist/collectors/feishu/docs/triggers.js +31 -0
- package/dist/collectors/feishu/docs/triggers.js.map +1 -0
- package/dist/collectors/feishu/docs/types.d.ts +109 -0
- package/dist/collectors/feishu/docs/types.d.ts.map +1 -0
- package/dist/collectors/feishu/docs/types.js +2 -0
- package/dist/collectors/feishu/docs/types.js.map +1 -0
- package/dist/collectors/feishu/docs/upgrade-queue.d.ts +19 -0
- package/dist/collectors/feishu/docs/upgrade-queue.d.ts.map +1 -0
- package/dist/collectors/feishu/docs/upgrade-queue.js +36 -0
- package/dist/collectors/feishu/docs/upgrade-queue.js.map +1 -0
- package/dist/collectors/feishu/docs/url-parser.d.ts +3 -0
- package/dist/collectors/feishu/docs/url-parser.d.ts.map +1 -0
- package/dist/collectors/feishu/docs/url-parser.js +39 -0
- package/dist/collectors/feishu/docs/url-parser.js.map +1 -0
- package/dist/collectors/feishu/docs/walkers.d.ts +24 -0
- package/dist/collectors/feishu/docs/walkers.d.ts.map +1 -0
- package/dist/collectors/feishu/docs/walkers.js +90 -0
- package/dist/collectors/feishu/docs/walkers.js.map +1 -0
- package/dist/collectors/feishu/docs/wiki-resolver.d.ts +15 -0
- package/dist/collectors/feishu/docs/wiki-resolver.d.ts.map +1 -0
- package/dist/collectors/feishu/docs/wiki-resolver.js +24 -0
- package/dist/collectors/feishu/docs/wiki-resolver.js.map +1 -0
- package/dist/collectors/feishu/http-client.d.ts +26 -0
- package/dist/collectors/feishu/http-client.d.ts.map +1 -0
- package/dist/collectors/feishu/http-client.js +94 -0
- package/dist/collectors/feishu/http-client.js.map +1 -0
- package/dist/collectors/feishu/index.d.ts +3 -0
- package/dist/collectors/feishu/index.d.ts.map +1 -0
- package/dist/collectors/feishu/index.js +2 -0
- package/dist/collectors/feishu/index.js.map +1 -0
- package/dist/collectors/feishu/lark-cli-client.d.ts +28 -0
- package/dist/collectors/feishu/lark-cli-client.d.ts.map +1 -0
- package/dist/collectors/feishu/lark-cli-client.js +104 -0
- package/dist/collectors/feishu/lark-cli-client.js.map +1 -0
- package/dist/collectors/feishu/lark-cli-identity-backend.d.ts +28 -0
- package/dist/collectors/feishu/lark-cli-identity-backend.d.ts.map +1 -0
- package/dist/collectors/feishu/lark-cli-identity-backend.js +110 -0
- package/dist/collectors/feishu/lark-cli-identity-backend.js.map +1 -0
- package/dist/collectors/feishu/rate-limiter.d.ts +10 -0
- package/dist/collectors/feishu/rate-limiter.d.ts.map +1 -0
- package/dist/collectors/feishu/rate-limiter.js +33 -0
- package/dist/collectors/feishu/rate-limiter.js.map +1 -0
- package/dist/collectors/feishu/self-open-id.d.ts +20 -0
- package/dist/collectors/feishu/self-open-id.d.ts.map +1 -0
- package/dist/collectors/feishu/self-open-id.js +31 -0
- package/dist/collectors/feishu/self-open-id.js.map +1 -0
- package/dist/collectors/feishu/sources/base.d.ts +9 -0
- package/dist/collectors/feishu/sources/base.d.ts.map +1 -0
- package/dist/collectors/feishu/sources/base.js +2 -0
- package/dist/collectors/feishu/sources/base.js.map +1 -0
- package/dist/collectors/feishu/sources/calendar.d.ts +16 -0
- package/dist/collectors/feishu/sources/calendar.d.ts.map +1 -0
- package/dist/collectors/feishu/sources/calendar.js +98 -0
- package/dist/collectors/feishu/sources/calendar.js.map +1 -0
- package/dist/collectors/feishu/sources/dm.d.ts +28 -0
- package/dist/collectors/feishu/sources/dm.d.ts.map +1 -0
- package/dist/collectors/feishu/sources/dm.js +156 -0
- package/dist/collectors/feishu/sources/dm.js.map +1 -0
- package/dist/collectors/feishu/sources/mail.d.ts +27 -0
- package/dist/collectors/feishu/sources/mail.d.ts.map +1 -0
- package/dist/collectors/feishu/sources/mail.js +149 -0
- package/dist/collectors/feishu/sources/mail.js.map +1 -0
- package/dist/collectors/feishu/sources/message-search.d.ts +37 -0
- package/dist/collectors/feishu/sources/message-search.d.ts.map +1 -0
- package/dist/collectors/feishu/sources/message-search.js +140 -0
- package/dist/collectors/feishu/sources/message-search.js.map +1 -0
- package/dist/collectors/feishu/sources/messages.d.ts +28 -0
- package/dist/collectors/feishu/sources/messages.d.ts.map +1 -0
- package/dist/collectors/feishu/sources/messages.js +175 -0
- package/dist/collectors/feishu/sources/messages.js.map +1 -0
- package/dist/collectors/feishu/sources/tasks.d.ts +15 -0
- package/dist/collectors/feishu/sources/tasks.d.ts.map +1 -0
- package/dist/collectors/feishu/sources/tasks.js +74 -0
- package/dist/collectors/feishu/sources/tasks.js.map +1 -0
- package/dist/collectors/feishu/types.d.ts +258 -0
- package/dist/collectors/feishu/types.d.ts.map +1 -0
- package/dist/collectors/feishu/types.js +17 -0
- package/dist/collectors/feishu/types.js.map +1 -0
- package/dist/collectors/index.d.ts +10 -0
- package/dist/collectors/index.d.ts.map +1 -0
- package/dist/collectors/index.js +18 -0
- package/dist/collectors/index.js.map +1 -0
- package/dist/config-center/connection-checks.d.ts +28 -0
- package/dist/config-center/connection-checks.d.ts.map +1 -0
- package/dist/config-center/connection-checks.js +114 -0
- package/dist/config-center/connection-checks.js.map +1 -0
- package/dist/config-center/document.d.ts +21 -0
- package/dist/config-center/document.d.ts.map +1 -0
- package/dist/config-center/document.js +93 -0
- package/dist/config-center/document.js.map +1 -0
- package/dist/config-center/index.d.ts +9 -0
- package/dist/config-center/index.d.ts.map +1 -0
- package/dist/config-center/index.js +29 -0
- package/dist/config-center/index.js.map +1 -0
- package/dist/config-center/recommendations.d.ts +16 -0
- package/dist/config-center/recommendations.d.ts.map +1 -0
- package/dist/config-center/recommendations.js +50 -0
- package/dist/config-center/recommendations.js.map +1 -0
- package/dist/config-center/reducer.d.ts +57 -0
- package/dist/config-center/reducer.d.ts.map +1 -0
- package/dist/config-center/reducer.js +192 -0
- package/dist/config-center/reducer.js.map +1 -0
- package/dist/config-center/schema.d.ts +31 -0
- package/dist/config-center/schema.d.ts.map +1 -0
- package/dist/config-center/schema.js +442 -0
- package/dist/config-center/schema.js.map +1 -0
- package/dist/config-center/secrets.d.ts +9 -0
- package/dist/config-center/secrets.d.ts.map +1 -0
- package/dist/config-center/secrets.js +51 -0
- package/dist/config-center/secrets.js.map +1 -0
- package/dist/config-center/source-dirs.d.ts +16 -0
- package/dist/config-center/source-dirs.d.ts.map +1 -0
- package/dist/config-center/source-dirs.js +81 -0
- package/dist/config-center/source-dirs.js.map +1 -0
- package/dist/config-center/tui/app.d.ts +22 -0
- package/dist/config-center/tui/app.d.ts.map +1 -0
- package/dist/config-center/tui/app.js +142 -0
- package/dist/config-center/tui/app.js.map +1 -0
- package/dist/config-center/tui/render.d.ts +20 -0
- package/dist/config-center/tui/render.d.ts.map +1 -0
- package/dist/config-center/tui/render.js +166 -0
- package/dist/config-center/tui/render.js.map +1 -0
- package/dist/config-center/validation.d.ts +9 -0
- package/dist/config-center/validation.d.ts.map +1 -0
- package/dist/config-center/validation.js +59 -0
- package/dist/config-center/validation.js.map +1 -0
- package/dist/consolidator/consolidator.d.ts +43 -0
- package/dist/consolidator/consolidator.d.ts.map +1 -0
- package/dist/consolidator/consolidator.js +67 -0
- package/dist/consolidator/consolidator.js.map +1 -0
- package/dist/consolidator/dead-link.d.ts +7 -0
- package/dist/consolidator/dead-link.d.ts.map +1 -0
- package/dist/consolidator/dead-link.js +57 -0
- package/dist/consolidator/dead-link.js.map +1 -0
- package/dist/consolidator/hot-warm.d.ts +9 -0
- package/dist/consolidator/hot-warm.d.ts.map +1 -0
- package/dist/consolidator/hot-warm.js +88 -0
- package/dist/consolidator/hot-warm.js.map +1 -0
- package/dist/consolidator/infer-preferences.d.ts +14 -0
- package/dist/consolidator/infer-preferences.d.ts.map +1 -0
- package/dist/consolidator/infer-preferences.js +73 -0
- package/dist/consolidator/infer-preferences.js.map +1 -0
- package/dist/consolidator/rules.d.ts +5 -0
- package/dist/consolidator/rules.d.ts.map +1 -0
- package/dist/consolidator/rules.js +53 -0
- package/dist/consolidator/rules.js.map +1 -0
- package/dist/consolidator/warm-cold.d.ts +13 -0
- package/dist/consolidator/warm-cold.d.ts.map +1 -0
- package/dist/consolidator/warm-cold.js +91 -0
- package/dist/consolidator/warm-cold.js.map +1 -0
- package/dist/core/block-builder.d.ts +15 -0
- package/dist/core/block-builder.d.ts.map +1 -0
- package/dist/core/block-builder.js +185 -0
- package/dist/core/block-builder.js.map +1 -0
- package/dist/core/canonicalize.d.ts +3 -0
- package/dist/core/canonicalize.d.ts.map +1 -0
- package/dist/core/canonicalize.js +141 -0
- package/dist/core/canonicalize.js.map +1 -0
- package/dist/core/concurrency.d.ts +2 -0
- package/dist/core/concurrency.d.ts.map +1 -0
- package/dist/core/concurrency.js +14 -0
- package/dist/core/concurrency.js.map +1 -0
- package/dist/core/config.d.ts +257 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +247 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/cursors.d.ts +36 -0
- package/dist/core/cursors.d.ts.map +1 -0
- package/dist/core/cursors.js +90 -0
- package/dist/core/cursors.js.map +1 -0
- package/dist/core/dedup.d.ts +45 -0
- package/dist/core/dedup.d.ts.map +1 -0
- package/dist/core/dedup.js +111 -0
- package/dist/core/dedup.js.map +1 -0
- package/dist/core/entity-extract.d.ts +3 -0
- package/dist/core/entity-extract.d.ts.map +1 -0
- package/dist/core/entity-extract.js +54 -0
- package/dist/core/entity-extract.js.map +1 -0
- package/dist/core/env-validation.d.ts +9 -0
- package/dist/core/env-validation.d.ts.map +1 -0
- package/dist/core/env-validation.js +94 -0
- package/dist/core/env-validation.js.map +1 -0
- package/dist/core/helpers.d.ts +3 -0
- package/dist/core/helpers.d.ts.map +1 -0
- package/dist/core/helpers.js +10 -0
- package/dist/core/helpers.js.map +1 -0
- package/dist/core/identity-resolver.d.ts +42 -0
- package/dist/core/identity-resolver.d.ts.map +1 -0
- package/dist/core/identity-resolver.js +207 -0
- package/dist/core/identity-resolver.js.map +1 -0
- package/dist/core/person-identity.d.ts +140 -0
- package/dist/core/person-identity.d.ts.map +1 -0
- package/dist/core/person-identity.js +428 -0
- package/dist/core/person-identity.js.map +1 -0
- package/dist/core/person-slug.d.ts +21 -0
- package/dist/core/person-slug.d.ts.map +1 -0
- package/dist/core/person-slug.js +93 -0
- package/dist/core/person-slug.js.map +1 -0
- package/dist/core/pipeline-factory.d.ts +13 -0
- package/dist/core/pipeline-factory.d.ts.map +1 -0
- package/dist/core/pipeline-factory.js +37 -0
- package/dist/core/pipeline-factory.js.map +1 -0
- package/dist/core/pipeline.d.ts +77 -0
- package/dist/core/pipeline.d.ts.map +1 -0
- package/dist/core/pipeline.js +332 -0
- package/dist/core/pipeline.js.map +1 -0
- package/dist/core/resource-loader.d.ts +2 -0
- package/dist/core/resource-loader.d.ts.map +1 -0
- package/dist/core/resource-loader.js +12 -0
- package/dist/core/resource-loader.js.map +1 -0
- package/dist/core/schemas.d.ts +5142 -0
- package/dist/core/schemas.d.ts.map +1 -0
- package/dist/core/schemas.js +256 -0
- package/dist/core/schemas.js.map +1 -0
- package/dist/core/signal-scoring.d.ts +3 -0
- package/dist/core/signal-scoring.d.ts.map +1 -0
- package/dist/core/signal-scoring.js +128 -0
- package/dist/core/signal-scoring.js.map +1 -0
- package/dist/core/source-ref.d.ts +4 -0
- package/dist/core/source-ref.d.ts.map +1 -0
- package/dist/core/source-ref.js +24 -0
- package/dist/core/source-ref.js.map +1 -0
- package/dist/core/state.d.ts +22 -0
- package/dist/core/state.d.ts.map +1 -0
- package/dist/core/state.js +33 -0
- package/dist/core/state.js.map +1 -0
- package/dist/core/types.d.ts +266 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +6 -0
- package/dist/core/types.js.map +1 -0
- package/dist/daemon/alerts.d.ts +12 -0
- package/dist/daemon/alerts.d.ts.map +1 -0
- package/dist/daemon/alerts.js +34 -0
- package/dist/daemon/alerts.js.map +1 -0
- package/dist/daemon/autostart/argv.d.ts +21 -0
- package/dist/daemon/autostart/argv.d.ts.map +1 -0
- package/dist/daemon/autostart/argv.js +37 -0
- package/dist/daemon/autostart/argv.js.map +1 -0
- package/dist/daemon/autostart/daemon-state.d.ts +19 -0
- package/dist/daemon/autostart/daemon-state.d.ts.map +1 -0
- package/dist/daemon/autostart/daemon-state.js +34 -0
- package/dist/daemon/autostart/daemon-state.js.map +1 -0
- package/dist/daemon/autostart/index.d.ts +40 -0
- package/dist/daemon/autostart/index.d.ts.map +1 -0
- package/dist/daemon/autostart/index.js +146 -0
- package/dist/daemon/autostart/index.js.map +1 -0
- package/dist/daemon/autostart/launchd.d.ts +13 -0
- package/dist/daemon/autostart/launchd.d.ts.map +1 -0
- package/dist/daemon/autostart/launchd.js +51 -0
- package/dist/daemon/autostart/launchd.js.map +1 -0
- package/dist/daemon/autostart/runner.d.ts +14 -0
- package/dist/daemon/autostart/runner.d.ts.map +1 -0
- package/dist/daemon/autostart/runner.js +30 -0
- package/dist/daemon/autostart/runner.js.map +1 -0
- package/dist/daemon/autostart/systemd.d.ts +11 -0
- package/dist/daemon/autostart/systemd.d.ts.map +1 -0
- package/dist/daemon/autostart/systemd.js +40 -0
- package/dist/daemon/autostart/systemd.js.map +1 -0
- package/dist/daemon/index.d.ts +6 -0
- package/dist/daemon/index.d.ts.map +1 -0
- package/dist/daemon/index.js +6 -0
- package/dist/daemon/index.js.map +1 -0
- package/dist/daemon/logger.d.ts +8 -0
- package/dist/daemon/logger.d.ts.map +1 -0
- package/dist/daemon/logger.js +35 -0
- package/dist/daemon/logger.js.map +1 -0
- package/dist/daemon/reload-manager.d.ts +41 -0
- package/dist/daemon/reload-manager.d.ts.map +1 -0
- package/dist/daemon/reload-manager.js +89 -0
- package/dist/daemon/reload-manager.js.map +1 -0
- package/dist/daemon/run-history.d.ts +29 -0
- package/dist/daemon/run-history.d.ts.map +1 -0
- package/dist/daemon/run-history.js +54 -0
- package/dist/daemon/run-history.js.map +1 -0
- package/dist/daemon/scheduler.d.ts +45 -0
- package/dist/daemon/scheduler.d.ts.map +1 -0
- package/dist/daemon/scheduler.js +217 -0
- package/dist/daemon/scheduler.js.map +1 -0
- package/dist/daemon/serve-runtime.d.ts +31 -0
- package/dist/daemon/serve-runtime.d.ts.map +1 -0
- package/dist/daemon/serve-runtime.js +230 -0
- package/dist/daemon/serve-runtime.js.map +1 -0
- package/dist/daemon/source-schedule.d.ts +25 -0
- package/dist/daemon/source-schedule.d.ts.map +1 -0
- package/dist/daemon/source-schedule.js +87 -0
- package/dist/daemon/source-schedule.js.map +1 -0
- package/dist/embedded-assets.generated.d.ts +4 -0
- package/dist/embedded-assets.generated.d.ts.map +1 -0
- package/dist/embedded-assets.generated.js +12 -0
- package/dist/embedded-assets.generated.js.map +1 -0
- package/dist/extractors/noise-filter.d.ts +30 -0
- package/dist/extractors/noise-filter.d.ts.map +1 -0
- package/dist/extractors/noise-filter.js +185 -0
- package/dist/extractors/noise-filter.js.map +1 -0
- package/dist/extractors/playbook-extractor.d.ts +35 -0
- package/dist/extractors/playbook-extractor.d.ts.map +1 -0
- package/dist/extractors/playbook-extractor.js +98 -0
- package/dist/extractors/playbook-extractor.js.map +1 -0
- package/dist/extractors/providers/anthropic.d.ts +13 -0
- package/dist/extractors/providers/anthropic.d.ts.map +1 -0
- package/dist/extractors/providers/anthropic.js +67 -0
- package/dist/extractors/providers/anthropic.js.map +1 -0
- package/dist/extractors/providers/index.d.ts +12 -0
- package/dist/extractors/providers/index.d.ts.map +1 -0
- package/dist/extractors/providers/index.js +41 -0
- package/dist/extractors/providers/index.js.map +1 -0
- package/dist/extractors/providers/mock.d.ts +14 -0
- package/dist/extractors/providers/mock.d.ts.map +1 -0
- package/dist/extractors/providers/mock.js +37 -0
- package/dist/extractors/providers/mock.js.map +1 -0
- package/dist/extractors/providers/openai.d.ts +15 -0
- package/dist/extractors/providers/openai.d.ts.map +1 -0
- package/dist/extractors/providers/openai.js +109 -0
- package/dist/extractors/providers/openai.js.map +1 -0
- package/dist/extractors/providers/types.d.ts +27 -0
- package/dist/extractors/providers/types.d.ts.map +1 -0
- package/dist/extractors/providers/types.js +6 -0
- package/dist/extractors/providers/types.js.map +1 -0
- package/dist/extractors/signal-extractor.d.ts +30 -0
- package/dist/extractors/signal-extractor.d.ts.map +1 -0
- package/dist/extractors/signal-extractor.js +371 -0
- package/dist/extractors/signal-extractor.js.map +1 -0
- package/dist/formatters/index.d.ts +3 -0
- package/dist/formatters/index.d.ts.map +1 -0
- package/dist/formatters/index.js +3 -0
- package/dist/formatters/index.js.map +1 -0
- package/dist/formatters/json.d.ts +6 -0
- package/dist/formatters/json.d.ts.map +1 -0
- package/dist/formatters/json.js +16 -0
- package/dist/formatters/json.js.map +1 -0
- package/dist/formatters/markdown.d.ts +6 -0
- package/dist/formatters/markdown.d.ts.map +1 -0
- package/dist/formatters/markdown.js +198 -0
- package/dist/formatters/markdown.js.map +1 -0
- package/dist/hooks/handlers.d.ts +21 -0
- package/dist/hooks/handlers.d.ts.map +1 -0
- package/dist/hooks/handlers.js +22 -0
- package/dist/hooks/handlers.js.map +1 -0
- package/dist/hooks/inject.d.ts +7 -0
- package/dist/hooks/inject.d.ts.map +1 -0
- package/dist/hooks/inject.js +18 -0
- package/dist/hooks/inject.js.map +1 -0
- package/dist/hooks/install.d.ts +14 -0
- package/dist/hooks/install.d.ts.map +1 -0
- package/dist/hooks/install.js +34 -0
- package/dist/hooks/install.js.map +1 -0
- package/dist/hooks/output.d.ts +19 -0
- package/dist/hooks/output.d.ts.map +1 -0
- package/dist/hooks/output.js +13 -0
- package/dist/hooks/output.js.map +1 -0
- package/dist/hooks/recall-client.d.ts +25 -0
- package/dist/hooks/recall-client.d.ts.map +1 -0
- package/dist/hooks/recall-client.js +56 -0
- package/dist/hooks/recall-client.js.map +1 -0
- package/dist/hooks/run-event.d.ts +13 -0
- package/dist/hooks/run-event.d.ts.map +1 -0
- package/dist/hooks/run-event.js +20 -0
- package/dist/hooks/run-event.js.map +1 -0
- package/dist/hooks/settings-edit.d.ts +10 -0
- package/dist/hooks/settings-edit.d.ts.map +1 -0
- package/dist/hooks/settings-edit.js +44 -0
- package/dist/hooks/settings-edit.js.map +1 -0
- package/dist/hooks/writeback.d.ts +12 -0
- package/dist/hooks/writeback.d.ts.map +1 -0
- package/dist/hooks/writeback.js +48 -0
- package/dist/hooks/writeback.js.map +1 -0
- package/dist/install/clients/claude-code.d.ts +3 -0
- package/dist/install/clients/claude-code.d.ts.map +1 -0
- package/dist/install/clients/claude-code.js +31 -0
- package/dist/install/clients/claude-code.js.map +1 -0
- package/dist/install/clients/claude-desktop.d.ts +3 -0
- package/dist/install/clients/claude-desktop.d.ts.map +1 -0
- package/dist/install/clients/claude-desktop.js +33 -0
- package/dist/install/clients/claude-desktop.js.map +1 -0
- package/dist/install/clients/codex.d.ts +3 -0
- package/dist/install/clients/codex.d.ts.map +1 -0
- package/dist/install/clients/codex.js +33 -0
- package/dist/install/clients/codex.js.map +1 -0
- package/dist/install/clients/cursor.d.ts +3 -0
- package/dist/install/clients/cursor.d.ts.map +1 -0
- package/dist/install/clients/cursor.js +37 -0
- package/dist/install/clients/cursor.js.map +1 -0
- package/dist/install/clients/hermes.d.ts +3 -0
- package/dist/install/clients/hermes.d.ts.map +1 -0
- package/dist/install/clients/hermes.js +37 -0
- package/dist/install/clients/hermes.js.map +1 -0
- package/dist/install/clients/index.d.ts +4 -0
- package/dist/install/clients/index.d.ts.map +1 -0
- package/dist/install/clients/index.js +18 -0
- package/dist/install/clients/index.js.map +1 -0
- package/dist/install/clients/windsurf.d.ts +3 -0
- package/dist/install/clients/windsurf.d.ts.map +1 -0
- package/dist/install/clients/windsurf.js +34 -0
- package/dist/install/clients/windsurf.js.map +1 -0
- package/dist/install/command.d.ts +14 -0
- package/dist/install/command.d.ts.map +1 -0
- package/dist/install/command.js +34 -0
- package/dist/install/command.js.map +1 -0
- package/dist/install/directive.d.ts +7 -0
- package/dist/install/directive.d.ts.map +1 -0
- package/dist/install/directive.js +31 -0
- package/dist/install/directive.js.map +1 -0
- package/dist/install/index.d.ts +28 -0
- package/dist/install/index.d.ts.map +1 -0
- package/dist/install/index.js +122 -0
- package/dist/install/index.js.map +1 -0
- package/dist/install/json-config.d.ts +8 -0
- package/dist/install/json-config.d.ts.map +1 -0
- package/dist/install/json-config.js +44 -0
- package/dist/install/json-config.js.map +1 -0
- package/dist/install/marked-block.d.ts +11 -0
- package/dist/install/marked-block.d.ts.map +1 -0
- package/dist/install/marked-block.js +34 -0
- package/dist/install/marked-block.js.map +1 -0
- package/dist/install/mcp-entry.d.ts +11 -0
- package/dist/install/mcp-entry.d.ts.map +1 -0
- package/dist/install/mcp-entry.js +7 -0
- package/dist/install/mcp-entry.js.map +1 -0
- package/dist/install/skill.d.ts +4 -0
- package/dist/install/skill.d.ts.map +1 -0
- package/dist/install/skill.js +61 -0
- package/dist/install/skill.js.map +1 -0
- package/dist/install/toml-config.d.ts +4 -0
- package/dist/install/toml-config.d.ts.map +1 -0
- package/dist/install/toml-config.js +54 -0
- package/dist/install/toml-config.js.map +1 -0
- package/dist/install/types.d.ts +40 -0
- package/dist/install/types.d.ts.map +1 -0
- package/dist/install/types.js +10 -0
- package/dist/install/types.js.map +1 -0
- package/dist/install/yaml-config.d.ts +4 -0
- package/dist/install/yaml-config.d.ts.map +1 -0
- package/dist/install/yaml-config.js +19 -0
- package/dist/install/yaml-config.js.map +1 -0
- package/dist/lifecycle/down.d.ts +19 -0
- package/dist/lifecycle/down.d.ts.map +1 -0
- package/dist/lifecycle/down.js +24 -0
- package/dist/lifecycle/down.js.map +1 -0
- package/dist/lifecycle/health-poll.d.ts +19 -0
- package/dist/lifecycle/health-poll.d.ts.map +1 -0
- package/dist/lifecycle/health-poll.js +39 -0
- package/dist/lifecycle/health-poll.js.map +1 -0
- package/dist/lifecycle/install-state.d.ts +34 -0
- package/dist/lifecycle/install-state.d.ts.map +1 -0
- package/dist/lifecycle/install-state.js +70 -0
- package/dist/lifecycle/install-state.js.map +1 -0
- package/dist/lifecycle/legacy-migration.d.ts +58 -0
- package/dist/lifecycle/legacy-migration.d.ts.map +1 -0
- package/dist/lifecycle/legacy-migration.js +212 -0
- package/dist/lifecycle/legacy-migration.js.map +1 -0
- package/dist/lifecycle/lifecycle-lock.d.ts +20 -0
- package/dist/lifecycle/lifecycle-lock.d.ts.map +1 -0
- package/dist/lifecycle/lifecycle-lock.js +98 -0
- package/dist/lifecycle/lifecycle-lock.js.map +1 -0
- package/dist/lifecycle/run-up.d.ts +38 -0
- package/dist/lifecycle/run-up.d.ts.map +1 -0
- package/dist/lifecycle/run-up.js +307 -0
- package/dist/lifecycle/run-up.js.map +1 -0
- package/dist/lifecycle/status.d.ts +38 -0
- package/dist/lifecycle/status.d.ts.map +1 -0
- package/dist/lifecycle/status.js +41 -0
- package/dist/lifecycle/status.js.map +1 -0
- package/dist/lifecycle/up.d.ts +35 -0
- package/dist/lifecycle/up.d.ts.map +1 -0
- package/dist/lifecycle/up.js +45 -0
- package/dist/lifecycle/up.js.map +1 -0
- package/dist/processors/privacy.d.ts +101 -0
- package/dist/processors/privacy.d.ts.map +1 -0
- package/dist/processors/privacy.js +273 -0
- package/dist/processors/privacy.js.map +1 -0
- package/dist/profile/accumulate.d.ts +28 -0
- package/dist/profile/accumulate.d.ts.map +1 -0
- package/dist/profile/accumulate.js +48 -0
- package/dist/profile/accumulate.js.map +1 -0
- package/dist/profile/behavior.d.ts +32 -0
- package/dist/profile/behavior.d.ts.map +1 -0
- package/dist/profile/behavior.js +122 -0
- package/dist/profile/behavior.js.map +1 -0
- package/dist/profile/four-color.d.ts +12 -0
- package/dist/profile/four-color.d.ts.map +1 -0
- package/dist/profile/four-color.js +39 -0
- package/dist/profile/four-color.js.map +1 -0
- package/dist/profile/profile-synth.d.ts +27 -0
- package/dist/profile/profile-synth.d.ts.map +1 -0
- package/dist/profile/profile-synth.js +174 -0
- package/dist/profile/profile-synth.js.map +1 -0
- package/dist/profile/types.d.ts +84 -0
- package/dist/profile/types.d.ts.map +1 -0
- package/dist/profile/types.js +11 -0
- package/dist/profile/types.js.map +1 -0
- package/dist/server/api.d.ts +49 -0
- package/dist/server/api.d.ts.map +1 -0
- package/dist/server/api.js +502 -0
- package/dist/server/api.js.map +1 -0
- package/dist/server/backfill-job.d.ts +36 -0
- package/dist/server/backfill-job.d.ts.map +1 -0
- package/dist/server/backfill-job.js +88 -0
- package/dist/server/backfill-job.js.map +1 -0
- package/dist/server/backfill-routes.d.ts +7 -0
- package/dist/server/backfill-routes.d.ts.map +1 -0
- package/dist/server/backfill-routes.js +146 -0
- package/dist/server/backfill-routes.js.map +1 -0
- package/dist/server/chat-name-refresh-job.d.ts +33 -0
- package/dist/server/chat-name-refresh-job.d.ts.map +1 -0
- package/dist/server/chat-name-refresh-job.js +120 -0
- package/dist/server/chat-name-refresh-job.js.map +1 -0
- package/dist/server/chat-name-routes.d.ts +13 -0
- package/dist/server/chat-name-routes.d.ts.map +1 -0
- package/dist/server/chat-name-routes.js +81 -0
- package/dist/server/chat-name-routes.js.map +1 -0
- package/dist/server/config-routes.d.ts +10 -0
- package/dist/server/config-routes.d.ts.map +1 -0
- package/dist/server/config-routes.js +122 -0
- package/dist/server/config-routes.js.map +1 -0
- package/dist/server/context.d.ts +13 -0
- package/dist/server/context.d.ts.map +1 -0
- package/dist/server/context.js +47 -0
- package/dist/server/context.js.map +1 -0
- package/dist/server/entity.d.ts +25 -0
- package/dist/server/entity.d.ts.map +1 -0
- package/dist/server/entity.js +34 -0
- package/dist/server/entity.js.map +1 -0
- package/dist/server/event-bus.d.ts +35 -0
- package/dist/server/event-bus.d.ts.map +1 -0
- package/dist/server/event-bus.js +4 -0
- package/dist/server/event-bus.js.map +1 -0
- package/dist/server/mcp-http-runtime.d.ts +28 -0
- package/dist/server/mcp-http-runtime.d.ts.map +1 -0
- package/dist/server/mcp-http-runtime.js +24 -0
- package/dist/server/mcp-http-runtime.js.map +1 -0
- package/dist/server/mcp-http.d.ts +41 -0
- package/dist/server/mcp-http.d.ts.map +1 -0
- package/dist/server/mcp-http.js +139 -0
- package/dist/server/mcp-http.js.map +1 -0
- package/dist/server/mcp.d.ts +292 -0
- package/dist/server/mcp.d.ts.map +1 -0
- package/dist/server/mcp.js +1146 -0
- package/dist/server/mcp.js.map +1 -0
- package/dist/server/open-browser.d.ts +3 -0
- package/dist/server/open-browser.d.ts.map +1 -0
- package/dist/server/open-browser.js +12 -0
- package/dist/server/open-browser.js.map +1 -0
- package/dist/server/runtime.d.ts +13 -0
- package/dist/server/runtime.d.ts.map +1 -0
- package/dist/server/runtime.js +27 -0
- package/dist/server/runtime.js.map +1 -0
- package/dist/server/server-security.d.ts +51 -0
- package/dist/server/server-security.d.ts.map +1 -0
- package/dist/server/server-security.js +76 -0
- package/dist/server/server-security.js.map +1 -0
- package/dist/server/setup-server.d.ts +7 -0
- package/dist/server/setup-server.d.ts.map +1 -0
- package/dist/server/setup-server.js +49 -0
- package/dist/server/setup-server.js.map +1 -0
- package/dist/setup/assess-hardware.d.ts +34 -0
- package/dist/setup/assess-hardware.d.ts.map +1 -0
- package/dist/setup/assess-hardware.js +179 -0
- package/dist/setup/assess-hardware.js.map +1 -0
- package/dist/setup/connection-tests.d.ts +17 -0
- package/dist/setup/connection-tests.d.ts.map +1 -0
- package/dist/setup/connection-tests.js +69 -0
- package/dist/setup/connection-tests.js.map +1 -0
- package/dist/setup/detect-api-keys.d.ts +13 -0
- package/dist/setup/detect-api-keys.d.ts.map +1 -0
- package/dist/setup/detect-api-keys.js +41 -0
- package/dist/setup/detect-api-keys.js.map +1 -0
- package/dist/setup/detect-runtime.d.ts +14 -0
- package/dist/setup/detect-runtime.d.ts.map +1 -0
- package/dist/setup/detect-runtime.js +43 -0
- package/dist/setup/detect-runtime.js.map +1 -0
- package/dist/setup/detect-sources.d.ts +14 -0
- package/dist/setup/detect-sources.d.ts.map +1 -0
- package/dist/setup/detect-sources.js +75 -0
- package/dist/setup/detect-sources.js.map +1 -0
- package/dist/setup/doctor.d.ts +48 -0
- package/dist/setup/doctor.d.ts.map +1 -0
- package/dist/setup/doctor.js +157 -0
- package/dist/setup/doctor.js.map +1 -0
- package/dist/setup/generate-config.d.ts +13 -0
- package/dist/setup/generate-config.d.ts.map +1 -0
- package/dist/setup/generate-config.js +163 -0
- package/dist/setup/generate-config.js.map +1 -0
- package/dist/setup/index.d.ts +9 -0
- package/dist/setup/index.d.ts.map +1 -0
- package/dist/setup/index.js +9 -0
- package/dist/setup/index.js.map +1 -0
- package/dist/setup/init-wizard.d.ts +20 -0
- package/dist/setup/init-wizard.d.ts.map +1 -0
- package/dist/setup/init-wizard.js +531 -0
- package/dist/setup/init-wizard.js.map +1 -0
- package/dist/setup/terminal.d.ts +28 -0
- package/dist/setup/terminal.d.ts.map +1 -0
- package/dist/setup/terminal.js +258 -0
- package/dist/setup/terminal.js.map +1 -0
- package/dist/setup/validate-config.d.ts +30 -0
- package/dist/setup/validate-config.d.ts.map +1 -0
- package/dist/setup/validate-config.js +45 -0
- package/dist/setup/validate-config.js.map +1 -0
- package/dist/store/chunks.d.ts +25 -0
- package/dist/store/chunks.d.ts.map +1 -0
- package/dist/store/chunks.js +78 -0
- package/dist/store/chunks.js.map +1 -0
- package/dist/store/data-dir-lock.d.ts +15 -0
- package/dist/store/data-dir-lock.d.ts.map +1 -0
- package/dist/store/data-dir-lock.js +96 -0
- package/dist/store/data-dir-lock.js.map +1 -0
- package/dist/store/database.d.ts +31 -0
- package/dist/store/database.d.ts.map +1 -0
- package/dist/store/database.js +113 -0
- package/dist/store/database.js.map +1 -0
- package/dist/store/embedding.d.ts +23 -0
- package/dist/store/embedding.d.ts.map +1 -0
- package/dist/store/embedding.js +62 -0
- package/dist/store/embedding.js.map +1 -0
- package/dist/store/engine-factory.d.ts +4 -0
- package/dist/store/engine-factory.d.ts.map +1 -0
- package/dist/store/engine-factory.js +18 -0
- package/dist/store/engine-factory.js.map +1 -0
- package/dist/store/graph.d.ts +75 -0
- package/dist/store/graph.d.ts.map +1 -0
- package/dist/store/graph.js +276 -0
- package/dist/store/graph.js.map +1 -0
- package/dist/store/managed/managed-engine.d.ts +35 -0
- package/dist/store/managed/managed-engine.d.ts.map +1 -0
- package/dist/store/managed/managed-engine.js +40 -0
- package/dist/store/managed/managed-engine.js.map +1 -0
- package/dist/store/managed/managed-lock.d.ts +2 -0
- package/dist/store/managed/managed-lock.d.ts.map +1 -0
- package/dist/store/managed/managed-lock.js +68 -0
- package/dist/store/managed/managed-lock.js.map +1 -0
- package/dist/store/managed/new-install.d.ts +12 -0
- package/dist/store/managed/new-install.d.ts.map +1 -0
- package/dist/store/managed/new-install.js +23 -0
- package/dist/store/managed/new-install.js.map +1 -0
- package/dist/store/managed/pg-paths.d.ts +28 -0
- package/dist/store/managed/pg-paths.d.ts.map +1 -0
- package/dist/store/managed/pg-paths.js +41 -0
- package/dist/store/managed/pg-paths.js.map +1 -0
- package/dist/store/managed/pg-runtime-provider.d.ts +47 -0
- package/dist/store/managed/pg-runtime-provider.d.ts.map +1 -0
- package/dist/store/managed/pg-runtime-provider.js +249 -0
- package/dist/store/managed/pg-runtime-provider.js.map +1 -0
- package/dist/store/managed/pg-supervisor.d.ts +30 -0
- package/dist/store/managed/pg-supervisor.d.ts.map +1 -0
- package/dist/store/managed/pg-supervisor.js +308 -0
- package/dist/store/managed/pg-supervisor.js.map +1 -0
- package/dist/store/managed/recovery-loop.d.ts +41 -0
- package/dist/store/managed/recovery-loop.d.ts.map +1 -0
- package/dist/store/managed/recovery-loop.js +87 -0
- package/dist/store/managed/recovery-loop.js.map +1 -0
- package/dist/store/managed/stop-from-state.d.ts +11 -0
- package/dist/store/managed/stop-from-state.d.ts.map +1 -0
- package/dist/store/managed/stop-from-state.js +26 -0
- package/dist/store/managed/stop-from-state.js.map +1 -0
- package/dist/store/migrations/index.d.ts +9 -0
- package/dist/store/migrations/index.d.ts.map +1 -0
- package/dist/store/migrations/index.js +121 -0
- package/dist/store/migrations/index.js.map +1 -0
- package/dist/store/pages.d.ts +81 -0
- package/dist/store/pages.d.ts.map +1 -0
- package/dist/store/pages.js +286 -0
- package/dist/store/pages.js.map +1 -0
- package/dist/store/person-behavior.d.ts +37 -0
- package/dist/store/person-behavior.d.ts.map +1 -0
- package/dist/store/person-behavior.js +134 -0
- package/dist/store/person-behavior.js.map +1 -0
- package/dist/store/pglite-assets.d.ts +15 -0
- package/dist/store/pglite-assets.d.ts.map +1 -0
- package/dist/store/pglite-assets.js +47 -0
- package/dist/store/pglite-assets.js.map +1 -0
- package/dist/store/pglite-executor.d.ts +21 -0
- package/dist/store/pglite-executor.d.ts.map +1 -0
- package/dist/store/pglite-executor.js +61 -0
- package/dist/store/pglite-executor.js.map +1 -0
- package/dist/store/postgres-executor.d.ts +16 -0
- package/dist/store/postgres-executor.d.ts.map +1 -0
- package/dist/store/postgres-executor.js +77 -0
- package/dist/store/postgres-executor.js.map +1 -0
- package/dist/store/query-rewrite.d.ts +28 -0
- package/dist/store/query-rewrite.d.ts.map +1 -0
- package/dist/store/query-rewrite.js +97 -0
- package/dist/store/query-rewrite.js.map +1 -0
- package/dist/store/search.d.ts +65 -0
- package/dist/store/search.d.ts.map +1 -0
- package/dist/store/search.js +312 -0
- package/dist/store/search.js.map +1 -0
- package/dist/store/sequence-sync.d.ts +22 -0
- package/dist/store/sequence-sync.d.ts.map +1 -0
- package/dist/store/sequence-sync.js +46 -0
- package/dist/store/sequence-sync.js.map +1 -0
- package/dist/store/sql-executor.d.ts +17 -0
- package/dist/store/sql-executor.d.ts.map +1 -0
- package/dist/store/sql-executor.js +3 -0
- package/dist/store/sql-executor.js.map +1 -0
- package/dist/store/store-meta.d.ts +10 -0
- package/dist/store/store-meta.d.ts.map +1 -0
- package/dist/store/store-meta.js +13 -0
- package/dist/store/store-meta.js.map +1 -0
- package/dist/store/tags.d.ts +10 -0
- package/dist/store/tags.d.ts.map +1 -0
- package/dist/store/tags.js +35 -0
- package/dist/store/tags.js.map +1 -0
- package/dist/store/timeline.d.ts +38 -0
- package/dist/store/timeline.d.ts.map +1 -0
- package/dist/store/timeline.js +173 -0
- package/dist/store/timeline.js.map +1 -0
- package/dist/store/trgm-search.d.ts +13 -0
- package/dist/store/trgm-search.d.ts.map +1 -0
- package/dist/store/trgm-search.js +53 -0
- package/dist/store/trgm-search.js.map +1 -0
- package/dist/store/wikilink.d.ts +17 -0
- package/dist/store/wikilink.d.ts.map +1 -0
- package/dist/store/wikilink.js +58 -0
- package/dist/store/wikilink.js.map +1 -0
- package/dist/sync/obsidian.d.ts +136 -0
- package/dist/sync/obsidian.d.ts.map +1 -0
- package/dist/sync/obsidian.js +543 -0
- package/dist/sync/obsidian.js.map +1 -0
- package/dist/synth/cache.d.ts +17 -0
- package/dist/synth/cache.d.ts.map +1 -0
- package/dist/synth/cache.js +67 -0
- package/dist/synth/cache.js.map +1 -0
- package/dist/synth/citations.d.ts +12 -0
- package/dist/synth/citations.d.ts.map +1 -0
- package/dist/synth/citations.js +28 -0
- package/dist/synth/citations.js.map +1 -0
- package/dist/synth/context.d.ts +10 -0
- package/dist/synth/context.d.ts.map +1 -0
- package/dist/synth/context.js +67 -0
- package/dist/synth/context.js.map +1 -0
- package/dist/synth/engine.d.ts +16 -0
- package/dist/synth/engine.d.ts.map +1 -0
- package/dist/synth/engine.js +111 -0
- package/dist/synth/engine.js.map +1 -0
- package/dist/synth/gaps.d.ts +17 -0
- package/dist/synth/gaps.d.ts.map +1 -0
- package/dist/synth/gaps.js +57 -0
- package/dist/synth/gaps.js.map +1 -0
- package/dist/synth/index.d.ts +6 -0
- package/dist/synth/index.d.ts.map +1 -0
- package/dist/synth/index.js +6 -0
- package/dist/synth/index.js.map +1 -0
- package/dist/synth/intent.d.ts +6 -0
- package/dist/synth/intent.d.ts.map +1 -0
- package/dist/synth/intent.js +13 -0
- package/dist/synth/intent.js.map +1 -0
- package/dist/synth/intents/daily-report.d.ts +7 -0
- package/dist/synth/intents/daily-report.d.ts.map +1 -0
- package/dist/synth/intents/daily-report.js +37 -0
- package/dist/synth/intents/daily-report.js.map +1 -0
- package/dist/synth/intents/index.d.ts +2 -0
- package/dist/synth/intents/index.d.ts.map +1 -0
- package/dist/synth/intents/index.js +12 -0
- package/dist/synth/intents/index.js.map +1 -0
- package/dist/synth/intents/person-strategy.d.ts +40 -0
- package/dist/synth/intents/person-strategy.d.ts.map +1 -0
- package/dist/synth/intents/person-strategy.js +66 -0
- package/dist/synth/intents/person-strategy.js.map +1 -0
- package/dist/synth/intents/recall.d.ts +8 -0
- package/dist/synth/intents/recall.d.ts.map +1 -0
- package/dist/synth/intents/recall.js +26 -0
- package/dist/synth/intents/recall.js.map +1 -0
- package/dist/synth/intents/troubleshoot.d.ts +11 -0
- package/dist/synth/intents/troubleshoot.d.ts.map +1 -0
- package/dist/synth/intents/troubleshoot.js +66 -0
- package/dist/synth/intents/troubleshoot.js.map +1 -0
- package/dist/synth/scope.d.ts +13 -0
- package/dist/synth/scope.d.ts.map +1 -0
- package/dist/synth/scope.js +139 -0
- package/dist/synth/scope.js.map +1 -0
- package/dist/synth/types.d.ts +117 -0
- package/dist/synth/types.d.ts.map +1 -0
- package/dist/synth/types.js +2 -0
- package/dist/synth/types.js.map +1 -0
- package/package.json +98 -0
package/README.en.md
ADDED
|
@@ -0,0 +1,934 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<h1 align="center">Memkin</h1>
|
|
3
|
+
<p align="center"><em>You are the sum of your working relationships.</em></p>
|
|
4
|
+
<p align="center"><strong>A local-first memory system for your work — turning your DMs, group chats, emails, docs, and meetings into a private personal memory, so your AI agents truly know you.</strong></p>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="README.md">简体中文</a> | English
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="LICENSE"><img alt="License: Apache 2.0" src="https://img.shields.io/badge/License-Apache_2.0-blue.svg"></a>
|
|
13
|
+
<a href="https://www.npmjs.com/package/memkin"><img alt="npm" src="https://img.shields.io/npm/v/memkin?color=cb3837&logo=npm"></a>
|
|
14
|
+
<img alt="Runtime: Bun" src="https://img.shields.io/badge/runtime-Bun-black">
|
|
15
|
+
<img alt="Language: TypeScript" src="https://img.shields.io/badge/lang-TypeScript-3178c6">
|
|
16
|
+
<img alt="Tests: 1000+" src="https://img.shields.io/badge/tests-1000%2B-success">
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
<p align="center">
|
|
20
|
+
<a href="#quick-start">Quick Start</a> •
|
|
21
|
+
<a href="#features">Features</a> •
|
|
22
|
+
<a href="#use-cases">Use Cases</a> •
|
|
23
|
+
<a href="#architecture">Architecture</a> •
|
|
24
|
+
<a href="#cli-reference">CLI Reference</a> •
|
|
25
|
+
<a href="#roadmap">Roadmap</a>
|
|
26
|
+
</p>
|
|
27
|
+
|
|
28
|
+
<p align="center">
|
|
29
|
+
<img src="https://raw.githubusercontent.com/AndreLYL/memkin/main/docs/assets/web-ui-graph.jpeg" alt="Memkin knowledge graph — entities, decisions, tasks, and knowledge connected across your work" width="850">
|
|
30
|
+
<br>
|
|
31
|
+
<em>Your work, as a living knowledge graph — people, decisions, tasks, and knowledge, connected.</em>
|
|
32
|
+
</p>
|
|
33
|
+
|
|
34
|
+
<!-- TODO(demo): replace with an 8-12s demo GIF — ask Memkin a question inside Claude Code
|
|
35
|
+
and watch the agent recall a Feishu meeting decision + linked task over MCP.
|
|
36
|
+
Research shows a GIF of "the product actually working" is the single highest-converting
|
|
37
|
+
element in a README. -->
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## The Problem
|
|
42
|
+
|
|
43
|
+
Your work memory has two homes, and your AI agents can't reach either.
|
|
44
|
+
|
|
45
|
+
- **Feishu (Lark)** holds your working relationships — DMs, group chats, emails, meetings, tasks. This is *what* you work on and *who* you work with.
|
|
46
|
+
- **AI agents** (Claude Code, Codex, OpenClaw) hold your building process — the decisions, discoveries, and dead-ends from every coding session.
|
|
47
|
+
|
|
48
|
+
But every time you open a new agent session, it knows nothing. You re-explain who you are, what the project is, what was decided last week, and why. The context is *somewhere* — buried in chat logs and session transcripts you'll never scroll through again.
|
|
49
|
+
|
|
50
|
+
**You don't have a memory problem. You have a fragmentation problem — and your agents pay for it every day.**
|
|
51
|
+
|
|
52
|
+
## The Solution
|
|
53
|
+
|
|
54
|
+
Memkin is a **local-first personal memory system built for the Chinese workplace**. Work in China happens inside Feishu, DingTalk, and WeCom — Memkin pulls the DMs, group chats, emails, meetings, and docs out of these tools, together with your AI-agent sessions, and extracts them into structured signals (entities, decisions, tasks, discoveries, knowledge, relationships) — into one searchable knowledge graph on your own machine, then serves that memory back to any agent over **MCP**.
|
|
55
|
+
|
|
56
|
+
> The MVP focuses on full **Feishu** capture; **DingTalk, WeCom**, and more Chinese workplace tools are on the roadmap (below).
|
|
57
|
+
|
|
58
|
+
The result: your agents both **write to** and **read from** the same memory — so Claude Code, Codex, and any MCP client finally *know you and your work*.
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
Feishu work AI-agent sessions
|
|
62
|
+
(DMs / groups / email (Claude Code / Codex
|
|
63
|
+
meetings / tasks) / OpenClaw)
|
|
64
|
+
│ │
|
|
65
|
+
└───────────────┬───────────────┘
|
|
66
|
+
▼ collect + extract (local)
|
|
67
|
+
┌──────────────────┐
|
|
68
|
+
│ Your core memory │ entities · decisions · tasks
|
|
69
|
+
│ (PGLite, local) │ knowledge · timeline · graph
|
|
70
|
+
└────────┬─────────┘
|
|
71
|
+
▼ MCP
|
|
72
|
+
Your agents know you
|
|
73
|
+
│
|
|
74
|
+
└──── the more agents work, the better it knows you ───┘
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
> "I discussed a proposal with a colleague on Feishu yesterday, implemented part of it in Claude Code today, and have a review meeting next week."
|
|
78
|
+
>
|
|
79
|
+
> Memkin connects these three events automatically — across platforms, across time — and hands the whole thread to your agent on demand.
|
|
80
|
+
|
|
81
|
+
## Three Pillars
|
|
82
|
+
|
|
83
|
+
**🔒 Local-first, truly private**
|
|
84
|
+
Your data never leaves your machine. PGLite embedded database stores everything, optional local embeddings via Ollama, zero cloud dependency. Dual-track privacy redaction (reversible / irreversible) scrubs sensitive data before it's written.
|
|
85
|
+
|
|
86
|
+
**🕸️ An entity knowledge graph, not a pile of vector chunks**
|
|
87
|
+
Signals are anchored to entities (people, projects, tools) and linked in a directed graph. You get answers *with context* — who, why, and what it relates to — instead of isolated similar-text fragments.
|
|
88
|
+
|
|
89
|
+
**🤖 MCP-native + Feishu capture**
|
|
90
|
+
**29 built-in MCP tools** let any agent both query and write back to your memory. Full Feishu capture (7 sources) turns your real work — requirements, proposals, team decisions — into a first-class data source, something neither pure RAG nor note apps can do.
|
|
91
|
+
|
|
92
|
+
## Features
|
|
93
|
+
|
|
94
|
+
**🛰️ Full Feishu (Lark) Capture**
|
|
95
|
+
Your work lives in Feishu. Memkin collects across **7 sources** — DMs, group chats, email, calendar, docs, tasks, and message search — turning your working relationships into structured memory. Doc capture produces upgradable "summary cards" (DocSource v2).
|
|
96
|
+
|
|
97
|
+
**🤖 Agents That Know You (MCP)**
|
|
98
|
+
Use Memkin as the memory layer for any MCP agent — Claude Code, Cursor, Claude Desktop, Windsurf. **29 built-in tools** let your agent query your history, read entity pages, and write new knowledge back. Agents are both producers and consumers of your memory.
|
|
99
|
+
|
|
100
|
+
**🧠 AI-Powered Signal Extraction**
|
|
101
|
+
An LLM pipeline extracts 7 types of structured signals from raw conversations: entities, timeline events, decisions, tasks, discoveries, knowledge, and relationships.
|
|
102
|
+
|
|
103
|
+
**🔍 Hybrid Semantic Search**
|
|
104
|
+
Full-text search (tsvector, multilingual) + vector retrieval fused with Reciprocal Rank Fusion (RRF). Ask in natural language — powered by PGLite FTS + pgvector.
|
|
105
|
+
|
|
106
|
+
**♻️ Memory Consolidation (Dream Cycle)**
|
|
107
|
+
A background consolidator automatically runs tier rotation (hot → warm → cold), repairs dead links, and infers preferences — so your memory organizes itself over time.
|
|
108
|
+
|
|
109
|
+
**⏰ Resident Daemon + Scheduled Capture**
|
|
110
|
+
A built-in daemon collects from your sources on a schedule, with run history and alerts, keeping your memory continuously fresh.
|
|
111
|
+
|
|
112
|
+
**🔗 Obsidian Bidirectional Sync**
|
|
113
|
+
Export your memory pages to an Obsidian vault (Markdown), edit them, and import them back.
|
|
114
|
+
|
|
115
|
+
**🕸️ Knowledge Graph + Web UI**
|
|
116
|
+
See the connections between people, projects, and decisions. Browse a built-in web UI with dashboard, timeline, force-directed graph, and search.
|
|
117
|
+
|
|
118
|
+
**🔌 REST API**
|
|
119
|
+
Full Hono-powered HTTP API for all store operations. Integrate with any client.
|
|
120
|
+
|
|
121
|
+
## Works With
|
|
122
|
+
|
|
123
|
+
Memkin is a standard MCP stdio server and plugs into any MCP client:
|
|
124
|
+
|
|
125
|
+
**Claude Code** · **Cursor** · **Claude Desktop** · **Windsurf** · and any MCP-compatible agent.
|
|
126
|
+
|
|
127
|
+
## Feature Inventory
|
|
128
|
+
|
|
129
|
+
The full capability list (✅ = shipped and included in the package).
|
|
130
|
+
|
|
131
|
+
### 📥 Data Collection
|
|
132
|
+
- ✅ Feishu group chats (OpenAPI chat/message)
|
|
133
|
+
- ✅ Feishu DMs / recent chats (lark-cli `message_search`, user mode)
|
|
134
|
+
- ✅ Feishu email
|
|
135
|
+
- ✅ Feishu calendar events
|
|
136
|
+
- ✅ Feishu tasks
|
|
137
|
+
- ✅ Feishu doc summary cards (DocSource v2: pointer card → upgraded full card on trigger)
|
|
138
|
+
- ✅ Claude Code sessions (`~/.claude/projects/`)
|
|
139
|
+
- ✅ Codex CLI sessions (`~/.codex/`)
|
|
140
|
+
- ✅ OpenClaw Hermes multi-agent sessions (`~/.openclaw/agents/`, auto sub-agent discovery)
|
|
141
|
+
- ✅ Incremental collection: per-source cursor + content-hash dedup
|
|
142
|
+
- ✅ Historical backfill: coverage stats, start / cancel / reset
|
|
143
|
+
|
|
144
|
+
### 🧠 Signal Extraction Pipeline
|
|
145
|
+
- ✅ Collect → Dedup → Block Builder → Noise Filter → Signal Extractor → Privacy
|
|
146
|
+
- ✅ Two-layer noise filtering: L1 rules + L2 LLM scoring
|
|
147
|
+
- ✅ 7 structured signal types: entities, timeline, decisions, tasks, discoveries, knowledge, relationships
|
|
148
|
+
- ✅ LLM providers: OpenAI / Anthropic (plus a mock for testing)
|
|
149
|
+
- ✅ Signal scoring and entity extraction
|
|
150
|
+
- ✅ JSON / Markdown output formats
|
|
151
|
+
- ✅ Output adapters: store (PGLite) / file / gbrain / stdout
|
|
152
|
+
- ✅ Provenance: every signal traces back to its source message
|
|
153
|
+
|
|
154
|
+
### 🔒 Privacy & Security
|
|
155
|
+
- ✅ Redaction before write; data stays fully local
|
|
156
|
+
- ✅ Dual-track modes: reversible / irreversible
|
|
157
|
+
- ✅ Built-in redaction: phone, ID card, bank card, with custom replacement token
|
|
158
|
+
- ✅ API keys always masked in the config center
|
|
159
|
+
|
|
160
|
+
### 🗄️ Storage & Retrieval
|
|
161
|
+
- ✅ PGLite embedded PostgreSQL (in-process, zero external deps)
|
|
162
|
+
- ✅ pgvector vector search
|
|
163
|
+
- ✅ tsvector full-text search (simple tokenizer, multilingual)
|
|
164
|
+
- ✅ RRF hybrid search (FTS + vector fusion) with compiled_truth / backlink boosts
|
|
165
|
+
- ✅ Recursive chunking (300 words / 50-word overlap), embedding reuse + stale detection
|
|
166
|
+
- ✅ Embeddings: OpenAI / Ollama (local)
|
|
167
|
+
|
|
168
|
+
### 🕸️ Knowledge Graph
|
|
169
|
+
- ✅ Directed link graph with link types and context
|
|
170
|
+
- ✅ BFS traversal (controllable depth / direction)
|
|
171
|
+
- ✅ Backlinks
|
|
172
|
+
- ✅ Entity anchoring: signals attach to people / projects / tools
|
|
173
|
+
- ✅ Entity profile aggregation (signals + timeline)
|
|
174
|
+
|
|
175
|
+
### 👤 Person Identity
|
|
176
|
+
- ✅ Identity resolution and canonicalization
|
|
177
|
+
- ✅ Alias / handle linking (Feishu open_id, email, name, nickname, slug)
|
|
178
|
+
- ✅ Strong / weak link strength
|
|
179
|
+
- ✅ Person merge (re-points links / timeline / tags / aliases)
|
|
180
|
+
- ✅ Recanonicalize slug (fix a wrong canonicalization)
|
|
181
|
+
|
|
182
|
+
### ♻️ Memory Lifecycle & Daemon
|
|
183
|
+
- ✅ Memory consolidation (dream cycle): hot → warm → cold tier rotation
|
|
184
|
+
- ✅ Dead-link repair
|
|
185
|
+
- ✅ Preference inference (learns preferences from history)
|
|
186
|
+
- ✅ Resident daemon: scheduled per-source capture, scheduling, run history, alerts
|
|
187
|
+
|
|
188
|
+
### 🔗 Sync & Interop
|
|
189
|
+
- ✅ Obsidian bidirectional sync (export vault / import back)
|
|
190
|
+
- ✅ MCP stdio server (29 tools)
|
|
191
|
+
- ✅ REST API (Hono — pages / search / graph / tags / timeline / embed / extract / provenance / event stream)
|
|
192
|
+
|
|
193
|
+
### 🖥️ Web UI (React + Vite)
|
|
194
|
+
- ✅ Dashboard overview
|
|
195
|
+
- ✅ Timeline view (feed)
|
|
196
|
+
- ✅ Force-directed knowledge graph
|
|
197
|
+
- ✅ Search interface
|
|
198
|
+
- ✅ Entity / page detail
|
|
199
|
+
- ✅ In-browser config editing + guided setup wizard
|
|
200
|
+
|
|
201
|
+
### ⚙️ Configuration & Onboarding
|
|
202
|
+
- ✅ Interactive config center (full-screen TUI, React + ink)
|
|
203
|
+
- ✅ Linear Q&A wizard fallback (`--no-tui`) / fully automatic (`--auto`)
|
|
204
|
+
- ✅ Auto-detection: runtime, API keys, existing data sources
|
|
205
|
+
- ✅ Hardware assessment → recommends local / remote embeddings
|
|
206
|
+
- ✅ Live connection checks (LLM / embedding API key and connectivity)
|
|
207
|
+
- ✅ `memkin doctor` environment diagnostics
|
|
208
|
+
|
|
209
|
+
## Use Cases
|
|
210
|
+
|
|
211
|
+
> Memkin answers not "what do I know" but "**what should I do**" — every scenario returns a cited, traceable action, not a pile of chunks.
|
|
212
|
+
|
|
213
|
+
**🌟 Know how to talk to someone before you meet them (Hero)**
|
|
214
|
+
*"I'm meeting Director Zhang tomorrow to negotiate a renewal price increase — what should I keep in mind?"* — `prep_for_person` **passively infers** a communication profile from your real interactions (direct vs. indirect, data-driven vs. relationship-driven, landmines), tailors advice to this goal, and flags gaps (*"nothing new about Zhang in 18 days — the profile may be stale"*). Zero questionnaire; the profile never leaves your machine.
|
|
215
|
+
|
|
216
|
+
**📋 Generate a cross-channel daily report in one line**
|
|
217
|
+
*"Help me write today's daily report"* — `daily_report` aggregates today's signals scattered across DMs, group chats, email, Feishu Minutes notes, and calendar into 7 sections: decisions / in-progress / my tasks / awaiting-reply·@mentions / relationship updates / tomorrow's reminders. Action items in meeting notes that name you land in "my tasks" automatically.
|
|
218
|
+
|
|
219
|
+
**🔧 Troubleshoot by the playbook**
|
|
220
|
+
*"Why won't the ADAS engage?"* — `troubleshoot` walks the playbook's diagnostic chain (`precedes`) to give ordered steps and explain what each result means. Playbooks can be authored by hand or auto-extracted (as drafts) from your troubleshooting conversations.
|
|
221
|
+
|
|
222
|
+
**⚡ Onboard your agent to a project in seconds**
|
|
223
|
+
*"What's the current state of the memkin project?"* — `get_session_context` pulls the aggregated decisions, open tasks, and recent timeline straight from memory, no re-explaining.
|
|
224
|
+
|
|
225
|
+
**🔎 Recall a person or a thread**
|
|
226
|
+
*"What did I discuss with this colleague last week?"* — stitches Feishu DMs, the meeting, and the follow-up task into one cited answer.
|
|
227
|
+
|
|
228
|
+
## Why Memkin
|
|
229
|
+
|
|
230
|
+
| | Memkin | Pure RAG / vector search | Note apps (Obsidian / Notion) | GBrain | OpenHuman |
|
|
231
|
+
|---|:---:|:---:|:---:|:---:|:---:|
|
|
232
|
+
| Local-first & private | ✅ | depends | depends | ✅ | ✅ |
|
|
233
|
+
| Open source | ✅ | varies | partial | partial | ✅ |
|
|
234
|
+
| Feishu work capture (DM/group/email/meeting/task) | ✅ | ❌ | manual | ❌ | ❌ |
|
|
235
|
+
| AI-agent sessions as a source | ✅ | ❌ | ❌ | ✅ | ✅ |
|
|
236
|
+
| Agent-native: read **and** write over MCP | ✅ | ❌ | ❌ | ✅ | partial |
|
|
237
|
+
| Entity + relationship knowledge graph | ✅ | ❌ | manual | ✅ | partial |
|
|
238
|
+
| Structured signal extraction (not just chunks) | ✅ | ❌ | ❌ | ✅ | ✅ |
|
|
239
|
+
| Memory consolidation + scheduled-capture daemon | ✅ | ❌ | ❌ | partial | partial |
|
|
240
|
+
|
|
241
|
+
> Pure RAG gives you vectors but no entities or relationships, so answers lack context. Note apps are powerful but rely on manual upkeep. Memkin keeps it local and agent-native — with Feishu work as a first-class source.
|
|
242
|
+
|
|
243
|
+
## Quick Start
|
|
244
|
+
|
|
245
|
+
### Prerequisites
|
|
246
|
+
|
|
247
|
+
- [Node.js](https://nodejs.org) >= 18 (for the `npx` / `npm` install)
|
|
248
|
+
- (Optional) [Ollama](https://ollama.ai) for local embeddings
|
|
249
|
+
|
|
250
|
+
### One-step launch (recommended)
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
# Run without installing — no config? it auto-launches the setup wizard,
|
|
254
|
+
# then starts the server and opens your browser
|
|
255
|
+
npx memkin start
|
|
256
|
+
|
|
257
|
+
# Running with no subcommand is equivalent to `start`
|
|
258
|
+
npx memkin
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
`memkin start` is the single-step path: if there's no `memkin.yaml`, it opens the browser setup wizard first, then starts the HTTP server and auto-opens your browser.
|
|
262
|
+
|
|
263
|
+
> The npm package and the command are both `memkin`.
|
|
264
|
+
|
|
265
|
+
### Ports at a glance
|
|
266
|
+
|
|
267
|
+
| Service | Default port | Address |
|
|
268
|
+
|---------|--------------|---------|
|
|
269
|
+
| HTTP API + Web UI | `3927` | `http://localhost:3927` |
|
|
270
|
+
| MCP Streamable HTTP (`--mcp-http`) | `3928` | `http://localhost:3928/mcp` |
|
|
271
|
+
|
|
272
|
+
> **Exposing on a LAN & auth**: the server binds `127.0.0.1` (loopback only) by default. To expose it on your LAN, use `memkin serve --host 0.0.0.0` (or set `server.host` in `memkin.yaml`) — this **requires an auth token**, or the server refuses to start. The token comes from `server.auth_token` (config) or `MEMKIN_AUTH_TOKEN` (env); once set, every API request must carry an `Authorization: Bearer <token>` header.
|
|
273
|
+
>
|
|
274
|
+
> ```yaml
|
|
275
|
+
> # memkin.yaml
|
|
276
|
+
> server:
|
|
277
|
+
> host: 0.0.0.0
|
|
278
|
+
> auth_token: <your-token> # or export MEMKIN_AUTH_TOKEN=<your-token>
|
|
279
|
+
> ```
|
|
280
|
+
|
|
281
|
+
### Install (recommended: npm)
|
|
282
|
+
|
|
283
|
+
```bash
|
|
284
|
+
# Run without installing
|
|
285
|
+
npx memkin --help
|
|
286
|
+
|
|
287
|
+
# Or install globally to get the `memkin` command
|
|
288
|
+
npm install -g memkin
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### Install from source (development)
|
|
292
|
+
|
|
293
|
+
```bash
|
|
294
|
+
git clone https://github.com/AndreLYL/memkin.git
|
|
295
|
+
cd memkin
|
|
296
|
+
bun install
|
|
297
|
+
npm link # registers the `memkin` command globally
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### Initialize Configuration
|
|
301
|
+
|
|
302
|
+
`memkin init` launches an **interactive configuration center** — a full-screen TUI (built with React + ink) that lets you generate and edit `memkin.yaml` without hand-writing YAML:
|
|
303
|
+
|
|
304
|
+
```bash
|
|
305
|
+
memkin init
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
**Config center features:**
|
|
309
|
+
- 📋 **Sectioned editing**: Overview, LLM, Embedding, Sources, Privacy, Block Builder, and more
|
|
310
|
+
- ⌨️ **Keyboard-driven**: ↑/↓ or Tab to move between fields, Enter to edit, Ctrl+S to save, q / Esc to quit (auto-saves if dirty)
|
|
311
|
+
- 🔌 **Live connection checks**: validates your LLM / embedding API key and connectivity as you edit
|
|
312
|
+
- 💡 **Smart recommendations**: suggests local (Ollama) vs remote (OpenAI) embedding based on your hardware
|
|
313
|
+
- 🔒 **Secret masking**: API keys are always shown masked
|
|
314
|
+
- 🧭 **Auto-detection**: finds existing data sources (Claude Code, Codex, Hermes) and registers the `memkin` command
|
|
315
|
+
|
|
316
|
+
**Run modes:**
|
|
317
|
+
|
|
318
|
+
| Command / environment | Behavior |
|
|
319
|
+
|---|---|
|
|
320
|
+
| `memkin init` (in a TTY) | Full-screen TUI config center |
|
|
321
|
+
| `memkin init --no-tui` | Linear question-and-answer wizard (fallback) |
|
|
322
|
+
| `memkin init --auto` | Fully automatic, no prompts, uses detected defaults |
|
|
323
|
+
| `memkin init --force` | Overwrite an existing configuration |
|
|
324
|
+
| `MEMKIN_NO_TUI=1` | Force-disable the TUI (also auto-falls back in non-TTY environments) |
|
|
325
|
+
|
|
326
|
+
> `memkin config init` is equivalent to `memkin init`. A few advanced settings (e.g. Feishu) currently need to be edited directly in `memkin.yaml` (see [Configuration](#configuration)).
|
|
327
|
+
|
|
328
|
+
### Check Environment
|
|
329
|
+
|
|
330
|
+
```bash
|
|
331
|
+
memkin doctor
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
### Run Your First Extraction
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
# Extract from Feishu (your work source)
|
|
338
|
+
memkin extract --source feishu --since 3d
|
|
339
|
+
|
|
340
|
+
# Extract from Claude Code
|
|
341
|
+
memkin extract --source claude-code
|
|
342
|
+
|
|
343
|
+
# Extract from all enabled sources
|
|
344
|
+
memkin extract --source all
|
|
345
|
+
|
|
346
|
+
# Dry run (no LLM calls, just scan data volume)
|
|
347
|
+
memkin extract --source claude-code --dry-run
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
> Feishu requires a one-time `lark-cli` user login and a `feishu` block in `memkin.yaml`. See [Configuration](#configuration) for the full Feishu setup, including DM vs. group capture paths.
|
|
351
|
+
|
|
352
|
+
### Search Your Memory
|
|
353
|
+
|
|
354
|
+
```bash
|
|
355
|
+
# Hybrid search (FTS + vector)
|
|
356
|
+
memkin search "auth middleware decision"
|
|
357
|
+
|
|
358
|
+
# FTS-only search
|
|
359
|
+
memkin search "JWT token" --mode fts
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
### Start the Server
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
# HTTP API + Web UI (default http://localhost:3927) — auto-opens your browser
|
|
366
|
+
memkin serve
|
|
367
|
+
|
|
368
|
+
# Skip the auto-open (e.g. on a remote/headless host)
|
|
369
|
+
memkin serve --no-open
|
|
370
|
+
|
|
371
|
+
# MCP stdio (local direct connect for AI agents — Claude Code, Cursor, etc.; no browser)
|
|
372
|
+
memkin serve --mcp
|
|
373
|
+
|
|
374
|
+
# MCP Streamable HTTP (remote / multi-client, default http://localhost:3928/mcp; no browser)
|
|
375
|
+
memkin serve --mcp-http
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
> Without a `memkin.yaml`, `serve` tells you to run `memkin start` for one-step setup + launch, or `memkin init --web` to configure first.
|
|
379
|
+
|
|
380
|
+
### Connect Your Agent (MCP)
|
|
381
|
+
|
|
382
|
+
**One command (recommended)**: `memkin install` writes the MCP config plus a tiny memory directive into your AI client (**global by default**, across all projects). Supports **Claude Code · Claude Desktop · Cursor · Codex · Windsurf**:
|
|
383
|
+
|
|
384
|
+
```bash
|
|
385
|
+
memkin install # detect installed clients and wire them up
|
|
386
|
+
memkin install --agent claude-code # target a single client
|
|
387
|
+
memkin install --dry-run # preview file changes, write nothing
|
|
388
|
+
memkin uninstall # clean removal (idempotent)
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
Reopen the client and you're set — ask "what did X tell me last week?" or "where is this project at?" and the agent will **proactively query Memkin** per the injected directive (cheap-first: `search` keyword lookup at zero cost, escalating to `query`/`recall` only if thin) instead of guessing.
|
|
392
|
+
|
|
393
|
+
> Claude Desktop has no rules file, so it relies on the MCP server's `instructions` field. You can also configure things manually below.
|
|
394
|
+
|
|
395
|
+
**Automatic recall on Claude Code (optional · hooks)**: go further on Claude Code so memory arrives with zero effort:
|
|
396
|
+
|
|
397
|
+
```bash
|
|
398
|
+
memkin hooks install # SessionStart + UserPromptSubmit read hooks (on by default)
|
|
399
|
+
memkin hooks install --write-back # also enable end-of-session auto write-back (opt-in)
|
|
400
|
+
memkin hooks uninstall # remove
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
- **SessionStart**: injects an "active projects / decisions / open tasks / key people" digest at the start of each session (the always-on core).
|
|
404
|
+
- **UserPromptSubmit**: a **zero-cost FTS** probe before each prompt; injects only on a hit (≤3 items, ≤3000 chars, appended after the user message to preserve prompt cache).
|
|
405
|
+
- **SessionEnd** (`--write-back`, off by default): asynchronous incremental extraction back into memory, so it compounds.
|
|
406
|
+
|
|
407
|
+
> Read hooks default on (local, cheap); write-back is explicit `--write-back` (cost + privacy, opt-in). Other clients have no lifecycle hooks and rely on the instruction layer above for model-initiated recall.
|
|
408
|
+
|
|
409
|
+
**Let the agent install itself**: for agents that can read a URL, just say "onboard me to Memkin following [`MEMKIN_FOR_AGENTS.md`](MEMKIN_FOR_AGENTS.md)" and it runs the commands above and self-checks. For **OpenClaw / Hermes**, use `memkin install --agent hermes` (writes `mcp_servers` into `config.yaml` + drops the `memkin` skill; run `/reload-mcp` in-session to apply); or scaffold the skill alone with `memkin skill scaffold --dir ~/.hermes/skills`.
|
|
410
|
+
|
|
411
|
+
Memkin offers two MCP transports — pick by scenario:
|
|
412
|
+
|
|
413
|
+
- **stdio (`--mcp`)** — local direct connect; the agent spawns `memkin` as a subprocess. Zero network setup; best for a single client on one machine.
|
|
414
|
+
- **Streamable HTTP (`--mcp-http`)** — over HTTP (default `3928`); use it for remote access or sharing one memory across multiple clients.
|
|
415
|
+
|
|
416
|
+
Point any MCP client at Memkin so it can read and write your memory. For Claude Code (stdio, local direct connect):
|
|
417
|
+
|
|
418
|
+
```json
|
|
419
|
+
{
|
|
420
|
+
"mcpServers": {
|
|
421
|
+
"memkin": {
|
|
422
|
+
"command": "memkin",
|
|
423
|
+
"args": ["serve", "--mcp"]
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
Then ask your agent things like *"search my memory for the auth refactor decision"* or *"what tasks are still open on project X?"* — it answers from your local memory.
|
|
430
|
+
|
|
431
|
+
### Browse the Web UI
|
|
432
|
+
|
|
433
|
+
```bash
|
|
434
|
+
cd web
|
|
435
|
+
bun install
|
|
436
|
+
bun run dev # dashboard, timeline, knowledge graph, search
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
## Architecture
|
|
440
|
+
|
|
441
|
+
Memkin is **5 vertical data-flow layers + 3 cross-cutting concerns**. Data flows top-down: sources are collected, extracted into signals, stored as local memory, then read/written through the bottom interfaces. **Person identity**, **consolidation**, and **scheduling** cut across the stack.
|
|
442
|
+
|
|
443
|
+
<p align="center">
|
|
444
|
+
<img src="https://raw.githubusercontent.com/AndreLYL/memkin/main/docs/assets/architecture.png" alt="Memkin architecture — 5 vertical layers + 3 cross-cutting concerns" width="920">
|
|
445
|
+
</p>
|
|
446
|
+
|
|
447
|
+
<details>
|
|
448
|
+
<summary>📐 View the editable Mermaid source</summary>
|
|
449
|
+
|
|
450
|
+
```mermaid
|
|
451
|
+
flowchart TB
|
|
452
|
+
subgraph L1["① Config & Onboarding"]
|
|
453
|
+
cfg["TUI config center · Web UI config · memkin.yaml<br/>auto-detect · hardware assessment · connection checks"]
|
|
454
|
+
end
|
|
455
|
+
subgraph L2["② Collection"]
|
|
456
|
+
feishu["Feishu: DMs · groups · email · calendar · tasks · message search · docs"]
|
|
457
|
+
agent["AI-agent sessions: Claude Code · Codex · Hermes"]
|
|
458
|
+
inc["Incremental (cursor + dedup) · historical Backfill"]
|
|
459
|
+
planned1["Planned: DingTalk · WeCom · local documents"]:::planned
|
|
460
|
+
end
|
|
461
|
+
subgraph L3["③ Extraction Pipeline"]
|
|
462
|
+
pipe["Block Builder → Noise Filter (rules+LLM) → Signal Extractor (OpenAI/Anthropic)<br/>→ entity extraction → scoring → privacy redaction → 7 signal types"]
|
|
463
|
+
end
|
|
464
|
+
subgraph L4["④ Memory Store"]
|
|
465
|
+
store["PGLite + pgvector<br/>Page · Chunk · Tag · Timeline · Graph<br/>hybrid search (FTS + vector + RRF)"]
|
|
466
|
+
end
|
|
467
|
+
subgraph L5["⑤ Interfaces & Consumption"]
|
|
468
|
+
cli["CLI"]
|
|
469
|
+
mcp["MCP (29 tools)"]
|
|
470
|
+
rest["REST API"]
|
|
471
|
+
web["Web UI (read-only)"]
|
|
472
|
+
obs["Obsidian bidirectional sync"]
|
|
473
|
+
end
|
|
474
|
+
|
|
475
|
+
L1 --> L2 --> L3 --> L4 --> L5
|
|
476
|
+
|
|
477
|
+
subgraph X["Cross-cutting concerns"]
|
|
478
|
+
id["🧬 Person Identity<br/>merge same person across platforms"]
|
|
479
|
+
cons["♻️ Consolidation / Dream Cycle<br/>tier rotation · dead-link repair · preference inference"]
|
|
480
|
+
sched["⏰ Scheduling / AutoFetch<br/>scheduled capture · run history · alerts"]
|
|
481
|
+
end
|
|
482
|
+
|
|
483
|
+
id -.-> L2
|
|
484
|
+
id -.-> L4
|
|
485
|
+
cons -.-> L4
|
|
486
|
+
sched -.-> L2
|
|
487
|
+
|
|
488
|
+
classDef planned stroke-dasharray: 5 5,fill:#f6f6f6,color:#888;
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
</details>
|
|
492
|
+
|
|
493
|
+
### Layer Breakdown
|
|
494
|
+
|
|
495
|
+
| Layer | Responsibility |
|
|
496
|
+
|-------|----------------|
|
|
497
|
+
| **① Config & Onboarding** | TUI config center (React + ink), Web UI config, hand-edited `memkin.yaml`; auto-detect runtime / API keys / sources, hardware-aware embedding recommendation, live connection checks |
|
|
498
|
+
| **② Collection** | Feishu (DMs / groups / email / calendar / tasks / message search / docs), AI-agent sessions (Claude Code / Codex / Hermes); incremental capture (per-source cursor + content dedup), historical Backfill. **Planned**: DingTalk, WeCom, local documents |
|
|
499
|
+
| **③ Extraction Pipeline** | Block Builder → Noise Filter (L1 rules + L2 LLM) → Signal Extractor (OpenAI / Anthropic) → entity extraction → scoring → privacy redaction; emits 7 signal types via output adapters (store / file / gbrain / stdout) |
|
|
500
|
+
| **④ Memory Store** | PGLite (in-process embedded PostgreSQL) + pgvector; Page / Chunk / Tag / Timeline / Graph stores; hybrid search (tsvector FTS + vector + RRF) |
|
|
501
|
+
| **⑤ Interfaces & Consumption** | CLI, MCP Server (29 tools — agent read / write / maintain), REST API (Hono), Web UI (search / view / graph / timeline, **read-only today**), Obsidian bidirectional sync |
|
|
502
|
+
|
|
503
|
+
**Cross-cutting concerns (span layers, not standalone pipeline stages):**
|
|
504
|
+
|
|
505
|
+
- **🧬 Person Identity** — spans Collection ↔ Store: recognize and merge the same person across platforms (Feishu open_id, email, nickname), alias linking, canonicalization. The foundation of "the sum of your social relations".
|
|
506
|
+
- **♻️ Consolidation (Dream Cycle)** — background pass over the store: hot → warm → cold rotation, dead-link repair, preference inference.
|
|
507
|
+
- **⏰ Scheduling / AutoFetch** — background driver of Collection: scheduled capture, run history, alerts. *(Runs inside `serve` today; standalone daemon + autostart is on the roadmap.)*
|
|
508
|
+
|
|
509
|
+
> Runs on macOS / Linux / Windows with PGLite (default, embedded — works out of the box) · one-command install (npm / npx) · local-first, self-hosted, zero cloud dependency. The self-managed local Postgres engine (faster, optional) is currently macOS (arm64/x64) only.
|
|
510
|
+
|
|
511
|
+
### Signal Extraction Pipeline
|
|
512
|
+
|
|
513
|
+
| Stage | Description |
|
|
514
|
+
|-------|-------------|
|
|
515
|
+
| **Collector** | Fetches raw messages from configured data sources |
|
|
516
|
+
| **Dedup** | Eliminates duplicates via content hashing |
|
|
517
|
+
| **Block Builder** | Groups messages into conversation blocks by time and topic |
|
|
518
|
+
| **Noise Filter** | Scores block significance using rules (L1) + LLM (L2) |
|
|
519
|
+
| **Signal Extractor** | LLM-powered extraction of entities, decisions, tasks, discoveries, knowledge, timeline, links |
|
|
520
|
+
| **Privacy Processor** | Dual-track redaction — reversible or irreversible |
|
|
521
|
+
|
|
522
|
+
### Extracted Signal Types
|
|
523
|
+
|
|
524
|
+
| Signal | Description | Example |
|
|
525
|
+
|--------|-------------|---------|
|
|
526
|
+
| **Entities** | People, projects, tools, concepts | `project/memkin`, `tool/claude-code` |
|
|
527
|
+
| **Timeline** | Key events with timestamps | "2026-05-19: Completed multi-platform collector refactoring" |
|
|
528
|
+
| **Decisions** | Technical choices with reasoning | "Chose PGLite for embedded PostgreSQL with vector support" |
|
|
529
|
+
| **Tasks** | Action items with status | `[open] Implement token auto-refresh` |
|
|
530
|
+
| **Discoveries** | Insights, root causes, edge cases | "UUID v4 is not lexicographically sortable" |
|
|
531
|
+
| **Knowledge** | Reusable facts with provenance | "PGLite runs full Postgres in-process via WASM" |
|
|
532
|
+
| **Links** | Relationships between entities | `project/memkin --[depends_on]--> tool/pglite` |
|
|
533
|
+
|
|
534
|
+
### Storage Layer
|
|
535
|
+
|
|
536
|
+
| Component | Description |
|
|
537
|
+
|-----------|-------------|
|
|
538
|
+
| **PageStore** | CRUD for wiki-style pages with YAML frontmatter |
|
|
539
|
+
| **ChunkStore** | Recursive text chunking (300 words, 50-word overlap) with embedding reuse |
|
|
540
|
+
| **SearchEngine** | FTS via `tsvector` + vector cosine via `pgvector`, fused with RRF scoring |
|
|
541
|
+
| **GraphStore** | Directed link graph with BFS traversal, link types, backlinks |
|
|
542
|
+
| **TagStore** | Page tagging with conflict-safe upserts |
|
|
543
|
+
| **TimelineStore** | Chronological entries per page with dedup |
|
|
544
|
+
| **EmbeddingService** | Batch embedding via OpenAI or Ollama, stale-chunk detection |
|
|
545
|
+
|
|
546
|
+
## MCP Tools
|
|
547
|
+
|
|
548
|
+
Memkin's MCP server exposes **29 tools** spanning retrieval, synthesis, page CRUD, graph, tags, timeline, identity, and Feishu doc ingestion. Prefer the high-level tools first:
|
|
549
|
+
|
|
550
|
+
| Category | Tools |
|
|
551
|
+
|----------|-------|
|
|
552
|
+
| **Retrieval (high-level)** | `query`, `get_session_context`, `get_entity_profile`, `list_signals_by_entity` |
|
|
553
|
+
| **Synthesis** | `synthesize`, `recall` (cited, gap-aware composed answers with inline `[n]`), `prep_for_person` (person communication profile → goal-conditioned strategy; passively inferred, no questionnaire, local-first, ethics-guardrailed), `daily_report` (cross-channel 7-section daily report), `troubleshoot` (one-shot diagnosis along a playbook chain) |
|
|
554
|
+
| **Search** | `search` |
|
|
555
|
+
| **Pages / content** | `get_page`, `put_page`, `list_pages`, `get_chunks` |
|
|
556
|
+
| **Graph** | `add_link`, `remove_link`, `get_links`, `get_backlinks`, `traverse_graph` |
|
|
557
|
+
| **Tags** | `add_tag`, `remove_tag`, `get_tags` |
|
|
558
|
+
| **Timeline** | `add_timeline_entry`, `get_timeline` |
|
|
559
|
+
| **Identity (people)** | `link_person_alias`, `list_person_handles`, `remove_person_alias`, `merge_persons`, `recanonicalize_person` |
|
|
560
|
+
| **Feishu docs** | `ingest_feishu_doc` |
|
|
561
|
+
| **Health** | `get_health` |
|
|
562
|
+
|
|
563
|
+
## CLI Reference
|
|
564
|
+
|
|
565
|
+
| Command | Description |
|
|
566
|
+
|---------|-------------|
|
|
567
|
+
| `memkin start` | One-step launch: setup if needed, then serve + auto-open browser (bare `memkin` is equivalent) |
|
|
568
|
+
| `memkin init` | Interactive config center to generate / edit `memkin.yaml` (`--auto` / `--no-tui` / `--force` / `--web`) |
|
|
569
|
+
| `memkin extract` | Extract signals from a data source |
|
|
570
|
+
| `memkin search <query>` | Search memory (hybrid / `--mode fts`) |
|
|
571
|
+
| `memkin embed` | Generate embeddings for stale chunks |
|
|
572
|
+
| `memkin serve` | Start HTTP API (auto-opens browser, `--no-open` to skip) / `--mcp` stdio / `--mcp-http` |
|
|
573
|
+
| `memkin consolidate` | Run memory consolidation (tier rotation hot→warm / warm→cold) |
|
|
574
|
+
| `memkin export` | Export memory pages to an Obsidian vault (Markdown) |
|
|
575
|
+
| `memkin import` | Import an Obsidian vault back into Memkin |
|
|
576
|
+
| `memkin docs` | Feishu doc summary cards: `sync` / `status` / `retry` |
|
|
577
|
+
| `memkin identity` | Person identity: aliases, merge, rename |
|
|
578
|
+
| `memkin sources` | `list` sources / `test <name>` connectivity |
|
|
579
|
+
| `memkin doctor` | Diagnose configuration and connectivity |
|
|
580
|
+
| `memkin config` | `init` (alias of `memkin init`) / `edit` (browser UI) |
|
|
581
|
+
|
|
582
|
+
### `memkin extract`
|
|
583
|
+
|
|
584
|
+
Extract signals from data sources.
|
|
585
|
+
|
|
586
|
+
```bash
|
|
587
|
+
memkin extract \
|
|
588
|
+
--source <name> # feishu, claude-code, codex, hermes, all
|
|
589
|
+
--format json|markdown # Output format (default: json)
|
|
590
|
+
--adapter store|file|gbrain|stdout # Output target (default: store)
|
|
591
|
+
--output <dir> # Output directory for file adapter
|
|
592
|
+
--since <date> # Process messages after this date (ISO 8601 or relative: 1d, 2h)
|
|
593
|
+
--limit <n> # Max messages to process
|
|
594
|
+
--dry-run # Test without LLM calls or writes
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
### `memkin start`
|
|
598
|
+
|
|
599
|
+
One-step launch. If no `memkin.yaml` exists, it opens the browser setup wizard first; once configured, it starts the HTTP server and auto-opens your browser. Running `memkin` with no subcommand does the same thing.
|
|
600
|
+
|
|
601
|
+
```bash
|
|
602
|
+
memkin start
|
|
603
|
+
memkin # equivalent
|
|
604
|
+
```
|
|
605
|
+
|
|
606
|
+
### `memkin serve`
|
|
607
|
+
|
|
608
|
+
Start the Memkin server.
|
|
609
|
+
|
|
610
|
+
```bash
|
|
611
|
+
# HTTP API + Web UI (default http://localhost:3927) — auto-opens the browser
|
|
612
|
+
memkin serve
|
|
613
|
+
|
|
614
|
+
# Skip the auto-open
|
|
615
|
+
memkin serve --no-open
|
|
616
|
+
|
|
617
|
+
# MCP stdio transport (local direct connect for AI agents)
|
|
618
|
+
memkin serve --mcp
|
|
619
|
+
|
|
620
|
+
# MCP Streamable HTTP transport (remote / multi-client, default http://localhost:3928/mcp)
|
|
621
|
+
memkin serve --mcp-http
|
|
622
|
+
```
|
|
623
|
+
|
|
624
|
+
### `memkin search <query>`
|
|
625
|
+
|
|
626
|
+
Search your stored memory.
|
|
627
|
+
|
|
628
|
+
```bash
|
|
629
|
+
# Hybrid search (FTS + vector, default)
|
|
630
|
+
memkin search "authentication middleware"
|
|
631
|
+
|
|
632
|
+
# FTS-only search
|
|
633
|
+
memkin search "JWT token" --mode fts
|
|
634
|
+
|
|
635
|
+
# Limit results
|
|
636
|
+
memkin search "deployment" --limit 5
|
|
637
|
+
```
|
|
638
|
+
|
|
639
|
+
### `memkin embed`
|
|
640
|
+
|
|
641
|
+
Generate embeddings for unembedded chunks.
|
|
642
|
+
|
|
643
|
+
```bash
|
|
644
|
+
# Embed all stale chunks
|
|
645
|
+
memkin embed
|
|
646
|
+
|
|
647
|
+
# Limit batch size
|
|
648
|
+
memkin embed --limit 100
|
|
649
|
+
```
|
|
650
|
+
|
|
651
|
+
### `memkin doctor`
|
|
652
|
+
|
|
653
|
+
Diagnose configuration and environment.
|
|
654
|
+
|
|
655
|
+
```bash
|
|
656
|
+
memkin doctor
|
|
657
|
+
```
|
|
658
|
+
|
|
659
|
+
### `memkin config init`
|
|
660
|
+
|
|
661
|
+
Equivalent to `memkin init` — launches the interactive configuration center to generate / edit `memkin.yaml` (supports `--auto` / `--no-tui` / `--force`).
|
|
662
|
+
|
|
663
|
+
```bash
|
|
664
|
+
memkin config init
|
|
665
|
+
```
|
|
666
|
+
|
|
667
|
+
### `memkin sources list`
|
|
668
|
+
|
|
669
|
+
List available data sources.
|
|
670
|
+
|
|
671
|
+
```bash
|
|
672
|
+
memkin sources list
|
|
673
|
+
```
|
|
674
|
+
|
|
675
|
+
### `memkin sources test <name>`
|
|
676
|
+
|
|
677
|
+
Test data source connectivity.
|
|
678
|
+
|
|
679
|
+
```bash
|
|
680
|
+
memkin sources test claude-code
|
|
681
|
+
```
|
|
682
|
+
|
|
683
|
+
### `memkin consolidate`
|
|
684
|
+
|
|
685
|
+
Run memory lifecycle tier rotation (the "dream cycle").
|
|
686
|
+
|
|
687
|
+
```bash
|
|
688
|
+
memkin consolidate # hot→warm and/or warm→cold rotation
|
|
689
|
+
```
|
|
690
|
+
|
|
691
|
+
### `memkin export` / `memkin import`
|
|
692
|
+
|
|
693
|
+
Bidirectional Obsidian sync.
|
|
694
|
+
|
|
695
|
+
```bash
|
|
696
|
+
memkin export # memory pages → Obsidian vault (Markdown)
|
|
697
|
+
memkin import # Obsidian vault → Memkin
|
|
698
|
+
```
|
|
699
|
+
|
|
700
|
+
### `memkin docs`
|
|
701
|
+
|
|
702
|
+
Feishu doc summary cards (DocSource v2) — build lightweight pointer cards first, then upgrade triggered docs to full summary cards.
|
|
703
|
+
|
|
704
|
+
```bash
|
|
705
|
+
memkin docs sync # scan docs, build pointer cards, upgrade triggered docs
|
|
706
|
+
memkin docs status # show card counts by type
|
|
707
|
+
memkin docs retry <doc_token> # retry a failed full-card extraction
|
|
708
|
+
memkin docs retry --all-failed # retry every failed doc
|
|
709
|
+
```
|
|
710
|
+
|
|
711
|
+
Agents can also ingest a single doc directly via the MCP tool `ingest_feishu_doc` (pass a doc URL or token).
|
|
712
|
+
|
|
713
|
+
## Configuration
|
|
714
|
+
|
|
715
|
+
### `memkin.yaml`
|
|
716
|
+
|
|
717
|
+
```yaml
|
|
718
|
+
# Privacy
|
|
719
|
+
privacy:
|
|
720
|
+
enabled: true
|
|
721
|
+
mode: reversible # reversible | irreversible
|
|
722
|
+
redact_phone: true
|
|
723
|
+
redact_id_card: true
|
|
724
|
+
redact_bank_card: true
|
|
725
|
+
replacement: "[REDACTED]"
|
|
726
|
+
|
|
727
|
+
# LLM (for signal extraction)
|
|
728
|
+
llm:
|
|
729
|
+
provider: openai
|
|
730
|
+
model: gpt-4o-mini
|
|
731
|
+
api_key: ${OPENAI_API_KEY}
|
|
732
|
+
|
|
733
|
+
# Block Builder
|
|
734
|
+
block_builder:
|
|
735
|
+
block_gap_minutes: 30
|
|
736
|
+
max_block_tokens: 4000
|
|
737
|
+
max_block_messages: 100
|
|
738
|
+
|
|
739
|
+
# Data Sources
|
|
740
|
+
sources:
|
|
741
|
+
# Feishu (Lark) — your primary work source
|
|
742
|
+
feishu:
|
|
743
|
+
enabled: true
|
|
744
|
+
auth_mode: user # user mode enables DM + message search
|
|
745
|
+
app_id: ${FEISHU_APP_ID}
|
|
746
|
+
app_secret: ${FEISHU_APP_SECRET}
|
|
747
|
+
sources:
|
|
748
|
+
messages: # group chats via OpenAPI
|
|
749
|
+
enabled: true
|
|
750
|
+
chat_ids: []
|
|
751
|
+
lookback_days: 3
|
|
752
|
+
message_search: # DMs + recent chats via lark-cli
|
|
753
|
+
enabled: true
|
|
754
|
+
chat_types: [p2p] # add `group` to include groups
|
|
755
|
+
lookback_days: 3
|
|
756
|
+
calendar: { enabled: true }
|
|
757
|
+
docs: { enabled: true }
|
|
758
|
+
tasks: { enabled: true }
|
|
759
|
+
# AI agent sessions
|
|
760
|
+
claude-code:
|
|
761
|
+
enabled: true
|
|
762
|
+
codex:
|
|
763
|
+
enabled: true
|
|
764
|
+
hermes:
|
|
765
|
+
enabled: true
|
|
766
|
+
|
|
767
|
+
# Store (PGLite)
|
|
768
|
+
store:
|
|
769
|
+
data_dir: ~/.memkin/data
|
|
770
|
+
|
|
771
|
+
# Embeddings
|
|
772
|
+
embedding:
|
|
773
|
+
provider: openai # openai | ollama
|
|
774
|
+
model: text-embedding-3-large
|
|
775
|
+
dimensions: 1536
|
|
776
|
+
api_key: ${OPENAI_API_KEY}
|
|
777
|
+
|
|
778
|
+
# Server
|
|
779
|
+
server:
|
|
780
|
+
http_port: 3927
|
|
781
|
+
```
|
|
782
|
+
|
|
783
|
+
> **Feishu DM vs. group capture:** `messages` uses the OpenAPI chat/message endpoints (best for known group `chat_id`s), while `message_search` uses `lark-cli im messages-search` in user mode (required for recent DMs and 1:1 bot chats). Enable both for full coverage, and complete the `lark-cli` user login first.
|
|
784
|
+
|
|
785
|
+
## Supported Sources
|
|
786
|
+
|
|
787
|
+
### Feishu (Lark)
|
|
788
|
+
|
|
789
|
+
Your primary work source — group messages, DMs, email, calendar events, docs, and tasks.
|
|
790
|
+
|
|
791
|
+
- **Auth**: `lark-cli` user-mode login (for DMs / message search) + app credentials
|
|
792
|
+
- **Data**: 7 sources — group chats, DMs, email, calendar, docs, tasks, message search
|
|
793
|
+
- **Why first**: Feishu carries the work itself — requirements, technical proposals, team decisions
|
|
794
|
+
|
|
795
|
+
### Claude Code
|
|
796
|
+
|
|
797
|
+
Extracts conversation transcripts from Claude Code agent sessions.
|
|
798
|
+
|
|
799
|
+
- **Location**: `~/.claude/projects/`
|
|
800
|
+
- **Data**: Agent conversations, decisions, discoveries, session logs
|
|
801
|
+
|
|
802
|
+
### Codex
|
|
803
|
+
|
|
804
|
+
Extracts session data from OpenAI Codex CLI.
|
|
805
|
+
|
|
806
|
+
- **Location**: `~/.codex/`
|
|
807
|
+
- **Data**: User/assistant messages with system-injection filtering
|
|
808
|
+
|
|
809
|
+
### Hermes
|
|
810
|
+
|
|
811
|
+
Extracts session data from OpenClaw Hermes agents.
|
|
812
|
+
|
|
813
|
+
- **Location**: `~/.openclaw/agents/`
|
|
814
|
+
- **Data**: Multi-agent sessions with automatic sub-agent discovery
|
|
815
|
+
|
|
816
|
+
## Roadmap
|
|
817
|
+
|
|
818
|
+
### Phase 1 — Signal Extraction (Complete)
|
|
819
|
+
|
|
820
|
+
- [x] Multi-platform collectors (Claude Code, Codex, Hermes, Feishu)
|
|
821
|
+
- [x] LLM-powered noise filtering and signal extraction
|
|
822
|
+
- [x] 7 signal types: entities, timeline, decisions, tasks, discoveries, knowledge, links
|
|
823
|
+
- [x] Dual-track privacy redaction (reversible + irreversible)
|
|
824
|
+
- [x] JSON and Markdown output formatters
|
|
825
|
+
- [x] File, GBrain, and Stdout adapters
|
|
826
|
+
- [x] CLI with extract, doctor, config, sources commands
|
|
827
|
+
|
|
828
|
+
### Phase 2 — Storage & Server (Complete)
|
|
829
|
+
|
|
830
|
+
- [x] PGLite embedded PostgreSQL with pgvector
|
|
831
|
+
- [x] PageStore, ChunkStore, TagStore, TimelineStore, GraphStore
|
|
832
|
+
- [x] Full-text search with `tsvector` (simple tokenizer for multilingual)
|
|
833
|
+
- [x] Vector search with `pgvector` cosine similarity
|
|
834
|
+
- [x] Hybrid RRF search fusing FTS + vector results
|
|
835
|
+
- [x] EmbeddingService (OpenAI / Ollama)
|
|
836
|
+
- [x] StoreAdapter — pipeline writes directly to PGLite
|
|
837
|
+
- [x] Hono REST API
|
|
838
|
+
- [x] MCP Server with 29 stdio tools
|
|
839
|
+
- [x] CLI serve, search, embed commands
|
|
840
|
+
|
|
841
|
+
### Phase 3 — Web UI (Complete)
|
|
842
|
+
|
|
843
|
+
- [x] Dashboard
|
|
844
|
+
- [x] Timeline view
|
|
845
|
+
- [x] Knowledge graph visualization (force-directed)
|
|
846
|
+
- [x] Search interface
|
|
847
|
+
- [x] Entity / page detail views
|
|
848
|
+
|
|
849
|
+
### Phase 4 — Consolidation & Daemon (Complete)
|
|
850
|
+
|
|
851
|
+
- [x] Memory consolidation ("dream cycle"): tier rotation, dead-link repair, preference inference
|
|
852
|
+
- [x] Resident daemon with scheduled extraction (scheduler, run history, alerts)
|
|
853
|
+
- [x] Person identity management (aliases, merge, rename)
|
|
854
|
+
- [x] Feishu doc summary cards (DocSource v2)
|
|
855
|
+
- [x] Obsidian bidirectional sync (export / import)
|
|
856
|
+
|
|
857
|
+
### Phase 5 — Self-Hosted Always-On (In Progress · MVP)
|
|
858
|
+
|
|
859
|
+
- [ ] Standalone daemon service + autostart (systemd / launchd / Windows service) — "configure once, runs maintenance-free"
|
|
860
|
+
- [ ] Agent Hook: auto read/write memory on session end / key decisions
|
|
861
|
+
|
|
862
|
+
### Phase 6 — More Chinese Workplace Sources (Planned)
|
|
863
|
+
|
|
864
|
+
- [ ] DingTalk
|
|
865
|
+
- [ ] WeCom (WeChat Work)
|
|
866
|
+
- [ ] WeChat chat history
|
|
867
|
+
- [ ] Local document source (scan local files, community-driven · low priority)
|
|
868
|
+
|
|
869
|
+
### Phase 7 — Context-Aware Extraction & Q&A (In Progress)
|
|
870
|
+
|
|
871
|
+
- [x] Synthesis layer (basic): `synthesize` / `recall` — cited composed answers with inline `[n]` + gap analysis, intent-template framework, per-scope caching
|
|
872
|
+
- [x] **Person communication profile (Hero)**: `prep_for_person(person, goal?)` — passively infers a communication profile from real interactions (zero-LLM behavior layer + behavior-quadrant trait layer + relation layer + four-color shell) and gives goal-conditioned, `[n]`-cited communication strategy. No questionnaire, local-first, ethics-guardrailed (suggestions, not manipulation); disabled by default, per-person opt-in
|
|
873
|
+
- [x] **Cross-channel daily report**: `daily_report(date?)` — aggregates today's signals across DMs/group/email/Feishu Minutes/calendar into 7 sections; meeting notes yield `decisions` and owner-tagged `action_items` (yours land in "my tasks")
|
|
874
|
+
- [x] **Troubleshooting Playbooks**: `troubleshoot(query)` — ordered steps along the playbook `precedes` chain with per-result meaning; hierarchical tree (`part_of`) organizes problem domains; playbooks authored by hand or auto-extracted (draft) from conversations
|
|
875
|
+
- [x] **Retrieval quality**: best-chunk-per-page pooling (surface on strongest evidence), zero-LLM self-wiring (`[[slug]]`/`[[rel:slug]]` graph edges on write), rule-based query rewrite
|
|
876
|
+
- [ ] ContextBuffer — share context across conversation blocks
|
|
877
|
+
- [ ] Weighted admission scoring (replaces binary noise filter)
|
|
878
|
+
- [ ] Narrative assembler — aggregate signals into per-entity narratives
|
|
879
|
+
- [ ] Natural language Q&A over stored memories
|
|
880
|
+
|
|
881
|
+
### Phase 8 — Web UI Enhancements (Planned)
|
|
882
|
+
|
|
883
|
+
- [ ] Memory editing (read-only today)
|
|
884
|
+
- [ ] Audit view (signal provenance visualization)
|
|
885
|
+
|
|
886
|
+
## Tech Stack
|
|
887
|
+
|
|
888
|
+
| Layer | Technology |
|
|
889
|
+
|-------|-----------|
|
|
890
|
+
| Language | TypeScript |
|
|
891
|
+
| Runtime | Bun |
|
|
892
|
+
| Database | PGLite (embedded PostgreSQL) |
|
|
893
|
+
| Vector Search | pgvector |
|
|
894
|
+
| Embeddings | OpenAI / Ollama |
|
|
895
|
+
| Web Framework | Hono |
|
|
896
|
+
| Web UI | React + Vite |
|
|
897
|
+
| MCP | @modelcontextprotocol/sdk |
|
|
898
|
+
| Linter | Biome |
|
|
899
|
+
| Tests | Vitest (1000+ tests) |
|
|
900
|
+
|
|
901
|
+
## Development
|
|
902
|
+
|
|
903
|
+
```bash
|
|
904
|
+
# Run tests
|
|
905
|
+
bun run test
|
|
906
|
+
|
|
907
|
+
# Watch mode
|
|
908
|
+
bun run test:watch
|
|
909
|
+
|
|
910
|
+
# Type-check
|
|
911
|
+
bun run typecheck
|
|
912
|
+
|
|
913
|
+
# Lint
|
|
914
|
+
bun run lint
|
|
915
|
+
|
|
916
|
+
# Auto-fix lint issues
|
|
917
|
+
bun run lint:fix
|
|
918
|
+
```
|
|
919
|
+
|
|
920
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development workflow and guidelines.
|
|
921
|
+
|
|
922
|
+
## Contributing
|
|
923
|
+
|
|
924
|
+
Contributions welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) before submitting a PR.
|
|
925
|
+
|
|
926
|
+
## Community & Support
|
|
927
|
+
|
|
928
|
+
- 🐛 Found a bug or have a feature request? [Open an issue](https://github.com/AndreLYL/memkin/issues).
|
|
929
|
+
- 💡 Questions and ideas are welcome in the issue tracker.
|
|
930
|
+
- ⭐ If Memkin helps you, give it a Star — it's the best way to support the project.
|
|
931
|
+
|
|
932
|
+
## License
|
|
933
|
+
|
|
934
|
+
Licensed under the [Apache License, Version 2.0](LICENSE).
|