kelmo 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 (378) hide show
  1. kelmo-0.1.0/.github/workflows/ci.yml +206 -0
  2. kelmo-0.1.0/.github/workflows/release.yml +50 -0
  3. kelmo-0.1.0/.gitignore +12 -0
  4. kelmo-0.1.0/INSTALL_FOR_AGENTS.md +88 -0
  5. kelmo-0.1.0/LICENSE +202 -0
  6. kelmo-0.1.0/PKG-INFO +225 -0
  7. kelmo-0.1.0/README.md +192 -0
  8. kelmo-0.1.0/docs/ACTIONS.md +41 -0
  9. kelmo-0.1.0/docs/ADOPTION-CONTRACT.md +603 -0
  10. kelmo-0.1.0/docs/CI.md +190 -0
  11. kelmo-0.1.0/docs/CLI.md +168 -0
  12. kelmo-0.1.0/docs/DAEMON.md +85 -0
  13. kelmo-0.1.0/docs/DIAGNOSTICS.md +37 -0
  14. kelmo-0.1.0/docs/DREAMING.md +66 -0
  15. kelmo-0.1.0/docs/EMBEDDING-BROKER.md +40 -0
  16. kelmo-0.1.0/docs/EXECUTOR-ACCOUNT.md +47 -0
  17. kelmo-0.1.0/docs/EXECUTORS.md +185 -0
  18. kelmo-0.1.0/docs/GRAPH.md +118 -0
  19. kelmo-0.1.0/docs/HOT.md +127 -0
  20. kelmo-0.1.0/docs/HUBS.md +157 -0
  21. kelmo-0.1.0/docs/KNOWLEDGE-SYNC.md +31 -0
  22. kelmo-0.1.0/docs/MCP-RECONNECT.md +53 -0
  23. kelmo-0.1.0/docs/MIGRATION-CLI.md +160 -0
  24. kelmo-0.1.0/docs/MODELS.md +115 -0
  25. kelmo-0.1.0/docs/NOTE-CONTRACT.md +206 -0
  26. kelmo-0.1.0/docs/RELEASING.md +31 -0
  27. kelmo-0.1.0/docs/REMOVAL.md +34 -0
  28. kelmo-0.1.0/docs/RESOLUTION.md +55 -0
  29. kelmo-0.1.0/docs/RUNTIME-SECURITY.md +98 -0
  30. kelmo-0.1.0/docs/SERVER-OPERATIONS.md +66 -0
  31. kelmo-0.1.0/docs/SESSIONS.md +176 -0
  32. kelmo-0.1.0/docs/SETUP.md +255 -0
  33. kelmo-0.1.0/docs/SSH-GATE.md +41 -0
  34. kelmo-0.1.0/docs/TARGET-STATE.md +458 -0
  35. kelmo-0.1.0/docs/TECHNICAL.md +366 -0
  36. kelmo-0.1.0/docs/USAGE.md +206 -0
  37. kelmo-0.1.0/docs/WIKI-FILE-CONTRACT.md +838 -0
  38. kelmo-0.1.0/docs/assets/kelmo-agent-view-dark.png +0 -0
  39. kelmo-0.1.0/docs/assets/kelmo-agent-view-light.png +0 -0
  40. kelmo-0.1.0/docs/assets/kelmo-editor-dark.png +0 -0
  41. kelmo-0.1.0/docs/assets/kelmo-editor-light.png +0 -0
  42. kelmo-0.1.0/docs/assets/kelmo-features-dark.png +0 -0
  43. kelmo-0.1.0/docs/assets/kelmo-features-light.png +0 -0
  44. kelmo-0.1.0/docs/assets/kelmo-hub-delivery-dark.png +0 -0
  45. kelmo-0.1.0/docs/assets/kelmo-hub-delivery-light.png +0 -0
  46. kelmo-0.1.0/docs/assets/kelmo-hubs-dark.png +0 -0
  47. kelmo-0.1.0/docs/assets/kelmo-hubs-light.png +0 -0
  48. kelmo-0.1.0/docs/assets/kelmo-install-dark.png +0 -0
  49. kelmo-0.1.0/docs/assets/kelmo-install-light.png +0 -0
  50. kelmo-0.1.0/docs/assets/kelmo-layers-dark.png +0 -0
  51. kelmo-0.1.0/docs/assets/kelmo-layers-light.png +0 -0
  52. kelmo-0.1.0/docs/assets/kelmo-note-path-dark.png +0 -0
  53. kelmo-0.1.0/docs/assets/kelmo-note-path-light.png +0 -0
  54. kelmo-0.1.0/docs/assets/kelmo-obsidian-graph.png +0 -0
  55. kelmo-0.1.0/docs/assets/kelmo-search-dark.png +0 -0
  56. kelmo-0.1.0/docs/assets/kelmo-search-light.png +0 -0
  57. kelmo-0.1.0/docs/assets/kelmo-server-dark.png +0 -0
  58. kelmo-0.1.0/docs/assets/kelmo-server-light.png +0 -0
  59. kelmo-0.1.0/docs/assets/kelmo-tell-once-dark.png +0 -0
  60. kelmo-0.1.0/docs/assets/kelmo-tell-once-light.png +0 -0
  61. kelmo-0.1.0/docs/wiki-v3-examples/feature.md +59 -0
  62. kelmo-0.1.0/docs/wiki-v3-examples/manifest.json +12351 -0
  63. kelmo-0.1.0/docs/wiki-v3-examples/person.md +37 -0
  64. kelmo-0.1.0/docs/wiki-v3-examples/project-map.md +52 -0
  65. kelmo-0.1.0/docs/wiki-v3-examples/records.json +840 -0
  66. kelmo-0.1.0/docs/wiki-v3-examples/sailing-schedule.md +55 -0
  67. kelmo-0.1.0/examples/demo.md +20 -0
  68. kelmo-0.1.0/examples/telegram-alert.py +44 -0
  69. kelmo-0.1.0/gate.json +235 -0
  70. kelmo-0.1.0/install.py +195 -0
  71. kelmo-0.1.0/packaging/gate.py +50 -0
  72. kelmo-0.1.0/packaging/kelmo +39 -0
  73. kelmo-0.1.0/packaging/kelmo-isolated +64 -0
  74. kelmo-0.1.0/pyproject.toml +203 -0
  75. kelmo-0.1.0/run-tests.sh +71 -0
  76. kelmo-0.1.0/src/kelmo/__init__.py +3 -0
  77. kelmo-0.1.0/src/kelmo/alerts.py +82 -0
  78. kelmo-0.1.0/src/kelmo/archive_adapter.py +1348 -0
  79. kelmo-0.1.0/src/kelmo/archive_admin.py +831 -0
  80. kelmo-0.1.0/src/kelmo/archive_worker.py +35 -0
  81. kelmo-0.1.0/src/kelmo/bootstrap.py +236 -0
  82. kelmo-0.1.0/src/kelmo/broker_launcher.py +79 -0
  83. kelmo-0.1.0/src/kelmo/budget.py +101 -0
  84. kelmo-0.1.0/src/kelmo/cli.py +718 -0
  85. kelmo-0.1.0/src/kelmo/client.py +1449 -0
  86. kelmo-0.1.0/src/kelmo/config.py +567 -0
  87. kelmo-0.1.0/src/kelmo/config_edit.py +68 -0
  88. kelmo-0.1.0/src/kelmo/context_binding.py +229 -0
  89. kelmo-0.1.0/src/kelmo/contracts.py +565 -0
  90. kelmo-0.1.0/src/kelmo/conversation.py +44 -0
  91. kelmo-0.1.0/src/kelmo/creation.py +554 -0
  92. kelmo-0.1.0/src/kelmo/crew_executor.py +209 -0
  93. kelmo-0.1.0/src/kelmo/daemon.py +470 -0
  94. kelmo-0.1.0/src/kelmo/doctor.py +469 -0
  95. kelmo-0.1.0/src/kelmo/dreaming.py +455 -0
  96. kelmo-0.1.0/src/kelmo/dreaming_cli.py +154 -0
  97. kelmo-0.1.0/src/kelmo/editor.py +1295 -0
  98. kelmo-0.1.0/src/kelmo/embeddings.py +741 -0
  99. kelmo-0.1.0/src/kelmo/entry.py +34 -0
  100. kelmo-0.1.0/src/kelmo/errors.py +25 -0
  101. kelmo-0.1.0/src/kelmo/executor.py +394 -0
  102. kelmo-0.1.0/src/kelmo/fact_checks.py +173 -0
  103. kelmo-0.1.0/src/kelmo/git_ingress.py +760 -0
  104. kelmo-0.1.0/src/kelmo/graph.py +348 -0
  105. kelmo-0.1.0/src/kelmo/hot.py +258 -0
  106. kelmo-0.1.0/src/kelmo/hub_delivery.py +462 -0
  107. kelmo-0.1.0/src/kelmo/hub_embed.py +271 -0
  108. kelmo-0.1.0/src/kelmo/initialization.py +39 -0
  109. kelmo-0.1.0/src/kelmo/install/__init__.py +0 -0
  110. kelmo-0.1.0/src/kelmo/install/file_changes.py +105 -0
  111. kelmo-0.1.0/src/kelmo/install/hooks.py +35 -0
  112. kelmo-0.1.0/src/kelmo/install/instructions.py +192 -0
  113. kelmo-0.1.0/src/kelmo/install/preview.py +128 -0
  114. kelmo-0.1.0/src/kelmo/install/providers.py +56 -0
  115. kelmo-0.1.0/src/kelmo/install/removal.py +185 -0
  116. kelmo-0.1.0/src/kelmo/install/runtime_backup.py +30 -0
  117. kelmo-0.1.0/src/kelmo/install/sandbox.py +31 -0
  118. kelmo-0.1.0/src/kelmo/install/session_setup.py +110 -0
  119. kelmo-0.1.0/src/kelmo/install/setup.py +677 -0
  120. kelmo-0.1.0/src/kelmo/install/shared.py +95 -0
  121. kelmo-0.1.0/src/kelmo/install/wizard.py +128 -0
  122. kelmo-0.1.0/src/kelmo/integration.py +77 -0
  123. kelmo-0.1.0/src/kelmo/interface.py +509 -0
  124. kelmo-0.1.0/src/kelmo/journal.py +808 -0
  125. kelmo-0.1.0/src/kelmo/knowledge_sync.py +88 -0
  126. kelmo-0.1.0/src/kelmo/linux_runtime.py +121 -0
  127. kelmo-0.1.0/src/kelmo/mcp.py +827 -0
  128. kelmo-0.1.0/src/kelmo/mcp_proxy.py +263 -0
  129. kelmo-0.1.0/src/kelmo/migration_cli.py +150 -0
  130. kelmo-0.1.0/src/kelmo/migration_report.py +65 -0
  131. kelmo-0.1.0/src/kelmo/model_selection.py +110 -0
  132. kelmo-0.1.0/src/kelmo/model_store.py +248 -0
  133. kelmo-0.1.0/src/kelmo/outcomes.py +112 -0
  134. kelmo-0.1.0/src/kelmo/project_preview.py +47 -0
  135. kelmo-0.1.0/src/kelmo/projects.py +498 -0
  136. kelmo-0.1.0/src/kelmo/promotion.py +103 -0
  137. kelmo-0.1.0/src/kelmo/publication.py +558 -0
  138. kelmo-0.1.0/src/kelmo/quota.py +70 -0
  139. kelmo-0.1.0/src/kelmo/resolution.py +395 -0
  140. kelmo-0.1.0/src/kelmo/runtime.py +152 -0
  141. kelmo-0.1.0/src/kelmo/server.py +2058 -0
  142. kelmo-0.1.0/src/kelmo/server_admin.py +204 -0
  143. kelmo-0.1.0/src/kelmo/service.py +1162 -0
  144. kelmo-0.1.0/src/kelmo/session_control.py +116 -0
  145. kelmo-0.1.0/src/kelmo/session_prompts.py +57 -0
  146. kelmo-0.1.0/src/kelmo/session_review.py +227 -0
  147. kelmo-0.1.0/src/kelmo/session_settings.py +60 -0
  148. kelmo-0.1.0/src/kelmo/session_transcripts.py +167 -0
  149. kelmo-0.1.0/src/kelmo/session_worker.py +414 -0
  150. kelmo-0.1.0/src/kelmo/sessions.py +373 -0
  151. kelmo-0.1.0/src/kelmo/snapshot.py +790 -0
  152. kelmo-0.1.0/src/kelmo/ssh_gate.py +40 -0
  153. kelmo-0.1.0/src/kelmo/state.py +297 -0
  154. kelmo-0.1.0/src/kelmo/store/__init__.py +0 -0
  155. kelmo-0.1.0/src/kelmo/store/config.py +52 -0
  156. kelmo-0.1.0/src/kelmo/store/db.py +234 -0
  157. kelmo-0.1.0/src/kelmo/store/doctor.py +162 -0
  158. kelmo-0.1.0/src/kelmo/store/errors.py +49 -0
  159. kelmo-0.1.0/src/kelmo/store/graph/__init__.py +0 -0
  160. kelmo-0.1.0/src/kelmo/store/graph/analysis.py +135 -0
  161. kelmo-0.1.0/src/kelmo/store/graph/build.py +353 -0
  162. kelmo-0.1.0/src/kelmo/store/graph/index.py +17 -0
  163. kelmo-0.1.0/src/kelmo/store/graph/parser.py +228 -0
  164. kelmo-0.1.0/src/kelmo/store/graph/query.py +245 -0
  165. kelmo-0.1.0/src/kelmo/store/graph/stats.py +22 -0
  166. kelmo-0.1.0/src/kelmo/store/memory/__init__.py +0 -0
  167. kelmo-0.1.0/src/kelmo/store/memory/backfill.py +224 -0
  168. kelmo-0.1.0/src/kelmo/store/memory/chunk.py +500 -0
  169. kelmo-0.1.0/src/kelmo/store/memory/delete.py +86 -0
  170. kelmo-0.1.0/src/kelmo/store/memory/embed.py +384 -0
  171. kelmo-0.1.0/src/kelmo/store/memory/get.py +89 -0
  172. kelmo-0.1.0/src/kelmo/store/memory/list.py +131 -0
  173. kelmo-0.1.0/src/kelmo/store/memory/reembed.py +163 -0
  174. kelmo-0.1.0/src/kelmo/store/memory/search.py +587 -0
  175. kelmo-0.1.0/src/kelmo/store/memory/search_log.py +208 -0
  176. kelmo-0.1.0/src/kelmo/store/memory/stats.py +98 -0
  177. kelmo-0.1.0/src/kelmo/store/memory/store.py +127 -0
  178. kelmo-0.1.0/src/kelmo/store/memory/taxonomy.py +24 -0
  179. kelmo-0.1.0/src/kelmo/store/memory/update.py +168 -0
  180. kelmo-0.1.0/src/kelmo/store/schema.sql +258 -0
  181. kelmo-0.1.0/src/kelmo/supersession.py +55 -0
  182. kelmo-0.1.0/src/kelmo/telemetry.py +62 -0
  183. kelmo-0.1.0/src/kelmo/timings.py +143 -0
  184. kelmo-0.1.0/src/kelmo/visibility.py +44 -0
  185. kelmo-0.1.0/src/kelmo/wiki/__init__.py +1 -0
  186. kelmo-0.1.0/src/kelmo/wiki/context.py +125 -0
  187. kelmo-0.1.0/src/kelmo/wiki/directory.py +14 -0
  188. kelmo-0.1.0/src/kelmo/wiki/engine.py +2236 -0
  189. kelmo-0.1.0/src/kelmo/wiki/file_contract.py +1537 -0
  190. kelmo-0.1.0/src/kelmo/wiki/hot_views.py +287 -0
  191. kelmo-0.1.0/src/kelmo/wiki/links.py +139 -0
  192. kelmo-0.1.0/src/kelmo/wiki/pages.py +935 -0
  193. kelmo-0.1.0/src/kelmo/wiki/policy.py +129 -0
  194. kelmo-0.1.0/src/kelmo/wiki/prompts/compact.md +17 -0
  195. kelmo-0.1.0/src/kelmo/wiki/prompts/conflict.md +13 -0
  196. kelmo-0.1.0/src/kelmo/wiki/schemas/wiki-file-contract/3.0/page.schema.json +214 -0
  197. kelmo-0.1.0/src/kelmo/wiki/schemas/wiki-file-contract/3.0/records.schema.json +575 -0
  198. kelmo-0.1.0/src/kelmo/wiki/schemas/wiki-file-contract/3.0/worker-manifest.schema.json +1484 -0
  199. kelmo-0.1.0/src/kelmo/wiki/views.py +173 -0
  200. kelmo-0.1.0/tests/acceptance/_lib.py +290 -0
  201. kelmo-0.1.0/tests/acceptance/a01_recall.py +79 -0
  202. kelmo-0.1.0/tests/acceptance/a02_restart.py +69 -0
  203. kelmo-0.1.0/tests/acceptance/a03_forget.py +66 -0
  204. kelmo-0.1.0/tests/acceptance/a04_promote.py +70 -0
  205. kelmo-0.1.0/tests/acceptance/a05_resolution.py +67 -0
  206. kelmo-0.1.0/tests/acceptance/a06_graph.py +75 -0
  207. kelmo-0.1.0/tests/acceptance/a07_hot.py +72 -0
  208. kelmo-0.1.0/tests/acceptance/a08_sessions.py +96 -0
  209. kelmo-0.1.0/tests/acceptance/a09_mcp.py +85 -0
  210. kelmo-0.1.0/tests/acceptance/a10_retry.py +65 -0
  211. kelmo-0.1.0/tests/acceptance/run.sh +26 -0
  212. kelmo-0.1.0/tests/acceptance/stub_executor.py +23 -0
  213. kelmo-0.1.0/tests/adoption-checks.txt +37 -0
  214. kelmo-0.1.0/tests/fixtures/adoption/manifest.json +167 -0
  215. kelmo-0.1.0/tests/fixtures/hubs/wiki-parity.json +26 -0
  216. kelmo-0.1.0/tests/platform_support.py +21 -0
  217. kelmo-0.1.0/tests/registry_seed.py +215 -0
  218. kelmo-0.1.0/tests/store/__init__.py +0 -0
  219. kelmo-0.1.0/tests/store/conftest.py +40 -0
  220. kelmo-0.1.0/tests/store/fixtures/.gitkeep +0 -0
  221. kelmo-0.1.0/tests/store/test_concurrent_writes.py +96 -0
  222. kelmo-0.1.0/tests/store/test_config.py +16 -0
  223. kelmo-0.1.0/tests/store/test_db.py +141 -0
  224. kelmo-0.1.0/tests/store/test_delete_cascade.py +47 -0
  225. kelmo-0.1.0/tests/store/test_doctor.py +28 -0
  226. kelmo-0.1.0/tests/store/test_embed.py +31 -0
  227. kelmo-0.1.0/tests/store/test_errors.py +54 -0
  228. kelmo-0.1.0/tests/store/test_fts5_escape.py +85 -0
  229. kelmo-0.1.0/tests/store/test_graph.py +88 -0
  230. kelmo-0.1.0/tests/store/test_graph_build.py +399 -0
  231. kelmo-0.1.0/tests/store/test_graph_edge_cases.py +64 -0
  232. kelmo-0.1.0/tests/store/test_list_edge_cases.py +70 -0
  233. kelmo-0.1.0/tests/store/test_memory_crud.py +172 -0
  234. kelmo-0.1.0/tests/store/test_memory_search.py +100 -0
  235. kelmo-0.1.0/tests/store/test_memory_stats.py +27 -0
  236. kelmo-0.1.0/tests/store/test_offline_embedding.py +21 -0
  237. kelmo-0.1.0/tests/store/test_schema_triggers.py +102 -0
  238. kelmo-0.1.0/tests/store/test_search_edge_cases.py +76 -0
  239. kelmo-0.1.0/tests/store/test_search_failures.py +13 -0
  240. kelmo-0.1.0/tests/store/test_store_atomicity.py +37 -0
  241. kelmo-0.1.0/tests/store/test_taxonomy.py +42 -0
  242. kelmo-0.1.0/tests/store/test_valid_from.py +75 -0
  243. kelmo-0.1.0/tests/test_action_state.py +507 -0
  244. kelmo-0.1.0/tests/test_action_state_context.py +367 -0
  245. kelmo-0.1.0/tests/test_admin_parity.py +367 -0
  246. kelmo-0.1.0/tests/test_adoption_contract.py +135 -0
  247. kelmo-0.1.0/tests/test_alerts.py +105 -0
  248. kelmo-0.1.0/tests/test_archive_adoption.py +1250 -0
  249. kelmo-0.1.0/tests/test_archive_boundary.py +447 -0
  250. kelmo-0.1.0/tests/test_archive_crash_recovery.py +151 -0
  251. kelmo-0.1.0/tests/test_archive_final_boundaries.py +184 -0
  252. kelmo-0.1.0/tests/test_archive_import_boundaries.py +47 -0
  253. kelmo-0.1.0/tests/test_archive_legacy_boundaries.py +217 -0
  254. kelmo-0.1.0/tests/test_archive_purge.py +759 -0
  255. kelmo-0.1.0/tests/test_archive_recovery_boundaries.py +86 -0
  256. kelmo-0.1.0/tests/test_bootstrap_ownership.py +124 -0
  257. kelmo-0.1.0/tests/test_bootstrap_prompt.py +42 -0
  258. kelmo-0.1.0/tests/test_broker_launcher.py +61 -0
  259. kelmo-0.1.0/tests/test_budget_chains.py +249 -0
  260. kelmo-0.1.0/tests/test_cli.py +109 -0
  261. kelmo-0.1.0/tests/test_client_outbox.py +1349 -0
  262. kelmo-0.1.0/tests/test_conversation.py +80 -0
  263. kelmo-0.1.0/tests/test_creation.py +386 -0
  264. kelmo-0.1.0/tests/test_crew_executor.py +61 -0
  265. kelmo-0.1.0/tests/test_daemon.py +707 -0
  266. kelmo-0.1.0/tests/test_diagnostics.py +185 -0
  267. kelmo-0.1.0/tests/test_distribution.py +59 -0
  268. kelmo-0.1.0/tests/test_doctor.py +256 -0
  269. kelmo-0.1.0/tests/test_dreaming_apply.py +505 -0
  270. kelmo-0.1.0/tests/test_dreaming_cli.py +57 -0
  271. kelmo-0.1.0/tests/test_dreaming_cost.py +253 -0
  272. kelmo-0.1.0/tests/test_dreaming_proposals.py +184 -0
  273. kelmo-0.1.0/tests/test_dreaming_recovery.py +224 -0
  274. kelmo-0.1.0/tests/test_editor_context.py +285 -0
  275. kelmo-0.1.0/tests/test_editor_scoping.py +1569 -0
  276. kelmo-0.1.0/tests/test_embedding_contract.py +1305 -0
  277. kelmo-0.1.0/tests/test_executor.py +295 -0
  278. kelmo-0.1.0/tests/test_fact_checks.py +104 -0
  279. kelmo-0.1.0/tests/test_forget.py +152 -0
  280. kelmo-0.1.0/tests/test_full_adoption.py +218 -0
  281. kelmo-0.1.0/tests/test_gate.py +43 -0
  282. kelmo-0.1.0/tests/test_gate_contract.py +362 -0
  283. kelmo-0.1.0/tests/test_git_ingress.py +310 -0
  284. kelmo-0.1.0/tests/test_graph.py +213 -0
  285. kelmo-0.1.0/tests/test_graph_adoption.py +71 -0
  286. kelmo-0.1.0/tests/test_graph_interfaces.py +85 -0
  287. kelmo-0.1.0/tests/test_graph_service.py +521 -0
  288. kelmo-0.1.0/tests/test_hot.py +159 -0
  289. kelmo-0.1.0/tests/test_hot_views.py +301 -0
  290. kelmo-0.1.0/tests/test_hub_aliases.py +133 -0
  291. kelmo-0.1.0/tests/test_hub_delivery.py +586 -0
  292. kelmo-0.1.0/tests/test_hub_integrity.py +56 -0
  293. kelmo-0.1.0/tests/test_hub_parity.py +54 -0
  294. kelmo-0.1.0/tests/test_hub_surface.py +387 -0
  295. kelmo-0.1.0/tests/test_hub_wizard.py +31 -0
  296. kelmo-0.1.0/tests/test_hub_workflow.py +101 -0
  297. kelmo-0.1.0/tests/test_initialization.py +92 -0
  298. kelmo-0.1.0/tests/test_installed_cli.py +355 -0
  299. kelmo-0.1.0/tests/test_installer_failures.py +821 -0
  300. kelmo-0.1.0/tests/test_installer_wiki.py +80 -0
  301. kelmo-0.1.0/tests/test_job_claims.py +102 -0
  302. kelmo-0.1.0/tests/test_journal_recovery.py +249 -0
  303. kelmo-0.1.0/tests/test_knowledge_sync.py +53 -0
  304. kelmo-0.1.0/tests/test_linux_runtime.py +78 -0
  305. kelmo-0.1.0/tests/test_local_server_parity.py +414 -0
  306. kelmo-0.1.0/tests/test_mcp.py +33 -0
  307. kelmo-0.1.0/tests/test_mcp_cli_parity.py +320 -0
  308. kelmo-0.1.0/tests/test_mcp_composites.py +83 -0
  309. kelmo-0.1.0/tests/test_mcp_native.py +118 -0
  310. kelmo-0.1.0/tests/test_mcp_proxy.py +197 -0
  311. kelmo-0.1.0/tests/test_memory_instructions.py +58 -0
  312. kelmo-0.1.0/tests/test_migration_cli.py +89 -0
  313. kelmo-0.1.0/tests/test_model_selection.py +43 -0
  314. kelmo-0.1.0/tests/test_model_store.py +56 -0
  315. kelmo-0.1.0/tests/test_narrative_ownership.py +280 -0
  316. kelmo-0.1.0/tests/test_nested_layout.py +854 -0
  317. kelmo-0.1.0/tests/test_onboarding_cli.py +89 -0
  318. kelmo-0.1.0/tests/test_outcomes.py +159 -0
  319. kelmo-0.1.0/tests/test_ownership_recovery.py +126 -0
  320. kelmo-0.1.0/tests/test_pages.py +36 -0
  321. kelmo-0.1.0/tests/test_post_cutover_recovery.py +142 -0
  322. kelmo-0.1.0/tests/test_preservation_retry.py +123 -0
  323. kelmo-0.1.0/tests/test_project_hubs.py +528 -0
  324. kelmo-0.1.0/tests/test_promotion_v3.py +262 -0
  325. kelmo-0.1.0/tests/test_protected_rules.py +204 -0
  326. kelmo-0.1.0/tests/test_publisher_guards.py +263 -0
  327. kelmo-0.1.0/tests/test_pytest_shards.py +72 -0
  328. kelmo-0.1.0/tests/test_quota.py +285 -0
  329. kelmo-0.1.0/tests/test_record_visibility.py +103 -0
  330. kelmo-0.1.0/tests/test_record_window_ceiling.py +86 -0
  331. kelmo-0.1.0/tests/test_registration.py +135 -0
  332. kelmo-0.1.0/tests/test_removal.py +182 -0
  333. kelmo-0.1.0/tests/test_resolution.py +364 -0
  334. kelmo-0.1.0/tests/test_restore.py +161 -0
  335. kelmo-0.1.0/tests/test_retrieval_integration.py +635 -0
  336. kelmo-0.1.0/tests/test_retrieval_parity.py +1111 -0
  337. kelmo-0.1.0/tests/test_retry_command.py +260 -0
  338. kelmo-0.1.0/tests/test_runtime.py +52 -0
  339. kelmo-0.1.0/tests/test_runtime_macos.py +64 -0
  340. kelmo-0.1.0/tests/test_search_fallback.py +89 -0
  341. kelmo-0.1.0/tests/test_search_filters.py +142 -0
  342. kelmo-0.1.0/tests/test_search_interfaces.py +42 -0
  343. kelmo-0.1.0/tests/test_server_admin.py +39 -0
  344. kelmo-0.1.0/tests/test_server_fencing.py +737 -0
  345. kelmo-0.1.0/tests/test_server_setup.py +75 -0
  346. kelmo-0.1.0/tests/test_service.py +268 -0
  347. kelmo-0.1.0/tests/test_session_capture.py +381 -0
  348. kelmo-0.1.0/tests/test_session_control.py +128 -0
  349. kelmo-0.1.0/tests/test_session_executor.py +28 -0
  350. kelmo-0.1.0/tests/test_session_executor_selection.py +50 -0
  351. kelmo-0.1.0/tests/test_session_install.py +144 -0
  352. kelmo-0.1.0/tests/test_session_publication.py +137 -0
  353. kelmo-0.1.0/tests/test_session_review.py +275 -0
  354. kelmo-0.1.0/tests/test_session_transcripts.py +86 -0
  355. kelmo-0.1.0/tests/test_session_worker.py +409 -0
  356. kelmo-0.1.0/tests/test_setup.py +430 -0
  357. kelmo-0.1.0/tests/test_setup_preview.py +137 -0
  358. kelmo-0.1.0/tests/test_setup_wizard.py +119 -0
  359. kelmo-0.1.0/tests/test_shared_context.py +446 -0
  360. kelmo-0.1.0/tests/test_shared_setup.py +42 -0
  361. kelmo-0.1.0/tests/test_snapshot_barrier.py +131 -0
  362. kelmo-0.1.0/tests/test_snapshot_fidelity.py +357 -0
  363. kelmo-0.1.0/tests/test_ssh_gate.py +14 -0
  364. kelmo-0.1.0/tests/test_state_publication.py +603 -0
  365. kelmo-0.1.0/tests/test_state_review_boundaries.py +800 -0
  366. kelmo-0.1.0/tests/test_supersede.py +171 -0
  367. kelmo-0.1.0/tests/test_timings.py +149 -0
  368. kelmo-0.1.0/tests/test_user_launcher.py +184 -0
  369. kelmo-0.1.0/tests/test_v3_projection.py +440 -0
  370. kelmo-0.1.0/tests/test_vault_backup.py +146 -0
  371. kelmo-0.1.0/tests/test_wiki_file_contract.py +1759 -0
  372. kelmo-0.1.0/tests/test_wiki_roots.py +308 -0
  373. kelmo-0.1.0/tests/vault_template.py +44 -0
  374. kelmo-0.1.0/tools/gate.py +1816 -0
  375. kelmo-0.1.0/tools/prepare_executor_account.py +69 -0
  376. kelmo-0.1.0/tools/pytest_shards.py +154 -0
  377. kelmo-0.1.0/tools/rehearse_upgrade.py +112 -0
  378. kelmo-0.1.0/uv.lock +1808 -0
@@ -0,0 +1,206 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - main
8
+ workflow_dispatch:
9
+ workflow_call:
10
+ schedule:
11
+ - cron: "17 3 * * 1"
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ # A runner's preinstalled Python can lack SQLite extension support, which sqlite-vec needs.
17
+ env:
18
+ UV_MANAGED_PYTHON: "1"
19
+
20
+ jobs:
21
+ source:
22
+ name: Source (${{ matrix.os }}, Python ${{ matrix.python }})
23
+ runs-on: ${{ matrix.os }}
24
+ strategy:
25
+ fail-fast: false
26
+ matrix:
27
+ # Pushes and pull requests: one Linux job. Release tags, the weekly run and a manual run: both
28
+ # operating systems on the lowest and highest supported Python.
29
+ include: ${{ fromJSON((github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/')) && '[{"os":"ubuntu-24.04","python":"3.12"},{"os":"ubuntu-24.04","python":"3.13"},{"os":"macos-26","python":"3.12"},{"os":"macos-26","python":"3.13"}]' || '[{"os":"ubuntu-24.04","python":"3.13"}]') }}
30
+ steps:
31
+ - name: Prepare synthetic environment
32
+ run: |
33
+ synthetic_home="$RUNNER_TEMP/kelmo-home"
34
+ mkdir -p "$synthetic_home"
35
+ {
36
+ echo "HOME=$synthetic_home"
37
+ echo "GIT_CONFIG_GLOBAL=$synthetic_home/.gitconfig"
38
+ echo "GIT_CONFIG_NOSYSTEM=1"
39
+ echo "GIT_AUTHOR_NAME=Kelmo CI"
40
+ echo "GIT_AUTHOR_EMAIL=kelmo-ci@example.invalid"
41
+ echo "GIT_COMMITTER_NAME=Kelmo CI"
42
+ echo "GIT_COMMITTER_EMAIL=kelmo-ci@example.invalid"
43
+ } >> "$GITHUB_ENV"
44
+ - name: Check out source
45
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
46
+ with:
47
+ persist-credentials: false
48
+ - name: Install uv and Python
49
+ uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
50
+ with:
51
+ version: "0.11.3"
52
+ python-version: ${{ matrix.python }}
53
+ enable-cache: true
54
+ cache-dependency-glob: uv.lock
55
+ - name: Sync locked dependencies
56
+ run: uv sync --locked --dev --python ${{ matrix.python }}
57
+ - name: Check lock file
58
+ run: uv lock --check
59
+ - name: Lint
60
+ run: uv run --locked --python ${{ matrix.python }} ruff check .
61
+ - name: Test default source profile
62
+ env:
63
+ PYTHONPATH: ${{ github.workspace }}/src
64
+ # The same sharded run the gate uses: four pytest processes on a four-core runner.
65
+ run: >-
66
+ uv run --locked --python ${{ matrix.python }} python tools/pytest_shards.py tests -q -ra
67
+ --ignore=tests/test_runtime.py
68
+ --ignore=tests/test_runtime_macos.py
69
+ --ignore=tests/test_linux_runtime.py
70
+ --ignore=tests/test_installed_cli.py
71
+
72
+ artifacts:
73
+ name: Build and inspect artifacts
74
+ needs: source
75
+ runs-on: ubuntu-24.04
76
+ outputs:
77
+ artifact-id: ${{ steps.distributions.outputs.artifact-id }}
78
+ steps:
79
+ - name: Prepare synthetic environment
80
+ run: |
81
+ synthetic_home="$RUNNER_TEMP/kelmo-home"
82
+ mkdir -p "$synthetic_home"
83
+ {
84
+ echo "HOME=$synthetic_home"
85
+ echo "GIT_CONFIG_GLOBAL=$synthetic_home/.gitconfig"
86
+ echo "GIT_CONFIG_NOSYSTEM=1"
87
+ echo "GIT_AUTHOR_NAME=Kelmo CI"
88
+ echo "GIT_AUTHOR_EMAIL=kelmo-ci@example.invalid"
89
+ echo "GIT_COMMITTER_NAME=Kelmo CI"
90
+ echo "GIT_COMMITTER_EMAIL=kelmo-ci@example.invalid"
91
+ } >> "$GITHUB_ENV"
92
+ - name: Check out source
93
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
94
+ with:
95
+ persist-credentials: false
96
+ - name: Install uv and Python
97
+ uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
98
+ with:
99
+ version: "0.11.3"
100
+ python-version: "3.12"
101
+ enable-cache: true
102
+ cache-dependency-glob: uv.lock
103
+ - name: Sync locked dependencies
104
+ run: uv sync --locked --dev --python 3.12
105
+ - name: Build wheel and source distribution
106
+ run: uv build --no-sources
107
+ - name: Inspect distribution contents
108
+ run: |
109
+ wheel=$(find dist -maxdepth 1 -name '*.whl' -print -quit)
110
+ source=$(find dist -maxdepth 1 -name '*.tar.gz' -print -quit)
111
+ test -n "$wheel"
112
+ test -n "$source"
113
+ KELMO_TEST_WHEEL="$wheel" KELMO_TEST_SDIST="$source" \
114
+ uv run --locked pytest tests/test_distribution.py
115
+ - name: Upload distributions
116
+ id: distributions
117
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
118
+ with:
119
+ name: kelmo-dist
120
+ path: dist/
121
+ if-no-files-found: error
122
+ retention-days: 7
123
+
124
+ installed-launcher:
125
+ name: Fresh installed launcher (${{ matrix.os }}, Python ${{ matrix.python }})
126
+ needs: [source, artifacts]
127
+ runs-on: ${{ matrix.os }}
128
+ permissions:
129
+ contents: read
130
+ actions: read
131
+ strategy:
132
+ fail-fast: false
133
+ matrix:
134
+ # Pushes and pull requests: one Linux job. Release tags, the weekly run and a manual run: both
135
+ # operating systems on the lowest and highest supported Python.
136
+ include: ${{ fromJSON((github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/')) && '[{"os":"ubuntu-24.04","python":"3.12"},{"os":"ubuntu-24.04","python":"3.13"},{"os":"macos-26","python":"3.12"},{"os":"macos-26","python":"3.13"}]' || '[{"os":"ubuntu-24.04","python":"3.13"}]') }}
137
+ steps:
138
+ - name: Prepare synthetic environment
139
+ run: |
140
+ synthetic_home="$RUNNER_TEMP/kelmo-home"
141
+ mkdir -p "$synthetic_home"
142
+ {
143
+ echo "HOME=$synthetic_home"
144
+ echo "GIT_CONFIG_GLOBAL=$synthetic_home/.gitconfig"
145
+ echo "GIT_CONFIG_NOSYSTEM=1"
146
+ echo "GIT_AUTHOR_NAME=Kelmo CI"
147
+ echo "GIT_AUTHOR_EMAIL=kelmo-ci@example.invalid"
148
+ echo "GIT_COMMITTER_NAME=Kelmo CI"
149
+ echo "GIT_COMMITTER_EMAIL=kelmo-ci@example.invalid"
150
+ } >> "$GITHUB_ENV"
151
+ - name: Check out source
152
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
153
+ with:
154
+ persist-credentials: false
155
+ - name: Install uv and Python
156
+ uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
157
+ with:
158
+ version: "0.11.3"
159
+ python-version: ${{ matrix.python }}
160
+ enable-cache: true
161
+ cache-dependency-glob: uv.lock
162
+ - name: Sync locked test dependencies
163
+ run: uv sync --locked --dev --no-install-project --python ${{ matrix.python }}
164
+ - name: Download immutable distributions
165
+ uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
166
+ with:
167
+ artifact-ids: ${{ needs.artifacts.outputs.artifact-id }}
168
+ path: ${{ runner.temp }}/dist
169
+ merge-multiple: true
170
+ github-token: ${{ github.token }}
171
+ digest-mismatch: error
172
+ - name: Install fresh runtime
173
+ run: |
174
+ set -- "$RUNNER_TEMP"/dist/*.whl
175
+ test "$#" -eq 1
176
+ test -f "$1"
177
+ uv venv --python ${{ matrix.python }} "$RUNNER_TEMP/fresh-runtime"
178
+ uv export --locked --no-dev --no-emit-project --no-hashes \
179
+ --output-file "$RUNNER_TEMP/constraints.txt"
180
+ uv pip install --python "$RUNNER_TEMP/fresh-runtime/bin/python" \
181
+ --constraints "$RUNNER_TEMP/constraints.txt" "$1"
182
+ - name: Test installed launcher
183
+ working-directory: ${{ runner.temp }}
184
+ env:
185
+ KELMO_TEST_PREFIX: ${{ runner.temp }}/fresh-runtime
186
+ PYTHONPATH: ${{ runner.temp }}/fresh-runtime/lib/python${{ matrix.python }}/site-packages
187
+ run: |
188
+ set -- "$RUNNER_TEMP"/dist/*.whl
189
+ export KELMO_TEST_WHEEL="$1"
190
+ set -- "$RUNNER_TEMP"/dist/*.tar.gz
191
+ export KELMO_TEST_SDIST="$1"
192
+ "$GITHUB_WORKSPACE/.venv/bin/python" - <<'PY'
193
+ import importlib.util
194
+ import os
195
+ from pathlib import Path
196
+
197
+ prefix = Path(os.environ["KELMO_TEST_PREFIX"]).resolve()
198
+ for name in ("kelmo", "kelmo.store"):
199
+ spec = importlib.util.find_spec(name)
200
+ assert spec is not None and spec.submodule_search_locations, name
201
+ for location in spec.submodule_search_locations:
202
+ assert Path(location).resolve().is_relative_to(prefix), (name, location)
203
+ PY
204
+ "$GITHUB_WORKSPACE/.venv/bin/python" -m pytest --import-mode=importlib --noconftest \
205
+ "$GITHUB_WORKSPACE/tests/test_installed_cli.py" \
206
+ "$GITHUB_WORKSPACE/tests/test_distribution.py"
@@ -0,0 +1,50 @@
1
+ name: Release
2
+
3
+ # Push a tag vX.Y.Z whose version matches pyproject.toml. The full CI runs first; the exact wheel and sdist it
4
+ # built and tested are then published to PyPI through Trusted Publishing (no API token is stored anywhere).
5
+
6
+ on:
7
+ push:
8
+ tags:
9
+ - "v*"
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ checks:
16
+ name: CI
17
+ uses: ./.github/workflows/ci.yml
18
+ permissions:
19
+ contents: read
20
+ actions: read
21
+
22
+ publish:
23
+ name: Publish to PyPI
24
+ needs: checks
25
+ runs-on: ubuntu-24.04
26
+ environment:
27
+ name: pypi
28
+ url: https://pypi.org/project/kelmo/
29
+ permissions:
30
+ id-token: write
31
+ steps:
32
+ - name: Download the tested distributions
33
+ uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
34
+ with:
35
+ name: kelmo-dist
36
+ path: dist/
37
+ - name: Check that the tag names the built version
38
+ env:
39
+ TAG: ${{ github.ref_name }}
40
+ run: |
41
+ set -- dist/kelmo-*.whl
42
+ test "$#" -eq 1
43
+ version=$(basename "$1" | cut -d- -f2)
44
+ if [ "v$version" != "$TAG" ]; then
45
+ echo "Tag $TAG does not match the built version $version (pyproject.toml)." >&2
46
+ exit 1
47
+ fi
48
+ ls -l dist/
49
+ - name: Publish
50
+ uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
kelmo-0.1.0/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ /_docs/
2
+ .venv/
3
+ __pycache__/
4
+ .pytest_cache/
5
+ .ruff_cache/
6
+ *.egg-info/
7
+ build/
8
+ dist/
9
+ .coverage
10
+ local-data/
11
+ .env*
12
+ !.env.example
@@ -0,0 +1,88 @@
1
+ # Install Kelmo for your user
2
+
3
+ You are a coding agent asked to install Kelmo. Follow these steps in order. Ask before each
4
+ step that changes the user's files or spends their model quota.
5
+
6
+ ## 1. Check the machine
7
+
8
+ Stop and report if any check fails.
9
+
10
+ ```sh
11
+ python3 --version # 3.12 or 3.13
12
+ git config user.name # must print a value
13
+ git config user.email # must print a value
14
+ claude --version # or: codex --version
15
+ ```
16
+
17
+ macOS or Linux only. The agent CLI must already be logged in; Kelmo never copies credentials.
18
+
19
+ ## 2. Ask the user four things
20
+
21
+ Do not choose these for them.
22
+
23
+ 1. **Project name**, for example the repository's name.
24
+ 2. **Client:** `claude`, `codex` or `both`.
25
+ 3. **Editor model and provider.** The background worker calls this model for every note, on the
26
+ user's subscription or API key. On the author's vault Claude Haiku cost a median of $0.13 per
27
+ note on an API key. Ask which model they want. There is no fallback.
28
+ 4. **Session capture.** `off` is the default. `auto` or `archive-only` saves session transcripts
29
+ to the local archive, so ask explicitly.
30
+
31
+ ## 3. Install the package
32
+
33
+ ```sh
34
+ pipx install kelmo # or: uv tool install kelmo
35
+ ```
36
+
37
+ ## 4. Preview, then show the plan
38
+
39
+ Run this from the user's repository. It writes nothing, downloads nothing and calls no model.
40
+
41
+ ```sh
42
+ kelmo setup --non-interactive --disable-native-memory \
43
+ --client CLIENT --provider PROVIDER --model MODEL \
44
+ --project NAME --link "$PWD" --session-memory MODE --dry-run
45
+ ```
46
+
47
+ Use the session capture mode the user chose for `MODE`. `auto` and `archive-only` also run model-backed
48
+ readiness checks when applied. Show the user the `files` list and `warnings`, and wait for their yes.
49
+
50
+ `--disable-native-memory` adds a line to the agent's instruction file telling it to use Kelmo
51
+ instead of the client's built-in memory. If the user wants to keep both, use
52
+ `--allow-native-memory`.
53
+
54
+ ## 5. Apply
55
+
56
+ Run the same command without `--dry-run`. It creates the vault, downloads the pinned embedding
57
+ model once (87 MB), registers MCP and hooks, makes one real model call to check the editor, and
58
+ starts a user-level background worker. Changed files get verified backups.
59
+
60
+ ## 6. Verify
61
+
62
+ ```sh
63
+ kelmo doctor --json
64
+ kelmo projects --json
65
+ kelmo create --project NAME --text 'Kelmo was installed on this machine today.' --wait --json
66
+ kelmo pages
67
+ ```
68
+
69
+ `kelmo create` costs one editor run. If it reports an operation id without a final state, follow
70
+ it with `kelmo trace OPERATION_ID --json`: `applied` means the wiki changed and `failed` names the
71
+ refusal. `archived` is a final evidence-only result only when the operation is terminal; before that
72
+ the note is still waiting for the editor.
73
+
74
+ ## 7. Hand over
75
+
76
+ Tell the user to restart their agent client. Codex asks them to trust the new hooks in `/hooks`;
77
+ you cannot approve that for them. In the new session the project's hub arrives at startup.
78
+
79
+ To undo the client integration:
80
+
81
+ ```sh
82
+ kelmo uninstall --home "$HOME" --executable "$(command -v kelmo)" --vault VAULT --client CLIENT --json
83
+ ```
84
+
85
+ Add `--apply` after showing the preview. This disconnects the clients and keeps the worker and
86
+ the data; see [docs/REMOVAL.md](docs/REMOVAL.md).
87
+
88
+ More options, a shared server and custom models are in [docs/SETUP.md](docs/SETUP.md).
kelmo-0.1.0/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.