memu-cli 0.1.0__tar.gz
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.
- memu_cli-0.1.0/.claude/skills/memu/SKILL.md +46 -0
- memu_cli-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +75 -0
- memu_cli-0.1.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
- memu_cli-0.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +61 -0
- memu_cli-0.1.0/.github/ISSUE_TEMPLATE/hackathon_task.yml +65 -0
- memu_cli-0.1.0/.github/ISSUE_TEMPLATE/improvement_suggestion.yml +63 -0
- memu_cli-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +44 -0
- memu_cli-0.1.0/.github/workflows/build.yml +35 -0
- memu_cli-0.1.0/.github/workflows/pr-title.yml +47 -0
- memu_cli-0.1.0/.github/workflows/release-please.yml +160 -0
- memu_cli-0.1.0/.gitignore +218 -0
- memu_cli-0.1.0/.pre-commit-config.yaml +20 -0
- memu_cli-0.1.0/.python-version +1 -0
- memu_cli-0.1.0/AGENTS.md +165 -0
- memu_cli-0.1.0/CHANGELOG.md +290 -0
- memu_cli-0.1.0/CONTRIBUTING.md +239 -0
- memu_cli-0.1.0/Cargo.lock +172 -0
- memu_cli-0.1.0/Cargo.toml +15 -0
- memu_cli-0.1.0/LICENSE.txt +194 -0
- memu_cli-0.1.0/MANIFEST.in +21 -0
- memu_cli-0.1.0/Makefile +22 -0
- memu_cli-0.1.0/PKG-INFO +507 -0
- memu_cli-0.1.0/README.md +466 -0
- memu_cli-0.1.0/assets/banner.png +0 -0
- memu_cli-0.1.0/assets/benchmark.png +0 -0
- memu_cli-0.1.0/assets/memUbot.png +0 -0
- memu_cli-0.1.0/assets/memorize.png +0 -0
- memu_cli-0.1.0/assets/partners/Clawdchat.png +0 -0
- memu_cli-0.1.0/assets/partners/LazyLLM.png +0 -0
- memu_cli-0.1.0/assets/partners/buddie.png +0 -0
- memu_cli-0.1.0/assets/partners/bytebase.png +0 -0
- memu_cli-0.1.0/assets/partners/jazz.png +0 -0
- memu_cli-0.1.0/assets/partners/openagents.png +0 -0
- memu_cli-0.1.0/assets/partners/xroute.png +0 -0
- memu_cli-0.1.0/assets/qrcode.png +0 -0
- memu_cli-0.1.0/assets/retrieve.png +0 -0
- memu_cli-0.1.0/assets/star.gif +0 -0
- memu_cli-0.1.0/assets/structure.png +0 -0
- memu_cli-0.1.0/assets/usecase/ai_companion-0000.jpg +0 -0
- memu_cli-0.1.0/assets/usecase/ai_creation-0000.jpg +0 -0
- memu_cli-0.1.0/assets/usecase/ai_edu-0000.jpg +0 -0
- memu_cli-0.1.0/assets/usecase/ai_ip-0000.png +0 -0
- memu_cli-0.1.0/assets/usecase/ai_robot-0000.jpg +0 -0
- memu_cli-0.1.0/assets/usecase/ai_role_play-0000.jpg +0 -0
- memu_cli-0.1.0/assets/usecase/ai_therapy-0000.jpg +0 -0
- memu_cli-0.1.0/docs/HACKATHON_ISSUE_DRAFT.md +68 -0
- memu_cli-0.1.0/docs/HACKATHON_MAD_COMBOS.md +659 -0
- memu_cli-0.1.0/docs/adr/0001-workflow-pipeline-architecture.md +35 -0
- memu_cli-0.1.0/docs/adr/0002-pluggable-storage-and-vector-strategy.md +42 -0
- memu_cli-0.1.0/docs/adr/0003-user-scope-in-data-model.md +32 -0
- memu_cli-0.1.0/docs/adr/0004-workspace-memorize-and-memory-file-system.md +79 -0
- memu_cli-0.1.0/docs/adr/0005-dedicated-embedding-package.md +88 -0
- memu_cli-0.1.0/docs/adr/0006-from-memory-item-category-to-tracked-workspace-memorization.md +162 -0
- memu_cli-0.1.0/docs/adr/0007-three-independent-memory-lines-wiki-graph.md +242 -0
- memu_cli-0.1.0/docs/adr/0008-two-integration-surfaces-hooks-and-api.md +274 -0
- memu_cli-0.1.0/docs/adr/0009-codex-packaging-cli-and-config.md +212 -0
- memu_cli-0.1.0/docs/adr/README.md +11 -0
- memu_cli-0.1.0/docs/architecture.md +392 -0
- memu_cli-0.1.0/docs/integrations/grok.md +53 -0
- memu_cli-0.1.0/docs/langgraph_integration.md +97 -0
- memu_cli-0.1.0/docs/providers/grok.md +70 -0
- memu_cli-0.1.0/docs/sealos-devbox-guide.md +410 -0
- memu_cli-0.1.0/docs/sealos_use_case.md +54 -0
- memu_cli-0.1.0/docs/sqlite.md +230 -0
- memu_cli-0.1.0/docs/tutorials/getting_started.md +181 -0
- memu_cli-0.1.0/examples/example_1_conversation_memory.py +117 -0
- memu_cli-0.1.0/examples/example_2_skill_extraction.py +274 -0
- memu_cli-0.1.0/examples/example_3_multimodal_memory.py +137 -0
- memu_cli-0.1.0/examples/example_4_openrouter_memory.py +112 -0
- memu_cli-0.1.0/examples/example_5_with_lazyllm_client.py +250 -0
- memu_cli-0.1.0/examples/example_6_preprocess_modalities.py +140 -0
- memu_cli-0.1.0/examples/getting_started_robust.py +107 -0
- memu_cli-0.1.0/examples/langgraph_demo.py +76 -0
- memu_cli-0.1.0/examples/output/conversation_example/activities.md +9 -0
- memu_cli-0.1.0/examples/output/conversation_example/experiences.md +5 -0
- memu_cli-0.1.0/examples/output/conversation_example/goals.md +17 -0
- memu_cli-0.1.0/examples/output/conversation_example/habits.md +13 -0
- memu_cli-0.1.0/examples/output/conversation_example/knowledge.md +29 -0
- memu_cli-0.1.0/examples/output/conversation_example/opinions.md +1 -0
- memu_cli-0.1.0/examples/output/conversation_example/personal_info.md +3 -0
- memu_cli-0.1.0/examples/output/conversation_example/preferences.md +6 -0
- memu_cli-0.1.0/examples/output/conversation_example/relationships.md +3 -0
- memu_cli-0.1.0/examples/output/conversation_example/work_life.md +12 -0
- memu_cli-0.1.0/examples/proactive/memory/config.py +66 -0
- memu_cli-0.1.0/examples/proactive/memory/local/__init__.py +0 -0
- memu_cli-0.1.0/examples/proactive/memory/local/common.py +31 -0
- memu_cli-0.1.0/examples/proactive/memory/local/memorize.py +38 -0
- memu_cli-0.1.0/examples/proactive/memory/local/tools.py +42 -0
- memu_cli-0.1.0/examples/proactive/memory/platform/__init__.py +0 -0
- memu_cli-0.1.0/examples/proactive/memory/platform/memorize.py +31 -0
- memu_cli-0.1.0/examples/proactive/memory/platform/tools.py +52 -0
- memu_cli-0.1.0/examples/proactive/proactive.py +198 -0
- memu_cli-0.1.0/examples/resources/audio/audio_intro.mp3 +0 -0
- memu_cli-0.1.0/examples/resources/conversations/conv1.json +54 -0
- memu_cli-0.1.0/examples/resources/conversations/conv2.json +67 -0
- memu_cli-0.1.0/examples/resources/conversations/conv3.json +67 -0
- memu_cli-0.1.0/examples/resources/docs/doc1.txt +330 -0
- memu_cli-0.1.0/examples/resources/docs/doc2.txt +433 -0
- memu_cli-0.1.0/examples/resources/docs/doc_sample.pdf +0 -0
- memu_cli-0.1.0/examples/resources/images/image1.png +0 -0
- memu_cli-0.1.0/examples/resources/logs/log1.txt +212 -0
- memu_cli-0.1.0/examples/resources/logs/log2.txt +226 -0
- memu_cli-0.1.0/examples/resources/logs/log3.txt +374 -0
- memu_cli-0.1.0/examples/resources/video/video_test.mp4 +0 -0
- memu_cli-0.1.0/examples/sealos-assistant/README.md +66 -0
- memu_cli-0.1.0/examples/sealos-assistant/entrypoint.sh +13 -0
- memu_cli-0.1.0/examples/sealos-assistant/main.py +286 -0
- memu_cli-0.1.0/examples/sealos-assistant/requirements.txt +4 -0
- memu_cli-0.1.0/examples/sealos_support_agent.py +70 -0
- memu_cli-0.1.0/examples/test_nebius_provider.py +228 -0
- memu_cli-0.1.0/npm/README.md +32 -0
- memu_cli-0.1.0/npm/bin/memu.js +56 -0
- memu_cli-0.1.0/npm/package.json +33 -0
- memu_cli-0.1.0/pyproject.toml +185 -0
- memu_cli-0.1.0/readme/README_en.md +542 -0
- memu_cli-0.1.0/readme/README_es.md +542 -0
- memu_cli-0.1.0/readme/README_fr.md +542 -0
- memu_cli-0.1.0/readme/README_ja.md +542 -0
- memu_cli-0.1.0/readme/README_ko.md +542 -0
- memu_cli-0.1.0/readme/README_zh.md +542 -0
- memu_cli-0.1.0/scripts/db.py +89 -0
- memu_cli-0.1.0/setup.cfg +18 -0
- memu_cli-0.1.0/src/lib.rs +15 -0
- memu_cli-0.1.0/src/memu/__init__.py +9 -0
- memu_cli-0.1.0/src/memu/__main__.py +7 -0
- memu_cli-0.1.0/src/memu/_core.pyi +1 -0
- memu_cli-0.1.0/src/memu/app/__init__.py +37 -0
- memu_cli-0.1.0/src/memu/app/agentic.py +394 -0
- memu_cli-0.1.0/src/memu/app/client_pool.py +63 -0
- memu_cli-0.1.0/src/memu/app/crud.py +792 -0
- memu_cli-0.1.0/src/memu/app/memorize.py +1210 -0
- memu_cli-0.1.0/src/memu/app/memorize_workspace.py +834 -0
- memu_cli-0.1.0/src/memu/app/memory_files.py +101 -0
- memu_cli-0.1.0/src/memu/app/retrieve.py +1427 -0
- memu_cli-0.1.0/src/memu/app/retrieve_workspace.py +276 -0
- memu_cli-0.1.0/src/memu/app/service.py +495 -0
- memu_cli-0.1.0/src/memu/app/settings.py +594 -0
- memu_cli-0.1.0/src/memu/blob/__init__.py +0 -0
- memu_cli-0.1.0/src/memu/blob/document_text.py +65 -0
- memu_cli-0.1.0/src/memu/blob/folder.py +185 -0
- memu_cli-0.1.0/src/memu/blob/local_fs.py +97 -0
- memu_cli-0.1.0/src/memu/cli.py +246 -0
- memu_cli-0.1.0/src/memu/database/__init__.py +41 -0
- memu_cli-0.1.0/src/memu/database/factory.py +43 -0
- memu_cli-0.1.0/src/memu/database/inmemory/__init__.py +34 -0
- memu_cli-0.1.0/src/memu/database/inmemory/models.py +77 -0
- memu_cli-0.1.0/src/memu/database/inmemory/repo.py +85 -0
- memu_cli-0.1.0/src/memu/database/inmemory/repositories/__init__.py +33 -0
- memu_cli-0.1.0/src/memu/database/inmemory/repositories/filter.py +32 -0
- memu_cli-0.1.0/src/memu/database/inmemory/repositories/recall_entry_repo.py +263 -0
- memu_cli-0.1.0/src/memu/database/inmemory/repositories/recall_file_entry_repo.py +65 -0
- memu_cli-0.1.0/src/memu/database/inmemory/repositories/recall_file_repo.py +94 -0
- memu_cli-0.1.0/src/memu/database/inmemory/repositories/recall_file_resource_repo.py +67 -0
- memu_cli-0.1.0/src/memu/database/inmemory/repositories/recall_file_segment_repo.py +71 -0
- memu_cli-0.1.0/src/memu/database/inmemory/repositories/resource_repo.py +79 -0
- memu_cli-0.1.0/src/memu/database/inmemory/state.py +7 -0
- memu_cli-0.1.0/src/memu/database/inmemory/vector.py +13 -0
- memu_cli-0.1.0/src/memu/database/interfaces.py +50 -0
- memu_cli-0.1.0/src/memu/database/models.py +197 -0
- memu_cli-0.1.0/src/memu/database/postgres/__init__.py +36 -0
- memu_cli-0.1.0/src/memu/database/postgres/migration.py +72 -0
- memu_cli-0.1.0/src/memu/database/postgres/migrations/__init__.py +1 -0
- memu_cli-0.1.0/src/memu/database/postgres/migrations/env.py +96 -0
- memu_cli-0.1.0/src/memu/database/postgres/migrations/script.py.mako +28 -0
- memu_cli-0.1.0/src/memu/database/postgres/migrations/versions/20260703_0001_initial_schema.py +161 -0
- memu_cli-0.1.0/src/memu/database/postgres/models.py +219 -0
- memu_cli-0.1.0/src/memu/database/postgres/postgres.py +150 -0
- memu_cli-0.1.0/src/memu/database/postgres/repositories/__init__.py +15 -0
- memu_cli-0.1.0/src/memu/database/postgres/repositories/base.py +113 -0
- memu_cli-0.1.0/src/memu/database/postgres/repositories/recall_entry_repo.py +401 -0
- memu_cli-0.1.0/src/memu/database/postgres/repositories/recall_file_entry_repo.py +145 -0
- memu_cli-0.1.0/src/memu/database/postgres/repositories/recall_file_repo.py +167 -0
- memu_cli-0.1.0/src/memu/database/postgres/repositories/recall_file_resource_repo.py +149 -0
- memu_cli-0.1.0/src/memu/database/postgres/repositories/recall_file_segment_repo.py +133 -0
- memu_cli-0.1.0/src/memu/database/postgres/repositories/resource_repo.py +134 -0
- memu_cli-0.1.0/src/memu/database/postgres/schema.py +135 -0
- memu_cli-0.1.0/src/memu/database/postgres/session.py +34 -0
- memu_cli-0.1.0/src/memu/database/repositories/__init__.py +15 -0
- memu_cli-0.1.0/src/memu/database/repositories/recall_entry.py +60 -0
- memu_cli-0.1.0/src/memu/database/repositories/recall_file.py +39 -0
- memu_cli-0.1.0/src/memu/database/repositories/recall_file_entry.py +31 -0
- memu_cli-0.1.0/src/memu/database/repositories/recall_file_resource.py +33 -0
- memu_cli-0.1.0/src/memu/database/repositories/recall_file_segment.py +41 -0
- memu_cli-0.1.0/src/memu/database/repositories/resource.py +46 -0
- memu_cli-0.1.0/src/memu/database/sqlite/__init__.py +36 -0
- memu_cli-0.1.0/src/memu/database/sqlite/models.py +211 -0
- memu_cli-0.1.0/src/memu/database/sqlite/repositories/__init__.py +19 -0
- memu_cli-0.1.0/src/memu/database/sqlite/repositories/base.py +128 -0
- memu_cli-0.1.0/src/memu/database/sqlite/repositories/recall_entry_repo.py +544 -0
- memu_cli-0.1.0/src/memu/database/sqlite/repositories/recall_file_entry_repo.py +211 -0
- memu_cli-0.1.0/src/memu/database/sqlite/repositories/recall_file_repo.py +273 -0
- memu_cli-0.1.0/src/memu/database/sqlite/repositories/recall_file_resource_repo.py +215 -0
- memu_cli-0.1.0/src/memu/database/sqlite/repositories/recall_file_segment_repo.py +142 -0
- memu_cli-0.1.0/src/memu/database/sqlite/repositories/resource_repo.py +224 -0
- memu_cli-0.1.0/src/memu/database/sqlite/schema.py +126 -0
- memu_cli-0.1.0/src/memu/database/sqlite/session.py +48 -0
- memu_cli-0.1.0/src/memu/database/sqlite/sqlite.py +187 -0
- memu_cli-0.1.0/src/memu/database/state.py +25 -0
- memu_cli-0.1.0/src/memu/embedding/__init__.py +32 -0
- memu_cli-0.1.0/src/memu/embedding/backends/__init__.py +16 -0
- memu_cli-0.1.0/src/memu/embedding/backends/base.py +29 -0
- memu_cli-0.1.0/src/memu/embedding/backends/doubao.py +72 -0
- memu_cli-0.1.0/src/memu/embedding/backends/jina.py +23 -0
- memu_cli-0.1.0/src/memu/embedding/backends/openai.py +18 -0
- memu_cli-0.1.0/src/memu/embedding/backends/openrouter.py +22 -0
- memu_cli-0.1.0/src/memu/embedding/backends/voyage.py +23 -0
- memu_cli-0.1.0/src/memu/embedding/base.py +26 -0
- memu_cli-0.1.0/src/memu/embedding/defaults.py +30 -0
- memu_cli-0.1.0/src/memu/embedding/gateway.py +78 -0
- memu_cli-0.1.0/src/memu/embedding/http_client.py +159 -0
- memu_cli-0.1.0/src/memu/embedding/openai_sdk.py +47 -0
- memu_cli-0.1.0/src/memu/env.py +131 -0
- memu_cli-0.1.0/src/memu/hosts/__init__.py +23 -0
- memu_cli-0.1.0/src/memu/hosts/base.py +90 -0
- memu_cli-0.1.0/src/memu/hosts/bridging/__init__.py +13 -0
- memu_cli-0.1.0/src/memu/hosts/bridging/instructions.py +181 -0
- memu_cli-0.1.0/src/memu/hosts/bridging/layout.py +73 -0
- memu_cli-0.1.0/src/memu/hosts/bridging/manifest.py +52 -0
- memu_cli-0.1.0/src/memu/hosts/bridging/pipeline.py +90 -0
- memu_cli-0.1.0/src/memu/hosts/bridging/recall_files.py +51 -0
- memu_cli-0.1.0/src/memu/hosts/bridging/resources.py +127 -0
- memu_cli-0.1.0/src/memu/hosts/bridging/transcripts.py +87 -0
- memu_cli-0.1.0/src/memu/hosts/codex/BRIDGING_TASK.md +117 -0
- memu_cli-0.1.0/src/memu/hosts/codex/INSTALL.md +212 -0
- memu_cli-0.1.0/src/memu/hosts/codex/__init__.py +10 -0
- memu_cli-0.1.0/src/memu/hosts/codex/cli.py +167 -0
- memu_cli-0.1.0/src/memu/hosts/codex/sessions.py +52 -0
- memu_cli-0.1.0/src/memu/hosts/instruction.py +149 -0
- memu_cli-0.1.0/src/memu/hosts/retrieval.py +51 -0
- memu_cli-0.1.0/src/memu/integrations/__init__.py +3 -0
- memu_cli-0.1.0/src/memu/integrations/langgraph.py +163 -0
- memu_cli-0.1.0/src/memu/llm/anthropic_client.py +149 -0
- memu_cli-0.1.0/src/memu/llm/backends/__init__.py +21 -0
- memu_cli-0.1.0/src/memu/llm/backends/base.py +43 -0
- memu_cli-0.1.0/src/memu/llm/backends/claude.py +84 -0
- memu_cli-0.1.0/src/memu/llm/backends/deepseek.py +14 -0
- memu_cli-0.1.0/src/memu/llm/backends/doubao.py +69 -0
- memu_cli-0.1.0/src/memu/llm/backends/grok.py +11 -0
- memu_cli-0.1.0/src/memu/llm/backends/kimi.py +14 -0
- memu_cli-0.1.0/src/memu/llm/backends/minimax.py +14 -0
- memu_cli-0.1.0/src/memu/llm/backends/openai.py +70 -0
- memu_cli-0.1.0/src/memu/llm/backends/openrouter.py +70 -0
- memu_cli-0.1.0/src/memu/llm/gateway.py +90 -0
- memu_cli-0.1.0/src/memu/llm/http_client.py +232 -0
- memu_cli-0.1.0/src/memu/llm/lazyllm_client.py +159 -0
- memu_cli-0.1.0/src/memu/llm/openai_client.py +202 -0
- memu_cli-0.1.0/src/memu/llm/wrapper.py +804 -0
- memu_cli-0.1.0/src/memu/memory_fs/__init__.py +23 -0
- memu_cli-0.1.0/src/memu/memory_fs/exporter.py +489 -0
- memu_cli-0.1.0/src/memu/memory_fs/synthesizer.py +115 -0
- memu_cli-0.1.0/src/memu/preprocess/__init__.py +99 -0
- memu_cli-0.1.0/src/memu/preprocess/audio.py +83 -0
- memu_cli-0.1.0/src/memu/preprocess/base.py +84 -0
- memu_cli-0.1.0/src/memu/preprocess/conversation.py +42 -0
- memu_cli-0.1.0/src/memu/preprocess/document.py +36 -0
- memu_cli-0.1.0/src/memu/preprocess/image.py +34 -0
- memu_cli-0.1.0/src/memu/preprocess/video.py +60 -0
- memu_cli-0.1.0/src/memu/prompts/__init__.py +13 -0
- memu_cli-0.1.0/src/memu/prompts/category_patch/__init__.py +7 -0
- memu_cli-0.1.0/src/memu/prompts/category_patch/category.py +45 -0
- memu_cli-0.1.0/src/memu/prompts/category_summary/__init__.py +22 -0
- memu_cli-0.1.0/src/memu/prompts/category_summary/category.py +296 -0
- memu_cli-0.1.0/src/memu/prompts/category_summary/category_with_refs.py +140 -0
- memu_cli-0.1.0/src/memu/prompts/memory_fs/__init__.py +213 -0
- memu_cli-0.1.0/src/memu/prompts/memory_type/__init__.py +46 -0
- memu_cli-0.1.0/src/memu/prompts/memory_type/behavior.py +176 -0
- memu_cli-0.1.0/src/memu/prompts/memory_type/event.py +182 -0
- memu_cli-0.1.0/src/memu/prompts/memory_type/knowledge.py +172 -0
- memu_cli-0.1.0/src/memu/prompts/memory_type/profile.py +190 -0
- memu_cli-0.1.0/src/memu/prompts/memory_type/skill.py +580 -0
- memu_cli-0.1.0/src/memu/prompts/memory_type/tool.py +120 -0
- memu_cli-0.1.0/src/memu/prompts/preprocess/__init__.py +11 -0
- memu_cli-0.1.0/src/memu/prompts/preprocess/audio.py +62 -0
- memu_cli-0.1.0/src/memu/prompts/preprocess/conversation.py +43 -0
- memu_cli-0.1.0/src/memu/prompts/preprocess/document.py +35 -0
- memu_cli-0.1.0/src/memu/prompts/preprocess/image.py +34 -0
- memu_cli-0.1.0/src/memu/prompts/preprocess/video.py +35 -0
- memu_cli-0.1.0/src/memu/prompts/retrieve/__init__.py +0 -0
- memu_cli-0.1.0/src/memu/prompts/retrieve/judger.py +39 -0
- memu_cli-0.1.0/src/memu/prompts/retrieve/llm_category_ranker.py +35 -0
- memu_cli-0.1.0/src/memu/prompts/retrieve/llm_item_ranker.py +40 -0
- memu_cli-0.1.0/src/memu/prompts/retrieve/llm_resource_ranker.py +40 -0
- memu_cli-0.1.0/src/memu/prompts/retrieve/pre_retrieval_decision.py +53 -0
- memu_cli-0.1.0/src/memu/prompts/retrieve/query_rewriter.py +44 -0
- memu_cli-0.1.0/src/memu/prompts/retrieve/query_rewriter_judger.py +48 -0
- memu_cli-0.1.0/src/memu/utils/__init__.py +5 -0
- memu_cli-0.1.0/src/memu/utils/conversation.py +89 -0
- memu_cli-0.1.0/src/memu/utils/references.py +172 -0
- memu_cli-0.1.0/src/memu/utils/tool.py +102 -0
- memu_cli-0.1.0/src/memu/utils/video.py +271 -0
- memu_cli-0.1.0/src/memu/vector.py +145 -0
- memu_cli-0.1.0/src/memu/vlm/__init__.py +24 -0
- memu_cli-0.1.0/src/memu/vlm/anthropic_client.py +80 -0
- memu_cli-0.1.0/src/memu/vlm/backends/__init__.py +19 -0
- memu_cli-0.1.0/src/memu/vlm/backends/base.py +65 -0
- memu_cli-0.1.0/src/memu/vlm/backends/claude.py +69 -0
- memu_cli-0.1.0/src/memu/vlm/backends/doubao.py +10 -0
- memu_cli-0.1.0/src/memu/vlm/backends/grok.py +9 -0
- memu_cli-0.1.0/src/memu/vlm/backends/kimi.py +9 -0
- memu_cli-0.1.0/src/memu/vlm/backends/minimax.py +10 -0
- memu_cli-0.1.0/src/memu/vlm/backends/openai.py +79 -0
- memu_cli-0.1.0/src/memu/vlm/backends/openrouter.py +19 -0
- memu_cli-0.1.0/src/memu/vlm/base.py +84 -0
- memu_cli-0.1.0/src/memu/vlm/defaults.py +30 -0
- memu_cli-0.1.0/src/memu/vlm/gateway.py +71 -0
- memu_cli-0.1.0/src/memu/vlm/http_client.py +142 -0
- memu_cli-0.1.0/src/memu/vlm/openai_client.py +76 -0
- memu_cli-0.1.0/src/memu/workflow/__init__.py +29 -0
- memu_cli-0.1.0/src/memu/workflow/interceptor.py +218 -0
- memu_cli-0.1.0/src/memu/workflow/pipeline.py +170 -0
- memu_cli-0.1.0/src/memu/workflow/runner.py +81 -0
- memu_cli-0.1.0/src/memu/workflow/step.py +101 -0
- memu_cli-0.1.0/tests/__init__.py +0 -0
- memu_cli-0.1.0/tests/example/example_conversation.json +704 -0
- memu_cli-0.1.0/tests/integrations/test_langgraph.py +80 -0
- memu_cli-0.1.0/tests/llm/test_grok_provider.py +45 -0
- memu_cli-0.1.0/tests/rust_entry_test.py +5 -0
- memu_cli-0.1.0/tests/test_audio_preprocess.py +96 -0
- memu_cli-0.1.0/tests/test_backend_conformance.py +376 -0
- memu_cli-0.1.0/tests/test_cli.py +65 -0
- memu_cli-0.1.0/tests/test_conversation_preprocess.py +60 -0
- memu_cli-0.1.0/tests/test_document_text.py +101 -0
- memu_cli-0.1.0/tests/test_embedding.py +170 -0
- memu_cli-0.1.0/tests/test_folder_memorize.py +295 -0
- memu_cli-0.1.0/tests/test_host_instruction.py +91 -0
- memu_cli-0.1.0/tests/test_inmemory.py +89 -0
- memu_cli-0.1.0/tests/test_lazyllm.py +97 -0
- memu_cli-0.1.0/tests/test_memory_files.py +164 -0
- memu_cli-0.1.0/tests/test_memory_fs_synthesis.py +256 -0
- memu_cli-0.1.0/tests/test_openai_max_tokens.py +76 -0
- memu_cli-0.1.0/tests/test_openrouter.py +161 -0
- memu_cli-0.1.0/tests/test_postgres.py +82 -0
- memu_cli-0.1.0/tests/test_postgres_migration_config.py +31 -0
- memu_cli-0.1.0/tests/test_references.py +191 -0
- memu_cli-0.1.0/tests/test_salience.py +209 -0
- memu_cli-0.1.0/tests/test_skill_track.py +247 -0
- memu_cli-0.1.0/tests/test_sqlite.py +90 -0
- memu_cli-0.1.0/tests/test_tool_memory.py +327 -0
- memu_cli-0.1.0/tests/test_vector.py +28 -0
- memu_cli-0.1.0/tests/test_vlm_preprocess.py +217 -0
- memu_cli-0.1.0/tests/utils/test_conversation.py +91 -0
- memu_cli-0.1.0/uv.lock +2912 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: memu
|
|
3
|
+
description: Give this agent persistent memory via memU. Use to memorize (save files/folders so context survives this session) when the user asks to remember or sync something, or after completing work worth keeping; and to retrieve (search memory from earlier sessions) when the user asks what is known about a person/project/topic or references context not in this conversation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# memU: memorize and retrieve persistent memory
|
|
7
|
+
|
|
8
|
+
memU compiles sources into a persistent local store (`./data/memu.sqlite3` + a browsable `./data/memory/` markdown tree, relative to CWD). What one session memorizes, the next can retrieve — always run from the project root so every command hits the same store.
|
|
9
|
+
|
|
10
|
+
Use only the two commands below. Do not use the legacy `memu memorize` / `memu retrieve` commands.
|
|
11
|
+
|
|
12
|
+
Both directions need an API key: make sure `OPENAI_API_KEY` (or `MEMU_LLM_PROVIDER` + its matching key) is set, and tell the user if it is missing.
|
|
13
|
+
|
|
14
|
+
## Locate the CLI
|
|
15
|
+
|
|
16
|
+
Use the first available runner:
|
|
17
|
+
|
|
18
|
+
1. `memu` (installed via `pip install memu-py`)
|
|
19
|
+
2. `uvx --from memu-py memu`
|
|
20
|
+
3. `npx memu-cli`
|
|
21
|
+
|
|
22
|
+
## Memorize
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
memu memorize-workspace <folder>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
- Incremental and safe to re-run: diffs against `<folder>/.memu_manifest.json`, so only added/modified files are processed and memory from deleted files is removed.
|
|
29
|
+
- Top-level directory decides the treatment: `chat/` → memory topics, `agent/` → skills, everything else → indexed workspace context (modality inferred per file from its extension).
|
|
30
|
+
- To memorize a single file, place (or copy) it into the workspace folder and sync — there is no separate single-file path.
|
|
31
|
+
|
|
32
|
+
Report the printed diff (added/modified/deleted) to the user; pass `--json` if you need to parse the result.
|
|
33
|
+
|
|
34
|
+
## Retrieve
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
memu retrieve-workspace "<query>"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Single-shot embedding search, no LLM calls. Returns JSON in three layers:
|
|
41
|
+
|
|
42
|
+
- `segments` — the matched slices, ranked by similarity (check `score`)
|
|
43
|
+
- `files` — the memory/skill documents they belong to (usually what you want)
|
|
44
|
+
- `resources` — matching raw sources, when summaries are not enough
|
|
45
|
+
|
|
46
|
+
If a query misses, retry with different phrasing or more specific terms. Low scores across the board usually mean nothing relevant is stored — say so rather than stretching weak matches. You can also read `./data/memory/MEMORY.md` / `SKILL.md` / `INDEX.md` directly for a browsable overview.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
name: Bug Report
|
|
2
|
+
description: Report a bug or issue with memU
|
|
3
|
+
title: "[BUG] "
|
|
4
|
+
labels: ["bug"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thanks for taking the time to report a bug in memU! Please fill in the following details.
|
|
10
|
+
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: description
|
|
13
|
+
attributes:
|
|
14
|
+
label: Description
|
|
15
|
+
description: A clear and detailed description of the bug.
|
|
16
|
+
placeholder: "Enter a clear and concise description of what the bug is."
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
|
|
20
|
+
- type: input
|
|
21
|
+
id: environment
|
|
22
|
+
attributes:
|
|
23
|
+
label: Environment
|
|
24
|
+
description: The environment where this bug occurred (e.g., operating system, CPU arch, etc.).
|
|
25
|
+
placeholder: "Enter details about the environment."
|
|
26
|
+
validations:
|
|
27
|
+
required: true
|
|
28
|
+
|
|
29
|
+
- type: textarea
|
|
30
|
+
id: steps
|
|
31
|
+
attributes:
|
|
32
|
+
label: Steps to reproduce
|
|
33
|
+
description: What are the steps to reproduce this issue?
|
|
34
|
+
placeholder: "Enter step-by-step instructions to reproduce the issue."
|
|
35
|
+
validations:
|
|
36
|
+
required: true
|
|
37
|
+
|
|
38
|
+
- type: textarea
|
|
39
|
+
id: expected
|
|
40
|
+
attributes:
|
|
41
|
+
label: Expected behavior
|
|
42
|
+
description: What should have happened instead?
|
|
43
|
+
placeholder: "Describe what you expected to happen."
|
|
44
|
+
validations:
|
|
45
|
+
required: true
|
|
46
|
+
|
|
47
|
+
- type: input
|
|
48
|
+
id: version
|
|
49
|
+
attributes:
|
|
50
|
+
label: Version
|
|
51
|
+
description: What version of memU are you using?
|
|
52
|
+
placeholder: e.g., v1.0.0
|
|
53
|
+
validations:
|
|
54
|
+
required: true
|
|
55
|
+
|
|
56
|
+
- type: dropdown
|
|
57
|
+
id: severity
|
|
58
|
+
attributes:
|
|
59
|
+
label: Severity
|
|
60
|
+
description: How severe is the bug?
|
|
61
|
+
options:
|
|
62
|
+
- Critical
|
|
63
|
+
- Major
|
|
64
|
+
- Minor
|
|
65
|
+
validations:
|
|
66
|
+
required: true
|
|
67
|
+
|
|
68
|
+
- type: textarea
|
|
69
|
+
id: additional_info
|
|
70
|
+
attributes:
|
|
71
|
+
label: Additional Information
|
|
72
|
+
description: Any other context or screenshots related to the bug.
|
|
73
|
+
placeholder: "Enter additional context or information."
|
|
74
|
+
validations:
|
|
75
|
+
required: false
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: GitHub Discussions
|
|
4
|
+
url: https://github.com/NevaMind-AI/memU/discussions
|
|
5
|
+
about: For questions and general discussions about memU
|
|
6
|
+
- name: Documentation
|
|
7
|
+
url: https://github.com/NevaMind-AI/memU/blob/main/README.md
|
|
8
|
+
about: Check out the memU documentation
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
name: Feature Request
|
|
2
|
+
description: Request a feature for memU
|
|
3
|
+
title: "[FEATURE] "
|
|
4
|
+
labels: ["enhancement"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thanks for taking the time to request a feature for memU! Please fill in the following details.
|
|
10
|
+
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: description
|
|
13
|
+
attributes:
|
|
14
|
+
label: Description
|
|
15
|
+
description: A clear and detailed description of the feature request.
|
|
16
|
+
placeholder: "Enter a clear and concise description of what the feature request is."
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: motivation
|
|
22
|
+
attributes:
|
|
23
|
+
label: Motivation
|
|
24
|
+
description: Why do we need this feature? What problem does it solve?
|
|
25
|
+
placeholder: "Explain the use case and why this feature would be valuable."
|
|
26
|
+
validations:
|
|
27
|
+
required: true
|
|
28
|
+
|
|
29
|
+
- type: dropdown
|
|
30
|
+
id: platform
|
|
31
|
+
attributes:
|
|
32
|
+
label: Platform
|
|
33
|
+
description: Which platform(s) does this feature apply to?
|
|
34
|
+
options:
|
|
35
|
+
- Platform Independent
|
|
36
|
+
- Linux
|
|
37
|
+
- macOS
|
|
38
|
+
- Windows
|
|
39
|
+
validations:
|
|
40
|
+
required: true
|
|
41
|
+
|
|
42
|
+
- type: dropdown
|
|
43
|
+
id: priority
|
|
44
|
+
attributes:
|
|
45
|
+
label: Priority
|
|
46
|
+
description: How important is this feature?
|
|
47
|
+
options:
|
|
48
|
+
- Critical
|
|
49
|
+
- Major
|
|
50
|
+
- Minor
|
|
51
|
+
validations:
|
|
52
|
+
required: true
|
|
53
|
+
|
|
54
|
+
- type: textarea
|
|
55
|
+
id: additional_info
|
|
56
|
+
attributes:
|
|
57
|
+
label: Additional Information
|
|
58
|
+
description: Any other context or screenshots related to the feature request.
|
|
59
|
+
placeholder: "Enter additional context or information."
|
|
60
|
+
validations:
|
|
61
|
+
required: false
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
name: Hackathon Task
|
|
2
|
+
description: The official designated task for the memU track in the 2026 New Year Challenge
|
|
3
|
+
title: "[2026NewYearChallenge] "
|
|
4
|
+
labels: ["hackathon-task"]
|
|
5
|
+
assignees: []
|
|
6
|
+
body:
|
|
7
|
+
- type: markdown
|
|
8
|
+
attributes:
|
|
9
|
+
value: |
|
|
10
|
+
Thank you for taking the time to join the challenge, and best of luck!
|
|
11
|
+
|
|
12
|
+
- type: dropdown
|
|
13
|
+
id: label_hint
|
|
14
|
+
attributes:
|
|
15
|
+
label: Label
|
|
16
|
+
description: Pick the most appropriate label for this task.
|
|
17
|
+
options:
|
|
18
|
+
- hackathon-task
|
|
19
|
+
validations:
|
|
20
|
+
required: true
|
|
21
|
+
|
|
22
|
+
- type: input
|
|
23
|
+
id: assignees_hint
|
|
24
|
+
attributes:
|
|
25
|
+
label: Assignees
|
|
26
|
+
description: GitHub usernames to assign (comma-separated). If empty, maintainers will triage.
|
|
27
|
+
placeholder: "e.g., alice,bob"
|
|
28
|
+
validations:
|
|
29
|
+
required: false
|
|
30
|
+
|
|
31
|
+
- type: textarea
|
|
32
|
+
id: description
|
|
33
|
+
attributes:
|
|
34
|
+
label: Description*
|
|
35
|
+
description: What will this task implement?
|
|
36
|
+
placeholder: "Enter a clear and concise description of the task you want to implement."
|
|
37
|
+
validations:
|
|
38
|
+
required: true
|
|
39
|
+
|
|
40
|
+
- type: textarea
|
|
41
|
+
id: requirements
|
|
42
|
+
attributes:
|
|
43
|
+
label: Requirements (optional)
|
|
44
|
+
description: What will your planned pull request include? (APIs, modules, tests, docs, etc.)
|
|
45
|
+
placeholder: |
|
|
46
|
+
- [ ] Implementation details
|
|
47
|
+
- [ ] Tests
|
|
48
|
+
- [ ] Docs / examples
|
|
49
|
+
- [ ] Compatibility notes
|
|
50
|
+
validations:
|
|
51
|
+
required: false
|
|
52
|
+
|
|
53
|
+
- type: textarea
|
|
54
|
+
id: review_criteria
|
|
55
|
+
attributes:
|
|
56
|
+
label: Review Criteria (optional)
|
|
57
|
+
description: How will this task be evaluated?
|
|
58
|
+
placeholder: |
|
|
59
|
+
Example:
|
|
60
|
+
- Correctness (passes tests, no regressions)
|
|
61
|
+
- Quality (readability, modularity)
|
|
62
|
+
- DX (good docs / examples)
|
|
63
|
+
- Impact (useful for memU users)
|
|
64
|
+
validations:
|
|
65
|
+
required: false
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
name: Improvement Suggestion
|
|
2
|
+
description: Suggest an improvement for memU
|
|
3
|
+
title: "[IMPROVEMENT] "
|
|
4
|
+
labels: ["enhancement", "improvement"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thanks for taking the time to suggest an improvement for memU! Please fill in the following details.
|
|
10
|
+
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: description
|
|
13
|
+
attributes:
|
|
14
|
+
label: Description
|
|
15
|
+
description: A clear and detailed description of the improvement suggestion.
|
|
16
|
+
placeholder: "Enter a clear and concise description of what you'd like to improve."
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: current_behavior
|
|
22
|
+
attributes:
|
|
23
|
+
label: Current Behavior
|
|
24
|
+
description: How does it work currently?
|
|
25
|
+
placeholder: "Describe the current behavior or implementation."
|
|
26
|
+
validations:
|
|
27
|
+
required: false
|
|
28
|
+
|
|
29
|
+
- type: textarea
|
|
30
|
+
id: proposed_improvement
|
|
31
|
+
attributes:
|
|
32
|
+
label: Proposed Improvement
|
|
33
|
+
description: How would you like it to work?
|
|
34
|
+
placeholder: "Describe your proposed improvement."
|
|
35
|
+
validations:
|
|
36
|
+
required: true
|
|
37
|
+
|
|
38
|
+
- type: textarea
|
|
39
|
+
id: benefits
|
|
40
|
+
attributes:
|
|
41
|
+
label: Benefits
|
|
42
|
+
description: What are the benefits of this improvement?
|
|
43
|
+
placeholder: "Explain why this improvement would be valuable."
|
|
44
|
+
validations:
|
|
45
|
+
required: false
|
|
46
|
+
|
|
47
|
+
- type: input
|
|
48
|
+
id: version
|
|
49
|
+
attributes:
|
|
50
|
+
label: Version
|
|
51
|
+
description: What version of memU are you using?
|
|
52
|
+
placeholder: e.g., v1.0.0
|
|
53
|
+
validations:
|
|
54
|
+
required: false
|
|
55
|
+
|
|
56
|
+
- type: textarea
|
|
57
|
+
id: additional_info
|
|
58
|
+
attributes:
|
|
59
|
+
label: Additional Information
|
|
60
|
+
description: Any other context or screenshots related to the improvement.
|
|
61
|
+
placeholder: "Enter additional context or information."
|
|
62
|
+
validations:
|
|
63
|
+
required: false
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
## 📝 Pull Request Summary
|
|
2
|
+
|
|
3
|
+
Please provide a short summary explaining the purpose of this PR.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## ✅ What does this PR do?
|
|
8
|
+
- Clearly describe the change introduced.
|
|
9
|
+
- Mention the motivation or problem it solves.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 🤔 Why is this change needed?
|
|
14
|
+
- Explain the context or user impact.
|
|
15
|
+
- Link any relevant issue or discussion.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 🔍 Type of Change
|
|
20
|
+
Please check what applies:
|
|
21
|
+
|
|
22
|
+
- [ ] Bug fix
|
|
23
|
+
- [ ] New feature
|
|
24
|
+
- [ ] Documentation update
|
|
25
|
+
- [ ] Refactor / cleanup
|
|
26
|
+
- [ ] Other (please explain)
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## ✅ PR Quality Checklist
|
|
31
|
+
|
|
32
|
+
- [ ] PR title follows an allowed format (for example `feat:`, `fix:`, `docs:`, `memory base:`)
|
|
33
|
+
- [ ] Changes are limited in scope and easy to review
|
|
34
|
+
- [ ] Documentation updated where applicable
|
|
35
|
+
- [ ] No breaking changes (or clearly documented)
|
|
36
|
+
- [ ] Related issues or discussions linked
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 📌 Optional
|
|
41
|
+
|
|
42
|
+
- [ ] Screenshots or examples added (if applicable)
|
|
43
|
+
- [ ] Edge cases considered
|
|
44
|
+
- [ ] Follow-up tasks mentioned
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: build
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
build:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
|
|
9
|
+
strategy:
|
|
10
|
+
matrix:
|
|
11
|
+
python-version: ["3.13"]
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v6
|
|
15
|
+
|
|
16
|
+
- name: Install uv & set Python
|
|
17
|
+
uses: astral-sh/setup-uv@v7
|
|
18
|
+
with:
|
|
19
|
+
python-version: ${{ matrix.python-version }}
|
|
20
|
+
enable-cache: true
|
|
21
|
+
cache-python: true
|
|
22
|
+
|
|
23
|
+
- name: Ensure Python ${{ matrix.python-version }}
|
|
24
|
+
run: uv python install ${{ matrix.python-version }}
|
|
25
|
+
|
|
26
|
+
- name: Sync dependencies
|
|
27
|
+
run: |
|
|
28
|
+
uv sync --frozen --extra document
|
|
29
|
+
uv run pre-commit install
|
|
30
|
+
|
|
31
|
+
- name: Run style checks
|
|
32
|
+
run: uv run make check
|
|
33
|
+
|
|
34
|
+
- name: Run tests
|
|
35
|
+
run: uv run make test
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: pr-title
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request_target:
|
|
5
|
+
types:
|
|
6
|
+
- opened
|
|
7
|
+
- edited
|
|
8
|
+
- reopened
|
|
9
|
+
- synchronize
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
statuses: write
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
validate:
|
|
17
|
+
name: Validate PR title
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- uses: amannn/action-semantic-pull-request@v6
|
|
21
|
+
env:
|
|
22
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
23
|
+
with:
|
|
24
|
+
headerPattern: '^([\w ]*)(?:\(([\w$.\-*/ ]*)\))?: (.*)$'
|
|
25
|
+
headerPatternCorrespondence: type, scope, subject
|
|
26
|
+
types: |
|
|
27
|
+
build
|
|
28
|
+
chore
|
|
29
|
+
ci
|
|
30
|
+
docs
|
|
31
|
+
feat
|
|
32
|
+
fix
|
|
33
|
+
memory base
|
|
34
|
+
perf
|
|
35
|
+
refactor
|
|
36
|
+
revert
|
|
37
|
+
style
|
|
38
|
+
test
|
|
39
|
+
- name: Disallow trailing ellipsis
|
|
40
|
+
shell: bash
|
|
41
|
+
env:
|
|
42
|
+
PR_TITLE: ${{ github.event.pull_request.title }}
|
|
43
|
+
run: |
|
|
44
|
+
if [[ "$PR_TITLE" == *... ]]; then
|
|
45
|
+
echo "::error title=Invalid PR title::PR title must not end with an ellipsis (...)"
|
|
46
|
+
exit 1
|
|
47
|
+
fi
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
on:
|
|
2
|
+
push:
|
|
3
|
+
branches:
|
|
4
|
+
- main
|
|
5
|
+
|
|
6
|
+
permissions:
|
|
7
|
+
contents: write
|
|
8
|
+
issues: write
|
|
9
|
+
pull-requests: write
|
|
10
|
+
|
|
11
|
+
name: release-please
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
release-please:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
outputs:
|
|
17
|
+
releases_created: ${{ steps.release.outputs.releases_created }}
|
|
18
|
+
tag_name: ${{ steps.release.outputs.tag_name }}
|
|
19
|
+
steps:
|
|
20
|
+
- uses: googleapis/release-please-action@v4
|
|
21
|
+
id: release
|
|
22
|
+
with:
|
|
23
|
+
release-type: python
|
|
24
|
+
target-branch: main
|
|
25
|
+
|
|
26
|
+
build-wheels:
|
|
27
|
+
name: build wheels (${{ matrix.label }})
|
|
28
|
+
runs-on: ${{ matrix.os }}
|
|
29
|
+
needs: release-please
|
|
30
|
+
if: ${{ needs.release-please.outputs.releases_created == 'true' && needs.release-please.outputs.tag_name != '' }}
|
|
31
|
+
strategy:
|
|
32
|
+
fail-fast: false
|
|
33
|
+
matrix:
|
|
34
|
+
include:
|
|
35
|
+
- os: ubuntu-latest
|
|
36
|
+
label: linux-x86_64
|
|
37
|
+
target: x86_64-unknown-linux-gnu
|
|
38
|
+
extra-args: "--compatibility manylinux_2_39"
|
|
39
|
+
python-version: "3.13"
|
|
40
|
+
- os: ubuntu-latest
|
|
41
|
+
label: linux-aarch64
|
|
42
|
+
target: aarch64-unknown-linux-gnu
|
|
43
|
+
extra-args: "--compatibility manylinux_2_39"
|
|
44
|
+
python-version: "3.13"
|
|
45
|
+
- os: macos-15-intel
|
|
46
|
+
label: macos-x86_64
|
|
47
|
+
target: ""
|
|
48
|
+
extra-args: ""
|
|
49
|
+
python-version: "3.13"
|
|
50
|
+
- os: macos-latest
|
|
51
|
+
label: macos-aarch64
|
|
52
|
+
target: ""
|
|
53
|
+
extra-args: ""
|
|
54
|
+
python-version: "3.13"
|
|
55
|
+
- os: windows-latest
|
|
56
|
+
label: windows-x86_64
|
|
57
|
+
target: ""
|
|
58
|
+
extra-args: ""
|
|
59
|
+
python-version: "3.13"
|
|
60
|
+
steps:
|
|
61
|
+
- uses: actions/checkout@v6
|
|
62
|
+
|
|
63
|
+
- name: Install uv
|
|
64
|
+
uses: astral-sh/setup-uv@v7
|
|
65
|
+
with:
|
|
66
|
+
python-version: ${{ matrix.python-version }}
|
|
67
|
+
|
|
68
|
+
- name: Install maturin
|
|
69
|
+
run: uv tool install maturin
|
|
70
|
+
|
|
71
|
+
- name: Setup Rust
|
|
72
|
+
uses: dtolnay/rust-toolchain@stable
|
|
73
|
+
with:
|
|
74
|
+
targets: ${{ matrix.target }}
|
|
75
|
+
|
|
76
|
+
- name: Setup cross-compilation for Linux ARM64
|
|
77
|
+
if: matrix.label == 'linux-aarch64'
|
|
78
|
+
run: |
|
|
79
|
+
sudo apt-get update
|
|
80
|
+
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
|
|
81
|
+
|
|
82
|
+
- name: Build wheel
|
|
83
|
+
run: uvx maturin build --release --out dist ${{ matrix.extra-args }} ${{ matrix.target && format('--target {0}', matrix.target) || '' }}
|
|
84
|
+
env:
|
|
85
|
+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
|
|
86
|
+
|
|
87
|
+
- name: Upload wheel artifact
|
|
88
|
+
uses: actions/upload-artifact@v6
|
|
89
|
+
with:
|
|
90
|
+
name: wheels-${{ matrix.label }}
|
|
91
|
+
path: dist/*.whl
|
|
92
|
+
if-no-files-found: error
|
|
93
|
+
|
|
94
|
+
build-sdist:
|
|
95
|
+
name: build sdist
|
|
96
|
+
runs-on: ubuntu-latest
|
|
97
|
+
needs: release-please
|
|
98
|
+
if: ${{ needs.release-please.outputs.releases_created == 'true' && needs.release-please.outputs.tag_name != '' }}
|
|
99
|
+
steps:
|
|
100
|
+
- uses: actions/checkout@v6
|
|
101
|
+
|
|
102
|
+
- name: Install uv
|
|
103
|
+
uses: astral-sh/setup-uv@v7
|
|
104
|
+
with:
|
|
105
|
+
python-version: "3.13"
|
|
106
|
+
|
|
107
|
+
- name: Setup Rust
|
|
108
|
+
uses: dtolnay/rust-toolchain@stable
|
|
109
|
+
|
|
110
|
+
- name: Install maturin
|
|
111
|
+
run: uv tool install maturin
|
|
112
|
+
|
|
113
|
+
- name: Build sdist
|
|
114
|
+
run: uvx maturin sdist --out dist
|
|
115
|
+
|
|
116
|
+
- name: Upload sdist artifact
|
|
117
|
+
uses: actions/upload-artifact@v6
|
|
118
|
+
with:
|
|
119
|
+
name: sdist
|
|
120
|
+
path: dist/*.tar.gz
|
|
121
|
+
if-no-files-found: error
|
|
122
|
+
|
|
123
|
+
publish:
|
|
124
|
+
name: publish release artifacts
|
|
125
|
+
runs-on: ubuntu-latest
|
|
126
|
+
needs:
|
|
127
|
+
- release-please
|
|
128
|
+
- build-wheels
|
|
129
|
+
- build-sdist
|
|
130
|
+
if: ${{ needs.release-please.outputs.releases_created == 'true' && needs.release-please.outputs.tag_name != '' }}
|
|
131
|
+
environment: pypi
|
|
132
|
+
permissions:
|
|
133
|
+
id-token: write
|
|
134
|
+
contents: write
|
|
135
|
+
steps:
|
|
136
|
+
- name: Download wheel artifacts
|
|
137
|
+
uses: actions/download-artifact@v7
|
|
138
|
+
with:
|
|
139
|
+
pattern: wheels-*
|
|
140
|
+
merge-multiple: true
|
|
141
|
+
path: dist
|
|
142
|
+
|
|
143
|
+
- name: Download sdist artifact
|
|
144
|
+
uses: actions/download-artifact@v7
|
|
145
|
+
with:
|
|
146
|
+
name: sdist
|
|
147
|
+
path: dist
|
|
148
|
+
|
|
149
|
+
- name: Upload binaries to release
|
|
150
|
+
uses: svenstaro/upload-release-action@v2
|
|
151
|
+
with:
|
|
152
|
+
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
153
|
+
file: dist/*
|
|
154
|
+
tag: ${{ needs.release-please.outputs.tag_name }}
|
|
155
|
+
file_glob: true
|
|
156
|
+
|
|
157
|
+
- name: Publish to PyPI
|
|
158
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
159
|
+
with:
|
|
160
|
+
packages-dir: dist/
|