@inneranimalmedia/agentsam-sdk 2.6.12 → 2.6.13

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 (651) hide show
  1. package/AGENTSAM.md +32 -0
  2. package/DEVELOPMENT.md +69 -74
  3. package/README.md +11 -0
  4. package/apps/cad-creator/README.md +12 -0
  5. package/apps/cad-creator/shared/cad/package.json +1 -1
  6. package/apps/cad-creator/shared/cad/src/domain/project-contract.js +2 -75
  7. package/apps/cad-creator/shared/cad/src/domain/project-tools.js +2 -24
  8. package/apps/cad-creator/shared/cad/src/types.ts +2 -2
  9. package/apps/client-cms-editor/backend/package.json +2 -2
  10. package/apps/client-cms-editor/frontend/package.json +3 -3
  11. package/apps/client-cms-editor/frontend/src/adapters/http.ts +25 -13
  12. package/apps/client-cms-editor/frontend/src/editor/CmsEditor.tsx +7 -4
  13. package/apps/client-cms-editor/frontend/src/editor/canvas/PreviewCanvas.tsx +31 -3
  14. package/apps/client-cms-editor/frontend/src/editor/host-preview.test.tsx +104 -0
  15. package/apps/client-cms-editor/package-lock.json +8 -8
  16. package/apps/client-cms-editor/package.json +2 -1
  17. package/apps/client-cms-editor/shared/cms/package.json +1 -1
  18. package/docs/AUTORAG.md +2 -0
  19. package/docs/CAPABILITIES.md +28 -0
  20. package/docs/adr/ADR-0003-copro-clean-room-product-architecture.md +6 -0
  21. package/docs/architecture/AGENTSAM-CANONICAL-DISCOVERY-FIRST-SLICE.md +70 -0
  22. package/docs/architecture/AGENTSAM-REGISTRY-CLI-AGENT-PARITY.md +133 -0
  23. package/docs/architecture/AGENTSAM_APPLICATION_CONTRACT.md +6 -0
  24. package/docs/architecture/CAD_OPERATOR_CAPABILITIES.md +64 -0
  25. package/docs/architecture/CAD_ROBOTICS_RELEASE_LEDGER_20261016.md +43 -0
  26. package/docs/architecture/CAD_RUN_MODES.md +34 -0
  27. package/docs/architecture/CLI-BOOT-REMOTE-DB-READINESS-20261015.md +65 -0
  28. package/docs/architecture/EXISTING-MCP-D1-AGENT-BRIDGE.md +47 -0
  29. package/docs/architecture/PLAN-PORTABILITY-SAM-FIRST-SPRINT-20261015.md +36 -0
  30. package/docs/architecture/PLUGIN-PRODUCTIZATION-SPINE.md +101 -0
  31. package/docs/architecture/SAMOS_PRODUCT_MODEL.md +49 -0
  32. package/docs/architecture/SAM_KERNEL.md +40 -0
  33. package/docs/architecture/SAM_RESOURCE_CRUD_STANDARD.md +96 -0
  34. package/docs/architecture/SAM_SYSTEMATIC_AUTONOMOUS_MACHINERY.md +79 -0
  35. package/docs/architecture/USER_GLOBAL_AGENT_INSTRUCTIONS.md +55 -0
  36. package/docs/autorag-workflow.md +13 -0
  37. package/docs/brand/AGENT_SAM_ICON_GRAMMAR.md +4 -0
  38. package/docs/contracts/capability-install-planner.md +66 -38
  39. package/docs/contracts/environment-vocabulary.md +5 -5
  40. package/docs/engineering/SUPERBASH_LOCAL_RUNTIME.md +100 -0
  41. package/docs/generated/SDK_CAPABILITY_INVENTORY.md +313 -0
  42. package/docs/handoffs/AGENT_HANDOFF_SUPERBASH_AND_MODEL_PERFORMANCE_2026-10-14.md +134 -0
  43. package/docs/intake/product-capabilities.proposed.ts +232 -0
  44. package/docs/knowledge-supabase-node-api.md +51 -0
  45. package/docs/plans/MEDIA_TRUTH_SOURCE_RECOVERY_20261008.md +31 -0
  46. package/docs/plans/OFFLINE_CLI_KNOWLEDGE_AGENT_HANDOFF.md +104 -0
  47. package/docs/plans/OFFLINE_CLI_KNOWLEDGE_RUNBOOK.md +81 -0
  48. package/docs/plans/SAM_EXPERIENCE_AGENT_DISPATCH_2026-10-15.md +107 -0
  49. package/docs/plans/SAM_MACHINERY_TO_EXPERIENCE_2026-10-15.md +172 -0
  50. package/docs/plans/UI_POLISH_DESKTOP_2026-10-16.md +102 -0
  51. package/docs/plans/WORK-UX-REMASTER-2026-10-15.md +48 -0
  52. package/docs/plans/WORK-WORKSPACE-PLAN-2026-10-14.md +212 -0
  53. package/docs/product/AGENTSAM-UI-QUALITY-GATE.md +148 -0
  54. package/docs/product/AGENTSAM_PRODUCT_EXPERIENCE_STANDARD.md +2 -0
  55. package/docs/product/MEDIA-PRODUCTION-FAMILY.md +47 -0
  56. package/docs/product/OFFER-PORTFOLIO.md +14 -0
  57. package/docs/product/PACKAGE-TAXONOMY.md +17 -0
  58. package/docs/product/PLUGIN-GALLERY-DISCOVERY-AND-INSTALL.md +97 -0
  59. package/docs/product/README.md +2 -0
  60. package/docs/product/WIDGET-GALLERY-PHASE-ONE.md +43 -0
  61. package/docs/reference/AGENTSAM-CLI-WORKFLOWS.md +73 -0
  62. package/docs/reference/AGENTSAM-ERROR-REASONS.md +267 -0
  63. package/docs/reference/AGENTSAM-REGISTRY.generated.md +288 -0
  64. package/docs/reference/INNERANIMALMEDIA_EXPERIENCE_ACCEPTANCE_2026-10-15.md +99 -0
  65. package/docs/releases/cad-v2-sdk-2.6.13.md +25 -0
  66. package/docs/roadmaps/ROAD_TO_REAL_DISTRIBUTION.md +97 -0
  67. package/docs/robotics-chess-handoff.md +15 -0
  68. package/docs/standards/DELIVERY_CLOSURE.md +33 -0
  69. package/docs/standards/SAM_MACHINE_BUILD_AND_GAPS.md +91 -0
  70. package/docs/workflows/ISSUE_TO_SAMOS.md +59 -0
  71. package/package.json +60 -8
  72. package/packages/agentsam-brand/package.json +1 -1
  73. package/packages/agentsam-cms/README.md +56 -0
  74. package/packages/agentsam-cms/agentsam.package.json +46 -0
  75. package/packages/agentsam-cms/package.json +36 -0
  76. package/packages/agentsam-cms/src/aliases.js +74 -0
  77. package/packages/agentsam-cms/src/contracts.js +105 -0
  78. package/packages/agentsam-cms/src/index.d.ts +80 -0
  79. package/packages/agentsam-cms/src/index.js +3 -0
  80. package/packages/agentsam-cms/src/machine.js +221 -0
  81. package/packages/agentsam-cms/src/node-sqlite-repository.js +148 -0
  82. package/packages/agentsam-cms/src/node.d.ts +7 -0
  83. package/packages/agentsam-cms/src/node.js +1 -0
  84. package/packages/agentsam-cms/src/schema/cms-local-runtime.v1.sql +365 -0
  85. package/packages/agentsam-cms/test/standalone.test.mjs +28 -0
  86. package/packages/agentsam-contracts/agentsam.package.json +43 -0
  87. package/packages/agentsam-contracts/dist/errors.d.ts +1 -1
  88. package/packages/agentsam-contracts/dist/widgets.d.ts +7 -0
  89. package/packages/agentsam-contracts/package.json +1 -1
  90. package/packages/agentsam-contracts/src/errors.ts +1 -1
  91. package/packages/agentsam-contracts/src/widgets.ts +7 -0
  92. package/packages/agentsam-desktop-shell/README.md +38 -0
  93. package/packages/agentsam-desktop-shell/scripts/app-discovery.mjs +43 -0
  94. package/packages/agentsam-errors/README.md +14 -0
  95. package/packages/agentsam-errors/agentsam.package.json +43 -0
  96. package/packages/agentsam-errors/package.json +1 -1
  97. package/packages/agentsam-errors/protocol/error-catalog.json +12 -0
  98. package/packages/agentsam-errors/src/cli.js +56 -0
  99. package/packages/agentsam-errors/src/index.js +2 -0
  100. package/packages/agentsam-errors/src/vocabulary.js +2 -0
  101. package/packages/agentsam-errors/test/approval-contract.test.mjs +12 -0
  102. package/packages/agentsam-errors/types/index.d.ts +5 -1
  103. package/packages/agentsam-goap/agentsam.package.json +42 -0
  104. package/packages/agentsam-goap/package.json +2 -2
  105. package/packages/agentsam-hooks/agentsam.package.json +45 -0
  106. package/packages/agentsam-hooks/bindings/go/errors_generated.go +1 -0
  107. package/packages/agentsam-hooks/bindings/rust/src/errors_generated.rs +1 -0
  108. package/packages/agentsam-hooks/package.json +1 -1
  109. package/packages/agentsam-hooks/src/errors-generated.js +10 -0
  110. package/packages/agentsam-ide/README.md +59 -0
  111. package/packages/agentsam-ide/src/lsp/host.d.mts +13 -0
  112. package/packages/agentsam-ide/src/lsp/host.mjs +133 -0
  113. package/packages/agentsam-knowledge/agentsam.package.json +42 -0
  114. package/packages/agentsam-knowledge/package.json +1 -1
  115. package/packages/agentsam-knowledge/src/autorag/index.js +25 -4
  116. package/packages/agentsam-knowledge/src/backends/index.js +21 -1
  117. package/packages/agentsam-knowledge/src/backends/supabase-node-api.js +91 -0
  118. package/packages/agentsam-knowledge/test/autorag.test.mjs +13 -0
  119. package/packages/agentsam-knowledge/test/supabase-node-api.test.mjs +59 -0
  120. package/packages/agentsam-merch/agentsam.package.json +43 -0
  121. package/packages/agentsam-merch/package.json +1 -1
  122. package/packages/agentsam-nav/dist/browser.global.js +18 -21
  123. package/packages/agentsam-nav/dist/browser.js +4 -3
  124. package/packages/agentsam-nav/dist/index.js +4 -3
  125. package/packages/agentsam-nav/package.json +1 -1
  126. package/packages/agentsam-queue-control/agentsam.package.json +42 -0
  127. package/packages/agentsam-queue-control/package.json +1 -1
  128. package/packages/agentsam-rapid-rust/Cargo.toml +5 -0
  129. package/packages/agentsam-rapid-rust/agentsam.package.json +42 -0
  130. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/0b22ca9c5f8cddc15e6816df4a2467a28d41aa174361cdfed9019ee4e04dfbb8.json +1 -0
  131. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/0c5064875a5d7645013880f04d71f56c0dfa1bc87ac9fd59adc3e9a93a2745da.json +1 -0
  132. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/11ebd15702c169ee0666656be851cc549f70f84498dbca3c5b72d2ceaa91c851.json +1 -0
  133. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/1d7f2c8ad9588cd2077a1d07fce156e0bd47be686d8c9f26885bab14874c4ab5.json +1 -0
  134. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/1f21ba21e7b631b0d4893cbdd7a6bb7345d34e8b1a0ee9cf644cc30aeb3c8b8d.json +1 -0
  135. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/23f4d4b90def0782de32e7a57558cba24525f12ba3c009728ea4881259a74099.json +1 -0
  136. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/26b60985b6ef62e4f20e06c37e47c6996c1a2f457335fa9eb4a68d1288e18490.json +1 -0
  137. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/2b27d15a1b8c3637a56f631d583cc9ba584bed2b7018dd962a9340d5e1c50a1d.json +1 -0
  138. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/3110a5568a544c4c38de6585dcdabc21fa5f54a5772ecf4e1f4076ee0d49e933.json +1 -0
  139. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/357ce3db8299e01866bf4fc3d8ee1c784ef53c7455cf86bb17c52f3dad20d050.json +1 -0
  140. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/4516c6e03636538cacc7a6e4063d98a7ed2f0090c3a02c5ee817f1c512b1070e.json +1 -0
  141. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/649e02dbaec2edabbd40372e0c5f72f114164fe7704e7825220b1955f6a7c74e.json +1 -0
  142. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/81c266d4c150a4f6c5a73c9c4fef6541577fd0acd8c1f911f02781deb5f0be0f.json +1 -0
  143. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/86b4b8de30eed9902750b3de9fb54276d229244671a8b6035345bbe705463d82.json +1 -0
  144. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/8a877fdc5dbc6a66c344b4ebc4d9b746d47f95153e98872210becd85ca941ddd.json +1 -0
  145. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/96a11200f7b42ddd1281e4f749e88dcb8455ab0e3883f943934e0a9a7935147a.json +1 -0
  146. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/9e2df2335cfc73ec021bdd6b2d34af798f6ed9c52e3061ce16b6ceabae4e275f.json +1 -0
  147. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/a405fe3addeaab2908ed58836997be3b679d990ec9102d06bece3569e4bd4a81.json +1 -0
  148. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/a63915da0a45f86a5938ba9a2b2e87d469e7d07f7ea9cc531136fdc9e055557e.json +1 -0
  149. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/a8452c2dcaa959ced25e3597931b311999c0aa5b257ca8610fe415e8cfa598cc.json +1 -0
  150. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/b35fc2ae65ea07fbbfdd242a3d76489947462399e7a2db91f8545ca50d97d86f.json +1 -0
  151. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/b966932defe9c7b5ec9599c9276d333bd09ad1605adae80300d825d2161ad20c.json +1 -0
  152. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/ca9060e5ccb91f3a2663f57afd47a25099b6b3313c2a7436c4634993ff6e9afc.json +1 -0
  153. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/d0eba82a259be203c68c3ebf6d5b8a376f31a3b84fad418fdb9b5e2715c59869.json +1 -0
  154. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/d8838513009c65079aba67314ab130920484c674c5f0b8a356c8777eb6174eb2.json +1 -0
  155. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/dda01925b7f0a213215b983979ce23625dd0f6cfdb49c483ec1ff73e64def56f.json +1 -0
  156. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/e4956d8f97608f8324607b22cc93635d8183b23021d79cb4c21668c8b8a6ce87.json +1 -0
  157. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/e80c1e517e7173dcbde78869d2bf67a24a11b0bb9df5a87fb12934e39497abc8.json +1 -0
  158. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/eeeaa9394ac979eb4ffa557e97d67ed96dbd61437e09058f7c776bdc0483f050.json +1 -0
  159. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/f9264d8d7d1ccfb415362a28b4a1b4fa0dfbdf828ff970d1aaecfb0ebe208978.json +1 -0
  160. package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/f957a80b89d32af4f33f9f840b4795af1b5145fc44780ad88a6a3b1b3a7ea3bc.json +1 -0
  161. package/packages/agentsam-repository/.agentsam/machine/runs/run_2b0d196f16961f88/asset-manifest.json +418 -0
  162. package/packages/agentsam-repository/.agentsam/machine/runs/run_2b0d196f16961f88/findings.json +308 -0
  163. package/packages/agentsam-repository/.agentsam/machine/runs/run_2b0d196f16961f88/frontend-manifest.json +70 -0
  164. package/packages/agentsam-repository/.agentsam/machine/runs/run_2b0d196f16961f88/graph.json +322 -0
  165. package/packages/agentsam-repository/.agentsam/machine/runs/run_2b0d196f16961f88/inventory.json +932 -0
  166. package/packages/agentsam-repository/.agentsam/machine/runs/run_2b0d196f16961f88/summary.json +21 -0
  167. package/packages/agentsam-repository/.agentsam/machine/runs/run_2d70e3d4fe8290fb/asset-manifest.json +418 -0
  168. package/packages/agentsam-repository/.agentsam/machine/runs/run_2d70e3d4fe8290fb/findings.json +308 -0
  169. package/packages/agentsam-repository/.agentsam/machine/runs/run_2d70e3d4fe8290fb/frontend-manifest.json +70 -0
  170. package/packages/agentsam-repository/.agentsam/machine/runs/run_2d70e3d4fe8290fb/graph.json +322 -0
  171. package/packages/agentsam-repository/.agentsam/machine/runs/run_2d70e3d4fe8290fb/inventory.json +932 -0
  172. package/packages/agentsam-repository/.agentsam/machine/runs/run_2d70e3d4fe8290fb/summary.json +21 -0
  173. package/packages/agentsam-repository/.agentsam/machine/runs/run_63fab76b2f18c2f0/asset-manifest.json +418 -0
  174. package/packages/agentsam-repository/.agentsam/machine/runs/run_63fab76b2f18c2f0/findings.json +308 -0
  175. package/packages/agentsam-repository/.agentsam/machine/runs/run_63fab76b2f18c2f0/frontend-manifest.json +70 -0
  176. package/packages/agentsam-repository/.agentsam/machine/runs/run_63fab76b2f18c2f0/graph.json +322 -0
  177. package/packages/agentsam-repository/.agentsam/machine/runs/run_63fab76b2f18c2f0/inventory.json +932 -0
  178. package/packages/agentsam-repository/.agentsam/machine/runs/run_63fab76b2f18c2f0/summary.json +21 -0
  179. package/packages/agentsam-repository/.agentsam/machine/runs/run_72fe856b80b0c46f/asset-manifest.json +418 -0
  180. package/packages/agentsam-repository/.agentsam/machine/runs/run_72fe856b80b0c46f/findings.json +300 -0
  181. package/packages/agentsam-repository/.agentsam/machine/runs/run_72fe856b80b0c46f/frontend-manifest.json +70 -0
  182. package/packages/agentsam-repository/.agentsam/machine/runs/run_72fe856b80b0c46f/graph.json +322 -0
  183. package/packages/agentsam-repository/.agentsam/machine/runs/run_72fe856b80b0c46f/inventory.json +932 -0
  184. package/packages/agentsam-repository/.agentsam/machine/runs/run_72fe856b80b0c46f/summary.json +21 -0
  185. package/packages/agentsam-repository/.agentsam/machine/runs/run_a5834156504f3050/asset-manifest.json +418 -0
  186. package/packages/agentsam-repository/.agentsam/machine/runs/run_a5834156504f3050/findings.json +308 -0
  187. package/packages/agentsam-repository/.agentsam/machine/runs/run_a5834156504f3050/frontend-manifest.json +70 -0
  188. package/packages/agentsam-repository/.agentsam/machine/runs/run_a5834156504f3050/graph.json +322 -0
  189. package/packages/agentsam-repository/.agentsam/machine/runs/run_a5834156504f3050/inventory.json +932 -0
  190. package/packages/agentsam-repository/.agentsam/machine/runs/run_a5834156504f3050/summary.json +21 -0
  191. package/packages/agentsam-repository/README.md +25 -0
  192. package/packages/agentsam-repository/agentsam.package.json +42 -0
  193. package/packages/agentsam-repository/package.json +6 -3
  194. package/packages/agentsam-repository/src/crawl.js +220 -0
  195. package/packages/agentsam-repository/src/index.js +3 -0
  196. package/packages/agentsam-repository/src/merkle/semantic.js +20 -0
  197. package/packages/agentsam-repository/src/refinery.js +96 -0
  198. package/packages/agentsam-repository/test/crawl-refinery.test.mjs +113 -0
  199. package/packages/agentsam-site-scrape/README.md +357 -0
  200. package/packages/agentsam-site-scrape/agentsam_site_scrape/__init__.py +4 -0
  201. package/packages/agentsam-site-scrape/agentsam_site_scrape/__main__.py +349 -0
  202. package/packages/agentsam-site-scrape/agentsam_site_scrape/classify.py +80 -0
  203. package/packages/agentsam-site-scrape/agentsam_site_scrape/config.py +83 -0
  204. package/packages/agentsam-site-scrape/agentsam_site_scrape/contract.py +108 -0
  205. package/packages/agentsam-site-scrape/agentsam_site_scrape/crawl.py +395 -0
  206. package/packages/agentsam-site-scrape/agentsam_site_scrape/evidence.py +226 -0
  207. package/packages/agentsam-site-scrape/agentsam_site_scrape/htmlparse.py +109 -0
  208. package/packages/agentsam-site-scrape/agentsam_site_scrape/imageops.py +121 -0
  209. package/packages/agentsam-site-scrape/agentsam_site_scrape/jsonrun.py +127 -0
  210. package/packages/agentsam-site-scrape/agentsam_site_scrape/net.py +121 -0
  211. package/packages/agentsam-site-scrape/agentsam_site_scrape/pageextract.py +202 -0
  212. package/packages/agentsam-site-scrape/agentsam_site_scrape/r2_upload.py +140 -0
  213. package/packages/agentsam-site-scrape/agentsam_site_scrape/ssrf.py +57 -0
  214. package/packages/agentsam-site-scrape/agentsam_site_scrape/storage.py +57 -0
  215. package/packages/agentsam-site-scrape/agentsam_site_scrape/wrangler_bucket.py +98 -0
  216. package/packages/agentsam-site-scrape/pyproject.toml +21 -0
  217. package/packages/agentsam-site-scrape/runtime/client.mjs +32 -0
  218. package/packages/agentsam-site-scrape/runtime/core.mjs +211 -0
  219. package/packages/agentsam-site-scrape/runtime/index.mjs +31 -0
  220. package/packages/agentsam-site-scrape/runtime/knowledge.mjs +38 -0
  221. package/packages/agentsam-site-scrape/runtime/node-runner.mjs +231 -0
  222. package/packages/agentsam-site-scrape/runtime/node-storage.mjs +146 -0
  223. package/packages/agentsam-site-scrape/runtime/project-site.mjs +74 -0
  224. package/packages/agentsam-site-scrape/runtime/secure-fetch.mjs +88 -0
  225. package/packages/agentsam-site-scrape/runtime/test/knowledge-handoff.test.mjs +51 -0
  226. package/packages/agentsam-site-scrape/runtime/test/project-index-command.test.mjs +109 -0
  227. package/packages/agentsam-site-scrape/runtime/test/runtime.test.mjs +145 -0
  228. package/packages/agentsam-site-scrape/tests/__init__.py +0 -0
  229. package/packages/agentsam-site-scrape/tests/test_contract.py +83 -0
  230. package/packages/agentsam-site-scrape/tests/test_core.py +119 -0
  231. package/packages/agentsam-site-scrape/tests/test_evidence.py +88 -0
  232. package/packages/agentsam-site-scrape/tests/test_evidence_pipeline.py +112 -0
  233. package/packages/agentsam-site-scrape/tests/test_jsonrun.py +63 -0
  234. package/packages/agentsam-site-scrape/tests/test_redirects.py +68 -0
  235. package/packages/agentsam-site-scrape/tests/test_storage.py +34 -0
  236. package/packages/agentsam-site-scrape/worker/index.mjs +259 -0
  237. package/packages/agentsam-site-scrape/worker/project-config.mjs +57 -0
  238. package/packages/agentsam-site-scrape/worker/test/worker.test.mjs +191 -0
  239. package/packages/agentsam-vault/package.json +1 -1
  240. package/packages/agentsam-workbench/README.md +18 -0
  241. package/packages/agentsam-workbench/package.json +13 -4
  242. package/packages/agentsam-workbench/src/agent/capability-catalog.ts +96 -0
  243. package/packages/agentsam-workbench/src/agent/index.ts +2 -0
  244. package/packages/agentsam-workbench/src/knowledge/AutoRagWorkflowDialog.tsx +166 -0
  245. package/packages/agentsam-workbench/src/knowledge/README.md +14 -0
  246. package/packages/agentsam-workbench/src/knowledge/autorag-workflow.css +6 -0
  247. package/packages/agentsam-workbench/src/knowledge/index.ts +2 -0
  248. package/packages/agentsam-workbench/src/widgets/registry.ts +266 -1
  249. package/packages/catalog/README.md +69 -0
  250. package/packages/catalog/assist/questions.json +205 -0
  251. package/packages/catalog/assist/rules.json +149 -0
  252. package/packages/catalog/doctor/toolchains.json +12 -0
  253. package/packages/catalog/evidence/agentsam-abs.json +76 -0
  254. package/packages/catalog/evidence/agentsam-analytics.json +59 -0
  255. package/packages/catalog/evidence/agentsam-assets-core.json +38 -0
  256. package/packages/catalog/evidence/agentsam-brand.json +73 -0
  257. package/packages/catalog/evidence/agentsam-browser-surface.json +42 -0
  258. package/packages/catalog/evidence/agentsam-campaign.json +48 -0
  259. package/packages/catalog/evidence/agentsam-cloudflare-images.json +38 -0
  260. package/packages/catalog/evidence/agentsam-content-studio.json +42 -0
  261. package/packages/catalog/evidence/agentsam-content.json +70 -0
  262. package/packages/catalog/evidence/agentsam-contracts.json +92 -0
  263. package/packages/catalog/evidence/agentsam-database-editor.json +82 -0
  264. package/packages/catalog/evidence/agentsam-desktop-shell.json +56 -0
  265. package/packages/catalog/evidence/agentsam-docs-theme.json +35 -0
  266. package/packages/catalog/evidence/agentsam-errors.json +42 -0
  267. package/packages/catalog/evidence/agentsam-goap.json +52 -0
  268. package/packages/catalog/evidence/agentsam-hooks.json +100 -0
  269. package/packages/catalog/evidence/agentsam-ide.json +64 -0
  270. package/packages/catalog/evidence/agentsam-identity.json +91 -0
  271. package/packages/catalog/evidence/agentsam-key-manager.json +46 -0
  272. package/packages/catalog/evidence/agentsam-knowledge.json +42 -0
  273. package/packages/catalog/evidence/agentsam-loading-scene.json +54 -0
  274. package/packages/catalog/evidence/agentsam-merch.json +68 -0
  275. package/packages/catalog/evidence/agentsam-nav.json +63 -0
  276. package/packages/catalog/evidence/agentsam-queue-control.json +60 -0
  277. package/packages/catalog/evidence/agentsam-rapid-rust.json +46 -0
  278. package/packages/catalog/evidence/agentsam-repository.json +56 -0
  279. package/packages/catalog/evidence/agentsam-scoring.json +39 -0
  280. package/packages/catalog/evidence/agentsam-sections.json +52 -0
  281. package/packages/catalog/evidence/agentsam-settings.json +58 -0
  282. package/packages/catalog/evidence/agentsam-shell-kit.json +56 -0
  283. package/packages/catalog/evidence/agentsam-vault.json +61 -0
  284. package/packages/catalog/evidence/agentsam-work-graph.json +51 -0
  285. package/packages/catalog/evidence/agentsam-work.json +64 -0
  286. package/packages/catalog/evidence/agentsam-workbench.json +96 -0
  287. package/packages/catalog/evidence/analytics-ui.json +43 -0
  288. package/packages/catalog/evidence/cms-runtime.json +49 -0
  289. package/packages/catalog/evidence/copro-editor.json +42 -0
  290. package/packages/catalog/evidence/copro-media.json +42 -0
  291. package/packages/catalog/evidence/copro-project.json +42 -0
  292. package/packages/catalog/evidence/copro-proof.json +48 -0
  293. package/packages/catalog/evidence/copro-provider-contracts.json +40 -0
  294. package/packages/catalog/evidence/copro-render.json +40 -0
  295. package/packages/catalog/evidence/copro-storage.json +44 -0
  296. package/packages/catalog/evidence/copro-templates.json +42 -0
  297. package/packages/catalog/evidence/copro-timeline.json +44 -0
  298. package/packages/catalog/evidence/copro-ui.json +52 -0
  299. package/packages/catalog/evidence/fnf-theme.json +34 -0
  300. package/packages/catalog/evidence/theme-contract.json +34 -0
  301. package/packages/catalog/evidence/theme-cypress.json +41 -0
  302. package/packages/catalog/evidence/theme-ember.json +41 -0
  303. package/packages/catalog/evidence/theme-forge.json +41 -0
  304. package/packages/catalog/evidence/theme-grove.json +41 -0
  305. package/packages/catalog/evidence/theme-harbor.json +41 -0
  306. package/packages/catalog/evidence/theme-heuristic.json +50 -0
  307. package/packages/catalog/evidence/theme-iasf.json +48 -0
  308. package/packages/catalog/evidence/theme-resolve.json +41 -0
  309. package/packages/catalog/evidence/theme-scenes.json +68 -0
  310. package/packages/catalog/evidence/theme-summit.json +41 -0
  311. package/packages/catalog/evidence/theme-violet.json +41 -0
  312. package/packages/catalog/generated/packages.json +2649 -0
  313. package/packages/catalog/topics/runtime.json +33 -0
  314. package/packages/connectors/cfoa/agentsam.package.json +46 -0
  315. package/packages/connectors/cfoa/package.json +1 -1
  316. package/packages/connectors/cfoa/src/capabilities.js +22 -2
  317. package/packages/connectors/cfoa/src/families/analytics-sql.js +44 -0
  318. package/packages/connectors/cfoa/src/families/basin.js +30 -0
  319. package/packages/connectors/cfoa/src/index.js +3 -0
  320. package/packages/connectors/cfoa/src/routes.js +11 -2
  321. package/packages/connectors/cfoa/test/analytics-sql.test.mjs +27 -0
  322. package/packages/connectors/cfoa/test/basin.test.mjs +30 -0
  323. package/packages/heuristic-theme/README.md +14 -0
  324. package/packages/heuristic-theme/agentsam.package.json +42 -0
  325. package/packages/heuristic-theme/contracts/README.md +15 -0
  326. package/packages/heuristic-theme/contracts/block.schema.json +33 -0
  327. package/packages/heuristic-theme/contracts/header-presets.json +20 -0
  328. package/packages/heuristic-theme/contracts/page.schema.json +18 -0
  329. package/packages/heuristic-theme/contracts/preset.schema.json +18 -0
  330. package/packages/heuristic-theme/contracts/section.schema.json +83 -0
  331. package/packages/heuristic-theme/package.json +13 -3
  332. package/packages/heuristic-theme/presets/fuel-free-time/assets.json +8 -0
  333. package/packages/heuristic-theme/presets/fuel-free-time/globals/shell.json +30 -0
  334. package/packages/heuristic-theme/presets/fuel-free-time/pages/about.json +4 -0
  335. package/packages/heuristic-theme/presets/fuel-free-time/pages/cart.json +4 -0
  336. package/packages/heuristic-theme/presets/fuel-free-time/pages/collection.json +4 -0
  337. package/packages/heuristic-theme/presets/fuel-free-time/pages/collections.json +4 -0
  338. package/packages/heuristic-theme/presets/fuel-free-time/pages/community.json +4 -0
  339. package/packages/heuristic-theme/presets/fuel-free-time/pages/home.json +92 -0
  340. package/packages/heuristic-theme/presets/fuel-free-time/pages/order-confirmation.json +39 -0
  341. package/packages/heuristic-theme/presets/fuel-free-time/pages/product.json +4 -0
  342. package/packages/heuristic-theme/presets/fuel-free-time/pages/shop.json +9 -0
  343. package/packages/heuristic-theme/presets/fuel-free-time/preset.json +23 -0
  344. package/packages/heuristic-theme/presets/fuel-free-time/tokens.json +23 -0
  345. package/packages/heuristic-theme/storefront/about.html +1103 -0
  346. package/packages/heuristic-theme/storefront/assets/presets/fuel-free-time/GENERATED-ASSETS.md +15 -0
  347. package/packages/heuristic-theme/storefront/assets/presets/fuel-free-time/earned-hours-hero.webp +0 -0
  348. package/packages/heuristic-theme/storefront/assets/presets/fuel-free-time/essentials.webp +0 -0
  349. package/packages/heuristic-theme/storefront/assets/presets/fuel-free-time/masters.webp +0 -0
  350. package/packages/heuristic-theme/storefront/cart.html +64 -0
  351. package/packages/heuristic-theme/storefront/collaborate.html +58 -0
  352. package/packages/heuristic-theme/storefront/collection.html +10 -0
  353. package/packages/heuristic-theme/storefront/collections.html +10 -0
  354. package/packages/heuristic-theme/storefront/community.html +921 -0
  355. package/packages/heuristic-theme/storefront/css/content-page.css +199 -0
  356. package/packages/heuristic-theme/storefront/css/global-footer.css +401 -0
  357. package/packages/heuristic-theme/storefront/css/heuristic-theme.css +81 -0
  358. package/packages/heuristic-theme/storefront/css/page-composer.css +76 -0
  359. package/packages/heuristic-theme/storefront/css/shop-hero.css +230 -0
  360. package/packages/heuristic-theme/storefront/css/store-cart.css +422 -0
  361. package/packages/heuristic-theme/storefront/css/store-collections.css +36 -0
  362. package/packages/heuristic-theme/storefront/css/store-pdp.css +459 -0
  363. package/packages/heuristic-theme/storefront/css/store-shell.css +474 -0
  364. package/packages/heuristic-theme/storefront/css/store-shop.css +117 -0
  365. package/packages/heuristic-theme/storefront/home.html +25 -0
  366. package/packages/heuristic-theme/storefront/js/cms-hydrate.js +395 -0
  367. package/packages/heuristic-theme/storefront/js/cms-structure.js +85 -0
  368. package/packages/heuristic-theme/storefront/js/fnf-attribution.js +98 -0
  369. package/packages/heuristic-theme/storefront/js/fnf-head.js +47 -0
  370. package/packages/heuristic-theme/storefront/js/fnf-newsletter.js +64 -0
  371. package/packages/heuristic-theme/storefront/js/global-footer.js +277 -0
  372. package/packages/heuristic-theme/storefront/js/heuristic-runtime.js +78 -0
  373. package/packages/heuristic-theme/storefront/js/order-confirmation.js +109 -0
  374. package/packages/heuristic-theme/storefront/js/page-composer.js +310 -0
  375. package/packages/heuristic-theme/storefront/js/shop-hero.js +85 -0
  376. package/packages/heuristic-theme/storefront/js/store-cart.js +276 -0
  377. package/packages/heuristic-theme/storefront/js/store-catalog.js +140 -0
  378. package/packages/heuristic-theme/storefront/js/store-collections.js +45 -0
  379. package/packages/heuristic-theme/storefront/js/store-product.js +287 -0
  380. package/packages/heuristic-theme/storefront/js/store-shell.js +449 -0
  381. package/packages/heuristic-theme/storefront/order-confirmation.html +30 -0
  382. package/packages/heuristic-theme/storefront/policies.html +43 -0
  383. package/packages/heuristic-theme/storefront/product.html +27 -0
  384. package/packages/heuristic-theme/storefront/shop.html +113 -0
  385. package/packages/heuristic-theme/storefront/terms.html +45 -0
  386. package/packages/heuristic-theme/test/commerce-portability.test.mjs +16 -0
  387. package/packages/heuristic-theme/theme.json +55 -0
  388. package/packages/heuristic-theme/theme.schema.json +32 -0
  389. package/packages/identity/agentsam.package.json +42 -0
  390. package/packages/identity/package.json +1 -1
  391. package/packages/identity/src/oauth/iam-platform.js +4 -2
  392. package/packages/identity/src/recovery/password-reset.js +8 -8
  393. package/packages/identity/src/server/worker-router.js +63 -1
  394. package/packages/identity/tests/lane1-packed-consumer.test.mjs +12 -1
  395. package/packages/identity/tests/password-enrollment.test.mjs +82 -0
  396. package/packages/identity/tests/password-reset.test.mjs +43 -0
  397. package/packages/providers/completeful/package.json +1 -1
  398. package/packages/theme-cypress/agentsam.package.json +42 -0
  399. package/packages/theme-cypress/package.json +1 -1
  400. package/packages/theme-ember/agentsam.package.json +42 -0
  401. package/packages/theme-ember/package.json +1 -1
  402. package/packages/theme-forge/agentsam.package.json +42 -0
  403. package/packages/theme-forge/package.json +1 -1
  404. package/packages/theme-grove/agentsam.package.json +42 -0
  405. package/packages/theme-grove/package.json +1 -1
  406. package/packages/theme-harbor/agentsam.package.json +42 -0
  407. package/packages/theme-harbor/package.json +1 -1
  408. package/packages/theme-resolve/agentsam.package.json +42 -0
  409. package/packages/theme-resolve/package.json +1 -1
  410. package/packages/theme-scenes/agentsam.package.json +42 -0
  411. package/packages/theme-scenes/package.json +1 -1
  412. package/packages/theme-summit/agentsam.package.json +42 -0
  413. package/packages/theme-summit/package.json +1 -1
  414. package/packages/theme-violet/agentsam.package.json +42 -0
  415. package/packages/theme-violet/package.json +1 -1
  416. package/packages/work-graph/agentsam.package.json +42 -0
  417. package/packages/work-graph/package.json +1 -1
  418. package/protocol/apps/agentsam.app.v1.schema.json +27 -1
  419. package/protocol/cad/README.md +77 -0
  420. package/protocol/cad/cad.project.v2.schema.json +451 -0
  421. package/protocol/cad/v2/core/artifact-receipt.schema.json +126 -0
  422. package/protocol/cad/v2/core/coordinate-system.schema.json +364 -0
  423. package/protocol/cad/v2/core/geometry-constraint.schema.json +136 -0
  424. package/protocol/cad/v2/core/geometry-entity.schema.json +73 -0
  425. package/protocol/cad/v2/core/geometry-feature.schema.json +115 -0
  426. package/protocol/cad/v2/core/geometry-relationship.schema.json +67 -0
  427. package/protocol/cad/v2/core/project-revision.schema.json +111 -0
  428. package/protocol/cad/v2/core/topology-reference.schema.json +80 -0
  429. package/protocol/cad/v2/intent/design-decision.schema.json +126 -0
  430. package/protocol/cad/v2/intent/design-option.schema.json +88 -0
  431. package/protocol/cad/v2/interchange/ifc-mapping.schema.json +145 -0
  432. package/protocol/cad/v2/interchange/native-document.schema.json +130 -0
  433. package/protocol/cad/v2/interchange/reference-model.schema.json +141 -0
  434. package/protocol/cad/v2/modules/architecture.v1.schema.json +278 -0
  435. package/protocol/cad/v2/modules/landscape.v1.schema.json +157 -0
  436. package/protocol/cad/v2/modules/mechanical.v1.schema.json +325 -0
  437. package/protocol/cad/v2/modules/parametric.v1.schema.json +89 -0
  438. package/protocol/cad/v2/modules/product-design.v1.schema.json +178 -0
  439. package/protocol/cad/v2/modules/robotics.v1.schema.json +246 -0
  440. package/protocol/cad/v2/presentation/camera-path.schema.json +143 -0
  441. package/protocol/cad/v2/presentation/drawing.schema.json +162 -0
  442. package/protocol/cad/v2/presentation/production.schema.json +166 -0
  443. package/protocol/cad/v2/presentation/scene.schema.json +198 -0
  444. package/protocol/cad/v2/presentation/sheet.schema.json +254 -0
  445. package/protocol/cad/v2/presentation/view.schema.json +190 -0
  446. package/protocol/cad/v2/presentation/walkthrough.schema.json +199 -0
  447. package/protocol/cad/v2/schema-pack.manifest.json +189 -0
  448. package/protocol/cad/v2/validation/deliverable-manifest.schema.json +199 -0
  449. package/protocol/cad/v2/validation/result.schema.json +141 -0
  450. package/protocol/capabilities/evidence-manifest.schema.json +404 -0
  451. package/protocol/capabilities/manifest.json +101 -10
  452. package/protocol/capabilities/repository-crawl-input.schema.json +17 -0
  453. package/protocol/capabilities/repository-crawl-result.schema.json +79 -0
  454. package/protocol/capabilities/repository-mine-input.schema.json +27 -0
  455. package/protocol/capabilities/repository-mine-result.schema.json +51 -0
  456. package/protocol/capabilities/site-index.schema.json +15 -0
  457. package/protocol/capabilities/site-scrape-evidence-manifest.schema.json +114 -0
  458. package/protocol/capabilities/site-scrape-input.schema.json +90 -0
  459. package/protocol/capabilities/site-scrape-project-authority.schema.json +15 -0
  460. package/protocol/capabilities/site-scrape-result.schema.json +198 -0
  461. package/protocol/capabilities/site-scrape-worker-job.schema.json +18 -0
  462. package/protocol/errors/error-catalog.json +12 -0
  463. package/protocol/governance/distribution-roadmap.v1.json +335 -0
  464. package/protocol/governance/github-labels.v1.json +232 -0
  465. package/protocol/models/workers-ai-curated.mjs +14 -0
  466. package/protocol/plugins/agentsam.plugin-evidence-bundle.v1.schema.json +55 -0
  467. package/protocol/plugins/agentsam.plugin-product.v1.schema.json +227 -0
  468. package/protocol/plugins/agentsam.plugin-quality-evidence.v1.schema.json +47 -0
  469. package/protocol/plugins/agentsam.plugin-quality-receipt.v1.schema.json +160 -0
  470. package/protocol/ui/agentsam.ui-quality.v1.schema.json +31 -0
  471. package/python/agentsam_sdk/__init__.py +4 -0
  472. package/python/agentsam_sdk/client.py +202 -0
  473. package/python/agentsam_sdk/errors/vocabulary.py +10 -0
  474. package/python/tests/test_public_client.py +82 -0
  475. package/services/cad/blender/adapter.py +0 -0
  476. package/services/cad/occt/CMakeLists.txt +43 -0
  477. package/services/cad/occt/README.md +38 -0
  478. package/services/cad/occt/main.cpp +95 -0
  479. package/services/cad/server.py +103 -21
  480. package/skills/README.md +6 -0
  481. package/skills/agentsam-cad/SKILL.md +59 -0
  482. package/skills/agentsam-plan-and-goap/SKILL.md +77 -0
  483. package/skills/agentsam-repo-recon/SKILL.md +63 -0
  484. package/skills/agentsam-sam-operations/SKILL.md +71 -0
  485. package/skills/agentsam-sdk-orientation/SKILL.md +75 -0
  486. package/skills/catalog.json +85 -0
  487. package/src/AgentSam.js +2 -0
  488. package/src/agent/capability-adapter.js +207 -9
  489. package/src/agent/index.js +1 -0
  490. package/src/agent/intent.js +12 -0
  491. package/src/agent/project-discovery.js +47 -0
  492. package/src/agent/project-resources.js +157 -0
  493. package/src/agent/responses-runner.js +64 -12
  494. package/src/capabilities/cloudflare-d1-provision.js +48 -0
  495. package/src/capabilities/knowledge-operations.js +87 -0
  496. package/src/capabilities/local-sqlite-resources.js +124 -0
  497. package/src/capabilities/machine-inspect.js +28 -0
  498. package/src/capabilities/mcp-d1-bridge.js +98 -0
  499. package/src/capabilities/plan-operation-ids.js +6 -0
  500. package/src/capabilities/plan-operations.js +85 -0
  501. package/src/capabilities/repository-awareness.js +52 -0
  502. package/src/capabilities/test-run.js +10 -0
  503. package/src/capabilities/workspace-files.js +125 -0
  504. package/src/cli/command-catalog.js +16 -3
  505. package/src/cli.js +71 -116
  506. package/src/commands/app.js +43 -44
  507. package/src/commands/autorag-node-api.js +96 -0
  508. package/src/commands/autorag.js +178 -17
  509. package/src/commands/catalog-doctor.js +52 -0
  510. package/src/commands/catalog.js +151 -0
  511. package/src/commands/cheat-sheet.js +92 -63
  512. package/src/commands/cloudflare.js +64 -2
  513. package/src/commands/codebaseindex.js +2 -2
  514. package/src/commands/db.js +17 -0
  515. package/src/commands/goap-world.js +4 -0
  516. package/src/commands/interactive.js +21 -1
  517. package/src/commands/knowledge.js +8 -3
  518. package/src/commands/machine-binary.js +3 -2
  519. package/src/commands/machine.js +66 -15
  520. package/src/commands/mcp.js +98 -8
  521. package/src/commands/plan-ledger.js +60 -22
  522. package/src/commands/plan.js +3 -3
  523. package/src/commands/plugins.js +34 -2
  524. package/src/commands/product.js +21 -0
  525. package/src/commands/rust.js +4 -1
  526. package/src/commands/sam-evidence.js +87 -0
  527. package/src/commands/sam-media.js +78 -0
  528. package/src/commands/sam.js +117 -0
  529. package/src/commands/shell.js +97 -8
  530. package/src/commands/site-scrape.js +9 -0
  531. package/src/context/resolve.js +5 -1
  532. package/src/index.js +13 -0
  533. package/src/knowledge/d1-schema.js +65 -0
  534. package/src/knowledge/engine.js +55 -15
  535. package/src/knowledge/source.js +8 -0
  536. package/src/knowledge/store-discovery.js +9 -3
  537. package/src/knowledge/stores/sqlite.js +8 -0
  538. package/src/knowledge/wrangler-binding-discovery.js +43 -0
  539. package/src/lib/agent-instructions.js +29 -5
  540. package/src/lib/auth.js +46 -7
  541. package/src/lib/cad/delivery-profiles.d.ts +7 -0
  542. package/src/lib/cad/delivery-profiles.js +122 -0
  543. package/src/lib/cad/docker-executor.js +1 -1
  544. package/src/lib/cad/editable-project-contract.js +75 -0
  545. package/src/lib/cad/index.js +6 -0
  546. package/src/lib/cad/occt-native-provider.mjs +138 -0
  547. package/src/lib/cad/openscad.js +13 -1
  548. package/src/lib/cad/production-operations.d.ts +8 -0
  549. package/src/lib/cad/production-operations.js +74 -0
  550. package/src/lib/cad/project-cli.d.ts +1 -1
  551. package/src/lib/cad/project-contract.js +1 -1
  552. package/src/lib/cad/project-runtime.d.ts +1 -1
  553. package/src/lib/cad/project-runtime.js +48 -3
  554. package/src/lib/cad/project-tools.js +24 -0
  555. package/src/lib/cad/project-v2.d.ts +48 -0
  556. package/src/lib/cad/project-v2.js +288 -0
  557. package/src/lib/cad-docker.js +48 -4
  558. package/src/lib/dockerize.js +3 -3
  559. package/src/lib/execution-approvals.js +29 -3
  560. package/src/local-fs/capability.js +5 -0
  561. package/src/local-lsp/host.js +2 -0
  562. package/src/local-pty/server.js +21 -0
  563. package/src/mcp/client.js +2 -1
  564. package/src/mcp/oauth-connection.js +109 -0
  565. package/src/models/inventory-core.js +2 -10
  566. package/src/plugins/index.js +13 -0
  567. package/src/plugins/productization.js +348 -0
  568. package/src/providers/gemini-generate-content.js +18 -0
  569. package/src/registry/generated/inventory.json +4266 -0
  570. package/src/registry/index.js +96 -0
  571. package/src/registry/turn-one.js +45 -0
  572. package/src/sam/adapters/local-media-store.js +71 -0
  573. package/src/sam/adapters/local-script-runtime.js +122 -0
  574. package/src/sam/adapters/local-script-store.js +103 -0
  575. package/src/sam/adapters/object-media-store.js +89 -0
  576. package/src/sam/adapters/workspace-media.js +78 -0
  577. package/src/sam/artifacts/render.js +94 -0
  578. package/src/sam/bridge/stdio.mjs +59 -0
  579. package/src/sam/client.js +269 -22
  580. package/src/sam/index.js +30 -1
  581. package/src/sam/local-execution.js +8 -0
  582. package/src/sam/media/environment.js +96 -0
  583. package/src/sam/model-adapter.js +45 -0
  584. package/src/sam/operation-packs/generated-v2/background.js +54 -0
  585. package/src/sam/operation-packs/generated-v2/catalog.js +1746 -0
  586. package/src/sam/operation-packs/generated-v2/generated-execution-policies.json +401 -0
  587. package/src/sam/operation-packs/generated-v2/generated-tool-descriptors.json +1352 -0
  588. package/src/sam/operation-packs/generated-v2/glb.js +41 -0
  589. package/src/sam/operation-packs/generated-v2/inneranimalmedia-provider.js +24 -0
  590. package/src/sam/operation-packs/generated-v2/operation-pack.js +126 -0
  591. package/src/sam/operation-packs/generated-v2/raster.js +140 -0
  592. package/src/sam/operation-packs/generated-v2/scripts.js +63 -0
  593. package/src/sam/operation-packs/generated-v2/sdk-adapter.js +9 -0
  594. package/src/sam/operation-packs/generated-v2/test/alias-runtime.test.mjs +51 -0
  595. package/src/sam/operation-packs/generated-v2/test/background.test.mjs +19 -0
  596. package/src/sam/operation-packs/generated-v2/test/glb.test.mjs +19 -0
  597. package/src/sam/operation-packs/generated-v2/test/raster.test.mjs +38 -0
  598. package/src/sam/operation-packs/generated-v2/test/real-asset-bindings.test.mjs +74 -0
  599. package/src/sam/operation-packs/generated-v2/test/registration.test.mjs +65 -0
  600. package/src/sam/operation-packs/generated-v2/test/scripts.test.mjs +32 -0
  601. package/src/sam/operation-packs/generated-v2/test/superbash-client-integration.test.mjs +215 -0
  602. package/src/sam/operation-packs/generated-v2/tool-types.d.ts +53 -0
  603. package/src/sam/operations/artifact-render.js +13 -0
  604. package/src/sam/operations/repository-inspect.js +12 -2
  605. package/src/sam/operations/robotics.js +45 -0
  606. package/src/sam/os.js +117 -0
  607. package/src/sam/packs/authoring/README.md +13 -0
  608. package/src/sam/packs/authoring/index.js +108 -0
  609. package/src/sam/packs/cad/http-ports.js +55 -0
  610. package/src/sam/packs/cad/index.js +158 -0
  611. package/src/sam/packs/cad/model-tools.js +22 -0
  612. package/src/sam/packs/cad/modes.js +87 -0
  613. package/src/sam/packs/cms/aliases.js +1 -0
  614. package/src/sam/packs/cms/contracts.js +1 -0
  615. package/src/sam/packs/cms/machine.js +6 -0
  616. package/src/sam/packs/cms/node.js +1 -0
  617. package/src/sam/packs/core.js +27 -0
  618. package/src/sam/packs/evidence/README.md +65 -0
  619. package/src/sam/packs/evidence/compare.js +98 -0
  620. package/src/sam/packs/evidence/contract.js +56 -0
  621. package/src/sam/packs/evidence/derive.js +59 -0
  622. package/src/sam/packs/evidence/driver-blender.js +96 -0
  623. package/src/sam/packs/evidence/driver-playwright.js +91 -0
  624. package/src/sam/packs/evidence/exporter-copro.js +70 -0
  625. package/src/sam/packs/evidence/facts.js +37 -0
  626. package/src/sam/packs/evidence/host-local.js +74 -0
  627. package/src/sam/packs/evidence/index.js +494 -0
  628. package/src/sam/packs/evidence/media.js +44 -0
  629. package/src/sam/packs/evidence/naming.js +67 -0
  630. package/src/sam/packs/evidence/normalize.js +117 -0
  631. package/src/sam/packs/evidence/review-page.js +102 -0
  632. package/src/sam/packs/evidence/screenplay.js +34 -0
  633. package/src/sam/packs/evidence/seal.js +55 -0
  634. package/src/sam/packs/evidence/serve.js +74 -0
  635. package/src/sam/packs/evidence/store.js +93 -0
  636. package/src/sam/packs/evidence/viewports.js +23 -0
  637. package/src/sam/robotics/chess-adapter.js +14 -0
  638. package/src/sam/robotics/franka.js +44 -0
  639. package/src/sam/robotics/index.js +4 -0
  640. package/src/sam/robotics/receipt.js +21 -0
  641. package/src/sam/robotics/world.js +57 -0
  642. package/src/sam/seed.js +10 -40
  643. package/src/sam/shell-host.js +120 -0
  644. package/src/sam/validation.js +40 -0
  645. package/src/security/local-vault.js +6 -1
  646. package/src/ui/cli/help.js +6 -0
  647. package/templates/clay/clay-blueprint-template.html +481 -0
  648. package/templates/clay/clay-case-study-blueprint.html +269 -0
  649. package/templates/clay/conversion-showcase-section.html +534 -0
  650. package/templates/clay/enhancing-conversion-section.html +141 -0
  651. package/templates/clay/nuant-wireframe.html +117 -0
@@ -0,0 +1,212 @@
1
+ # AgentSam Work — one workspace (Tickets · Projects · Calendar · Timeline)
2
+
3
+ Branch: `feat/work-workspace-crud-20261014` (merged as PR #215) · Status: shipped Work CRUD/web+desktop baseline; remaining phases explicitly tracked in section 15.
4
+
5
+ ## 0. Goal and rules
6
+
7
+ Tickets, Projects, Calendar and the Gantt/timeline are ONE workspace, not competing pages. Selecting a project filters tickets, a ticket with dates shows on the calendar and the timeline, a calendar event opens its ticket.
8
+
9
+ Hard rules (from Sam):
10
+ - Full CRUD on every entity, in web AND desktop. No dead buttons: a control either works or is not rendered (capability flags).
11
+ - Reuse existing tables/columns. No invented schema, no lookup/vocab tables.
12
+ - Theme comes from the Local Studio host tokens. No hardcoded white/dark.
13
+ - A fresh install (newuser123) must get a working, empty, fully editable workspace. No fixtures, no sample cards, no Sam-specific copy.
14
+ - Web and the installed desktop app ship the same fixes (same package, same contract test).
15
+ - No local .bak copies; git is the backup. Prune the branch when merged.
16
+
17
+ ## 1. What exists today (audit, 2026-10-14)
18
+
19
+ | Piece | Where | State |
20
+ |---|---|---|
21
+ | Tickets UI | `packages/agentsam-work/src/frontend/surfaces/TicketsSurface.tsx` | Sort / Refresh / New ticket have no handlers; board mode unwired; checkboxes uncontrolled; no `onOpenTicket` on `/tickets` |
22
+ | `/tickets` empty | `WorkProduct.tsx` passes `scope="collaborate"`; worker maps every non-collaborate row to `platform` | Engineering tickets filtered out; header analytics (from all rows) disagrees with the empty list |
23
+ | Hardcoded copy | TicketsSurface "Recommended execution order", "Dependency sketch" | Sam's internal ticket names baked into a published package |
24
+ | Projects UI | `ProjectsSurface.tsx` (agentsam-work) | Read-only; `+` does nothing; no create/edit/archive in host contract, worker or Rust allowlist |
25
+ | Calendar | `CalendarSurface.tsx`; worker returns `calendar: []` | No data source, no event endpoints, not clickable |
26
+ | AutoRAG pill | `LocalStudioWorkPage.tsx` absolute-positioned button over the breadcrumb | Overlaps "Work / Projects"; modal shows green checks while erroring |
27
+ | Timeline | `apps/project-control` + `agentsam-workbench/{projects,timeline}` | Beautiful, 100% hardcoded demo data, never wired; second `ProjectsSurface` duplicates the live one |
28
+ | `work-graph` | `packages/work-graph` | Pure model + gantt projection; NO tickets adapter |
29
+ | Desktop | `agentsam-desktop-shell`, bundles `desktop-dist` | Installed app is a frozen Oct 8-9 frontend; work calls go through a Rust allowlist (snapshot, tickets, mail only) |
30
+
31
+ ## 2. Donor map (inneranimalmedia monolith -> SDK)
32
+
33
+ Port the behavior, strip monolith specifics (workspace_members, IAM Meet, Google connect become optional providers).
34
+
35
+ | Capability | Donor (monolith) | Lands in |
36
+ |---|---|---|
37
+ | Ticket CRUD, status, links, events, analytics | `backend/agentsam/api/tickets.js` (GET list, GET analytics, POST, GET/PATCH/DELETE :id, POST :id/status, POST :id/link, GET/POST :id/events) | `apps/local-studio/backend/worker/work-service.js` (split into `work/tickets.js`) |
38
+ | Task editor (doc, due, project, client, schedule, complete, delete) | `pages/launch-desk/CollaborateTaskFocus.tsx`, `CollaborateTasksPanel.tsx` | new `TicketEditor` in `agentsam-work` (drawer / full page) |
39
+ | Project catalog + detail + quick stats | `pages/projects/ProjectsPage.tsx`, `ProjectDetailPage.tsx`, `ProjectQuickStats.tsx`, `src/api/projects/index.js` | `ProjectsSurface` + `ProjectDetailSurface` + worker `work/projects.js` |
40
+ | Calendar view, quick event, events CRUD, tasks-on-calendar | `components/CalendarPage.tsx`, `LaunchDeskPage.tsx` (Quick event), `src/api/calendar.js` (view, POST/PUT/DELETE events) | `CalendarSurface` + worker `work/calendar.js` |
41
+ | Gantt / timeline | `apps/project-control` + `agentsam-workbench/timeline/GanttBoard` | project-detail "Timeline" tab and Tickets "Timeline" mode |
42
+
43
+ ## 3. Data layer: one contract, two stores, honest fallback
44
+
45
+ ### 3.1 Contract
46
+ `WorkStore` interface (in `agentsam-work/contracts`), implemented twice. The UI only ever talks to `WorkHost`, which wraps a `WorkStore`. Snapshot gains `source: "hosted" | "local"` and `capabilities: { tickets: {create,update,delete}, projects: {...}, calendar: {...}, github: bool, googleCalendar: bool }` so surfaces hide what a store cannot do.
47
+
48
+ ### 3.2 Tables (reuse, mirror prod shapes)
49
+ - `agentsam_tickets` — already in `migrations/d1/0010_portable_tickets_memory.sql`. Columns already cover the timeline: `start_at`, `due_at`, `estimated_minutes`, `percent_complete`, `parent_ticket_id`, `blocks`, `blocked_by`, `owner_kind/owner_ref`, `client_id`, `project`, `surface`, `status_reason`. No schema change for Gantt.
50
+ - `projects` and `calendar_events` — exist in prod D1 (monolith) but are NOT in SDK migrations. A fresh install would have no table, so the worker silently returns empty. Plan: ship ONE portable migration (`CREATE TABLE IF NOT EXISTS`) that mirrors the prod column names exactly, so identical code runs against prod D1 and fresh installs. Step 1 introspects prod (`PRAGMA table_info`) before writing it; we mirror, we do not design.
51
+ - Ticket events (`/events`) reuse whatever the monolith already writes; confirm in step 1.
52
+
53
+ ### 3.3 Resolution order (fallback logic)
54
+ 1. Hosted account connected (web, or desktop signed in): D1 via `/api/work/*` and `/api/tickets|projects|calendar/*`, scoped by `auth_users.id` (single owner authority, no workspace_id).
55
+ 2. Desktop, signed out OR hosted unreachable (401/5xx/timeout): local SQLite (`~/.agentsam/work.db`) through agentsamd using the existing `local-sqlite-bridge` ops (`open_agentsam`, `query`, `insert`, `update`, `delete`). Migrations auto-apply on launch (`migrations/runtime` is already bundled in `tauri.conf.json`).
56
+ 3. Web, signed out: empty state with Sign in / Get the desktop app. Never fixtures.
57
+ - Every response carries `source`; the toolbar shows a small "Local" / "Hosted" badge. Writes always go to the active store.
58
+ - RESOLVED (see section 13): hosted D1 is the single source of truth for a signed-in owner; web and desktop are two windows on the same rows. Local SQLite is (a) the real store only when no account is connected and (b) a read-only offline cache when signed in. No two-way sync, no conflicts.
59
+ - First run seeds nothing fake. One real, deletable "Getting started" project + ticket created through normal CRUD so the screens are not blank and the owner can delete them.
60
+
61
+ ## 4. CRUD matrix (hosted route = local op = Rust allowlist entry)
62
+
63
+ | Entity | Create | Read | Update | Delete |
64
+ |---|---|---|---|---|
65
+ | Ticket | POST /api/tickets | GET /api/tickets, GET /:id, GET /analytics | PATCH /:id, POST /:id/status, POST /:id/link | DELETE /:id |
66
+ | Ticket events | POST /:id/events | GET /:id/events | — | — |
67
+ | Project | POST /api/projects | GET /api/projects, GET /:id | PATCH /:id (name, status, progress, cover, repo, star) | archive (default) + hard delete with confirm |
68
+ | Calendar event | POST /api/calendar/events | GET /api/calendar/view?from&to | PUT/PATCH /events/:id (drag/resize) | DELETE /events/:id |
69
+
70
+ Desktop: add every path above to `local_identity.rs` ("work" operation) AND to its test list; a CI contract test asserts that every method in `WorkHost` client has a matching allowlist entry and a worker route, so web and desktop cannot drift again. Also allow `/api/work/snapshot` without a `surface` param (currently rejected with `mail_connection` alone).
71
+
72
+ `WorkHost` additions: `deleteTicket`, `createProject`, `updateProject`, `deleteProject`, `createEvent`, `updateEvent`, `deleteEvent`, `listEvents(range)`.
73
+
74
+ ## 5. UI plan
75
+
76
+ Shared: one `WorkSelectionStore` in `WorkProduct` (active project, active ticket, calendar range) so the surfaces cooperate. Deep links stay URL-based (`/tickets?project=…&ticket=…`) so browser back works.
77
+
78
+ **Tickets**
79
+ - Fix scope: `/tickets` shows all tickets by default; `platform` / `collaborate` become a filter chip, not a hard scope.
80
+ - Modes: Queue, Board (drag between status columns = PATCH status), Timeline (work-graph + GanttBoard).
81
+ - Real sort / filter / refresh; New ticket opens the editor; controlled multi-select with bulk status + delete.
82
+ - Editor = donor task focus: title, documentation, status, priority, project, client, due, start, estimate, % complete, blocked-by, Schedule on calendar, Mark complete, Delete (confirm).
83
+ - "Recommended order" and "Dependency sketch" are DERIVED by a new `work-graph` tickets adapter (priority -> blocked_by/blocks topological order -> in_review first). Zero hardcoded text.
84
+
85
+ **Projects**
86
+ - Visual base: the workbench catalog (the clean one Sam approved) wired to live data. Delete the duplicate `ProjectsSurface` after both are compared.
87
+ - `+ New project` and card menu: edit, star, archive, delete. Tabs All / Active / Shared / Archived are real filters.
88
+ - Project detail = donor: quick stats (time, open tickets, progress), task list, Calendar and Tickets shortcuts, Timeline tab, codebase-index card, brand assets, memory/instructions only if the store reports the capability.
89
+
90
+ **Calendar**
91
+ - Today the grid is inert and fed `[]`. Plan: click/drag a cell opens Quick event (donor: event / task / focus / meeting / out of office, start/end, guests optional); save = POST; click an event = edit popover; drag/resize = PATCH; delete in popover.
92
+ - Tickets with `due_at` / `start_at` render as task events (color by project); clicking opens the ticket editor; dropping a ticket on a day sets `due_at`.
93
+ - Week / Month / Day, mini-month, Today, keyboard nav. Google sync and IAM Meet appear only if `capabilities.googleCalendar` is true.
94
+
95
+ **AutoRAG**
96
+ - Remove the absolute pill (overlaps the breadcrumb). Move it into the project detail "Codebase index / Knowledge" card as a normal button.
97
+ - Rewrite the modal states honestly: no green checks before anything ran. On web: a clear "Runs in Local Studio Desktop" card with an `agentsamstudio://` open link instead of a form that cannot submit. On desktop: the real inspect flow.
98
+
99
+ ## 6. Gantt flexfit (root causes found in `project-control.css`)
100
+
101
+ Defects: table `min-width: 1165px` with fixed `280px 125px` columns; inspector fixed `330px` squeezes the timeline to ~2 columns at 1200px windows; `min-height: calc(100dvh - 248px)` hardcodes the shell height; day columns `minmax(64px,1fr)` ignore container width.
102
+
103
+ Fixes:
104
+ - Size from the container, not the viewport: `container-type: inline-size` on the Gantt root and `@container` breakpoints.
105
+ - Zoom presets (Day / Week / Month) plus "Fit to range" computing day width with a ResizeObserver.
106
+ - Task column keeps priority; Owner column collapses under ~720px; progress % hides under ~560px.
107
+ - Inspector becomes an overlay/bottom sheet under ~900px container width; fixed side panel only above.
108
+ - Height = `flex: 1; min-height: 0` inside the shell, no `dvh` math. Sticky date header and frozen task column.
109
+ - Test widths: 360, 768, 1024, 1280, 1728, plus desktop window at its 1200x800 default.
110
+
111
+ ## 7. Theme (honor Local Studio)
112
+
113
+ - Today: two token namespaces (`--agentsam-work-*` in agentsam-work, `--as-work-*` in workbench) and hex values in `theme.css` (13), `ProjectsSurface` (1), `CalendarSurface` (7), `ArtifactsSurface` (7), `MailSurface` (2), `project-control.css` (36).
114
+ - Plan: ONE namespace derived from the host tokens (`--background`, `--card`, `--foreground`, `--border`, `--accent`, `--destructive`, `--radius`, `--font-sans`). Hex fallbacks live in a single `:where(.agentsam-work)` defaults block that only applies when no host tokens exist (standalone). Status/warning/phase colors via `color-mix()` from host accent and destructive.
115
+ - Light/dark follow the host theme class/attribute, never `prefers-color-scheme` alone.
116
+ - A test fails CI if a hex or rgb literal appears outside the defaults block.
117
+ - Verify against every Local Studio theme preset, in web and desktop.
118
+
119
+ ## 8. Desktop alignment
120
+
121
+ The desktop bundles `desktop-dist` (frozen). Every phase that touches UI ends with: `build:desktop-assets` -> `sync-local-studio-dist` -> Tauri bundle -> updater publish (`updates.inneranimalmedia.com`) -> install and click through the same checklist as web. Worker-only changes reach desktop immediately; UI and Rust allowlist changes need the rebuild. Lockstep version bump so a mismatch fails before deploy.
122
+
123
+ ## 9. work-graph and project-control
124
+
125
+ - Add `adapters/work/tickets.js` (ticket -> WorkItem, `blocked_by/blocks` -> dependencies, dates -> start/end, percent_complete -> progress). Write it in TypeScript per Sam's preference.
126
+ - Resolve the private/public contradiction (README says private; `publishConfig` and the catalog manifest say public).
127
+ - `apps/project-control` is retired once the Timeline tab lives in Local Studio (keep nothing that has fake data).
128
+
129
+ ## 10. Phases (each ends with web + desktop verification)
130
+
131
+ 0. Branch + single-React build fix (done on this branch). Do not touch the unrelated `feat/offline-cli-knowledge-catalog` WIP.
132
+ 1. Introspect prod schema; portable migration for `projects` / `calendar_events`; `WorkStore` contract; hosted D1 store with full routes; local SQLite store; allowlist + contract test. Accept: curl CRUD for all four entities on both stores.
133
+ 2. Tickets: scope fix, tickets adapter in work-graph, editor, board, sort/filter/bulk, delete.
134
+ 3. Projects: catalog swap, create/edit/archive/delete, detail page, remove duplicate surface.
135
+ 4. Calendar: clickable grid, quick event, drag/resize, tickets on calendar.
136
+ 5. Timeline: Gantt wired to tickets and project detail, flexfit fixes.
137
+ 6. Theme unification + hex lint; AutoRAG relocation and honest modal.
138
+ 7. Desktop build, updater publish, installed-app acceptance run; fresh-profile test (new user, no network) proving the local store works with nothing configured.
139
+
140
+ ## 11. Decisions (all resolved, see section 13)
141
+
142
+ 1. v1 local vs hosted: separate workspaces, no sync (recommended), or build sync now?
143
+ 2. OK to mirror prod `projects` and `calendar_events` into a portable SDK migration (same names/columns)?
144
+ 3. Projects catalog base: workbench look (recommended) vs current agentsam-work look.
145
+ 4. Delete semantics: archive by default, hard delete behind a confirm (recommended)?
146
+ 5. Google Calendar / Gmail: optional providers behind capabilities (recommended) for v1.
147
+
148
+ ## 12. Risks
149
+
150
+ - Prod `projects` has no account column guarantee (the worker already falls back to "all readable rows"); the new store must always scope by owner.
151
+ - Local SQLite path requires agentsamd running; first-run errors must be visible, not silent.
152
+ - Two React copies in bundles recur whenever workspace packages resolve react differently; keep the alias fix and add it to the Local Studio build too.
153
+
154
+ ## 13. Resolved decisions and prod findings (2026-10-14)
155
+
156
+ Decisions (Sam):
157
+ 1. One dataset. Hosted D1 (`inneranimalmedia-business`, the worker's `DB` binding) is the source of truth; desktop and web both read/write it. Local SQLite = no-account store + offline read cache. Offline edits while signed in are blocked with a clear read-only banner (no sync engine in v1).
158
+ 2. Mirror prod `projects` and `calendar_events` into a portable migration: YES.
159
+ 3. Projects catalog uses the workbench look: YES.
160
+ 4. Google Calendar and Gmail are optional providers behind capability flags, built now (OAuth clients for desktop and web already exist).
161
+
162
+ Prod schema findings (read-only queries against `inneranimalmedia-business`):
163
+ - `agentsam_tickets`: 666 rows, 665 with `account_id IS NULL`, 1 owned by Sam's auth user. The SDK worker filters `WHERE account_id = ?`, so it can return at most 1 ticket; the other 665 (654 `platform`) are invisible. Surface values in prod are not only platform/collaborate (`dashboard`, `execos`, `projects`, `worker`, `dashboard/images/videos`); the worker collapses them all to `platform`, losing information.
164
+ - `projects`: 39 rows; 30 have `owner_user_id IS NULL`; 9 belong to four aliases of Sam (`au_...`, `sam_primeaux`, `usr_sam_iam`, `usr_sam_primeaux`). The worker queries nonexistent columns (`account_id`, `owner_id`, `user_id`), the query throws, and its catch-fallback returns ALL rows. It only looks correct because Sam is the only user; it is a cross-owner leak the moment a second user exists. Status CHECK is `discovery|design|development|qa|staging|production|maintenance|archived` (the worker maps to a different set and loses `development`, `qa`, `staging`, `maintenance`). `project_type` CHECK is `dashboard|landing-page|saas-product|e-commerce|internal-tool|template`.
165
+ - `calendar_events`: 61 rows (43 Sam, 17 NULL user, 1 other). `tenant_id NOT NULL`; `user_id`, `project_id` (FK -> `projects`), `client_id` (FK -> `clients`), `event_type` CHECK (`meeting|deadline|reminder|task|client_call|personal|travel|other`), `start_datetime`/`end_datetime` TEXT, `status`, `color`, `priority`, Google fields `calendar_source`, `external_event_id`, `sync_account`.
166
+ - Gmail OAuth exists in the SDK (`gmail-service.js`, scopes `gmail.modify` + `gmail.send`). There is NO Google Calendar code or scope in the SDK; it exists only in the monolith (`/api/integrations/google-calendar/connect`, `calendar.js` google status/sync).
167
+
168
+ Consequences for phase 1:
169
+ - Portable migration = a SUBSET of prod columns, same names and same CHECK values, so identical queries run on prod and fresh installs. Leave out monolith-only columns (`supabase_sync_*`, `hyperdrive_id`, `mcp_service_id`, `d1_databases`, `r2_buckets`, `worker_id`, `workspace_id`, etc.). Drop the `clients` FK on `calendar_events.client_id` (no `clients` table on fresh installs) or ship a minimal `clients` mirror: decide when writing the migration. Writers set `tenant_id` = owner auth user id.
170
+ - Ownership backfill (PROD WRITE, needs Sam's explicit approval before running; prepared, not executed):
171
+ - `agentsam_tickets.account_id` for the 665 NULL rows -> Sam's auth user id
172
+ - `projects.owner_user_id` for the 30 NULL rows and the 4 legacy aliases -> Sam's auth user id (client projects stay visible through `client_id`)
173
+ - `calendar_events.user_id` for the 17 NULL rows -> Sam's auth user id
174
+ The id is taken from the signed-in session at run time, never hardcoded in code. Stage as a one-off script under `scripts/` using the d1 write tool, with a dry-run count first and row counts verified after.
175
+ - Worker queries are rewritten to scope strictly by owner (no "all rows" fallback), pass `surface` through unchanged, and use the prod status/type vocabularies.
176
+ - Google Calendar: reuse the existing Google OAuth client, add the calendar scope, port `google/status` + `google/sync` from the monolith, store linkage in the existing `calendar_source`/`external_event_id`/`sync_account` columns. `capabilities.googleCalendar` is true only when a token with that scope exists. Gmail already follows this pattern.
177
+
178
+ ## 14. Status handoff (2026-10-14)
179
+
180
+ DONE (tested locally)
181
+ - Prod ownership backfill ran and was verified (tickets 666, projects 39, events 60 owned by Sam's auth user).
182
+ - Worker data layer: apps/local-studio/backend/worker/work-schema.js, work-data.js (owner-scoped CRUD for tickets, projects, calendar events), work-sqlite-d1.js (node:sqlite D1 shim), work-data.test.mjs (7 passing). work-service.js delegates to it; snapshot adds source, capabilities, calendar events.
183
+ - packages/agentsam-work: contracts, client (createWorkCrud shared by all transports), new surfaces (Tickets queue/board/timeline + editor, Projects catalog + editor + delete dialog, ProjectDetail tabs, Calendar week/day/month with create/drag/edit, TimelineView), theme without literal colors (test enforces). tsc, build and package tests pass.
184
+
185
+ TODO, in order
186
+ 1. apps/local-studio/frontend/src/components/work/LocalStudioWorkPage.tsx: add the new WorkHost methods to the desktop host using createWorkCrud(request) from @inneranimalmedia/agentsam-work/client; http host already inherits them. Remove the absolute-positioned AutoRAG button; pass it via WorkProduct headerActions (projects) and knowledgeAction (project detail). Fix the AutoRAG modal (agentsam-workbench/knowledge) so it shows no green checks before anything ran, and on web explains it runs in Local Studio Desktop.
187
+ 2. packages/agentsam-desktop-shell/src-tauri/src/commands/local_identity.rs: allow /api/projects, /api/projects/:id, /api/calendar/events, /api/calendar/events/:id, and /api/work/snapshot with from/to/mail_connection params (also no-surface). Add them to the allowlist test list. Add a contract test that every createWorkCrud route is allowlisted.
188
+ 3. Run apps/local-studio typecheck and vite build; fix type errors (apps/local-studio/backend/server/work/contracts.ts and service.ts also import Work types).
189
+ 4. Local SQLite fallback for desktop when signed out or offline: run work-data.js over work-sqlite-d1.js in a node bridge (see packages/agentsam-database-editor/scripts/local-sqlite-bridge.mjs), route from the Rust "work" operation, snapshot source: "local", read-only cache when signed in and offline.
190
+ 5. Google Calendar provider (capability googleCalendar): port google status/sync from inneranimalmedia src/api/calendar.js using the existing Google OAuth client; synced events are already read-only.
191
+ 6. Delete apps/project-control once nothing imports it. Resolve work-graph private/public and add a tickets adapter.
192
+ 7. Deploy worker, then desktop: cd packages/agentsam-desktop-shell && npm run bundle:app, install and click through tickets, projects and calendar on web and desktop.
193
+
194
+ ## 15. Release receipt — 2026-10-15
195
+
196
+ - GitHub PR #215 merged to main at `5509b5eb`; work feature commit `7183f468`, mobile/desktop parity commit `1091ae39`.
197
+ - Cloudflare Worker `agentsam-sdk` deployed on `agentsam.inneranimalmedia.com` with version ID `4ffd9c5c-0ee3-4056-bf35-7ce744c78320`.
198
+ - Live unauthenticated smoke: `/projects` HTTP 200, `/tickets` HTTP 200; `/api/work/snapshot` HTTP 401 without a session (expected).
199
+ - Owner/backfill verified on production D1 after deployment: 666 tickets, 39 projects, 61 calendar events, zero NULL-owner rows in each (61 calendar total includes one separate user's event).
200
+ - Work UI: real project/ticket/calendar CRUD, ticket views, responsive Gantt, mobile Quick Create for task/project/event, project search and sorting, adjustable perceived completion and project color. The existing five-item mobile dock is preserved.
201
+ - Shared desktop transport uses `createWorkCrud(request)`; Rust Work route allowlist includes project/calendar CRUD and DELETE. The same Work UI package is used for web and desktop.
202
+ - Quality gates: Work package 8/8 tests; work-data 7/7 tests; frontend TS check passed; targeted Rust work bridge test passed; desktop asset build and headless desktop shell smoke passed; Cloudflare dry-run passed.
203
+ - iOS viewport check: explicit 390x844 device metrics, 390px document/shell/dock widths, five dock buttons, six fixture project cards. The fixture does not expose CRUD capability, so it cannot prove the blue Quick Create button interaction; authenticated iOS click-through remains an acceptance action.
204
+ - Tauri `.app` built for Apple Silicon, ad-hoc locally signed and zipped in `~/Downloads/AgentSam-Local-Studio-WorkV1-5509b5eb-macOS-arm64.zip`. Bundle verifies locally but is not Apple Developer-signed/notarized, and is NOT published to the updater. Treat as a local test installer, not a public release.
205
+
206
+ ### Outstanding work (do not report as shipped)
207
+ 1. Authenticated iPhone click-through of Tickets, Projects, + Quick Create and modal persistence; optimize any remaining rough interactions.
208
+ 2. Installed desktop app sign-in and live account data acceptance: project/ticket create/edit/archive across desktop and web, same owner-scoped rows; confirm all new Rust paths through the installed service bridge.
209
+ 3. Desktop offline/signed-out SQLite store and read-only signed-in cache. Do not create diverging signed-in datasets.
210
+ 4. Google Calendar OAuth scope and event sync (Gmail connection already exists). Keep optional provider capabilities honest.
211
+ 5. Milestones, reusable/versioned Templates, richer saved filters, verified progress and cross-project dependency presentation.
212
+ 6. Real Apple signing/notarization and updater publication once credentials and release versioning exist. Do not promise automatic desktop updates before this.
@@ -0,0 +1,148 @@
1
+ # AgentSam UI Quality Gate v1
2
+
3
+ Status: source checks and default dark-theme token contrast run in CI.
4
+ The five-viewport browser harness is an additional release test.
5
+ **Static success does not mean UI READY.** Release-ready also needs browser
6
+ a11y, keyboard, visual and functional receipts in hosted and desktop builds.
7
+
8
+ Canonical machine contract: scripts/ui-quality/contract.v1.json.
9
+ Applies to Local Studio, portable Workbench components, FNF/CMS themes,
10
+ generated semantic/static/interactive sections and future plugin UI.
11
+
12
+ ## Mobile-first is not phone UI stretched wider
13
+
14
+ | Viewport | Expected interaction |
15
+ | --- | --- |
16
+ | Phone 390x844 | One major surface; editor/settings/AgentSam as full-screen or bottom sheet; safe-area and keyboard-aware. |
17
+ | Tablet 820x1180 | Preview dominant, optional rails overlay or occupy capped width. |
18
+ | Desktop 1440x900 | Optional persistent editor rail and right inspector when room allows. |
19
+ | Large desktop 1728x1117 | Readable content and bounded panels. |
20
+ | Widescreen 2000x1200 | No endlessly growing sidebars; assign additional space to canvas intentionally. |
21
+
22
+ These are acceptance checkpoints, not the only widths. Also test landscape,
23
+ intermediate widths, reduced motion, 200% zoom and software keyboard. Use
24
+ container queries for portable embeddable widgets as needed. Start with
25
+ single-primary-surface flex min-h-0 flex-col. Introduce tablet overlays at md,
26
+ optional persistent rails at lg and capped panel widths on 2xl.
27
+ Use 100dvh and env(safe-area-inset-bottom). Aim for 44x44 phone touch targets.
28
+
29
+ ## Accessibility and helpers
30
+
31
+ - Use native buttons, links, inputs and semantic landmarks.
32
+ - Every actionable icon has an accessible name through aria-label or
33
+ aria-labelledby **independently** of its tooltip.
34
+ - Tooltip must work with focus. Crucial help must also be visible in context
35
+ or accessible by a touch help action; never require hover.
36
+ - Use aria-expanded, aria-controls, aria-selected, aria-live, aria-busy and
37
+ aria-describedby only when they accurately reflect state.
38
+ - Informative images require useful alt; decorative images use alt="".
39
+ - Logical Tab order, visible focus ring, Enter/Space, Escape and restored focus
40
+ are required in modals/sheets/editors.
41
+ - WCAG AA contrast: 4.5:1 normal text; 3:1 large text and applicable UI
42
+ components/focus indicators. Test the rendered background in every theme.
43
+ - Dead buttons, fabricated states, focus traps and hidden primary actions fail.
44
+
45
+ Local Studio's IconAction component is the initial supported icon-button
46
+ primitive: label, Radix tooltip and >=44px phone touch area.
47
+
48
+ ## Replace inline styles safely
49
+
50
+ Use Tailwind utility classes for static layout/appearance and @theme tokens
51
+ for brand properties. Package portable layout CSS with the Workbench component
52
+ rather than requiring an unknown consumer to compile Tailwind utilities.
53
+ Do not construct runtime class names that Tailwind scanning cannot discover.
54
+
55
+ Before:
56
+
57
+ ~~~tsx
58
+ <div style={{ display: "flex", gap: 12, padding: 16 }}>Content</div>
59
+ ~~~
60
+
61
+ After:
62
+
63
+ ~~~tsx
64
+ <div className="flex gap-3 p-4">Content</div>
65
+ ~~~
66
+
67
+ Dynamic geometry is an exception: CSS variable carries *data*, CSS owns
68
+ layout, overflow, max width and responsive behavior.
69
+
70
+ ~~~tsx
71
+ <aside className="editor-rail"
72
+ style={{ "--editor-rail-width": panelWidth + "px" } as CSSProperties}>
73
+ ...
74
+ </aside>
75
+ ~~~
76
+
77
+ ~~~css
78
+ .editor-rail { width: min(var(--editor-rail-width, 30rem), 42vw, 40rem); }
79
+ @media (max-width: 767px) {
80
+ .editor-rail { position: fixed; inset: 0; width: 100%; max-width: none; }
81
+ }
82
+ ~~~
83
+
84
+ Custom properties do not permit arbitrary inline visual CSS.
85
+
86
+ ## Check and prove
87
+
88
+ ~~~sh
89
+ node --test scripts/ui-quality/*.test.mjs
90
+ node scripts/ui-quality/check-source.mjs --changed-from origin/main
91
+ node scripts/ui-quality/check-source.mjs --files path/to/component.tsx,path/to/page.html
92
+ node scripts/ui-quality/contrast.mjs
93
+ ~~~
94
+
95
+ Static rules check newly changed JSX/HTML lines, not the entire legacy codebase.
96
+ They catch missing alt, unnamed icon buttons, nonsemantic click targets and
97
+ inline styles; they cannot prove browser appearance and interactions.
98
+
99
+ Start the actual product first, then check five sizes:
100
+
101
+ ~~~sh
102
+ node scripts/ui-quality/audit-viewports.mjs \
103
+ --url http://127.0.0.1:8080/work \
104
+ --expect '[data-agent-conversation-surface]' \
105
+ --matrix full \
106
+ --out /tmp/agentsam-ui-quality
107
+ ~~~
108
+
109
+ Five screenshots and receipt.json report route/product presence, overflow,
110
+ basic visible naming, image alt and phone touch targets. A login redirect
111
+ does not count as passing the requested authenticated product surface.
112
+
113
+ Before declaring READY, run axe-core WCAG 2.2 AA on the rendered pages,
114
+ keyboard traversal, screen-reader checks, reduced-motion and visual reviews,
115
+ plus real create/edit/preview/publish interactions. Record separate hosted
116
+ and packaged desktop runtime evidence. Missing runtime evidence = NOT_READY.
117
+
118
+
119
+ ## Packaged Settings rendered adapter
120
+
121
+ The general source/theme contract and boundary matrix above are canonical for
122
+ the SDK; the Settings package adds the independently computed
123
+ `agentsam.ui-quality.v1` **target receipt** at
124
+ `protocol/ui/agentsam.ui-quality.v1.schema.json` (SDK export
125
+ `@inneranimalmedia/agentsam-sdk/ui/quality-schema`). This is an implementation
126
+ adapter, not a competing source of truth for the quality law.
127
+
128
+ ```sh
129
+ npm run quality:ui:source
130
+ npm run quality:ui
131
+ ```
132
+
133
+ The source adapter scans changed Settings JSX for static inline styles,
134
+ missing alt and inaccessible controls. The real-browser adapter mounts the
135
+ same React Settings package with the desktop CSS and captures seven CSS sizes
136
+ 320, 390, 640, 820, 1100, 1440, and 1920px. It checks Agents, Brand
137
+ identity, Git & PRs, Account, and Customize; modal focus/Escape; horizontal
138
+ overflow; phone action height; rendered text (WCAG AA 4.5:1/3:1) and
139
+ form-control borders (3:1). The receipt is computed from all checks and is
140
+ `ready:false` if a check is failed or unverified. CI uploads evidence
141
+ screenshots and receipt.
142
+
143
+ A passed **Settings** receipt cannot be reused to mark FNF, CMS theme
144
+ sections, generated HTML/CSS/interactive artifacts, Workbench, or arbitrary
145
+ customer apps ready. Their respective generators/hosts must supply their own
146
+ rendered functional evidence under the broader canonical contract above.
147
+ In particular, the dark-theme token audit is not proof that every published
148
+ client theme has passed rendered AA contrast.
@@ -7,6 +7,8 @@
7
7
 
8
8
  > **Complex underneath. Effortless above.**
9
9
 
10
+ This AgentSam-specific product law implements the broader [InnerAnimalMedia Experience Standard](https://github.com/SamPrimeaux/inneranimalmedia/blob/main/docs/standards/INNERANIMALMEDIA_EXPERIENCE_STANDARD.md): **Craft over spectacle. Substance over promises.** The broader owner development standard applies to AgentSam releases, and this document supplies AgentSam-specific expression of it. A polished demo or passing build is not a release-ready product without proven real workflows, usability, reliability, and recovery.
11
+
10
12
  ## Product posture
11
13
 
12
14
  AgentSam is a professional software platform, not a prototype dashboard, chatbot wrapper, or collection of demos. The UI communicates maturity through **clarity, speed, consistency, depth, and restraint**.
@@ -0,0 +1,47 @@
1
+ # Media Production family — portable editing + hosted media operations
2
+
3
+ **Family ID:** `media-production` · **Members:** `copro`, `movie-mode`
4
+ **Source-of-truth family registry:** `SamPrimeaux/inneranimalmedia/product-manifests/media-production.json`
5
+ **Status:** Classified in manifests; **cross-product runtime adapter is not yet delivered**.
6
+
7
+ ## Who owns what
8
+
9
+ | Responsibility | Authority | Concrete roots |
10
+ | --- | --- | --- |
11
+ | Creative project document, provider-neutral asset references | CoPro | `packages/copro-project`, `packages/copro-media` |
12
+ | Editing commands, history, timeline math | CoPro | `packages/copro-editor`, `packages/copro-timeline` |
13
+ | Direct manipulation and mobile editing UI | CoPro | `packages/copro-ui`, `apps/agentsam-copro-studio` |
14
+ | Render intent, reusable generation/scene templates | CoPro | `packages/copro-render`, `packages/copro-templates` |
15
+ | Provider contracts / proof / portable persistence | CoPro | `packages/copro-provider-contracts`, `packages/copro-proof`, `packages/copro-storage` |
16
+ | Hosted MovieMode products/timelines, asset registry and artifact bytes | MovieMode | IAM main Worker `src/api/moviemode-api.js`; `moviemode_*` D1, `media_assets`, R2 and ARTIFACTS |
17
+ | Hosted generation, Remotion, transcode, Stream and export execution | MovieMode | IAM `src/core/moviemode-render-dispatch.js`, `src/core/cloudconvert-task-graph.js`, streaming/media APIs |
18
+ | Globe landing / legacy routes | MovieMode service (slim) | IAM `services/moviemode-service`; API copies are not active offload |
19
+ | Native processing, browser capture, approvals, evidence | Platform/runtime capabilities | AgentSam Hooks, authorized ExecOS/agentsamd, browser screenshot tools; not a new CoPro daemon |
20
+ | Public interactive scroll chapters | Site Studio / theme-scenes | `@inneranimalmedia/theme-scenes`; consumes CoPro/MovieMode produced media |
21
+
22
+ ## Contract law
23
+
24
+ 1. CoPro's canonical persisted `copro.project.v1` uses integer microseconds, `assetId` clip references and **no renderer identity, raw R2 references, hosted worker topology or credentials**.
25
+ 2. MovieMode's existing `MovieModeTimeline` v1 uses frames and has renderer and storage fields; its D1/R2 records remain authoritative for currently hosted user data.
26
+ 3. A family is **not** a common writable database. Do not create two competing canonical editors or run a silent schema migration.
27
+ 4. Only after a compatibility adapter proves full round-trip, clip/asset ordering, timebase precision, effects, revisions, authorization, save/reload, and output parity should a writer-authority decision be made.
28
+ 5. The accepted CoPro clean-room ADR forbids a required `copro-*` → MovieMode runtime dependency. Optional runtime provider adapters can target a MovieMode host through declared contracts.
29
+ 6. Provider generation is opt-in/authorized; local processing, Remotion, CloudConvert and Stream must use appropriate capabilities without vendor defaults in portable projects.
30
+
31
+ ## First integrated proof: robotics case-study clip
32
+
33
+ A seeded CAD/Franka chess session passes deterministic gameplay/simulation acceptance → authorized capture records real user-visible interaction → MovieMode registers source media and scope/provenance → CoPro editing commands compose trimmed shot(s) in a round-trip verified adapter → CoPro RenderPlan specifies output → existing MovieMode render/convert jobs produce verified loop and poster → CMS and theme-scenes present the media, labeled according to its test receipt.
34
+
35
+ This is a *proposed product integration*, not an already working end-to-end service.
36
+
37
+ ## Completion gates
38
+
39
+ - Host project save and reload are durable (errors not swallowed); clip changes retain ordering, timing, and legacy fields.
40
+ - Workspace/tenant ownership controls for source objects and render-job status are tested negatively.
41
+ - Export reaches `done` only after validated persisted ingest; retries and failures remain observable.
42
+ - Local/remote/sandbox execution lane is explicitly authorized and does not silently hop across machines.
43
+ - Portable CoPro passes its own package tests and does not require hosted IAM services.
44
+ - Real browser/native media captures are clean and repeatable, not mislabeled as generated proof.
45
+ - CoPro + MovieMode provide a usable mobile-first preview/edit/export path before any claim of a combined product.
46
+
47
+ **Not in scope for family registration:** npm renaming, source moves, service deployments, new media tables, migration of production data, creation of a third editor, adding a new rendering Worker.
@@ -21,12 +21,25 @@ A package is not automatically a product. Products are defined by end-to-end use
21
21
  | AgentSam Analytics | Experimental | `agentsam-analytics`, `analytics-ui` | Commerce + AgentSam operational decision support |
22
22
  | AgentSam Knowledge | Experimental | `agentsam-knowledge`, `agentsam-repository` | Provenance-aware reusable project/organization knowledge |
23
23
  | AgentSam Merch | Experimental | `agentsam-merch` | Manufacturing-ready artwork/product preparation |
24
+ | CoPro — Creative Production | Experimental | `packages/copro-*` + `apps/agentsam-copro-studio` | Portable mobile-first media editing, composition, preview and render planning, with optional provider adapters |
24
25
  | AgentSam CAD Studio | Experimental | `apps/agentsam-cad-creator` | Agent-assisted structured spatial/CAD design |
25
26
  | AgentSam Commerce Studio | Experimental | `apps/ecommerce-cms-agentsam` | Provider-neutral commerce operations with AgentSam assistance |
26
27
  | AgentSam Site Studio | Experimental | CMS runtime + sections + themes | Brand-aware website creation/refinement |
27
28
  | AgentSam Developer Studio | Experimental | `agentsam-ide` + workbench | Reusable AgentSam-native developer workspace |
28
29
  | AgentSam Hosted Runtime | Experimental | `apps/agentsam-go-worker` | Durable hosted orchestration without idle model polling |
29
30
 
31
+ ## Media Production family — CoPro and MovieMode
32
+
33
+ - **CoPro** is an independent SDK-distributed visual-creation product built from provider-neutral project, editor, timeline, media, template, storage, render, proof, and UI packages.
34
+ - **MovieMode** is its *peer* product in `SamPrimeaux/inneranimalmedia`: existing authenticated production UI, D1 media/project authority, Remotion/PTY execution, conversions, Stream, R2, and exports. MovieMode is not silently recast as an SDK package or renamed to CoPro.
35
+ - **Media Production** (`media-production`) is a registry/family concept, not a third hosted product, editor, database, or deployable Worker. It should unify discoverability and user journeys while preserving independent distribution and runtime ownership.
36
+ - **Asset Core / Images DAM / Content Studio** remain peer/shared capabilities; websites, CAD, chess and CMS consume media-production output but do not inherit the family classification.
37
+ - **CoPro to MovieMode adapter** is a future verified boundary. Existing MovieMode frame-based projects are not silently rewritten as CoPro microsecond projects.
38
+
39
+ Family implementation and acceptance: [MEDIA-PRODUCTION-FAMILY.md](./MEDIA-PRODUCTION-FAMILY.md).
40
+
41
+ ---
42
+
30
43
  ## Shared primitives - not standalone offers by default
31
44
 
32
45
  - `agentsam-contracts` - framework-neutral contracts.
@@ -74,6 +87,7 @@ These may be sold or bundled as templates/prebuilds, but their durable product v
74
87
 
75
88
  ## Existing apps and placement
76
89
 
90
+ - `agentsam-copro-studio` -> CoPro — Creative Production product editor; MovieMode stays in the InnerAnimalMedia host.
77
91
  - `agentsam-local-studio` -> AgentSam Local Studio.
78
92
  - `agentsam-work-app` -> AgentSam Work reference/packaged app.
79
93
  - `agentsam-browser-site` -> AgentSam Browser public product/promo surface.
@@ -38,6 +38,16 @@ This is the exhaustive current package/app placement map for `agentsam-sdk`. It
38
38
  | `@inneranimalmedia/agentsam-work` | Product engine | AgentSam Work | Portable AgentSam Work product surface: shared work contracts, fixture and HTTP hosts, project/ticket/mail/calendar/artifact views, and host-neutral React UI. |
39
39
  | `@inneranimalmedia/agentsam-workbench` | Shared product UI primitive | Local Studio and AgentSam apps | Reusable AgentSam workbench primitives for agent threads, composer, browser, terminal and resizable work surfaces. |
40
40
  | `@inneranimalmedia/analytics-ui` | Product UI | AgentSam Analytics, Commerce Studio | Domain-neutral analytics presentation primitives for Inner Animal Media products. |
41
+ | `@inneranimalmedia/copro-project` | Product engine | CoPro / Media Production | Provider-neutral project schema, serialization, validation, and durable creative intent. |
42
+ | `@inneranimalmedia/copro-editor` | Product engine | CoPro / Media Production | Canonical deterministic clip editing commands, undo/redo, and history. |
43
+ | `@inneranimalmedia/copro-timeline` | Domain primitive | CoPro / Media Production | Timeline math, ordering, duration, playhead, and viewport projection. |
44
+ | `@inneranimalmedia/copro-media` | Domain primitive | CoPro / Media Production | Provider-neutral media identities, sources and provenance. |
45
+ | `@inneranimalmedia/copro-render` | Domain primitive | CoPro / Media Production | Backend-neutral RenderPlan and runtime-capability-driven renderer selection. |
46
+ | `@inneranimalmedia/copro-storage` | Persistence adapter | CoPro / Media Production | Portable memory and browser storage; additional durable adapters remain acceptance work. |
47
+ | `@inneranimalmedia/copro-templates` | Product engine | CoPro / Media Production | Canvas, tracks, slots, captions, transitions, audio cues and generation-slot template contracts. |
48
+ | `@inneranimalmedia/copro-provider-contracts` | Provider contract | CoPro / Media Production | Abstract storage, streaming, transcription, generation, conversion and rendering capabilities. |
49
+ | `@inneranimalmedia/copro-proof` | Acceptance primitive | CoPro / Media Production | Cross-package mechanical composition tests and architecture proof. |
50
+ | `@inneranimalmedia/copro-ui` | Product UI | CoPro / Media Production | Mobile-first preview, timeline, gesture editing and composition screens. |
41
51
  | `@inneranimalmedia/cms-runtime` | Product engine | Site Studio, Commerce Studio | Portable self-describing local CMS runtime with SQLite schema, tool/skill catalogs, and provider-neutral package contracts. |
42
52
  | `@inneranimalmedia/theme-heuristic` | Theme/prebuild | Site Studio | Stock AgentSam CMS storefront shell theme contract (heuristic-theme). |
43
53
  | `@inneranimalmedia/agentsam-identity` | Platform capability | Public/local identity implementations | Identity module for @inneranimalmedia/agentsam-sdk (workspace — publish via root SDK) |
@@ -61,6 +71,7 @@ This is the exhaustive current package/app placement map for `agentsam-sdk`. It
61
71
  | --- | --- | --- | --- |
62
72
  | `@inneranimalmedia/agentsam-browser-site` | Product/public surface | AgentSam Browser | Public site for AgentSam Browser. Consumes the real ABS and sections packages. |
63
73
  | `@inneranimalmedia/agentsam-go-worker` | Deployable runtime | AgentSam Hosted Runtime | Deployable AgentSam Go runtime service artifact for Cloudflare Worker + Container self-hosting and official InnerAnimalMedia releases. Independent project; not affiliated with Cloudflare, Inc.. |
74
+ | `@inneranimalmedia/agentsam-copro-studio` | Packaged product app | CoPro / Media Production | Existing CoPro visual editor assembled from portable CoPro packages; not the hosted MovieMode dashboard. |
64
75
  | `@inneranimalmedia/agentsam-cad-creator` | Packaged app | AgentSam CAD Studio | Prepackaged AgentSam CAD, spatial design, and robotics application kit. |
65
76
  | `@inneranimalmedia/client-cms-editor` | Donor/reference app | AgentSam Site Studio | Reusable full-stack website + CMS kit with multi-page public sites, a protected authoring dashboard, local SQLite, starter/theme import, and pluggable auth, storage, and deployment adapters. |
66
77
  | `@inneranimalmedia/ecommerce-cms-agentsam` | Packaged app/runtime | AgentSam Commerce Studio | Portable AgentSam ecommerce CMS runtime, scaffolding, media, analytics, and admin application package. |
@@ -76,3 +87,9 @@ This is the exhaustive current package/app placement map for `agentsam-sdk`. It
76
87
  - **Donor/reference app** is implementation evidence, not necessarily the long-term product identity.
77
88
 
78
89
  Any new package should be added here when introduced.
90
+
91
+ ## Media Production family boundary
92
+
93
+ The **Media Production** family contains two independent product members: **CoPro**, the portable creative engine/UI represented by the packages above, and **MovieMode**, the existing hosted media-operations/product surface in `SamPrimeaux/inneranimalmedia`. Family classification is governed by `inneranimalmedia/product-manifests/media-production.json` and member manifests; this table identifies SDK package roles, not a runtime dependency. Do not import MovieMode's Worker, D1/R2 identity, terminal lanes or credentials into CoPro's canonical project or editing packages.
94
+
95
+ See [MEDIA-PRODUCTION-FAMILY.md](./MEDIA-PRODUCTION-FAMILY.md) for cross-repo authority and integration gates.
@@ -0,0 +1,97 @@
1
+ # AgentSam Plugin Gallery — Discovery and Installation
2
+
3
+ Date: 2026-10-06
4
+ Status: Catalog discovery, account registration, and IAM OAuth-mediated tool authorization are implemented and integration-tested. A fresh-account live browser/OAuth smoke and independent external-host smoke remain release gates.
5
+
6
+ ## Authorities
7
+
8
+ - @inneranimalmedia/agentsam-settings owns portable visual UI and host contracts, not provider credentials or execution.
9
+ - The public agentsam-plugin-mcp Worker owns manifest-driven discovery for Brand, Campaign and future real published plugin products.
10
+ - Local Studio owns account-scoped installations and uses existing D1 plugin registry records.
11
+ - Provider connections and their verified tool runtime remain separate, permissioned authorities.
12
+
13
+ ## User states
14
+
15
+ | State | Meaning |
16
+ | --- | --- |
17
+ | Available | Verified source manifest; not installed on account |
18
+ | Needs connection | Account registration exists, but no verified OAuth/tool connection |
19
+ | Connected | The verified runtime reports healthy, enabled and has registered tools |
20
+
21
+ Publishing an MCP endpoint, storing an installation, and authenticating working tools are distinct gates.
22
+
23
+ ## Catalog source trust
24
+
25
+ Configure Worker variable AGENTSAM_PLUGIN_CATALOG_URLS as a JSON list of owned, reviewed HTTPS catalog URLs, such as a first-party https://YOUR_PLUGIN_HOST/catalog/plugins. No third-party endpoint is hardcoded in the portable Settings package.
26
+
27
+ - Maximum 8 configured sources.
28
+ - Only HTTPS catalog URLs ending in /catalog/plugins; no redirects, localhost/private IP literals or embedded credentials.
29
+ - Catalog schema agentsam.plugin-catalog/v1; 150 entries and 256 KiB maximum per source; 6s request timeout.
30
+ - Every plugin key must be unique. MCP endpoint must be on the same source origin, with /mcp prefix.
31
+ - Only Streamable HTTP with OAuth is registered in this slice.
32
+ - Icon URLs must be same-origin catalog icons; provenance, tools, skills and example prompts come from actual manifests.
33
+ - Adding another verified catalog source does not require new Settings UI code.
34
+
35
+ ## Local Studio API
36
+
37
+ | Method | Route | Function |
38
+ | --- | --- | --- |
39
+ | GET | /api/plugins/catalog | Authenticated catalog and account installation projection |
40
+ | POST | /api/plugins/install | Account-owned install using plugin_key only |
41
+ | PATCH | /api/plugins/:id | Existing enable/visibility preferences |
42
+ | DELETE | /api/plugins/:id | Remove catalog-v1 registration, refusing active tool rows |
43
+ | POST | /api/plugins/tools/execute | Existing permissioned tool runtime; unchanged |
44
+
45
+ Install never registers executable tool definitions from remote JSON. New records start disabled, composer-hidden and unconfigured. Connection and approved tool registration are separate.
46
+
47
+ Hosted browsers use same-origin HTTP. Desktop uses the same authenticated Worker via a constrained native bridge.
48
+
49
+ ## Gallery design
50
+
51
+ Installed shows actual account registry state. Discover searches the verified public catalog, with categories, publisher, capabilities, actual manifest icons, legal metadata, example prompts, and account-scoped Add to Studio / Remove actions. A catalog failure is visible rather than replaced with fake sample plugins.
52
+
53
+ Copy prompt and Copy MCP endpoint work without pretending remote tools can already execute. Existing Cloudflare setup and disconnect controls remain.
54
+
55
+ ## Adding future or custom plugins
56
+
57
+ 1. In agentsam-plugin-mcp, run: npm run plugin:create -- agentsam-example --title "AgentSam Example".
58
+ 2. Generator creates a non-publishable draft with manifests, skill placeholder and promotion checklist.
59
+ 3. Implement a portable domain package, then actual MCP handlers, scopes, OAuth, evaluation suite and endpoint.
60
+ 4. Add real route/tool catalog. Promote the draft into plugins/ only when real and testable.
61
+ 5. Run npm run catalog:generate, npm run test:all, merge, and deploy from clean main.
62
+ 6. The host discovers it automatically from the updated trusted catalog.
63
+
64
+ Third-party ChatGPT plugins without compatible public MCP endpoints, credentials and permissions cannot be made usable merely by importing their name/icon.
65
+
66
+ ## Host configuration and third-party onboarding
67
+
68
+ `apps/local-studio/backend/wrangler.jsonc` owns the first-party catalog source in the deployment configuration:
69
+
70
+ ```json
71
+ "AGENTSAM_PLUGIN_CATALOG_URLS": "[\"https://plugins.inneranimalmedia.com/catalog/plugins\"]"
72
+ ```
73
+
74
+ The official plugin worker owns `https://plugins.inneranimalmedia.com` and publishes Brand and Campaign with MCP, OAuth resource and icon URLs under that same domain. The Local Studio Worker uses a Cloudflare `PLUGIN_CATALOG` service binding for same-account requests to that origin; the public custom domain remains the identity presented to customers and OAuth clients. No workers.dev URL is used as an official public endpoint. Existing grants bound to the old OAuth audience need an explicit reconnect, not a silent token rewrite.
75
+
76
+ The Worker treats this string as a JSON list of reviewed HTTPS sources. Each additional compatible provider can be added to that list **after operator review** and without touching the portable Settings UI. Preserve the first-party source when extending the array; a deploy must not silently reset the catalog. The app's catalog-validation test protects the baseline.
77
+
78
+ An external provider must publish a compatible `agentsam.plugin-catalog/v1` feed with same-origin `/mcp` endpoint, Streamable HTTP transport, and OAuth authorization. Installation only creates a disabled account registration. OAuth authorization, authenticated MCP tools/list registration, health verification, and explicit write approvals happen separately. Unsupported third-party ChatGPT apps, OAuth schemes, or arbitrary MCP URLs must not be surfaced as ready-to-use plugins without a compatible adapter.
79
+
80
+ User journey:
81
+
82
+ 1. Browse verified plugin catalog, inspect real permissions/tools and publisher.
83
+ 2. Add to Studio (creates account-scoped installation with no executable authority).
84
+ 3. Connect using provider OAuth; grant only requested scopes.
85
+ 4. Verify active registered tools and health; only then show **Connected**.
86
+ 5. Execute an approved read operation; require explicit review for permitted write operations.
87
+ 6. Disconnect/revoke; verify tools are no longer executable.
88
+
89
+ ### Release verification
90
+
91
+ - `node --test apps/local-studio/scripts/plugin-catalog-config.test.mjs` proves the deployed source configuration is present.
92
+ - `node apps/local-studio/scripts/plugin-discovery.test.mjs` proves URL/trust validation, generic multi-catalog composition and account-scoped installation.
93
+ - `node apps/local-studio/scripts/plugin-oauth-integration.test.mjs` covers OAuth, identity matching, registered tool scopes and approved writes.
94
+ - `npm run typecheck --prefix packages/agentsam-settings` and `npm run test --prefix packages/agentsam-settings` verify the portable UI.
95
+ - **Still required before claiming live customer readiness:** deploy the reviewed changes, run Brand/Campaign OAuth on a fresh real account, verify `tools/list` and one read call, test a write with approval and its denial, then independently connect one reviewed third-party compatible MCP catalog.
96
+
97
+ Do not conflate passing local integration tests, successful installation, and a genuinely verified live user connection.
@@ -5,4 +5,6 @@ These documents define product-facing laws above implementation-specific archite
5
5
  - [AgentSam Product Experience Standard](./AGENTSAM_PRODUCT_EXPERIENCE_STANDARD.md) — brand posture, visual/interaction language, progressive discovery, Local Studio quality bar, runtime UX, donor extraction, and authority discipline.
6
6
  - [Local Studio Desktop Experience Contract](./LOCAL_STUDIO_DESKTOP_EXPERIENCE.md) — launch behavior, bundled UI, desktop OAuth/Keychain behavior, handoff security, and release acceptance.
7
7
 
8
+ Owner-wide release quality and definition of finished: [InnerAnimalMedia Experience Standard](https://github.com/SamPrimeaux/inneranimalmedia/blob/main/docs/standards/INNERANIMALMEDIA_EXPERIENCE_STANDARD.md). User-global instruction loading (separate from customer product defaults): [User-global AgentSam instructions](../architecture/USER_GLOBAL_AGENT_INSTRUCTIONS.md).
9
+
8
10
  Architecture contracts remain authoritative for their own namespaces, including `docs/architecture/AGENTSAM_APPLICATION_CONTRACT.md` and `docs/architecture/SAM_KERNEL.md`.