activegraph 1.0.4__tar.gz → 1.0.5.post1__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 (162) hide show
  1. activegraph-1.0.5.post1/LICENSE +204 -0
  2. activegraph-1.0.5.post1/NOTICE +2 -0
  3. {activegraph-1.0.4 → activegraph-1.0.5.post1}/PKG-INFO +21 -7
  4. {activegraph-1.0.4 → activegraph-1.0.5.post1}/README.md +15 -4
  5. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/__init__.py +1 -1
  6. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph.egg-info/PKG-INFO +21 -7
  7. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph.egg-info/SOURCES.txt +4 -0
  8. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph.egg-info/requires.txt +1 -0
  9. {activegraph-1.0.4 → activegraph-1.0.5.post1}/pyproject.toml +13 -4
  10. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_doc_links.py +20 -0
  11. activegraph-1.0.5.post1/tests/test_license.py +149 -0
  12. activegraph-1.0.5.post1/tests/test_llms_txt.py +184 -0
  13. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/__main__.py +0 -0
  14. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/behaviors/__init__.py +0 -0
  15. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/behaviors/base.py +0 -0
  16. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/behaviors/decorators.py +0 -0
  17. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/cli/__init__.py +0 -0
  18. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/cli/main.py +0 -0
  19. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/cli/quickstart.py +0 -0
  20. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/core/__init__.py +0 -0
  21. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/core/clock.py +0 -0
  22. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/core/event.py +0 -0
  23. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/core/graph.py +0 -0
  24. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/core/ids.py +0 -0
  25. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/core/patch.py +0 -0
  26. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/core/view.py +0 -0
  27. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/errors.py +0 -0
  28. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/frame.py +0 -0
  29. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/llm/__init__.py +0 -0
  30. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/llm/anthropic.py +0 -0
  31. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/llm/cache.py +0 -0
  32. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/llm/errors.py +0 -0
  33. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/llm/openai.py +0 -0
  34. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/llm/parsing.py +0 -0
  35. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/llm/prompt.py +0 -0
  36. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/llm/provider.py +0 -0
  37. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/llm/recorded.py +0 -0
  38. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/llm/types.py +0 -0
  39. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/observability/__init__.py +0 -0
  40. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/observability/logging.py +0 -0
  41. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/observability/metrics.py +0 -0
  42. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/observability/migration.py +0 -0
  43. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/observability/prometheus.py +0 -0
  44. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/observability/status.py +0 -0
  45. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/packs/__init__.py +0 -0
  46. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/packs/diligence/__init__.py +0 -0
  47. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/packs/diligence/behaviors.py +0 -0
  48. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/packs/diligence/fixtures/__init__.py +0 -0
  49. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/packs/diligence/fixtures/companies.py +0 -0
  50. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/packs/diligence/object_types.py +0 -0
  51. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/packs/diligence/prompts/document_researcher.md +0 -0
  52. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/packs/diligence/prompts/memo_synthesizer.md +0 -0
  53. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/packs/diligence/prompts/question_generator.md +0 -0
  54. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/packs/diligence/prompts/risk_identifier.md +0 -0
  55. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/packs/diligence/settings.py +0 -0
  56. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/packs/diligence/tools.py +0 -0
  57. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/packs/loader.py +0 -0
  58. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/packs/scaffold.py +0 -0
  59. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/policy.py +0 -0
  60. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/runtime/__init__.py +0 -0
  61. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/runtime/_live.py +0 -0
  62. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/runtime/behavior_graph.py +0 -0
  63. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/runtime/budget.py +0 -0
  64. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/runtime/config_errors.py +0 -0
  65. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/runtime/diff.py +0 -0
  66. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/runtime/errors.py +0 -0
  67. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/runtime/exec_errors.py +0 -0
  68. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/runtime/patterns.py +0 -0
  69. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/runtime/queue.py +0 -0
  70. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/runtime/registration_errors.py +0 -0
  71. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/runtime/registry.py +0 -0
  72. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/runtime/runtime.py +0 -0
  73. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/runtime/scheduler.py +0 -0
  74. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/runtime/view_builder.py +0 -0
  75. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/store/__init__.py +0 -0
  76. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/store/base.py +0 -0
  77. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/store/conformance.py +0 -0
  78. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/store/errors.py +0 -0
  79. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/store/memory.py +0 -0
  80. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/store/postgres.py +0 -0
  81. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/store/serde.py +0 -0
  82. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/store/sqlite.py +0 -0
  83. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/store/url.py +0 -0
  84. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/tools/__init__.py +0 -0
  85. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/tools/base.py +0 -0
  86. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/tools/cache.py +0 -0
  87. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/tools/context.py +0 -0
  88. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/tools/decorators.py +0 -0
  89. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/tools/errors.py +0 -0
  90. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/tools/graph_query.py +0 -0
  91. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/tools/recorded.py +0 -0
  92. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/tools/web_fetch.py +0 -0
  93. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/trace/__init__.py +0 -0
  94. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/trace/causal.py +0 -0
  95. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph/trace/printer.py +0 -0
  96. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph.egg-info/dependency_links.txt +0 -0
  97. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph.egg-info/entry_points.txt +0 -0
  98. {activegraph-1.0.4 → activegraph-1.0.5.post1}/activegraph.egg-info/top_level.txt +0 -0
  99. {activegraph-1.0.4 → activegraph-1.0.5.post1}/setup.cfg +0 -0
  100. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_activate_after.py +0 -0
  101. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_causal_cross_tool.py +0 -0
  102. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_cli.py +0 -0
  103. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_clock.py +0 -0
  104. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_diff.py +0 -0
  105. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_diligence_pack.py +0 -0
  106. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_diligence_with_tools.py +0 -0
  107. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_doc_site_reachable.py +0 -0
  108. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_errors_format.py +0 -0
  109. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_event.py +0 -0
  110. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_fork.py +0 -0
  111. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_graph.py +0 -0
  112. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_ids.py +0 -0
  113. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_llm_anthropic.py +0 -0
  114. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_llm_behavior.py +0 -0
  115. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_llm_budget.py +0 -0
  116. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_llm_causal.py +0 -0
  117. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_llm_claim_extraction.py +0 -0
  118. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_llm_default_model.py +0 -0
  119. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_llm_determinism.py +0 -0
  120. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_llm_failure.py +0 -0
  121. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_llm_openai.py +0 -0
  122. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_llm_prompt.py +0 -0
  123. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_llm_provider_fixtures.py +0 -0
  124. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_llm_replay.py +0 -0
  125. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_llm_tool_loop.py +0 -0
  126. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_llm_trace.py +0 -0
  127. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_llm_trace_snapshot.py +0 -0
  128. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_llm_types.py +0 -0
  129. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_migration.py +0 -0
  130. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_observability_logging.py +0 -0
  131. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_observability_metrics.py +0 -0
  132. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_operate_example.py +0 -0
  133. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_pack_scaffold.py +0 -0
  134. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_packs.py +0 -0
  135. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_patch.py +0 -0
  136. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_pattern_matcher.py +0 -0
  137. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_pattern_parser.py +0 -0
  138. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_pattern_subscriptions.py +0 -0
  139. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_persistence.py +0 -0
  140. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_postgres_store.py +0 -0
  141. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_quickstart.py +0 -0
  142. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_quickstart_snapshot.py +0 -0
  143. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_replay.py +0 -0
  144. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_replay_trace_snapshot.py +0 -0
  145. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_requeue_unfired.py +0 -0
  146. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_resume_example.py +0 -0
  147. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_runtime.py +0 -0
  148. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_runtime_status.py +0 -0
  149. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_serde.py +0 -0
  150. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_store_conformance.py +0 -0
  151. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_store_url.py +0 -0
  152. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_tool_replay.py +0 -0
  153. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_tool_trace_snapshot.py +0 -0
  154. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_tools.py +0 -0
  155. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_trace.py +0 -0
  156. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_tutorial_snippets.py +0 -0
  157. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_v1_0_1_patches.py +0 -0
  158. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_v1_0_3_behavior_failed_ux.py +0 -0
  159. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_v1_0_3_tool_multiturn.py +0 -0
  160. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_version_sync.py +0 -0
  161. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_view.py +0 -0
  162. {activegraph-1.0.4 → activegraph-1.0.5.post1}/tests/test_wheel_completeness.py +0 -0
@@ -0,0 +1,204 @@
1
+ Copyright 2026 Yohei Nakajima
2
+
3
+
4
+ Apache License
5
+ Version 2.0, January 2004
6
+ http://www.apache.org/licenses/
7
+
8
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
9
+
10
+ 1. Definitions.
11
+
12
+ "License" shall mean the terms and conditions for use, reproduction,
13
+ and distribution as defined by Sections 1 through 9 of this document.
14
+
15
+ "Licensor" shall mean the copyright owner or entity authorized by
16
+ the copyright owner that is granting the License.
17
+
18
+ "Legal Entity" shall mean the union of the acting entity and all
19
+ other entities that control, are controlled by, or are under common
20
+ control with that entity. For the purposes of this definition,
21
+ "control" means (i) the power, direct or indirect, to cause the
22
+ direction or management of such entity, whether by contract or
23
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
24
+ outstanding shares, or (iii) beneficial ownership of such entity.
25
+
26
+ "You" (or "Your") shall mean an individual or Legal Entity
27
+ exercising permissions granted by this License.
28
+
29
+ "Source" form shall mean the preferred form for making modifications,
30
+ including but not limited to software source code, documentation
31
+ source, and configuration files.
32
+
33
+ "Object" form shall mean any form resulting from mechanical
34
+ transformation or translation of a Source form, including but
35
+ not limited to compiled object code, generated documentation,
36
+ and conversions to other media types.
37
+
38
+ "Work" shall mean the work of authorship, whether in Source or
39
+ Object form, made available under the License, as indicated by a
40
+ copyright notice that is included in or attached to the work
41
+ (an example is provided in the Appendix below).
42
+
43
+ "Derivative Works" shall mean any work, whether in Source or Object
44
+ form, that is based on (or derived from) the Work and for which the
45
+ editorial revisions, annotations, elaborations, or other modifications
46
+ represent, as a whole, an original work of authorship. For the purposes
47
+ of this License, Derivative Works shall not include works that remain
48
+ separable from, or merely link (or bind by name) to the interfaces of,
49
+ the Work and Derivative Works thereof.
50
+
51
+ "Contribution" shall mean any work of authorship, including
52
+ the original version of the Work and any modifications or additions
53
+ to that Work or Derivative Works thereof, that is intentionally
54
+ submitted to Licensor for inclusion in the Work by the copyright owner
55
+ or by an individual or Legal Entity authorized to submit on behalf of
56
+ the copyright owner. For the purposes of this definition, "submitted"
57
+ means any form of electronic, verbal, or written communication sent
58
+ to the Licensor or its representatives, including but not limited to
59
+ communication on electronic mailing lists, source code control systems,
60
+ and issue tracking systems that are managed by, or on behalf of, the
61
+ Licensor for the purpose of discussing and improving the Work, but
62
+ excluding communication that is conspicuously marked or otherwise
63
+ designated in writing by the copyright owner as "Not a Contribution."
64
+
65
+ "Contributor" shall mean Licensor and any individual or Legal Entity
66
+ on behalf of whom a Contribution has been received by Licensor and
67
+ subsequently incorporated within the Work.
68
+
69
+ 2. Grant of Copyright License. Subject to the terms and conditions of
70
+ this License, each Contributor hereby grants to You a perpetual,
71
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
72
+ copyright license to reproduce, prepare Derivative Works of,
73
+ publicly display, publicly perform, sublicense, and distribute the
74
+ Work and such Derivative Works in Source or Object form.
75
+
76
+ 3. Grant of Patent License. Subject to the terms and conditions of
77
+ this License, each Contributor hereby grants to You a perpetual,
78
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
79
+ (except as stated in this section) patent license to make, have made,
80
+ use, offer to sell, sell, import, and otherwise transfer the Work,
81
+ where such license applies only to those patent claims licensable
82
+ by such Contributor that are necessarily infringed by their
83
+ Contribution(s) alone or by combination of their Contribution(s)
84
+ with the Work to which such Contribution(s) was submitted. If You
85
+ institute patent litigation against any entity (including a
86
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
87
+ or a Contribution incorporated within the Work constitutes direct
88
+ or contributory patent infringement, then any patent licenses
89
+ granted to You under this License for that Work shall terminate
90
+ as of the date such litigation is filed.
91
+
92
+ 4. Redistribution. You may reproduce and distribute copies of the
93
+ Work or Derivative Works thereof in any medium, with or without
94
+ modifications, and in Source or Object form, provided that You
95
+ meet the following conditions:
96
+
97
+ (a) You must give any other recipients of the Work or
98
+ Derivative Works a copy of this License; and
99
+
100
+ (b) You must cause any modified files to carry prominent notices
101
+ stating that You changed the files; and
102
+
103
+ (c) You must retain, in the Source form of any Derivative Works
104
+ that You distribute, all copyright, patent, trademark, and
105
+ attribution notices from the Source form of the Work,
106
+ excluding those notices that do not pertain to any part of
107
+ the Derivative Works; and
108
+
109
+ (d) If the Work includes a "NOTICE" text file as part of its
110
+ distribution, then any Derivative Works that You distribute must
111
+ include a readable copy of the attribution notices contained
112
+ within such NOTICE file, excluding those notices that do not
113
+ pertain to any part of the Derivative Works, in at least one
114
+ of the following places: within a NOTICE text file distributed
115
+ as part of the Derivative Works; within the Source form or
116
+ documentation, if provided along with the Derivative Works; or,
117
+ within a display generated by the Derivative Works, if and
118
+ wherever such third-party notices normally appear. The contents
119
+ of the NOTICE file are for informational purposes only and
120
+ do not modify the License. You may add Your own attribution
121
+ notices within Derivative Works that You distribute, alongside
122
+ or as an addendum to the NOTICE text from the Work, provided
123
+ that such additional attribution notices cannot be construed
124
+ as modifying the License.
125
+
126
+ You may add Your own copyright statement to Your modifications and
127
+ may provide additional or different license terms and conditions
128
+ for use, reproduction, or distribution of Your modifications, or
129
+ for any such Derivative Works as a whole, provided Your use,
130
+ reproduction, and distribution of the Work otherwise complies with
131
+ the conditions stated in this License.
132
+
133
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
134
+ any Contribution intentionally submitted for inclusion in the Work
135
+ by You to the Licensor shall be under the terms and conditions of
136
+ this License, without any additional terms or conditions.
137
+ Notwithstanding the above, nothing herein shall supersede or modify
138
+ the terms of any separate license agreement you may have executed
139
+ with Licensor regarding such Contributions.
140
+
141
+ 6. Trademarks. This License does not grant permission to use the trade
142
+ names, trademarks, service marks, or product names of the Licensor,
143
+ except as required for reasonable and customary use in describing the
144
+ origin of the Work and reproducing the content of the NOTICE file.
145
+
146
+ 7. Disclaimer of Warranty. Unless required by applicable law or
147
+ agreed to in writing, Licensor provides the Work (and each
148
+ Contributor provides its Contributions) on an "AS IS" BASIS,
149
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
150
+ implied, including, without limitation, any warranties or conditions
151
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
152
+ PARTICULAR PURPOSE. You are solely responsible for determining the
153
+ appropriateness of using or redistributing the Work and assume any
154
+ risks associated with Your exercise of permissions under this License.
155
+
156
+ 8. Limitation of Liability. In no event and under no legal theory,
157
+ whether in tort (including negligence), contract, or otherwise,
158
+ unless required by applicable law (such as deliberate and grossly
159
+ negligent acts) or agreed to in writing, shall any Contributor be
160
+ liable to You for damages, including any direct, indirect, special,
161
+ incidental, or consequential damages of any character arising as a
162
+ result of this License or out of the use or inability to use the
163
+ Work (including but not limited to damages for loss of goodwill,
164
+ work stoppage, computer failure or malfunction, or any and all
165
+ other commercial damages or losses), even if such Contributor
166
+ has been advised of the possibility of such damages.
167
+
168
+ 9. Accepting Warranty or Additional Liability. While redistributing
169
+ the Work or Derivative Works thereof, You may choose to offer,
170
+ and charge a fee for, acceptance of support, warranty, indemnity,
171
+ or other liability obligations and/or rights consistent with this
172
+ License. However, in accepting such obligations, You may act only
173
+ on Your own behalf and on Your sole responsibility, not on behalf
174
+ of any other Contributor, and only if You agree to indemnify,
175
+ defend, and hold each Contributor harmless for any liability
176
+ incurred by, or claims asserted against, such Contributor by reason
177
+ of your accepting any such warranty or additional liability.
178
+
179
+ END OF TERMS AND CONDITIONS
180
+
181
+ APPENDIX: How to apply the Apache License to your work.
182
+
183
+ To apply the Apache License to your work, attach the following
184
+ boilerplate notice, with the fields enclosed by brackets "[]"
185
+ replaced with your own identifying information. (Don't include
186
+ the brackets!) The text should be enclosed in the appropriate
187
+ comment syntax for the file format. We also recommend that a
188
+ file or class name and description of purpose be included on the
189
+ same "printed page" as the copyright notice for easier
190
+ identification within third-party archives.
191
+
192
+ Copyright [yyyy] [name of copyright owner]
193
+
194
+ Licensed under the Apache License, Version 2.0 (the "License");
195
+ you may not use this file except in compliance with the License.
196
+ You may obtain a copy of the License at
197
+
198
+ http://www.apache.org/licenses/LICENSE-2.0
199
+
200
+ Unless required by applicable law or agreed to in writing, software
201
+ distributed under the License is distributed on an "AS IS" BASIS,
202
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
203
+ See the License for the specific language governing permissions and
204
+ limitations under the License.
@@ -0,0 +1,2 @@
1
+ Active Graph
2
+ Copyright 2026 Yohei Nakajima
@@ -1,19 +1,20 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: activegraph
3
- Version: 1.0.4
3
+ Version: 1.0.5.post1
4
4
  Summary: An event-sourced reactive graph runtime for long-running, auditable, agentic systems.
5
5
  Author: Active Graph contributors
6
- License: MIT
6
+ License-Expression: Apache-2.0
7
7
  Project-URL: Homepage, https://github.com/yoheinakajima/activegraph
8
8
  Keywords: graph,agents,event-sourcing,runtime
9
9
  Classifier: Programming Language :: Python :: 3
10
10
  Classifier: Programming Language :: Python :: 3.11
11
11
  Classifier: Programming Language :: Python :: 3.12
12
- Classifier: License :: OSI Approved :: MIT License
13
12
  Classifier: Operating System :: OS Independent
14
13
  Classifier: Development Status :: 3 - Alpha
15
14
  Requires-Python: >=3.11
16
15
  Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ License-File: NOTICE
17
18
  Requires-Dist: click<9,>=8
18
19
  Requires-Dist: pydantic>=2
19
20
  Provides-Extra: llm
@@ -49,6 +50,8 @@ Provides-Extra: docs
49
50
  Requires-Dist: mkdocs>=1.6; extra == "docs"
50
51
  Requires-Dist: mkdocs-material>=9.5; extra == "docs"
51
52
  Requires-Dist: mkdocstrings[python]>=0.24; extra == "docs"
53
+ Requires-Dist: mkdocs-llmstxt>=0.2; extra == "docs"
54
+ Dynamic: license-file
52
55
 
53
56
  # Active Graph
54
57
 
@@ -219,6 +222,13 @@ in [`docs/concepts/relations.md`](https://docs.activegraph.ai/concepts/relations
219
222
  per-error catalog.
220
223
  - **[10-minute tutorial](https://docs.activegraph.ai/quickstart/)** — install
221
224
  to a working custom behavior, including fork-and-diff.
225
+ - **AI coding assistants** — the docs are machine-readable at
226
+ [docs.activegraph.ai/llms.txt](https://docs.activegraph.ai/llms.txt)
227
+ (structured index) and
228
+ [docs.activegraph.ai/llms-full.txt](https://docs.activegraph.ai/llms-full.txt)
229
+ (concatenated full content), generated from the same source markdown
230
+ as the rendered site. Built for AI agents evaluating the framework
231
+ via Claude Code, Cursor, Replit, and similar tooling.
222
232
  - **[CHANGELOG.md](CHANGELOG.md)** — every release, with per-version
223
233
  migration notes.
224
234
  - **[CONTRACT.md](CONTRACT.md)** — locked design decisions, version
@@ -284,13 +294,17 @@ Roadmap items planned for v1.1 are tracked in
284
294
 
285
295
  ## License
286
296
 
287
- MIT.
297
+ Active Graph is licensed under the Apache License 2.0. See
298
+ [LICENSE](LICENSE) for the full text and [NOTICE](NOTICE) for
299
+ the attribution that downstream redistributors must preserve.
288
300
 
289
301
  ## Contributing
290
302
 
291
- The core runtime stays small and sharp. Contributions to packs,
292
- backends, and LLM integrations are especially welcome. Open an issue
293
- before large changes the abstractions are still settling.
303
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for the current contribution
304
+ policy. The framework is in its early public phase: issues are open,
305
+ documentation PRs are welcome, code PRs are maintainer-only with an
306
+ issue-first discussion gate (the abstractions are still settling).
307
+ The policy relaxes as the contributor community matures.
294
308
 
295
309
  **Test discipline:** tests must remain deterministic. No live network
296
310
  calls in CI. LLM and tool tests use recorded fixtures
@@ -167,6 +167,13 @@ in [`docs/concepts/relations.md`](https://docs.activegraph.ai/concepts/relations
167
167
  per-error catalog.
168
168
  - **[10-minute tutorial](https://docs.activegraph.ai/quickstart/)** — install
169
169
  to a working custom behavior, including fork-and-diff.
170
+ - **AI coding assistants** — the docs are machine-readable at
171
+ [docs.activegraph.ai/llms.txt](https://docs.activegraph.ai/llms.txt)
172
+ (structured index) and
173
+ [docs.activegraph.ai/llms-full.txt](https://docs.activegraph.ai/llms-full.txt)
174
+ (concatenated full content), generated from the same source markdown
175
+ as the rendered site. Built for AI agents evaluating the framework
176
+ via Claude Code, Cursor, Replit, and similar tooling.
170
177
  - **[CHANGELOG.md](CHANGELOG.md)** — every release, with per-version
171
178
  migration notes.
172
179
  - **[CONTRACT.md](CONTRACT.md)** — locked design decisions, version
@@ -232,13 +239,17 @@ Roadmap items planned for v1.1 are tracked in
232
239
 
233
240
  ## License
234
241
 
235
- MIT.
242
+ Active Graph is licensed under the Apache License 2.0. See
243
+ [LICENSE](LICENSE) for the full text and [NOTICE](NOTICE) for
244
+ the attribution that downstream redistributors must preserve.
236
245
 
237
246
  ## Contributing
238
247
 
239
- The core runtime stays small and sharp. Contributions to packs,
240
- backends, and LLM integrations are especially welcome. Open an issue
241
- before large changes the abstractions are still settling.
248
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for the current contribution
249
+ policy. The framework is in its early public phase: issues are open,
250
+ documentation PRs are welcome, code PRs are maintainer-only with an
251
+ issue-first discussion gate (the abstractions are still settling).
252
+ The policy relaxes as the contributor community matures.
242
253
 
243
254
  **Test discipline:** tests must remain deterministic. No live network
244
255
  calls in CI. LLM and tool tests use recorded fixtures
@@ -222,4 +222,4 @@ __all__ = [
222
222
  "tool",
223
223
  ]
224
224
 
225
- __version__ = "1.0.4"
225
+ __version__ = "1.0.5.post1"
@@ -1,19 +1,20 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: activegraph
3
- Version: 1.0.4
3
+ Version: 1.0.5.post1
4
4
  Summary: An event-sourced reactive graph runtime for long-running, auditable, agentic systems.
5
5
  Author: Active Graph contributors
6
- License: MIT
6
+ License-Expression: Apache-2.0
7
7
  Project-URL: Homepage, https://github.com/yoheinakajima/activegraph
8
8
  Keywords: graph,agents,event-sourcing,runtime
9
9
  Classifier: Programming Language :: Python :: 3
10
10
  Classifier: Programming Language :: Python :: 3.11
11
11
  Classifier: Programming Language :: Python :: 3.12
12
- Classifier: License :: OSI Approved :: MIT License
13
12
  Classifier: Operating System :: OS Independent
14
13
  Classifier: Development Status :: 3 - Alpha
15
14
  Requires-Python: >=3.11
16
15
  Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ License-File: NOTICE
17
18
  Requires-Dist: click<9,>=8
18
19
  Requires-Dist: pydantic>=2
19
20
  Provides-Extra: llm
@@ -49,6 +50,8 @@ Provides-Extra: docs
49
50
  Requires-Dist: mkdocs>=1.6; extra == "docs"
50
51
  Requires-Dist: mkdocs-material>=9.5; extra == "docs"
51
52
  Requires-Dist: mkdocstrings[python]>=0.24; extra == "docs"
53
+ Requires-Dist: mkdocs-llmstxt>=0.2; extra == "docs"
54
+ Dynamic: license-file
52
55
 
53
56
  # Active Graph
54
57
 
@@ -219,6 +222,13 @@ in [`docs/concepts/relations.md`](https://docs.activegraph.ai/concepts/relations
219
222
  per-error catalog.
220
223
  - **[10-minute tutorial](https://docs.activegraph.ai/quickstart/)** — install
221
224
  to a working custom behavior, including fork-and-diff.
225
+ - **AI coding assistants** — the docs are machine-readable at
226
+ [docs.activegraph.ai/llms.txt](https://docs.activegraph.ai/llms.txt)
227
+ (structured index) and
228
+ [docs.activegraph.ai/llms-full.txt](https://docs.activegraph.ai/llms-full.txt)
229
+ (concatenated full content), generated from the same source markdown
230
+ as the rendered site. Built for AI agents evaluating the framework
231
+ via Claude Code, Cursor, Replit, and similar tooling.
222
232
  - **[CHANGELOG.md](CHANGELOG.md)** — every release, with per-version
223
233
  migration notes.
224
234
  - **[CONTRACT.md](CONTRACT.md)** — locked design decisions, version
@@ -284,13 +294,17 @@ Roadmap items planned for v1.1 are tracked in
284
294
 
285
295
  ## License
286
296
 
287
- MIT.
297
+ Active Graph is licensed under the Apache License 2.0. See
298
+ [LICENSE](LICENSE) for the full text and [NOTICE](NOTICE) for
299
+ the attribution that downstream redistributors must preserve.
288
300
 
289
301
  ## Contributing
290
302
 
291
- The core runtime stays small and sharp. Contributions to packs,
292
- backends, and LLM integrations are especially welcome. Open an issue
293
- before large changes the abstractions are still settling.
303
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for the current contribution
304
+ policy. The framework is in its early public phase: issues are open,
305
+ documentation PRs are welcome, code PRs are maintainer-only with an
306
+ issue-first discussion gate (the abstractions are still settling).
307
+ The policy relaxes as the contributor community matures.
294
308
 
295
309
  **Test discipline:** tests must remain deterministic. No live network
296
310
  calls in CI. LLM and tool tests use recorded fixtures
@@ -1,3 +1,5 @@
1
+ LICENSE
2
+ NOTICE
1
3
  README.md
2
4
  pyproject.toml
3
5
  activegraph/__init__.py
@@ -104,6 +106,7 @@ tests/test_event.py
104
106
  tests/test_fork.py
105
107
  tests/test_graph.py
106
108
  tests/test_ids.py
109
+ tests/test_license.py
107
110
  tests/test_llm_anthropic.py
108
111
  tests/test_llm_behavior.py
109
112
  tests/test_llm_budget.py
@@ -120,6 +123,7 @@ tests/test_llm_tool_loop.py
120
123
  tests/test_llm_trace.py
121
124
  tests/test_llm_trace_snapshot.py
122
125
  tests/test_llm_types.py
126
+ tests/test_llms_txt.py
123
127
  tests/test_migration.py
124
128
  tests/test_observability_logging.py
125
129
  tests/test_observability_metrics.py
@@ -23,6 +23,7 @@ psycopg[binary]<4,>=3.1
23
23
  mkdocs>=1.6
24
24
  mkdocs-material>=9.5
25
25
  mkdocstrings[python]>=0.24
26
+ mkdocs-llmstxt>=0.2
26
27
 
27
28
  [llm]
28
29
  anthropic>=0.40
@@ -1,21 +1,24 @@
1
1
  [build-system]
2
- requires = ["setuptools>=68"]
2
+ # setuptools >= 77.0.3 is required for PEP 639 SPDX license metadata
3
+ # (`license = "Apache-2.0"`, `license-files = [...]`). v1.0.5.post1
4
+ # switches to the SPDX form per CONTRACT v1.0.5.post1 #1.
5
+ requires = ["setuptools>=77.0.3"]
3
6
  build-backend = "setuptools.build_meta"
4
7
 
5
8
  [project]
6
9
  name = "activegraph"
7
- version = "1.0.4"
10
+ version = "1.0.5.post1"
8
11
  description = "An event-sourced reactive graph runtime for long-running, auditable, agentic systems."
9
12
  readme = "README.md"
10
13
  requires-python = ">=3.11"
11
- license = { text = "MIT" }
14
+ license = "Apache-2.0"
15
+ license-files = ["LICENSE", "NOTICE"]
12
16
  authors = [{ name = "Active Graph contributors" }]
13
17
  keywords = ["graph", "agents", "event-sourcing", "runtime"]
14
18
  classifiers = [
15
19
  "Programming Language :: Python :: 3",
16
20
  "Programming Language :: Python :: 3.11",
17
21
  "Programming Language :: Python :: 3.12",
18
- "License :: OSI Approved :: MIT License",
19
22
  "Operating System :: OS Independent",
20
23
  "Development Status :: 3 - Alpha",
21
24
  ]
@@ -65,6 +68,12 @@ docs = [
65
68
  "mkdocs>=1.6",
66
69
  "mkdocs-material>=9.5",
67
70
  "mkdocstrings[python]>=0.24",
71
+ # v1.0.5 #1: generates /llms.txt and /llms-full.txt at the site
72
+ # root so AI coding assistants fetching docs.activegraph.ai get
73
+ # clean markdown instead of mkdocs-rendered HTML. Same maintainer
74
+ # as mkdocstrings; native dual-output via the `full_output:` config
75
+ # key. Surfaced by the v1.0.4 external user-test.
76
+ "mkdocs-llmstxt>=0.2",
68
77
  ]
69
78
 
70
79
  [project.scripts]
@@ -66,6 +66,22 @@ _DOCS_URL_RE = re.compile(
66
66
  )
67
67
 
68
68
 
69
+ # URLs that are generated at build time and do NOT correspond to a
70
+ # `docs/*.md` source file. These bypass the source-presence check
71
+ # because their existence is verified by a dedicated build-time gate
72
+ # rather than by source-tree presence.
73
+ #
74
+ # `/llms.txt` and `/llms-full.txt` (CONTRACT v1.0.5 #1) are emitted by
75
+ # the `mkdocs-llmstxt` plugin during `mkdocs build`; their existence
76
+ # and well-formedness are verified by `tests/test_llms_txt.py`. Any
77
+ # URL added here must have a paired build-time test asserting the
78
+ # file lands at the site root.
79
+ _BUILD_GENERATED_URLS = frozenset({
80
+ "/llms.txt",
81
+ "/llms-full.txt",
82
+ })
83
+
84
+
69
85
  def _strip_trailing_punct(s: str) -> str:
70
86
  """URLs in prose often end at sentence boundaries; trim trailing
71
87
  punctuation that isn't part of the URL."""
@@ -181,6 +197,10 @@ def test_every_referenced_docs_url_has_a_source_page() -> None:
181
197
  missing: dict[Path, list[tuple[str, list[Path]]]] = {}
182
198
  unmapped: list[tuple[str, list[Path]]] = []
183
199
  for url_path, sources in referenced.items():
200
+ if url_path in _BUILD_GENERATED_URLS:
201
+ # Existence guaranteed by tests/test_llms_txt.py at build
202
+ # time; no docs/*.md source to check.
203
+ continue
184
204
  expected = _url_to_source_path(url_path)
185
205
  if expected is None:
186
206
  unmapped.append((url_path, sources))
@@ -0,0 +1,149 @@
1
+ """License-state gate. CONTRACT v1.0.5.post1 #1.
2
+
3
+ Anchors on the contract boundary the v1.0.5.post1 #1 amendment names:
4
+ "Active Graph is licensed under Apache 2.0 from v1.0.5.post1 forward."
5
+ That claim binds five surfaces jointly — LICENSE carries the canonical
6
+ Apache text (including the patent-grant section that is the named
7
+ reason for the switch), NOTICE carries the project name and copyright
8
+ line, pyproject.toml's license field reads SPDX `Apache-2.0`, no
9
+ `License ::` classifier remains in pyproject.toml (PEP 639 forbids it
10
+ when the SPDX form is used), and README's license section references
11
+ Apache 2.0.
12
+
13
+ The test does not assert byte-equality of LICENSE against the Apache
14
+ Foundation's canonical text. The contract claim is the license
15
+ identity, not the file's byte-level shape; a future trailing-newline
16
+ adjustment should not break the gate, but a license-identity drift
17
+ should. Standing Rule §2.
18
+ """
19
+
20
+ from __future__ import annotations
21
+
22
+ import sys
23
+ import tomllib
24
+ from pathlib import Path
25
+
26
+ REPO_ROOT = Path(__file__).resolve().parent.parent
27
+
28
+
29
+ def _read(path: Path) -> str:
30
+ return path.read_text(encoding="utf-8")
31
+
32
+
33
+ def test_license_file_carries_apache_2_canonical_text() -> None:
34
+ """LICENSE must carry the Apache 2.0 canonical heading and the
35
+ §3 patent-grant section. The patent grant is the load-bearing
36
+ reason named in the v1.0.5.post1 #1 amendment for switching off
37
+ MIT — a future LICENSE that loses it would silently violate the
38
+ contract claim."""
39
+ license_path = REPO_ROOT / "LICENSE"
40
+ assert license_path.exists(), (
41
+ "LICENSE missing from repo root. CONTRACT v1.0.5.post1 #1 "
42
+ "names LICENSE as one of the four repo-root files carrying "
43
+ "the Apache 2.0 license claim."
44
+ )
45
+ text = _read(license_path)
46
+ assert "Apache License" in text, (
47
+ "LICENSE does not contain the 'Apache License' heading. "
48
+ "CONTRACT v1.0.5.post1 #1 binds the framework to Apache 2.0."
49
+ )
50
+ assert "Version 2.0, January 2004" in text, (
51
+ "LICENSE does not contain the Apache 2.0 version line. "
52
+ "CONTRACT v1.0.5.post1 #1 names the specific version."
53
+ )
54
+ assert "Grant of Patent License" in text, (
55
+ "LICENSE does not contain the §3 'Grant of Patent License' "
56
+ "section. The patent grant is the named reason in CONTRACT "
57
+ "v1.0.5.post1 #1 for switching from MIT to Apache 2.0; "
58
+ "losing it would silently violate the contract claim."
59
+ )
60
+
61
+
62
+ def test_notice_file_carries_attribution() -> None:
63
+ """NOTICE must carry the project name and the copyright line per
64
+ Apache 2.0 §4(d) convention. The NOTICE pair with LICENSE is what
65
+ downstream redistributors must preserve."""
66
+ notice_path = REPO_ROOT / "NOTICE"
67
+ assert notice_path.exists(), (
68
+ "NOTICE missing from repo root. CONTRACT v1.0.5.post1 #1 "
69
+ "names NOTICE as part of the Apache 2.0 §4(d) attribution "
70
+ "surface that v1.0.5.post1 ships."
71
+ )
72
+ text = _read(notice_path)
73
+ assert "Active Graph" in text, "NOTICE does not name the project."
74
+ assert "Copyright 2026 Yohei Nakajima" in text, (
75
+ "NOTICE does not carry the canonical copyright line "
76
+ "named in CONTRACT v1.0.5.post1 #1."
77
+ )
78
+
79
+
80
+ def test_pyproject_license_is_spdx_apache_2_0() -> None:
81
+ """pyproject.toml's [project] table must declare the SPDX
82
+ identifier `Apache-2.0`. The PEP 639 SPDX form is the boundary
83
+ the contract claim names; drift back to `{ text = "MIT" }` or
84
+ to another SPDX identifier breaks this anchor."""
85
+ data = tomllib.loads((REPO_ROOT / "pyproject.toml").read_text())
86
+ license_field = data["project"]["license"]
87
+ assert license_field == "Apache-2.0", (
88
+ f"pyproject.toml [project].license = {license_field!r} but "
89
+ f"CONTRACT v1.0.5.post1 #1 binds it to the SPDX string "
90
+ f"'Apache-2.0' (PEP 639)."
91
+ )
92
+
93
+
94
+ def test_pyproject_carries_no_license_classifier() -> None:
95
+ """PEP 639 forbids `License ::` classifiers when the SPDX
96
+ `license` field is used. CONTRACT v1.0.5.post1 #1 names the
97
+ removal of the `License :: OSI Approved :: MIT License`
98
+ classifier as part of the switch."""
99
+ data = tomllib.loads((REPO_ROOT / "pyproject.toml").read_text())
100
+ classifiers = data["project"].get("classifiers", [])
101
+ offenders = [c for c in classifiers if c.startswith("License ::")]
102
+ assert offenders == [], (
103
+ f"pyproject.toml carries `License ::` classifier(s) "
104
+ f"{offenders!r}. PEP 639 forbids these when `license` is in "
105
+ f"SPDX form; CONTRACT v1.0.5.post1 #1 binds the metadata to "
106
+ f"the SPDX-only shape."
107
+ )
108
+
109
+
110
+ def test_readme_license_section_names_apache_2_0() -> None:
111
+ """README's `## License` section must reference Apache 2.0.
112
+ Catches a documentation drift back to 'MIT' in the public-facing
113
+ surface that a casual reader hits first."""
114
+ readme = _read(REPO_ROOT / "README.md")
115
+ # Extract the `## License` section body (between the header and
116
+ # the next H2). The contract claim binds this section to the
117
+ # Apache 2.0 reference.
118
+ marker = "## License"
119
+ start = readme.find(marker)
120
+ assert start != -1, "README missing `## License` section."
121
+ after = readme[start + len(marker) :]
122
+ next_h2 = after.find("\n## ")
123
+ section = after if next_h2 == -1 else after[:next_h2]
124
+ assert "Apache License 2.0" in section, (
125
+ "README's `## License` section does not name 'Apache License "
126
+ "2.0'. CONTRACT v1.0.5.post1 #1 binds the README to the "
127
+ "Apache 2.0 reference."
128
+ )
129
+ assert "LICENSE" in section, (
130
+ "README's `## License` section does not point at the LICENSE "
131
+ "file. The contract claim binds the README to the LICENSE "
132
+ "pointer so a reader can reach the canonical text."
133
+ )
134
+ assert "MIT" not in section, (
135
+ "README's `## License` section still mentions 'MIT'. "
136
+ "CONTRACT v1.0.5.post1 #1 retired the MIT declaration."
137
+ )
138
+
139
+
140
+ def test_tomllib_available() -> None:
141
+ """Sanity check — tomllib ships in Python >= 3.11. The framework
142
+ declares `requires-python = ">=3.11"` in pyproject.toml, so this
143
+ is structurally true; the check is a fail-fast for any future
144
+ Python-version drift that would break the other assertions in
145
+ this file."""
146
+ assert sys.version_info >= (3, 11), (
147
+ "tomllib requires Python >= 3.11; activegraph's "
148
+ "requires-python matches this floor."
149
+ )