@inneranimalmedia/agentsam-sdk 2.6.9 → 2.6.11

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 (392) hide show
  1. package/README.md +21 -0
  2. package/TRADEMARKS.md +22 -0
  3. package/apps/README.md +3 -0
  4. package/apps/cad-creator/LICENSE +21 -0
  5. package/apps/cad-creator/README.md +4 -1
  6. package/apps/cad-creator/shared/cad/package.json +1 -1
  7. package/apps/client-cms-editor/LICENSE +21 -0
  8. package/apps/client-cms-editor/README.md +3 -0
  9. package/apps/client-cms-editor/backend/package.json +3 -3
  10. package/apps/client-cms-editor/frontend/package.json +4 -4
  11. package/apps/client-cms-editor/package-lock.json +43 -43
  12. package/apps/client-cms-editor/package.json +3 -3
  13. package/apps/client-cms-editor/reference/harvest/HARVEST_RECEIPT.json +1 -1
  14. package/apps/client-cms-editor/reference/harvest/README.md +1 -1
  15. package/apps/client-cms-editor/reference/harvest/plans/ARCHIVE-INTAKE.md +1 -1
  16. package/apps/client-cms-editor/reference/harvest/plans/HARVEST-INDEX.md +1 -1
  17. package/apps/client-cms-editor/reference/harvest/plans/TOOLING-LAB.md +1 -1
  18. package/apps/client-cms-editor/shared/cms/package.json +2 -2
  19. package/docs/MINI.md +4 -2
  20. package/docs/REPO_FILE_MAP.txt +0 -1
  21. package/docs/SOURCE_ARCHITECTURE.md +1 -1
  22. package/docs/architecture/DUAL_ANALYTICS_PRODUCT.md +140 -0
  23. package/docs/architecture/HOOKS-MODELS-SELF-HOSTING-PLAN.md +199 -0
  24. package/docs/content-studio/REVISION_GATE_2026-09-27.md +1 -1
  25. package/docs/engineering/go-portability/01-product-project-deployment-authority.md +69 -0
  26. package/docs/engineering/provider-internal-renames/01-lane-initialization.md +20 -0
  27. package/docs/engineering/provider-internal-renames/01a-runtime-environment-contract.md +115 -0
  28. package/docs/engineering/provider-internal-renames/02-cfoa.md +57 -0
  29. package/docs/engineering/provider-internal-renames/03-gclioa.md +32 -0
  30. package/docs/engineering/provider-internal-renames/04-goaude.md +50 -0
  31. package/docs/engineering/provider-internal-renames/05-gdrv.md +33 -0
  32. package/docs/engineering/provider-internal-renames/06-verification.md +103 -0
  33. package/docs/engineering/provider-internal-renames/README.md +77 -0
  34. package/docs/engineering/provider-internal-renames/runtime-environment-contract.json +220 -0
  35. package/docs/engineering/test-diagnostics/go-cli-test-hang-20261003.md +49 -0
  36. package/docs/engineering/test-diagnostics/go-skip-deploy-docker-fix.md +90 -0
  37. package/docs/knowledge-service-verification.md +3 -3
  38. package/docs/plans/AGENTSAM-SUSPEND-QUEUE-KNOWLEDGE-RDP-2026-10-03.md +870 -0
  39. package/docs/plans/LOCAL-STUDIO-GRADUATION-2026-09-26.md +9 -9
  40. package/docs/plans/MACHINE-FIRST-APPS-TUI-2026-09-24.md +11 -11
  41. package/docs/plans/RECONCILIATION-2026-09-19.md +6 -6
  42. package/docs/plans/SAM_WORK_PROTOCOL.md +667 -0
  43. package/docs/plans/TOMORROW-EXTENSIVE-TODO-2026-09-26.md +2 -2
  44. package/docs/plans/UNIVERSAL-INGEST-MACHINE-FIRST-2026-09-24.md +3 -3
  45. package/examples/hyperspace-demo/index.html +16 -0
  46. package/examples/hyperspace-demo/package.json +21 -0
  47. package/examples/hyperspace-demo/src/main.tsx +277 -0
  48. package/examples/hyperspace-demo/tsconfig.json +9 -0
  49. package/examples/hyperspace-demo/vite.config.ts +24 -0
  50. package/migrations/d1/0020_agentsam_receipt_catalog.sql +35 -0
  51. package/migrations/runtime/0005_agentsam_hooks.sql +87 -0
  52. package/migrations/runtime/0006_agent_run_suspend_activity.sql +53 -0
  53. package/migrations/runtime/0007_queue_control.sql +40 -0
  54. package/migrations/runtime/0008_agent_run_dependencies.sql +24 -0
  55. package/migrations/runtime/0008_analytics_legacy_bootstrap.sql +43 -0
  56. package/migrations/runtime/0009_analytics_authority.sql +108 -0
  57. package/package.json +45 -14
  58. package/packages/agentsam-brand/README.md +3 -0
  59. package/packages/agentsam-brand/package.json +2 -2
  60. package/packages/agentsam-brand/src/core/v2/compile.js +1 -1
  61. package/packages/agentsam-brand/src/core/v2/schema.js +1 -1
  62. package/packages/agentsam-contracts/dist/adapter.d.ts +22 -0
  63. package/packages/agentsam-contracts/dist/adapter.js +0 -0
  64. package/packages/agentsam-contracts/dist/agent.d.ts +66 -0
  65. package/packages/agentsam-contracts/dist/agent.js +15 -0
  66. package/packages/agentsam-contracts/dist/artifacts.d.ts +70 -0
  67. package/packages/agentsam-contracts/dist/artifacts.js +0 -0
  68. package/packages/agentsam-contracts/dist/authority.d.ts +21 -0
  69. package/packages/agentsam-contracts/dist/authority.js +0 -0
  70. package/packages/agentsam-contracts/dist/context.d.ts +14 -0
  71. package/packages/agentsam-contracts/dist/context.js +0 -0
  72. package/packages/agentsam-contracts/dist/errors.d.ts +121 -0
  73. package/packages/agentsam-contracts/dist/errors.js +5 -0
  74. package/packages/agentsam-contracts/dist/events.d.ts +53 -0
  75. package/packages/agentsam-contracts/dist/events.js +0 -0
  76. package/packages/agentsam-contracts/dist/execution.d.ts +38 -0
  77. package/packages/agentsam-contracts/dist/execution.js +0 -0
  78. package/packages/agentsam-contracts/dist/hooks.d.ts +31 -0
  79. package/packages/agentsam-contracts/dist/hooks.js +0 -0
  80. package/packages/agentsam-contracts/dist/identity.d.ts +15 -0
  81. package/packages/agentsam-contracts/dist/identity.js +0 -0
  82. package/packages/agentsam-contracts/dist/index.d.ts +16 -0
  83. package/packages/agentsam-contracts/dist/index.js +164 -0
  84. package/packages/agentsam-contracts/dist/models.d.ts +9 -0
  85. package/packages/agentsam-contracts/dist/models.js +0 -0
  86. package/packages/agentsam-contracts/dist/providers.d.ts +27 -0
  87. package/packages/agentsam-contracts/dist/providers.js +0 -0
  88. package/packages/agentsam-contracts/dist/repository.d.ts +56 -0
  89. package/packages/agentsam-contracts/dist/repository.js +15 -0
  90. package/packages/agentsam-contracts/dist/run.d.ts +113 -0
  91. package/packages/agentsam-contracts/dist/run.js +132 -0
  92. package/packages/agentsam-contracts/dist/tools.d.ts +82 -0
  93. package/packages/agentsam-contracts/dist/tools.js +0 -0
  94. package/packages/agentsam-contracts/dist/widgets.d.ts +38 -0
  95. package/packages/agentsam-contracts/dist/widgets.js +0 -0
  96. package/packages/agentsam-contracts/package.json +9 -1
  97. package/packages/agentsam-contracts/scripts/build.mjs +1 -1
  98. package/packages/agentsam-contracts/src/agent.ts +78 -3
  99. package/packages/agentsam-contracts/src/errors.ts +19 -10
  100. package/packages/agentsam-contracts/src/index.ts +2 -0
  101. package/packages/agentsam-contracts/src/run.ts +320 -0
  102. package/packages/agentsam-contracts/src/widgets.ts +58 -0
  103. package/packages/agentsam-contracts/test/contracts.test.mjs +1 -1
  104. package/packages/agentsam-contracts/test/run-contract.test.mjs +94 -0
  105. package/packages/agentsam-errors/package.json +11 -3
  106. package/packages/agentsam-errors/protocol/agentsam.error.v2.schema.json +821 -0
  107. package/packages/agentsam-errors/protocol/error-catalog.json +3512 -0
  108. package/packages/agentsam-errors/src/envelope.js +63 -11
  109. package/packages/agentsam-errors/src/error.js +6 -0
  110. package/packages/agentsam-errors/src/fingerprint.js +9 -1
  111. package/packages/agentsam-errors/src/normalize.js +51 -6
  112. package/packages/agentsam-errors/src/recovery.js +9 -35
  113. package/packages/agentsam-errors/src/transport.js +6 -1
  114. package/packages/agentsam-errors/src/vocabulary.js +515 -126
  115. package/packages/agentsam-errors/test/catalog-v2.test.mjs +106 -0
  116. package/packages/agentsam-errors/types/index.d.ts +157 -0
  117. package/packages/agentsam-goap/README.md +3 -0
  118. package/packages/agentsam-goap/package.json +2 -2
  119. package/packages/agentsam-hooks/README.md +206 -0
  120. package/packages/agentsam-hooks/bin/agentsam-hooks.mjs +64 -0
  121. package/packages/agentsam-hooks/bindings/go/command.go +55 -0
  122. package/packages/agentsam-hooks/bindings/go/errors_generated.go +402 -0
  123. package/packages/agentsam-hooks/bindings/go/go.mod +3 -0
  124. package/packages/agentsam-hooks/bindings/go/hooks.go +285 -0
  125. package/packages/agentsam-hooks/bindings/go/hooks_test.go +48 -0
  126. package/packages/agentsam-hooks/bindings/rust/Cargo.toml +11 -0
  127. package/packages/agentsam-hooks/bindings/rust/src/errors_generated.rs +396 -0
  128. package/packages/agentsam-hooks/bindings/rust/src/lib.rs +397 -0
  129. package/packages/agentsam-hooks/package.json +69 -0
  130. package/packages/agentsam-hooks/schema/manifest.json +54 -0
  131. package/packages/agentsam-hooks/scripts/clean-protocol.mjs +17 -0
  132. package/packages/agentsam-hooks/scripts/sync-protocol.mjs +27 -0
  133. package/packages/agentsam-hooks/src/adapters/agents.js +108 -0
  134. package/packages/agentsam-hooks/src/adapters/callback.js +4 -0
  135. package/packages/agentsam-hooks/src/adapters/capability.js +122 -0
  136. package/packages/agentsam-hooks/src/adapters/command.js +104 -0
  137. package/packages/agentsam-hooks/src/adapters/composite.js +31 -0
  138. package/packages/agentsam-hooks/src/adapters/http.js +58 -0
  139. package/packages/agentsam-hooks/src/adapters/lsp.js +116 -0
  140. package/packages/agentsam-hooks/src/adapters/mcp.js +76 -0
  141. package/packages/agentsam-hooks/src/adapters/provider.js +129 -0
  142. package/packages/agentsam-hooks/src/config.js +143 -0
  143. package/packages/agentsam-hooks/src/contracts.js +284 -0
  144. package/packages/agentsam-hooks/src/errors-generated.js +2732 -0
  145. package/packages/agentsam-hooks/src/index.d.ts +209 -0
  146. package/packages/agentsam-hooks/src/index.js +14 -0
  147. package/packages/agentsam-hooks/src/policy.js +34 -0
  148. package/packages/agentsam-hooks/src/runtime.js +312 -0
  149. package/packages/agentsam-hooks/src/store.js +264 -0
  150. package/packages/agentsam-hooks/test/adapters.test.mjs +216 -0
  151. package/packages/agentsam-hooks/test/runtime.test.mjs +258 -0
  152. package/packages/agentsam-knowledge/package.json +1 -1
  153. package/packages/agentsam-knowledge/src/backends/index.js +1 -1
  154. package/packages/agentsam-merch/README.md +62 -0
  155. package/packages/agentsam-merch/bin/agentsam-merch.mjs +16 -0
  156. package/packages/agentsam-merch/package.json +65 -0
  157. package/packages/agentsam-merch/profiles/completeful/dtg-back-large.json +42 -0
  158. package/packages/agentsam-merch/profiles/completeful/laser-engraving.json +39 -0
  159. package/packages/agentsam-merch/profiles/generic/embroidery-digitization.json +22 -0
  160. package/packages/agentsam-merch/schemas/collection-candidate.schema.json +66 -0
  161. package/packages/agentsam-merch/schemas/manufacturing-profile.schema.json +221 -0
  162. package/packages/agentsam-merch/src/adapters-completeful.js +50 -0
  163. package/packages/agentsam-merch/src/cli.js +93 -0
  164. package/packages/agentsam-merch/src/collection-lab.js +60 -0
  165. package/packages/agentsam-merch/src/compatibility.js +501 -0
  166. package/packages/agentsam-merch/src/derivatives.js +112 -0
  167. package/packages/agentsam-merch/src/index.d.ts +316 -0
  168. package/packages/agentsam-merch/src/index.js +46 -0
  169. package/packages/agentsam-merch/src/node/index.d.ts +58 -0
  170. package/packages/agentsam-merch/src/node/index.js +6 -0
  171. package/packages/agentsam-merch/src/node/raster.js +142 -0
  172. package/packages/agentsam-merch/src/node/vector.js +239 -0
  173. package/packages/agentsam-merch/src/product-concepts.js +118 -0
  174. package/packages/agentsam-merch/src/profile-registry.js +104 -0
  175. package/packages/agentsam-merch/src/profile.js +158 -0
  176. package/packages/agentsam-merch/src/transforms.js +215 -0
  177. package/packages/agentsam-merch/test/merch.test.mjs +332 -0
  178. package/packages/agentsam-merch/test/node-transforms.test.mjs +149 -0
  179. package/packages/agentsam-nav/dist/Nav.d.ts +43 -0
  180. package/packages/agentsam-nav/dist/NavCollapsible.d.ts +10 -0
  181. package/packages/agentsam-nav/dist/NavContent.d.ts +2 -0
  182. package/packages/agentsam-nav/dist/NavFooter.d.ts +2 -0
  183. package/packages/agentsam-nav/dist/NavGroup.d.ts +3 -0
  184. package/packages/agentsam-nav/dist/NavHeader.d.ts +2 -0
  185. package/packages/agentsam-nav/dist/NavMenu.d.ts +22 -0
  186. package/packages/agentsam-nav/dist/NavProvider.d.ts +35 -0
  187. package/packages/agentsam-nav/dist/NavTrigger.d.ts +2 -0
  188. package/packages/agentsam-nav/dist/Surfaces.d.ts +41 -0
  189. package/packages/agentsam-nav/dist/browser.d.ts +11 -0
  190. package/packages/agentsam-nav/dist/browser.global.js +172 -0
  191. package/packages/agentsam-nav/dist/browser.js +9688 -0
  192. package/packages/agentsam-nav/dist/contracts.d.ts +76 -0
  193. package/packages/agentsam-nav/dist/index.d.ts +11 -0
  194. package/packages/agentsam-nav/dist/index.js +9689 -0
  195. package/packages/agentsam-nav/dist/legacy.css +83 -0
  196. package/packages/agentsam-nav/dist/shell.css +113 -0
  197. package/packages/agentsam-nav/dist/theme.css +113 -0
  198. package/packages/agentsam-nav/dist/utils.d.ts +1 -0
  199. package/packages/agentsam-nav/package.json +1 -1
  200. package/packages/agentsam-queue-control/README.md +4 -1
  201. package/packages/agentsam-queue-control/package.json +4 -3
  202. package/packages/agentsam-queue-control/schemas/job-envelope.schema.json +111 -11
  203. package/packages/agentsam-queue-control/src/adapters/cloudflare.js +34 -6
  204. package/packages/agentsam-queue-control/src/adapters/memory.js +11 -2
  205. package/packages/agentsam-queue-control/src/adapters/sqlite.js +259 -0
  206. package/packages/agentsam-queue-control/src/contracts.js +207 -3
  207. package/packages/agentsam-queue-control/src/control-plane.js +62 -2
  208. package/packages/agentsam-queue-control/src/index.js +1 -0
  209. package/packages/agentsam-queue-control/test/queue-control.test.mjs +310 -0
  210. package/packages/agentsam-queue-control/test/sqlite-adapter.test.mjs +91 -0
  211. package/packages/agentsam-rapid-rust/README.md +3 -0
  212. package/packages/agentsam-repository/README.md +3 -0
  213. package/packages/agentsam-repository/package.json +1 -1
  214. package/packages/agentsam-vault/package.json +1 -1
  215. package/packages/agentsam-workbench/README.md +43 -0
  216. package/packages/agentsam-workbench/package.json +14 -4
  217. package/packages/agentsam-workbench/src/agent/AgentConversationSurface.tsx +108 -0
  218. package/packages/agentsam-workbench/src/agent/AgentPanel.tsx +25 -8
  219. package/packages/agentsam-workbench/src/agent/AgentRuntimeField.tsx +152 -0
  220. package/packages/agentsam-workbench/src/agent/Composer.tsx +10 -1
  221. package/packages/agentsam-workbench/src/agent/RunMode.ts +26 -0
  222. package/packages/agentsam-workbench/src/agent/Thread.tsx +18 -3
  223. package/packages/agentsam-workbench/src/agent/index.ts +3 -0
  224. package/packages/agentsam-workbench/src/index.ts +4 -0
  225. package/packages/agentsam-workbench/src/manufacturing/PreflightIndicator.tsx +203 -0
  226. package/packages/agentsam-workbench/src/manufacturing/index.ts +2 -0
  227. package/packages/agentsam-workbench/src/manufacturing/loading.ts +147 -0
  228. package/packages/agentsam-workbench/src/widgets/BuiltinWidget.tsx +22 -0
  229. package/packages/agentsam-workbench/src/widgets/CountdownWidget.tsx +68 -0
  230. package/packages/agentsam-workbench/src/widgets/WidgetFrame.tsx +56 -0
  231. package/packages/agentsam-workbench/src/widgets/countdown.ts +25 -0
  232. package/packages/agentsam-workbench/src/widgets/index.ts +6 -0
  233. package/packages/agentsam-workbench/src/widgets/registry.ts +13 -0
  234. package/packages/agentsam-workbench/src/widgets/useCountdown.ts +128 -0
  235. package/packages/agentsam-workbench/src/widgets/widgets.css +102 -0
  236. package/packages/connectors/{cloudflare → cfoa}/package.json +3 -3
  237. package/packages/heuristic-theme/package.json +1 -1
  238. package/packages/identity/README.md +3 -0
  239. package/packages/identity/backend/README.md +3 -0
  240. package/packages/identity/package.json +2 -2
  241. package/packages/identity/src/frontend/auth-portal/README.md +3 -0
  242. package/packages/identity/src/index.js +1 -1
  243. package/packages/identity/src/oauth/README.md +4 -1
  244. package/packages/identity/src/oauth/credentials.js +1 -1
  245. package/packages/identity/src/server/worker-router.js +1 -1
  246. package/packages/identity/tests/google-desktop-identity-login.test.mjs +1 -1
  247. package/packages/identity/tests/lane1-packed-consumer.test.mjs +1 -1
  248. package/packages/identity/tests/oauth-presets-accounts-ssot.test.mjs +1 -1
  249. package/packages/providers/completeful/package.json +1 -1
  250. package/packages/theme-church-site/package.json +2 -2
  251. package/packages/theme-companions-site/package.json +2 -2
  252. package/packages/theme-floors-site/package.json +2 -2
  253. package/packages/theme-fuelnfree-site/package.json +2 -2
  254. package/packages/theme-handyman-site/package.json +2 -2
  255. package/packages/theme-insurance-site/package.json +2 -2
  256. package/packages/theme-scenes/package.json +1 -1
  257. package/packages/theme-shinshu-site/package.json +2 -2
  258. package/packages/work-graph/package.json +1 -1
  259. package/protocol/apps/agentsam.app.v1.schema.json +1 -1
  260. package/protocol/apps/agentsam.host-install.v1.schema.json +1 -1
  261. package/protocol/assets/asset-record.v1.schema.json +1 -1
  262. package/protocol/brand/brandpack.v1.schema.json +1 -1
  263. package/protocol/capabilities/capability-manifest.schema.json +1 -1
  264. package/protocol/capabilities/knowledge-search-input.schema.json +1 -0
  265. package/protocol/credentials/issue.v1.schema.json +1 -1
  266. package/protocol/database/agentsam.schema-pack.v1.schema.json +1 -1
  267. package/protocol/database/connection.v1.schema.json +1 -1
  268. package/protocol/embeddings/embedding-profile.v1.schema.json +1 -1
  269. package/protocol/errors/README.md +36 -0
  270. package/protocol/errors/agentsam.error.v2.schema.json +821 -0
  271. package/protocol/errors/error-catalog.json +3506 -158
  272. package/protocol/errors/error-envelope.schema.json +195 -52
  273. package/protocol/errors/recovery.v1.schema.json +1 -1
  274. package/protocol/features/agentsam.feature.v1.schema.json +1 -1
  275. package/protocol/hooks/README.md +18 -0
  276. package/protocol/hooks/agentsam.hook.output.v1.schema.json +27 -0
  277. package/protocol/hooks/agentsam.hook.receipt.v1.schema.json +61 -0
  278. package/protocol/hooks/agentsam.hook.v1.schema.json +35 -0
  279. package/protocol/hooks/agentsam.hooks.config.v1.schema.json +78 -0
  280. package/protocol/local-engine/benchmark.v1.schema.json +1 -1
  281. package/protocol/local-engine/engine.v1.schema.json +1 -1
  282. package/protocol/models/README.md +3 -0
  283. package/protocol/models/model-inventory-v2.schema.json +1 -1
  284. package/protocol/models/provider-model-snapshot.v1.schema.json +22 -0
  285. package/protocol/receipts/agentsam.receipt.v1.json +95 -0
  286. package/protocol/rpc/v1/errors.proto +1 -0
  287. package/protocol/runtime/agentsam.runtime.v1.schema.json +1 -1
  288. package/protocol/runtime/workspace-fs.v1.schema.json +1 -1
  289. package/protocol/sam/activity.v1.schema.json +1 -1
  290. package/protocol/sam/answer.v1.schema.json +1 -1
  291. package/protocol/sam/calibration.v1.schema.json +1 -1
  292. package/protocol/sam/decision-receipt.v1.schema.json +1 -1
  293. package/protocol/sam/evaluation.v1.schema.json +1 -1
  294. package/protocol/sam/operation.schema.json +1 -1
  295. package/protocol/sam/outcome.v1.schema.json +1 -1
  296. package/protocol/sam/question.v1.schema.json +1 -1
  297. package/protocol/sam/result.schema.json +1 -1
  298. package/protocol/sam/state.v1.schema.json +1 -1
  299. package/protocol/scoring/scorecard.v1.schema.json +1 -1
  300. package/protocol/skills/agentsam.interaction.v1.schema.json +1 -1
  301. package/protocol/skills/agentsam.skill.v1.schema.json +1 -1
  302. package/protocol/theme-refinery/product-metadata.schema.json +1 -1
  303. package/protocol/theme-refinery/receipts/products-registry-batch-20260924.json +6 -6
  304. package/protocol/theme-refinery/receipts/theme-harvest-20260924.json +6 -6
  305. package/protocol/theme-refinery/reconciliation-receipt.schema.json +1 -1
  306. package/protocol/ui/icon.v1.schema.json +1 -1
  307. package/python/README.md +20 -0
  308. package/python/agentsam_sdk/errors/__init__.py +4 -0
  309. package/python/agentsam_sdk/errors/vocabulary.py +2730 -0
  310. package/python/agentsam_sdk/hooks/__init__.py +32 -0
  311. package/python/agentsam_sdk/hooks/adapters.py +132 -0
  312. package/python/agentsam_sdk/hooks/contracts.py +121 -0
  313. package/python/agentsam_sdk/hooks/runtime.py +253 -0
  314. package/python/tests/test_hooks.py +115 -0
  315. package/skills/README.md +3 -0
  316. package/src/acp/agent-executor.js +106 -0
  317. package/src/acp/client.js +316 -0
  318. package/src/acp/dependencies.js +426 -0
  319. package/src/acp/http.js +207 -0
  320. package/src/acp/index.js +22 -0
  321. package/src/acp/runs.js +125 -0
  322. package/src/acp/runtime-selection.js +180 -0
  323. package/src/agent/responses-runner.js +145 -1
  324. package/src/cli/command-catalog.js +4 -0
  325. package/src/cli.js +33 -0
  326. package/src/commands/cheat-sheet.js +1 -0
  327. package/src/commands/cloudflare-login.js +1 -1
  328. package/src/commands/cloudflare.js +2 -2
  329. package/src/commands/connections.js +1 -1
  330. package/src/commands/go.js +76 -6
  331. package/src/commands/hooks.js +260 -0
  332. package/src/commands/merch.js +5 -0
  333. package/src/commands/mini.js +1 -1
  334. package/src/commands/models.js +1 -1
  335. package/src/commands/receipts.js +140 -0
  336. package/src/commands/run.js +253 -0
  337. package/src/commands/shell.js +114 -9
  338. package/src/errors/diagnostic.js +9 -9
  339. package/src/go/container.js +1 -1
  340. package/src/go/contract.js +61 -18
  341. package/src/go/discover.js +0 -4
  342. package/src/go/index.js +13 -1
  343. package/src/go/probe.js +109 -0
  344. package/src/go/{cloudflare.js → providers/cloudflare.js} +36 -136
  345. package/src/go/verify.js +1 -1
  346. package/src/index.js +32 -0
  347. package/src/indexing/ingest/inventory.js +1 -1
  348. package/src/knowledge/service/grpc-codec.js +2 -0
  349. package/src/lib/deploy/local-studio.js +2 -2
  350. package/src/lib/mini/scaffold.js +1 -1
  351. package/src/lib/slash-commands.js +1 -0
  352. package/src/lib/whoami-capabilities.js +1 -1
  353. package/src/local/runtime-store.js +54 -0
  354. package/src/mcp/cloudflare-bundles.js +1 -1
  355. package/src/models/catalog.js +0 -49
  356. package/src/models/inventory-core.js +69 -0
  357. package/src/plugins/index.js +9 -1
  358. package/src/plugins/registry.js +115 -6
  359. package/src/receipts/contract.js +68 -0
  360. package/src/receipts/index.js +20 -0
  361. package/src/receipts/prune.js +64 -0
  362. package/src/receipts/sinks.js +285 -0
  363. package/src/rpc/generated/errors_pb.js +49 -1
  364. package/src/tools/runtime.js +13 -5
  365. package/templates/mini/gadget/app.js +15 -40
  366. package/templates/mini/gadget/index.html +7 -7
  367. package/templates/mini/shared/style.css +1 -1
  368. /package/packages/connectors/{cloudflare → cfoa}/OAUTH_STORAGE_AUDIT.md +0 -0
  369. /package/packages/connectors/{cloudflare → cfoa}/src/api-client.js +0 -0
  370. /package/packages/connectors/{cloudflare → cfoa}/src/capabilities.js +0 -0
  371. /package/packages/connectors/{cloudflare → cfoa}/src/credential.js +0 -0
  372. /package/packages/connectors/{cloudflare → cfoa}/src/families/brand-protection.js +0 -0
  373. /package/packages/connectors/{cloudflare → cfoa}/src/families/keyless.js +0 -0
  374. /package/packages/connectors/{cloudflare → cfoa}/src/families/pages.js +0 -0
  375. /package/packages/connectors/{cloudflare → cfoa}/src/families/scanner.js +0 -0
  376. /package/packages/connectors/{cloudflare → cfoa}/src/families/snippets.js +0 -0
  377. /package/packages/connectors/{cloudflare → cfoa}/src/families/tag-gateway.js +0 -0
  378. /package/packages/connectors/{cloudflare → cfoa}/src/families/tags.js +0 -0
  379. /package/packages/connectors/{cloudflare → cfoa}/src/families/token-validation.js +0 -0
  380. /package/packages/connectors/{cloudflare → cfoa}/src/families/vectorize.js +0 -0
  381. /package/packages/connectors/{cloudflare → cfoa}/src/families/workflows.js +0 -0
  382. /package/packages/connectors/{cloudflare → cfoa}/src/index.js +0 -0
  383. /package/packages/connectors/{cloudflare → cfoa}/src/oauth-persist.js +0 -0
  384. /package/packages/connectors/{cloudflare → cfoa}/src/owner.js +0 -0
  385. /package/packages/connectors/{cloudflare → cfoa}/src/permission-options.js +0 -0
  386. /package/packages/connectors/{cloudflare → cfoa}/src/routes.js +0 -0
  387. /package/packages/connectors/{cloudflare → cfoa}/src/scope-catalog.js +0 -0
  388. /package/packages/connectors/{cloudflare → cfoa}/src/vault.js +0 -0
  389. /package/packages/connectors/{cloudflare → cfoa}/tests/capabilities.test.mjs +0 -0
  390. /package/packages/connectors/{cloudflare → cfoa}/tests/connector.test.mjs +0 -0
  391. /package/packages/connectors/{cloudflare → cfoa}/tests/oauth-persist.test.mjs +0 -0
  392. /package/packages/identity/src/oauth/{google-desktop-exchange.js → goaude.js} +0 -0
@@ -0,0 +1,221 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.inneranimalmedia.com/agentsam/schemas/agentsam.manufacturing-profile.v1.json",
4
+ "title": "AgentSam Manufacturing Profile",
5
+ "type": "object",
6
+ "required": [
7
+ "id",
8
+ "manufacturer",
9
+ "process"
10
+ ],
11
+ "properties": {
12
+ "schemaVersion": {
13
+ "const": "agentsam.manufacturing-profile.v1"
14
+ },
15
+ "id": {
16
+ "type": "string",
17
+ "minLength": 1
18
+ },
19
+ "manufacturer": {
20
+ "type": "string",
21
+ "minLength": 1
22
+ },
23
+ "process": {
24
+ "type": "string",
25
+ "minLength": 1
26
+ },
27
+ "format": {
28
+ "type": "string"
29
+ },
30
+ "preferredFormat": {
31
+ "type": "string"
32
+ },
33
+ "colorSpace": {
34
+ "type": [
35
+ "string",
36
+ "null"
37
+ ]
38
+ },
39
+ "colorMode": {
40
+ "type": [
41
+ "string",
42
+ "null"
43
+ ]
44
+ },
45
+ "alpha": {
46
+ "type": "boolean"
47
+ },
48
+ "requireAlpha": {
49
+ "type": "boolean"
50
+ },
51
+ "ppi": {
52
+ "type": [
53
+ "number",
54
+ "null"
55
+ ],
56
+ "exclusiveMinimum": 0
57
+ },
58
+ "maxBytes": {
59
+ "type": [
60
+ "number",
61
+ "null"
62
+ ],
63
+ "exclusiveMinimum": 0
64
+ },
65
+ "preferredPrintWidthIn": {
66
+ "type": [
67
+ "number",
68
+ "null"
69
+ ],
70
+ "exclusiveMinimum": 0
71
+ },
72
+ "preferredPrintHeightIn": {
73
+ "type": [
74
+ "number",
75
+ "null"
76
+ ],
77
+ "exclusiveMinimum": 0
78
+ },
79
+ "allowRaster": {
80
+ "type": "boolean"
81
+ },
82
+ "allowVector": {
83
+ "type": "boolean"
84
+ },
85
+ "allowGradients": {
86
+ "type": "boolean"
87
+ },
88
+ "requireClosedPaths": {
89
+ "type": "boolean"
90
+ },
91
+ "outlineText": {
92
+ "type": "boolean"
93
+ },
94
+ "match": {
95
+ "type": [
96
+ "object",
97
+ "null"
98
+ ]
99
+ },
100
+ "handoff": {
101
+ "type": [
102
+ "object",
103
+ "null"
104
+ ]
105
+ },
106
+ "source": {
107
+ "type": [
108
+ "object",
109
+ "null"
110
+ ],
111
+ "properties": {
112
+ "kind": {
113
+ "type": "string"
114
+ },
115
+ "verified": {
116
+ "type": "boolean"
117
+ }
118
+ },
119
+ "additionalProperties": true
120
+ },
121
+ "resolution": {
122
+ "type": [
123
+ "object",
124
+ "null"
125
+ ],
126
+ "properties": {
127
+ "readyPpi": {
128
+ "type": [
129
+ "number",
130
+ "null"
131
+ ],
132
+ "exclusiveMinimum": 0
133
+ },
134
+ "minimumPpi": {
135
+ "type": [
136
+ "number",
137
+ "null"
138
+ ],
139
+ "exclusiveMinimum": 0
140
+ }
141
+ },
142
+ "additionalProperties": false
143
+ },
144
+ "autoNormalize": {
145
+ "type": [
146
+ "object",
147
+ "null"
148
+ ],
149
+ "properties": {
150
+ "trimAlpha": {
151
+ "type": "boolean"
152
+ },
153
+ "colorSpace": {
154
+ "type": "boolean"
155
+ },
156
+ "svgOptimize": {
157
+ "type": "boolean"
158
+ },
159
+ "outlineText": {
160
+ "type": "boolean"
161
+ }
162
+ },
163
+ "additionalProperties": false
164
+ },
165
+ "vectorization": {
166
+ "type": [
167
+ "object",
168
+ "null"
169
+ ],
170
+ "properties": {
171
+ "enabled": {
172
+ "type": "boolean"
173
+ },
174
+ "preferredTracer": {
175
+ "type": [
176
+ "string",
177
+ "null"
178
+ ]
179
+ },
180
+ "maxAspectDrift": {
181
+ "type": [
182
+ "number",
183
+ "null"
184
+ ],
185
+ "exclusiveMinimum": 0
186
+ },
187
+ "minBoundaryIntegrity": {
188
+ "type": [
189
+ "number",
190
+ "null"
191
+ ],
192
+ "minimum": 0,
193
+ "maximum": 1
194
+ },
195
+ "outputFormat": {
196
+ "type": [
197
+ "string",
198
+ "null"
199
+ ]
200
+ }
201
+ },
202
+ "additionalProperties": true
203
+ },
204
+ "requireViewBox": {
205
+ "type": "boolean"
206
+ }
207
+ },
208
+ "anyOf": [
209
+ {
210
+ "required": [
211
+ "format"
212
+ ]
213
+ },
214
+ {
215
+ "required": [
216
+ "preferredFormat"
217
+ ]
218
+ }
219
+ ],
220
+ "additionalProperties": true
221
+ }
@@ -0,0 +1,50 @@
1
+ function lower(value) {
2
+ return value == null ? null : String(value).trim().toLowerCase();
3
+ }
4
+
5
+ function toInches(value, unit) {
6
+ const number = Number(value);
7
+ if (!Number.isFinite(number) || number <= 0) return null;
8
+ const normalized = String(unit || "IN").trim().toUpperCase();
9
+ if (normalized === "IN" || normalized === "INCH" || normalized === "INCHES") {
10
+ return number;
11
+ }
12
+ if (normalized === "CM") return number / 2.54;
13
+ if (normalized === "MM") return number / 25.4;
14
+ return null;
15
+ }
16
+
17
+ function physicalTarget(location = {}) {
18
+ const unit = location.unit || location.file_unit || location.fileUnit || "IN";
19
+ return {
20
+ printWidthIn: toInches(location.file_width || location.fileWidth, unit),
21
+ printHeightIn: toInches(location.file_height || location.fileHeight, unit),
22
+ providerDpi: Number(location.dpi || 0) || null,
23
+ providerUnit: String(unit).toUpperCase(),
24
+ };
25
+ }
26
+
27
+ /**
28
+ * Translate Completeful catalog metadata into provider-neutral profile context.
29
+ * No manufacturing requirement lives in this adapter.
30
+ */
31
+ export function completefulProfileContext(product = {}, location = {}) {
32
+ const target = physicalTarget(location);
33
+ return Object.freeze({
34
+ manufacturer: "completeful",
35
+ process: lower(product.print_type || product.printType),
36
+ productType: lower(product.product_type || product.productType),
37
+ locationName: lower(location.name),
38
+ ...target,
39
+ providerProductId:
40
+ product.completeful_product_id ||
41
+ product.catalog_product_id ||
42
+ product.id ||
43
+ null,
44
+ providerLocationId: location.print_location_id || location.id || null,
45
+ });
46
+ }
47
+
48
+ export function completefulTarget(location = {}) {
49
+ return Object.freeze(physicalTarget(location));
50
+ }
@@ -0,0 +1,93 @@
1
+ import { readFile, readdir } from "node:fs/promises";
2
+ import { dirname, join, resolve } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ import {
5
+ buildMerchPlan,
6
+ createManufacturingProfileRegistry,
7
+ } from "./index.js";
8
+
9
+ const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..");
10
+
11
+ export async function readBundledProfiles(root = packageRoot) {
12
+ const profiles = [];
13
+ const base = join(root, "profiles");
14
+ for (const manufacturer of await readdir(base, { withFileTypes: true })) {
15
+ if (!manufacturer.isDirectory()) continue;
16
+ const dir = join(base, manufacturer.name);
17
+ for (const entry of await readdir(dir, { withFileTypes: true })) {
18
+ if (!entry.isFile() || !entry.name.endsWith(".json")) continue;
19
+ profiles.push(JSON.parse(await readFile(join(dir, entry.name), "utf8")));
20
+ }
21
+ }
22
+ return profiles;
23
+ }
24
+
25
+ export function merchStatusLabel(status) {
26
+ return {
27
+ ready: "READY",
28
+ ready_with_warning: "READY / WARNING",
29
+ ready_with_transform: "READY / TRANSFORM",
30
+ needs_variant: "NEEDS VARIANT",
31
+ prepared_for_digitization: "PREPARED FOR DIGITIZATION",
32
+ unsupported: "UNSUPPORTED",
33
+ }[status] || String(status).toUpperCase();
34
+ }
35
+
36
+ export async function runMerchCli(
37
+ argv = [],
38
+ { write = (value) => process.stdout.write(value), profileRoot = packageRoot } = {},
39
+ ) {
40
+ const args = [...argv];
41
+ if (args[0] === "merch") args.shift();
42
+ const command = args.shift();
43
+ const registry = createManufacturingProfileRegistry(
44
+ await readBundledProfiles(profileRoot),
45
+ );
46
+
47
+ if (command === "profiles") {
48
+ const rows = registry.list();
49
+ for (const profile of rows) {
50
+ write(
51
+ `${profile.id}\t${profile.manufacturer}\t${profile.process}\t${profile.format}\n`,
52
+ );
53
+ }
54
+ return { command, profiles: rows };
55
+ }
56
+
57
+ if (command !== "build") {
58
+ const error = new Error(
59
+ "Usage: agentsam merch build <manifest.json> [--all-compatible]\n" +
60
+ " agentsam merch profiles",
61
+ );
62
+ error.code = "AGENTSAM_MERCH_USAGE";
63
+ throw error;
64
+ }
65
+
66
+ const manifestPath = args.find((arg) => !arg.startsWith("--"));
67
+ if (!manifestPath) {
68
+ const error = new Error("agentsam merch build requires a manifest JSON path");
69
+ error.code = "AGENTSAM_MERCH_MANIFEST_REQUIRED";
70
+ throw error;
71
+ }
72
+
73
+ const manifest = JSON.parse(await readFile(resolve(manifestPath), "utf8"));
74
+ const plan = buildMerchPlan({ ...manifest, registry });
75
+
76
+ write(`Design: ${plan.design.id || plan.design.name || "unnamed"}\n\n`);
77
+ write("Compatible products\n");
78
+ for (const target of plan.targets) {
79
+ const compatibility = target.derivatives?.manufacturing?.compatibility;
80
+ const notes = [];
81
+ if (compatibility?.requirementsVerified === false) notes.push("PROFILE UNVERIFIED");
82
+ if (compatibility?.issues?.[0]?.message) {
83
+ notes.push(compatibility.issues[0].message);
84
+ }
85
+ write(
86
+ `${String(target.name || target.id).padEnd(30)} ${merchStatusLabel(
87
+ target.status,
88
+ )}${notes.length ? ` · ${notes.join(" · ")}` : ""}\n`,
89
+ );
90
+ }
91
+
92
+ return { command, manifestPath: resolve(manifestPath), plan };
93
+ }
@@ -0,0 +1,60 @@
1
+ export const COLLECTION_CANDIDATE_STATE = Object.freeze({
2
+ CONCEPT: "concept",
3
+ APPROVED_ART: "approved-art",
4
+ PRODUCTION_READY: "production-ready",
5
+ SAMPLE_ORDERED: "sample-ordered",
6
+ SAMPLE_APPROVED: "sample-approved",
7
+ PUBLISHED: "published",
8
+ RETIRED: "retired",
9
+ });
10
+
11
+ const transitions = Object.freeze({
12
+ "concept": ["approved-art", "retired"],
13
+ "approved-art": ["production-ready", "concept", "retired"],
14
+ "production-ready": ["sample-ordered", "approved-art", "retired"],
15
+ "sample-ordered": ["sample-approved", "production-ready", "retired"],
16
+ "sample-approved": ["published", "production-ready", "retired"],
17
+ "published": ["retired"],
18
+ "retired": [],
19
+ });
20
+
21
+ export function canTransitionCollectionCandidate(from, to) {
22
+ return (transitions[from] || []).includes(to);
23
+ }
24
+
25
+ export function createCollectionCandidate(input = {}) {
26
+ if (!input.id) throw new TypeError("candidate id is required");
27
+ if (!input.designId) throw new TypeError("candidate designId is required");
28
+
29
+ return Object.freeze({
30
+ id: String(input.id),
31
+ designId: String(input.designId),
32
+ collectionPath: Object.freeze([...(input.collectionPath || [])]),
33
+ state: input.state || COLLECTION_CANDIDATE_STATE.CONCEPT,
34
+ products: Object.freeze([...(input.products || [])]),
35
+ approvals: Object.freeze({
36
+ artwork: Boolean(input.approvals?.artwork),
37
+ wording: Boolean(input.approvals?.wording),
38
+ palette: Boolean(input.approvals?.palette),
39
+ visualIdentity: Boolean(input.approvals?.visualIdentity),
40
+ }),
41
+ metadata: Object.freeze({ ...(input.metadata || {}) }),
42
+ });
43
+ }
44
+
45
+ export function transitionCollectionCandidate(candidate, nextState) {
46
+ if (!canTransitionCollectionCandidate(candidate.state, nextState)) {
47
+ throw new Error(`Invalid collection candidate transition: ${candidate.state} -> ${nextState}`);
48
+ }
49
+ return Object.freeze({ ...candidate, state: nextState });
50
+ }
51
+
52
+ export function approvalsComplete(candidate) {
53
+ const approvals = candidate.approvals || {};
54
+ return Boolean(
55
+ approvals.artwork &&
56
+ approvals.wording &&
57
+ approvals.palette &&
58
+ approvals.visualIdentity
59
+ );
60
+ }