people-context-mcp 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.
Files changed (193) hide show
  1. people_context_mcp-0.1.0/.claude-plugin/marketplace.json +36 -0
  2. people_context_mcp-0.1.0/.claude-plugin/mcp.json +14 -0
  3. people_context_mcp-0.1.0/.claude-plugin/plugin.json +22 -0
  4. people_context_mcp-0.1.0/.codegraph/.gitignore +16 -0
  5. people_context_mcp-0.1.0/.codegraph/config.json +143 -0
  6. people_context_mcp-0.1.0/.github/workflows/ci.yml +28 -0
  7. people_context_mcp-0.1.0/.github/workflows/claude-plugin-validate.yml +56 -0
  8. people_context_mcp-0.1.0/.github/workflows/package-publish.yml +67 -0
  9. people_context_mcp-0.1.0/.github/workflows/release.yml +47 -0
  10. people_context_mcp-0.1.0/.gitignore +29 -0
  11. people_context_mcp-0.1.0/AGENTS.md +39 -0
  12. people_context_mcp-0.1.0/LICENSE +21 -0
  13. people_context_mcp-0.1.0/PKG-INFO +224 -0
  14. people_context_mcp-0.1.0/README.md +195 -0
  15. people_context_mcp-0.1.0/docs/architecture.md +213 -0
  16. people_context_mcp-0.1.0/docs/claude-code-plugin.md +117 -0
  17. people_context_mcp-0.1.0/docs/cli.md +111 -0
  18. people_context_mcp-0.1.0/docs/communication-guidance.md +96 -0
  19. people_context_mcp-0.1.0/docs/data-model.md +124 -0
  20. people_context_mcp-0.1.0/docs/decisions/0001-python.md +47 -0
  21. people_context_mcp-0.1.0/docs/decisions/0002-sqlite.md +59 -0
  22. people_context_mcp-0.1.0/docs/decisions/0003-hexagonal-architecture.md +51 -0
  23. people_context_mcp-0.1.0/docs/decisions/0004-changelog-vs-audit-log.md +62 -0
  24. people_context_mcp-0.1.0/docs/decisions/0005-conflict-resolution-strategy.md +60 -0
  25. people_context_mcp-0.1.0/docs/design/sync.md +523 -0
  26. people_context_mcp-0.1.0/docs/identity-resolution.md +68 -0
  27. people_context_mcp-0.1.0/docs/import.md +128 -0
  28. people_context_mcp-0.1.0/docs/mcp-interface.md +141 -0
  29. people_context_mcp-0.1.0/docs/privacy-and-safety.md +174 -0
  30. people_context_mcp-0.1.0/docs/relationship-graph.md +136 -0
  31. people_context_mcp-0.1.0/docs/releasing.md +44 -0
  32. people_context_mcp-0.1.0/docs/roadmap.md +86 -0
  33. people_context_mcp-0.1.0/docs/vault-export.md +101 -0
  34. people_context_mcp-0.1.0/openclaw-plugin/README.md +138 -0
  35. people_context_mcp-0.1.0/openclaw-plugin/dist/index.d.ts +13 -0
  36. people_context_mcp-0.1.0/openclaw-plugin/dist/index.js +213 -0
  37. people_context_mcp-0.1.0/openclaw-plugin/openclaw.plugin.json +38 -0
  38. people_context_mcp-0.1.0/openclaw-plugin/package-lock.json +6691 -0
  39. people_context_mcp-0.1.0/openclaw-plugin/package.json +71 -0
  40. people_context_mcp-0.1.0/openclaw-plugin/src/index.test.ts +60 -0
  41. people_context_mcp-0.1.0/openclaw-plugin/src/index.ts +318 -0
  42. people_context_mcp-0.1.0/openclaw-plugin/tsconfig.json +18 -0
  43. people_context_mcp-0.1.0/openclaw-plugin/typebox.d.ts +4 -0
  44. people_context_mcp-0.1.0/openclaw-plugin/vitest.config.ts +8 -0
  45. people_context_mcp-0.1.0/pyproject.toml +62 -0
  46. people_context_mcp-0.1.0/src/people_context/__init__.py +3 -0
  47. people_context_mcp-0.1.0/src/people_context/__main__.py +8 -0
  48. people_context_mcp-0.1.0/src/people_context/adapters/__init__.py +1 -0
  49. people_context_mcp-0.1.0/src/people_context/adapters/email_import.py +170 -0
  50. people_context_mcp-0.1.0/src/people_context/adapters/filesystem/__init__.py +9 -0
  51. people_context_mcp-0.1.0/src/people_context/adapters/filesystem/vault_writer.py +236 -0
  52. people_context_mcp-0.1.0/src/people_context/adapters/mcp/__init__.py +7 -0
  53. people_context_mcp-0.1.0/src/people_context/adapters/mcp/security.py +17 -0
  54. people_context_mcp-0.1.0/src/people_context/adapters/mcp/server.py +306 -0
  55. people_context_mcp-0.1.0/src/people_context/adapters/mcp/tools/__init__.py +24 -0
  56. people_context_mcp-0.1.0/src/people_context/adapters/mcp/tools/graph.py +40 -0
  57. people_context_mcp-0.1.0/src/people_context/adapters/mcp/tools/imports.py +64 -0
  58. people_context_mcp-0.1.0/src/people_context/adapters/mcp/tools/lifecycle.py +47 -0
  59. people_context_mcp-0.1.0/src/people_context/adapters/mcp/tools/m2.py +301 -0
  60. people_context_mcp-0.1.0/src/people_context/adapters/mcp/tools/people.py +160 -0
  61. people_context_mcp-0.1.0/src/people_context/adapters/mcp/tools/portability.py +33 -0
  62. people_context_mcp-0.1.0/src/people_context/adapters/model2vec_embeddings.py +96 -0
  63. people_context_mcp-0.1.0/src/people_context/adapters/semantic_indexing.py +206 -0
  64. people_context_mcp-0.1.0/src/people_context/adapters/sqlite/__init__.py +59 -0
  65. people_context_mcp-0.1.0/src/people_context/adapters/sqlite/audit_log.py +83 -0
  66. people_context_mcp-0.1.0/src/people_context/adapters/sqlite/changelog.py +108 -0
  67. people_context_mcp-0.1.0/src/people_context/adapters/sqlite/context_reader.py +219 -0
  68. people_context_mcp-0.1.0/src/people_context/adapters/sqlite/db.py +87 -0
  69. people_context_mcp-0.1.0/src/people_context/adapters/sqlite/export_reader.py +89 -0
  70. people_context_mcp-0.1.0/src/people_context/adapters/sqlite/graph_reader.py +206 -0
  71. people_context_mcp-0.1.0/src/people_context/adapters/sqlite/hlc.py +74 -0
  72. people_context_mcp-0.1.0/src/people_context/adapters/sqlite/import_staging.py +66 -0
  73. people_context_mcp-0.1.0/src/people_context/adapters/sqlite/lifecycle.py +581 -0
  74. people_context_mcp-0.1.0/src/people_context/adapters/sqlite/migrations/001_initial.sql +170 -0
  75. people_context_mcp-0.1.0/src/people_context/adapters/sqlite/migrations/002_sync_foundations.sql +41 -0
  76. people_context_mcp-0.1.0/src/people_context/adapters/sqlite/migrations/003_relationship_vocabulary.sql +52 -0
  77. people_context_mcp-0.1.0/src/people_context/adapters/sqlite/migrations/004_curation_indexes.sql +11 -0
  78. people_context_mcp-0.1.0/src/people_context/adapters/sqlite/migrations/__init__.py +1 -0
  79. people_context_mcp-0.1.0/src/people_context/adapters/sqlite/record_store.py +421 -0
  80. people_context_mcp-0.1.0/src/people_context/adapters/sqlite/relationship_store.py +103 -0
  81. people_context_mcp-0.1.0/src/people_context/adapters/sqlite/relationship_vocabulary.py +77 -0
  82. people_context_mcp-0.1.0/src/people_context/adapters/sqlite/repository.py +237 -0
  83. people_context_mcp-0.1.0/src/people_context/adapters/sqlite/semantic.py +253 -0
  84. people_context_mcp-0.1.0/src/people_context/adapters/sqlite/unit_of_work.py +35 -0
  85. people_context_mcp-0.1.0/src/people_context/adapters/sqlite/vault_reader.py +116 -0
  86. people_context_mcp-0.1.0/src/people_context/adapters/vcard_import.py +277 -0
  87. people_context_mcp-0.1.0/src/people_context/app/__init__.py +207 -0
  88. people_context_mcp-0.1.0/src/people_context/app/add_alias.py +67 -0
  89. people_context_mcp-0.1.0/src/people_context/app/add_relationship_type.py +105 -0
  90. people_context_mcp-0.1.0/src/people_context/app/complete_reminder.py +77 -0
  91. people_context_mcp-0.1.0/src/people_context/app/correct_record.py +141 -0
  92. people_context_mcp-0.1.0/src/people_context/app/edit_person.py +89 -0
  93. people_context_mcp-0.1.0/src/people_context/app/export_data.py +42 -0
  94. people_context_mcp-0.1.0/src/people_context/app/export_vault.py +37 -0
  95. people_context_mcp-0.1.0/src/people_context/app/forget.py +143 -0
  96. people_context_mcp-0.1.0/src/people_context/app/get_communication_guidance.py +115 -0
  97. people_context_mcp-0.1.0/src/people_context/app/get_person_context.py +178 -0
  98. people_context_mcp-0.1.0/src/people_context/app/import_content.py +546 -0
  99. people_context_mcp-0.1.0/src/people_context/app/list_reminders.py +33 -0
  100. people_context_mcp-0.1.0/src/people_context/app/merge_people.py +137 -0
  101. people_context_mcp-0.1.0/src/people_context/app/normalize_relationships.py +128 -0
  102. people_context_mcp-0.1.0/src/people_context/app/person_context_models.py +40 -0
  103. people_context_mcp-0.1.0/src/people_context/app/record.py +172 -0
  104. people_context_mcp-0.1.0/src/people_context/app/record_fact.py +76 -0
  105. people_context_mcp-0.1.0/src/people_context/app/record_interaction.py +74 -0
  106. people_context_mcp-0.1.0/src/people_context/app/record_observation.py +70 -0
  107. people_context_mcp-0.1.0/src/people_context/app/record_trait.py +73 -0
  108. people_context_mcp-0.1.0/src/people_context/app/reindex_people.py +25 -0
  109. people_context_mcp-0.1.0/src/people_context/app/reindex_semantic.py +54 -0
  110. people_context_mcp-0.1.0/src/people_context/app/relationship_graph.py +183 -0
  111. people_context_mcp-0.1.0/src/people_context/app/relationship_policy.py +71 -0
  112. people_context_mcp-0.1.0/src/people_context/app/resolve_person.py +174 -0
  113. people_context_mcp-0.1.0/src/people_context/app/search_people.py +27 -0
  114. people_context_mcp-0.1.0/src/people_context/app/semantic_indexing.py +40 -0
  115. people_context_mcp-0.1.0/src/people_context/app/semantic_search.py +172 -0
  116. people_context_mcp-0.1.0/src/people_context/app/set_affiliation.py +108 -0
  117. people_context_mcp-0.1.0/src/people_context/app/set_communication_philosophy.py +56 -0
  118. people_context_mcp-0.1.0/src/people_context/app/set_relationship.py +168 -0
  119. people_context_mcp-0.1.0/src/people_context/app/set_reminder.py +77 -0
  120. people_context_mcp-0.1.0/src/people_context/app/write_support.py +212 -0
  121. people_context_mcp-0.1.0/src/people_context/cli.py +600 -0
  122. people_context_mcp-0.1.0/src/people_context/config.py +136 -0
  123. people_context_mcp-0.1.0/src/people_context/domain/__init__.py +48 -0
  124. people_context_mcp-0.1.0/src/people_context/domain/fact.py +23 -0
  125. people_context_mcp-0.1.0/src/people_context/domain/interaction.py +21 -0
  126. people_context_mcp-0.1.0/src/people_context/domain/observation.py +20 -0
  127. people_context_mcp-0.1.0/src/people_context/domain/organization.py +30 -0
  128. people_context_mcp-0.1.0/src/people_context/domain/person.py +54 -0
  129. people_context_mcp-0.1.0/src/people_context/domain/preferences.py +18 -0
  130. people_context_mcp-0.1.0/src/people_context/domain/relationship.py +23 -0
  131. people_context_mcp-0.1.0/src/people_context/domain/relationship_graph.py +39 -0
  132. people_context_mcp-0.1.0/src/people_context/domain/relationship_vocabulary.py +46 -0
  133. people_context_mcp-0.1.0/src/people_context/domain/reminder.py +39 -0
  134. people_context_mcp-0.1.0/src/people_context/domain/shared.py +78 -0
  135. people_context_mcp-0.1.0/src/people_context/domain/trait.py +35 -0
  136. people_context_mcp-0.1.0/src/people_context/domain/vault.py +81 -0
  137. people_context_mcp-0.1.0/src/people_context/ports/__init__.py +64 -0
  138. people_context_mcp-0.1.0/src/people_context/ports/audit_log.py +38 -0
  139. people_context_mcp-0.1.0/src/people_context/ports/changelog.py +41 -0
  140. people_context_mcp-0.1.0/src/people_context/ports/clock.py +20 -0
  141. people_context_mcp-0.1.0/src/people_context/ports/context.py +52 -0
  142. people_context_mcp-0.1.0/src/people_context/ports/export.py +30 -0
  143. people_context_mcp-0.1.0/src/people_context/ports/graph.py +18 -0
  144. people_context_mcp-0.1.0/src/people_context/ports/hlc.py +30 -0
  145. people_context_mcp-0.1.0/src/people_context/ports/imports.py +76 -0
  146. people_context_mcp-0.1.0/src/people_context/ports/lifecycle.py +63 -0
  147. people_context_mcp-0.1.0/src/people_context/ports/records.py +71 -0
  148. people_context_mcp-0.1.0/src/people_context/ports/relationship_vocabulary.py +46 -0
  149. people_context_mcp-0.1.0/src/people_context/ports/repository.py +47 -0
  150. people_context_mcp-0.1.0/src/people_context/ports/semantic.py +98 -0
  151. people_context_mcp-0.1.0/src/people_context/ports/unit_of_work.py +35 -0
  152. people_context_mcp-0.1.0/src/people_context/ports/vault.py +26 -0
  153. people_context_mcp-0.1.0/tests/__init__.py +0 -0
  154. people_context_mcp-0.1.0/tests/adapters/test_agent_staging.py +196 -0
  155. people_context_mcp-0.1.0/tests/adapters/test_email_import.py +290 -0
  156. people_context_mcp-0.1.0/tests/adapters/test_followup_fixes.py +186 -0
  157. people_context_mcp-0.1.0/tests/adapters/test_http_e2e.py +116 -0
  158. people_context_mcp-0.1.0/tests/adapters/test_m7_review_regressions.py +305 -0
  159. people_context_mcp-0.1.0/tests/adapters/test_mcp_entrypoint.py +55 -0
  160. people_context_mcp-0.1.0/tests/adapters/test_mcp_relationship_graph.py +58 -0
  161. people_context_mcp-0.1.0/tests/adapters/test_mcp_server.py +600 -0
  162. people_context_mcp-0.1.0/tests/adapters/test_model2vec_embeddings.py +57 -0
  163. people_context_mcp-0.1.0/tests/adapters/test_relationship_graph.py +102 -0
  164. people_context_mcp-0.1.0/tests/adapters/test_relationship_vocabulary.py +161 -0
  165. people_context_mcp-0.1.0/tests/adapters/test_review_fixes.py +202 -0
  166. people_context_mcp-0.1.0/tests/adapters/test_semantic_index.py +167 -0
  167. people_context_mcp-0.1.0/tests/adapters/test_sqlite_changelog.py +328 -0
  168. people_context_mcp-0.1.0/tests/adapters/test_sqlite_context_reader.py +185 -0
  169. people_context_mcp-0.1.0/tests/adapters/test_sqlite_export.py +102 -0
  170. people_context_mcp-0.1.0/tests/adapters/test_sqlite_lifecycle.py +247 -0
  171. people_context_mcp-0.1.0/tests/adapters/test_sqlite_record_store.py +156 -0
  172. people_context_mcp-0.1.0/tests/adapters/test_sqlite_repository.py +274 -0
  173. people_context_mcp-0.1.0/tests/adapters/test_sqlite_sync_foundations.py +77 -0
  174. people_context_mcp-0.1.0/tests/adapters/test_sqlite_unit_of_work.py +47 -0
  175. people_context_mcp-0.1.0/tests/adapters/test_stdio_e2e.py +385 -0
  176. people_context_mcp-0.1.0/tests/adapters/test_vault_export.py +199 -0
  177. people_context_mcp-0.1.0/tests/adapters/test_vcard_import.py +268 -0
  178. people_context_mcp-0.1.0/tests/app/__init__.py +0 -0
  179. people_context_mcp-0.1.0/tests/app/fakes.py +327 -0
  180. people_context_mcp-0.1.0/tests/app/test_communication_guidance.py +161 -0
  181. people_context_mcp-0.1.0/tests/app/test_get_person_context.py +250 -0
  182. people_context_mcp-0.1.0/tests/app/test_m2_writes.py +289 -0
  183. people_context_mcp-0.1.0/tests/app/test_record.py +143 -0
  184. people_context_mcp-0.1.0/tests/app/test_reindex_semantic.py +88 -0
  185. people_context_mcp-0.1.0/tests/app/test_relationship_policy.py +45 -0
  186. people_context_mcp-0.1.0/tests/app/test_resolve_person.py +433 -0
  187. people_context_mcp-0.1.0/tests/app/test_semantic_search.py +133 -0
  188. people_context_mcp-0.1.0/tests/domain/test_person.py +79 -0
  189. people_context_mcp-0.1.0/tests/domain/test_shared.py +72 -0
  190. people_context_mcp-0.1.0/tests/test_cli.py +375 -0
  191. people_context_mcp-0.1.0/tests/test_cli_relationships.py +46 -0
  192. people_context_mcp-0.1.0/tests/test_config.py +96 -0
  193. people_context_mcp-0.1.0/uv.lock +1707 -0
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "people-context-plugins",
3
+ "owner": {
4
+ "name": "Jinyang Wang"
5
+ },
6
+ "description": "Local-first Claude Code integrations for people-context-mcp.",
7
+ "plugins": [
8
+ {
9
+ "name": "people-context",
10
+ "displayName": "People Context",
11
+ "version": "0.1.0",
12
+ "source": ".",
13
+ "description": "Give Claude Code local, durable context about the people in your life through an automatically managed stdio MCP server.",
14
+ "author": {
15
+ "name": "Jinyang Wang"
16
+ },
17
+ "homepage": "https://github.com/JinyangWang27/people-context-mcp/blob/main/docs/claude-code-plugin.md",
18
+ "repository": "https://github.com/JinyangWang27/people-context-mcp",
19
+ "license": "MIT",
20
+ "keywords": [
21
+ "mcp",
22
+ "people",
23
+ "context",
24
+ "memory",
25
+ "local-first"
26
+ ],
27
+ "category": "productivity",
28
+ "tags": [
29
+ "mcp",
30
+ "personal-knowledge",
31
+ "local-first"
32
+ ],
33
+ "strict": true
34
+ }
35
+ ]
36
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "mcpServers": {
3
+ "people-context": {
4
+ "type": "stdio",
5
+ "command": "uv",
6
+ "args": [
7
+ "run",
8
+ "--project",
9
+ "${CLAUDE_PLUGIN_ROOT}",
10
+ "people-context-mcp"
11
+ ]
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3
+ "name": "people-context",
4
+ "displayName": "People Context",
5
+ "version": "0.1.0",
6
+ "description": "Give Claude Code local, durable context about the people in your life through people-context-mcp.",
7
+ "author": {
8
+ "name": "Jinyang Wang",
9
+ "url": "https://github.com/JinyangWang27"
10
+ },
11
+ "homepage": "https://github.com/JinyangWang27/people-context-mcp/blob/main/docs/claude-code-plugin.md",
12
+ "repository": "https://github.com/JinyangWang27/people-context-mcp",
13
+ "license": "MIT",
14
+ "keywords": [
15
+ "mcp",
16
+ "people",
17
+ "context",
18
+ "memory",
19
+ "local-first"
20
+ ],
21
+ "mcpServers": "./mcp.json"
22
+ }
@@ -0,0 +1,16 @@
1
+ # CodeGraph data files
2
+ # These are local to each machine and should not be committed
3
+
4
+ # Database
5
+ *.db
6
+ *.db-wal
7
+ *.db-shm
8
+
9
+ # Cache
10
+ cache/
11
+
12
+ # Logs
13
+ *.log
14
+
15
+ # Hook markers
16
+ .dirty
@@ -0,0 +1,143 @@
1
+ {
2
+ "version": 1,
3
+ "include": [
4
+ "**/*.ts",
5
+ "**/*.tsx",
6
+ "**/*.js",
7
+ "**/*.jsx",
8
+ "**/*.py",
9
+ "**/*.go",
10
+ "**/*.rs",
11
+ "**/*.java",
12
+ "**/*.c",
13
+ "**/*.h",
14
+ "**/*.cpp",
15
+ "**/*.hpp",
16
+ "**/*.cc",
17
+ "**/*.cxx",
18
+ "**/*.cs",
19
+ "**/*.php",
20
+ "**/*.rb",
21
+ "**/*.swift",
22
+ "**/*.kt",
23
+ "**/*.kts",
24
+ "**/*.dart",
25
+ "**/*.svelte",
26
+ "**/*.vue",
27
+ "**/*.liquid",
28
+ "**/*.pas",
29
+ "**/*.dpr",
30
+ "**/*.dpk",
31
+ "**/*.lpr",
32
+ "**/*.dfm",
33
+ "**/*.fmx",
34
+ "**/*.scala",
35
+ "**/*.sc"
36
+ ],
37
+ "exclude": [
38
+ "**/.git/**",
39
+ "**/node_modules/**",
40
+ "**/vendor/**",
41
+ "**/Pods/**",
42
+ "**/dist/**",
43
+ "**/build/**",
44
+ "**/out/**",
45
+ "**/bin/**",
46
+ "**/obj/**",
47
+ "**/target/**",
48
+ "**/*.min.js",
49
+ "**/*.bundle.js",
50
+ "**/.next/**",
51
+ "**/.nuxt/**",
52
+ "**/.svelte-kit/**",
53
+ "**/.output/**",
54
+ "**/.turbo/**",
55
+ "**/.cache/**",
56
+ "**/.parcel-cache/**",
57
+ "**/.vite/**",
58
+ "**/.astro/**",
59
+ "**/.docusaurus/**",
60
+ "**/.gatsby/**",
61
+ "**/.webpack/**",
62
+ "**/.nx/**",
63
+ "**/.yarn/cache/**",
64
+ "**/.pnpm-store/**",
65
+ "**/storybook-static/**",
66
+ "**/.expo/**",
67
+ "**/web-build/**",
68
+ "**/ios/Pods/**",
69
+ "**/ios/build/**",
70
+ "**/android/build/**",
71
+ "**/android/.gradle/**",
72
+ "**/__pycache__/**",
73
+ "**/.venv/**",
74
+ "**/venv/**",
75
+ "**/site-packages/**",
76
+ "**/dist-packages/**",
77
+ "**/.pytest_cache/**",
78
+ "**/.mypy_cache/**",
79
+ "**/.ruff_cache/**",
80
+ "**/.tox/**",
81
+ "**/.nox/**",
82
+ "**/*.egg-info/**",
83
+ "**/.eggs/**",
84
+ "**/go/pkg/mod/**",
85
+ "**/target/debug/**",
86
+ "**/target/release/**",
87
+ "**/.gradle/**",
88
+ "**/.m2/**",
89
+ "**/generated-sources/**",
90
+ "**/.kotlin/**",
91
+ "**/.dart_tool/**",
92
+ "**/.vs/**",
93
+ "**/.nuget/**",
94
+ "**/artifacts/**",
95
+ "**/publish/**",
96
+ "**/cmake-build-*/**",
97
+ "**/CMakeFiles/**",
98
+ "**/bazel-*/**",
99
+ "**/vcpkg_installed/**",
100
+ "**/.conan/**",
101
+ "**/Debug/**",
102
+ "**/Release/**",
103
+ "**/x64/**",
104
+ "**/.pio/**",
105
+ "**/release/**",
106
+ "**/*.app/**",
107
+ "**/*.asar",
108
+ "**/DerivedData/**",
109
+ "**/.build/**",
110
+ "**/.swiftpm/**",
111
+ "**/xcuserdata/**",
112
+ "**/Carthage/Build/**",
113
+ "**/SourcePackages/**",
114
+ "**/__history/**",
115
+ "**/__recovery/**",
116
+ "**/*.dcu",
117
+ "**/.composer/**",
118
+ "**/storage/framework/**",
119
+ "**/bootstrap/cache/**",
120
+ "**/.bundle/**",
121
+ "**/tmp/cache/**",
122
+ "**/public/assets/**",
123
+ "**/public/packs/**",
124
+ "**/.yardoc/**",
125
+ "**/coverage/**",
126
+ "**/htmlcov/**",
127
+ "**/.nyc_output/**",
128
+ "**/test-results/**",
129
+ "**/.coverage/**",
130
+ "**/.idea/**",
131
+ "**/logs/**",
132
+ "**/tmp/**",
133
+ "**/temp/**",
134
+ "**/_build/**",
135
+ "**/docs/_build/**",
136
+ "**/site/**"
137
+ ],
138
+ "languages": [],
139
+ "frameworks": [],
140
+ "maxFileSize": 1048576,
141
+ "extractDocstrings": true,
142
+ "trackCallSites": true
143
+ }
@@ -0,0 +1,28 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - main
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ test:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v6
17
+ - uses: astral-sh/setup-uv@v6
18
+ - run: uv sync --all-extras
19
+ - run: uv run ruff check .
20
+ - name: Run tests with coverage
21
+ run: uv run --with pytest-cov pytest --cov=people_context --cov-report=xml -q
22
+ - name: Upload coverage to Codecov
23
+ if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
24
+ uses: codecov/codecov-action@v6
25
+ with:
26
+ files: ./coverage.xml
27
+ fail_ci_if_error: true
28
+ token: ${{ secrets.CODECOV_TOKEN }}
@@ -0,0 +1,56 @@
1
+ name: Validate Claude Code plugin
2
+
3
+ on:
4
+ pull_request:
5
+ paths:
6
+ - ".claude-plugin/**"
7
+ - "docs/claude-code-plugin.md"
8
+ - ".github/workflows/claude-plugin-validate.yml"
9
+ - "pyproject.toml"
10
+ - "uv.lock"
11
+ - "src/**"
12
+ - "tests/adapters/test_mcp_server.py"
13
+ - "tests/adapters/test_email_import.py"
14
+ push:
15
+ branches:
16
+ - main
17
+ paths:
18
+ - ".claude-plugin/**"
19
+ - "docs/claude-code-plugin.md"
20
+ - ".github/workflows/claude-plugin-validate.yml"
21
+ - "pyproject.toml"
22
+ - "uv.lock"
23
+ - "src/**"
24
+ - "tests/adapters/test_mcp_server.py"
25
+ - "tests/adapters/test_email_import.py"
26
+
27
+ permissions:
28
+ contents: read
29
+
30
+ jobs:
31
+ validate:
32
+ runs-on: ubuntu-latest
33
+
34
+ steps:
35
+ - uses: actions/checkout@v6
36
+
37
+ - uses: actions/setup-node@v6
38
+ with:
39
+ node-version: "22"
40
+
41
+ - name: Install Claude Code
42
+ run: npm install --global @anthropic-ai/claude-code@latest
43
+
44
+ - name: Validate marketplace and plugin
45
+ run: claude plugin validate . --strict
46
+
47
+ - uses: astral-sh/setup-uv@v7
48
+
49
+ - name: Verify local MCP entry point
50
+ run: uv run --locked people-context-mcp --help
51
+
52
+ - name: Verify security boundaries
53
+ run: >-
54
+ uv run --locked pytest -q
55
+ tests/adapters/test_mcp_server.py
56
+ tests/adapters/test_email_import.py
@@ -0,0 +1,67 @@
1
+ name: Publish OpenClaw plugin
2
+
3
+ on:
4
+ pull_request:
5
+ paths:
6
+ - "openclaw-plugin/**"
7
+ - ".github/workflows/package-publish.yml"
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ verify-dist:
12
+ if: github.event_name == 'pull_request'
13
+ runs-on: ubuntu-latest
14
+ permissions:
15
+ contents: read
16
+ defaults:
17
+ run:
18
+ working-directory: ./openclaw-plugin
19
+ steps:
20
+ - uses: actions/checkout@v6
21
+
22
+ - uses: actions/setup-node@v6
23
+ with:
24
+ node-version: "22"
25
+
26
+ - name: Install dependencies
27
+ run: npm ci --no-audit --no-fund
28
+
29
+ - name: Rebuild dist
30
+ run: npm run build
31
+
32
+ - name: Fail if committed dist is stale
33
+ run: |
34
+ if ! git diff --quiet -- dist; then
35
+ echo "::error::Committed openclaw-plugin/dist is out of sync with src. Run 'npm run build' and commit the result."
36
+ git --no-pager diff --stat -- dist
37
+ exit 1
38
+ fi
39
+
40
+ - name: Run plugin tests
41
+ run: npm test
42
+
43
+ dry-run:
44
+ if: github.event_name == 'pull_request'
45
+ permissions:
46
+ contents: read
47
+ id-token: write
48
+ # Pinned to the v0.12.0 commit SHA (mutable tags can be re-pointed at malicious code).
49
+ uses: openclaw/clawhub/.github/workflows/package-publish.yml@ecf09b868a986751137f4272283f84967a16c765
50
+ with:
51
+ source: ./openclaw-plugin
52
+ owner: jinyangwang27
53
+ dry_run: true
54
+
55
+ publish:
56
+ if: github.event_name == 'workflow_dispatch'
57
+ permissions:
58
+ contents: read
59
+ id-token: write
60
+ # Pinned to the v0.12.0 commit SHA (mutable tags can be re-pointed at malicious code).
61
+ uses: openclaw/clawhub/.github/workflows/package-publish.yml@ecf09b868a986751137f4272283f84967a16c765
62
+ with:
63
+ source: ./openclaw-plugin
64
+ owner: jinyangwang27
65
+ dry_run: false
66
+ secrets:
67
+ clawhub_token: ${{ secrets.CLAWHUB_TOKEN }}
@@ -0,0 +1,47 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types:
6
+ - published
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ build:
13
+ name: Build distribution
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v6
17
+ with:
18
+ persist-credentials: false
19
+ - uses: astral-sh/setup-uv@v6
20
+ - name: Build wheel and source distribution
21
+ run: uv build
22
+ - name: Verify distribution metadata
23
+ run: uvx twine check dist/*
24
+ - name: Store distributions
25
+ uses: actions/upload-artifact@v5
26
+ with:
27
+ name: python-package-distributions
28
+ path: dist/
29
+ if-no-files-found: error
30
+
31
+ publish:
32
+ name: Publish distribution to PyPI
33
+ needs: build
34
+ runs-on: ubuntu-latest
35
+ environment:
36
+ name: pypi
37
+ url: https://pypi.org/p/people-context-mcp
38
+ permissions:
39
+ id-token: write
40
+ steps:
41
+ - name: Download distributions
42
+ uses: actions/download-artifact@v6
43
+ with:
44
+ name: python-package-distributions
45
+ path: dist/
46
+ - name: Publish distribution to PyPI
47
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,29 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ .venv/
5
+ venv/
6
+ dist/
7
+ !openclaw-plugin/dist/
8
+ !openclaw-plugin/dist/**
9
+ build/
10
+ *.egg-info/
11
+ .pytest_cache/
12
+ .ruff_cache/
13
+ .coverage
14
+ htmlcov/
15
+
16
+ # Node
17
+ node_modules/
18
+
19
+ # Data (local SQLite store — never commit user data)
20
+ *.db
21
+ *.db-wal
22
+ *.db-shm
23
+
24
+ # OS / editor
25
+ .DS_Store
26
+ .idea/
27
+ .vscode/
28
+
29
+ tmp/
@@ -0,0 +1,39 @@
1
+ # Repository Guidelines
2
+
3
+ ## Project Structure & Module Organization
4
+
5
+ Application code lives under `src/people_context/` and follows a hexagonal architecture:
6
+
7
+ - `domain/` contains Pydantic entities and dependency-free business rules.
8
+ - `app/` contains one use case per module and depends only on `domain/` and narrow protocols in `ports/`.
9
+ - `adapters/` contains SQLite persistence, MCP transports/tools, importers, and optional semantic integrations.
10
+ - `cli.py`, `config.py`, and `adapters/mcp/server.py` are composition and process-boundary entry points.
11
+
12
+ Tests mirror these layers under `tests/domain/`, `tests/app/`, and `tests/adapters/`. Design documentation, interface contracts, privacy rules, and ADRs live in `docs/`.
13
+
14
+ ## Build, Test, and Development Commands
15
+
16
+ - `uv sync` installs the project and development dependencies.
17
+ - `uv sync --extra semantic` explicitly installs optional Model2Vec and sqlite-vec support.
18
+ - `uv run people-context-mcp` starts the default stdio MCP server.
19
+ - `uv run people-context-mcp --http --host 127.0.0.1 --port 8765` starts loopback HTTP.
20
+ - `uv run people-context db-path` shows the active SQLite database.
21
+ - `uv run pytest -q` runs the complete test suite.
22
+ - `uv run ruff check .` checks formatting-independent style and imports.
23
+ - `uv build` creates source and wheel distributions.
24
+
25
+ ## Coding Style & Naming Conventions
26
+
27
+ Use four-space indentation, complete type hints, and a 120-character line limit. Ruff enforces `E`, `F`, `I`, `UP`, `B`, and `SIM` rules. Name modules and functions with `snake_case`, classes with `PascalCase`, and constants with `UPPER_CASE`. Keep functions focused and prefer explicit dependency injection through `typing.Protocol` ports. Never import `adapters`, `mcp`, or `sqlite3` from `domain/` or `app/`.
28
+
29
+ ## Testing Guidelines
30
+
31
+ Use pytest and name files `test_<subject>.py` and tests `test_<behavior>()`. Test application policy against in-memory fakes in `tests/app/fakes.py`; test persistence and transport behavior separately with SQLite and subprocess/E2E tests. Add a regression test for every bug and run focused tests before the full suite.
32
+
33
+ ## Commit & Pull Request Guidelines
34
+
35
+ Use concise imperative Conventional Commit subjects, matching history: `feat: add ...`, `fix: report ...`, or `docs: mark ...`. Keep commits green and narrowly scoped. Pull requests should explain behavior and privacy impact, list verification commands, link relevant issues, and update interface or architecture documentation when contracts change.
36
+
37
+ ## Security & Configuration
38
+
39
+ This repository stores sensitive personal data locally. Never persist raw import content or log private values. Keep HTTP loopback-only and unauthenticated; remote access is out of scope. Ordinary commands must not access the network—only explicit `people-context reindex --semantic` may download the pinned model.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jinyang Wang
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.