@andre.li/memoark 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +388 -69
- package/README.md +674 -309
- package/README.zh-CN.md +816 -0
- package/bin/memoark.mjs +7 -2
- package/dist/adapters/store.d.ts.map +1 -1
- package/dist/adapters/store.js +6 -5
- package/dist/adapters/store.js.map +1 -1
- 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.js +682 -126
- package/dist/cli.js.map +1 -1
- 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 +4 -0
- package/dist/collectors/feishu/collector.d.ts.map +1 -1
- package/dist/collectors/feishu/collector.js +27 -4
- package/dist/collectors/feishu/collector.js.map +1 -1
- 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/lark-cli-client.d.ts +12 -0
- package/dist/collectors/feishu/lark-cli-client.d.ts.map +1 -1
- package/dist/collectors/feishu/lark-cli-client.js +37 -2
- package/dist/collectors/feishu/lark-cli-client.js.map +1 -1
- 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/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/dm.d.ts.map +1 -1
- package/dist/collectors/feishu/sources/dm.js +4 -0
- package/dist/collectors/feishu/sources/dm.js.map +1 -1
- package/dist/collectors/feishu/sources/mail.d.ts.map +1 -1
- package/dist/collectors/feishu/sources/mail.js +18 -20
- package/dist/collectors/feishu/sources/mail.js.map +1 -1
- package/dist/collectors/feishu/sources/messages.d.ts +2 -0
- package/dist/collectors/feishu/sources/messages.d.ts.map +1 -1
- package/dist/collectors/feishu/sources/messages.js +28 -1
- package/dist/collectors/feishu/sources/messages.js.map +1 -1
- package/dist/collectors/feishu/types.d.ts +37 -3
- package/dist/collectors/feishu/types.d.ts.map +1 -1
- package/dist/collectors/feishu/types.js.map +1 -1
- package/dist/config-center/connection-checks.d.ts.map +1 -1
- package/dist/config-center/connection-checks.js +1 -1
- package/dist/config-center/connection-checks.js.map +1 -1
- package/dist/config-center/schema.d.ts.map +1 -1
- package/dist/config-center/schema.js +77 -0
- package/dist/config-center/schema.js.map +1 -1
- package/dist/consolidator/consolidator.d.ts +13 -1
- package/dist/consolidator/consolidator.d.ts.map +1 -1
- package/dist/consolidator/consolidator.js +12 -2
- package/dist/consolidator/consolidator.js.map +1 -1
- package/dist/core/canonicalize.js +5 -1
- package/dist/core/canonicalize.js.map +1 -1
- package/dist/core/config.d.ts +52 -9
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +86 -24
- package/dist/core/config.js.map +1 -1
- 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/identity-resolver.d.ts +24 -3
- package/dist/core/identity-resolver.d.ts.map +1 -1
- package/dist/core/identity-resolver.js +147 -2
- package/dist/core/identity-resolver.js.map +1 -1
- package/dist/core/person-identity.d.ts +124 -0
- package/dist/core/person-identity.d.ts.map +1 -0
- package/dist/core/person-identity.js +342 -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 +1 -1
- package/dist/core/pipeline-factory.d.ts.map +1 -1
- package/dist/core/pipeline-factory.js +8 -3
- package/dist/core/pipeline-factory.js.map +1 -1
- package/dist/core/pipeline.d.ts +16 -0
- package/dist/core/pipeline.d.ts.map +1 -1
- package/dist/core/pipeline.js +49 -1
- package/dist/core/pipeline.js.map +1 -1
- 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 +2981 -309
- package/dist/core/schemas.d.ts.map +1 -1
- package/dist/core/schemas.js +27 -0
- package/dist/core/schemas.js.map +1 -1
- package/dist/core/signal-scoring.d.ts.map +1 -1
- package/dist/core/signal-scoring.js +5 -1
- package/dist/core/signal-scoring.js.map +1 -1
- 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 +1 -1
- package/dist/core/state.d.ts.map +1 -1
- package/dist/core/state.js +3 -2
- package/dist/core/state.js.map +1 -1
- package/dist/core/types.d.ts +34 -6
- package/dist/core/types.d.ts.map +1 -1
- package/dist/daemon/reload-manager.d.ts +27 -0
- package/dist/daemon/reload-manager.d.ts.map +1 -0
- package/dist/daemon/reload-manager.js +67 -0
- package/dist/daemon/reload-manager.js.map +1 -0
- package/dist/daemon/scheduler.d.ts +9 -1
- package/dist/daemon/scheduler.d.ts.map +1 -1
- package/dist/daemon/scheduler.js +113 -38
- package/dist/daemon/scheduler.js.map +1 -1
- 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/embedded-assets.generated.d.ts.map +1 -1
- package/dist/embedded-assets.generated.js +3 -3
- package/dist/embedded-assets.generated.js.map +1 -1
- 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/prompts/examples/agent-session.md +257 -0
- package/dist/extractors/prompts/signal-extract.md +199 -0
- package/dist/extractors/prompts/system.md +45 -0
- package/dist/extractors/signal-extractor.d.ts +2 -1
- package/dist/extractors/signal-extractor.d.ts.map +1 -1
- package/dist/extractors/signal-extractor.js +99 -7
- package/dist/extractors/signal-extractor.js.map +1 -1
- 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 +30 -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 +31 -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 +32 -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 +35 -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 +35 -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 +32 -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 +26 -0
- package/dist/install/index.d.ts.map +1 -0
- package/dist/install/index.js +117 -0
- package/dist/install/index.js.map +1 -0
- package/dist/install/json-config.d.ts +11 -0
- package/dist/install/json-config.d.ts.map +1 -0
- package/dist/install/json-config.js +39 -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/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 +51 -0
- package/dist/install/toml-config.js.map +1 -0
- package/dist/install/types.d.ts +37 -0
- package/dist/install/types.d.ts.map +1 -0
- package/dist/install/types.js +4 -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 +18 -0
- package/dist/install/yaml-config.js.map +1 -0
- package/dist/processors/privacy.d.ts +4 -1
- package/dist/processors/privacy.d.ts.map +1 -1
- package/dist/processors/privacy.js +5 -3
- package/dist/processors/privacy.js.map +1 -1
- 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 +8 -2
- package/dist/server/api.d.ts.map +1 -1
- package/dist/server/api.js +69 -34
- package/dist/server/api.js.map +1 -1
- package/dist/server/backfill-routes.d.ts.map +1 -1
- package/dist/server/backfill-routes.js +14 -1
- package/dist/server/backfill-routes.js.map +1 -1
- 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 +2 -0
- package/dist/server/config-routes.d.ts.map +1 -1
- package/dist/server/config-routes.js +2 -1
- package/dist/server/config-routes.js.map +1 -1
- package/dist/server/mcp-http.d.ts +26 -0
- package/dist/server/mcp-http.d.ts.map +1 -0
- package/dist/server/mcp-http.js +102 -0
- package/dist/server/mcp-http.js.map +1 -0
- package/dist/server/mcp.d.ts +191 -25
- package/dist/server/mcp.d.ts.map +1 -1
- package/dist/server/mcp.js +1111 -68
- package/dist/server/mcp.js.map +1 -1
- 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/setup-server.d.ts.map +1 -1
- package/dist/server/setup-server.js +8 -11
- package/dist/server/setup-server.js.map +1 -1
- package/dist/setup/connection-tests.d.ts +1 -1
- package/dist/setup/connection-tests.d.ts.map +1 -1
- package/dist/setup/connection-tests.js +4 -2
- package/dist/setup/connection-tests.js.map +1 -1
- package/dist/setup/generate-config.d.ts.map +1 -1
- package/dist/setup/generate-config.js +31 -1
- package/dist/setup/generate-config.js.map +1 -1
- package/dist/setup/init-wizard.d.ts +1 -0
- package/dist/setup/init-wizard.d.ts.map +1 -1
- package/dist/setup/init-wizard.js +38 -21
- package/dist/setup/init-wizard.js.map +1 -1
- package/dist/setup/validate-config.d.ts +5 -1
- package/dist/setup/validate-config.d.ts.map +1 -1
- package/dist/setup/validate-config.js +18 -0
- package/dist/setup/validate-config.js.map +1 -1
- 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 +2 -0
- package/dist/store/database.d.ts.map +1 -1
- package/dist/store/database.js +23 -10
- package/dist/store/database.js.map +1 -1
- package/dist/store/graph.d.ts +22 -0
- package/dist/store/graph.d.ts.map +1 -1
- package/dist/store/graph.js +97 -7
- package/dist/store/graph.js.map +1 -1
- package/dist/store/migrations/index.d.ts.map +1 -1
- package/dist/store/migrations/index.js +52 -0
- package/dist/store/migrations/index.js.map +1 -1
- package/dist/store/pages.d.ts +7 -0
- package/dist/store/pages.d.ts.map +1 -1
- package/dist/store/pages.js +56 -1
- package/dist/store/pages.js.map +1 -1
- package/dist/store/person-behavior.d.ts +28 -0
- package/dist/store/person-behavior.d.ts.map +1 -0
- package/dist/store/person-behavior.js +127 -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/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/schema.sql +107 -0
- package/dist/store/search.d.ts +36 -8
- package/dist/store/search.d.ts.map +1 -1
- package/dist/store/search.js +188 -76
- package/dist/store/search.js.map +1 -1
- package/dist/store/tags.d.ts.map +1 -1
- package/dist/store/tags.js +6 -2
- package/dist/store/tags.js.map +1 -1
- package/dist/store/timeline.d.ts +13 -1
- package/dist/store/timeline.d.ts.map +1 -1
- package/dist/store/timeline.js +134 -4
- package/dist/store/timeline.js.map +1 -1
- 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.map +1 -1
- package/dist/sync/obsidian.js +5 -1
- package/dist/sync/obsidian.js.map +1 -1
- 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 +18 -6
package/README.md
CHANGED
|
@@ -1,284 +1,410 @@
|
|
|
1
1
|
<p align="center">
|
|
2
2
|
<h1 align="center">Memoark</h1>
|
|
3
|
-
<p align="center"><
|
|
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>
|
|
4
5
|
</p>
|
|
5
6
|
|
|
6
7
|
<p align="center">
|
|
7
|
-
|
|
8
|
+
<a href="README.md">简体中文</a> | English
|
|
8
9
|
</p>
|
|
9
10
|
|
|
10
11
|
<p align="center">
|
|
11
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/@andre.li/memoark"><img alt="npm" src="https://img.shields.io/npm/v/@andre.li/memoark?color=cb3837&logo=npm"></a>
|
|
12
14
|
<img alt="Runtime: Bun" src="https://img.shields.io/badge/runtime-Bun-black">
|
|
13
15
|
<img alt="Language: TypeScript" src="https://img.shields.io/badge/lang-TypeScript-3178c6">
|
|
14
|
-
<img alt="Tests:
|
|
16
|
+
<img alt="Tests: 1000+" src="https://img.shields.io/badge/tests-1000%2B-success">
|
|
15
17
|
</p>
|
|
16
18
|
|
|
17
19
|
<p align="center">
|
|
18
|
-
<
|
|
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/memoark/main/docs/assets/web-ui-graph.jpeg" alt="Memoark knowledge graph — entities, decisions, tasks, and knowledge connected across your work" width="850">
|
|
19
30
|
<br>
|
|
20
|
-
<em
|
|
31
|
+
<em>Your work, as a living knowledge graph — people, decisions, tasks, and knowledge, connected.</em>
|
|
21
32
|
</p>
|
|
22
33
|
|
|
34
|
+
<!-- TODO(demo): replace with an 8-12s demo GIF — ask Memoark 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
|
+
|
|
23
39
|
---
|
|
24
40
|
|
|
25
|
-
##
|
|
41
|
+
## The Problem
|
|
26
42
|
|
|
27
|
-
|
|
43
|
+
Your work memory has two homes, and your AI agents can't reach either.
|
|
28
44
|
|
|
29
|
-
-
|
|
30
|
-
- **AI
|
|
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.
|
|
31
47
|
|
|
32
|
-
|
|
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.
|
|
33
49
|
|
|
34
|
-
|
|
50
|
+
**You don't have a memory problem. You have a fragmentation problem — and your agents pay for it every day.**
|
|
35
51
|
|
|
36
|
-
##
|
|
52
|
+
## The Solution
|
|
37
53
|
|
|
38
|
-
Memoark
|
|
54
|
+
Memoark is a **local-first personal memory system built for the Chinese workplace**. Work in China happens inside Feishu, DingTalk, and WeCom — Memoark 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**.
|
|
39
55
|
|
|
40
|
-
|
|
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*.
|
|
41
59
|
|
|
42
60
|
```
|
|
43
|
-
|
|
44
|
-
(
|
|
45
|
-
|
|
61
|
+
Feishu work AI-agent sessions
|
|
62
|
+
(DMs / groups / email (Claude Code / Codex
|
|
63
|
+
meetings / tasks) / OpenClaw)
|
|
46
64
|
│ │
|
|
47
65
|
└───────────────┬───────────────┘
|
|
48
|
-
▼
|
|
66
|
+
▼ collect + extract (local)
|
|
49
67
|
┌──────────────────┐
|
|
50
|
-
│
|
|
51
|
-
│
|
|
68
|
+
│ Your core memory │ entities · decisions · tasks
|
|
69
|
+
│ (PGLite, local) │ knowledge · timeline · graph
|
|
52
70
|
└────────┬─────────┘
|
|
53
71
|
▼ MCP
|
|
54
|
-
|
|
72
|
+
Your agents know you
|
|
55
73
|
│
|
|
56
|
-
└────
|
|
74
|
+
└──── the more agents work, the better it knows you ───┘
|
|
57
75
|
```
|
|
58
76
|
|
|
59
|
-
> "
|
|
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."
|
|
60
78
|
>
|
|
61
|
-
> Memoark
|
|
79
|
+
> Memoark connects these three events automatically — across platforms, across time — and hands the whole thread to your agent on demand.
|
|
62
80
|
|
|
63
|
-
##
|
|
81
|
+
## Three Pillars
|
|
64
82
|
|
|
65
|
-
|
|
66
|
-
|
|
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.
|
|
67
85
|
|
|
68
|
-
|
|
69
|
-
|
|
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.
|
|
70
88
|
|
|
71
|
-
|
|
72
|
-
|
|
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.
|
|
73
91
|
|
|
74
|
-
|
|
75
|
-
LLM 驱动的 Pipeline 从原始对话中提取 7 类结构化信号:实体、时间线、决策、任务、发现、知识、关系。
|
|
92
|
+
## Features
|
|
76
93
|
|
|
77
|
-
|
|
78
|
-
|
|
94
|
+
**🛰️ Full Feishu (Lark) Capture**
|
|
95
|
+
Your work lives in Feishu. Memoark 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).
|
|
79
96
|
|
|
80
|
-
|
|
81
|
-
|
|
97
|
+
**🤖 Agents That Know You (MCP)**
|
|
98
|
+
Use Memoark 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.
|
|
82
99
|
|
|
83
|
-
|
|
84
|
-
|
|
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.
|
|
85
102
|
|
|
86
|
-
|
|
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.
|
|
87
105
|
|
|
88
|
-
|
|
89
|
-
|
|
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.
|
|
90
108
|
|
|
91
|
-
|
|
92
|
-
|
|
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.
|
|
93
111
|
|
|
94
|
-
|
|
95
|
-
|
|
112
|
+
**🔗 Obsidian Bidirectional Sync**
|
|
113
|
+
Export your memory pages to an Obsidian vault (Markdown), edit them, and import them back.
|
|
96
114
|
|
|
97
|
-
|
|
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.
|
|
98
117
|
|
|
99
|
-
|
|
118
|
+
**🔌 REST API**
|
|
119
|
+
Full Hono-powered HTTP API for all store operations. Integrate with any client.
|
|
120
|
+
|
|
121
|
+
## Works With
|
|
122
|
+
|
|
123
|
+
Memoark 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
|
+
- ✅ `memoark doctor` environment diagnostics
|
|
208
|
+
|
|
209
|
+
## Use Cases
|
|
210
|
+
|
|
211
|
+
> Memoark 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 memoark 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 Memoark
|
|
229
|
+
|
|
230
|
+
| | Memoark | Pure RAG / vector search | Note apps (Obsidian / Notion) | GBrain | OpenHuman |
|
|
100
231
|
|---|:---:|:---:|:---:|:---:|:---:|
|
|
101
|
-
|
|
|
102
|
-
|
|
|
103
|
-
|
|
|
104
|
-
|
|
|
105
|
-
| Agent
|
|
106
|
-
|
|
|
107
|
-
|
|
|
108
|
-
|
|
|
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. Memoark 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 @andre.li/memoark start
|
|
256
|
+
|
|
257
|
+
# Running with no subcommand is equivalent to `start`
|
|
258
|
+
npx @andre.li/memoark
|
|
259
|
+
```
|
|
109
260
|
|
|
110
|
-
|
|
261
|
+
`memoark start` is the single-step path: if there's no `memoark.yaml`, it opens the browser setup wizard first, then starts the HTTP server and auto-opens your browser.
|
|
111
262
|
|
|
112
|
-
|
|
263
|
+
> The npm package is `@andre.li/memoark` (scoped), but the command is still `memoark`.
|
|
113
264
|
|
|
114
|
-
###
|
|
265
|
+
### Ports at a glance
|
|
115
266
|
|
|
116
|
-
|
|
117
|
-
|
|
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` |
|
|
118
271
|
|
|
119
|
-
###
|
|
272
|
+
### Install (recommended: npm)
|
|
120
273
|
|
|
121
274
|
```bash
|
|
122
|
-
#
|
|
275
|
+
# Run without installing
|
|
123
276
|
npx @andre.li/memoark --help
|
|
124
277
|
|
|
125
|
-
#
|
|
278
|
+
# Or install globally to get the `memoark` command
|
|
126
279
|
npm install -g @andre.li/memoark
|
|
127
280
|
```
|
|
128
281
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
### 从源码安装(开发)
|
|
282
|
+
### Install from source (development)
|
|
132
283
|
|
|
133
284
|
```bash
|
|
134
285
|
git clone https://github.com/AndreLYL/memoark.git
|
|
135
286
|
cd memoark
|
|
136
287
|
bun install
|
|
137
|
-
npm link #
|
|
288
|
+
npm link # registers the `memoark` command globally
|
|
138
289
|
```
|
|
139
290
|
|
|
140
|
-
###
|
|
291
|
+
### Initialize Configuration
|
|
141
292
|
|
|
142
|
-
`memoark init`
|
|
293
|
+
`memoark init` launches an **interactive configuration center** — a full-screen TUI (built with React + ink) that lets you generate and edit `memoark.yaml` without hand-writing YAML:
|
|
143
294
|
|
|
144
295
|
```bash
|
|
145
296
|
memoark init
|
|
146
297
|
```
|
|
147
298
|
|
|
148
|
-
|
|
149
|
-
- 📋
|
|
150
|
-
- ⌨️
|
|
151
|
-
- 🔌
|
|
152
|
-
- 💡
|
|
153
|
-
- 🔒
|
|
154
|
-
- 🧭
|
|
299
|
+
**Config center features:**
|
|
300
|
+
- 📋 **Sectioned editing**: Overview, LLM, Embedding, Sources, Privacy, Block Builder, and more
|
|
301
|
+
- ⌨️ **Keyboard-driven**: ↑/↓ or Tab to move between fields, Enter to edit, Ctrl+S to save, q / Esc to quit (auto-saves if dirty)
|
|
302
|
+
- 🔌 **Live connection checks**: validates your LLM / embedding API key and connectivity as you edit
|
|
303
|
+
- 💡 **Smart recommendations**: suggests local (Ollama) vs remote (OpenAI) embedding based on your hardware
|
|
304
|
+
- 🔒 **Secret masking**: API keys are always shown masked
|
|
305
|
+
- 🧭 **Auto-detection**: finds existing data sources (Claude Code, Codex, Hermes) and registers the `memoark` command
|
|
155
306
|
|
|
156
|
-
|
|
307
|
+
**Run modes:**
|
|
157
308
|
|
|
158
|
-
|
|
|
309
|
+
| Command / environment | Behavior |
|
|
159
310
|
|---|---|
|
|
160
|
-
| `memoark init
|
|
161
|
-
| `memoark init --no-tui` |
|
|
162
|
-
| `memoark init --auto` |
|
|
163
|
-
| `memoark init --force` |
|
|
164
|
-
| `MEMOARK_NO_TUI=1` |
|
|
311
|
+
| `memoark init` (in a TTY) | Full-screen TUI config center |
|
|
312
|
+
| `memoark init --no-tui` | Linear question-and-answer wizard (fallback) |
|
|
313
|
+
| `memoark init --auto` | Fully automatic, no prompts, uses detected defaults |
|
|
314
|
+
| `memoark init --force` | Overwrite an existing configuration |
|
|
315
|
+
| `MEMOARK_NO_TUI=1` | Force-disable the TUI (also auto-falls back in non-TTY environments) |
|
|
165
316
|
|
|
166
|
-
> `memoark config init`
|
|
317
|
+
> `memoark config init` is equivalent to `memoark init`. A few advanced settings (e.g. Feishu) currently need to be edited directly in `memoark.yaml` (see [Configuration](#configuration)).
|
|
167
318
|
|
|
168
|
-
###
|
|
319
|
+
### Check Environment
|
|
169
320
|
|
|
170
321
|
```bash
|
|
171
322
|
memoark doctor
|
|
172
323
|
```
|
|
173
324
|
|
|
174
|
-
###
|
|
325
|
+
### Run Your First Extraction
|
|
175
326
|
|
|
176
327
|
```bash
|
|
177
|
-
#
|
|
178
|
-
memoark extract --source
|
|
328
|
+
# Extract from Feishu (your work source)
|
|
329
|
+
memoark extract --source feishu --since 3d
|
|
179
330
|
|
|
180
|
-
#
|
|
181
|
-
memoark extract --source
|
|
331
|
+
# Extract from Claude Code
|
|
332
|
+
memoark extract --source claude-code
|
|
182
333
|
|
|
183
|
-
#
|
|
334
|
+
# Extract from all enabled sources
|
|
184
335
|
memoark extract --source all
|
|
185
336
|
|
|
186
|
-
#
|
|
337
|
+
# Dry run (no LLM calls, just scan data volume)
|
|
187
338
|
memoark extract --source claude-code --dry-run
|
|
188
339
|
```
|
|
189
340
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
飞书消息有两条不同路径:
|
|
341
|
+
> Feishu requires a one-time `lark-cli` user login and a `feishu` block in `memoark.yaml`. See [Configuration](#configuration) for the full Feishu setup, including DM vs. group capture paths.
|
|
193
342
|
|
|
194
|
-
|
|
195
|
-
- `sources.feishu.sources.message_search` 使用 `lark-cli im +messages-search`,适合 user-mode 下搜索最近私聊和群聊。私聊机器人对话通常需要这条路径,否则最近三天会明显少数据。
|
|
343
|
+
### Search Your Memory
|
|
196
344
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
llm:
|
|
201
|
-
provider: openai
|
|
202
|
-
model: gpt-4.1-mini
|
|
203
|
-
api_key: ${TOKENFREE_API_KEY}
|
|
345
|
+
```bash
|
|
346
|
+
# Hybrid search (FTS + vector)
|
|
347
|
+
memoark search "auth middleware decision"
|
|
204
348
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
enabled: true
|
|
208
|
-
auth_mode: user
|
|
209
|
-
app_id: ${FEISHU_APP_ID}
|
|
210
|
-
app_secret: ${FEISHU_APP_SECRET}
|
|
211
|
-
sources:
|
|
212
|
-
messages:
|
|
213
|
-
enabled: true
|
|
214
|
-
chat_ids: []
|
|
215
|
-
lookback_days: 3
|
|
216
|
-
message_search:
|
|
217
|
-
enabled: true
|
|
218
|
-
chat_types:
|
|
219
|
-
- p2p
|
|
220
|
-
# - group
|
|
221
|
-
lookback_days: 3
|
|
222
|
-
page_size: 50
|
|
349
|
+
# FTS-only search
|
|
350
|
+
memoark search "JWT token" --mode fts
|
|
223
351
|
```
|
|
224
352
|
|
|
225
|
-
|
|
353
|
+
### Start the Server
|
|
226
354
|
|
|
227
355
|
```bash
|
|
228
|
-
|
|
229
|
-
|
|
356
|
+
# HTTP API + Web UI (default http://localhost:3927) — auto-opens your browser
|
|
357
|
+
memoark serve
|
|
230
358
|
|
|
231
|
-
|
|
359
|
+
# Skip the auto-open (e.g. on a remote/headless host)
|
|
360
|
+
memoark serve --no-open
|
|
232
361
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
```
|
|
362
|
+
# MCP stdio (local direct connect for AI agents — Claude Code, Cursor, etc.; no browser)
|
|
363
|
+
memoark serve --mcp
|
|
236
364
|
|
|
237
|
-
|
|
365
|
+
# MCP Streamable HTTP (remote / multi-client, default http://localhost:3928/mcp; no browser)
|
|
366
|
+
memoark serve --mcp-http
|
|
367
|
+
```
|
|
238
368
|
|
|
239
|
-
|
|
369
|
+
> Without a `memoark.yaml`, `serve` tells you to run `memoark start` for one-step setup + launch, or `memoark init --web` to configure first.
|
|
240
370
|
|
|
241
|
-
|
|
242
|
-
- 运行状态:当前仓库的 `.memoark/cursors.yaml` 和 `.memoark/dedup.jsonl`,分别保存源 cursor 和消息去重 hash。
|
|
371
|
+
### Connect Your Agent (MCP)
|
|
243
372
|
|
|
244
|
-
|
|
373
|
+
**One command (recommended)**: `memoark 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**:
|
|
245
374
|
|
|
246
375
|
```bash
|
|
247
|
-
#
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
#
|
|
251
|
-
bun src/cli.ts store purge-source feishu --yes
|
|
252
|
-
|
|
253
|
-
# 再跑最近三天
|
|
254
|
-
bun src/cli.ts extract --source feishu --adapter store --since 3d
|
|
376
|
+
memoark install # detect installed clients and wire them up
|
|
377
|
+
memoark install --agent claude-code # target a single client
|
|
378
|
+
memoark install --dry-run # preview file changes, write nothing
|
|
379
|
+
memoark uninstall # clean removal (idempotent)
|
|
255
380
|
```
|
|
256
381
|
|
|
257
|
-
|
|
382
|
+
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 Memoark** per the injected directive (cheap-first: `search` keyword lookup at zero cost, escalating to `query`/`recall` only if thin) instead of guessing.
|
|
258
383
|
|
|
259
|
-
|
|
384
|
+
> Claude Desktop has no rules file, so it relies on the MCP server's `instructions` field. You can also configure things manually below.
|
|
260
385
|
|
|
261
|
-
|
|
262
|
-
# 混合搜索(全文 + 向量)
|
|
263
|
-
memoark search "认证中间件决策"
|
|
386
|
+
**Automatic recall on Claude Code (optional · hooks)**: go further on Claude Code so memory arrives with zero effort:
|
|
264
387
|
|
|
265
|
-
|
|
266
|
-
memoark
|
|
388
|
+
```bash
|
|
389
|
+
memoark hooks install # SessionStart + UserPromptSubmit read hooks (on by default)
|
|
390
|
+
memoark hooks install --write-back # also enable end-of-session auto write-back (opt-in)
|
|
391
|
+
memoark hooks uninstall # remove
|
|
267
392
|
```
|
|
268
393
|
|
|
269
|
-
|
|
394
|
+
- **SessionStart**: injects an "active projects / decisions / open tasks / key people" digest at the start of each session (the always-on core).
|
|
395
|
+
- **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).
|
|
396
|
+
- **SessionEnd** (`--write-back`, off by default): asynchronous incremental extraction back into memory, so it compounds.
|
|
270
397
|
|
|
271
|
-
|
|
272
|
-
# HTTP API(默认端口 3927)
|
|
273
|
-
memoark serve
|
|
398
|
+
> 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.
|
|
274
399
|
|
|
275
|
-
|
|
276
|
-
memoark serve --mcp
|
|
277
|
-
```
|
|
400
|
+
**Let the agent install itself**: for agents that can read a URL, just say "onboard me to Memoark following [`MEMOARK_FOR_AGENTS.md`](MEMOARK_FOR_AGENTS.md)" and it runs the commands above and self-checks. For **OpenClaw / Hermes**, use `memoark install --agent hermes` (writes `mcp_servers` into `config.yaml` + drops the `memoark` skill; run `/reload-mcp` in-session to apply); or scaffold the skill alone with `memoark skill scaffold --dir ~/.hermes/skills`.
|
|
278
401
|
|
|
279
|
-
|
|
402
|
+
Memoark offers two MCP transports — pick by scenario:
|
|
280
403
|
|
|
281
|
-
|
|
404
|
+
- **stdio (`--mcp`)** — local direct connect; the agent spawns `memoark` as a subprocess. Zero network setup; best for a single client on one machine.
|
|
405
|
+
- **Streamable HTTP (`--mcp-http`)** — over HTTP (default `3928`); use it for remote access or sharing one memory across multiple clients.
|
|
406
|
+
|
|
407
|
+
Point any MCP client at Memoark so it can read and write your memory. For Claude Code (stdio, local direct connect):
|
|
282
408
|
|
|
283
409
|
```json
|
|
284
410
|
{
|
|
@@ -291,156 +417,337 @@ memoark serve --mcp
|
|
|
291
417
|
}
|
|
292
418
|
```
|
|
293
419
|
|
|
294
|
-
|
|
420
|
+
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.
|
|
295
421
|
|
|
296
|
-
###
|
|
422
|
+
### Browse the Web UI
|
|
297
423
|
|
|
298
424
|
```bash
|
|
299
425
|
cd web
|
|
300
426
|
bun install
|
|
301
|
-
bun run dev #
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
## 架构
|
|
305
|
-
|
|
306
|
-
```
|
|
307
|
-
┌─────────────────────────────────────────────────────────────────┐
|
|
308
|
-
│ 数据源 │
|
|
309
|
-
│ Claude Code │ Codex │ Hermes │ 飞书 │ 微信 │
|
|
310
|
-
└───────┬───────┴────┬────┴────┬─────┴────┬───┴────┬──────────────┘
|
|
311
|
-
└────────────┴────────┴──────────┴────────┘
|
|
312
|
-
│
|
|
313
|
-
┌─────────▼──────────┐
|
|
314
|
-
│ 信号提取 Pipeline │
|
|
315
|
-
│ │
|
|
316
|
-
│ 采集 → 去重 │
|
|
317
|
-
│ → 分块 → 噪声过滤 │
|
|
318
|
-
│ → 信号提取 → 脱敏 │
|
|
319
|
-
└─────────┬──────────┘
|
|
320
|
-
│
|
|
321
|
-
┌─────────▼──────────┐
|
|
322
|
-
│ 存储层 │
|
|
323
|
-
│ │
|
|
324
|
-
│ PGLite + pgvector │
|
|
325
|
-
│ (嵌入式 PG) │
|
|
326
|
-
└─────────┬──────────┘
|
|
327
|
-
│
|
|
328
|
-
┌───────────────┼───────────────┐
|
|
329
|
-
│ │ │
|
|
330
|
-
┌────────▼──────┐ ┌─────▼──────┐ ┌──────▼───────┐
|
|
331
|
-
│ CLI │ │ MCP │ │ REST API │
|
|
332
|
-
│ 管理 & 提取 │ │ 服务器 │ │ (Hono) │
|
|
333
|
-
└────────────────┘ └────────────┘ └──────────────┘
|
|
427
|
+
bun run dev # dashboard, timeline, knowledge graph, search
|
|
334
428
|
```
|
|
335
429
|
|
|
336
|
-
|
|
430
|
+
## Architecture
|
|
337
431
|
|
|
338
|
-
|
|
339
|
-
|---------|------|------|
|
|
340
|
-
| **实体** | 人物、项目、工具、概念 | `project/memoark`, `tool/claude-code` |
|
|
341
|
-
| **时间线** | 关键事件及时间戳 | "2026-05-19: 完成多平台采集器重构" |
|
|
342
|
-
| **决策** | 架构选型、技术决策及其理由 | "选择 PGLite 作为嵌入式 PostgreSQL 方案" |
|
|
343
|
-
| **任务** | 待办事项及状态追踪 | `[open] 实现 token 自动刷新` |
|
|
344
|
-
| **发现** | 技术洞察、bug 根因、edge case | "UUID v4 不可按字典序排序" |
|
|
345
|
-
| **知识** | 可复用的事实性知识 | "PGLite 通过 WASM 在进程内运行完整 Postgres" |
|
|
346
|
-
| **关系** | 实体间的依赖、引用、协作 | `project/memoark --[depends_on]--> tool/pglite` |
|
|
432
|
+
Memoark 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.
|
|
347
433
|
|
|
348
|
-
|
|
434
|
+
<p align="center">
|
|
435
|
+
<img src="https://raw.githubusercontent.com/AndreLYL/memoark/main/docs/assets/architecture.png" alt="Memoark architecture — 5 vertical layers + 3 cross-cutting concerns" width="920">
|
|
436
|
+
</p>
|
|
349
437
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
438
|
+
<details>
|
|
439
|
+
<summary>📐 View the editable Mermaid source</summary>
|
|
440
|
+
|
|
441
|
+
```mermaid
|
|
442
|
+
flowchart TB
|
|
443
|
+
subgraph L1["① Config & Onboarding"]
|
|
444
|
+
cfg["TUI config center · Web UI config · memoark.yaml<br/>auto-detect · hardware assessment · connection checks"]
|
|
445
|
+
end
|
|
446
|
+
subgraph L2["② Collection"]
|
|
447
|
+
feishu["Feishu: DMs · groups · email · calendar · tasks · message search · docs"]
|
|
448
|
+
agent["AI-agent sessions: Claude Code · Codex · Hermes"]
|
|
449
|
+
inc["Incremental (cursor + dedup) · historical Backfill"]
|
|
450
|
+
planned1["Planned: DingTalk · WeCom · local documents"]:::planned
|
|
451
|
+
end
|
|
452
|
+
subgraph L3["③ Extraction Pipeline"]
|
|
453
|
+
pipe["Block Builder → Noise Filter (rules+LLM) → Signal Extractor (OpenAI/Anthropic)<br/>→ entity extraction → scoring → privacy redaction → 7 signal types"]
|
|
454
|
+
end
|
|
455
|
+
subgraph L4["④ Memory Store"]
|
|
456
|
+
store["PGLite + pgvector<br/>Page · Chunk · Tag · Timeline · Graph<br/>hybrid search (FTS + vector + RRF)"]
|
|
457
|
+
end
|
|
458
|
+
subgraph L5["⑤ Interfaces & Consumption"]
|
|
459
|
+
cli["CLI"]
|
|
460
|
+
mcp["MCP (29 tools)"]
|
|
461
|
+
rest["REST API"]
|
|
462
|
+
web["Web UI (read-only)"]
|
|
463
|
+
obs["Obsidian bidirectional sync"]
|
|
464
|
+
end
|
|
465
|
+
|
|
466
|
+
L1 --> L2 --> L3 --> L4 --> L5
|
|
467
|
+
|
|
468
|
+
subgraph X["Cross-cutting concerns"]
|
|
469
|
+
id["🧬 Person Identity<br/>merge same person across platforms"]
|
|
470
|
+
cons["♻️ Consolidation / Dream Cycle<br/>tier rotation · dead-link repair · preference inference"]
|
|
471
|
+
sched["⏰ Scheduling / AutoFetch<br/>scheduled capture · run history · alerts"]
|
|
472
|
+
end
|
|
473
|
+
|
|
474
|
+
id -.-> L2
|
|
475
|
+
id -.-> L4
|
|
476
|
+
cons -.-> L4
|
|
477
|
+
sched -.-> L2
|
|
478
|
+
|
|
479
|
+
classDef planned stroke-dasharray: 5 5,fill:#f6f6f6,color:#888;
|
|
480
|
+
```
|
|
359
481
|
|
|
360
|
-
|
|
482
|
+
</details>
|
|
483
|
+
|
|
484
|
+
### Layer Breakdown
|
|
485
|
+
|
|
486
|
+
| Layer | Responsibility |
|
|
487
|
+
|-------|----------------|
|
|
488
|
+
| **① Config & Onboarding** | TUI config center (React + ink), Web UI config, hand-edited `memoark.yaml`; auto-detect runtime / API keys / sources, hardware-aware embedding recommendation, live connection checks |
|
|
489
|
+
| **② 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 |
|
|
490
|
+
| **③ 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) |
|
|
491
|
+
| **④ Memory Store** | PGLite (in-process embedded PostgreSQL) + pgvector; Page / Chunk / Tag / Timeline / Graph stores; hybrid search (tsvector FTS + vector + RRF) |
|
|
492
|
+
| **⑤ 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 |
|
|
493
|
+
|
|
494
|
+
**Cross-cutting concerns (span layers, not standalone pipeline stages):**
|
|
495
|
+
|
|
496
|
+
- **🧬 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".
|
|
497
|
+
- **♻️ Consolidation (Dream Cycle)** — background pass over the store: hot → warm → cold rotation, dead-link repair, preference inference.
|
|
498
|
+
- **⏰ Scheduling / AutoFetch** — background driver of Collection: scheduled capture, run history, alerts. *(Runs inside `serve` today; standalone daemon + autostart is on the roadmap.)*
|
|
499
|
+
|
|
500
|
+
> Runs on macOS / Linux / Windows · one-command install (npm / npx) · local-first, self-hosted, zero cloud dependency.
|
|
501
|
+
|
|
502
|
+
### Signal Extraction Pipeline
|
|
503
|
+
|
|
504
|
+
| Stage | Description |
|
|
505
|
+
|-------|-------------|
|
|
506
|
+
| **Collector** | Fetches raw messages from configured data sources |
|
|
507
|
+
| **Dedup** | Eliminates duplicates via content hashing |
|
|
508
|
+
| **Block Builder** | Groups messages into conversation blocks by time and topic |
|
|
509
|
+
| **Noise Filter** | Scores block significance using rules (L1) + LLM (L2) |
|
|
510
|
+
| **Signal Extractor** | LLM-powered extraction of entities, decisions, tasks, discoveries, knowledge, timeline, links |
|
|
511
|
+
| **Privacy Processor** | Dual-track redaction — reversible or irreversible |
|
|
512
|
+
|
|
513
|
+
### Extracted Signal Types
|
|
514
|
+
|
|
515
|
+
| Signal | Description | Example |
|
|
516
|
+
|--------|-------------|---------|
|
|
517
|
+
| **Entities** | People, projects, tools, concepts | `project/memoark`, `tool/claude-code` |
|
|
518
|
+
| **Timeline** | Key events with timestamps | "2026-05-19: Completed multi-platform collector refactoring" |
|
|
519
|
+
| **Decisions** | Technical choices with reasoning | "Chose PGLite for embedded PostgreSQL with vector support" |
|
|
520
|
+
| **Tasks** | Action items with status | `[open] Implement token auto-refresh` |
|
|
521
|
+
| **Discoveries** | Insights, root causes, edge cases | "UUID v4 is not lexicographically sortable" |
|
|
522
|
+
| **Knowledge** | Reusable facts with provenance | "PGLite runs full Postgres in-process via WASM" |
|
|
523
|
+
| **Links** | Relationships between entities | `project/memoark --[depends_on]--> tool/pglite` |
|
|
524
|
+
|
|
525
|
+
### Storage Layer
|
|
526
|
+
|
|
527
|
+
| Component | Description |
|
|
528
|
+
|-----------|-------------|
|
|
529
|
+
| **PageStore** | CRUD for wiki-style pages with YAML frontmatter |
|
|
530
|
+
| **ChunkStore** | Recursive text chunking (300 words, 50-word overlap) with embedding reuse |
|
|
531
|
+
| **SearchEngine** | FTS via `tsvector` + vector cosine via `pgvector`, fused with RRF scoring |
|
|
532
|
+
| **GraphStore** | Directed link graph with BFS traversal, link types, backlinks |
|
|
533
|
+
| **TagStore** | Page tagging with conflict-safe upserts |
|
|
534
|
+
| **TimelineStore** | Chronological entries per page with dedup |
|
|
535
|
+
| **EmbeddingService** | Batch embedding via OpenAI or Ollama, stale-chunk detection |
|
|
536
|
+
|
|
537
|
+
## MCP Tools
|
|
538
|
+
|
|
539
|
+
Memoark'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:
|
|
540
|
+
|
|
541
|
+
| Category | Tools |
|
|
542
|
+
|----------|-------|
|
|
543
|
+
| **Retrieval (high-level)** | `query`, `get_session_context`, `get_entity_profile`, `list_signals_by_entity` |
|
|
544
|
+
| **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) |
|
|
545
|
+
| **Search** | `search` |
|
|
546
|
+
| **Pages / content** | `get_page`, `put_page`, `list_pages`, `get_chunks` |
|
|
547
|
+
| **Graph** | `add_link`, `remove_link`, `get_links`, `get_backlinks`, `traverse_graph` |
|
|
548
|
+
| **Tags** | `add_tag`, `remove_tag`, `get_tags` |
|
|
549
|
+
| **Timeline** | `add_timeline_entry`, `get_timeline` |
|
|
550
|
+
| **Identity (people)** | `link_person_alias`, `list_person_handles`, `remove_person_alias`, `merge_persons`, `recanonicalize_person` |
|
|
551
|
+
| **Feishu docs** | `ingest_feishu_doc` |
|
|
552
|
+
| **Health** | `get_health` |
|
|
553
|
+
|
|
554
|
+
## CLI Reference
|
|
555
|
+
|
|
556
|
+
| Command | Description |
|
|
557
|
+
|---------|-------------|
|
|
558
|
+
| `memoark start` | One-step launch: setup if needed, then serve + auto-open browser (bare `memoark` is equivalent) |
|
|
559
|
+
| `memoark init` | Interactive config center to generate / edit `memoark.yaml` (`--auto` / `--no-tui` / `--force` / `--web`) |
|
|
560
|
+
| `memoark extract` | Extract signals from a data source |
|
|
561
|
+
| `memoark search <query>` | Search memory (hybrid / `--mode fts`) |
|
|
562
|
+
| `memoark embed` | Generate embeddings for stale chunks |
|
|
563
|
+
| `memoark serve` | Start HTTP API (auto-opens browser, `--no-open` to skip) / `--mcp` stdio / `--mcp-http` |
|
|
564
|
+
| `memoark consolidate` | Run memory consolidation (tier rotation hot→warm / warm→cold) |
|
|
565
|
+
| `memoark export` | Export memory pages to an Obsidian vault (Markdown) |
|
|
566
|
+
| `memoark import` | Import an Obsidian vault back into Memoark |
|
|
567
|
+
| `memoark docs` | Feishu doc summary cards: `sync` / `status` / `retry` |
|
|
568
|
+
| `memoark identity` | Person identity: aliases, merge, rename |
|
|
569
|
+
| `memoark sources` | `list` sources / `test <name>` connectivity |
|
|
570
|
+
| `memoark doctor` | Diagnose configuration and connectivity |
|
|
571
|
+
| `memoark config` | `init` (alias of `memoark init`) / `edit` (browser UI) |
|
|
361
572
|
|
|
362
573
|
### `memoark extract`
|
|
363
574
|
|
|
364
|
-
|
|
575
|
+
Extract signals from data sources.
|
|
365
576
|
|
|
366
577
|
```bash
|
|
367
578
|
memoark extract \
|
|
368
|
-
--source <name> # claude-code, codex, hermes,
|
|
369
|
-
--format json|markdown #
|
|
370
|
-
--adapter store|file|gbrain|stdout #
|
|
371
|
-
--
|
|
372
|
-
--
|
|
373
|
-
--
|
|
579
|
+
--source <name> # feishu, claude-code, codex, hermes, all
|
|
580
|
+
--format json|markdown # Output format (default: json)
|
|
581
|
+
--adapter store|file|gbrain|stdout # Output target (default: store)
|
|
582
|
+
--output <dir> # Output directory for file adapter
|
|
583
|
+
--since <date> # Process messages after this date (ISO 8601 or relative: 1d, 2h)
|
|
584
|
+
--limit <n> # Max messages to process
|
|
585
|
+
--dry-run # Test without LLM calls or writes
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
### `memoark start`
|
|
589
|
+
|
|
590
|
+
One-step launch. If no `memoark.yaml` exists, it opens the browser setup wizard first; once configured, it starts the HTTP server and auto-opens your browser. Running `memoark` with no subcommand does the same thing.
|
|
591
|
+
|
|
592
|
+
```bash
|
|
593
|
+
memoark start
|
|
594
|
+
memoark # equivalent
|
|
374
595
|
```
|
|
375
596
|
|
|
376
597
|
### `memoark serve`
|
|
377
598
|
|
|
378
|
-
|
|
599
|
+
Start the Memoark server.
|
|
379
600
|
|
|
380
601
|
```bash
|
|
381
|
-
|
|
382
|
-
memoark serve
|
|
602
|
+
# HTTP API + Web UI (default http://localhost:3927) — auto-opens the browser
|
|
603
|
+
memoark serve
|
|
604
|
+
|
|
605
|
+
# Skip the auto-open
|
|
606
|
+
memoark serve --no-open
|
|
607
|
+
|
|
608
|
+
# MCP stdio transport (local direct connect for AI agents)
|
|
609
|
+
memoark serve --mcp
|
|
610
|
+
|
|
611
|
+
# MCP Streamable HTTP transport (remote / multi-client, default http://localhost:3928/mcp)
|
|
612
|
+
memoark serve --mcp-http
|
|
383
613
|
```
|
|
384
614
|
|
|
385
615
|
### `memoark search <query>`
|
|
386
616
|
|
|
387
|
-
|
|
617
|
+
Search your stored memory.
|
|
388
618
|
|
|
389
619
|
```bash
|
|
390
|
-
|
|
391
|
-
memoark search "
|
|
392
|
-
|
|
620
|
+
# Hybrid search (FTS + vector, default)
|
|
621
|
+
memoark search "authentication middleware"
|
|
622
|
+
|
|
623
|
+
# FTS-only search
|
|
624
|
+
memoark search "JWT token" --mode fts
|
|
625
|
+
|
|
626
|
+
# Limit results
|
|
627
|
+
memoark search "deployment" --limit 5
|
|
393
628
|
```
|
|
394
629
|
|
|
395
630
|
### `memoark embed`
|
|
396
631
|
|
|
397
|
-
|
|
632
|
+
Generate embeddings for unembedded chunks.
|
|
398
633
|
|
|
399
634
|
```bash
|
|
400
|
-
|
|
401
|
-
memoark embed
|
|
635
|
+
# Embed all stale chunks
|
|
636
|
+
memoark embed
|
|
637
|
+
|
|
638
|
+
# Limit batch size
|
|
639
|
+
memoark embed --limit 100
|
|
402
640
|
```
|
|
403
641
|
|
|
404
642
|
### `memoark doctor`
|
|
405
643
|
|
|
406
|
-
|
|
644
|
+
Diagnose configuration and environment.
|
|
645
|
+
|
|
646
|
+
```bash
|
|
647
|
+
memoark doctor
|
|
648
|
+
```
|
|
407
649
|
|
|
408
650
|
### `memoark config init`
|
|
409
651
|
|
|
410
|
-
|
|
652
|
+
Equivalent to `memoark init` — launches the interactive configuration center to generate / edit `memoark.yaml` (supports `--auto` / `--no-tui` / `--force`).
|
|
653
|
+
|
|
654
|
+
```bash
|
|
655
|
+
memoark config init
|
|
656
|
+
```
|
|
657
|
+
|
|
658
|
+
### `memoark sources list`
|
|
659
|
+
|
|
660
|
+
List available data sources.
|
|
661
|
+
|
|
662
|
+
```bash
|
|
663
|
+
memoark sources list
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
### `memoark sources test <name>`
|
|
667
|
+
|
|
668
|
+
Test data source connectivity.
|
|
669
|
+
|
|
670
|
+
```bash
|
|
671
|
+
memoark sources test claude-code
|
|
672
|
+
```
|
|
673
|
+
|
|
674
|
+
### `memoark consolidate`
|
|
675
|
+
|
|
676
|
+
Run memory lifecycle tier rotation (the "dream cycle").
|
|
677
|
+
|
|
678
|
+
```bash
|
|
679
|
+
memoark consolidate # hot→warm and/or warm→cold rotation
|
|
680
|
+
```
|
|
681
|
+
|
|
682
|
+
### `memoark export` / `memoark import`
|
|
683
|
+
|
|
684
|
+
Bidirectional Obsidian sync.
|
|
685
|
+
|
|
686
|
+
```bash
|
|
687
|
+
memoark export # memory pages → Obsidian vault (Markdown)
|
|
688
|
+
memoark import # Obsidian vault → Memoark
|
|
689
|
+
```
|
|
690
|
+
|
|
691
|
+
### `memoark docs`
|
|
411
692
|
|
|
412
|
-
|
|
693
|
+
Feishu doc summary cards (DocSource v2) — build lightweight pointer cards first, then upgrade triggered docs to full summary cards.
|
|
694
|
+
|
|
695
|
+
```bash
|
|
696
|
+
memoark docs sync # scan docs, build pointer cards, upgrade triggered docs
|
|
697
|
+
memoark docs status # show card counts by type
|
|
698
|
+
memoark docs retry <doc_token> # retry a failed full-card extraction
|
|
699
|
+
memoark docs retry --all-failed # retry every failed doc
|
|
700
|
+
```
|
|
413
701
|
|
|
414
|
-
|
|
702
|
+
Agents can also ingest a single doc directly via the MCP tool `ingest_feishu_doc` (pass a doc URL or token).
|
|
415
703
|
|
|
416
|
-
##
|
|
704
|
+
## Configuration
|
|
417
705
|
|
|
418
706
|
### `memoark.yaml`
|
|
419
707
|
|
|
420
708
|
```yaml
|
|
421
|
-
#
|
|
709
|
+
# Privacy
|
|
422
710
|
privacy:
|
|
423
711
|
enabled: true
|
|
424
|
-
mode: reversible # reversible
|
|
712
|
+
mode: reversible # reversible | irreversible
|
|
425
713
|
redact_phone: true
|
|
426
714
|
redact_id_card: true
|
|
427
715
|
redact_bank_card: true
|
|
428
716
|
replacement: "[REDACTED]"
|
|
429
717
|
|
|
430
|
-
# LLM
|
|
718
|
+
# LLM (for signal extraction)
|
|
431
719
|
llm:
|
|
432
720
|
provider: openai
|
|
433
721
|
model: gpt-4o-mini
|
|
434
722
|
api_key: ${OPENAI_API_KEY}
|
|
435
723
|
|
|
436
|
-
#
|
|
724
|
+
# Block Builder
|
|
437
725
|
block_builder:
|
|
438
726
|
block_gap_minutes: 30
|
|
439
727
|
max_block_tokens: 4000
|
|
440
728
|
max_block_messages: 100
|
|
441
729
|
|
|
442
|
-
#
|
|
730
|
+
# Data Sources
|
|
443
731
|
sources:
|
|
732
|
+
# Feishu (Lark) — your primary work source
|
|
733
|
+
feishu:
|
|
734
|
+
enabled: true
|
|
735
|
+
auth_mode: user # user mode enables DM + message search
|
|
736
|
+
app_id: ${FEISHU_APP_ID}
|
|
737
|
+
app_secret: ${FEISHU_APP_SECRET}
|
|
738
|
+
sources:
|
|
739
|
+
messages: # group chats via OpenAPI
|
|
740
|
+
enabled: true
|
|
741
|
+
chat_ids: []
|
|
742
|
+
lookback_days: 3
|
|
743
|
+
message_search: # DMs + recent chats via lark-cli
|
|
744
|
+
enabled: true
|
|
745
|
+
chat_types: [p2p] # add `group` to include groups
|
|
746
|
+
lookback_days: 3
|
|
747
|
+
calendar: { enabled: true }
|
|
748
|
+
docs: { enabled: true }
|
|
749
|
+
tasks: { enabled: true }
|
|
750
|
+
# AI agent sessions
|
|
444
751
|
claude-code:
|
|
445
752
|
enabled: true
|
|
446
753
|
codex:
|
|
@@ -448,113 +755,171 @@ sources:
|
|
|
448
755
|
hermes:
|
|
449
756
|
enabled: true
|
|
450
757
|
|
|
451
|
-
#
|
|
758
|
+
# Store (PGLite)
|
|
452
759
|
store:
|
|
453
760
|
data_dir: ~/.memoark/data
|
|
454
761
|
|
|
455
|
-
#
|
|
762
|
+
# Embeddings
|
|
456
763
|
embedding:
|
|
457
764
|
provider: openai # openai | ollama
|
|
458
765
|
model: text-embedding-3-large
|
|
459
766
|
dimensions: 1536
|
|
460
767
|
api_key: ${OPENAI_API_KEY}
|
|
461
768
|
|
|
462
|
-
#
|
|
769
|
+
# Server
|
|
463
770
|
server:
|
|
464
771
|
http_port: 3927
|
|
465
772
|
```
|
|
466
773
|
|
|
467
|
-
|
|
774
|
+
> **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.
|
|
468
775
|
|
|
469
|
-
|
|
470
|
-
|--------|------|------|
|
|
471
|
-
| **飞书(Lark)** | API + lark-cli | 核心工作源 —— 7 个源:群聊、私信、邮件、日历、文档、任务、消息搜索 |
|
|
472
|
-
| **Claude Code** | `~/.claude/projects/` | Claude Code Agent 对话记录 |
|
|
473
|
-
| **Codex** | `~/.codex/` | OpenAI Codex CLI 会话 |
|
|
474
|
-
| **Hermes** | `~/.openclaw/agents/` | OpenClaw Hermes Agent 会话 |
|
|
776
|
+
## Supported Sources
|
|
475
777
|
|
|
476
|
-
|
|
778
|
+
### Feishu (Lark)
|
|
477
779
|
|
|
478
|
-
|
|
780
|
+
Your primary work source — group messages, DMs, email, calendar events, docs, and tasks.
|
|
479
781
|
|
|
480
|
-
|
|
782
|
+
- **Auth**: `lark-cli` user-mode login (for DMs / message search) + app credentials
|
|
783
|
+
- **Data**: 7 sources — group chats, DMs, email, calendar, docs, tasks, message search
|
|
784
|
+
- **Why first**: Feishu carries the work itself — requirements, technical proposals, team decisions
|
|
481
785
|
|
|
482
|
-
|
|
483
|
-
- [x] LLM 驱动的噪声过滤和信号提取
|
|
484
|
-
- [x] 7 类信号:实体、时间线、决策、任务、发现、知识、关系
|
|
485
|
-
- [x] 双轨隐私脱敏(可逆 + 不可逆)
|
|
486
|
-
- [x] JSON 和 Markdown 输出格式
|
|
786
|
+
### Claude Code
|
|
487
787
|
|
|
488
|
-
|
|
788
|
+
Extracts conversation transcripts from Claude Code agent sessions.
|
|
489
789
|
|
|
490
|
-
-
|
|
491
|
-
-
|
|
492
|
-
- [x] 全文搜索(simple 分词器,支持中文)+ 向量搜索
|
|
493
|
-
- [x] RRF 混合搜索
|
|
494
|
-
- [x] EmbeddingService(OpenAI / Ollama)
|
|
495
|
-
- [x] StoreAdapter — Pipeline 直接写入 PGLite
|
|
496
|
-
- [x] Hono REST API
|
|
497
|
-
- [x] MCP 服务器(17 个 stdio 工具)
|
|
498
|
-
- [x] CLI serve、search、embed 命令
|
|
790
|
+
- **Location**: `~/.claude/projects/`
|
|
791
|
+
- **Data**: Agent conversations, decisions, discoveries, session logs
|
|
499
792
|
|
|
500
|
-
###
|
|
793
|
+
### Codex
|
|
501
794
|
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
-
|
|
505
|
-
-
|
|
506
|
-
|
|
795
|
+
Extracts session data from OpenAI Codex CLI.
|
|
796
|
+
|
|
797
|
+
- **Location**: `~/.codex/`
|
|
798
|
+
- **Data**: User/assistant messages with system-injection filtering
|
|
799
|
+
|
|
800
|
+
### Hermes
|
|
801
|
+
|
|
802
|
+
Extracts session data from OpenClaw Hermes agents.
|
|
507
803
|
|
|
508
|
-
|
|
804
|
+
- **Location**: `~/.openclaw/agents/`
|
|
805
|
+
- **Data**: Multi-agent sessions with automatic sub-agent discovery
|
|
509
806
|
|
|
510
|
-
|
|
511
|
-
- [ ] 加权准入评分(替换二元噪声过滤)
|
|
512
|
-
- [ ] NarrativeAssembler —— 按实体聚合叙事
|
|
807
|
+
## Roadmap
|
|
513
808
|
|
|
514
|
-
### Phase
|
|
809
|
+
### Phase 1 — Signal Extraction (Complete)
|
|
515
810
|
|
|
516
|
-
- [
|
|
517
|
-
- [
|
|
518
|
-
- [
|
|
811
|
+
- [x] Multi-platform collectors (Claude Code, Codex, Hermes, Feishu)
|
|
812
|
+
- [x] LLM-powered noise filtering and signal extraction
|
|
813
|
+
- [x] 7 signal types: entities, timeline, decisions, tasks, discoveries, knowledge, links
|
|
814
|
+
- [x] Dual-track privacy redaction (reversible + irreversible)
|
|
815
|
+
- [x] JSON and Markdown output formatters
|
|
816
|
+
- [x] File, GBrain, and Stdout adapters
|
|
817
|
+
- [x] CLI with extract, doctor, config, sources commands
|
|
519
818
|
|
|
520
|
-
### Phase
|
|
819
|
+
### Phase 2 — Storage & Server (Complete)
|
|
521
820
|
|
|
522
|
-
- [
|
|
523
|
-
- [
|
|
524
|
-
- [
|
|
821
|
+
- [x] PGLite embedded PostgreSQL with pgvector
|
|
822
|
+
- [x] PageStore, ChunkStore, TagStore, TimelineStore, GraphStore
|
|
823
|
+
- [x] Full-text search with `tsvector` (simple tokenizer for multilingual)
|
|
824
|
+
- [x] Vector search with `pgvector` cosine similarity
|
|
825
|
+
- [x] Hybrid RRF search fusing FTS + vector results
|
|
826
|
+
- [x] EmbeddingService (OpenAI / Ollama)
|
|
827
|
+
- [x] StoreAdapter — pipeline writes directly to PGLite
|
|
828
|
+
- [x] Hono REST API
|
|
829
|
+
- [x] MCP Server with 29 stdio tools
|
|
830
|
+
- [x] CLI serve, search, embed commands
|
|
525
831
|
|
|
526
|
-
|
|
832
|
+
### Phase 3 — Web UI (Complete)
|
|
527
833
|
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
834
|
+
- [x] Dashboard
|
|
835
|
+
- [x] Timeline view
|
|
836
|
+
- [x] Knowledge graph visualization (force-directed)
|
|
837
|
+
- [x] Search interface
|
|
838
|
+
- [x] Entity / page detail views
|
|
839
|
+
|
|
840
|
+
### Phase 4 — Consolidation & Daemon (Complete)
|
|
841
|
+
|
|
842
|
+
- [x] Memory consolidation ("dream cycle"): tier rotation, dead-link repair, preference inference
|
|
843
|
+
- [x] Resident daemon with scheduled extraction (scheduler, run history, alerts)
|
|
844
|
+
- [x] Person identity management (aliases, merge, rename)
|
|
845
|
+
- [x] Feishu doc summary cards (DocSource v2)
|
|
846
|
+
- [x] Obsidian bidirectional sync (export / import)
|
|
847
|
+
|
|
848
|
+
### Phase 5 — Self-Hosted Always-On (In Progress · MVP)
|
|
849
|
+
|
|
850
|
+
- [ ] Standalone daemon service + autostart (systemd / launchd / Windows service) — "configure once, runs maintenance-free"
|
|
851
|
+
- [ ] Agent Hook: auto read/write memory on session end / key decisions
|
|
852
|
+
|
|
853
|
+
### Phase 6 — More Chinese Workplace Sources (Planned)
|
|
854
|
+
|
|
855
|
+
- [ ] DingTalk
|
|
856
|
+
- [ ] WeCom (WeChat Work)
|
|
857
|
+
- [ ] WeChat chat history
|
|
858
|
+
- [ ] Local document source (scan local files, community-driven · low priority)
|
|
859
|
+
|
|
860
|
+
### Phase 7 — Context-Aware Extraction & Q&A (In Progress)
|
|
861
|
+
|
|
862
|
+
- [x] Synthesis layer (basic): `synthesize` / `recall` — cited composed answers with inline `[n]` + gap analysis, intent-template framework, per-scope caching
|
|
863
|
+
- [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
|
|
864
|
+
- [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")
|
|
865
|
+
- [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
|
|
866
|
+
- [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
|
|
867
|
+
- [ ] ContextBuffer — share context across conversation blocks
|
|
868
|
+
- [ ] Weighted admission scoring (replaces binary noise filter)
|
|
869
|
+
- [ ] Narrative assembler — aggregate signals into per-entity narratives
|
|
870
|
+
- [ ] Natural language Q&A over stored memories
|
|
871
|
+
|
|
872
|
+
### Phase 8 — Web UI Enhancements (Planned)
|
|
873
|
+
|
|
874
|
+
- [ ] Memory editing (read-only today)
|
|
875
|
+
- [ ] Audit view (signal provenance visualization)
|
|
876
|
+
|
|
877
|
+
## Tech Stack
|
|
878
|
+
|
|
879
|
+
| Layer | Technology |
|
|
880
|
+
|-------|-----------|
|
|
881
|
+
| Language | TypeScript |
|
|
882
|
+
| Runtime | Bun |
|
|
883
|
+
| Database | PGLite (embedded PostgreSQL) |
|
|
884
|
+
| Vector Search | pgvector |
|
|
885
|
+
| Embeddings | OpenAI / Ollama |
|
|
886
|
+
| Web Framework | Hono |
|
|
536
887
|
| Web UI | React + Vite |
|
|
537
888
|
| MCP | @modelcontextprotocol/sdk |
|
|
538
889
|
| Linter | Biome |
|
|
539
|
-
|
|
|
890
|
+
| Tests | Vitest (1000+ tests) |
|
|
540
891
|
|
|
541
|
-
##
|
|
892
|
+
## Development
|
|
542
893
|
|
|
543
894
|
```bash
|
|
544
|
-
|
|
545
|
-
bun run test
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
bun run
|
|
895
|
+
# Run tests
|
|
896
|
+
bun run test
|
|
897
|
+
|
|
898
|
+
# Watch mode
|
|
899
|
+
bun run test:watch
|
|
900
|
+
|
|
901
|
+
# Type-check
|
|
902
|
+
bun run typecheck
|
|
903
|
+
|
|
904
|
+
# Lint
|
|
905
|
+
bun run lint
|
|
906
|
+
|
|
907
|
+
# Auto-fix lint issues
|
|
908
|
+
bun run lint:fix
|
|
549
909
|
```
|
|
550
910
|
|
|
551
|
-
|
|
911
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development workflow and guidelines.
|
|
912
|
+
|
|
913
|
+
## Contributing
|
|
914
|
+
|
|
915
|
+
Contributions welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) before submitting a PR.
|
|
552
916
|
|
|
553
|
-
##
|
|
917
|
+
## Community & Support
|
|
554
918
|
|
|
555
|
-
- 🐛
|
|
556
|
-
- 💡
|
|
919
|
+
- 🐛 Found a bug or have a feature request? [Open an issue](https://github.com/AndreLYL/memoark/issues).
|
|
920
|
+
- 💡 Questions and ideas are welcome in the issue tracker.
|
|
921
|
+
- ⭐ If Memoark helps you, give it a Star — it's the best way to support the project.
|
|
557
922
|
|
|
558
923
|
## License
|
|
559
924
|
|
|
560
|
-
|
|
925
|
+
Licensed under the [Apache License, Version 2.0](LICENSE).
|