@inneranimalmedia/agentsam-sdk 2.6.13 → 2.6.17

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 (1182) hide show
  1. package/AGENTSAM.md +1 -1
  2. package/LICENSE +97 -8
  3. package/LICENSING.md +30 -0
  4. package/README.md +33 -7
  5. package/apps/README.md +1 -1
  6. package/apps/cad-creator/LICENSE +97 -8
  7. package/apps/cad-creator/README.md +1 -1
  8. package/apps/cad-creator/shared/cad/package.json +1 -1
  9. package/apps/cad-creator/shared/cad/src/index.ts +2 -0
  10. package/apps/cad-creator/shared/cad/src/native-plan.ts +16 -0
  11. package/apps/cad-creator/shared/cad/src/types.ts +50 -1
  12. package/contracts/source-types.v2.json +9381 -0
  13. package/contracts/source-types.v2.schema.json +571 -0
  14. package/docs/2026-11-12-chat-work-whitelabel-scaffold.md +42 -0
  15. package/docs/DATABASE_EDITOR_REMASTER_ACCEPTANCE_20261103.md +41 -0
  16. package/docs/DOCKERIZE.md +2 -2
  17. package/docs/PRODUCT_LIFECYCLE.md +2 -2
  18. package/docs/REPO_FILE_MAP.txt +1 -1
  19. package/docs/THEME_REFINERY.md +4 -117
  20. package/docs/acceptance/AGENTSAM_DOCS_CMS_2026-11-10.md +62 -0
  21. package/docs/acceptance/AGENTSAM_SDK_LOCAL_LAUNCH_2026-11-06.md +42 -0
  22. package/docs/acceptance/AGENTSAM_SDK_PUBLIC_CMS_2026-11-10.md +35 -0
  23. package/docs/acceptance/AGENTSAM_WIDGET_UTILITIES_2026-11-06.md +34 -0
  24. package/docs/acceptance/CREATIVE_DEPARTMENT_BATCH1_2026-11-01.md +47 -0
  25. package/docs/acceptance/FINANCE_SETTINGS_CMS_WIP_2026-11-07.md +42 -0
  26. package/docs/adr/ADR-0009-widget-platform-authority.md +130 -0
  27. package/docs/adr/ADR-0010-widget-contributions-registry-persistence.md +265 -0
  28. package/docs/adr/README.md +5 -0
  29. package/docs/agent-briefs/2026-10-28-agent1-ui-product-foundation.md +132 -0
  30. package/docs/agent-briefs/2026-10-28-agent2-cms-audit.md +144 -0
  31. package/docs/agent-briefs/2026-10-28-sites-next-wave-acceptance.md +67 -0
  32. package/docs/architecture/AGENTSAM-PRODUCT-CATALOG-RELEASES-20261028.md +80 -0
  33. package/docs/architecture/AGENTSAM_ACCOUNT_FIRST_METRICS_V2_2026-10-28.md +38 -0
  34. package/docs/architecture/AGENTSAM_APPLICATION_CONTRACT.md +37 -0
  35. package/docs/architecture/AGENTSAM_WORK_IDE_LANES_2026-10-28.md +51 -0
  36. package/docs/architecture/DESIGN_WORKSPACE_BOUNDARY.md +69 -0
  37. package/docs/architecture/PLATFORM_R2_SOURCE_OF_TRUTH.md +134 -0
  38. package/docs/architecture/PROJECTS_DREAMHOUSE_METRICS_SPRINT_2026-10-28.md +34 -0
  39. package/docs/architecture/SAM_KERNEL.md +8 -2
  40. package/docs/architecture/SCHEMA_AUTHORITIES.md +87 -0
  41. package/docs/architecture/brand-presentation-context-discovery-2026-11-01.md +41 -0
  42. package/docs/architecture/studio-templates-audit-2026-11-01.md +59 -0
  43. package/docs/audits/2026-10-28-cms-platform-seam-baseline.md +86 -0
  44. package/docs/audits/2026-10-28-cms-v1-v2-side-by-side.md +53 -0
  45. package/docs/authoring/agentsam-sdk-docs-portal.json +175 -0
  46. package/docs/brand/ICONOGRAPHY-WIP-HANDOFF-20261022.md +36 -0
  47. package/docs/brand/ICONOGRAPHY_INTEGRATION_AUDIT_2026-10-28.md +39 -0
  48. package/docs/engineering/CMS_DATA_AUTHORITY_2026-11-03.md +45 -0
  49. package/docs/engineering/LOCAL_STUDIO_CMS_INSTALL_2026-11-02.md +23 -0
  50. package/docs/evidence/COPRO_CREATIVE_V1_20261030.md +22 -0
  51. package/docs/evidence/media-library-20261031/README.md +39 -0
  52. package/docs/generated/SDK_CAPABILITY_INVENTORY.md +29 -30
  53. package/docs/handoffs/COPRO_CREATIVE_V1_AGENT2.md +69 -0
  54. package/docs/media/local-intake-r2-backup.md +47 -0
  55. package/docs/operations/CLOUDFLARE-QUEUE-OBSERVABILITY.md +64 -0
  56. package/docs/operations/WIP_RECONCILIATION_2026-11-02.md +89 -0
  57. package/docs/plans/AGENTSAM_MEDIA_LIBRARY_AGENT1_MAP_20261031.md +62 -0
  58. package/docs/plans/AGENTSAM_SDK_RELEASE_PROGRAM.md +145 -0
  59. package/docs/plans/LOCAL_STUDIO_DESKTOP_RELEASE_2026-09-29.md +5 -3
  60. package/docs/plans/TOMORROW-EXTENSIVE-TODO-2026-09-26.md +1 -1
  61. package/docs/plugins.md +54 -0
  62. package/docs/primetech/CREATIVE_ENGINEERING.md +125 -0
  63. package/docs/product/PACKAGE-TAXONOMY.md +3 -12
  64. package/docs/reference/AGENTSAM-REGISTRY.generated.md +26 -25
  65. package/docs/release/NPM-TRUSTED-PUBLISHING.md +13 -0
  66. package/docs/releases/INDEPENDENT_PACKAGE_PUBLISHING.md +30 -0
  67. package/docs/roadmaps/2026-10-28-product-platform-stabilization.md +149 -0
  68. package/docs/sprints/2026-11-14-companion-media-product-preview.md +42 -0
  69. package/docs/standards/DELIVERY_CLOSURE.md +9 -1
  70. package/docs/studio/oauth-ddl-media-completion-2026-11-01.md +22 -0
  71. package/docs/studio/pwa-build-meta-agentsam-note.md +9 -0
  72. package/examples/widget-consumer/package.json +12 -0
  73. package/examples/widget-consumer/src/smoke.mjs +18 -0
  74. package/migrations/d1/0021_agentsam_product_releases.sql +94 -0
  75. package/migrations/d1/0022_agentsam_plugin_registry.sql +182 -0
  76. package/migrations/d1/0023_agentsam_plugin_install_health.sql +33 -0
  77. package/migrations/d1/0024_user_oauth_tokens_account_spine.sql +61 -0
  78. package/migrations/d1/0025_meta_model_api_service.sql +7 -0
  79. package/migrations/d1/0026_identity_github_signin_product.sql +34 -0
  80. package/migrations/d1/0027_unified_digital_products_collections.sql +72 -0
  81. package/migrations/d1/README_PORTABLE_CONTROL_PLANE.md +2 -0
  82. package/migrations/runtime/0010_agentsam_notifications.sql +86 -0
  83. package/migrations/runtime/0011_agentsam_product_releases.sql +94 -0
  84. package/native/agentsam-machine/cli/Cargo.toml +1 -1
  85. package/native/agentsam-machine/cli/LICENSE +110 -0
  86. package/native/agentsam-machine/core/Cargo.toml +1 -1
  87. package/native/agentsam-machine/core/LICENSE +110 -0
  88. package/native/agentsam-machine/core/src/lib.rs +3 -3
  89. package/package.json +73 -75
  90. package/packages/agentsam-3d-viewer/LICENSE +110 -0
  91. package/packages/agentsam-3d-viewer/README.md +58 -0
  92. package/packages/agentsam-3d-viewer/agentsam.package.json +63 -0
  93. package/packages/agentsam-3d-viewer/package.json +41 -0
  94. package/packages/agentsam-3d-viewer/src/format.d.ts +3 -0
  95. package/packages/agentsam-3d-viewer/src/format.js +24 -0
  96. package/packages/agentsam-3d-viewer/src/index.d.ts +104 -0
  97. package/packages/agentsam-3d-viewer/src/index.js +303 -0
  98. package/packages/agentsam-3d-viewer/src/occt.d.ts +12 -0
  99. package/packages/agentsam-3d-viewer/src/occt.js +54 -0
  100. package/packages/agentsam-3d-viewer/test/format.test.mjs +24 -0
  101. package/packages/agentsam-3d-viewer/test/occt.test.mjs +37 -0
  102. package/packages/agentsam-3d-viewer/test/viewport.test.mjs +128 -0
  103. package/packages/agentsam-architectural-intelligence/README.md +8 -0
  104. package/packages/agentsam-architectural-intelligence/data/materials.json +9 -0
  105. package/packages/agentsam-architectural-intelligence/data/sources.json +15 -0
  106. package/packages/agentsam-architectural-intelligence/mcp/server.mjs +80 -0
  107. package/packages/agentsam-architectural-intelligence/package.json +23 -0
  108. package/packages/agentsam-architectural-intelligence/test/reference.test.mjs +30 -0
  109. package/packages/agentsam-architectural-intelligence/test/sam-integration.test.mjs +20 -0
  110. package/packages/agentsam-brand/LICENSE +110 -0
  111. package/packages/agentsam-brand/README.md +6 -0
  112. package/packages/agentsam-brand/package.json +7 -4
  113. package/packages/agentsam-brand/src/cli/controller.js +28 -1
  114. package/packages/agentsam-brand/src/core/iconography/build.js +617 -0
  115. package/packages/agentsam-brand/src/core/iconography/render_clay.py +409 -0
  116. package/packages/agentsam-brand/src/core/preview.js +4 -0
  117. package/packages/agentsam-brand/src/core/processors/sharp.js +5 -3
  118. package/packages/agentsam-brand/src/index.js +2 -0
  119. package/packages/agentsam-cms/LICENSE +110 -0
  120. package/packages/agentsam-cms/README.md +71 -56
  121. package/packages/agentsam-cms/agentsam.package.json +23 -8
  122. package/packages/agentsam-cms/package.json +14 -3
  123. package/packages/agentsam-cms/src/account-context.js +135 -0
  124. package/packages/agentsam-cms/src/aliases.js +1 -1
  125. package/packages/agentsam-cms/src/application.js +252 -0
  126. package/packages/agentsam-cms/src/chat-storage.js +300 -0
  127. package/packages/agentsam-cms/src/contracts.js +105 -63
  128. package/packages/agentsam-cms/src/index.d.ts +84 -29
  129. package/packages/agentsam-cms/src/index.js +1 -0
  130. package/packages/agentsam-cms/src/machine.js +121 -119
  131. package/packages/agentsam-cms/src/node.d.ts +3 -7
  132. package/packages/agentsam-cms/src/node.js +8 -1
  133. package/packages/agentsam-cms/src/site-nav-defaults.js +16 -0
  134. package/packages/agentsam-cms/src/site-settings-contract.js +37 -0
  135. package/packages/agentsam-cms/test/application.test.mjs +134 -0
  136. package/packages/agentsam-cms/test/chat-storage.test.mjs +212 -0
  137. package/packages/agentsam-cms/test/standalone.test.mjs +69 -8
  138. package/packages/agentsam-cms/test/support/memory-repository.mjs +78 -0
  139. package/packages/agentsam-communications/README.md +52 -0
  140. package/packages/agentsam-communications/package.json +30 -0
  141. package/packages/agentsam-communications/src/adapters.js +78 -0
  142. package/packages/agentsam-communications/src/index.js +3 -0
  143. package/packages/agentsam-communications/src/outbox.js +56 -0
  144. package/packages/agentsam-communications/src/service.js +126 -0
  145. package/packages/agentsam-communications/test/communications.test.mjs +188 -0
  146. package/packages/agentsam-contracts/README.md +23 -0
  147. package/packages/agentsam-contracts/agentsam.package.json +2 -2
  148. package/packages/agentsam-contracts/dist/authority.d.ts +2 -1
  149. package/packages/agentsam-contracts/dist/authority.js +12 -0
  150. package/packages/agentsam-contracts/dist/design-workspace-bridge.d.ts +20 -0
  151. package/packages/agentsam-contracts/dist/design-workspace-registry.d.ts +12 -0
  152. package/packages/agentsam-contracts/dist/design-workspace-registry.js +133 -0
  153. package/packages/agentsam-contracts/dist/design-workspace.d.ts +115 -0
  154. package/packages/agentsam-contracts/dist/design-workspace.js +64 -0
  155. package/packages/agentsam-contracts/dist/index.d.ts +7 -0
  156. package/packages/agentsam-contracts/dist/index.js +580 -0
  157. package/packages/agentsam-contracts/dist/operations.d.ts +138 -0
  158. package/packages/agentsam-contracts/dist/operations.js +117 -0
  159. package/packages/agentsam-contracts/dist/resource-scope.d.ts +24 -0
  160. package/packages/agentsam-contracts/dist/resource-scope.js +25 -0
  161. package/packages/agentsam-contracts/dist/source-types.d.ts +92 -0
  162. package/packages/agentsam-contracts/dist/source-types.js +13 -0
  163. package/packages/agentsam-contracts/dist/spawn-policy.d.ts +32 -0
  164. package/packages/agentsam-contracts/dist/spawn-policy.js +27 -0
  165. package/packages/agentsam-contracts/dist/tools.d.ts +12 -5
  166. package/packages/agentsam-contracts/dist/tools.js +164 -0
  167. package/packages/agentsam-contracts/package.json +34 -4
  168. package/packages/agentsam-contracts/schemas/agent-tool-definition.v1.schema.json +78 -0
  169. package/packages/agentsam-contracts/schemas/sam-operation.v1.schema.json +159 -0
  170. package/packages/agentsam-contracts/schemas/sam-result.v1.schema.json +76 -0
  171. package/packages/agentsam-contracts/schemas/source-types.v2.json +9381 -0
  172. package/packages/agentsam-contracts/schemas/source-types.v2.schema.json +571 -0
  173. package/packages/agentsam-contracts/scripts/build.mjs +21 -5
  174. package/packages/agentsam-contracts/src/authority.ts +9 -7
  175. package/packages/agentsam-contracts/src/design-workspace-bridge.ts +99 -0
  176. package/packages/agentsam-contracts/src/design-workspace-registry.ts +130 -0
  177. package/packages/agentsam-contracts/src/design-workspace.ts +256 -0
  178. package/packages/agentsam-contracts/src/index.ts +7 -0
  179. package/packages/agentsam-contracts/src/operations.ts +229 -0
  180. package/packages/agentsam-contracts/src/resource-scope.ts +39 -0
  181. package/packages/agentsam-contracts/src/source-types.ts +92 -0
  182. package/packages/agentsam-contracts/src/spawn-policy.ts +43 -0
  183. package/packages/agentsam-contracts/src/tools.ts +145 -25
  184. package/packages/agentsam-contracts/test/contracts.test.mjs +112 -2
  185. package/packages/agentsam-contracts/test/design-workspace.test.mjs +238 -0
  186. package/packages/agentsam-contracts/test/resource-scope.test.mjs +22 -0
  187. package/packages/agentsam-contracts/test/source-types.test.mjs +31 -0
  188. package/packages/agentsam-contracts/test/spawn-policy.test.mjs +20 -0
  189. package/packages/agentsam-desktop-shell/LICENSE +110 -0
  190. package/packages/agentsam-desktop-shell/README.md +48 -13
  191. package/packages/agentsam-errors/agentsam.package.json +1 -1
  192. package/packages/agentsam-errors/package.json +2 -2
  193. package/packages/agentsam-errors/protocol/agentsam.error.v2.schema.json +1 -1
  194. package/packages/agentsam-goap/LICENSE +110 -0
  195. package/packages/agentsam-goap/package.json +4 -4
  196. package/packages/agentsam-hooks/agentsam.package.json +1 -1
  197. package/packages/agentsam-hooks/package.json +2 -2
  198. package/packages/agentsam-hooks/schema/manifest.json +1 -1
  199. package/packages/agentsam-ide/LICENSE +110 -0
  200. package/packages/agentsam-ide/README.md +88 -0
  201. package/packages/agentsam-knowledge/LICENSE +110 -0
  202. package/packages/agentsam-knowledge/package.json +3 -3
  203. package/packages/agentsam-merch/LICENSE +110 -0
  204. package/packages/agentsam-merch/README.md +59 -39
  205. package/packages/agentsam-merch/agentsam.package.json +1 -1
  206. package/packages/agentsam-merch/package.json +18 -3
  207. package/packages/agentsam-merch/profiles/completeful/dtg-back-large.json +1 -1
  208. package/packages/agentsam-merch/profiles/completeful/laser-engraving.json +1 -1
  209. package/packages/agentsam-merch/profiles/generic/embroidery-digitization.json +1 -1
  210. package/packages/agentsam-merch/schemas/collection-candidate.schema.json +1 -1
  211. package/packages/agentsam-merch/schemas/manufacturing-profile.schema.json +1 -1
  212. package/packages/agentsam-merch/src/adapters-printify.js +66 -0
  213. package/packages/agentsam-merch/src/collection-planning.d.ts +46 -0
  214. package/packages/agentsam-merch/src/collection-planning.js +135 -0
  215. package/packages/agentsam-merch/src/collection-showcase.css +34 -0
  216. package/packages/agentsam-merch/src/collection-showcase.d.ts +2 -0
  217. package/packages/agentsam-merch/src/collection-showcase.js +62 -0
  218. package/packages/agentsam-merch/src/compatibility.js +18 -1
  219. package/packages/agentsam-merch/src/geometry.js +82 -0
  220. package/packages/agentsam-merch/src/index.d.ts +33 -0
  221. package/packages/agentsam-merch/src/index.js +2 -0
  222. package/packages/agentsam-merch/src/merch-hero.css +32 -0
  223. package/packages/agentsam-merch/src/merch-hero.d.ts +5 -0
  224. package/packages/agentsam-merch/src/merch-hero.js +123 -0
  225. package/packages/agentsam-merch/src/node/index.js +1 -0
  226. package/packages/agentsam-merch/src/node/vector.js +83 -0
  227. package/packages/agentsam-merch/test/collection-planning.test.mjs +17 -0
  228. package/packages/agentsam-merch/test/collection-showcase.test.mjs +12 -0
  229. package/packages/agentsam-merch/test/geometry.test.mjs +32 -0
  230. package/packages/agentsam-merch/test/printify-adapter.test.mjs +42 -0
  231. package/packages/agentsam-merch/test/svg-normalization.test.mjs +33 -0
  232. package/packages/agentsam-nav/LICENSE +110 -0
  233. package/packages/agentsam-nav/README.md +21 -1
  234. package/packages/agentsam-nav/dist/AdminAppsDialog.d.ts +15 -0
  235. package/packages/agentsam-nav/dist/Nav.d.ts +3 -1
  236. package/packages/agentsam-nav/dist/NavProvider.d.ts +8 -1
  237. package/packages/agentsam-nav/dist/NavTrigger.d.ts +1 -1
  238. package/packages/agentsam-nav/dist/Surfaces.d.ts +16 -1
  239. package/packages/agentsam-nav/dist/browser.d.ts +18 -0
  240. package/packages/agentsam-nav/dist/browser.global.js +62 -22
  241. package/packages/agentsam-nav/dist/browser.js +7589 -6095
  242. package/packages/agentsam-nav/dist/contracts.d.ts +71 -2
  243. package/packages/agentsam-nav/dist/index.d.ts +4 -0
  244. package/packages/agentsam-nav/dist/index.js +1353 -190
  245. package/packages/agentsam-nav/dist/legacy.css +7 -4
  246. package/packages/agentsam-nav/dist/shell.css +380 -11
  247. package/packages/agentsam-nav/dist/state.d.ts +25 -0
  248. package/packages/agentsam-nav/dist/theme.css +380 -11
  249. package/packages/agentsam-nav/dist/useAdminApps.d.ts +55 -0
  250. package/packages/agentsam-nav/dist/utils.d.ts +4 -0
  251. package/packages/agentsam-nav/package.json +7 -3
  252. package/packages/agentsam-occt/.native-build/CMakeCache.txt +433 -0
  253. package/packages/agentsam-occt/.native-build/CMakeFiles/4.4.4/CMakeCXXCompiler.cmake +103 -0
  254. package/packages/agentsam-occt/.native-build/CMakeFiles/4.4.4/CMakeDetermineCompilerABI_CXX.bin +0 -0
  255. package/packages/agentsam-occt/.native-build/CMakeFiles/4.4.4/CMakeSystem.cmake +15 -0
  256. package/packages/agentsam-occt/.native-build/CMakeFiles/4.4.4/CompilerIdCXX/CMakeCXXCompilerId.cpp +954 -0
  257. package/packages/agentsam-occt/.native-build/CMakeFiles/4.4.4/CompilerIdCXX/a.out +0 -0
  258. package/packages/agentsam-occt/.native-build/CMakeFiles/4.4.4/CompilerIdCXX/apple-sdk.cpp +1 -0
  259. package/packages/agentsam-occt/.native-build/CMakeFiles/CMakeConfigureLog.yaml +2968 -0
  260. package/packages/agentsam-occt/.native-build/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
  261. package/packages/agentsam-occt/.native-build/CMakeFiles/InstallScripts.json +7 -0
  262. package/packages/agentsam-occt/.native-build/CMakeFiles/Makefile.cmake +53 -0
  263. package/packages/agentsam-occt/.native-build/CMakeFiles/Makefile2 +157 -0
  264. package/packages/agentsam-occt/.native-build/CMakeFiles/TargetDirectories.txt +4 -0
  265. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/DependInfo.cmake +24 -0
  266. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/build.make +146 -0
  267. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/cmake_clean.cmake +13 -0
  268. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/compiler_depend.internal +3152 -0
  269. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/compiler_depend.make +6886 -0
  270. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/compiler_depend.ts +2 -0
  271. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/depend.make +2 -0
  272. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/engine.cpp.o +0 -0
  273. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/engine.cpp.o.d +1868 -0
  274. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/flags.make +12 -0
  275. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/link.txt +1 -0
  276. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/main.cpp.o +0 -0
  277. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/main.cpp.o.d +1279 -0
  278. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/progress.make +4 -0
  279. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/DependInfo.cmake +23 -0
  280. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/build.make +114 -0
  281. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/cmake_clean.cmake +11 -0
  282. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/cmake_clean_target.cmake +3 -0
  283. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/compiler_depend.internal +1256 -0
  284. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/compiler_depend.make +3757 -0
  285. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/compiler_depend.ts +2 -0
  286. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/depend.make +2 -0
  287. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/flags.make +12 -0
  288. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/link.txt +2 -0
  289. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/progress.make +3 -0
  290. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/sketch_solver.cpp.o +0 -0
  291. package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/sketch_solver.cpp.o.d +1252 -0
  292. package/packages/agentsam-occt/.native-build/CMakeFiles/cmake.check_cache +1 -0
  293. package/packages/agentsam-occt/.native-build/CMakeFiles/progress.marks +1 -0
  294. package/packages/agentsam-occt/.native-build/Makefile +249 -0
  295. package/packages/agentsam-occt/.native-build/agentsam-occt +0 -0
  296. package/packages/agentsam-occt/.native-build/cmake_install.cmake +61 -0
  297. package/packages/agentsam-occt/.native-build/libagentsam-sketch-solver.a +0 -0
  298. package/packages/agentsam-occt/LICENSE +110 -0
  299. package/packages/agentsam-occt/README.md +100 -0
  300. package/packages/agentsam-occt/agentsam.package.json +60 -0
  301. package/packages/agentsam-occt/dist/browser.d.ts +32 -0
  302. package/packages/agentsam-occt/dist/browser.js +71 -0
  303. package/packages/agentsam-occt/dist/browser.js.map +1 -0
  304. package/packages/agentsam-occt/dist/index.d.ts +8 -0
  305. package/packages/agentsam-occt/dist/index.js +25 -0
  306. package/packages/agentsam-occt/dist/index.js.map +1 -0
  307. package/packages/agentsam-occt/dist/native-provider.d.mts +107 -0
  308. package/packages/agentsam-occt/dist/native-provider.mjs +177 -0
  309. package/packages/agentsam-occt/dist/native-provider.mjs.map +1 -0
  310. package/packages/agentsam-occt/dist/native-session.d.mts +8 -0
  311. package/packages/agentsam-occt/dist/native-session.mjs +64 -0
  312. package/packages/agentsam-occt/dist/native-session.mjs.map +1 -0
  313. package/packages/agentsam-occt/native/CMakeLists.txt +47 -0
  314. package/packages/agentsam-occt/native/engine.cpp +864 -0
  315. package/packages/agentsam-occt/native/engine.hpp +2 -0
  316. package/packages/agentsam-occt/native/main.cpp +123 -0
  317. package/packages/agentsam-occt/native/sketch_solver.cpp +198 -0
  318. package/packages/agentsam-occt/native/sketch_solver.hpp +5 -0
  319. package/packages/agentsam-occt/package.json +46 -0
  320. package/packages/agentsam-occt/src/browser.ts +92 -0
  321. package/packages/agentsam-occt/src/index.js +24 -0
  322. package/packages/agentsam-occt/src/native-provider.mjs +156 -0
  323. package/packages/agentsam-occt/src/native-session.d.mts +5 -0
  324. package/packages/agentsam-occt/src/native-session.mjs +35 -0
  325. package/packages/agentsam-occt/test/browser-provider.test.mjs +90 -0
  326. package/packages/agentsam-occt/test/contracts.test.mjs +32 -0
  327. package/packages/agentsam-occt/test/native-engine.test.mjs +49 -0
  328. package/packages/agentsam-occt/tsconfig.json +18 -0
  329. package/packages/agentsam-queue-control/LICENSE +110 -0
  330. package/packages/agentsam-queue-control/agentsam.package.json +1 -1
  331. package/packages/agentsam-queue-control/package.json +3 -3
  332. package/packages/agentsam-queue-control/schemas/job-envelope.schema.json +1 -1
  333. package/packages/agentsam-queue-control/src/adapters/cloudflare.js +39 -3
  334. package/packages/agentsam-queue-control/test/cloudflare-observability.test.mjs +54 -0
  335. package/packages/agentsam-rapid-rust/Cargo.toml +1 -1
  336. package/packages/agentsam-rapid-rust/LICENSE +110 -0
  337. package/packages/agentsam-repository/LICENSE +110 -0
  338. package/packages/agentsam-repository/package.json +3 -3
  339. package/packages/agentsam-site-scrape/README.md +1 -1
  340. package/packages/agentsam-site-scrape/tests/test_contract.py +1 -1
  341. package/packages/agentsam-vault/LICENSE +110 -0
  342. package/packages/agentsam-vault/package.json +3 -3
  343. package/packages/agentsam-workbench/LICENSE +110 -0
  344. package/packages/agentsam-workbench/package.json +20 -5
  345. package/packages/agentsam-workbench/src/agent/AgentRuntimeField.tsx +12 -7
  346. package/packages/agentsam-workbench/src/agent/Composer.tsx +10 -3
  347. package/packages/agentsam-workbench/src/agent/MiniAgentSam.tsx +129 -16
  348. package/packages/agentsam-workbench/src/agent/SelectionToolbar.tsx +161 -0
  349. package/packages/agentsam-workbench/src/agent/capability-catalog.ts +15 -8
  350. package/packages/agentsam-workbench/src/agent/index.ts +2 -0
  351. package/packages/agentsam-workbench/src/agent/mini-agentsam.css +18 -6
  352. package/packages/agentsam-workbench/src/agent/selection-toolbar.css +84 -0
  353. package/packages/agentsam-workbench/src/design/DesignWorkspaceFrame.tsx +209 -0
  354. package/packages/agentsam-workbench/src/design/canvas-handoff.ts +44 -0
  355. package/packages/agentsam-workbench/src/design/design-workspace.css +267 -0
  356. package/packages/agentsam-workbench/src/design/index.ts +7 -0
  357. package/packages/agentsam-workbench/src/index.ts +1 -0
  358. package/packages/agentsam-workbench/src/resources/ResourceCard.tsx +90 -0
  359. package/packages/agentsam-workbench/src/resources/index.ts +6 -0
  360. package/packages/agentsam-workbench/src/resources/resource-card.css +174 -0
  361. package/packages/agentsam-workbench/src/widgets/BuiltinWidget.tsx +6 -0
  362. package/packages/agentsam-workbench/src/widgets/CalculatorWidget.tsx +81 -0
  363. package/packages/agentsam-workbench/src/widgets/ClockWidget.tsx +66 -0
  364. package/packages/agentsam-workbench/src/widgets/QueueDepthWidget.tsx +122 -0
  365. package/packages/agentsam-workbench/src/widgets/calculator.ts +57 -0
  366. package/packages/agentsam-workbench/src/widgets/clock.ts +54 -0
  367. package/packages/agentsam-workbench/src/widgets/index.ts +5 -0
  368. package/packages/agentsam-workbench/src/widgets/registry.ts +27 -24
  369. package/packages/agentsam-workbench/src/widgets/widgets.css +31 -0
  370. package/packages/catalog/evidence/theme-scenes.json +5 -14
  371. package/packages/catalog/generated/packages.json +369 -522
  372. package/packages/catalog/src/theme-products.mjs +64 -0
  373. package/packages/connectors/cfoa/LICENSE +110 -0
  374. package/packages/connectors/cfoa/OAUTH_STORAGE_AUDIT.md +5 -0
  375. package/packages/connectors/cfoa/package.json +2 -2
  376. package/packages/connectors/cfoa/src/api-client.js +54 -8
  377. package/packages/connectors/cfoa/src/capabilities.js +41 -1
  378. package/packages/connectors/cfoa/src/credential.js +381 -48
  379. package/packages/connectors/cfoa/src/families/media.js +622 -0
  380. package/packages/connectors/cfoa/src/index.js +36 -2
  381. package/packages/connectors/cfoa/src/oauth-persist.js +231 -95
  382. package/packages/connectors/cfoa/src/routes.js +270 -34
  383. package/packages/connectors/cfoa/src/scope-catalog.js +14 -1
  384. package/packages/connectors/cfoa/tests/api-client-fetch.test.mjs +71 -0
  385. package/packages/connectors/cfoa/tests/capabilities.test.mjs +28 -3
  386. package/packages/connectors/cfoa/tests/connector.test.mjs +5 -5
  387. package/packages/connectors/cfoa/tests/cross-host-recovery.test.mjs +125 -0
  388. package/packages/connectors/cfoa/tests/media-discovery.test.mjs +260 -0
  389. package/packages/connectors/cfoa/tests/oauth-persist.test.mjs +114 -14
  390. package/packages/identity/.agentsam/features/oauth-login-portal/agentsam.feature.json +1 -1
  391. package/packages/identity/LICENSE +110 -0
  392. package/packages/identity/README.md +25 -0
  393. package/packages/identity/agentsam.package.json +1 -1
  394. package/packages/identity/migrations/apply-portable.js +1 -0
  395. package/packages/identity/migrations/sqlite/006_identity_account_security.sql +31 -0
  396. package/packages/identity/package.json +4 -2
  397. package/packages/identity/schema/agentsam.identity/manifest.json +31 -9
  398. package/packages/identity/src/adapters/account-security-store.js +236 -0
  399. package/packages/identity/src/adapters/iam-compat/index.js +13 -0
  400. package/packages/identity/src/adapters/portable-store.js +15 -0
  401. package/packages/identity/src/contracts/sign-in-options.js +10 -0
  402. package/packages/identity/src/core/account-security.js +149 -0
  403. package/packages/identity/src/frontend/auth-portal/pages/login.html +14 -2
  404. package/packages/identity/src/frontend/auth-portal/pages/signup.html +10 -4
  405. package/packages/identity/src/frontend/merchant-onboarding/store-start.css +9 -0
  406. package/packages/identity/src/frontend/merchant-onboarding/store-start.html +73 -0
  407. package/packages/identity/src/frontend/merchant-onboarding/store-start.js +166 -0
  408. package/packages/identity/src/migrations/0004_account_security.sql +24 -0
  409. package/packages/identity/src/server/merchant-onboarding.js +103 -0
  410. package/packages/identity/src/server/worker-router.js +192 -5
  411. package/packages/identity/tests/account-security.test.mjs +341 -0
  412. package/packages/identity/tests/chatgpt-provider.test.mjs +4 -2
  413. package/packages/identity/tests/lane1-packed-consumer.test.mjs +18 -4
  414. package/packages/identity/tests/merchant-onboarding-portability.test.mjs +77 -0
  415. package/packages/identity/tests/portable-identity-architecture.test.mjs +3 -3
  416. package/packages/identity/tests/preview-auth-portal.test.mjs +2 -0
  417. package/packages/identity/tests/stock-product-provenance.test.mjs +22 -0
  418. package/packages/primetech-procedures/README.md +61 -0
  419. package/packages/primetech-procedures/agentsam.package.json +63 -0
  420. package/packages/primetech-procedures/package.json +22 -0
  421. package/packages/primetech-procedures/procedures/cad.motor-bearing-end-plate/README.md +21 -0
  422. package/packages/primetech-procedures/procedures/cad.motor-bearing-end-plate/__pycache__/test_generate_toolpaths.cpython-314.pyc +0 -0
  423. package/packages/primetech-procedures/procedures/cad.motor-bearing-end-plate/build_freecad.py +514 -0
  424. package/packages/primetech-procedures/procedures/cad.motor-bearing-end-plate/finalize_bundle.py +26 -0
  425. package/packages/primetech-procedures/procedures/cad.motor-bearing-end-plate/generate_assets.py +284 -0
  426. package/packages/primetech-procedures/procedures/cad.motor-bearing-end-plate/generate_toolpaths.py +715 -0
  427. package/packages/primetech-procedures/procedures/cad.motor-bearing-end-plate/package_artifacts.py +154 -0
  428. package/packages/primetech-procedures/procedures/cad.motor-bearing-end-plate/parameters.json +51 -0
  429. package/packages/primetech-procedures/procedures/cad.motor-bearing-end-plate/procedure.json +101 -0
  430. package/packages/primetech-procedures/procedures/cad.motor-bearing-end-plate/render_preview.py +98 -0
  431. package/packages/primetech-procedures/procedures/cad.motor-bearing-end-plate/run.py +214 -0
  432. package/packages/primetech-procedures/procedures/cad.motor-bearing-end-plate/test_generate_toolpaths.py +50 -0
  433. package/packages/primetech-procedures/procedures/repo.asset.inventory/__pycache__/run.cpython-312.pyc +0 -0
  434. package/packages/primetech-procedures/procedures/repo.asset.inventory/procedure.json +65 -0
  435. package/packages/primetech-procedures/procedures/repo.asset.inventory/run.py +116 -0
  436. package/packages/primetech-procedures/procedures/repo.asset.inventory/run.sh +11 -0
  437. package/packages/primetech-procedures/profiles/PRIMETECH_PROCEDURE_ENGINEER.md +25 -0
  438. package/packages/primetech-procedures/src/index.js +547 -0
  439. package/packages/primetech-procedures/test/__pycache__/test_inventory.cpython-312.pyc +0 -0
  440. package/packages/primetech-procedures/test/procedure.test.mjs +207 -0
  441. package/packages/primetech-procedures/test/test_inventory.py +57 -0
  442. package/packages/providers/completeful/LICENSE +110 -0
  443. package/packages/providers/completeful/README.md +67 -27
  444. package/packages/providers/completeful/dist/client.d.ts +118 -0
  445. package/packages/providers/completeful/dist/client.js +221 -0
  446. package/packages/providers/completeful/dist/generated/operations.generated.d.ts +760 -0
  447. package/packages/providers/completeful/dist/generated/operations.generated.js +931 -0
  448. package/packages/providers/completeful/dist/generated/types.generated.d.ts +1173 -0
  449. package/packages/providers/completeful/dist/generated/types.generated.js +1 -0
  450. package/packages/providers/completeful/openapi/openapi.json +5320 -0
  451. package/packages/providers/completeful/package.json +34 -8
  452. package/packages/providers/completeful/scripts/generate.mjs +156 -0
  453. package/packages/providers/completeful/src/client.js +12 -162
  454. package/packages/providers/completeful/src/core/client.ts +248 -0
  455. package/packages/providers/completeful/src/core/generated/operations.generated.ts +931 -0
  456. package/packages/providers/completeful/src/core/generated/types.generated.ts +94 -0
  457. package/packages/providers/completeful/src/index.d.ts +24 -0
  458. package/packages/providers/completeful/src/index.js +3 -0
  459. package/packages/providers/completeful/test/openapi.test.mjs +70 -0
  460. package/packages/providers/completeful/test/types/consumer.ts +30 -0
  461. package/packages/providers/completeful/test/types/tsconfig.json +12 -0
  462. package/packages/providers/completeful/tsconfig.json +15 -0
  463. package/packages/theme-scenes/LICENSE +110 -0
  464. package/packages/theme-scenes/README.md +57 -2
  465. package/packages/theme-scenes/agentsam.package.json +42 -19
  466. package/packages/theme-scenes/package.json +11 -12
  467. package/packages/theme-scenes/src/cms/adapter.js +232 -0
  468. package/packages/theme-scenes/src/cms/browser.js +5 -0
  469. package/packages/theme-scenes/src/cms/index.js +22 -0
  470. package/packages/theme-scenes/src/cms/runtime.js +524 -0
  471. package/packages/theme-scenes/src/contracts/index.js +40 -0
  472. package/packages/theme-scenes/src/index.js +1 -0
  473. package/packages/theme-scenes/src/runtime/compile.js +24 -0
  474. package/packages/theme-scenes/src/scenes/index.js +3 -1
  475. package/packages/theme-scenes/src/visuals/index.js +7 -0
  476. package/packages/theme-scenes/test/cms.test.mjs +118 -0
  477. package/packages/theme-scenes/test/theme-scenes.test.mjs +52 -0
  478. package/packages/work-graph/LICENSE +110 -0
  479. package/packages/work-graph/package.json +2 -2
  480. package/protocol/README.md +2 -2
  481. package/protocol/apps/agentsam.app.v1.schema.json +1 -1
  482. package/protocol/apps/agentsam.host-install.v1.schema.json +1 -1
  483. package/protocol/assets/asset-record.v1.schema.json +1 -1
  484. package/protocol/brand/brandpack.v1.schema.json +1 -1
  485. package/protocol/cad/README.md +8 -0
  486. package/protocol/cad/blender-recipe.schema.json +1 -1
  487. package/protocol/cad/cad.project.v2.schema.json +107 -4
  488. package/protocol/canvas/knowledge-core.mjs +35 -0
  489. package/protocol/capabilities/capability-manifest.schema.json +1 -1
  490. package/protocol/capabilities/cloudflare-cpu-audit-input.schema.json +1 -1
  491. package/protocol/capabilities/cloudflare-cpu-profile-input.schema.json +1 -1
  492. package/protocol/capabilities/cloudflare-wrangler-native-input.schema.json +1 -1
  493. package/protocol/capabilities/evidence-manifest.schema.json +1 -1
  494. package/protocol/capabilities/knowledge-search-input.schema.json +1 -1
  495. package/protocol/capabilities/manifest.json +36 -1
  496. package/protocol/capabilities/repository-audit-input.schema.json +1 -1
  497. package/protocol/capabilities/repository-audit.schema.json +1 -1
  498. package/protocol/capabilities/repository-crawl-input.schema.json +1 -0
  499. package/protocol/capabilities/repository-crawl-result.schema.json +1 -0
  500. package/protocol/capabilities/repository-mine-input.schema.json +1 -0
  501. package/protocol/capabilities/repository-mine-result.schema.json +1 -0
  502. package/protocol/capabilities/repository-snapshot-input.schema.json +1 -1
  503. package/protocol/capabilities/repository-snapshot.schema.json +1 -1
  504. package/protocol/capabilities/site-index.schema.json +1 -1
  505. package/protocol/capabilities/site-scrape-evidence-manifest.schema.json +1 -1
  506. package/protocol/capabilities/site-scrape-input.schema.json +1 -1
  507. package/protocol/capabilities/site-scrape-project-authority.schema.json +1 -1
  508. package/protocol/capabilities/site-scrape-result.schema.json +1 -1
  509. package/protocol/capabilities/site-scrape-worker-job.schema.json +1 -1
  510. package/protocol/capabilities/terminal-exec-input.schema.json +1 -1
  511. package/protocol/context/context-budget.schema.json +1 -1
  512. package/protocol/context/context-item.schema.json +1 -1
  513. package/protocol/context/resolved-context-pack.schema.json +3 -3
  514. package/protocol/context/result-policy.schema.json +1 -1
  515. package/protocol/contracts/source-types.v2.json +9381 -0
  516. package/protocol/contracts/source-types.v2.schema.json +571 -0
  517. package/protocol/credentials/issue.v1.schema.json +2 -2
  518. package/protocol/database/agentsam.schema-pack.v1.schema.json +1 -1
  519. package/protocol/database/connection.v1.schema.json +1 -1
  520. package/protocol/embeddings/embedding-profile.v1.schema.json +1 -1
  521. package/protocol/errors/agentsam.error.v2.schema.json +1 -1
  522. package/protocol/errors/error-envelope.schema.json +1 -1
  523. package/protocol/errors/recovery.v1.schema.json +1 -1
  524. package/protocol/features/agentsam.feature.v1.schema.json +1 -1
  525. package/protocol/hooks/README.md +2 -0
  526. package/protocol/hooks/agentsam.hook.output.v1.schema.json +1 -1
  527. package/protocol/hooks/agentsam.hook.receipt.v1.schema.json +1 -1
  528. package/protocol/hooks/agentsam.hook.v1.schema.json +1 -1
  529. package/protocol/hooks/agentsam.hooks.config.v1.schema.json +1 -1
  530. package/protocol/knowledge/chunk.schema.json +1 -1
  531. package/protocol/knowledge/context-pack.schema.json +3 -3
  532. package/protocol/knowledge/document.schema.json +1 -1
  533. package/protocol/knowledge/index-config.schema.json +1 -1
  534. package/protocol/knowledge/ingest-receipt.schema.json +1 -1
  535. package/protocol/knowledge/repository.schema.json +1 -1
  536. package/protocol/knowledge/retrieval-hit.schema.json +1 -1
  537. package/protocol/knowledge/retrieval-query.schema.json +2 -2
  538. package/protocol/knowledge/source.schema.json +1 -1
  539. package/protocol/local-engine/benchmark.v1.schema.json +1 -1
  540. package/protocol/local-engine/engine.v1.schema.json +1 -1
  541. package/protocol/models/discovery.mjs +409 -0
  542. package/protocol/models/model-inventory-v2.schema.json +1 -1
  543. package/protocol/models/provider-model-snapshot.v1.schema.json +1 -1
  544. package/protocol/notifications/README.md +45 -0
  545. package/protocol/packages/agentsam.package-schema-registry.v1.schema.json +108 -0
  546. package/protocol/plugins/agentsam.plugin-evidence-bundle.v1.schema.json +1 -1
  547. package/protocol/plugins/agentsam.plugin-product.v1.schema.json +1 -1
  548. package/protocol/plugins/agentsam.plugin-quality-evidence.v1.schema.json +1 -1
  549. package/protocol/plugins/agentsam.plugin-quality-receipt.v1.schema.json +1 -1
  550. package/protocol/presets/catalog.json +4 -4
  551. package/protocol/product-releases/README.md +132 -0
  552. package/protocol/receipts/agentsam.receipt.v1.json +2 -2
  553. package/protocol/recon/finding-report.schema.json +1 -1
  554. package/protocol/recon/task-packet.schema.json +1 -1
  555. package/protocol/repository/repository-contract.schema.json +1 -1
  556. package/protocol/repository/repository-dependency.schema.json +1 -1
  557. package/protocol/repository/repository-identity.schema.json +1 -1
  558. package/protocol/runtime/agentsam.runtime.v1.schema.json +1 -1
  559. package/protocol/runtime/primetech-procedure.v1.schema.json +125 -0
  560. package/protocol/runtime/terminal-exec.conformance.v1.json +88 -0
  561. package/protocol/runtime/workspace-fs.conformance.v1.json +96 -0
  562. package/protocol/runtime/workspace-fs.v1.schema.json +2 -1
  563. package/protocol/sam/activity.v1.schema.json +1 -1
  564. package/protocol/sam/answer.v1.schema.json +1 -1
  565. package/protocol/sam/calibration.v1.schema.json +1 -1
  566. package/protocol/sam/decision-receipt.v1.schema.json +1 -1
  567. package/protocol/sam/evaluation.v1.schema.json +1 -1
  568. package/protocol/sam/operation.schema.json +103 -10
  569. package/protocol/sam/outcome.v1.schema.json +1 -1
  570. package/protocol/sam/question.v1.schema.json +1 -1
  571. package/protocol/sam/result.schema.json +33 -10
  572. package/protocol/sam/state.v1.schema.json +1 -1
  573. package/protocol/scoring/scorecard.v1.schema.json +1 -1
  574. package/protocol/skills/agentsam.interaction.v1.schema.json +1 -1
  575. package/protocol/skills/agentsam.skill.v1.schema.json +1 -1
  576. package/protocol/theme-refinery/product-metadata.schema.json +1 -1
  577. package/protocol/theme-refinery/reconciliation-receipt.schema.json +1 -1
  578. package/protocol/tools/agent-tool-definition.v1.schema.json +78 -0
  579. package/protocol/ui/agentsam.ui-quality.v1.schema.json +1 -1
  580. package/protocol/ui/icon.v1.schema.json +1 -1
  581. package/python/README.md +97 -21
  582. package/python/agentsam_sdk/__init__.py +5 -2
  583. package/python/agentsam_sdk/assets/__init__.py +4 -0
  584. package/python/agentsam_sdk/assets/geaux_boot.json +25 -0
  585. package/python/agentsam_sdk/assets/procedures.py +40 -0
  586. package/python/agentsam_sdk/cad/__init__.py +5 -0
  587. package/python/agentsam_sdk/cad/native.py +189 -0
  588. package/python/agentsam_sdk/cad/occt.py +96 -0
  589. package/python/agentsam_sdk/cli.py +57 -12
  590. package/python/agentsam_sdk/client.py +226 -26
  591. package/python/agentsam_sdk/data/d1_adapter.py +71 -2
  592. package/python/agentsam_sdk/diagnostics.py +44 -0
  593. package/python/agentsam_sdk/procedures/__init__.py +4 -0
  594. package/python/agentsam_sdk/procedures/client.py +75 -0
  595. package/python/agentsam_sdk/py.typed +0 -0
  596. package/python/agentsam_sdk/runtime/native.py +918 -0
  597. package/python/agentsam_sdk/terminal_art.py +85 -0
  598. package/python/agentsam_sdk/terminal_ui.py +187 -0
  599. package/python/agentsam_sdk/tui/README.md +3 -3
  600. package/python/agentsam_sdk/tui/__init__.py +1 -1
  601. package/python/agentsam_sdk/tui/bootstrap.py +2 -2
  602. package/python/agentsam_sdk/tui/demo.py +2 -2
  603. package/python/docs/gaps.md +12 -3
  604. package/python/docs/release.md +55 -0
  605. package/python/pyproject.toml +33 -6
  606. package/python/scripts/check-dist.py +65 -0
  607. package/python/tests/test_asset_procedure_api.py +66 -0
  608. package/python/tests/test_cad_native.py +73 -0
  609. package/python/tests/test_cad_occt.py +52 -0
  610. package/python/tests/test_cli_distribution.py +82 -0
  611. package/python/tests/test_d1_write_adapter.py +66 -0
  612. package/python/tests/test_native_runtime.py +298 -0
  613. package/python/tests/test_packaging.py +43 -0
  614. package/python/tests/test_procedure_client.py +80 -0
  615. package/python/tests/test_public_client.py +8 -5
  616. package/python/tests/test_terminal_art.py +36 -0
  617. package/services/cad/occt/CMakeLists.txt +7 -41
  618. package/services/cad/occt/README.md +4 -28
  619. package/services/cad/server.py +228 -9
  620. package/skills/README.md +14 -6
  621. package/skills/agentsam-arch-accessibility/SKILL.md +19 -0
  622. package/skills/agentsam-arch-accessibility/agentsam.skill.json +20 -0
  623. package/skills/agentsam-arch-assemblies/SKILL.md +20 -0
  624. package/skills/agentsam-arch-assemblies/agentsam.skill.json +20 -0
  625. package/skills/agentsam-arch-bim/SKILL.md +20 -0
  626. package/skills/agentsam-arch-bim/agentsam.skill.json +20 -0
  627. package/skills/agentsam-arch-cad/SKILL.md +19 -0
  628. package/skills/agentsam-arch-cad/agentsam.skill.json +20 -0
  629. package/skills/agentsam-arch-codes/SKILL.md +19 -0
  630. package/skills/agentsam-arch-codes/agentsam.skill.json +20 -0
  631. package/skills/agentsam-arch-coordination/SKILL.md +19 -0
  632. package/skills/agentsam-arch-coordination/agentsam.skill.json +20 -0
  633. package/skills/agentsam-arch-documents/SKILL.md +19 -0
  634. package/skills/agentsam-arch-documents/agentsam.skill.json +20 -0
  635. package/skills/agentsam-arch-geometry/SKILL.md +19 -0
  636. package/skills/agentsam-arch-geometry/agentsam.skill.json +20 -0
  637. package/skills/agentsam-arch-materials/SKILL.md +19 -0
  638. package/skills/agentsam-arch-materials/agentsam.skill.json +20 -0
  639. package/skills/agentsam-arch-orchestrate/SKILL.md +21 -0
  640. package/skills/agentsam-arch-orchestrate/agentsam.skill.json +20 -0
  641. package/skills/agentsam-arch-specifications/SKILL.md +19 -0
  642. package/skills/agentsam-arch-specifications/agentsam.skill.json +20 -0
  643. package/skills/agentsam-arch-verify/SKILL.md +20 -0
  644. package/skills/agentsam-arch-verify/agentsam.skill.json +20 -0
  645. package/skills/agentsam-canvas-creation/SKILL.md +79 -0
  646. package/skills/agentsam-canvas-creation/references/creation-journey.md +55 -0
  647. package/skills/agentsam-canvas-creation/references/fullstack-creation-checklist.md +28 -0
  648. package/skills/agentsam-canvas-creation/references/quality-and-consistency.md +39 -0
  649. package/skills/agentsam-cms-ready-creation/SKILL.md +68 -0
  650. package/skills/agentsam-cms-ready-creation/references/cms-handoff-map.md +50 -0
  651. package/skills/agentsam-cms-ready-creation/references/web-fullstack-readiness.md +38 -0
  652. package/skills/agentsam-plan-and-goap/SKILL.md +14 -1
  653. package/skills/agentsam-sdk-orientation/SKILL.md +10 -7
  654. package/skills/catalog.json +331 -0
  655. package/src/agent/capability-adapter.js +5 -2
  656. package/src/capabilities/index.js +2 -0
  657. package/src/capabilities/terminal-exec.js +16 -4
  658. package/src/capabilities/workspace-files.js +58 -2
  659. package/src/cli/command-catalog.js +24 -1
  660. package/src/cli/desktop-launch.js +107 -0
  661. package/src/cli.js +47 -12
  662. package/src/commands/app.js +2 -2
  663. package/src/commands/dockerize.js +11 -2
  664. package/src/commands/goals.js +59 -0
  665. package/src/commands/goap.js +48 -1
  666. package/src/commands/mcp.js +80 -16
  667. package/src/commands/memory.js +102 -0
  668. package/src/commands/package.js +1 -1
  669. package/src/commands/plugins.js +47 -7
  670. package/src/commands/sam.js +20 -5
  671. package/src/commands/shell.js +17 -0
  672. package/src/commands/skill.js +1 -1
  673. package/src/commands/start-local.js +29 -1
  674. package/src/indexing/ingest/style-evidence.js +10 -6
  675. package/src/lib/cad/discovery.js +6 -1
  676. package/src/lib/cad/editable-project-contract.js +6 -0
  677. package/src/lib/cad/occt-native-provider.mjs +3 -138
  678. package/src/lib/cad/project-runtime.js +17 -1
  679. package/src/lib/cad/project-tools.js +4 -4
  680. package/src/lib/cad/project-v2.d.ts +32 -4
  681. package/src/lib/cad/project-v2.js +37 -0
  682. package/src/lib/cad-docker.js +54 -18
  683. package/src/lib/deploy/local-studio.js +9 -1
  684. package/src/lib/dockerize.js +2 -2
  685. package/src/lib/scaffold/wizards/cms.js +0 -79
  686. package/src/lib/terminal-scopes.js +5 -2
  687. package/src/mcp/authority.js +26 -2
  688. package/src/mcp/browsermcp.js +28 -0
  689. package/src/mcp/client-adapters.js +22 -5
  690. package/src/mcp/client.js +33 -6
  691. package/src/models/discovery.js +1 -373
  692. package/src/models/inventory-core.d.ts +21 -0
  693. package/src/models/inventory-core.js +44 -1
  694. package/src/plugins/browsermcp.js +47 -0
  695. package/src/plugins/contracts.js +8 -0
  696. package/src/plugins/creative.js +38 -0
  697. package/src/plugins/index.js +3 -0
  698. package/src/plugins/registry.js +90 -75
  699. package/src/plugins/runtime.js +12 -3
  700. package/src/providers/factory.js +13 -0
  701. package/src/registry/generated/inventory.json +422 -536
  702. package/src/sam/client.js +1 -1
  703. package/src/sam/define.js +11 -2
  704. package/src/sam/index.js +1 -0
  705. package/src/sam/operation-packs/generated-v2/operation-pack.js +1 -1
  706. package/src/sam/operations/architectural-knowledge.js +30 -0
  707. package/src/sam/operations/artifact-render.js +1 -1
  708. package/src/sam/operations/brand-scan.js +1 -1
  709. package/src/sam/operations/codebaseindex-ingest.js +1 -1
  710. package/src/sam/operations/decision-evaluate.js +1 -1
  711. package/src/sam/operations/package-audit.js +1 -1
  712. package/src/sam/operations/planning-astar.js +1 -1
  713. package/src/sam/operations/planning-goap.js +1 -1
  714. package/src/sam/operations/repository-inspect.js +1 -1
  715. package/src/sam/operations/robotics.js +1 -1
  716. package/src/sam/packs/authoring/index.js +1 -1
  717. package/src/sam/packs/cad/http-ports.js +59 -0
  718. package/src/sam/packs/cms/node.js +1 -1
  719. package/src/sam/packs/core.js +2 -0
  720. package/src/sam/packs/evidence/store-hosted.js +89 -0
  721. package/src/sam/robotics/chess-adapter.js +8 -2
  722. package/src/sam/types.js +17 -98
  723. package/src/security/inventory.js +11 -9
  724. package/src/skills/canvas-knowledge-core.js +1 -0
  725. package/src/skills/canvas-knowledge.js +8 -0
  726. package/src/skills/index.js +2 -0
  727. package/src/tools/registry.js +9 -11
  728. package/src/ui/art/geaux_boot.json +25 -0
  729. package/src/ui/boot.js +21 -20
  730. package/src/ui/companion-art.js +40 -0
  731. package/apps/client-cms-editor/AGENTS.md +0 -17
  732. package/apps/client-cms-editor/IMPORT_PROVENANCE.json +0 -8
  733. package/apps/client-cms-editor/README.md +0 -103
  734. package/apps/client-cms-editor/agentsam.app.json +0 -74
  735. package/apps/client-cms-editor/backend/README.md +0 -5
  736. package/apps/client-cms-editor/backend/package.json +0 -37
  737. package/apps/client-cms-editor/backend/src/api/client.ts +0 -233
  738. package/apps/client-cms-editor/backend/src/index.ts +0 -6
  739. package/apps/client-cms-editor/backend/src/model.ts +0 -11
  740. package/apps/client-cms-editor/backend/src/preview/bridge.ts +0 -79
  741. package/apps/client-cms-editor/backend/src/preview/urls.ts +0 -55
  742. package/apps/client-cms-editor/backend/src/routing/cms-route.js +0 -293
  743. package/apps/client-cms-editor/backend/src/routing/index.js +0 -10
  744. package/apps/client-cms-editor/backend/src/storefront.ts +0 -52
  745. package/apps/client-cms-editor/backend/tsconfig.json +0 -20
  746. package/apps/client-cms-editor/backend/worker/index.js +0 -34
  747. package/apps/client-cms-editor/backend/wrangler.jsonc +0 -11
  748. package/apps/client-cms-editor/bin/agentsam-cms.js +0 -262
  749. package/apps/client-cms-editor/bin/agentsam-cms.mjs +0 -3
  750. package/apps/client-cms-editor/frontend/index.html +0 -12
  751. package/apps/client-cms-editor/frontend/package.json +0 -40
  752. package/apps/client-cms-editor/frontend/src/AgentSamDrawer.tsx +0 -156
  753. package/apps/client-cms-editor/frontend/src/CmsAgentSurface.tsx +0 -36
  754. package/apps/client-cms-editor/frontend/src/adapters/heuristic.ts +0 -29
  755. package/apps/client-cms-editor/frontend/src/adapters/http-authoring.test.ts +0 -161
  756. package/apps/client-cms-editor/frontend/src/adapters/http.ts +0 -871
  757. package/apps/client-cms-editor/frontend/src/adapters/memory.ts +0 -510
  758. package/apps/client-cms-editor/frontend/src/editor/CmsEditor.tsx +0 -247
  759. package/apps/client-cms-editor/frontend/src/editor/CmsEditorProvider.tsx +0 -20
  760. package/apps/client-cms-editor/frontend/src/editor/canvas/PreviewCanvas.tsx +0 -81
  761. package/apps/client-cms-editor/frontend/src/editor/composition-groups.test.ts +0 -40
  762. package/apps/client-cms-editor/frontend/src/editor/host-preview.test.tsx +0 -104
  763. package/apps/client-cms-editor/frontend/src/editor/legacy/CmsEditorPrototype.tsx +0 -1374
  764. package/apps/client-cms-editor/frontend/src/editor/useCmsEditorController.ts +0 -218
  765. package/apps/client-cms-editor/frontend/src/env.d.ts +0 -14
  766. package/apps/client-cms-editor/frontend/src/index.ts +0 -22
  767. package/apps/client-cms-editor/frontend/src/lib/agent-host.ts +0 -24
  768. package/apps/client-cms-editor/frontend/src/lib/content-safety.ts +0 -63
  769. package/apps/client-cms-editor/frontend/src/main.tsx +0 -91
  770. package/apps/client-cms-editor/frontend/src/mount.tsx +0 -113
  771. package/apps/client-cms-editor/frontend/src/styles/agentsam-drawer.css +0 -215
  772. package/apps/client-cms-editor/frontend/src/styles/cmsShell.css +0 -1739
  773. package/apps/client-cms-editor/frontend/src/styles/studio.css +0 -159
  774. package/apps/client-cms-editor/frontend/src/surfaces/CmsDashboard.tsx +0 -313
  775. package/apps/client-cms-editor/frontend/src/surfaces/CmsGuidedChatHero.tsx +0 -121
  776. package/apps/client-cms-editor/frontend/src/surfaces/CmsHubPage.tsx +0 -132
  777. package/apps/client-cms-editor/frontend/src/surfaces/CmsSiteSwitcher.tsx +0 -176
  778. package/apps/client-cms-editor/frontend/src/surfaces/index.ts +0 -5
  779. package/apps/client-cms-editor/frontend/src/surfaces/types.ts +0 -48
  780. package/apps/client-cms-editor/frontend/tsconfig.json +0 -55
  781. package/apps/client-cms-editor/frontend/vite.config.ts +0 -25
  782. package/apps/client-cms-editor/package-lock.json +0 -4671
  783. package/apps/client-cms-editor/package.json +0 -136
  784. package/apps/client-cms-editor/reference/DONOR_README.md +0 -52
  785. package/apps/client-cms-editor/reference/DONOR_package-lock.json +0 -1253
  786. package/apps/client-cms-editor/reference/DONOR_tsconfig.json +0 -15
  787. package/apps/client-cms-editor/reference/harvest/HARVEST_RECEIPT.json +0 -201
  788. package/apps/client-cms-editor/reference/harvest/PROVENANCE_HISTORY.txt +0 -10
  789. package/apps/client-cms-editor/reference/harvest/README.md +0 -8
  790. package/apps/client-cms-editor/reference/harvest/plans/ARCHIVE-INTAKE.md +0 -135
  791. package/apps/client-cms-editor/reference/harvest/plans/CHATGPT-IDENTITY-HARVEST.md +0 -83
  792. package/apps/client-cms-editor/reference/harvest/plans/CMS-EDITOR-HARVEST.md +0 -166
  793. package/apps/client-cms-editor/reference/harvest/plans/HARVEST-INDEX.md +0 -196
  794. package/apps/client-cms-editor/reference/harvest/plans/INNERANIMALS-CONTENT-001.md +0 -137
  795. package/apps/client-cms-editor/reference/harvest/plans/NO-IMPLICIT-SIDE-EFFECTS.md +0 -87
  796. package/apps/client-cms-editor/reference/harvest/plans/STOREFRONT-SURFACE-MAP.md +0 -140
  797. package/apps/client-cms-editor/reference/harvest/plans/THEME-INNERANIMALS-HARVEST.md +0 -137
  798. package/apps/client-cms-editor/reference/harvest/plans/TOOLING-LAB.md +0 -63
  799. package/apps/client-cms-editor/reference/harvest/plans/harvest-manifest.json +0 -97
  800. package/apps/client-cms-editor/reference/harvest/plans/local-cms-harvest-schema.sql +0 -328
  801. package/apps/client-cms-editor/shared/cms/package.json +0 -29
  802. package/apps/client-cms-editor/shared/cms/src/adapter.ts +0 -204
  803. package/apps/client-cms-editor/shared/cms/src/agent-context.ts +0 -37
  804. package/apps/client-cms-editor/shared/cms/src/cloudflare-bindings.ts +0 -51
  805. package/apps/client-cms-editor/shared/cms/src/editor-types.ts +0 -131
  806. package/apps/client-cms-editor/shared/cms/src/host.ts +0 -82
  807. package/apps/client-cms-editor/shared/cms/src/index.ts +0 -9
  808. package/apps/client-cms-editor/shared/cms/src/map.ts +0 -115
  809. package/apps/client-cms-editor/shared/cms/src/publication.ts +0 -24
  810. package/apps/client-cms-editor/shared/cms/src/routes.ts +0 -11
  811. package/apps/client-cms-editor/shared/cms/src/starter-pack.ts +0 -158
  812. package/apps/client-cms-editor/shared/cms/tsconfig.json +0 -12
  813. package/docs/client-cms-editor.md +0 -15
  814. package/packages/agentsam-cms/src/node-sqlite-repository.js +0 -148
  815. package/packages/agentsam-cms/src/schema/cms-local-runtime.v1.sql +0 -365
  816. package/packages/catalog/evidence/cms-runtime.json +0 -49
  817. package/packages/catalog/evidence/fnf-theme.json +0 -34
  818. package/packages/catalog/evidence/theme-cypress.json +0 -41
  819. package/packages/catalog/evidence/theme-ember.json +0 -41
  820. package/packages/catalog/evidence/theme-forge.json +0 -41
  821. package/packages/catalog/evidence/theme-grove.json +0 -41
  822. package/packages/catalog/evidence/theme-harbor.json +0 -41
  823. package/packages/catalog/evidence/theme-heuristic.json +0 -50
  824. package/packages/catalog/evidence/theme-iasf.json +0 -48
  825. package/packages/catalog/evidence/theme-resolve.json +0 -41
  826. package/packages/catalog/evidence/theme-summit.json +0 -41
  827. package/packages/catalog/evidence/theme-violet.json +0 -41
  828. package/packages/heuristic-theme/README.md +0 -25
  829. package/packages/heuristic-theme/agentsam.package.json +0 -42
  830. package/packages/heuristic-theme/contracts/README.md +0 -15
  831. package/packages/heuristic-theme/contracts/block.schema.json +0 -33
  832. package/packages/heuristic-theme/contracts/header-presets.json +0 -20
  833. package/packages/heuristic-theme/contracts/page.schema.json +0 -18
  834. package/packages/heuristic-theme/contracts/preset.schema.json +0 -18
  835. package/packages/heuristic-theme/contracts/section.schema.json +0 -83
  836. package/packages/heuristic-theme/package.json +0 -40
  837. package/packages/heuristic-theme/presets/fuel-free-time/assets.json +0 -8
  838. package/packages/heuristic-theme/presets/fuel-free-time/globals/shell.json +0 -30
  839. package/packages/heuristic-theme/presets/fuel-free-time/pages/about.json +0 -4
  840. package/packages/heuristic-theme/presets/fuel-free-time/pages/cart.json +0 -4
  841. package/packages/heuristic-theme/presets/fuel-free-time/pages/collection.json +0 -4
  842. package/packages/heuristic-theme/presets/fuel-free-time/pages/collections.json +0 -4
  843. package/packages/heuristic-theme/presets/fuel-free-time/pages/community.json +0 -4
  844. package/packages/heuristic-theme/presets/fuel-free-time/pages/home.json +0 -92
  845. package/packages/heuristic-theme/presets/fuel-free-time/pages/order-confirmation.json +0 -39
  846. package/packages/heuristic-theme/presets/fuel-free-time/pages/product.json +0 -4
  847. package/packages/heuristic-theme/presets/fuel-free-time/pages/shop.json +0 -9
  848. package/packages/heuristic-theme/presets/fuel-free-time/preset.json +0 -23
  849. package/packages/heuristic-theme/presets/fuel-free-time/tokens.json +0 -23
  850. package/packages/heuristic-theme/src/index.js +0 -2
  851. package/packages/heuristic-theme/src/registry.js +0 -36
  852. package/packages/heuristic-theme/src/theme.js +0 -41
  853. package/packages/heuristic-theme/storefront/about.html +0 -1103
  854. package/packages/heuristic-theme/storefront/assets/presets/fuel-free-time/GENERATED-ASSETS.md +0 -15
  855. package/packages/heuristic-theme/storefront/assets/presets/fuel-free-time/earned-hours-hero.webp +0 -0
  856. package/packages/heuristic-theme/storefront/assets/presets/fuel-free-time/essentials.webp +0 -0
  857. package/packages/heuristic-theme/storefront/assets/presets/fuel-free-time/masters.webp +0 -0
  858. package/packages/heuristic-theme/storefront/cart.html +0 -64
  859. package/packages/heuristic-theme/storefront/collaborate.html +0 -58
  860. package/packages/heuristic-theme/storefront/collection.html +0 -10
  861. package/packages/heuristic-theme/storefront/collections.html +0 -10
  862. package/packages/heuristic-theme/storefront/community.html +0 -921
  863. package/packages/heuristic-theme/storefront/css/content-page.css +0 -199
  864. package/packages/heuristic-theme/storefront/css/global-footer.css +0 -401
  865. package/packages/heuristic-theme/storefront/css/heuristic-theme.css +0 -81
  866. package/packages/heuristic-theme/storefront/css/page-composer.css +0 -76
  867. package/packages/heuristic-theme/storefront/css/shop-hero.css +0 -230
  868. package/packages/heuristic-theme/storefront/css/store-cart.css +0 -422
  869. package/packages/heuristic-theme/storefront/css/store-collections.css +0 -36
  870. package/packages/heuristic-theme/storefront/css/store-pdp.css +0 -459
  871. package/packages/heuristic-theme/storefront/css/store-shell.css +0 -474
  872. package/packages/heuristic-theme/storefront/css/store-shop.css +0 -117
  873. package/packages/heuristic-theme/storefront/home.html +0 -25
  874. package/packages/heuristic-theme/storefront/js/cms-hydrate.js +0 -395
  875. package/packages/heuristic-theme/storefront/js/cms-structure.js +0 -85
  876. package/packages/heuristic-theme/storefront/js/fnf-attribution.js +0 -98
  877. package/packages/heuristic-theme/storefront/js/fnf-head.js +0 -47
  878. package/packages/heuristic-theme/storefront/js/fnf-newsletter.js +0 -64
  879. package/packages/heuristic-theme/storefront/js/global-footer.js +0 -277
  880. package/packages/heuristic-theme/storefront/js/heuristic-runtime.js +0 -78
  881. package/packages/heuristic-theme/storefront/js/order-confirmation.js +0 -109
  882. package/packages/heuristic-theme/storefront/js/page-composer.js +0 -310
  883. package/packages/heuristic-theme/storefront/js/shop-hero.js +0 -85
  884. package/packages/heuristic-theme/storefront/js/store-cart.js +0 -276
  885. package/packages/heuristic-theme/storefront/js/store-catalog.js +0 -140
  886. package/packages/heuristic-theme/storefront/js/store-collections.js +0 -45
  887. package/packages/heuristic-theme/storefront/js/store-product.js +0 -287
  888. package/packages/heuristic-theme/storefront/js/store-shell.js +0 -449
  889. package/packages/heuristic-theme/storefront/order-confirmation.html +0 -30
  890. package/packages/heuristic-theme/storefront/policies.html +0 -43
  891. package/packages/heuristic-theme/storefront/product.html +0 -27
  892. package/packages/heuristic-theme/storefront/shop.html +0 -113
  893. package/packages/heuristic-theme/storefront/terms.html +0 -45
  894. package/packages/heuristic-theme/test/commerce-portability.test.mjs +0 -16
  895. package/packages/heuristic-theme/test/theme.test.mjs +0 -26
  896. package/packages/heuristic-theme/theme.json +0 -55
  897. package/packages/heuristic-theme/theme.schema.json +0 -32
  898. package/packages/theme-cypress/README.md +0 -11
  899. package/packages/theme-cypress/agentsam.package.json +0 -42
  900. package/packages/theme-cypress/package.json +0 -44
  901. package/packages/theme-cypress/prebuild.json +0 -23
  902. package/packages/theme-cypress/site/assets/generated/favicon.svg +0 -7
  903. package/packages/theme-cypress/site/assets/generated/media-044ba16613.webp +0 -0
  904. package/packages/theme-cypress/site/assets/generated/media-0a1ea6f6d9.webp +0 -0
  905. package/packages/theme-cypress/site/assets/generated/media-0c06778307.webp +0 -0
  906. package/packages/theme-cypress/site/assets/generated/media-1539ed373a.webp +0 -0
  907. package/packages/theme-cypress/site/assets/generated/media-2df479fd2d.webp +0 -0
  908. package/packages/theme-cypress/site/assets/generated/media-2e8bd0d9bc.webp +0 -0
  909. package/packages/theme-cypress/site/assets/generated/media-41d4e2643c.webp +0 -0
  910. package/packages/theme-cypress/site/assets/generated/media-46205bfde8.webp +0 -0
  911. package/packages/theme-cypress/site/assets/generated/media-50c5f3e279.webp +0 -0
  912. package/packages/theme-cypress/site/assets/generated/media-5f1467778c.webp +0 -0
  913. package/packages/theme-cypress/site/assets/generated/media-6703642b22.webp +0 -0
  914. package/packages/theme-cypress/site/assets/generated/media-87a490bc8e.webp +0 -0
  915. package/packages/theme-cypress/site/assets/generated/media-997c10ef39.webp +0 -0
  916. package/packages/theme-cypress/site/assets/generated/media-a423735c21.webp +0 -0
  917. package/packages/theme-cypress/site/assets/generated/media-c9cea5245b.webp +0 -0
  918. package/packages/theme-cypress/site/assets/generated/media-cab3c84c60.webp +0 -0
  919. package/packages/theme-cypress/site/assets/generated/media-ce06595d59.webp +0 -0
  920. package/packages/theme-cypress/site/assets/generated/media-d268905e7e.webp +0 -0
  921. package/packages/theme-cypress/site/assets/generated/media-f6711b5053.webp +0 -0
  922. package/packages/theme-cypress/site/assets/generated/media-manifest.json +0 -226
  923. package/packages/theme-cypress/site/assets/generated/social-card.webp +0 -0
  924. package/packages/theme-cypress/site/assets/generated/theme-mark-192.png +0 -0
  925. package/packages/theme-cypress/site/assets/generated/theme-mark-512.png +0 -0
  926. package/packages/theme-cypress/site/assets/generated/theme-mark.svg +0 -7
  927. package/packages/theme-cypress/site/beliefs.html +0 -175
  928. package/packages/theme-cypress/site/community.html +0 -175
  929. package/packages/theme-cypress/site/connect.html +0 -319
  930. package/packages/theme-cypress/site/donate.html +0 -106
  931. package/packages/theme-cypress/site/groups.html +0 -1352
  932. package/packages/theme-cypress/site/help.html +0 -1
  933. package/packages/theme-cypress/site/icons/clock.svg +0 -4
  934. package/packages/theme-cypress/site/icons/email.svg +0 -4
  935. package/packages/theme-cypress/site/icons/giving.svg +0 -4
  936. package/packages/theme-cypress/site/icons/home.svg +0 -4
  937. package/packages/theme-cypress/site/icons/location.svg +0 -4
  938. package/packages/theme-cypress/site/icons/media.svg +0 -4
  939. package/packages/theme-cypress/site/icons/ministries.svg +0 -6
  940. package/packages/theme-cypress/site/icons/prayer.svg +0 -5
  941. package/packages/theme-cypress/site/icons/visit.svg +0 -6
  942. package/packages/theme-cypress/site/index.html +0 -1013
  943. package/packages/theme-cypress/site/mensgroup.html +0 -477
  944. package/packages/theme-cypress/site/mission.html +0 -512
  945. package/packages/theme-cypress/site/unified-footer.css +0 -172
  946. package/packages/theme-cypress/site/unified-footer.js +0 -175
  947. package/packages/theme-cypress/site/unified-header.css +0 -226
  948. package/packages/theme-cypress/site/unified-header.js +0 -111
  949. package/packages/theme-cypress/site/womansgroup.html +0 -452
  950. package/packages/theme-cypress/src/index.js +0 -76
  951. package/packages/theme-cypress/src/node.js +0 -69
  952. package/packages/theme-cypress/test/theme.test.mjs +0 -47
  953. package/packages/theme-ember/README.md +0 -11
  954. package/packages/theme-ember/agentsam.package.json +0 -42
  955. package/packages/theme-ember/package.json +0 -44
  956. package/packages/theme-ember/prebuild.json +0 -23
  957. package/packages/theme-ember/site/about.html +0 -1840
  958. package/packages/theme-ember/site/assets/generated/favicon.svg +0 -7
  959. package/packages/theme-ember/site/assets/generated/media-1e0b1e6ee6.webp +0 -0
  960. package/packages/theme-ember/site/assets/generated/media-2371dcb426.webp +0 -0
  961. package/packages/theme-ember/site/assets/generated/media-2db4f5ff9e.webp +0 -0
  962. package/packages/theme-ember/site/assets/generated/media-4ed07a756e.webp +0 -0
  963. package/packages/theme-ember/site/assets/generated/media-58182cf167.webp +0 -0
  964. package/packages/theme-ember/site/assets/generated/media-5b8b8472ae.webp +0 -0
  965. package/packages/theme-ember/site/assets/generated/media-71f4bd16a1.webp +0 -0
  966. package/packages/theme-ember/site/assets/generated/media-7c1c8120bc.webp +0 -0
  967. package/packages/theme-ember/site/assets/generated/media-832b176433.webp +0 -0
  968. package/packages/theme-ember/site/assets/generated/media-931439701c.webp +0 -0
  969. package/packages/theme-ember/site/assets/generated/media-c2860d40d1.webp +0 -0
  970. package/packages/theme-ember/site/assets/generated/media-c56974d198.webp +0 -0
  971. package/packages/theme-ember/site/assets/generated/media-cb83a44ff4.webp +0 -0
  972. package/packages/theme-ember/site/assets/generated/media-df02ccdfcf.webp +0 -0
  973. package/packages/theme-ember/site/assets/generated/media-fab72cd344.webp +0 -0
  974. package/packages/theme-ember/site/assets/generated/media-manifest.json +0 -190
  975. package/packages/theme-ember/site/assets/generated/social-card.webp +0 -0
  976. package/packages/theme-ember/site/assets/generated/theme-mark-192.png +0 -0
  977. package/packages/theme-ember/site/assets/generated/theme-mark-512.png +0 -0
  978. package/packages/theme-ember/site/assets/generated/theme-mark.svg +0 -7
  979. package/packages/theme-ember/site/community.html +0 -1664
  980. package/packages/theme-ember/site/index.html +0 -2044
  981. package/packages/theme-ember/site/shop.html +0 -2104
  982. package/packages/theme-ember/src/index.js +0 -76
  983. package/packages/theme-ember/src/node.js +0 -69
  984. package/packages/theme-ember/test/theme.test.mjs +0 -47
  985. package/packages/theme-forge/README.md +0 -11
  986. package/packages/theme-forge/agentsam.package.json +0 -42
  987. package/packages/theme-forge/package.json +0 -44
  988. package/packages/theme-forge/prebuild.json +0 -23
  989. package/packages/theme-forge/site/apple-touch-icon.png +0 -0
  990. package/packages/theme-forge/site/assets/generated/favicon.svg +0 -7
  991. package/packages/theme-forge/site/assets/generated/media-manifest.json +0 -17
  992. package/packages/theme-forge/site/assets/generated/social-card.webp +0 -0
  993. package/packages/theme-forge/site/assets/generated/theme-mark-192.png +0 -0
  994. package/packages/theme-forge/site/assets/generated/theme-mark-512.png +0 -0
  995. package/packages/theme-forge/site/assets/generated/theme-mark.svg +0 -7
  996. package/packages/theme-forge/site/assets/index-DBOqQVsA.css +0 -1
  997. package/packages/theme-forge/site/assets/index-pXC0o9jp.js +0 -241
  998. package/packages/theme-forge/site/assets/workbox-window.prod.es5-Bd17z0YL.js +0 -2
  999. package/packages/theme-forge/site/index.html +0 -5
  1000. package/packages/theme-forge/site/manifest.webmanifest +0 -1
  1001. package/packages/theme-forge/site/pwa-192x192.png +0 -0
  1002. package/packages/theme-forge/site/pwa-512x512.png +0 -0
  1003. package/packages/theme-forge/site/sw.js +0 -107
  1004. package/packages/theme-forge/site/workbox-7e5eb42b.js +0 -3395
  1005. package/packages/theme-forge/src/index.js +0 -76
  1006. package/packages/theme-forge/src/node.js +0 -69
  1007. package/packages/theme-forge/test/theme.test.mjs +0 -47
  1008. package/packages/theme-grove/README.md +0 -11
  1009. package/packages/theme-grove/agentsam.package.json +0 -42
  1010. package/packages/theme-grove/package.json +0 -44
  1011. package/packages/theme-grove/prebuild.json +0 -23
  1012. package/packages/theme-grove/site/assets/generated/favicon.svg +0 -7
  1013. package/packages/theme-grove/site/assets/generated/media-098b13d75a.webp +0 -0
  1014. package/packages/theme-grove/site/assets/generated/media-0c064db1aa.webp +0 -0
  1015. package/packages/theme-grove/site/assets/generated/media-0fbfef655e.webp +0 -0
  1016. package/packages/theme-grove/site/assets/generated/media-14759c7460.webp +0 -0
  1017. package/packages/theme-grove/site/assets/generated/media-19b23d2a8f.webp +0 -0
  1018. package/packages/theme-grove/site/assets/generated/media-2012f04243.webp +0 -0
  1019. package/packages/theme-grove/site/assets/generated/media-23b8c5e2bb.webp +0 -0
  1020. package/packages/theme-grove/site/assets/generated/media-2bffb1a6ef.webp +0 -0
  1021. package/packages/theme-grove/site/assets/generated/media-2e1523a5b0.webp +0 -0
  1022. package/packages/theme-grove/site/assets/generated/media-31107c21f2.webp +0 -0
  1023. package/packages/theme-grove/site/assets/generated/media-31373ec865.webp +0 -0
  1024. package/packages/theme-grove/site/assets/generated/media-45e8e27542.webp +0 -0
  1025. package/packages/theme-grove/site/assets/generated/media-4aa9846fe7.webp +0 -0
  1026. package/packages/theme-grove/site/assets/generated/media-5476b24219.webp +0 -0
  1027. package/packages/theme-grove/site/assets/generated/media-7a227d3e4b.webp +0 -0
  1028. package/packages/theme-grove/site/assets/generated/media-b183eed550.webp +0 -0
  1029. package/packages/theme-grove/site/assets/generated/media-b2c650f9ab.webp +0 -0
  1030. package/packages/theme-grove/site/assets/generated/media-b5d7471694.webp +0 -0
  1031. package/packages/theme-grove/site/assets/generated/media-c86498fdb4.webp +0 -0
  1032. package/packages/theme-grove/site/assets/generated/media-ce2cfff9a1.webp +0 -0
  1033. package/packages/theme-grove/site/assets/generated/media-cf41a5f324.webp +0 -0
  1034. package/packages/theme-grove/site/assets/generated/media-ec6c01bf8d.webp +0 -0
  1035. package/packages/theme-grove/site/assets/generated/media-manifest.json +0 -267
  1036. package/packages/theme-grove/site/assets/generated/social-card.webp +0 -0
  1037. package/packages/theme-grove/site/assets/generated/theme-mark-192.png +0 -0
  1038. package/packages/theme-grove/site/assets/generated/theme-mark-512.png +0 -0
  1039. package/packages/theme-grove/site/assets/generated/theme-mark.svg +0 -7
  1040. package/packages/theme-grove/site/index.html +0 -1429
  1041. package/packages/theme-grove/site/pages/contact.html +0 -664
  1042. package/packages/theme-grove/site/pages/gallery.html +0 -216
  1043. package/packages/theme-grove/site/pages/privacy.html +0 -180
  1044. package/packages/theme-grove/site/pages/process.html +0 -592
  1045. package/packages/theme-grove/site/pages/services.html +0 -567
  1046. package/packages/theme-grove/site/pages/terms.html +0 -189
  1047. package/packages/theme-grove/site/shared/footer.css +0 -140
  1048. package/packages/theme-grove/site/shared/footer.html +0 -41
  1049. package/packages/theme-grove/src/index.js +0 -76
  1050. package/packages/theme-grove/src/node.js +0 -69
  1051. package/packages/theme-grove/test/theme.test.mjs +0 -47
  1052. package/packages/theme-harbor/README.md +0 -11
  1053. package/packages/theme-harbor/agentsam.package.json +0 -42
  1054. package/packages/theme-harbor/package.json +0 -44
  1055. package/packages/theme-harbor/prebuild.json +0 -23
  1056. package/packages/theme-harbor/site/assets/generated/favicon.svg +0 -7
  1057. package/packages/theme-harbor/site/assets/generated/media-manifest.json +0 -17
  1058. package/packages/theme-harbor/site/assets/generated/social-card.webp +0 -0
  1059. package/packages/theme-harbor/site/assets/generated/theme-mark-192.png +0 -0
  1060. package/packages/theme-harbor/site/assets/generated/theme-mark-512.png +0 -0
  1061. package/packages/theme-harbor/site/assets/generated/theme-mark.svg +0 -7
  1062. package/packages/theme-harbor/site/assets/index-D58RKkr-.js +0 -239
  1063. package/packages/theme-harbor/site/assets/index-Dd3YN9Mf.css +0 -1
  1064. package/packages/theme-harbor/site/index.html +0 -15
  1065. package/packages/theme-harbor/src/index.js +0 -76
  1066. package/packages/theme-harbor/src/node.js +0 -69
  1067. package/packages/theme-harbor/test/theme.test.mjs +0 -47
  1068. package/packages/theme-resolve/README.md +0 -11
  1069. package/packages/theme-resolve/agentsam.package.json +0 -42
  1070. package/packages/theme-resolve/package.json +0 -44
  1071. package/packages/theme-resolve/prebuild.json +0 -23
  1072. package/packages/theme-resolve/site/assets/generated/favicon.svg +0 -7
  1073. package/packages/theme-resolve/site/assets/generated/media-216610d365.webp +0 -0
  1074. package/packages/theme-resolve/site/assets/generated/media-2a9e0f623f.webp +0 -0
  1075. package/packages/theme-resolve/site/assets/generated/media-a70660bfa9.webp +0 -0
  1076. package/packages/theme-resolve/site/assets/generated/media-bc1322e813.webp +0 -0
  1077. package/packages/theme-resolve/site/assets/generated/media-ced60fcecc.webp +0 -0
  1078. package/packages/theme-resolve/site/assets/generated/media-manifest.json +0 -72
  1079. package/packages/theme-resolve/site/assets/generated/social-card.webp +0 -0
  1080. package/packages/theme-resolve/site/assets/generated/theme-mark-192.png +0 -0
  1081. package/packages/theme-resolve/site/assets/generated/theme-mark-512.png +0 -0
  1082. package/packages/theme-resolve/site/assets/generated/theme-mark.svg +0 -7
  1083. package/packages/theme-resolve/site/assets/index-BSaLpPG1.css +0 -2
  1084. package/packages/theme-resolve/site/assets/index-D8au46Z5.js +0 -17
  1085. package/packages/theme-resolve/site/index.html +0 -22
  1086. package/packages/theme-resolve/src/index.js +0 -69
  1087. package/packages/theme-resolve/src/node.js +0 -69
  1088. package/packages/theme-resolve/test/theme.test.mjs +0 -47
  1089. package/packages/theme-scenes/src/registry.js +0 -170
  1090. package/packages/theme-summit/README.md +0 -11
  1091. package/packages/theme-summit/agentsam.package.json +0 -42
  1092. package/packages/theme-summit/package.json +0 -44
  1093. package/packages/theme-summit/prebuild.json +0 -23
  1094. package/packages/theme-summit/site/adventures.html +0 -450
  1095. package/packages/theme-summit/site/assets/generated/favicon.svg +0 -7
  1096. package/packages/theme-summit/site/assets/generated/media-1e958ea679.webp +0 -0
  1097. package/packages/theme-summit/site/assets/generated/media-9d4521abba.webp +0 -0
  1098. package/packages/theme-summit/site/assets/generated/media-manifest.json +0 -39
  1099. package/packages/theme-summit/site/assets/generated/social-card.webp +0 -0
  1100. package/packages/theme-summit/site/assets/generated/theme-mark-192.png +0 -0
  1101. package/packages/theme-summit/site/assets/generated/theme-mark-512.png +0 -0
  1102. package/packages/theme-summit/site/assets/generated/theme-mark.svg +0 -7
  1103. package/packages/theme-summit/site/business-card.html +0 -315
  1104. package/packages/theme-summit/site/chatbot.js +0 -312
  1105. package/packages/theme-summit/site/gallery.html +0 -524
  1106. package/packages/theme-summit/site/i18n.js +0 -947
  1107. package/packages/theme-summit/site/icons.svg +0 -87
  1108. package/packages/theme-summit/site/index.html +0 -2415
  1109. package/packages/theme-summit/site/pages/about.html +0 -100
  1110. package/packages/theme-summit/site/pages/contact.html +0 -117
  1111. package/packages/theme-summit/site/pages/dashboard.html +0 -111
  1112. package/packages/theme-summit/site/pages/index.html +0 -129
  1113. package/packages/theme-summit/site/pages/services.html +0 -125
  1114. package/packages/theme-summit/site/shared/footer.html +0 -41
  1115. package/packages/theme-summit/site/shared/layout.js +0 -315
  1116. package/packages/theme-summit/site/shared/nav.html +0 -19
  1117. package/packages/theme-summit/site/shared/styles.css +0 -696
  1118. package/packages/theme-summit/site/theme-styles.css +0 -131
  1119. package/packages/theme-summit/site/themes.js +0 -442
  1120. package/packages/theme-summit/src/index.js +0 -76
  1121. package/packages/theme-summit/src/node.js +0 -69
  1122. package/packages/theme-summit/test/theme.test.mjs +0 -47
  1123. package/packages/theme-violet/README.md +0 -11
  1124. package/packages/theme-violet/agentsam.package.json +0 -42
  1125. package/packages/theme-violet/package.json +0 -44
  1126. package/packages/theme-violet/prebuild.json +0 -23
  1127. package/packages/theme-violet/site/assets/generated/favicon.svg +0 -7
  1128. package/packages/theme-violet/site/assets/generated/media-07b46d6457.webp +0 -0
  1129. package/packages/theme-violet/site/assets/generated/media-09d38ddffc.webp +0 -0
  1130. package/packages/theme-violet/site/assets/generated/media-254b0e2ad3.webp +0 -0
  1131. package/packages/theme-violet/site/assets/generated/media-3a1b5c0a8d.webp +0 -0
  1132. package/packages/theme-violet/site/assets/generated/media-3a78eb7d9d.webp +0 -0
  1133. package/packages/theme-violet/site/assets/generated/media-49076977d8.webp +0 -0
  1134. package/packages/theme-violet/site/assets/generated/media-6342d50dbd.webp +0 -0
  1135. package/packages/theme-violet/site/assets/generated/media-646c65381e.webp +0 -0
  1136. package/packages/theme-violet/site/assets/generated/media-7a5fb7c91a.webp +0 -0
  1137. package/packages/theme-violet/site/assets/generated/media-9bbd133220.webp +0 -0
  1138. package/packages/theme-violet/site/assets/generated/media-9e73307c2a.webp +0 -0
  1139. package/packages/theme-violet/site/assets/generated/media-af382146a0.webp +0 -0
  1140. package/packages/theme-violet/site/assets/generated/media-b2ae348b43.webp +0 -0
  1141. package/packages/theme-violet/site/assets/generated/media-b8f43a3887.webp +0 -0
  1142. package/packages/theme-violet/site/assets/generated/media-c96a3e1979.webp +0 -0
  1143. package/packages/theme-violet/site/assets/generated/media-cd07daa54a.webp +0 -0
  1144. package/packages/theme-violet/site/assets/generated/media-e03ab6b5fe.webp +0 -0
  1145. package/packages/theme-violet/site/assets/generated/media-eae4917d25.webp +0 -0
  1146. package/packages/theme-violet/site/assets/generated/media-f227ec5690.webp +0 -0
  1147. package/packages/theme-violet/site/assets/generated/media-fb57ffd474.webp +0 -0
  1148. package/packages/theme-violet/site/assets/generated/media-manifest.json +0 -245
  1149. package/packages/theme-violet/site/assets/generated/social-card.webp +0 -0
  1150. package/packages/theme-violet/site/assets/generated/theme-mark-192.png +0 -0
  1151. package/packages/theme-violet/site/assets/generated/theme-mark-512.png +0 -0
  1152. package/packages/theme-violet/site/assets/generated/theme-mark.svg +0 -7
  1153. package/packages/theme-violet/site/global/cpas-contact.css +0 -405
  1154. package/packages/theme-violet/site/global/cpas-donate-v2.css +0 -931
  1155. package/packages/theme-violet/site/global/cpas-drawer-override.css +0 -1
  1156. package/packages/theme-violet/site/global/cpas-footer.html +0 -38
  1157. package/packages/theme-violet/site/global/cpas-header.html +0 -30
  1158. package/packages/theme-violet/site/global/cpas-hero-watercolor.css +0 -275
  1159. package/packages/theme-violet/site/global/cpas-modals.js +0 -802
  1160. package/packages/theme-violet/site/global/cpas-public-surface.css +0 -982
  1161. package/packages/theme-violet/site/global/cpas-shell.css +0 -3980
  1162. package/packages/theme-violet/site/global/cpas-shell.js +0 -107
  1163. package/packages/theme-violet/site/global/cpas-shelter-hub.css +0 -326
  1164. package/packages/theme-violet/site/index.html +0 -141
  1165. package/packages/theme-violet/site/pages/about/campaigns.html +0 -28
  1166. package/packages/theme-violet/site/pages/about/cta.html +0 -25
  1167. package/packages/theme-violet/site/pages/about/hero.html +0 -46
  1168. package/packages/theme-violet/site/pages/about/paths.html +0 -24
  1169. package/packages/theme-violet/site/pages/about/why_we_exist.html +0 -28
  1170. package/packages/theme-violet/site/pages/home/campaigns.html +0 -67
  1171. package/packages/theme-violet/site/pages/home/hero.html +0 -42
  1172. package/packages/theme-violet/site/pages/home/how-it-helps.html +0 -32
  1173. package/packages/theme-violet/site/pages/home/impact-stats.html +0 -31
  1174. package/packages/theme-violet/site/pages/home/mission.html +0 -36
  1175. package/packages/theme-violet/site/pages/home/newsletter.html +0 -29
  1176. package/packages/theme-violet/site/pages/home/transport-win.html +0 -22
  1177. package/packages/theme-violet/site/pages/index.html +0 -141
  1178. package/packages/theme-violet/src/index.js +0 -76
  1179. package/packages/theme-violet/src/node.js +0 -69
  1180. package/packages/theme-violet/test/theme.test.mjs +0 -47
  1181. package/services/cad/occt/main.cpp +0 -95
  1182. /package/{apps/client-cms-editor → python}/LICENSE +0 -0
@@ -135,6 +135,259 @@ function projectRunEventToActivity(event) {
135
135
  };
136
136
  }
137
137
 
138
+ // src/authority.ts
139
+ var AGENT_AUTHORITY_TYPES = [
140
+ "none",
141
+ "host",
142
+ "binding",
143
+ "secret",
144
+ "oauth",
145
+ "connection"
146
+ ];
147
+
148
+ // src/tools.ts
149
+ var AGENT_TOOL_SIDE_EFFECT_LEVELS = [
150
+ "none",
151
+ "local_write",
152
+ "external_write",
153
+ "billable_external_write",
154
+ "destructive_possible"
155
+ ];
156
+ var AGENT_TOOL_RISK_LEVELS = ["low", "moderate", "high", "critical"];
157
+ var AGENT_TOOL_RECEIPT_MODES = ["full", "redacted", "metadata_only"];
158
+ var AGENT_TOOL_IDEMPOTENCY_MODES = [
159
+ "not_applicable",
160
+ "intrinsic",
161
+ "supported",
162
+ "required"
163
+ ];
164
+ var AGENT_TOOL_HANDLER_TYPES = [
165
+ "local",
166
+ "http",
167
+ "worker_rpc",
168
+ "execos",
169
+ "mcp",
170
+ "custom"
171
+ ];
172
+ var isRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
173
+ var nonEmptyString = (value) => typeof value === "string" && value.trim().length > 0;
174
+ var stringArray = (value) => Array.isArray(value) && value.every((item) => typeof item === "string");
175
+ function assertEnum(value, allowed, field, toolKey) {
176
+ if (typeof value !== "string" || !allowed.includes(value)) {
177
+ throw new TypeError(`tool ${toolKey} has invalid ${field}`);
178
+ }
179
+ }
180
+ function assertOnlyFields(value, allowed, field, toolKey) {
181
+ for (const key of Object.keys(value)) {
182
+ if (!allowed.includes(key)) throw new TypeError(`tool ${toolKey} has unknown ${field} field: ${key}`);
183
+ }
184
+ }
185
+ function assertAuthorityRequirement(value, toolKey) {
186
+ if (!isRecord(value)) throw new TypeError(`tool ${toolKey} has invalid authority requirement`);
187
+ assertOnlyFields(value, ["type", "ref", "provider", "scopes", "optional", "metadata"], "authority", toolKey);
188
+ assertEnum(value.type, AGENT_AUTHORITY_TYPES, "authority type", toolKey);
189
+ for (const field of ["ref", "provider"]) {
190
+ if (value[field] !== void 0 && typeof value[field] !== "string") {
191
+ throw new TypeError(`tool ${toolKey} authority ${field} must be a string`);
192
+ }
193
+ }
194
+ if (value.scopes !== void 0 && !stringArray(value.scopes)) {
195
+ throw new TypeError(`tool ${toolKey} authority scopes must be a string array`);
196
+ }
197
+ if (value.optional !== void 0 && typeof value.optional !== "boolean") {
198
+ throw new TypeError(`tool ${toolKey} authority optional must be boolean`);
199
+ }
200
+ if (value.metadata !== void 0 && !isRecord(value.metadata)) {
201
+ throw new TypeError(`tool ${toolKey} authority metadata must be an object`);
202
+ }
203
+ }
204
+ function assertAgentToolDefinition(value) {
205
+ if (!isRecord(value)) throw new TypeError("tool definition must be an object");
206
+ const toolKey = nonEmptyString(value.toolKey) ? value.toolKey : "(unknown)";
207
+ const allowedFields = [
208
+ "toolKey",
209
+ "displayName",
210
+ "description",
211
+ "provider",
212
+ "pluginId",
213
+ "capabilityKey",
214
+ "handler",
215
+ "inputSchema",
216
+ "outputSchema",
217
+ "authority",
218
+ "riskLevel",
219
+ "sideEffectLevel",
220
+ "idempotencyMode",
221
+ "timeoutMs",
222
+ "retryPolicy",
223
+ "receiptMode",
224
+ "sensitiveInputPaths",
225
+ "sensitiveOutputPaths",
226
+ "emitsEvents",
227
+ "active",
228
+ "metadata"
229
+ ];
230
+ assertOnlyFields(value, allowedFields, "definition", toolKey);
231
+ for (const field of ["toolKey", "displayName", "capabilityKey"]) {
232
+ if (!nonEmptyString(value[field])) throw new TypeError(`tool definition requires ${field}`);
233
+ }
234
+ for (const field of ["description", "provider", "pluginId"]) {
235
+ if (value[field] !== void 0 && typeof value[field] !== "string") {
236
+ throw new TypeError(`tool ${toolKey} ${field} must be a string`);
237
+ }
238
+ }
239
+ for (const field of ["inputSchema", "outputSchema"]) {
240
+ if (!isRecord(value[field])) throw new TypeError(`tool ${toolKey} requires object ${field}`);
241
+ }
242
+ assertEnum(value.riskLevel, AGENT_TOOL_RISK_LEVELS, "riskLevel", toolKey);
243
+ assertEnum(value.sideEffectLevel, AGENT_TOOL_SIDE_EFFECT_LEVELS, "sideEffectLevel", toolKey);
244
+ assertEnum(value.idempotencyMode, AGENT_TOOL_IDEMPOTENCY_MODES, "idempotencyMode", toolKey);
245
+ if (value.handler !== void 0) {
246
+ if (!isRecord(value.handler)) throw new TypeError(`tool ${toolKey} has invalid handler reference`);
247
+ assertOnlyFields(value.handler, ["type", "ref", "metadata"], "handler", toolKey);
248
+ assertEnum(value.handler.type, AGENT_TOOL_HANDLER_TYPES, "handler type", toolKey);
249
+ if (!nonEmptyString(value.handler.ref)) throw new TypeError(`tool ${toolKey} has invalid handler reference`);
250
+ if (value.handler.metadata !== void 0 && !isRecord(value.handler.metadata)) {
251
+ throw new TypeError(`tool ${toolKey} handler metadata must be an object`);
252
+ }
253
+ }
254
+ if (value.authority !== void 0) {
255
+ if (!Array.isArray(value.authority)) throw new TypeError(`tool ${toolKey} authority must be an array`);
256
+ value.authority.forEach((requirement) => assertAuthorityRequirement(requirement, toolKey));
257
+ }
258
+ if (value.timeoutMs !== void 0 && (!Number.isInteger(value.timeoutMs) || value.timeoutMs < 1)) {
259
+ throw new TypeError(`tool ${toolKey} timeoutMs must be a positive integer`);
260
+ }
261
+ if (value.retryPolicy !== void 0) {
262
+ if (!isRecord(value.retryPolicy)) throw new TypeError(`tool ${toolKey} has invalid retryPolicy`);
263
+ assertOnlyFields(value.retryPolicy, ["maxAttempts", "backoff", "baseDelayMs", "maxDelayMs", "retryableReasons"], "retryPolicy", toolKey);
264
+ if (!Number.isInteger(value.retryPolicy.maxAttempts) || value.retryPolicy.maxAttempts < 1) {
265
+ throw new TypeError(`tool ${toolKey} has invalid retryPolicy`);
266
+ }
267
+ if (value.retryPolicy.backoff !== void 0 && !["none", "fixed", "exponential"].includes(String(value.retryPolicy.backoff))) {
268
+ throw new TypeError(`tool ${toolKey} retryPolicy backoff is invalid`);
269
+ }
270
+ for (const field of ["baseDelayMs", "maxDelayMs"]) {
271
+ if (value.retryPolicy[field] !== void 0 && (!Number.isInteger(value.retryPolicy[field]) || value.retryPolicy[field] < 0)) {
272
+ throw new TypeError(`tool ${toolKey} retryPolicy ${field} is invalid`);
273
+ }
274
+ }
275
+ if (value.retryPolicy.retryableReasons !== void 0 && !stringArray(value.retryPolicy.retryableReasons)) {
276
+ throw new TypeError(`tool ${toolKey} retryPolicy retryableReasons must be a string array`);
277
+ }
278
+ }
279
+ if (value.receiptMode !== void 0) {
280
+ assertEnum(value.receiptMode, AGENT_TOOL_RECEIPT_MODES, "receiptMode", toolKey);
281
+ }
282
+ for (const field of ["sensitiveInputPaths", "sensitiveOutputPaths", "emitsEvents"]) {
283
+ if (value[field] !== void 0 && !stringArray(value[field])) {
284
+ throw new TypeError(`tool ${toolKey} ${field} must be a string array`);
285
+ }
286
+ }
287
+ if (value.active !== void 0 && typeof value.active !== "boolean") {
288
+ throw new TypeError(`tool ${toolKey} active must be boolean`);
289
+ }
290
+ if (value.metadata !== void 0 && !isRecord(value.metadata)) {
291
+ throw new TypeError(`tool ${toolKey} metadata must be an object`);
292
+ }
293
+ }
294
+
295
+ // src/operations.ts
296
+ var AGENT_OPERATION_LANES = ["local", "remote", "sandbox", "platform", "mcp"];
297
+ var AGENT_OPERATION_MODEL_POLICIES = ["never", "optional", "required"];
298
+ var AGENT_OPERATION_NETWORK_POLICIES = ["none", "optional", "required"];
299
+ var AGENT_OPERATION_SIDE_EFFECTS = [
300
+ "none",
301
+ "local_write",
302
+ "remote_read",
303
+ "remote_write",
304
+ "deploy",
305
+ "billable",
306
+ "oauth"
307
+ ];
308
+ var AGENT_OPERATION_RISKS = ["read_only", "write", "privileged"];
309
+ var AGENT_OPERATION_SPEND_POLICIES = ["never", "optional", "required"];
310
+ var AGENT_OPERATION_STATUSES = [
311
+ "stable",
312
+ "experimental",
313
+ "stub",
314
+ "deprecated",
315
+ "compatibility"
316
+ ];
317
+ var AGENT_OPERATION_IDEMPOTENCY_MODES = AGENT_TOOL_IDEMPOTENCY_MODES;
318
+ var isRecord2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
319
+ var nonEmptyString2 = (value) => typeof value === "string" && value.trim().length > 0;
320
+ var stringArray2 = (value) => Array.isArray(value) && value.every((item) => typeof item === "string");
321
+ var enumValue = (value, allowed) => typeof value === "string" && allowed.includes(value);
322
+ function assertAgentOperationContract(value) {
323
+ if (!isRecord2(value)) throw new TypeError("agent operation contract must be an object");
324
+ if (!nonEmptyString2(value.id) || !/^[a-z][A-Za-z0-9_-]*(\.[A-Za-z][A-Za-z0-9_-]*)+$/.test(value.id)) {
325
+ throw new TypeError("agent operation contract requires a dotted id");
326
+ }
327
+ for (const field of ["module", "action", "summary"]) {
328
+ if (!nonEmptyString2(value[field])) throw new TypeError(`operation ${value.id} requires ${field}`);
329
+ }
330
+ if (!Number.isInteger(value.version) || value.version < 1) {
331
+ throw new TypeError(`operation ${value.id} version must be a positive integer`);
332
+ }
333
+ if (!isRecord2(value.execution)) throw new TypeError(`operation ${value.id} requires execution policy`);
334
+ const execution = value.execution;
335
+ if (!Array.isArray(execution.lanes) || execution.lanes.length === 0 || execution.lanes.some((lane) => !enumValue(lane, AGENT_OPERATION_LANES))) {
336
+ throw new TypeError(`operation ${value.id} has invalid execution lanes`);
337
+ }
338
+ if (!enumValue(execution.model, AGENT_OPERATION_MODEL_POLICIES)) {
339
+ throw new TypeError(`operation ${value.id} has invalid execution model policy`);
340
+ }
341
+ if (!enumValue(execution.network, AGENT_OPERATION_NETWORK_POLICIES)) {
342
+ throw new TypeError(`operation ${value.id} has invalid execution network policy`);
343
+ }
344
+ if (!enumValue(execution.sideEffects, AGENT_OPERATION_SIDE_EFFECTS)) {
345
+ throw new TypeError(`operation ${value.id} has invalid execution side-effect policy`);
346
+ }
347
+ for (const field of ["embedding", "provider_spend"]) {
348
+ if (execution[field] !== void 0 && !enumValue(execution[field], AGENT_OPERATION_SPEND_POLICIES)) {
349
+ throw new TypeError(`operation ${value.id} has invalid execution ${field} policy`);
350
+ }
351
+ }
352
+ if (!enumValue(value.risk, AGENT_OPERATION_RISKS)) {
353
+ throw new TypeError(`operation ${value.id} has invalid risk`);
354
+ }
355
+ for (const field of ["input_schema", "output_schema"]) {
356
+ if (value[field] !== void 0 && typeof value[field] !== "string" && !isRecord2(value[field])) {
357
+ throw new TypeError(`operation ${value.id} ${field} must be a schema object or reference`);
358
+ }
359
+ if (typeof value[field] === "string" && !value[field].trim()) {
360
+ throw new TypeError(`operation ${value.id} ${field} reference cannot be empty`);
361
+ }
362
+ }
363
+ for (const field of ["capabilities", "accepts", "phases", "artifacts"]) {
364
+ if (value[field] !== void 0 && !stringArray2(value[field])) {
365
+ throw new TypeError(`operation ${value.id} ${field} must be a string array`);
366
+ }
367
+ }
368
+ if (value.idempotencyMode !== void 0 && !enumValue(value.idempotencyMode, AGENT_OPERATION_IDEMPOTENCY_MODES)) {
369
+ throw new TypeError(`operation ${value.id} has invalid idempotency mode`);
370
+ }
371
+ if (value.status !== void 0 && !enumValue(value.status, AGENT_OPERATION_STATUSES)) {
372
+ throw new TypeError(`operation ${value.id} has invalid status`);
373
+ }
374
+ if (value.authority !== void 0) {
375
+ if (!Array.isArray(value.authority)) throw new TypeError(`operation ${value.id} authority must be an array`);
376
+ for (const requirement of value.authority) {
377
+ if (!isRecord2(requirement) || !enumValue(requirement.type, AGENT_AUTHORITY_TYPES)) {
378
+ throw new TypeError(`operation ${value.id} has invalid authority requirement`);
379
+ }
380
+ }
381
+ }
382
+ }
383
+
384
+ // src/source-types.ts
385
+ var AGENT_SOURCE_TYPE_CATALOG = "agentsam.source-types.v2";
386
+ var AGENT_SOURCE_FORMAT_KINDS = ["source", "container", "codec", "native-project", "exchange", "dataset", "archive", "package", "sequence", "subtitle", "font", "shader", "machine-program", "color-profile", "database", "directory-package"];
387
+ var AGENT_SOURCE_IDENTIFICATION_STATUSES = ["declared", "identified", "ambiguous", "unknown", "mismatch"];
388
+ var AGENT_SOURCE_IDENTIFICATION_CONFIDENCE = ["high", "medium", "low", "none"];
389
+ var AGENT_SOURCE_IDENTIFICATION_EVIDENCE = ["extension", "media-type", "signature", "container", "content", "application-context", "user-selection", "provider-metadata"];
390
+
138
391
  // src/repository.ts
139
392
  var REPOSITORY_STATUSES = ["active", "archived", "disabled"];
140
393
  var REPOSITORY_CONTRACT_TYPES = ["api", "schema", "runtime", "cli", "event", "receipt", "package"];
@@ -145,20 +398,347 @@ var REPOSITORY_FAILURE_POLICIES = ["warn", "block_certification", "block_deploy"
145
398
 
146
399
  // src/errors.ts
147
400
  var AGENTSAM_ERROR_SCHEMA_VERSION = 2;
401
+
402
+ // src/spawn-policy.ts
403
+ var SPAWN_POLICY_CONTRACT = "agentsam.spawn-policy.v2";
404
+ function evaluateSpawnBudgetV2(input) {
405
+ const invalid = (reason) => ({ ok: false, contract: SPAWN_POLICY_CONTRACT, reason });
406
+ const policy = input.policy;
407
+ if (!policy) return invalid("spawn_policy_unresolved");
408
+ if (!policy.allowSubagentSpawn) return invalid("subagent_spawn_disabled");
409
+ if (!policy.allowFanoutExecution) return invalid("fanout_execution_disabled");
410
+ if ((input.requestedDepth ?? 1) > policy.maxSpawnDepth) return invalid("spawn_depth_exceeded");
411
+ const cap = (value) => typeof value === "number" && Number.isFinite(value) && value > 0 ? value : null;
412
+ const allowedJob = cap(policy.maxCostPerSessionUsd);
413
+ const allowedLane = cap(policy.maxCostPerCallUsd);
414
+ if (allowedJob === null) return invalid("policy_job_cost_cap_required");
415
+ if (allowedLane === null) return invalid("policy_lane_cost_cap_required");
416
+ const wantedJob = cap(input.requestedJobCapUsd) ?? allowedJob;
417
+ const wantedLane = cap(input.requestedLaneCapUsd) ?? allowedLane;
418
+ return {
419
+ ok: true,
420
+ contract: SPAWN_POLICY_CONTRACT,
421
+ jobCapUsd: Math.min(wantedJob, allowedJob),
422
+ laneCapUsd: Math.min(wantedLane, allowedLane, wantedJob, allowedJob)
423
+ };
424
+ }
425
+
426
+ // src/resource-scope.ts
427
+ var AGENTSAM_RESOURCE_SCOPE_VERSION = "agentsam.resource-scope.v2";
428
+ function resolveAgentResourceScopeV2(principal, options = {}) {
429
+ if (!principal?.accountId?.trim() || !principal.authUserId?.trim()) {
430
+ throw new Error("authenticated_account_required");
431
+ }
432
+ const valid = (v) => typeof v === "string" && v.trim() ? v.trim() : void 0;
433
+ return {
434
+ contract: AGENTSAM_RESOURCE_SCOPE_VERSION,
435
+ accountId: principal.accountId.trim(),
436
+ authUserId: principal.authUserId.trim(),
437
+ ...valid(options.projectId) ? { projectId: valid(options.projectId) } : {},
438
+ ...valid(options.executionWorkspaceId) ? { executionWorkspaceId: valid(options.executionWorkspaceId) } : {}
439
+ };
440
+ }
441
+ function assertAccountResourceOwnerV2(scope, recordAccountId) {
442
+ if (!scope?.accountId || !recordAccountId || scope.accountId !== recordAccountId) {
443
+ throw new Error("account_resource_forbidden");
444
+ }
445
+ }
446
+
447
+ // src/design-workspace.ts
448
+ var AGENTSAM_DESIGN_WORKSPACE_CONTRACT = "agentsam.design-workspace.v1";
449
+ var required = (value, code) => {
450
+ if (typeof value !== "string" || !value.trim()) throw new Error(code);
451
+ };
452
+ function assertDesignWorkspaceScope(snapshot, scope) {
453
+ if (snapshot?.contract !== AGENTSAM_DESIGN_WORKSPACE_CONTRACT)
454
+ throw new Error("design_workspace_contract_mismatch");
455
+ required(snapshot.resource?.id, "design_resource_id_required");
456
+ required(snapshot.resource?.appId, "design_app_id_required");
457
+ required(snapshot.resource?.href, "design_resource_href_required");
458
+ if (!snapshot.resource.href.startsWith("/") || snapshot.resource.href.startsWith("//")) {
459
+ throw new Error("design_resource_href_invalid");
460
+ }
461
+ required(snapshot.revision, "design_revision_required");
462
+ required(snapshot.resource?.accountId, "design_resource_account_required");
463
+ if (scope?.contract !== "agentsam.resource-scope.v2" || !scope.accountId || !scope.authUserId) {
464
+ throw new Error("authenticated_account_required");
465
+ }
466
+ if (snapshot.resource.accountId !== scope.accountId)
467
+ throw new Error("design_resource_forbidden");
468
+ if (scope.projectId && snapshot.resource.projectId && scope.projectId !== snapshot.resource.projectId) {
469
+ throw new Error("design_project_scope_mismatch");
470
+ }
471
+ }
472
+ var mutatingOperations = /* @__PURE__ */ new Set([
473
+ "modify",
474
+ "save",
475
+ "undo",
476
+ "redo",
477
+ "generate",
478
+ "publish",
479
+ "export"
480
+ ]);
481
+ function assertDesignWorkspaceOperation(snapshot, scope, operation) {
482
+ assertDesignWorkspaceScope(snapshot, scope);
483
+ required(operation?.id, "design_operation_id_required");
484
+ if (operation.resourceId !== snapshot.resource.id)
485
+ throw new Error("design_operation_resource_mismatch");
486
+ if (!snapshot.capabilities.includes(operation.kind))
487
+ throw new Error("design_capability_unavailable");
488
+ if (operation.kind === "publish" && operation.publicationApproval !== "explicit-user-action") {
489
+ throw new Error("design_publish_requires_approval");
490
+ }
491
+ if (snapshot.status === "unavailable")
492
+ throw new Error("design_workspace_unavailable");
493
+ if (mutatingOperations.has(operation.kind)) {
494
+ if (snapshot.status === "read-only")
495
+ throw new Error("design_workspace_read_only");
496
+ if (!operation.expectedRevision || operation.expectedRevision !== snapshot.revision) {
497
+ throw new Error("design_revision_conflict");
498
+ }
499
+ }
500
+ }
501
+ function assertDesignCreateRequest(request) {
502
+ required(request?.kind, "design_kind_required");
503
+ required(request?.idempotencyKey, "design_create_idempotency_required");
504
+ }
505
+
506
+ // src/design-workspace-registry.ts
507
+ var assertPrincipalScope = (scope) => {
508
+ if (scope?.contract !== "agentsam.resource-scope.v2" || !scope.accountId?.trim() || !scope.authUserId?.trim()) {
509
+ throw new Error("authenticated_account_required");
510
+ }
511
+ };
512
+ var DesignWorkspaceRegistry = class {
513
+ adapters = /* @__PURE__ */ new Map();
514
+ register(adapter) {
515
+ if (!adapter?.kind?.trim()) throw new Error("design_adapter_kind_required");
516
+ if (this.adapters.has(adapter.kind))
517
+ throw new Error("design_adapter_already_registered");
518
+ this.adapters.set(adapter.kind, adapter);
519
+ return () => {
520
+ if (this.adapters.get(adapter.kind) === adapter)
521
+ this.adapters.delete(adapter.kind);
522
+ };
523
+ }
524
+ supports(kind) {
525
+ return this.adapters.has(kind);
526
+ }
527
+ kinds() {
528
+ return [...this.adapters.keys()];
529
+ }
530
+ require(kind) {
531
+ const adapter = this.adapters.get(kind);
532
+ if (!adapter) throw new Error("design_adapter_unavailable");
533
+ return adapter;
534
+ }
535
+ async open(scope, kind, resourceId, signal) {
536
+ assertPrincipalScope(scope);
537
+ if (!resourceId?.trim()) throw new Error("design_resource_id_required");
538
+ const snapshot = await this.require(kind).open(scope, resourceId, signal);
539
+ assertDesignWorkspaceScope(snapshot, scope);
540
+ if (snapshot.resource.id !== resourceId || snapshot.resource.kind !== kind)
541
+ throw new Error("design_open_resource_mismatch");
542
+ return snapshot;
543
+ }
544
+ async createDraft(scope, request, signal) {
545
+ assertPrincipalScope(scope);
546
+ assertDesignCreateRequest(request);
547
+ if (request.projectId && scope.projectId && request.projectId !== scope.projectId) {
548
+ throw new Error("design_project_scope_mismatch");
549
+ }
550
+ const adapter = this.require(request.kind);
551
+ if (!adapter.createDraft) throw new Error("design_create_unavailable");
552
+ const snapshot = await adapter.createDraft(scope, request, signal);
553
+ assertDesignWorkspaceScope(snapshot, scope);
554
+ if (snapshot.resource.kind !== request.kind)
555
+ throw new Error("design_create_kind_mismatch");
556
+ if (request.projectId && snapshot.resource.projectId !== request.projectId) {
557
+ throw new Error("design_create_project_mismatch");
558
+ }
559
+ if (request.siteId && snapshot.resource.siteId !== request.siteId) {
560
+ throw new Error("design_create_site_mismatch");
561
+ }
562
+ return snapshot;
563
+ }
564
+ async execute(scope, snapshot, operation, signal) {
565
+ assertDesignWorkspaceOperation(snapshot, scope, operation);
566
+ const receipt = await this.require(snapshot.resource.kind).execute(
567
+ scope,
568
+ operation,
569
+ signal
570
+ );
571
+ if (receipt.operationId !== operation.id || receipt.resourceId !== snapshot.resource.id || receipt.kind !== operation.kind || receipt.previousRevision !== snapshot.revision || !receipt.revision?.trim() || receipt.status !== "applied" && receipt.status !== "unchanged") {
572
+ throw new Error("design_operation_receipt_mismatch");
573
+ }
574
+ return receipt;
575
+ }
576
+ };
577
+
578
+ // src/design-workspace-bridge.ts
579
+ var DESIGN_WORKSPACE_BRIDGE = "agentsam.design-workspace.bridge.v1";
580
+ function createDesignWorkspaceFrameAdapter(kind, frame) {
581
+ const pending = /* @__PURE__ */ new Map();
582
+ const receive = (event) => {
583
+ if (event.origin !== location.origin || event.source !== frame()?.contentWindow || event.data?.channel !== DESIGN_WORKSPACE_BRIDGE) return;
584
+ const item = pending.get(event.data.id);
585
+ if (!item || typeof event.data.ok !== "boolean") return;
586
+ pending.delete(event.data.id);
587
+ item.dispose();
588
+ if (event.data.ok) item.resolve(event.data.result);
589
+ else item.reject(new Error(event.data.error || "design_operation_failed"));
590
+ };
591
+ window.addEventListener("message", receive);
592
+ const request = (method, fields = {}, signal) => new Promise((resolve, reject) => {
593
+ if (signal?.aborted) {
594
+ reject(new Error("design_operation_aborted"));
595
+ return;
596
+ }
597
+ const target = frame()?.contentWindow;
598
+ if (!target) {
599
+ reject(new Error("design_engine_unavailable"));
600
+ return;
601
+ }
602
+ const id = crypto.randomUUID();
603
+ const cancel = () => {
604
+ pending.delete(id);
605
+ dispose();
606
+ reject(new Error("design_operation_interrupted_reopen_to_verify"));
607
+ };
608
+ const timer = setTimeout(() => {
609
+ pending.delete(id);
610
+ dispose();
611
+ reject(new Error("design_receipt_timeout_reopen_to_verify"));
612
+ }, 6e4);
613
+ const dispose = () => {
614
+ clearTimeout(timer);
615
+ signal?.removeEventListener("abort", cancel);
616
+ };
617
+ pending.set(id, { resolve, reject, dispose });
618
+ signal?.addEventListener("abort", cancel, { once: true });
619
+ target.postMessage({ channel: DESIGN_WORKSPACE_BRIDGE, id, method, ...fields }, location.origin);
620
+ });
621
+ const adapter = {
622
+ kind,
623
+ open: (_scope, resourceId, signal) => request("open", { resourceId }, signal),
624
+ createDraft: (_scope, value, signal) => request("create", { request: value }, signal),
625
+ execute: (_scope, operation, signal) => request("execute", { operation }, signal)
626
+ };
627
+ return {
628
+ adapter,
629
+ state: (signal) => request("state", {}, signal),
630
+ dispose: () => {
631
+ window.removeEventListener("message", receive);
632
+ for (const p of pending.values()) {
633
+ p.dispose();
634
+ p.reject(new Error("design_engine_closed"));
635
+ }
636
+ pending.clear();
637
+ }
638
+ };
639
+ }
640
+ function installDesignWorkspaceGuest(options) {
641
+ const registry = new DesignWorkspaceRegistry();
642
+ const unregister = registry.register(options.adapter);
643
+ const receipts = /* @__PURE__ */ new Map();
644
+ let queue = Promise.resolve();
645
+ const receive = (event) => {
646
+ if (event.source !== window.parent || event.origin !== location.origin || event.data?.channel !== DESIGN_WORKSPACE_BRIDGE || typeof event.data.id !== "string") return;
647
+ const data = event.data;
648
+ if (!["state", "open", "create", "execute"].includes(data.method || "")) return;
649
+ queue = queue.then(async () => {
650
+ const reply = (fields) => window.parent.postMessage({ channel: DESIGN_WORKSPACE_BRIDGE, id: data.id, ...fields }, location.origin);
651
+ try {
652
+ const scope = await options.resolveScope();
653
+ let result;
654
+ if (data.method === "create") result = await registry.createDraft(scope, data.request);
655
+ else if (data.method === "execute") {
656
+ const operation = data.operation;
657
+ const key = scope.authUserId + ":" + operation.id;
658
+ const input = JSON.stringify(operation), prior = receipts.get(key);
659
+ if (prior && prior.input !== input) throw new Error("design_operation_id_conflict");
660
+ if (prior) result = prior.result;
661
+ else {
662
+ if (options.currentResourceId() !== operation.resourceId) throw new Error("design_operation_resource_mismatch");
663
+ const snapshot = await registry.open(scope, options.adapter.kind, operation.resourceId);
664
+ result = await registry.execute(scope, snapshot, operation);
665
+ receipts.set(key, { input, result });
666
+ if (receipts.size > 200) receipts.delete(receipts.keys().next().value);
667
+ }
668
+ } else {
669
+ const id = data.method === "state" ? options.currentResourceId() : data.resourceId;
670
+ if (!id) throw new Error("design_resource_not_open");
671
+ const snapshot = await registry.open(scope, options.adapter.kind, id);
672
+ result = data.method === "state" ? { scope, snapshot } : snapshot;
673
+ }
674
+ reply({ ok: true, result });
675
+ } catch (error) {
676
+ reply({ ok: false, error: error instanceof Error ? error.message : "design_operation_failed" });
677
+ }
678
+ });
679
+ };
680
+ window.addEventListener("message", receive);
681
+ return () => {
682
+ unregister();
683
+ window.removeEventListener("message", receive);
684
+ };
685
+ }
686
+ async function resolveHostedDesignScope(request = fetch) {
687
+ const response = await request("/api/auth/me", { credentials: "same-origin", cache: "no-store" });
688
+ const body = await response.json();
689
+ if (!response.ok || body?.ok !== true || body.authenticated !== true || typeof body.user?.id !== "string" || !body.user.id.trim())
690
+ throw new Error("authenticated_account_required");
691
+ return { contract: "agentsam.resource-scope.v2", accountId: body.user.id, authUserId: body.user.id };
692
+ }
148
693
  export {
694
+ AGENTSAM_DESIGN_WORKSPACE_CONTRACT,
149
695
  AGENTSAM_ERROR_SCHEMA_VERSION,
696
+ AGENTSAM_RESOURCE_SCOPE_VERSION,
697
+ AGENT_AUTHORITY_TYPES,
698
+ AGENT_OPERATION_IDEMPOTENCY_MODES,
699
+ AGENT_OPERATION_LANES,
700
+ AGENT_OPERATION_MODEL_POLICIES,
701
+ AGENT_OPERATION_NETWORK_POLICIES,
702
+ AGENT_OPERATION_RISKS,
703
+ AGENT_OPERATION_SIDE_EFFECTS,
704
+ AGENT_OPERATION_SPEND_POLICIES,
705
+ AGENT_OPERATION_STATUSES,
706
+ AGENT_SOURCE_FORMAT_KINDS,
707
+ AGENT_SOURCE_IDENTIFICATION_CONFIDENCE,
708
+ AGENT_SOURCE_IDENTIFICATION_EVIDENCE,
709
+ AGENT_SOURCE_IDENTIFICATION_STATUSES,
710
+ AGENT_SOURCE_TYPE_CATALOG,
711
+ AGENT_TOOL_HANDLER_TYPES,
712
+ AGENT_TOOL_IDEMPOTENCY_MODES,
713
+ AGENT_TOOL_RECEIPT_MODES,
714
+ AGENT_TOOL_RISK_LEVELS,
715
+ AGENT_TOOL_SIDE_EFFECT_LEVELS,
716
+ DESIGN_WORKSPACE_BRIDGE,
717
+ DesignWorkspaceRegistry,
150
718
  REPOSITORY_CONTRACT_STATUSES,
151
719
  REPOSITORY_CONTRACT_TYPES,
152
720
  REPOSITORY_DEPENDENCY_CRITICALITIES,
153
721
  REPOSITORY_DEPENDENCY_TYPES,
154
722
  REPOSITORY_FAILURE_POLICIES,
155
723
  REPOSITORY_STATUSES,
724
+ SPAWN_POLICY_CONTRACT,
725
+ assertAccountResourceOwnerV2,
726
+ assertAgentOperationContract,
727
+ assertAgentToolDefinition,
728
+ assertDesignCreateRequest,
729
+ assertDesignWorkspaceOperation,
730
+ assertDesignWorkspaceScope,
156
731
  classifyAgentRunRetry,
732
+ createDesignWorkspaceFrameAdapter,
157
733
  evaluateAgentRunWake,
734
+ evaluateSpawnBudgetV2,
735
+ installDesignWorkspaceGuest,
158
736
  isAgentRunModelActiveStatus,
159
737
  isAgentRunTerminalStatus,
160
738
  isAgentRunWaitingStatus,
161
739
  projectRunEventToActivity,
740
+ resolveAgentResourceScopeV2,
741
+ resolveHostedDesignScope,
162
742
  transitionAgentRunStatus,
163
743
  wakeMatchesSuspension
164
744
  };