@inneranimalmedia/agentsam-sdk 2.6.10 → 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 (261) hide show
  1. package/README.md +3 -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 +2 -2
  10. package/apps/client-cms-editor/frontend/package.json +3 -3
  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 +1 -1
  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/content-studio/REVISION_GATE_2026-09-27.md +1 -1
  24. package/docs/engineering/go-portability/01-product-project-deployment-authority.md +69 -0
  25. package/docs/engineering/provider-internal-renames/01-lane-initialization.md +20 -0
  26. package/docs/engineering/provider-internal-renames/01a-runtime-environment-contract.md +115 -0
  27. package/docs/engineering/provider-internal-renames/02-cfoa.md +57 -0
  28. package/docs/engineering/provider-internal-renames/03-gclioa.md +32 -0
  29. package/docs/engineering/provider-internal-renames/04-goaude.md +50 -0
  30. package/docs/engineering/provider-internal-renames/05-gdrv.md +33 -0
  31. package/docs/engineering/provider-internal-renames/06-verification.md +103 -0
  32. package/docs/engineering/provider-internal-renames/README.md +77 -0
  33. package/docs/engineering/provider-internal-renames/runtime-environment-contract.json +220 -0
  34. package/docs/engineering/test-diagnostics/go-cli-test-hang-20261003.md +49 -0
  35. package/docs/engineering/test-diagnostics/go-skip-deploy-docker-fix.md +90 -0
  36. package/docs/knowledge-service-verification.md +3 -3
  37. package/docs/plans/AGENTSAM-SUSPEND-QUEUE-KNOWLEDGE-RDP-2026-10-03.md +870 -0
  38. package/docs/plans/LOCAL-STUDIO-GRADUATION-2026-09-26.md +9 -9
  39. package/docs/plans/MACHINE-FIRST-APPS-TUI-2026-09-24.md +11 -11
  40. package/docs/plans/RECONCILIATION-2026-09-19.md +6 -6
  41. package/docs/plans/SAM_WORK_PROTOCOL.md +667 -0
  42. package/docs/plans/TOMORROW-EXTENSIVE-TODO-2026-09-26.md +2 -2
  43. package/docs/plans/UNIVERSAL-INGEST-MACHINE-FIRST-2026-09-24.md +3 -3
  44. package/examples/hyperspace-demo/src/main.tsx +227 -110
  45. package/migrations/d1/0020_agentsam_receipt_catalog.sql +35 -0
  46. package/migrations/runtime/0006_agent_run_suspend_activity.sql +53 -0
  47. package/migrations/runtime/0007_queue_control.sql +40 -0
  48. package/migrations/runtime/0008_agent_run_dependencies.sql +24 -0
  49. package/migrations/runtime/0008_analytics_legacy_bootstrap.sql +43 -0
  50. package/migrations/runtime/0009_analytics_authority.sql +108 -0
  51. package/package.json +26 -11
  52. package/packages/agentsam-brand/README.md +3 -0
  53. package/packages/agentsam-brand/package.json +2 -2
  54. package/packages/agentsam-contracts/dist/adapter.d.ts +22 -0
  55. package/packages/agentsam-contracts/dist/adapter.js +0 -0
  56. package/packages/agentsam-contracts/dist/agent.d.ts +66 -0
  57. package/packages/agentsam-contracts/dist/agent.js +15 -0
  58. package/packages/agentsam-contracts/dist/artifacts.d.ts +70 -0
  59. package/packages/agentsam-contracts/dist/artifacts.js +0 -0
  60. package/packages/agentsam-contracts/dist/authority.d.ts +21 -0
  61. package/packages/agentsam-contracts/dist/authority.js +0 -0
  62. package/packages/agentsam-contracts/dist/context.d.ts +14 -0
  63. package/packages/agentsam-contracts/dist/context.js +0 -0
  64. package/packages/agentsam-contracts/dist/errors.d.ts +121 -0
  65. package/packages/agentsam-contracts/dist/errors.js +5 -0
  66. package/packages/agentsam-contracts/dist/events.d.ts +53 -0
  67. package/packages/agentsam-contracts/dist/events.js +0 -0
  68. package/packages/agentsam-contracts/dist/execution.d.ts +38 -0
  69. package/packages/agentsam-contracts/dist/execution.js +0 -0
  70. package/packages/agentsam-contracts/dist/hooks.d.ts +31 -0
  71. package/packages/agentsam-contracts/dist/hooks.js +0 -0
  72. package/packages/agentsam-contracts/dist/identity.d.ts +15 -0
  73. package/packages/agentsam-contracts/dist/identity.js +0 -0
  74. package/packages/agentsam-contracts/dist/index.d.ts +16 -0
  75. package/packages/agentsam-contracts/dist/index.js +164 -0
  76. package/packages/agentsam-contracts/dist/models.d.ts +9 -0
  77. package/packages/agentsam-contracts/dist/models.js +0 -0
  78. package/packages/agentsam-contracts/dist/providers.d.ts +27 -0
  79. package/packages/agentsam-contracts/dist/providers.js +0 -0
  80. package/packages/agentsam-contracts/dist/repository.d.ts +56 -0
  81. package/packages/agentsam-contracts/dist/repository.js +15 -0
  82. package/packages/agentsam-contracts/dist/run.d.ts +113 -0
  83. package/packages/agentsam-contracts/dist/run.js +132 -0
  84. package/packages/agentsam-contracts/dist/tools.d.ts +82 -0
  85. package/packages/agentsam-contracts/dist/tools.js +0 -0
  86. package/packages/agentsam-contracts/dist/widgets.d.ts +38 -0
  87. package/packages/agentsam-contracts/dist/widgets.js +0 -0
  88. package/packages/agentsam-contracts/package.json +9 -1
  89. package/packages/agentsam-contracts/scripts/build.mjs +1 -1
  90. package/packages/agentsam-contracts/src/agent.ts +78 -3
  91. package/packages/agentsam-contracts/src/index.ts +2 -0
  92. package/packages/agentsam-contracts/src/run.ts +320 -0
  93. package/packages/agentsam-contracts/src/widgets.ts +58 -0
  94. package/packages/agentsam-contracts/test/contracts.test.mjs +1 -1
  95. package/packages/agentsam-contracts/test/run-contract.test.mjs +94 -0
  96. package/packages/agentsam-errors/package.json +1 -1
  97. package/packages/agentsam-goap/README.md +3 -0
  98. package/packages/agentsam-goap/package.json +2 -2
  99. package/packages/agentsam-hooks/package.json +2 -2
  100. package/packages/agentsam-hooks/src/adapters/agents.js +48 -22
  101. package/packages/agentsam-hooks/src/index.d.ts +16 -0
  102. package/packages/agentsam-knowledge/package.json +1 -1
  103. package/packages/agentsam-knowledge/src/backends/index.js +1 -1
  104. package/packages/agentsam-merch/README.md +62 -0
  105. package/packages/agentsam-merch/bin/agentsam-merch.mjs +16 -0
  106. package/packages/agentsam-merch/package.json +65 -0
  107. package/packages/agentsam-merch/profiles/completeful/dtg-back-large.json +42 -0
  108. package/packages/agentsam-merch/profiles/completeful/laser-engraving.json +39 -0
  109. package/packages/agentsam-merch/profiles/generic/embroidery-digitization.json +22 -0
  110. package/packages/agentsam-merch/schemas/collection-candidate.schema.json +66 -0
  111. package/packages/agentsam-merch/schemas/manufacturing-profile.schema.json +221 -0
  112. package/packages/agentsam-merch/src/adapters-completeful.js +50 -0
  113. package/packages/agentsam-merch/src/cli.js +93 -0
  114. package/packages/agentsam-merch/src/collection-lab.js +60 -0
  115. package/packages/agentsam-merch/src/compatibility.js +501 -0
  116. package/packages/agentsam-merch/src/derivatives.js +112 -0
  117. package/packages/agentsam-merch/src/index.d.ts +316 -0
  118. package/packages/agentsam-merch/src/index.js +46 -0
  119. package/packages/agentsam-merch/src/node/index.d.ts +58 -0
  120. package/packages/agentsam-merch/src/node/index.js +6 -0
  121. package/packages/agentsam-merch/src/node/raster.js +142 -0
  122. package/packages/agentsam-merch/src/node/vector.js +239 -0
  123. package/packages/agentsam-merch/src/product-concepts.js +118 -0
  124. package/packages/agentsam-merch/src/profile-registry.js +104 -0
  125. package/packages/agentsam-merch/src/profile.js +158 -0
  126. package/packages/agentsam-merch/src/transforms.js +215 -0
  127. package/packages/agentsam-merch/test/merch.test.mjs +332 -0
  128. package/packages/agentsam-merch/test/node-transforms.test.mjs +149 -0
  129. package/packages/agentsam-nav/dist/browser.global.js +71 -34
  130. package/packages/agentsam-nav/dist/browser.js +3179 -781
  131. package/packages/agentsam-nav/dist/index.js +3171 -773
  132. package/packages/agentsam-nav/package.json +1 -1
  133. package/packages/agentsam-queue-control/README.md +4 -1
  134. package/packages/agentsam-queue-control/package.json +4 -3
  135. package/packages/agentsam-queue-control/schemas/job-envelope.schema.json +111 -11
  136. package/packages/agentsam-queue-control/src/adapters/cloudflare.js +34 -6
  137. package/packages/agentsam-queue-control/src/adapters/memory.js +11 -2
  138. package/packages/agentsam-queue-control/src/adapters/sqlite.js +259 -0
  139. package/packages/agentsam-queue-control/src/contracts.js +207 -3
  140. package/packages/agentsam-queue-control/src/control-plane.js +62 -2
  141. package/packages/agentsam-queue-control/src/index.js +1 -0
  142. package/packages/agentsam-queue-control/test/queue-control.test.mjs +310 -0
  143. package/packages/agentsam-queue-control/test/sqlite-adapter.test.mjs +91 -0
  144. package/packages/agentsam-rapid-rust/README.md +3 -0
  145. package/packages/agentsam-repository/README.md +3 -0
  146. package/packages/agentsam-repository/package.json +1 -1
  147. package/packages/agentsam-vault/package.json +1 -1
  148. package/packages/agentsam-workbench/README.md +43 -0
  149. package/packages/agentsam-workbench/package.json +13 -3
  150. package/packages/agentsam-workbench/src/agent/AgentConversationSurface.tsx +108 -0
  151. package/packages/agentsam-workbench/src/agent/AgentPanel.tsx +25 -8
  152. package/packages/agentsam-workbench/src/agent/AgentRuntimeField.tsx +152 -0
  153. package/packages/agentsam-workbench/src/agent/Composer.tsx +10 -1
  154. package/packages/agentsam-workbench/src/agent/RunMode.ts +26 -0
  155. package/packages/agentsam-workbench/src/agent/Thread.tsx +18 -3
  156. package/packages/agentsam-workbench/src/agent/index.ts +3 -0
  157. package/packages/agentsam-workbench/src/index.ts +4 -0
  158. package/packages/agentsam-workbench/src/manufacturing/PreflightIndicator.tsx +203 -0
  159. package/packages/agentsam-workbench/src/manufacturing/index.ts +2 -0
  160. package/packages/agentsam-workbench/src/manufacturing/loading.ts +147 -0
  161. package/packages/agentsam-workbench/src/widgets/BuiltinWidget.tsx +22 -0
  162. package/packages/agentsam-workbench/src/widgets/CountdownWidget.tsx +68 -0
  163. package/packages/agentsam-workbench/src/widgets/WidgetFrame.tsx +56 -0
  164. package/packages/agentsam-workbench/src/widgets/countdown.ts +25 -0
  165. package/packages/agentsam-workbench/src/widgets/index.ts +6 -0
  166. package/packages/agentsam-workbench/src/widgets/registry.ts +13 -0
  167. package/packages/agentsam-workbench/src/widgets/useCountdown.ts +128 -0
  168. package/packages/agentsam-workbench/src/widgets/widgets.css +102 -0
  169. package/packages/connectors/{cloudflare → cfoa}/package.json +3 -3
  170. package/packages/heuristic-theme/package.json +1 -1
  171. package/packages/identity/README.md +3 -0
  172. package/packages/identity/backend/README.md +3 -0
  173. package/packages/identity/package.json +1 -1
  174. package/packages/identity/src/frontend/auth-portal/README.md +3 -0
  175. package/packages/identity/src/index.js +1 -1
  176. package/packages/identity/src/oauth/README.md +4 -1
  177. package/packages/identity/src/oauth/credentials.js +1 -1
  178. package/packages/identity/src/server/worker-router.js +1 -1
  179. package/packages/identity/tests/google-desktop-identity-login.test.mjs +1 -1
  180. package/packages/identity/tests/lane1-packed-consumer.test.mjs +1 -1
  181. package/packages/identity/tests/oauth-presets-accounts-ssot.test.mjs +1 -1
  182. package/packages/providers/completeful/package.json +1 -1
  183. package/packages/theme-church-site/package.json +1 -1
  184. package/packages/theme-companions-site/package.json +1 -1
  185. package/packages/theme-floors-site/package.json +1 -1
  186. package/packages/theme-fuelnfree-site/package.json +1 -1
  187. package/packages/theme-handyman-site/package.json +1 -1
  188. package/packages/theme-insurance-site/package.json +1 -1
  189. package/packages/theme-scenes/package.json +1 -1
  190. package/packages/theme-shinshu-site/package.json +1 -1
  191. package/packages/work-graph/package.json +1 -1
  192. package/protocol/models/README.md +3 -0
  193. package/protocol/receipts/agentsam.receipt.v1.json +95 -0
  194. package/protocol/theme-refinery/receipts/products-registry-batch-20260924.json +6 -6
  195. package/protocol/theme-refinery/receipts/theme-harvest-20260924.json +6 -6
  196. package/skills/README.md +3 -0
  197. package/src/acp/agent-executor.js +106 -0
  198. package/src/acp/client.js +316 -0
  199. package/src/acp/dependencies.js +426 -0
  200. package/src/acp/http.js +207 -0
  201. package/src/acp/index.js +22 -0
  202. package/src/acp/runs.js +125 -0
  203. package/src/acp/runtime-selection.js +180 -0
  204. package/src/cli/command-catalog.js +3 -0
  205. package/src/cli.js +24 -0
  206. package/src/commands/cloudflare-login.js +1 -1
  207. package/src/commands/cloudflare.js +2 -2
  208. package/src/commands/connections.js +1 -1
  209. package/src/commands/go.js +76 -6
  210. package/src/commands/merch.js +5 -0
  211. package/src/commands/mini.js +1 -1
  212. package/src/commands/receipts.js +140 -0
  213. package/src/commands/run.js +253 -0
  214. package/src/go/container.js +1 -1
  215. package/src/go/contract.js +61 -18
  216. package/src/go/discover.js +0 -4
  217. package/src/go/index.js +13 -1
  218. package/src/go/probe.js +109 -0
  219. package/src/go/{cloudflare.js → providers/cloudflare.js} +36 -136
  220. package/src/go/verify.js +1 -1
  221. package/src/indexing/ingest/inventory.js +1 -1
  222. package/src/lib/deploy/local-studio.js +2 -2
  223. package/src/lib/mini/scaffold.js +1 -1
  224. package/src/lib/whoami-capabilities.js +1 -1
  225. package/src/local/runtime-store.js +8 -0
  226. package/src/mcp/cloudflare-bundles.js +1 -1
  227. package/src/plugins/index.js +1 -0
  228. package/src/plugins/registry.js +59 -6
  229. package/src/receipts/contract.js +68 -0
  230. package/src/receipts/index.js +20 -0
  231. package/src/receipts/prune.js +64 -0
  232. package/src/receipts/sinks.js +285 -0
  233. package/templates/mini/gadget/app.js +15 -40
  234. package/templates/mini/gadget/index.html +7 -7
  235. package/templates/mini/shared/style.css +1 -1
  236. package/packages/agentsam-repository/src/goap.js.bak-20260922011251 +0 -670
  237. /package/packages/connectors/{cloudflare → cfoa}/OAUTH_STORAGE_AUDIT.md +0 -0
  238. /package/packages/connectors/{cloudflare → cfoa}/src/api-client.js +0 -0
  239. /package/packages/connectors/{cloudflare → cfoa}/src/capabilities.js +0 -0
  240. /package/packages/connectors/{cloudflare → cfoa}/src/credential.js +0 -0
  241. /package/packages/connectors/{cloudflare → cfoa}/src/families/brand-protection.js +0 -0
  242. /package/packages/connectors/{cloudflare → cfoa}/src/families/keyless.js +0 -0
  243. /package/packages/connectors/{cloudflare → cfoa}/src/families/pages.js +0 -0
  244. /package/packages/connectors/{cloudflare → cfoa}/src/families/scanner.js +0 -0
  245. /package/packages/connectors/{cloudflare → cfoa}/src/families/snippets.js +0 -0
  246. /package/packages/connectors/{cloudflare → cfoa}/src/families/tag-gateway.js +0 -0
  247. /package/packages/connectors/{cloudflare → cfoa}/src/families/tags.js +0 -0
  248. /package/packages/connectors/{cloudflare → cfoa}/src/families/token-validation.js +0 -0
  249. /package/packages/connectors/{cloudflare → cfoa}/src/families/vectorize.js +0 -0
  250. /package/packages/connectors/{cloudflare → cfoa}/src/families/workflows.js +0 -0
  251. /package/packages/connectors/{cloudflare → cfoa}/src/index.js +0 -0
  252. /package/packages/connectors/{cloudflare → cfoa}/src/oauth-persist.js +0 -0
  253. /package/packages/connectors/{cloudflare → cfoa}/src/owner.js +0 -0
  254. /package/packages/connectors/{cloudflare → cfoa}/src/permission-options.js +0 -0
  255. /package/packages/connectors/{cloudflare → cfoa}/src/routes.js +0 -0
  256. /package/packages/connectors/{cloudflare → cfoa}/src/scope-catalog.js +0 -0
  257. /package/packages/connectors/{cloudflare → cfoa}/src/vault.js +0 -0
  258. /package/packages/connectors/{cloudflare → cfoa}/tests/capabilities.test.mjs +0 -0
  259. /package/packages/connectors/{cloudflare → cfoa}/tests/connector.test.mjs +0 -0
  260. /package/packages/connectors/{cloudflare → cfoa}/tests/oauth-persist.test.mjs +0 -0
  261. /package/packages/identity/src/oauth/{google-desktop-exchange.js → goaude.js} +0 -0
@@ -0,0 +1,62 @@
1
+ # @inneranimalmedia/agentsam-merch
2
+
3
+ Portable manufacturing preflight and merch planning for AgentSam applications.
4
+
5
+ The package separates manufacturing profile **data** from execution code, provider adapters from the media engine, preserved source masters from manufacturing/storefront derivatives, and deterministic preflight from human/process-specific handoffs.
6
+
7
+ ## Profile contract
8
+
9
+ Profiles are JSON under `profiles/<manufacturer>/`. Provider requirements do not belong in application conditionals.
10
+
11
+ The engine returns:
12
+
13
+ - `ready`
14
+ - `ready_with_transform`
15
+ - `needs_variant`
16
+ - `prepared_for_digitization`
17
+ - `unsupported`
18
+
19
+ A low-resolution raster is never called production-ready. An embroidery source is never represented as a finished stitch file.
20
+
21
+ ## Derivative authority
22
+
23
+ ```text
24
+ original/master
25
+ ├─ manufacturing
26
+ ├─ storefront/gallery
27
+ ├─ thumbnail
28
+ ├─ social
29
+ └─ mockup
30
+ ```
31
+
32
+ The manufacturing plan is marked `mustNotUseStorefrontDerivative`.
33
+
34
+ ## Collection Lab
35
+
36
+ Portable candidate states:
37
+
38
+ ```text
39
+ concept
40
+ approved-art
41
+ production-ready
42
+ sample-ordered
43
+ sample-approved
44
+ published
45
+ retired
46
+ ```
47
+
48
+ ## Provider adapters
49
+
50
+ Adapters only translate provider catalog metadata into a neutral selection context. The Completeful adapter knows field names such as `print_type` and `file_width`; manufacturing rules remain profile data.
51
+
52
+ ## CLI kernel
53
+
54
+ The standalone proof is:
55
+
56
+ ```text
57
+ agentsam-merch build <manifest.json> --all-compatible
58
+ ```
59
+
60
+ The distributed AgentSam CLI can delegate `agentsam merch build ...` to the same `buildMerchPlan()` kernel.
61
+
62
+ Seed Completeful profiles are marked `operator-defined` until verified against provider documentation.
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env node
2
+ import { pathToFileURL } from "node:url";
3
+ import { runMerchCli } from "../src/cli.js";
4
+
5
+ export { runMerchCli };
6
+
7
+ const isMain =
8
+ process.argv[1] &&
9
+ import.meta.url === pathToFileURL(process.argv[1]).href;
10
+
11
+ if (isMain) {
12
+ runMerchCli(process.argv.slice(2)).catch((error) => {
13
+ console.error(error?.message || String(error));
14
+ process.exitCode = 1;
15
+ });
16
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "@inneranimalmedia/agentsam-merch",
3
+ "version": "2.6.11",
4
+ "description": "Provider-neutral manufacturing profiles, preflight, derivative planning, and collection-lab primitives for AgentSam.",
5
+ "type": "module",
6
+ "files": [
7
+ "src",
8
+ "profiles",
9
+ "bin",
10
+ "README.md",
11
+ "schemas"
12
+ ],
13
+ "exports": {
14
+ ".": {
15
+ "types": "./src/index.d.ts",
16
+ "import": "./src/index.js"
17
+ },
18
+ "./profiles": "./src/profile.js",
19
+ "./registry": "./src/profile-registry.js",
20
+ "./compatibility": "./src/compatibility.js",
21
+ "./derivatives": "./src/derivatives.js",
22
+ "./collection-lab": "./src/collection-lab.js",
23
+ "./adapters/completeful": "./src/adapters-completeful.js",
24
+ "./profiles/*": "./profiles/*",
25
+ "./transforms": {
26
+ "types": "./src/index.d.ts",
27
+ "import": "./src/transforms.js"
28
+ },
29
+ "./node": {
30
+ "types": "./src/node/index.d.ts",
31
+ "import": "./src/node/index.js"
32
+ }
33
+ },
34
+ "bin": {
35
+ "agentsam-merch": "./bin/agentsam-merch.mjs"
36
+ },
37
+ "scripts": {
38
+ "test": "node --test test/*.test.mjs"
39
+ },
40
+ "engines": {
41
+ "node": ">=20"
42
+ },
43
+ "license": "MIT",
44
+ "types": "./src/index.d.ts",
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "git+https://github.com/SamPrimeaux/agentsam-sdk.git",
48
+ "directory": "packages/agentsam-merch"
49
+ },
50
+ "publishConfig": {
51
+ "access": "public"
52
+ },
53
+ "peerDependencies": {
54
+ "sharp": ">=0.33.0",
55
+ "svgo": ">=3.0.0"
56
+ },
57
+ "peerDependenciesMeta": {
58
+ "sharp": {
59
+ "optional": true
60
+ },
61
+ "svgo": {
62
+ "optional": true
63
+ }
64
+ }
65
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "schemaVersion": "agentsam.manufacturing-profile.v1",
3
+ "id": "completeful.dtg.back-large",
4
+ "manufacturer": "completeful",
5
+ "process": "dtg",
6
+ "format": "png",
7
+ "colorSpace": "srgb",
8
+ "alpha": true,
9
+ "ppi": 300,
10
+ "maxBytes": 20000000,
11
+ "preferredPrintWidthIn": 13,
12
+ "allowRaster": true,
13
+ "allowVector": false,
14
+ "match": {
15
+ "manufacturer": "completeful",
16
+ "process": "dtg",
17
+ "locationName": "back",
18
+ "minWidthIn": 10
19
+ },
20
+ "source": {
21
+ "kind": "provider-documentation",
22
+ "verified": true,
23
+ "verifiedAt": "2026-10-03",
24
+ "notes": [
25
+ "PNG recommended for transparent artwork",
26
+ "RGB/sRGB color mode",
27
+ "300 DPI minimum at final print size",
28
+ "20 MB PNG upload limit"
29
+ ]
30
+ },
31
+ "$schema": "https://schemas.inneranimalmedia.com/agentsam/schemas/agentsam.manufacturing-profile.v1.json",
32
+ "resolution": {
33
+ "readyPpi": 300,
34
+ "minimumPpi": 300
35
+ },
36
+ "autoNormalize": {
37
+ "trimAlpha": true,
38
+ "colorSpace": true,
39
+ "svgOptimize": false,
40
+ "outlineText": false
41
+ }
42
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "schemaVersion": "agentsam.manufacturing-profile.v1",
3
+ "id": "completeful.laser-engraving",
4
+ "manufacturer": "completeful",
5
+ "process": "engraving",
6
+ "preferredFormat": "svg",
7
+ "colorMode": "monochrome",
8
+ "allowRaster": false,
9
+ "allowVector": true,
10
+ "allowGradients": false,
11
+ "requireClosedPaths": true,
12
+ "outlineText": true,
13
+ "match": {
14
+ "manufacturer": "completeful",
15
+ "process": [
16
+ "engraving",
17
+ "etching"
18
+ ]
19
+ },
20
+ "source": {
21
+ "kind": "operator-defined",
22
+ "verified": false
23
+ },
24
+ "$schema": "https://schemas.inneranimalmedia.com/agentsam/schemas/agentsam.manufacturing-profile.v1.json",
25
+ "requireViewBox": true,
26
+ "autoNormalize": {
27
+ "trimAlpha": false,
28
+ "colorSpace": false,
29
+ "svgOptimize": true,
30
+ "outlineText": true
31
+ },
32
+ "vectorization": {
33
+ "enabled": true,
34
+ "preferredTracer": "auto",
35
+ "maxAspectDrift": 0.02,
36
+ "minBoundaryIntegrity": 0.98,
37
+ "outputFormat": "svg"
38
+ }
39
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "schemaVersion": "agentsam.manufacturing-profile.v1",
3
+ "id": "generic.embroidery.pre-digitization",
4
+ "manufacturer": "generic",
5
+ "process": "embroidery",
6
+ "preferredFormat": "svg",
7
+ "colorMode": "spot",
8
+ "allowRaster": false,
9
+ "allowVector": true,
10
+ "allowGradients": false,
11
+ "requireClosedPaths": true,
12
+ "outlineText": true,
13
+ "handoff": {
14
+ "status": "prepared_for_digitization",
15
+ "reason": "Stitch direction, density, underlay, pull compensation, thread sequencing, and machine format require embroidery-specific digitization."
16
+ },
17
+ "source": {
18
+ "kind": "process-safety-default",
19
+ "verified": true
20
+ },
21
+ "$schema": "https://schemas.inneranimalmedia.com/agentsam/schemas/agentsam.manufacturing-profile.v1.json"
22
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.inneranimalmedia.com/agentsam/schemas/agentsam.collection-candidate.v1.json",
4
+ "title": "AgentSam Collection Lab Candidate",
5
+ "type": "object",
6
+ "required": [
7
+ "id",
8
+ "designId",
9
+ "state"
10
+ ],
11
+ "properties": {
12
+ "id": {
13
+ "type": "string",
14
+ "minLength": 1
15
+ },
16
+ "designId": {
17
+ "type": "string",
18
+ "minLength": 1
19
+ },
20
+ "collectionPath": {
21
+ "type": "array",
22
+ "items": {
23
+ "type": "string"
24
+ }
25
+ },
26
+ "state": {
27
+ "enum": [
28
+ "concept",
29
+ "approved-art",
30
+ "production-ready",
31
+ "sample-ordered",
32
+ "sample-approved",
33
+ "published",
34
+ "retired"
35
+ ]
36
+ },
37
+ "products": {
38
+ "type": "array",
39
+ "items": {
40
+ "type": "object"
41
+ }
42
+ },
43
+ "approvals": {
44
+ "type": "object",
45
+ "properties": {
46
+ "artwork": {
47
+ "type": "boolean"
48
+ },
49
+ "wording": {
50
+ "type": "boolean"
51
+ },
52
+ "palette": {
53
+ "type": "boolean"
54
+ },
55
+ "visualIdentity": {
56
+ "type": "boolean"
57
+ }
58
+ },
59
+ "additionalProperties": false
60
+ },
61
+ "metadata": {
62
+ "type": "object"
63
+ }
64
+ },
65
+ "additionalProperties": true
66
+ }
@@ -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
+ }