associate 0.10.0__tar.gz → 0.11.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 (325) hide show
  1. {associate-0.10.0 → associate-0.11.0}/.github/workflows/publish.yml +45 -0
  2. {associate-0.10.0 → associate-0.11.0}/.github/workflows/tests.yml +46 -0
  3. {associate-0.10.0 → associate-0.11.0}/.gitignore +8 -0
  4. {associate-0.10.0 → associate-0.11.0}/.markdownlint-cli2.yaml +6 -0
  5. {associate-0.10.0 → associate-0.11.0}/CHANGELOG.md +102 -0
  6. {associate-0.10.0 → associate-0.11.0}/CLAUDE.md +90 -5
  7. {associate-0.10.0 → associate-0.11.0}/PKG-INFO +53 -4
  8. {associate-0.10.0 → associate-0.11.0}/README.md +47 -3
  9. associate-0.11.0/associate/bridge/__init__.py +11 -0
  10. associate-0.11.0/associate/bridge/access.py +336 -0
  11. associate-0.11.0/associate/bridge/caching.py +47 -0
  12. associate-0.11.0/associate/bridge/filetokens.py +140 -0
  13. associate-0.11.0/associate/bridge/guards.py +84 -0
  14. associate-0.11.0/associate/bridge/mcpserver.py +167 -0
  15. associate-0.11.0/associate/bridge/origin.py +131 -0
  16. associate-0.11.0/associate/bridge/policy.py +127 -0
  17. associate-0.11.0/associate/bridge/principal.py +98 -0
  18. associate-0.11.0/associate/bridge/resolve.py +134 -0
  19. associate-0.11.0/associate/bridge/static.py +135 -0
  20. associate-0.11.0/associate/bridge/tokens.py +230 -0
  21. {associate-0.10.0 → associate-0.11.0}/associate/cli/__init__.py +8 -0
  22. {associate-0.10.0 → associate-0.11.0}/associate/cli/_commands/learn.py +41 -0
  23. associate-0.11.0/associate/cli/_commands/mcp.py +38 -0
  24. {associate-0.10.0 → associate-0.11.0}/associate/cli/_commands/overview.py +3 -0
  25. associate-0.11.0/associate/cli/_commands/runs.py +190 -0
  26. associate-0.11.0/associate/cli/_commands/serve.py +112 -0
  27. associate-0.11.0/associate/cli/_commands/tokens.py +151 -0
  28. {associate-0.10.0 → associate-0.11.0}/associate/explain/catalog.py +234 -0
  29. associate-0.11.0/associate/runs/__init__.py +6 -0
  30. associate-0.11.0/associate/runs/mcp_tools.py +82 -0
  31. associate-0.11.0/associate/runs/service.py +919 -0
  32. associate-0.11.0/associate/runs/state.py +157 -0
  33. associate-0.11.0/associate/runs/supervisor.py +242 -0
  34. associate-0.11.0/associate/server/__init__.py +4 -0
  35. associate-0.11.0/associate/server/app.py +298 -0
  36. associate-0.11.0/associate/server/serve.py +352 -0
  37. associate-0.11.0/associate/server/tokenstore.py +46 -0
  38. associate-0.11.0/associate/web_dist/assets/albert-sans-latin-ext-wght-normal-BAo4qCk1.woff2 +0 -0
  39. associate-0.11.0/associate/web_dist/assets/albert-sans-latin-wght-normal-BJ0ssN8N.woff2 +0 -0
  40. associate-0.11.0/associate/web_dist/assets/fraunces-latin-ext-wght-normal-Ca2vKHc0.woff2 +0 -0
  41. associate-0.11.0/associate/web_dist/assets/fraunces-latin-wght-normal-ukD16Tqj.woff2 +0 -0
  42. associate-0.11.0/associate/web_dist/assets/fraunces-vietnamese-wght-normal-CnvboYUG.woff2 +0 -0
  43. associate-0.11.0/associate/web_dist/assets/index-IbtklPgE.css +1 -0
  44. associate-0.11.0/associate/web_dist/assets/index-YpORTsP3.js +52 -0
  45. associate-0.11.0/associate/web_dist/assets/index-YpORTsP3.js.map +1 -0
  46. associate-0.11.0/associate/web_dist/index.html +16 -0
  47. associate-0.11.0/docs/operations/bridge.md +562 -0
  48. associate-0.11.0/hatch_build.py +66 -0
  49. {associate-0.10.0 → associate-0.11.0}/pyproject.toml +22 -1
  50. {associate-0.10.0 → associate-0.11.0}/sonar-project.properties +12 -4
  51. associate-0.11.0/tests/bridge/__init__.py +0 -0
  52. associate-0.11.0/tests/bridge/jwks.py +94 -0
  53. associate-0.11.0/tests/bridge/memstore.py +52 -0
  54. associate-0.11.0/tests/bridge/test_access_jwt.py +308 -0
  55. associate-0.11.0/tests/bridge/test_boundary.py +80 -0
  56. associate-0.11.0/tests/bridge/test_caching.py +46 -0
  57. associate-0.11.0/tests/bridge/test_filetokens.py +95 -0
  58. associate-0.11.0/tests/bridge/test_guards.py +80 -0
  59. associate-0.11.0/tests/bridge/test_mcpserver.py +142 -0
  60. associate-0.11.0/tests/bridge/test_policy.py +88 -0
  61. associate-0.11.0/tests/bridge/test_principal_and_tokens.py +142 -0
  62. associate-0.11.0/tests/bridge/test_resolve.py +119 -0
  63. associate-0.11.0/tests/bridge/test_static.py +146 -0
  64. associate-0.11.0/tests/rawasgi.py +95 -0
  65. associate-0.11.0/tests/runs_fake_child.py +93 -0
  66. associate-0.11.0/tests/test_base_install.py +343 -0
  67. associate-0.11.0/tests/test_ci_workflows.py +126 -0
  68. associate-0.11.0/tests/test_hatch_build.py +90 -0
  69. associate-0.11.0/tests/test_mcp.py +253 -0
  70. associate-0.11.0/tests/test_raw_paths.py +137 -0
  71. associate-0.11.0/tests/test_runs.py +533 -0
  72. associate-0.11.0/tests/test_runs_body_cap.py +130 -0
  73. associate-0.11.0/tests/test_runs_csrf.py +262 -0
  74. associate-0.11.0/tests/test_runs_delegate_lock.py +42 -0
  75. associate-0.11.0/tests/test_runs_http.py +147 -0
  76. associate-0.11.0/tests/test_runs_starting.py +204 -0
  77. associate-0.11.0/tests/test_runs_ui_fields.py +344 -0
  78. associate-0.11.0/tests/test_serve_cli.py +195 -0
  79. associate-0.11.0/tests/test_serve_config.py +136 -0
  80. associate-0.11.0/tests/test_serve_listeners.py +274 -0
  81. associate-0.11.0/tests/test_surface_parity.py +491 -0
  82. associate-0.11.0/tests/test_web_contract.py +134 -0
  83. associate-0.11.0/tests/test_web_ui.py +198 -0
  84. associate-0.11.0/uv.lock +1226 -0
  85. associate-0.11.0/web/index.html +15 -0
  86. associate-0.11.0/web/package-lock.json +3891 -0
  87. associate-0.11.0/web/package.json +41 -0
  88. associate-0.11.0/web/scripts/check-tokens.mjs +85 -0
  89. associate-0.11.0/web/src/App.test.tsx +39 -0
  90. associate-0.11.0/web/src/App.tsx +34 -0
  91. associate-0.11.0/web/src/api/client.test.ts +126 -0
  92. associate-0.11.0/web/src/api/client.ts +150 -0
  93. associate-0.11.0/web/src/api/routes.json +5 -0
  94. associate-0.11.0/web/src/api/runs.ts +16 -0
  95. associate-0.11.0/web/src/api/types.ts +91 -0
  96. associate-0.11.0/web/src/components/Header.tsx +32 -0
  97. associate-0.11.0/web/src/components/Problem.tsx +38 -0
  98. associate-0.11.0/web/src/components/StatusPill.tsx +16 -0
  99. associate-0.11.0/web/src/culture-design/README.md +36 -0
  100. associate-0.11.0/web/src/culture-design/tokens.css +545 -0
  101. associate-0.11.0/web/src/fixtures/runs.json +369 -0
  102. associate-0.11.0/web/src/hooks/useLoad.ts +62 -0
  103. associate-0.11.0/web/src/hooks/usePolling.test.tsx +52 -0
  104. associate-0.11.0/web/src/hooks/usePolling.ts +43 -0
  105. associate-0.11.0/web/src/hooks/useRunsList.tsx +40 -0
  106. associate-0.11.0/web/src/hooks/useTitle.ts +8 -0
  107. associate-0.11.0/web/src/main.tsx +29 -0
  108. associate-0.11.0/web/src/model/runs.test.ts +220 -0
  109. associate-0.11.0/web/src/model/runs.ts +175 -0
  110. associate-0.11.0/web/src/routes/Run.test.tsx +314 -0
  111. associate-0.11.0/web/src/routes/Run.tsx +279 -0
  112. associate-0.11.0/web/src/routes/Runs.test.tsx +336 -0
  113. associate-0.11.0/web/src/routes/Runs.tsx +157 -0
  114. associate-0.11.0/web/src/styles/app.css +532 -0
  115. associate-0.11.0/web/src/test/api.ts +83 -0
  116. associate-0.11.0/web/src/test/render.tsx +12 -0
  117. associate-0.11.0/web/tsconfig.app.json +27 -0
  118. associate-0.11.0/web/tsconfig.json +8 -0
  119. associate-0.11.0/web/tsconfig.node.json +25 -0
  120. associate-0.11.0/web/vite.config.ts +49 -0
  121. associate-0.11.0/web/vitest.setup.ts +26 -0
  122. associate-0.10.0/uv.lock +0 -478
  123. {associate-0.10.0 → associate-0.11.0}/.claude/skills/agent-config/SKILL.md +0 -0
  124. {associate-0.10.0 → associate-0.11.0}/.claude/skills/agent-config/data/backend-fingerprints.yaml +0 -0
  125. {associate-0.10.0 → associate-0.11.0}/.claude/skills/agent-config/scripts/show.sh +0 -0
  126. {associate-0.10.0 → associate-0.11.0}/.claude/skills/ask-colleague/SKILL.md +0 -0
  127. {associate-0.10.0 → associate-0.11.0}/.claude/skills/ask-colleague/prompts/explore.md +0 -0
  128. {associate-0.10.0 → associate-0.11.0}/.claude/skills/ask-colleague/prompts/review.md +0 -0
  129. {associate-0.10.0 → associate-0.11.0}/.claude/skills/ask-colleague/prompts/write.md +0 -0
  130. {associate-0.10.0 → associate-0.11.0}/.claude/skills/ask-colleague/scripts/ask-colleague.sh +0 -0
  131. {associate-0.10.0 → associate-0.11.0}/.claude/skills/assign-to-workforce/SKILL.md +0 -0
  132. {associate-0.10.0 → associate-0.11.0}/.claude/skills/assign-to-workforce/scripts/assign-to-workforce.sh +0 -0
  133. {associate-0.10.0 → associate-0.11.0}/.claude/skills/challenge/SKILL.md +0 -0
  134. {associate-0.10.0 → associate-0.11.0}/.claude/skills/cicd/SKILL.md +0 -0
  135. {associate-0.10.0 → associate-0.11.0}/.claude/skills/cicd/scripts/_resolve-nick.sh +0 -0
  136. {associate-0.10.0 → associate-0.11.0}/.claude/skills/cicd/scripts/portability-lint.sh +0 -0
  137. {associate-0.10.0 → associate-0.11.0}/.claude/skills/cicd/scripts/pr-reply.sh +0 -0
  138. {associate-0.10.0 → associate-0.11.0}/.claude/skills/cicd/scripts/pr-status.sh +0 -0
  139. {associate-0.10.0 → associate-0.11.0}/.claude/skills/cicd/scripts/workflow.sh +0 -0
  140. {associate-0.10.0 → associate-0.11.0}/.claude/skills/communicate/SKILL.md +0 -0
  141. {associate-0.10.0 → associate-0.11.0}/.claude/skills/communicate/scripts/fetch-issues.sh +0 -0
  142. {associate-0.10.0 → associate-0.11.0}/.claude/skills/communicate/scripts/mesh-message.sh +0 -0
  143. {associate-0.10.0 → associate-0.11.0}/.claude/skills/communicate/scripts/post-comment.sh +0 -0
  144. {associate-0.10.0 → associate-0.11.0}/.claude/skills/communicate/scripts/post-issue.sh +0 -0
  145. {associate-0.10.0 → associate-0.11.0}/.claude/skills/communicate/scripts/templates/skill-new-brief.md +0 -0
  146. {associate-0.10.0 → associate-0.11.0}/.claude/skills/communicate/scripts/templates/skill-update-brief.md +0 -0
  147. {associate-0.10.0 → associate-0.11.0}/.claude/skills/deviate/SKILL.md +0 -0
  148. {associate-0.10.0 → associate-0.11.0}/.claude/skills/doc-test-alignment/SKILL.md +0 -0
  149. {associate-0.10.0 → associate-0.11.0}/.claude/skills/doc-test-alignment/scripts/check.sh +0 -0
  150. {associate-0.10.0 → associate-0.11.0}/.claude/skills/pypi-maintainer/SKILL.md +0 -0
  151. {associate-0.10.0 → associate-0.11.0}/.claude/skills/pypi-maintainer/scripts/switch-source.sh +0 -0
  152. {associate-0.10.0 → associate-0.11.0}/.claude/skills/recall/SKILL.md +0 -0
  153. {associate-0.10.0 → associate-0.11.0}/.claude/skills/recall/scripts/recall.sh +0 -0
  154. {associate-0.10.0 → associate-0.11.0}/.claude/skills/remember/SKILL.md +0 -0
  155. {associate-0.10.0 → associate-0.11.0}/.claude/skills/remember/scripts/remember.sh +0 -0
  156. {associate-0.10.0 → associate-0.11.0}/.claude/skills/run-tests/SKILL.md +0 -0
  157. {associate-0.10.0 → associate-0.11.0}/.claude/skills/run-tests/scripts/test.sh +0 -0
  158. {associate-0.10.0 → associate-0.11.0}/.claude/skills/scope/SKILL.md +0 -0
  159. {associate-0.10.0 → associate-0.11.0}/.claude/skills/sonarclaude/SKILL.md +0 -0
  160. {associate-0.10.0 → associate-0.11.0}/.claude/skills/sonarclaude/scripts/sonar.sh +0 -0
  161. {associate-0.10.0 → associate-0.11.0}/.claude/skills/spec-to-plan/SKILL.md +0 -0
  162. {associate-0.10.0 → associate-0.11.0}/.claude/skills/spec-to-plan/scripts/spec-to-plan.sh +0 -0
  163. {associate-0.10.0 → associate-0.11.0}/.claude/skills/summarize-delivery/SKILL.md +0 -0
  164. {associate-0.10.0 → associate-0.11.0}/.claude/skills/think/SKILL.md +0 -0
  165. {associate-0.10.0 → associate-0.11.0}/.claude/skills/think/scripts/think.sh +0 -0
  166. {associate-0.10.0 → associate-0.11.0}/.claude/skills/validate-delivery/SKILL.md +0 -0
  167. {associate-0.10.0 → associate-0.11.0}/.claude/skills/version-bump/SKILL.md +0 -0
  168. {associate-0.10.0 → associate-0.11.0}/.claude/skills/version-bump/scripts/bump.py +0 -0
  169. {associate-0.10.0 → associate-0.11.0}/.claude/skills.local.yaml.example +0 -0
  170. {associate-0.10.0 → associate-0.11.0}/.devague/current +0 -0
  171. {associate-0.10.0 → associate-0.11.0}/.devague/current_plan +0 -0
  172. {associate-0.10.0 → associate-0.11.0}/.devague/deliveries/associate-multi-model-on-pi-1-1-0.json +0 -0
  173. {associate-0.10.0 → associate-0.11.0}/.devague/deliveries/associate-on-pi-with-opinionated-tools.json +0 -0
  174. {associate-0.10.0 → associate-0.11.0}/.devague/frames/associate-multi-model-on-pi-1-1-0.json +0 -0
  175. {associate-0.10.0 → associate-0.11.0}/.devague/frames/associate-on-pi-with-opinionated-tools.json +0 -0
  176. {associate-0.10.0 → associate-0.11.0}/.devague/frames/webglass-code-lens-as-tools.json +0 -0
  177. {associate-0.10.0 → associate-0.11.0}/.devague/plans/associate-multi-model-on-pi-1-1-0.json +0 -0
  178. {associate-0.10.0 → associate-0.11.0}/.devague/plans/associate-on-pi-with-opinionated-tools.json +0 -0
  179. {associate-0.10.0 → associate-0.11.0}/.devague/plans/webglass-code-lens-as-tools.json +0 -0
  180. {associate-0.10.0 → associate-0.11.0}/.flake8 +0 -0
  181. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/index.ts +0 -0
  182. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/lib/contain.ts +0 -0
  183. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/lib/context.ts +0 -0
  184. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/lib/contract.ts +0 -0
  185. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/lib/diff.ts +0 -0
  186. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/lib/gate.ts +0 -0
  187. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/lib/guard.ts +0 -0
  188. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/lib/handback.ts +0 -0
  189. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/lib/paths.ts +0 -0
  190. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/lib/preflight.ts +0 -0
  191. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/lib/prompt.ts +0 -0
  192. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/lib/provider.ts +0 -0
  193. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/lib/runtime.ts +0 -0
  194. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/lib/session.ts +0 -0
  195. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/lib/statements.ts +0 -0
  196. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/lib/toolset.ts +0 -0
  197. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/lib/torch.ts +0 -0
  198. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/lib/trust.ts +0 -0
  199. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/lib/walk.ts +0 -0
  200. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/prompts/cortex.md +0 -0
  201. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/prompts/senses.md +0 -0
  202. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/prompts/super-vl.md +0 -0
  203. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/prompts/worker.md +0 -0
  204. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/codelens.test.ts +0 -0
  205. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/contain.test.ts +0 -0
  206. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/contract.test.ts +0 -0
  207. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/delegate.test.ts +0 -0
  208. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/diff.test.ts +0 -0
  209. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/eidetic.test.ts +0 -0
  210. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/extension.test.ts +0 -0
  211. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/gate.test.ts +0 -0
  212. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/guard.test.ts +0 -0
  213. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/ledger.test.ts +0 -0
  214. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/load-extension.ts +0 -0
  215. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/pi-integration.test.ts +0 -0
  216. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/preflight.test.ts +0 -0
  217. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/prompt.test.ts +0 -0
  218. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/provider.test.ts +0 -0
  219. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/read-image.test.ts +0 -0
  220. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/read.test.ts +0 -0
  221. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/run.sh +0 -0
  222. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/runtime.test.ts +0 -0
  223. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/search.test.ts +0 -0
  224. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/session.test.ts +0 -0
  225. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/shell.test.ts +0 -0
  226. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/smoke.test.ts +0 -0
  227. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/spawn.test.ts +0 -0
  228. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/statements.test.ts +0 -0
  229. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/stubs/typebox.ts +0 -0
  230. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/tests-tool.test.ts +0 -0
  231. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/toolcall.test.ts +0 -0
  232. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/toolset.test.ts +0 -0
  233. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/torch.test.ts +0 -0
  234. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/walk.test.ts +0 -0
  235. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tests/web.test.ts +0 -0
  236. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tools/.gitkeep +0 -0
  237. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tools/_procs.ts +0 -0
  238. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tools/codelens.ts +0 -0
  239. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tools/delegate.ts +0 -0
  240. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tools/eidetic.ts +0 -0
  241. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tools/ledger.ts +0 -0
  242. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tools/read.ts +0 -0
  243. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tools/search.ts +0 -0
  244. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tools/shell.ts +0 -0
  245. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tools/spawn.ts +0 -0
  246. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tools/tests.ts +0 -0
  247. {associate-0.10.0 → associate-0.11.0}/.pi/extensions/associate/tools/web.ts +0 -0
  248. {associate-0.10.0 → associate-0.11.0}/.pi/settings.json +0 -0
  249. {associate-0.10.0 → associate-0.11.0}/AGENTS.colleague.md +0 -0
  250. {associate-0.10.0 → associate-0.11.0}/AGENTS.md +0 -0
  251. {associate-0.10.0 → associate-0.11.0}/LICENSE +0 -0
  252. {associate-0.10.0 → associate-0.11.0}/associate/__init__.py +0 -0
  253. {associate-0.10.0 → associate-0.11.0}/associate/__main__.py +0 -0
  254. {associate-0.10.0 → associate-0.11.0}/associate/bench/__init__.py +0 -0
  255. {associate-0.10.0 → associate-0.11.0}/associate/bench/config.py +0 -0
  256. {associate-0.10.0 → associate-0.11.0}/associate/bench/public.py +0 -0
  257. {associate-0.10.0 → associate-0.11.0}/associate/bench/runner.py +0 -0
  258. {associate-0.10.0 → associate-0.11.0}/associate/bench/suites.json +0 -0
  259. {associate-0.10.0 → associate-0.11.0}/associate/bench/table.py +0 -0
  260. {associate-0.10.0 → associate-0.11.0}/associate/bench/walkstats.py +0 -0
  261. {associate-0.10.0 → associate-0.11.0}/associate/cli/_commands/__init__.py +0 -0
  262. {associate-0.10.0 → associate-0.11.0}/associate/cli/_commands/bench.py +0 -0
  263. {associate-0.10.0 → associate-0.11.0}/associate/cli/_commands/cli.py +0 -0
  264. {associate-0.10.0 → associate-0.11.0}/associate/cli/_commands/doctor.py +0 -0
  265. {associate-0.10.0 → associate-0.11.0}/associate/cli/_commands/explain.py +0 -0
  266. {associate-0.10.0 → associate-0.11.0}/associate/cli/_commands/run.py +0 -0
  267. {associate-0.10.0 → associate-0.11.0}/associate/cli/_commands/whoami.py +0 -0
  268. {associate-0.10.0 → associate-0.11.0}/associate/cli/_errors.py +0 -0
  269. {associate-0.10.0 → associate-0.11.0}/associate/cli/_output.py +0 -0
  270. {associate-0.10.0 → associate-0.11.0}/associate/contract/__init__.py +0 -0
  271. {associate-0.10.0 → associate-0.11.0}/associate/contract/gate.json +0 -0
  272. {associate-0.10.0 → associate-0.11.0}/associate/contract/models.json +0 -0
  273. {associate-0.10.0 → associate-0.11.0}/associate/contract/policy.json +0 -0
  274. {associate-0.10.0 → associate-0.11.0}/associate/contract/role.json +0 -0
  275. {associate-0.10.0 → associate-0.11.0}/associate/contract/schemas/gate.schema.json +0 -0
  276. {associate-0.10.0 → associate-0.11.0}/associate/contract/schemas/models.schema.json +0 -0
  277. {associate-0.10.0 → associate-0.11.0}/associate/contract/schemas/statements.schema.json +0 -0
  278. {associate-0.10.0 → associate-0.11.0}/associate/contract/schemas/task.schema.json +0 -0
  279. {associate-0.10.0 → associate-0.11.0}/associate/contract/schemas/walk.schema.json +0 -0
  280. {associate-0.10.0 → associate-0.11.0}/associate/contract/validate.py +0 -0
  281. {associate-0.10.0 → associate-0.11.0}/associate/explain/__init__.py +0 -0
  282. {associate-0.10.0 → associate-0.11.0}/associate/harness/__init__.py +0 -0
  283. {associate-0.10.0 → associate-0.11.0}/associate/harness/base.py +0 -0
  284. {associate-0.10.0 → associate-0.11.0}/associate/harness/checkoutlock.py +0 -0
  285. {associate-0.10.0 → associate-0.11.0}/associate/harness/pi.py +0 -0
  286. {associate-0.10.0 → associate-0.11.0}/associate/harness/stub.py +0 -0
  287. {associate-0.10.0 → associate-0.11.0}/associate/harness/testcmds.py +0 -0
  288. {associate-0.10.0 → associate-0.11.0}/associate/harness/worktree.py +0 -0
  289. {associate-0.10.0 → associate-0.11.0}/culture.yaml +0 -0
  290. {associate-0.10.0 → associate-0.11.0}/docs/deliveries/2026-09-12-associate-on-pi-with-opinionated-tools.md +0 -0
  291. {associate-0.10.0 → associate-0.11.0}/docs/notes/gate-calibration.md +0 -0
  292. {associate-0.10.0 → associate-0.11.0}/docs/notes/pi-1.1.0-migration.md +0 -0
  293. {associate-0.10.0 → associate-0.11.0}/docs/notes/resident-model-resolution.md +0 -0
  294. {associate-0.10.0 → associate-0.11.0}/docs/notes/t20-live-acceptance.md +0 -0
  295. {associate-0.10.0 → associate-0.11.0}/docs/plans/2026-09-05-webglass-code-lens-as-tools.md +0 -0
  296. {associate-0.10.0 → associate-0.11.0}/docs/plans/2026-09-12-associate-on-pi-with-opinionated-tools-split.md +0 -0
  297. {associate-0.10.0 → associate-0.11.0}/docs/plans/2026-09-12-associate-on-pi-with-opinionated-tools.md +0 -0
  298. {associate-0.10.0 → associate-0.11.0}/docs/plans/2026-10-27-associate-multi-model-on-pi-1-1-0-split.md +0 -0
  299. {associate-0.10.0 → associate-0.11.0}/docs/plans/2026-10-27-associate-multi-model-on-pi-1-1-0.md +0 -0
  300. {associate-0.10.0 → associate-0.11.0}/docs/skill-sources.md +0 -0
  301. {associate-0.10.0 → associate-0.11.0}/docs/specs/2026-09-05-webglass-code-lens-as-tools.md +0 -0
  302. {associate-0.10.0 → associate-0.11.0}/docs/specs/2026-09-12-associate-on-pi-with-opinionated-tools.md +0 -0
  303. {associate-0.10.0 → associate-0.11.0}/docs/specs/2026-10-27-associate-multi-model-on-pi-1-1-0.md +0 -0
  304. {associate-0.10.0 → associate-0.11.0}/package.json +0 -0
  305. {associate-0.10.0 → associate-0.11.0}/scripts/sonar-pr-issues.py +0 -0
  306. {associate-0.10.0 → associate-0.11.0}/tests/__init__.py +0 -0
  307. {associate-0.10.0 → associate-0.11.0}/tests/conftest.py +0 -0
  308. {associate-0.10.0 → associate-0.11.0}/tests/fake_lane.py +0 -0
  309. {associate-0.10.0 → associate-0.11.0}/tests/test_bench.py +0 -0
  310. {associate-0.10.0 → associate-0.11.0}/tests/test_checkoutlock.py +0 -0
  311. {associate-0.10.0 → associate-0.11.0}/tests/test_cli.py +0 -0
  312. {associate-0.10.0 → associate-0.11.0}/tests/test_cli_introspection.py +0 -0
  313. {associate-0.10.0 → associate-0.11.0}/tests/test_contract.py +0 -0
  314. {associate-0.10.0 → associate-0.11.0}/tests/test_fake_lane.py +0 -0
  315. {associate-0.10.0 → associate-0.11.0}/tests/test_gate_contract.py +0 -0
  316. {associate-0.10.0 → associate-0.11.0}/tests/test_harness_stub.py +0 -0
  317. {associate-0.10.0 → associate-0.11.0}/tests/test_models_contract.py +0 -0
  318. {associate-0.10.0 → associate-0.11.0}/tests/test_pi_config.py +0 -0
  319. {associate-0.10.0 → associate-0.11.0}/tests/test_pi_dependent.py +0 -0
  320. {associate-0.10.0 → associate-0.11.0}/tests/test_provider_wire.py +0 -0
  321. {associate-0.10.0 → associate-0.11.0}/tests/test_run.py +0 -0
  322. {associate-0.10.0 → associate-0.11.0}/tests/test_runtime_prompt.py +0 -0
  323. {associate-0.10.0 → associate-0.11.0}/tests/test_sonar_pr_issues.py +0 -0
  324. {associate-0.10.0 → associate-0.11.0}/tests/test_walkstats.py +0 -0
  325. {associate-0.10.0 → associate-0.11.0}/tests/test_worktree.py +0 -0
@@ -6,11 +6,15 @@ on:
6
6
  paths:
7
7
  - "pyproject.toml"
8
8
  - "associate/**"
9
+ - "web/**"
10
+ - "hatch_build.py"
9
11
  pull_request:
10
12
  branches: [main]
11
13
  paths:
12
14
  - "pyproject.toml"
13
15
  - "associate/**"
16
+ - "web/**"
17
+ - "hatch_build.py"
14
18
 
15
19
  jobs:
16
20
  test:
@@ -26,6 +30,19 @@ jobs:
26
30
 
27
31
  - run: uv sync
28
32
 
33
+ - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
34
+ with:
35
+ node-version: '20'
36
+ cache: npm
37
+ cache-dependency-path: web/package-lock.json
38
+
39
+ - name: Web unit tests, then the build the wheel test packages
40
+ working-directory: web
41
+ run: |
42
+ npm ci
43
+ npm test
44
+ npm run build
45
+
29
46
  - run: uv run pytest -n auto -v
30
47
 
31
48
  test-publish:
@@ -55,7 +72,21 @@ jobs:
55
72
  echo "DEV_VERSION=${DEV_VERSION}" >> "$GITHUB_ENV"
56
73
  echo "Publishing ${DEV_VERSION} to TestPyPI"
57
74
 
75
+ - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
76
+ with:
77
+ node-version: '20'
78
+ cache: npm
79
+ cache-dependency-path: web/package-lock.json
80
+
81
+ - name: Build the web UI (shipped in the wheel as associate/web_dist)
82
+ working-directory: web
83
+ run: |
84
+ npm ci
85
+ npm run build
86
+
58
87
  - name: Build and publish to TestPyPI
88
+ env:
89
+ ASSOCIATE_REQUIRE_WEB: "1"
59
90
  run: |
60
91
  uv build
61
92
  uv publish --publish-url https://test.pypi.org/legacy/ --trusted-publishing always --check-url https://test.pypi.org/simple/
@@ -82,7 +113,21 @@ jobs:
82
113
 
83
114
  - run: uv sync
84
115
 
116
+ - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
117
+ with:
118
+ node-version: '20'
119
+ cache: npm
120
+ cache-dependency-path: web/package-lock.json
121
+
122
+ - name: Build the web UI (shipped in the wheel as associate/web_dist)
123
+ working-directory: web
124
+ run: |
125
+ npm ci
126
+ npm run build
127
+
85
128
  - name: Build and publish to PyPI
129
+ env:
130
+ ASSOCIATE_REQUIRE_WEB: "1"
86
131
  run: |
87
132
  uv build
88
133
  uv publish --trusted-publishing always --check-url https://pypi.org/simple/
@@ -29,6 +29,20 @@ jobs:
29
29
 
30
30
  - run: uv sync
31
31
 
32
+ # The wheel test packages the real UI (tests/test_base_install.py); with CI set, a
33
+ # missing build is a failure there, not a skip, so build it first.
34
+ - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
35
+ with:
36
+ node-version: '20'
37
+ cache: npm
38
+ cache-dependency-path: web/package-lock.json
39
+
40
+ - name: Build the web UI the wheel test packages
41
+ working-directory: web
42
+ run: |
43
+ npm ci
44
+ npm run build
45
+
32
46
  - run: uv run pytest -n auto --cov=associate --cov-report=xml:coverage.xml --cov-report=term -v
33
47
 
34
48
  - name: SonarCloud Scan
@@ -100,6 +114,38 @@ jobs:
100
114
  - name: run associate Pi extension tests
101
115
  run: bash .pi/extensions/associate/tests/run.sh
102
116
 
117
+ web:
118
+ # The web UI (web/): install from the lockfile, typecheck, unit tests, the design-token
119
+ # check and the build. No browser tests run here (qodo-cli's web job, cited, has none).
120
+ runs-on: ubuntu-latest
121
+ permissions:
122
+ contents: read
123
+ defaults:
124
+ run:
125
+ working-directory: web
126
+ steps:
127
+ - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
128
+
129
+ - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
130
+ with:
131
+ node-version: '20'
132
+ cache: npm
133
+ cache-dependency-path: web/package-lock.json
134
+
135
+ - run: npm ci
136
+
137
+ - name: typecheck
138
+ run: npm run typecheck
139
+
140
+ - name: vitest
141
+ run: npm test
142
+
143
+ - name: design tokens
144
+ run: npm run check
145
+
146
+ - name: build
147
+ run: npm run build
148
+
103
149
  version-check:
104
150
  # Only run on PR events. On push to main after a merged PR, the comparison
105
151
  # would always fail (PR_VERSION == MAIN_VERSION because HEAD and origin/main
@@ -242,6 +242,14 @@ skills.local.yaml
242
242
  node_modules/
243
243
  .associate-runs/
244
244
 
245
+ # The web UI's build output (web/), and the copy a wheel build ships as associate/web_dist
246
+ # (hatch_build.py force-includes web/dist; neither is ever committed). The generic `dist/`
247
+ # rule above already covers web/dist; these lines say so on purpose.
248
+ web/dist/
249
+ associate/web_dist/
250
+ web/coverage/
251
+ web/node_modules/.tmp/
252
+
245
253
  # The Pi extension's own TypeScript modules live in `.pi/extensions/*/lib/`,
246
254
  # which the Python `lib/` rule above (setuptools build output) would otherwise
247
255
  # swallow. Re-include that tree explicitly — the directory itself has to be
@@ -16,6 +16,12 @@ config:
16
16
 
17
17
  ignores:
18
18
  - "node_modules/**"
19
+ # The web UI's packages and build output (web/): installed or generated, never authored.
20
+ - "web/node_modules/**"
21
+ - "web/dist/**"
22
+ - "web/coverage/**"
23
+ - "associate/web_dist/**"
24
+ - ".venv/**"
19
25
  - ".local/**"
20
26
  - ".afi/**"
21
27
  - ".teken/**"
@@ -5,6 +5,108 @@ All notable changes to this project will be documented in this file.
5
5
  Format follows [Keep a Changelog](https://keepachangelog.com/). This project
6
6
  adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.11.0] - 2026-11-16
9
+
10
+ The bridge: another service can start an `associate run` on a checkout and read
11
+ its result, over a CLI, an HTTP API or an MCP server, and see runs in a
12
+ read-only web UI. This is the bridge's first release: its tests use a stand-in for the
13
+ run, and no real run has been started through it (built and unit-tested only).
14
+
15
+ ### Added
16
+
17
+ - **The runs API** (`associate/runs/`): `associate runs start|show|list`. A start
18
+ validates the checkout, model, instruction and test commands, takes a
19
+ per-checkout lock (one run per checkout), starts a detached supervisor and
20
+ returns a run id at once. `runs show` reports `status` (`running`, `finished`,
21
+ `failed-to-start`, `lost`) and, once finished, `ok`, `outcome`, `merge`
22
+ (`merged`, `refused`, `nothing_to_merge`, `not_attempted`), `tests`,
23
+ `base_commit` and `changed_paths`, always in under 64 KiB. A clean run whose
24
+ tests pass is merged into the checkout's local `main`; nothing is pushed.
25
+ State lives in `ASSOCIATE_RUNS_DIR`, and `ASSOCIATE_RUNS_ROOTS` is the
26
+ checkout allowlist (empty: every start over HTTP and MCP is refused).
27
+ - **`associate serve`** (`associate/server/`, the `server` extra): the runs HTTP
28
+ API (`POST /runs`, `GET /runs/{run_id}`, `GET /runs`, public `GET /health`).
29
+ A loopback listener (`127.0.0.1:8794`) that trusts Cloudflare Access when
30
+ `ASSOCIATE_ACCESS_*` is set, and an optional LAN listener (port `8795`)
31
+ that takes service tokens only.
32
+ - **`associate tokens issue|list|revoke`**: service tokens (`asc_...`) in a
33
+ `0600` file of hashes, with the roles `viewer`, `editor` and `admin`. Only
34
+ `admin` starts a run.
35
+ - **`associate mcp`** (the `mcp` extra): the `runs_start`, `runs_show` and
36
+ `runs_list` tools over stdio, calling the same functions as the CLI and HTTP.
37
+ - **The cited framework** (`associate/bridge/`): auth, route policy, Access JWT
38
+ verification, service tokens and the MCP server, cited from qodo-cli, which
39
+ cited it from culture-rules. It names no app.
40
+ - **A surface parity test** (`tests/test_surface_parity.py`): every runs verb
41
+ must exist, with the same parameters, on the CLI, the MCP server and the HTTP
42
+ API.
43
+ - **The web UI** (`web/`, Vite + React + TypeScript, the culture-design tokens
44
+ and conventions cited from qodo-cli): **Runs** (`/runs`; a card per run with
45
+ a status pill, timing, model, title, checkout and outcome; a filter for all,
46
+ in progress and needs a look) and **one run** (`/runs/<id>`: why it was not
47
+ merged, each test command's exit code, the changed paths with the truncation
48
+ note, the instruction and the final reply). Read-only; it refreshes every 5
49
+ seconds while something runs and pauses while the tab is hidden. `create_app`
50
+ mounts it through `associate/bridge/static.py` when the package holds
51
+ `associate/web_dist`; then `GET /**` is viewer-readable and the same-origin
52
+ `/api` prefix reaches the same routes at the same roles. Without a build, `/`
53
+ is a JSON 404. Every API answer now says `Cache-Control: no-store`.
54
+ - **`hatch_build.py`** ships `web/dist` in the wheel as `associate/web_dist`
55
+ (never committed; never runs Node). `ASSOCIATE_REQUIRE_WEB=1` fails a build
56
+ without it, `ASSOCIATE_SKIP_WEB=1` leaves it out. CI has a `web` job
57
+ (install, typecheck, vitest, the tokens check, build), and `publish.yml`
58
+ builds the UI before `uv build` and triggers on `web/**` and `hatch_build.py`.
59
+ - **More fields for the UI, bounded**: `runs list` adds `finished_at`, `title`,
60
+ `merge`, `outcome`, `exit_code`, `tests` counts, `changed_paths_total` and
61
+ `test_command_count` (the reply stays under 64 KiB, cutting text first, then
62
+ leaving out the oldest runs with `truncated`); `runs show` adds `instruction`
63
+ (cut at 4000 characters), `test_command_count` and `tests.results` (each
64
+ command's line and exit code, at most 16, never its output).
65
+ - **Docs**: `docs/operations/bridge.md` for operators, agents and integrators;
66
+ the README and `CLAUDE.md` describe the bridge.
67
+
68
+ ### Security
69
+
70
+ - **The role check reads the path the router matches.** `authorize` looked up the route
71
+ policy on `request.url.path`, which older Starlette (the `fastapi>=0.115` bound still allows
72
+ it) cuts at a `?` or `#` inside the decoded path, so an unauthenticated
73
+ `GET /health%3F/../assets/a.js` was judged as the public `/health` and the static handler
74
+ then served a built UI file. It now reads `scope["path"]`, and `bridge/static.py` refuses
75
+ (JSON 404, before anything is resolved) a path with a `..` segment, `?`, `#`, a backslash
76
+ or a control character. Ported from qodo-cli; the tests drive a raw ASGI scope
77
+ (`tests/rawasgi.py`). Whole-number parsing (ports, the Access listen port, a
78
+ `Content-Length`) now requires ASCII digits, so a superscript digit is a refusal, not a
79
+ crash.
80
+ - **A write cannot be forged from another site.** Behind Cloudflare Access a browser's cookie
81
+ is the credential, and `POST /runs` accepted any body, so a page an admin opened could start
82
+ a run with its own test commands as a `text/plain` "simple" request. Every method other
83
+ than GET, HEAD and OPTIONS now goes through the new `associate/bridge/origin.py` before
84
+ authentication (one answer, credential or not): 403 `cross_site_request` when
85
+ `Sec-Fetch-Site` is `cross-site`, 403 `cross_origin_request` when `Origin` is not the
86
+ request's own scheme and `Host` (not compared when the browser itself says
87
+ `Sec-Fetch-Site: same-origin`), and 415 `unsupported_media_type` unless the body is
88
+ declared `application/json` (the shape of qodo-cli's 415 rule). Callers with neither header
89
+ (curl, a rules engine, the CLI) are unaffected; the API sends no CORS header.
90
+ - **The start body is capped while it is read.** A body without `Content-Length` (chunked)
91
+ was buffered whole before the length check. It is now read as a stream and refused 413
92
+ `body_too_large` as soon as it passes 512 KiB, whatever `Content-Length` says; a declared
93
+ length over the cap is refused before reading (it was a 400).
94
+
95
+ ### Fixed
96
+
97
+ - **A run that has just started is never reported `lost`.** Between `request.json` and
98
+ `supervisor.json` a reader saw `lost` (`ok: false`, "its checkout is free again") for a run
99
+ that was starting. `request.json` now carries a `start_deadline` (120 seconds): until it, a
100
+ run with no supervisor or child record reads `running`; past it, `failed-to-start` (the
101
+ starter died before the run began, and its checkout lock went with it). The status words
102
+ are unchanged.
103
+ - **`runs list` no longer reads every run.** It orders runs by their `request.json`'s mtime
104
+ (a `stat`) and reads only the runs it returns; `total` still counts every run.
105
+
106
+ ### Changed
107
+
108
+ - The package version is 0.11.0 (`pyproject.toml`, `uv.lock`).
109
+
8
110
  ## [0.10.0] - 2026-10-27
9
111
 
10
112
  The multi-model associate on Pi 1.1.0 (plan
@@ -130,6 +130,46 @@ run live):
130
130
  `delegate_run` is in `gated_tools` (CLEF-gated for every model, effect line in
131
131
  `gate.json` version 9), not in `mutating_tools`; `delegate_status` is a read,
132
132
  and its result taints later memory records `untrusted:child`.
133
+ - **The bridge** (0.11.0; page `docs/operations/bridge.md`). *Bridge* here means one
134
+ app with a CLI, an HTTP API and an MCP server over the same verbs, plus a
135
+ read-only web UI (see [Web UI](#web-ui-web)). Another service starts a detached
136
+ `associate run` on a checkout and reads the result:
137
+ - `associate/runs/` holds the verbs: `service.py` (`start`, `show`,
138
+ `list_runs`, and `VERBS`, the one table every surface reads), `state.py`
139
+ (state layout, atomic JSON, the `flock` checkout lock), `supervisor.py` (the
140
+ detached process that runs `python -m associate run --json
141
+ --untrusted-checkout` and writes `result.json`) and `mcp_tools.py`;
142
+ - `associate/server/` is the HTTP API (`app.py`: `POST /runs` admin,
143
+ `GET /runs/{run_id}` and `GET /runs` viewer, public `GET /health`;
144
+ `serve.py`: a loopback listener on `127.0.0.1:8794` that trusts Cloudflare
145
+ Access, and an optional LAN listener, port `8795`, service tokens only;
146
+ `tokenstore.py`: the token file); `create_app` mounts the built UI from
147
+ `associate/web_dist` when the package holds one;
148
+ - `associate/bridge/` is the app-agnostic framework (auth, route policy,
149
+ Access JWTs, service tokens, MCP server), cited from qodo-cli, which cited
150
+ it from culture-rules; it names no app. This repo owns its copy (cite, don't
151
+ import); each file's header names the source and commit. `origin.py` is
152
+ original here: before authentication, every method but GET/HEAD/OPTIONS
153
+ needs a JSON body (415) and is refused 403 when `Sec-Fetch-Site` is
154
+ `cross-site` or `Origin` is foreign, so a page cannot ride an Access cookie
155
+ into a start;
156
+ - the CLI verbs are `runs start|show|list`, `serve`, `tokens
157
+ issue|list|revoke` and `mcp`. `serve` needs the `server` extra and `mcp` the
158
+ `mcp` extra; the base package stays dependency-free;
159
+ - `tests/test_surface_parity.py` fails when a runs verb is missing from the
160
+ CLI, the MCP tools or the HTTP routes. A new verb goes in `VERBS` and needs
161
+ no edit there. It runs against the API-only app and the app serving a UI;
162
+ the UI's routes (the SPA fallback `static.install` adds) and the no-UI root
163
+ 404 are classified explicitly, not exempted by loosening the check;
164
+ - a run **merges into the checkout's local `main`** when it is clean and its
165
+ tests pass, and never pushes, so the checkout is a dedicated clone;
166
+ `ASSOCIATE_RUNS_ROOTS` empty refuses every start over HTTP and MCP;
167
+ - `ok` is true only when the exit code is 0, the outcome is `ok`, the tests
168
+ passed and `merge` is `merged` or `nothing_to_merge`. A read-only model
169
+ (`senses`) makes no merge, so its run is never `ok`;
170
+ - **built and unit-tested only**: every test run uses the stand-in child
171
+ `tests/runs_fake_child.py`; no real run has been started through the
172
+ bridge. Known gaps are listed in `docs/operations/bridge.md`.
133
173
  - **The run result** names the model and lobes role that ran, the isolation and
134
174
  merge outcome, the test results, and how the task turn ended (final reply,
135
175
  stop reason, lane error).
@@ -275,7 +315,13 @@ associate/ # Python package (top level — no src/ wrapper)
275
315
  │ # role.json, policy.json, schemas/, validate.py
276
316
  ├── harness/ # adapters (pi.py, stub.py), worktree.py, testcmds.py,
277
317
  │ # checkoutlock.py
318
+ ├── runs/ # the bridge's verbs: service, state, supervisor, mcp_tools
319
+ ├── server/ # the bridge's HTTP API: app, serve, tokenstore (server extra)
320
+ ├── bridge/ # cited framework: auth, policy, Access, tokens, MCP server,
321
+ │ # static UI serving, origin check
278
322
  └── bench/ # public suites (suites.json, public.py), walkstats
323
+ web/ # the web UI (Vite + React + TS); built into the wheel as
324
+ # associate/web_dist by hatch_build.py (never committed)
279
325
  .pi/extensions/associate/ # the Pi extension (TypeScript, no npm deps)
280
326
  ├── index.ts # loader: registry model, tool surface, guard, gate
281
327
  ├── lib/ # provider, guard, gate, walk, session, contain, …
@@ -287,6 +333,7 @@ tests/ # pytest — CLI, contract, run, worktree, gate, …
287
333
  .claude/skills/<name>/ # SKILL.md + scripts/ per skill (cite-don't-import)
288
334
  docs/skill-sources.md # skill provenance ledger — authoritative
289
335
  docs/notes/ # pi-1.1.0 migration, gate calibration, resident model
336
+ docs/operations/ # the bridge: operators, agents and integrators
290
337
  culture.yaml # agent suffix + backend + model (a registry key)
291
338
  sonar-project.properties # SonarCloud key agentculture_associate
292
339
  ```
@@ -341,9 +388,36 @@ is never a one-file change:
341
388
  under it** — the rubric's `overview_cli_noun_exists` check. `_commands/cli.py`
342
389
  exists purely to satisfy this and is the pattern to copy.
343
390
 
391
+ ## Web UI (`web/`)
392
+
393
+ A Vite + React + TypeScript app with two read-only screens, Runs (`/runs`) and one
394
+ run (`/runs/<id>`), whose toolchain, design tokens (`web/src/culture-design/`,
395
+ checked by `npm run check`) and conventions are cited from qodo-cli's `web/`
396
+ (which cited culture-rules'); every cited file carries a provenance header with the
397
+ source path and commit. The confirmed artboards ("associate: Runs" and "associate:
398
+ One run" on the shared design canvas) are the visual source of truth; the UI shows
399
+ only fields the API returns (`list_runs`, `show`) and invents none. Commands, from
400
+ `web/`: `npm ci`, `npm run typecheck`, `npm test`, `npm run check` (the design
401
+ tokens), `npm run build`. The browser calls the same-origin `/api` prefix, which
402
+ `associate serve` strips (`associate/bridge/static.py`); in dev `npm run dev`
403
+ proxies it to `ASSOCIATE_API_URL` (default `http://127.0.0.1:8794`). This app has
404
+ no pinned OpenAPI file: the client's routes live in `web/src/api/routes.json`, and
405
+ `tests/test_web_contract.py` binds them to `VERBS` and the fixtures
406
+ (`web/src/fixtures/runs.json`) to the real `list_runs`/`show` fields.
407
+
408
+ `hatch_build.py` packages an existing `web/dist` as `associate/web_dist`
409
+ (git-ignored build output) and never runs Node, so a wheel built without Node is
410
+ API-only. Release order: `npm ci && npm run build` in `web/`, then `uv build` with
411
+ `ASSOCIATE_REQUIRE_WEB=1` (a missing build then fails the build);
412
+ `ASSOCIATE_SKIP_WEB=1` leaves the UI out on purpose. `.github/workflows/publish.yml`
413
+ does exactly this, and the `web` job in `tests.yml` runs install, typecheck,
414
+ vitest, the tokens check and the build. `web/package.json` is the UI's own
415
+ manifest; the root `package.json` stays the Pi manifest with no dependencies.
416
+
344
417
  ## Build, test, lint, publish
345
418
 
346
- - **Dev install:** `uv sync`
419
+ - **Dev install:** `uv sync` (add `--extra server --extra mcp` for the bridge's
420
+ HTTP API and MCP server; their tests skip without them)
347
421
  - **Run from source:** `uv run associate --version` / `uv run python -m associate ...`
348
422
  - **Tests:** `uv run pytest -n auto -v`
349
423
  - **Single test:** `uv run pytest tests/test_cli.py::test_whoami_json -v`
@@ -553,6 +627,16 @@ value is not inherited.
553
627
  | `ASSOCIATE_RUNS_DIR` | `$XDG_STATE_HOME/associate/runs`, else `$HOME/.local/state/associate/runs` | `associate/harness/checkoutlock.py` | The state directory holding `locks/<sha256 of the checkout's real path>.lock`, the one-run-per-checkout lock `associate run --checkout-lock` holds (a kernel `flock`). Must be outside every checkout. |
554
628
  | `ASSOCIATE_EIDETIC_DIR` | `$HOME/.eidetic/memory` | `tools/eidetic.ts` | The eidetic store the memory tools pin (`EIDETIC_DATA_DIR`); must be absolute and outside the examined checkout. |
555
629
  | `ASSOCIATE_LEDGER_PATH` | `$HOME/.workledger/associate.jsonl` | `tools/ledger.ts` | The workledger file the ledger tools pin (`WORKLEDGER_PATH`); must be absolute and outside the examined checkout. |
630
+ | `ASSOCIATE_RUNS_DIR` | `$XDG_STATE_HOME/associate/runs` (else `~/.local/state/associate/runs`) | `associate/runs/service.py` | The state directory of `associate runs` (one directory per run id, plus the per-checkout lock files); refused inside a checkout. Never inherited by a run. |
631
+ | `ASSOCIATE_RUNS_ROOTS` | empty | `associate/runs/service.py` | The `os.pathsep`-separated directories a `runs start` checkout must be in (by real path). Empty: the HTTP API refuses every start; the local CLI is not restricted. Never inherited by a run. |
632
+ | `ASSOCIATE_SERVER_TOKENS` | `$XDG_STATE_HOME/associate/service_tokens.json` | `associate/server/tokenstore.py` (`default_token_path`, `open_tokens`) | The file-backed service-token store (`associate/bridge/filetokens.py`; hashes only) that `associate tokens` writes and `associate serve` reads. Never inherited by a run. |
633
+ | `ASSOCIATE_HOST`, `ASSOCIATE_PORT` | `127.0.0.1`, `8794` | `associate/server/serve.py` (`plan_listeners`) | `associate serve`'s loopback listener (always on; must be a loopback address). Flags `--host`/`--port` win. |
634
+ | `ASSOCIATE_LAN_HOST`, `ASSOCIATE_LAN_PORT` | unset (no LAN listener), `8795` | `associate/server/serve.py` | `associate serve`'s optional LAN listener (service tokens only). Flags `--lan-host`/`--lan-port` win; it cannot share the loopback address. |
635
+ | `ASSOCIATE_ACCESS_LISTEN`, `ASSOCIATE_ACCESS_TEAM_DOMAIN`, `ASSOCIATE_ACCESS_AUD` | unset | `associate/bridge/access.py` (`AccessListenerConfig.from_env`) | Cloudflare Access on the loopback listener: all three or none (a partial set is refused, exit 1); `ASSOCIATE_ACCESS_LISTEN` is a loopback `host:port`. |
636
+ | `ASSOCIATE_ADMINS`, `ASSOCIATE_EDITORS` | empty | `associate/server/serve.py` (`names`) | Comma-separated identities Access lets through as admin or editor; any other Access person is a viewer. |
637
+ | `ASSOCIATE_REQUIRE_WEB`, `ASSOCIATE_SKIP_WEB` | unset | `hatch_build.py` | At build time: `1` fails a build with no `web/dist`, or leaves the UI out of the wheel on purpose. |
638
+ | `ASSOCIATE_API_URL` | `http://127.0.0.1:8794` | `web/vite.config.ts` | The API the UI's dev server (`npm run dev`) proxies `/api` to. |
639
+ | `ASSOCIATE_DESIGN_SOURCE_REPO` | unset | `web/scripts/check-tokens.mjs` | A culture-rules checkout; when set, the tokens check also compares `tokens.css` with it at the pinned commit. |
556
640
  | `ASSOCIATE_BENCH_SUITES` | `associate/bench/suites.json` | `associate/bench/public.py` | An alternative suites file for `associate bench`. |
557
641
  | `ASSOCIATE_PROVIDER`, `ASSOCIATE_REASONING_EFFORT`, `ASSOCIATE_REASONING` | — | `associate/bench/config.py` | Only labels in a bench row's configuration stamp (provider falls back to `ASSOCIATE_BASE_URL`); they change nothing on the wire. Reasoning is per model in `models.json`. |
558
642
 
@@ -621,14 +705,15 @@ root key** — see invariant 3 under "Adding a verb".
621
705
  ## What not to invent
622
706
 
623
707
  - **Don't add a runtime dependency.** `dependencies = []` is deliberate: the
624
- harness must install and start fast. The same holds for `package.json`: it is
625
- a Pi project manifest with no `dependencies` and no `scripts`. `culture.yaml` is parsed by hand in
708
+ harness must install and start fast. The same holds for the root `package.json`: it is
709
+ a Pi project manifest with no `dependencies` and no `scripts` (the web UI's npm
710
+ packages live in `web/package.json` and never reach the Python package). `culture.yaml` is parsed by hand in
626
711
  `_commands/whoami.py` specifically to avoid a YAML dependency. If you think you
627
712
  need a dep, that is a conversation, not a commit.
628
713
  - **Don't edit a vendored skill** to fix a bug in it. Fix it upstream.
629
714
  - **Don't skip the version bump** because the change is "just docs".
630
- - **Don't describe a model, the mesh path, the gate's fallbacks, or delegation
631
- as working** in docs, commits, or PR bodies until a live run measures it
715
+ - **Don't describe a model, the mesh path, the gate's fallbacks, delegation, or
716
+ the bridge as working** in docs, commits, or PR bodies until a live run measures it
632
717
  (t20) — and don't quote a benchmark number until t21 commits one. The worker
633
718
  live runs listed under "Measured vs. not measured" are the only live evidence;
634
719
  say exactly what exists and what doesn't; don't round up.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: associate
3
- Version: 0.10.0
3
+ Version: 0.11.0
4
4
  Summary: A multi-model agent harness on Pi: runs one fleet model (worker, senses or cortex, addressed by lobes role) on one task with its own tools and prompt, every mutating call behind a CLEF safety gate, and hands back an evidenced result.
5
5
  Project-URL: Homepage, https://github.com/agentculture/associate
6
6
  Project-URL: Issues, https://github.com/agentculture/associate/issues
@@ -13,6 +13,11 @@ Classifier: License :: OSI Approved :: Apache Software License
13
13
  Classifier: Programming Language :: Python :: 3.12
14
14
  Classifier: Topic :: Software Development
15
15
  Requires-Python: >=3.12
16
+ Provides-Extra: mcp
17
+ Requires-Dist: mcp<2,>=1.2; extra == 'mcp'
18
+ Provides-Extra: server
19
+ Requires-Dist: fastapi>=0.115; extra == 'server'
20
+ Requires-Dist: uvicorn>=0.30; extra == 'server'
16
21
  Description-Content-Type: text/markdown
17
22
 
18
23
  # associate
@@ -81,6 +86,43 @@ operator's test commands (`ASSOCIATE_TEST_COMMANDS`, required), merged to
81
86
  `main` only when clean, nothing pushed. Built and unit-tested only; no
82
87
  delegated run has been started live.
83
88
 
89
+ ## The bridge
90
+
91
+ Another service can start an associate run and read the result. In this repo a
92
+ **bridge** is one app with a CLI, an HTTP API and an MCP server over the same
93
+ verbs, plus a read-only web UI (a runs list and one run's page) that ships in
94
+ the wheel and is served by `associate serve`. The verbs are `runs start`,
95
+ `runs show` and `runs list`. This is not the cultureagent agent-session bridge.
96
+
97
+ A caller, such as a rules engine, names a git checkout, a registry model, an
98
+ instruction and at least one test command. associate starts a detached
99
+ `associate run` on it and returns a run id at once. The caller reads the run
100
+ later: its `status`, and once finished `ok`, `merge`, `tests.passed`,
101
+ `base_commit` and `changed_paths`.
102
+
103
+ - **A run changes the checkout.** A writing model's clean run, with its tests
104
+ passing, is merged into the checkout's local `main`. Nothing is pushed. Use a
105
+ dedicated clone.
106
+ - **Checkouts are allowlisted.** `ASSOCIATE_RUNS_ROOTS` lists the directories a
107
+ run may use. Empty, every start over HTTP and MCP is refused.
108
+ - **One run per checkout** at a time.
109
+ - **Roles.** Only `admin` starts a run; `viewer` and above read one.
110
+ - **The web UI only reads.** It lists runs with their status and outcome and
111
+ shows one run's tests, changed paths and final reply; it has no start button.
112
+ Open it behind Cloudflare Access (the browser sends no token itself). See
113
+ [`docs/operations/bridge.md`](docs/operations/bridge.md#the-web-ui).
114
+ - **Not measured.** The bridge's tests use a stand-in for the run; no real run
115
+ has been started through it. Built and unit-tested only.
116
+
117
+ ```bash
118
+ uv sync --extra server --extra mcp # the HTTP API and the MCP server
119
+ uv run associate tokens issue --name rules-engine --role admin
120
+ ASSOCIATE_RUNS_ROOTS=/srv/associate-clones uv run associate serve
121
+ ```
122
+
123
+ The operator, agent and integrator guide is
124
+ [`docs/operations/bridge.md`](docs/operations/bridge.md).
125
+
84
126
  ## What is measured, and what is not
85
127
 
86
128
  **Measured live, one run each:**
@@ -100,6 +142,7 @@ delegated run has been started live.
100
142
  - the resident's first reply on the mesh;
101
143
  - a writing model on the mesh (mesh sessions get no run worktree, so the
102
144
  resident runs `senses`);
145
+ - a real run started through the bridge (its tests use a stand-in child);
103
146
  - **every** benchmark. The public suites (BFCL, MMMU, LiveCodeBench, in
104
147
  [`associate/bench/suites.json`](associate/bench/suites.json)) are wired but
105
148
  unverified and have produced no score.
@@ -141,12 +184,16 @@ ASSOCIATE_API_KEY=... uv run associate run "Fix the failing parser test" \
141
184
  | `cli overview` | Describe the CLI surface itself. |
142
185
  | `run [prompt]` | Run one task on a harness adapter (`pi` by default) with `--model`, `--test-command`, `--untrusted-checkout`. Exits `2` without serving unless a preflight proves the extension loaded correctly. |
143
186
  | `bench` | List the public suites, or run one (`--suite NAME --model KEY`) through its upstream runner and scorer. |
187
+ | `runs start\|show\|list` | Start a detached run on a checkout and read its result (the bridge). |
188
+ | `serve` | Run the bridge's HTTP API on a loopback listener, and a LAN one if set (needs the `server` extra). |
189
+ | `tokens issue\|list\|revoke` | Manage the HTTP API's service tokens. |
190
+ | `mcp` | Serve the `runs` verbs as MCP tools over stdio (needs the `mcp` extra). |
144
191
 
145
192
  Every command takes `--json`. **Results go to stdout, errors and diagnostics go
146
193
  to stderr — never mixed.** Errors in JSON mode are `{code, message,
147
194
  remediation}`. Exit codes: `0` success, `1` user error, `2` environment error,
148
- `3+` reserved. The Python package has **no third-party dependencies**, and the
149
- Pi extension declares no npm dependency.
195
+ `3+` reserved. The Python package has **no third-party dependencies** (the `server` and `mcp`
196
+ extras are optional), and the Pi extension declares no npm dependency.
150
197
 
151
198
  ## Environment
152
199
 
@@ -154,7 +201,9 @@ All configuration is through `ASSOCIATE_*` environment variables — the endpoin
154
201
  (`ASSOCIATE_BASE_URL`, default the local lobes gateway), the bearer
155
202
  (`ASSOCIATE_API_KEY`, never committed or logged), the model
156
203
  (`ASSOCIATE_MODEL`, a registry key), and the session, isolation, test-command,
157
- memory and ledger plumbing. The full table, each row tied to the code that
204
+ memory and ledger plumbing, and the bridge's (`ASSOCIATE_RUNS_DIR`,
205
+ `ASSOCIATE_RUNS_ROOTS`, `ASSOCIATE_SERVER_TOKENS`, the listener and Access
206
+ variables). The full table, each row tied to the code that
158
207
  reads it, is in [`CLAUDE.md`](CLAUDE.md)'s Tooling prerequisites, with the exact
159
208
  `pi` / `pi-acp` / Node pins.
160
209
 
@@ -64,6 +64,43 @@ operator's test commands (`ASSOCIATE_TEST_COMMANDS`, required), merged to
64
64
  `main` only when clean, nothing pushed. Built and unit-tested only; no
65
65
  delegated run has been started live.
66
66
 
67
+ ## The bridge
68
+
69
+ Another service can start an associate run and read the result. In this repo a
70
+ **bridge** is one app with a CLI, an HTTP API and an MCP server over the same
71
+ verbs, plus a read-only web UI (a runs list and one run's page) that ships in
72
+ the wheel and is served by `associate serve`. The verbs are `runs start`,
73
+ `runs show` and `runs list`. This is not the cultureagent agent-session bridge.
74
+
75
+ A caller, such as a rules engine, names a git checkout, a registry model, an
76
+ instruction and at least one test command. associate starts a detached
77
+ `associate run` on it and returns a run id at once. The caller reads the run
78
+ later: its `status`, and once finished `ok`, `merge`, `tests.passed`,
79
+ `base_commit` and `changed_paths`.
80
+
81
+ - **A run changes the checkout.** A writing model's clean run, with its tests
82
+ passing, is merged into the checkout's local `main`. Nothing is pushed. Use a
83
+ dedicated clone.
84
+ - **Checkouts are allowlisted.** `ASSOCIATE_RUNS_ROOTS` lists the directories a
85
+ run may use. Empty, every start over HTTP and MCP is refused.
86
+ - **One run per checkout** at a time.
87
+ - **Roles.** Only `admin` starts a run; `viewer` and above read one.
88
+ - **The web UI only reads.** It lists runs with their status and outcome and
89
+ shows one run's tests, changed paths and final reply; it has no start button.
90
+ Open it behind Cloudflare Access (the browser sends no token itself). See
91
+ [`docs/operations/bridge.md`](docs/operations/bridge.md#the-web-ui).
92
+ - **Not measured.** The bridge's tests use a stand-in for the run; no real run
93
+ has been started through it. Built and unit-tested only.
94
+
95
+ ```bash
96
+ uv sync --extra server --extra mcp # the HTTP API and the MCP server
97
+ uv run associate tokens issue --name rules-engine --role admin
98
+ ASSOCIATE_RUNS_ROOTS=/srv/associate-clones uv run associate serve
99
+ ```
100
+
101
+ The operator, agent and integrator guide is
102
+ [`docs/operations/bridge.md`](docs/operations/bridge.md).
103
+
67
104
  ## What is measured, and what is not
68
105
 
69
106
  **Measured live, one run each:**
@@ -83,6 +120,7 @@ delegated run has been started live.
83
120
  - the resident's first reply on the mesh;
84
121
  - a writing model on the mesh (mesh sessions get no run worktree, so the
85
122
  resident runs `senses`);
123
+ - a real run started through the bridge (its tests use a stand-in child);
86
124
  - **every** benchmark. The public suites (BFCL, MMMU, LiveCodeBench, in
87
125
  [`associate/bench/suites.json`](associate/bench/suites.json)) are wired but
88
126
  unverified and have produced no score.
@@ -124,12 +162,16 @@ ASSOCIATE_API_KEY=... uv run associate run "Fix the failing parser test" \
124
162
  | `cli overview` | Describe the CLI surface itself. |
125
163
  | `run [prompt]` | Run one task on a harness adapter (`pi` by default) with `--model`, `--test-command`, `--untrusted-checkout`. Exits `2` without serving unless a preflight proves the extension loaded correctly. |
126
164
  | `bench` | List the public suites, or run one (`--suite NAME --model KEY`) through its upstream runner and scorer. |
165
+ | `runs start\|show\|list` | Start a detached run on a checkout and read its result (the bridge). |
166
+ | `serve` | Run the bridge's HTTP API on a loopback listener, and a LAN one if set (needs the `server` extra). |
167
+ | `tokens issue\|list\|revoke` | Manage the HTTP API's service tokens. |
168
+ | `mcp` | Serve the `runs` verbs as MCP tools over stdio (needs the `mcp` extra). |
127
169
 
128
170
  Every command takes `--json`. **Results go to stdout, errors and diagnostics go
129
171
  to stderr — never mixed.** Errors in JSON mode are `{code, message,
130
172
  remediation}`. Exit codes: `0` success, `1` user error, `2` environment error,
131
- `3+` reserved. The Python package has **no third-party dependencies**, and the
132
- Pi extension declares no npm dependency.
173
+ `3+` reserved. The Python package has **no third-party dependencies** (the `server` and `mcp`
174
+ extras are optional), and the Pi extension declares no npm dependency.
133
175
 
134
176
  ## Environment
135
177
 
@@ -137,7 +179,9 @@ All configuration is through `ASSOCIATE_*` environment variables — the endpoin
137
179
  (`ASSOCIATE_BASE_URL`, default the local lobes gateway), the bearer
138
180
  (`ASSOCIATE_API_KEY`, never committed or logged), the model
139
181
  (`ASSOCIATE_MODEL`, a registry key), and the session, isolation, test-command,
140
- memory and ledger plumbing. The full table, each row tied to the code that
182
+ memory and ledger plumbing, and the bridge's (`ASSOCIATE_RUNS_DIR`,
183
+ `ASSOCIATE_RUNS_ROOTS`, `ASSOCIATE_SERVER_TOKENS`, the listener and Access
184
+ variables). The full table, each row tied to the code that
141
185
  reads it, is in [`CLAUDE.md`](CLAUDE.md)'s Tooling prerequisites, with the exact
142
186
  `pi` / `pi-acp` / Node pins.
143
187
 
@@ -0,0 +1,11 @@
1
+ # Cited from qodo-cli qodo/bridge/__init__.py @
2
+ # d87e2db7f3e84390a4662b348088c76c1ad68012
3
+ # (cite-don't-import: this repo owns its copy and may change it.)
4
+ # Adapted: none beyond this header. The file is original to qodo-cli (no culture-rules source).
5
+ """Reusable service framework: auth, route policy, static serving and cache policy.
6
+
7
+ Cited from culture-rules (see each module's header for its source path and commit). Nothing
8
+ here knows the app that hosts it: the environment prefix, token prefix, dev header and web build
9
+ directory are parameters, and the route-to-role table is filled in through ``policy.RoutePolicy``.
10
+ Standard library only, except ``static`` (the ``server`` extra, imported lazily).
11
+ """