@inneranimalmedia/agentsam-sdk 2.6.12 → 2.6.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTSAM.md +32 -0
- package/DEVELOPMENT.md +69 -74
- package/README.md +11 -0
- package/apps/cad-creator/README.md +12 -0
- package/apps/cad-creator/shared/cad/package.json +1 -1
- package/apps/cad-creator/shared/cad/src/domain/project-contract.js +2 -75
- package/apps/cad-creator/shared/cad/src/domain/project-tools.js +2 -24
- package/apps/cad-creator/shared/cad/src/types.ts +2 -2
- package/apps/client-cms-editor/backend/package.json +2 -2
- package/apps/client-cms-editor/frontend/package.json +3 -3
- package/apps/client-cms-editor/frontend/src/adapters/http.ts +25 -13
- package/apps/client-cms-editor/frontend/src/editor/CmsEditor.tsx +7 -4
- package/apps/client-cms-editor/frontend/src/editor/canvas/PreviewCanvas.tsx +31 -3
- package/apps/client-cms-editor/frontend/src/editor/host-preview.test.tsx +104 -0
- package/apps/client-cms-editor/package-lock.json +8 -8
- package/apps/client-cms-editor/package.json +2 -1
- package/apps/client-cms-editor/shared/cms/package.json +1 -1
- package/docs/AUTORAG.md +2 -0
- package/docs/CAPABILITIES.md +28 -0
- package/docs/adr/ADR-0003-copro-clean-room-product-architecture.md +6 -0
- package/docs/architecture/AGENTSAM-CANONICAL-DISCOVERY-FIRST-SLICE.md +70 -0
- package/docs/architecture/AGENTSAM-REGISTRY-CLI-AGENT-PARITY.md +133 -0
- package/docs/architecture/AGENTSAM_APPLICATION_CONTRACT.md +6 -0
- package/docs/architecture/CAD_OPERATOR_CAPABILITIES.md +64 -0
- package/docs/architecture/CAD_ROBOTICS_RELEASE_LEDGER_20261016.md +43 -0
- package/docs/architecture/CAD_RUN_MODES.md +34 -0
- package/docs/architecture/CLI-BOOT-REMOTE-DB-READINESS-20261015.md +65 -0
- package/docs/architecture/EXISTING-MCP-D1-AGENT-BRIDGE.md +47 -0
- package/docs/architecture/PLAN-PORTABILITY-SAM-FIRST-SPRINT-20261015.md +36 -0
- package/docs/architecture/PLUGIN-PRODUCTIZATION-SPINE.md +101 -0
- package/docs/architecture/SAMOS_PRODUCT_MODEL.md +49 -0
- package/docs/architecture/SAM_KERNEL.md +40 -0
- package/docs/architecture/SAM_RESOURCE_CRUD_STANDARD.md +96 -0
- package/docs/architecture/SAM_SYSTEMATIC_AUTONOMOUS_MACHINERY.md +79 -0
- package/docs/architecture/USER_GLOBAL_AGENT_INSTRUCTIONS.md +55 -0
- package/docs/autorag-workflow.md +13 -0
- package/docs/brand/AGENT_SAM_ICON_GRAMMAR.md +4 -0
- package/docs/contracts/capability-install-planner.md +66 -38
- package/docs/contracts/environment-vocabulary.md +5 -5
- package/docs/engineering/SUPERBASH_LOCAL_RUNTIME.md +100 -0
- package/docs/generated/SDK_CAPABILITY_INVENTORY.md +313 -0
- package/docs/handoffs/AGENT_HANDOFF_SUPERBASH_AND_MODEL_PERFORMANCE_2026-10-14.md +134 -0
- package/docs/intake/product-capabilities.proposed.ts +232 -0
- package/docs/knowledge-supabase-node-api.md +51 -0
- package/docs/plans/MEDIA_TRUTH_SOURCE_RECOVERY_20261008.md +31 -0
- package/docs/plans/OFFLINE_CLI_KNOWLEDGE_AGENT_HANDOFF.md +104 -0
- package/docs/plans/OFFLINE_CLI_KNOWLEDGE_RUNBOOK.md +81 -0
- package/docs/plans/SAM_EXPERIENCE_AGENT_DISPATCH_2026-10-15.md +107 -0
- package/docs/plans/SAM_MACHINERY_TO_EXPERIENCE_2026-10-15.md +172 -0
- package/docs/plans/UI_POLISH_DESKTOP_2026-10-16.md +102 -0
- package/docs/plans/WORK-UX-REMASTER-2026-10-15.md +48 -0
- package/docs/plans/WORK-WORKSPACE-PLAN-2026-10-14.md +212 -0
- package/docs/product/AGENTSAM-UI-QUALITY-GATE.md +148 -0
- package/docs/product/AGENTSAM_PRODUCT_EXPERIENCE_STANDARD.md +2 -0
- package/docs/product/MEDIA-PRODUCTION-FAMILY.md +47 -0
- package/docs/product/OFFER-PORTFOLIO.md +14 -0
- package/docs/product/PACKAGE-TAXONOMY.md +17 -0
- package/docs/product/PLUGIN-GALLERY-DISCOVERY-AND-INSTALL.md +97 -0
- package/docs/product/README.md +2 -0
- package/docs/product/WIDGET-GALLERY-PHASE-ONE.md +43 -0
- package/docs/reference/AGENTSAM-CLI-WORKFLOWS.md +73 -0
- package/docs/reference/AGENTSAM-ERROR-REASONS.md +267 -0
- package/docs/reference/AGENTSAM-REGISTRY.generated.md +288 -0
- package/docs/reference/INNERANIMALMEDIA_EXPERIENCE_ACCEPTANCE_2026-10-15.md +99 -0
- package/docs/releases/cad-v2-sdk-2.6.13.md +25 -0
- package/docs/roadmaps/ROAD_TO_REAL_DISTRIBUTION.md +97 -0
- package/docs/robotics-chess-handoff.md +15 -0
- package/docs/standards/DELIVERY_CLOSURE.md +33 -0
- package/docs/standards/SAM_MACHINE_BUILD_AND_GAPS.md +91 -0
- package/docs/workflows/ISSUE_TO_SAMOS.md +59 -0
- package/package.json +60 -8
- package/packages/agentsam-brand/package.json +1 -1
- package/packages/agentsam-cms/README.md +56 -0
- package/packages/agentsam-cms/agentsam.package.json +46 -0
- package/packages/agentsam-cms/package.json +36 -0
- package/packages/agentsam-cms/src/aliases.js +74 -0
- package/packages/agentsam-cms/src/contracts.js +105 -0
- package/packages/agentsam-cms/src/index.d.ts +80 -0
- package/packages/agentsam-cms/src/index.js +3 -0
- package/packages/agentsam-cms/src/machine.js +221 -0
- package/packages/agentsam-cms/src/node-sqlite-repository.js +148 -0
- package/packages/agentsam-cms/src/node.d.ts +7 -0
- package/packages/agentsam-cms/src/node.js +1 -0
- package/packages/agentsam-cms/src/schema/cms-local-runtime.v1.sql +365 -0
- package/packages/agentsam-cms/test/standalone.test.mjs +28 -0
- package/packages/agentsam-contracts/agentsam.package.json +43 -0
- package/packages/agentsam-contracts/dist/errors.d.ts +1 -1
- package/packages/agentsam-contracts/dist/widgets.d.ts +7 -0
- package/packages/agentsam-contracts/package.json +1 -1
- package/packages/agentsam-contracts/src/errors.ts +1 -1
- package/packages/agentsam-contracts/src/widgets.ts +7 -0
- package/packages/agentsam-desktop-shell/README.md +38 -0
- package/packages/agentsam-desktop-shell/scripts/app-discovery.mjs +43 -0
- package/packages/agentsam-errors/README.md +14 -0
- package/packages/agentsam-errors/agentsam.package.json +43 -0
- package/packages/agentsam-errors/package.json +1 -1
- package/packages/agentsam-errors/protocol/error-catalog.json +12 -0
- package/packages/agentsam-errors/src/cli.js +56 -0
- package/packages/agentsam-errors/src/index.js +2 -0
- package/packages/agentsam-errors/src/vocabulary.js +2 -0
- package/packages/agentsam-errors/test/approval-contract.test.mjs +12 -0
- package/packages/agentsam-errors/types/index.d.ts +5 -1
- package/packages/agentsam-goap/agentsam.package.json +42 -0
- package/packages/agentsam-goap/package.json +2 -2
- package/packages/agentsam-hooks/agentsam.package.json +45 -0
- package/packages/agentsam-hooks/bindings/go/errors_generated.go +1 -0
- package/packages/agentsam-hooks/bindings/rust/src/errors_generated.rs +1 -0
- package/packages/agentsam-hooks/package.json +1 -1
- package/packages/agentsam-hooks/src/errors-generated.js +10 -0
- package/packages/agentsam-ide/README.md +59 -0
- package/packages/agentsam-ide/src/lsp/host.d.mts +13 -0
- package/packages/agentsam-ide/src/lsp/host.mjs +133 -0
- package/packages/agentsam-knowledge/agentsam.package.json +42 -0
- package/packages/agentsam-knowledge/package.json +1 -1
- package/packages/agentsam-knowledge/src/autorag/index.js +25 -4
- package/packages/agentsam-knowledge/src/backends/index.js +21 -1
- package/packages/agentsam-knowledge/src/backends/supabase-node-api.js +91 -0
- package/packages/agentsam-knowledge/test/autorag.test.mjs +13 -0
- package/packages/agentsam-knowledge/test/supabase-node-api.test.mjs +59 -0
- package/packages/agentsam-merch/agentsam.package.json +43 -0
- package/packages/agentsam-merch/package.json +1 -1
- package/packages/agentsam-nav/dist/browser.global.js +18 -21
- package/packages/agentsam-nav/dist/browser.js +4 -3
- package/packages/agentsam-nav/dist/index.js +4 -3
- package/packages/agentsam-nav/package.json +1 -1
- package/packages/agentsam-queue-control/agentsam.package.json +42 -0
- package/packages/agentsam-queue-control/package.json +1 -1
- package/packages/agentsam-rapid-rust/Cargo.toml +5 -0
- package/packages/agentsam-rapid-rust/agentsam.package.json +42 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/0b22ca9c5f8cddc15e6816df4a2467a28d41aa174361cdfed9019ee4e04dfbb8.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/0c5064875a5d7645013880f04d71f56c0dfa1bc87ac9fd59adc3e9a93a2745da.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/11ebd15702c169ee0666656be851cc549f70f84498dbca3c5b72d2ceaa91c851.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/1d7f2c8ad9588cd2077a1d07fce156e0bd47be686d8c9f26885bab14874c4ab5.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/1f21ba21e7b631b0d4893cbdd7a6bb7345d34e8b1a0ee9cf644cc30aeb3c8b8d.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/23f4d4b90def0782de32e7a57558cba24525f12ba3c009728ea4881259a74099.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/26b60985b6ef62e4f20e06c37e47c6996c1a2f457335fa9eb4a68d1288e18490.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/2b27d15a1b8c3637a56f631d583cc9ba584bed2b7018dd962a9340d5e1c50a1d.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/3110a5568a544c4c38de6585dcdabc21fa5f54a5772ecf4e1f4076ee0d49e933.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/357ce3db8299e01866bf4fc3d8ee1c784ef53c7455cf86bb17c52f3dad20d050.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/4516c6e03636538cacc7a6e4063d98a7ed2f0090c3a02c5ee817f1c512b1070e.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/649e02dbaec2edabbd40372e0c5f72f114164fe7704e7825220b1955f6a7c74e.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/81c266d4c150a4f6c5a73c9c4fef6541577fd0acd8c1f911f02781deb5f0be0f.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/86b4b8de30eed9902750b3de9fb54276d229244671a8b6035345bbe705463d82.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/8a877fdc5dbc6a66c344b4ebc4d9b746d47f95153e98872210becd85ca941ddd.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/96a11200f7b42ddd1281e4f749e88dcb8455ab0e3883f943934e0a9a7935147a.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/9e2df2335cfc73ec021bdd6b2d34af798f6ed9c52e3061ce16b6ceabae4e275f.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/a405fe3addeaab2908ed58836997be3b679d990ec9102d06bece3569e4bd4a81.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/a63915da0a45f86a5938ba9a2b2e87d469e7d07f7ea9cc531136fdc9e055557e.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/a8452c2dcaa959ced25e3597931b311999c0aa5b257ca8610fe415e8cfa598cc.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/b35fc2ae65ea07fbbfdd242a3d76489947462399e7a2db91f8545ca50d97d86f.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/b966932defe9c7b5ec9599c9276d333bd09ad1605adae80300d825d2161ad20c.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/ca9060e5ccb91f3a2663f57afd47a25099b6b3313c2a7436c4634993ff6e9afc.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/d0eba82a259be203c68c3ebf6d5b8a376f31a3b84fad418fdb9b5e2715c59869.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/d8838513009c65079aba67314ab130920484c674c5f0b8a356c8777eb6174eb2.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/dda01925b7f0a213215b983979ce23625dd0f6cfdb49c483ec1ff73e64def56f.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/e4956d8f97608f8324607b22cc93635d8183b23021d79cb4c21668c8b8a6ce87.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/e80c1e517e7173dcbde78869d2bf67a24a11b0bb9df5a87fb12934e39497abc8.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/eeeaa9394ac979eb4ffa557e97d67ed96dbd61437e09058f7c776bdc0483f050.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/f9264d8d7d1ccfb415362a28b4a1b4fa0dfbdf828ff970d1aaecfb0ebe208978.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/f957a80b89d32af4f33f9f840b4795af1b5145fc44780ad88a6a3b1b3a7ea3bc.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2b0d196f16961f88/asset-manifest.json +418 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2b0d196f16961f88/findings.json +308 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2b0d196f16961f88/frontend-manifest.json +70 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2b0d196f16961f88/graph.json +322 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2b0d196f16961f88/inventory.json +932 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2b0d196f16961f88/summary.json +21 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2d70e3d4fe8290fb/asset-manifest.json +418 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2d70e3d4fe8290fb/findings.json +308 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2d70e3d4fe8290fb/frontend-manifest.json +70 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2d70e3d4fe8290fb/graph.json +322 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2d70e3d4fe8290fb/inventory.json +932 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2d70e3d4fe8290fb/summary.json +21 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_63fab76b2f18c2f0/asset-manifest.json +418 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_63fab76b2f18c2f0/findings.json +308 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_63fab76b2f18c2f0/frontend-manifest.json +70 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_63fab76b2f18c2f0/graph.json +322 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_63fab76b2f18c2f0/inventory.json +932 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_63fab76b2f18c2f0/summary.json +21 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_72fe856b80b0c46f/asset-manifest.json +418 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_72fe856b80b0c46f/findings.json +300 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_72fe856b80b0c46f/frontend-manifest.json +70 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_72fe856b80b0c46f/graph.json +322 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_72fe856b80b0c46f/inventory.json +932 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_72fe856b80b0c46f/summary.json +21 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_a5834156504f3050/asset-manifest.json +418 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_a5834156504f3050/findings.json +308 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_a5834156504f3050/frontend-manifest.json +70 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_a5834156504f3050/graph.json +322 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_a5834156504f3050/inventory.json +932 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_a5834156504f3050/summary.json +21 -0
- package/packages/agentsam-repository/README.md +25 -0
- package/packages/agentsam-repository/agentsam.package.json +42 -0
- package/packages/agentsam-repository/package.json +6 -3
- package/packages/agentsam-repository/src/crawl.js +220 -0
- package/packages/agentsam-repository/src/index.js +3 -0
- package/packages/agentsam-repository/src/merkle/semantic.js +20 -0
- package/packages/agentsam-repository/src/refinery.js +96 -0
- package/packages/agentsam-repository/test/crawl-refinery.test.mjs +113 -0
- package/packages/agentsam-site-scrape/README.md +357 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/__init__.py +4 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/__main__.py +349 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/classify.py +80 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/config.py +83 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/contract.py +108 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/crawl.py +395 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/evidence.py +226 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/htmlparse.py +109 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/imageops.py +121 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/jsonrun.py +127 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/net.py +121 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/pageextract.py +202 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/r2_upload.py +140 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/ssrf.py +57 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/storage.py +57 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/wrangler_bucket.py +98 -0
- package/packages/agentsam-site-scrape/pyproject.toml +21 -0
- package/packages/agentsam-site-scrape/runtime/client.mjs +32 -0
- package/packages/agentsam-site-scrape/runtime/core.mjs +211 -0
- package/packages/agentsam-site-scrape/runtime/index.mjs +31 -0
- package/packages/agentsam-site-scrape/runtime/knowledge.mjs +38 -0
- package/packages/agentsam-site-scrape/runtime/node-runner.mjs +231 -0
- package/packages/agentsam-site-scrape/runtime/node-storage.mjs +146 -0
- package/packages/agentsam-site-scrape/runtime/project-site.mjs +74 -0
- package/packages/agentsam-site-scrape/runtime/secure-fetch.mjs +88 -0
- package/packages/agentsam-site-scrape/runtime/test/knowledge-handoff.test.mjs +51 -0
- package/packages/agentsam-site-scrape/runtime/test/project-index-command.test.mjs +109 -0
- package/packages/agentsam-site-scrape/runtime/test/runtime.test.mjs +145 -0
- package/packages/agentsam-site-scrape/tests/__init__.py +0 -0
- package/packages/agentsam-site-scrape/tests/test_contract.py +83 -0
- package/packages/agentsam-site-scrape/tests/test_core.py +119 -0
- package/packages/agentsam-site-scrape/tests/test_evidence.py +88 -0
- package/packages/agentsam-site-scrape/tests/test_evidence_pipeline.py +112 -0
- package/packages/agentsam-site-scrape/tests/test_jsonrun.py +63 -0
- package/packages/agentsam-site-scrape/tests/test_redirects.py +68 -0
- package/packages/agentsam-site-scrape/tests/test_storage.py +34 -0
- package/packages/agentsam-site-scrape/worker/index.mjs +259 -0
- package/packages/agentsam-site-scrape/worker/project-config.mjs +57 -0
- package/packages/agentsam-site-scrape/worker/test/worker.test.mjs +191 -0
- package/packages/agentsam-vault/package.json +1 -1
- package/packages/agentsam-workbench/README.md +18 -0
- package/packages/agentsam-workbench/package.json +13 -4
- package/packages/agentsam-workbench/src/agent/capability-catalog.ts +96 -0
- package/packages/agentsam-workbench/src/agent/index.ts +2 -0
- package/packages/agentsam-workbench/src/knowledge/AutoRagWorkflowDialog.tsx +166 -0
- package/packages/agentsam-workbench/src/knowledge/README.md +14 -0
- package/packages/agentsam-workbench/src/knowledge/autorag-workflow.css +6 -0
- package/packages/agentsam-workbench/src/knowledge/index.ts +2 -0
- package/packages/agentsam-workbench/src/widgets/registry.ts +266 -1
- package/packages/catalog/README.md +69 -0
- package/packages/catalog/assist/questions.json +205 -0
- package/packages/catalog/assist/rules.json +149 -0
- package/packages/catalog/doctor/toolchains.json +12 -0
- package/packages/catalog/evidence/agentsam-abs.json +76 -0
- package/packages/catalog/evidence/agentsam-analytics.json +59 -0
- package/packages/catalog/evidence/agentsam-assets-core.json +38 -0
- package/packages/catalog/evidence/agentsam-brand.json +73 -0
- package/packages/catalog/evidence/agentsam-browser-surface.json +42 -0
- package/packages/catalog/evidence/agentsam-campaign.json +48 -0
- package/packages/catalog/evidence/agentsam-cloudflare-images.json +38 -0
- package/packages/catalog/evidence/agentsam-content-studio.json +42 -0
- package/packages/catalog/evidence/agentsam-content.json +70 -0
- package/packages/catalog/evidence/agentsam-contracts.json +92 -0
- package/packages/catalog/evidence/agentsam-database-editor.json +82 -0
- package/packages/catalog/evidence/agentsam-desktop-shell.json +56 -0
- package/packages/catalog/evidence/agentsam-docs-theme.json +35 -0
- package/packages/catalog/evidence/agentsam-errors.json +42 -0
- package/packages/catalog/evidence/agentsam-goap.json +52 -0
- package/packages/catalog/evidence/agentsam-hooks.json +100 -0
- package/packages/catalog/evidence/agentsam-ide.json +64 -0
- package/packages/catalog/evidence/agentsam-identity.json +91 -0
- package/packages/catalog/evidence/agentsam-key-manager.json +46 -0
- package/packages/catalog/evidence/agentsam-knowledge.json +42 -0
- package/packages/catalog/evidence/agentsam-loading-scene.json +54 -0
- package/packages/catalog/evidence/agentsam-merch.json +68 -0
- package/packages/catalog/evidence/agentsam-nav.json +63 -0
- package/packages/catalog/evidence/agentsam-queue-control.json +60 -0
- package/packages/catalog/evidence/agentsam-rapid-rust.json +46 -0
- package/packages/catalog/evidence/agentsam-repository.json +56 -0
- package/packages/catalog/evidence/agentsam-scoring.json +39 -0
- package/packages/catalog/evidence/agentsam-sections.json +52 -0
- package/packages/catalog/evidence/agentsam-settings.json +58 -0
- package/packages/catalog/evidence/agentsam-shell-kit.json +56 -0
- package/packages/catalog/evidence/agentsam-vault.json +61 -0
- package/packages/catalog/evidence/agentsam-work-graph.json +51 -0
- package/packages/catalog/evidence/agentsam-work.json +64 -0
- package/packages/catalog/evidence/agentsam-workbench.json +96 -0
- package/packages/catalog/evidence/analytics-ui.json +43 -0
- package/packages/catalog/evidence/cms-runtime.json +49 -0
- package/packages/catalog/evidence/copro-editor.json +42 -0
- package/packages/catalog/evidence/copro-media.json +42 -0
- package/packages/catalog/evidence/copro-project.json +42 -0
- package/packages/catalog/evidence/copro-proof.json +48 -0
- package/packages/catalog/evidence/copro-provider-contracts.json +40 -0
- package/packages/catalog/evidence/copro-render.json +40 -0
- package/packages/catalog/evidence/copro-storage.json +44 -0
- package/packages/catalog/evidence/copro-templates.json +42 -0
- package/packages/catalog/evidence/copro-timeline.json +44 -0
- package/packages/catalog/evidence/copro-ui.json +52 -0
- package/packages/catalog/evidence/fnf-theme.json +34 -0
- package/packages/catalog/evidence/theme-contract.json +34 -0
- package/packages/catalog/evidence/theme-cypress.json +41 -0
- package/packages/catalog/evidence/theme-ember.json +41 -0
- package/packages/catalog/evidence/theme-forge.json +41 -0
- package/packages/catalog/evidence/theme-grove.json +41 -0
- package/packages/catalog/evidence/theme-harbor.json +41 -0
- package/packages/catalog/evidence/theme-heuristic.json +50 -0
- package/packages/catalog/evidence/theme-iasf.json +48 -0
- package/packages/catalog/evidence/theme-resolve.json +41 -0
- package/packages/catalog/evidence/theme-scenes.json +68 -0
- package/packages/catalog/evidence/theme-summit.json +41 -0
- package/packages/catalog/evidence/theme-violet.json +41 -0
- package/packages/catalog/generated/packages.json +2649 -0
- package/packages/catalog/topics/runtime.json +33 -0
- package/packages/connectors/cfoa/agentsam.package.json +46 -0
- package/packages/connectors/cfoa/package.json +1 -1
- package/packages/connectors/cfoa/src/capabilities.js +22 -2
- package/packages/connectors/cfoa/src/families/analytics-sql.js +44 -0
- package/packages/connectors/cfoa/src/families/basin.js +30 -0
- package/packages/connectors/cfoa/src/index.js +3 -0
- package/packages/connectors/cfoa/src/routes.js +11 -2
- package/packages/connectors/cfoa/test/analytics-sql.test.mjs +27 -0
- package/packages/connectors/cfoa/test/basin.test.mjs +30 -0
- package/packages/heuristic-theme/README.md +14 -0
- package/packages/heuristic-theme/agentsam.package.json +42 -0
- package/packages/heuristic-theme/contracts/README.md +15 -0
- package/packages/heuristic-theme/contracts/block.schema.json +33 -0
- package/packages/heuristic-theme/contracts/header-presets.json +20 -0
- package/packages/heuristic-theme/contracts/page.schema.json +18 -0
- package/packages/heuristic-theme/contracts/preset.schema.json +18 -0
- package/packages/heuristic-theme/contracts/section.schema.json +83 -0
- package/packages/heuristic-theme/package.json +13 -3
- package/packages/heuristic-theme/presets/fuel-free-time/assets.json +8 -0
- package/packages/heuristic-theme/presets/fuel-free-time/globals/shell.json +30 -0
- package/packages/heuristic-theme/presets/fuel-free-time/pages/about.json +4 -0
- package/packages/heuristic-theme/presets/fuel-free-time/pages/cart.json +4 -0
- package/packages/heuristic-theme/presets/fuel-free-time/pages/collection.json +4 -0
- package/packages/heuristic-theme/presets/fuel-free-time/pages/collections.json +4 -0
- package/packages/heuristic-theme/presets/fuel-free-time/pages/community.json +4 -0
- package/packages/heuristic-theme/presets/fuel-free-time/pages/home.json +92 -0
- package/packages/heuristic-theme/presets/fuel-free-time/pages/order-confirmation.json +39 -0
- package/packages/heuristic-theme/presets/fuel-free-time/pages/product.json +4 -0
- package/packages/heuristic-theme/presets/fuel-free-time/pages/shop.json +9 -0
- package/packages/heuristic-theme/presets/fuel-free-time/preset.json +23 -0
- package/packages/heuristic-theme/presets/fuel-free-time/tokens.json +23 -0
- package/packages/heuristic-theme/storefront/about.html +1103 -0
- package/packages/heuristic-theme/storefront/assets/presets/fuel-free-time/GENERATED-ASSETS.md +15 -0
- package/packages/heuristic-theme/storefront/assets/presets/fuel-free-time/earned-hours-hero.webp +0 -0
- package/packages/heuristic-theme/storefront/assets/presets/fuel-free-time/essentials.webp +0 -0
- package/packages/heuristic-theme/storefront/assets/presets/fuel-free-time/masters.webp +0 -0
- package/packages/heuristic-theme/storefront/cart.html +64 -0
- package/packages/heuristic-theme/storefront/collaborate.html +58 -0
- package/packages/heuristic-theme/storefront/collection.html +10 -0
- package/packages/heuristic-theme/storefront/collections.html +10 -0
- package/packages/heuristic-theme/storefront/community.html +921 -0
- package/packages/heuristic-theme/storefront/css/content-page.css +199 -0
- package/packages/heuristic-theme/storefront/css/global-footer.css +401 -0
- package/packages/heuristic-theme/storefront/css/heuristic-theme.css +81 -0
- package/packages/heuristic-theme/storefront/css/page-composer.css +76 -0
- package/packages/heuristic-theme/storefront/css/shop-hero.css +230 -0
- package/packages/heuristic-theme/storefront/css/store-cart.css +422 -0
- package/packages/heuristic-theme/storefront/css/store-collections.css +36 -0
- package/packages/heuristic-theme/storefront/css/store-pdp.css +459 -0
- package/packages/heuristic-theme/storefront/css/store-shell.css +474 -0
- package/packages/heuristic-theme/storefront/css/store-shop.css +117 -0
- package/packages/heuristic-theme/storefront/home.html +25 -0
- package/packages/heuristic-theme/storefront/js/cms-hydrate.js +395 -0
- package/packages/heuristic-theme/storefront/js/cms-structure.js +85 -0
- package/packages/heuristic-theme/storefront/js/fnf-attribution.js +98 -0
- package/packages/heuristic-theme/storefront/js/fnf-head.js +47 -0
- package/packages/heuristic-theme/storefront/js/fnf-newsletter.js +64 -0
- package/packages/heuristic-theme/storefront/js/global-footer.js +277 -0
- package/packages/heuristic-theme/storefront/js/heuristic-runtime.js +78 -0
- package/packages/heuristic-theme/storefront/js/order-confirmation.js +109 -0
- package/packages/heuristic-theme/storefront/js/page-composer.js +310 -0
- package/packages/heuristic-theme/storefront/js/shop-hero.js +85 -0
- package/packages/heuristic-theme/storefront/js/store-cart.js +276 -0
- package/packages/heuristic-theme/storefront/js/store-catalog.js +140 -0
- package/packages/heuristic-theme/storefront/js/store-collections.js +45 -0
- package/packages/heuristic-theme/storefront/js/store-product.js +287 -0
- package/packages/heuristic-theme/storefront/js/store-shell.js +449 -0
- package/packages/heuristic-theme/storefront/order-confirmation.html +30 -0
- package/packages/heuristic-theme/storefront/policies.html +43 -0
- package/packages/heuristic-theme/storefront/product.html +27 -0
- package/packages/heuristic-theme/storefront/shop.html +113 -0
- package/packages/heuristic-theme/storefront/terms.html +45 -0
- package/packages/heuristic-theme/test/commerce-portability.test.mjs +16 -0
- package/packages/heuristic-theme/theme.json +55 -0
- package/packages/heuristic-theme/theme.schema.json +32 -0
- package/packages/identity/agentsam.package.json +42 -0
- package/packages/identity/package.json +1 -1
- package/packages/identity/src/oauth/iam-platform.js +4 -2
- package/packages/identity/src/recovery/password-reset.js +8 -8
- package/packages/identity/src/server/worker-router.js +63 -1
- package/packages/identity/tests/lane1-packed-consumer.test.mjs +12 -1
- package/packages/identity/tests/password-enrollment.test.mjs +82 -0
- package/packages/identity/tests/password-reset.test.mjs +43 -0
- package/packages/providers/completeful/package.json +1 -1
- package/packages/theme-cypress/agentsam.package.json +42 -0
- package/packages/theme-cypress/package.json +1 -1
- package/packages/theme-ember/agentsam.package.json +42 -0
- package/packages/theme-ember/package.json +1 -1
- package/packages/theme-forge/agentsam.package.json +42 -0
- package/packages/theme-forge/package.json +1 -1
- package/packages/theme-grove/agentsam.package.json +42 -0
- package/packages/theme-grove/package.json +1 -1
- package/packages/theme-harbor/agentsam.package.json +42 -0
- package/packages/theme-harbor/package.json +1 -1
- package/packages/theme-resolve/agentsam.package.json +42 -0
- package/packages/theme-resolve/package.json +1 -1
- package/packages/theme-scenes/agentsam.package.json +42 -0
- package/packages/theme-scenes/package.json +1 -1
- package/packages/theme-summit/agentsam.package.json +42 -0
- package/packages/theme-summit/package.json +1 -1
- package/packages/theme-violet/agentsam.package.json +42 -0
- package/packages/theme-violet/package.json +1 -1
- package/packages/work-graph/agentsam.package.json +42 -0
- package/packages/work-graph/package.json +1 -1
- package/protocol/apps/agentsam.app.v1.schema.json +27 -1
- package/protocol/cad/README.md +77 -0
- package/protocol/cad/cad.project.v2.schema.json +451 -0
- package/protocol/cad/v2/core/artifact-receipt.schema.json +126 -0
- package/protocol/cad/v2/core/coordinate-system.schema.json +364 -0
- package/protocol/cad/v2/core/geometry-constraint.schema.json +136 -0
- package/protocol/cad/v2/core/geometry-entity.schema.json +73 -0
- package/protocol/cad/v2/core/geometry-feature.schema.json +115 -0
- package/protocol/cad/v2/core/geometry-relationship.schema.json +67 -0
- package/protocol/cad/v2/core/project-revision.schema.json +111 -0
- package/protocol/cad/v2/core/topology-reference.schema.json +80 -0
- package/protocol/cad/v2/intent/design-decision.schema.json +126 -0
- package/protocol/cad/v2/intent/design-option.schema.json +88 -0
- package/protocol/cad/v2/interchange/ifc-mapping.schema.json +145 -0
- package/protocol/cad/v2/interchange/native-document.schema.json +130 -0
- package/protocol/cad/v2/interchange/reference-model.schema.json +141 -0
- package/protocol/cad/v2/modules/architecture.v1.schema.json +278 -0
- package/protocol/cad/v2/modules/landscape.v1.schema.json +157 -0
- package/protocol/cad/v2/modules/mechanical.v1.schema.json +325 -0
- package/protocol/cad/v2/modules/parametric.v1.schema.json +89 -0
- package/protocol/cad/v2/modules/product-design.v1.schema.json +178 -0
- package/protocol/cad/v2/modules/robotics.v1.schema.json +246 -0
- package/protocol/cad/v2/presentation/camera-path.schema.json +143 -0
- package/protocol/cad/v2/presentation/drawing.schema.json +162 -0
- package/protocol/cad/v2/presentation/production.schema.json +166 -0
- package/protocol/cad/v2/presentation/scene.schema.json +198 -0
- package/protocol/cad/v2/presentation/sheet.schema.json +254 -0
- package/protocol/cad/v2/presentation/view.schema.json +190 -0
- package/protocol/cad/v2/presentation/walkthrough.schema.json +199 -0
- package/protocol/cad/v2/schema-pack.manifest.json +189 -0
- package/protocol/cad/v2/validation/deliverable-manifest.schema.json +199 -0
- package/protocol/cad/v2/validation/result.schema.json +141 -0
- package/protocol/capabilities/evidence-manifest.schema.json +404 -0
- package/protocol/capabilities/manifest.json +101 -10
- package/protocol/capabilities/repository-crawl-input.schema.json +17 -0
- package/protocol/capabilities/repository-crawl-result.schema.json +79 -0
- package/protocol/capabilities/repository-mine-input.schema.json +27 -0
- package/protocol/capabilities/repository-mine-result.schema.json +51 -0
- package/protocol/capabilities/site-index.schema.json +15 -0
- package/protocol/capabilities/site-scrape-evidence-manifest.schema.json +114 -0
- package/protocol/capabilities/site-scrape-input.schema.json +90 -0
- package/protocol/capabilities/site-scrape-project-authority.schema.json +15 -0
- package/protocol/capabilities/site-scrape-result.schema.json +198 -0
- package/protocol/capabilities/site-scrape-worker-job.schema.json +18 -0
- package/protocol/errors/error-catalog.json +12 -0
- package/protocol/governance/distribution-roadmap.v1.json +335 -0
- package/protocol/governance/github-labels.v1.json +232 -0
- package/protocol/models/workers-ai-curated.mjs +14 -0
- package/protocol/plugins/agentsam.plugin-evidence-bundle.v1.schema.json +55 -0
- package/protocol/plugins/agentsam.plugin-product.v1.schema.json +227 -0
- package/protocol/plugins/agentsam.plugin-quality-evidence.v1.schema.json +47 -0
- package/protocol/plugins/agentsam.plugin-quality-receipt.v1.schema.json +160 -0
- package/protocol/ui/agentsam.ui-quality.v1.schema.json +31 -0
- package/python/agentsam_sdk/__init__.py +4 -0
- package/python/agentsam_sdk/client.py +202 -0
- package/python/agentsam_sdk/errors/vocabulary.py +10 -0
- package/python/tests/test_public_client.py +82 -0
- package/services/cad/blender/adapter.py +0 -0
- package/services/cad/occt/CMakeLists.txt +43 -0
- package/services/cad/occt/README.md +38 -0
- package/services/cad/occt/main.cpp +95 -0
- package/services/cad/server.py +103 -21
- package/skills/README.md +6 -0
- package/skills/agentsam-cad/SKILL.md +59 -0
- package/skills/agentsam-plan-and-goap/SKILL.md +77 -0
- package/skills/agentsam-repo-recon/SKILL.md +63 -0
- package/skills/agentsam-sam-operations/SKILL.md +71 -0
- package/skills/agentsam-sdk-orientation/SKILL.md +75 -0
- package/skills/catalog.json +85 -0
- package/src/AgentSam.js +2 -0
- package/src/agent/capability-adapter.js +207 -9
- package/src/agent/index.js +1 -0
- package/src/agent/intent.js +12 -0
- package/src/agent/project-discovery.js +47 -0
- package/src/agent/project-resources.js +157 -0
- package/src/agent/responses-runner.js +64 -12
- package/src/capabilities/cloudflare-d1-provision.js +48 -0
- package/src/capabilities/knowledge-operations.js +87 -0
- package/src/capabilities/local-sqlite-resources.js +124 -0
- package/src/capabilities/machine-inspect.js +28 -0
- package/src/capabilities/mcp-d1-bridge.js +98 -0
- package/src/capabilities/plan-operation-ids.js +6 -0
- package/src/capabilities/plan-operations.js +85 -0
- package/src/capabilities/repository-awareness.js +52 -0
- package/src/capabilities/test-run.js +10 -0
- package/src/capabilities/workspace-files.js +125 -0
- package/src/cli/command-catalog.js +16 -3
- package/src/cli.js +71 -116
- package/src/commands/app.js +43 -44
- package/src/commands/autorag-node-api.js +96 -0
- package/src/commands/autorag.js +178 -17
- package/src/commands/catalog-doctor.js +52 -0
- package/src/commands/catalog.js +151 -0
- package/src/commands/cheat-sheet.js +92 -63
- package/src/commands/cloudflare.js +64 -2
- package/src/commands/codebaseindex.js +2 -2
- package/src/commands/db.js +17 -0
- package/src/commands/goap-world.js +4 -0
- package/src/commands/interactive.js +21 -1
- package/src/commands/knowledge.js +8 -3
- package/src/commands/machine-binary.js +3 -2
- package/src/commands/machine.js +66 -15
- package/src/commands/mcp.js +98 -8
- package/src/commands/plan-ledger.js +60 -22
- package/src/commands/plan.js +3 -3
- package/src/commands/plugins.js +34 -2
- package/src/commands/product.js +21 -0
- package/src/commands/rust.js +4 -1
- package/src/commands/sam-evidence.js +87 -0
- package/src/commands/sam-media.js +78 -0
- package/src/commands/sam.js +117 -0
- package/src/commands/shell.js +97 -8
- package/src/commands/site-scrape.js +9 -0
- package/src/context/resolve.js +5 -1
- package/src/index.js +13 -0
- package/src/knowledge/d1-schema.js +65 -0
- package/src/knowledge/engine.js +55 -15
- package/src/knowledge/source.js +8 -0
- package/src/knowledge/store-discovery.js +9 -3
- package/src/knowledge/stores/sqlite.js +8 -0
- package/src/knowledge/wrangler-binding-discovery.js +43 -0
- package/src/lib/agent-instructions.js +29 -5
- package/src/lib/auth.js +46 -7
- package/src/lib/cad/delivery-profiles.d.ts +7 -0
- package/src/lib/cad/delivery-profiles.js +122 -0
- package/src/lib/cad/docker-executor.js +1 -1
- package/src/lib/cad/editable-project-contract.js +75 -0
- package/src/lib/cad/index.js +6 -0
- package/src/lib/cad/occt-native-provider.mjs +138 -0
- package/src/lib/cad/openscad.js +13 -1
- package/src/lib/cad/production-operations.d.ts +8 -0
- package/src/lib/cad/production-operations.js +74 -0
- package/src/lib/cad/project-cli.d.ts +1 -1
- package/src/lib/cad/project-contract.js +1 -1
- package/src/lib/cad/project-runtime.d.ts +1 -1
- package/src/lib/cad/project-runtime.js +48 -3
- package/src/lib/cad/project-tools.js +24 -0
- package/src/lib/cad/project-v2.d.ts +48 -0
- package/src/lib/cad/project-v2.js +288 -0
- package/src/lib/cad-docker.js +48 -4
- package/src/lib/dockerize.js +3 -3
- package/src/lib/execution-approvals.js +29 -3
- package/src/local-fs/capability.js +5 -0
- package/src/local-lsp/host.js +2 -0
- package/src/local-pty/server.js +21 -0
- package/src/mcp/client.js +2 -1
- package/src/mcp/oauth-connection.js +109 -0
- package/src/models/inventory-core.js +2 -10
- package/src/plugins/index.js +13 -0
- package/src/plugins/productization.js +348 -0
- package/src/providers/gemini-generate-content.js +18 -0
- package/src/registry/generated/inventory.json +4266 -0
- package/src/registry/index.js +96 -0
- package/src/registry/turn-one.js +45 -0
- package/src/sam/adapters/local-media-store.js +71 -0
- package/src/sam/adapters/local-script-runtime.js +122 -0
- package/src/sam/adapters/local-script-store.js +103 -0
- package/src/sam/adapters/object-media-store.js +89 -0
- package/src/sam/adapters/workspace-media.js +78 -0
- package/src/sam/artifacts/render.js +94 -0
- package/src/sam/bridge/stdio.mjs +59 -0
- package/src/sam/client.js +269 -22
- package/src/sam/index.js +30 -1
- package/src/sam/local-execution.js +8 -0
- package/src/sam/media/environment.js +96 -0
- package/src/sam/model-adapter.js +45 -0
- package/src/sam/operation-packs/generated-v2/background.js +54 -0
- package/src/sam/operation-packs/generated-v2/catalog.js +1746 -0
- package/src/sam/operation-packs/generated-v2/generated-execution-policies.json +401 -0
- package/src/sam/operation-packs/generated-v2/generated-tool-descriptors.json +1352 -0
- package/src/sam/operation-packs/generated-v2/glb.js +41 -0
- package/src/sam/operation-packs/generated-v2/inneranimalmedia-provider.js +24 -0
- package/src/sam/operation-packs/generated-v2/operation-pack.js +126 -0
- package/src/sam/operation-packs/generated-v2/raster.js +140 -0
- package/src/sam/operation-packs/generated-v2/scripts.js +63 -0
- package/src/sam/operation-packs/generated-v2/sdk-adapter.js +9 -0
- package/src/sam/operation-packs/generated-v2/test/alias-runtime.test.mjs +51 -0
- package/src/sam/operation-packs/generated-v2/test/background.test.mjs +19 -0
- package/src/sam/operation-packs/generated-v2/test/glb.test.mjs +19 -0
- package/src/sam/operation-packs/generated-v2/test/raster.test.mjs +38 -0
- package/src/sam/operation-packs/generated-v2/test/real-asset-bindings.test.mjs +74 -0
- package/src/sam/operation-packs/generated-v2/test/registration.test.mjs +65 -0
- package/src/sam/operation-packs/generated-v2/test/scripts.test.mjs +32 -0
- package/src/sam/operation-packs/generated-v2/test/superbash-client-integration.test.mjs +215 -0
- package/src/sam/operation-packs/generated-v2/tool-types.d.ts +53 -0
- package/src/sam/operations/artifact-render.js +13 -0
- package/src/sam/operations/repository-inspect.js +12 -2
- package/src/sam/operations/robotics.js +45 -0
- package/src/sam/os.js +117 -0
- package/src/sam/packs/authoring/README.md +13 -0
- package/src/sam/packs/authoring/index.js +108 -0
- package/src/sam/packs/cad/http-ports.js +55 -0
- package/src/sam/packs/cad/index.js +158 -0
- package/src/sam/packs/cad/model-tools.js +22 -0
- package/src/sam/packs/cad/modes.js +87 -0
- package/src/sam/packs/cms/aliases.js +1 -0
- package/src/sam/packs/cms/contracts.js +1 -0
- package/src/sam/packs/cms/machine.js +6 -0
- package/src/sam/packs/cms/node.js +1 -0
- package/src/sam/packs/core.js +27 -0
- package/src/sam/packs/evidence/README.md +65 -0
- package/src/sam/packs/evidence/compare.js +98 -0
- package/src/sam/packs/evidence/contract.js +56 -0
- package/src/sam/packs/evidence/derive.js +59 -0
- package/src/sam/packs/evidence/driver-blender.js +96 -0
- package/src/sam/packs/evidence/driver-playwright.js +91 -0
- package/src/sam/packs/evidence/exporter-copro.js +70 -0
- package/src/sam/packs/evidence/facts.js +37 -0
- package/src/sam/packs/evidence/host-local.js +74 -0
- package/src/sam/packs/evidence/index.js +494 -0
- package/src/sam/packs/evidence/media.js +44 -0
- package/src/sam/packs/evidence/naming.js +67 -0
- package/src/sam/packs/evidence/normalize.js +117 -0
- package/src/sam/packs/evidence/review-page.js +102 -0
- package/src/sam/packs/evidence/screenplay.js +34 -0
- package/src/sam/packs/evidence/seal.js +55 -0
- package/src/sam/packs/evidence/serve.js +74 -0
- package/src/sam/packs/evidence/store.js +93 -0
- package/src/sam/packs/evidence/viewports.js +23 -0
- package/src/sam/robotics/chess-adapter.js +14 -0
- package/src/sam/robotics/franka.js +44 -0
- package/src/sam/robotics/index.js +4 -0
- package/src/sam/robotics/receipt.js +21 -0
- package/src/sam/robotics/world.js +57 -0
- package/src/sam/seed.js +10 -40
- package/src/sam/shell-host.js +120 -0
- package/src/sam/validation.js +40 -0
- package/src/security/local-vault.js +6 -1
- package/src/ui/cli/help.js +6 -0
- package/templates/clay/clay-blueprint-template.html +481 -0
- package/templates/clay/clay-case-study-blueprint.html +269 -0
- package/templates/clay/conversion-showcase-section.html +534 -0
- package/templates/clay/enhancing-conversion-section.html +141 -0
- package/templates/clay/nuant-wireframe.html +117 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** Structural GLB inspector. This does not replace Khronos glTF Validator. */
|
|
2
|
+
export function inspectGlb(input) {
|
|
3
|
+
const bytes = input instanceof Uint8Array ? input : new Uint8Array(input);
|
|
4
|
+
if (bytes.byteLength < 20) throw new Error('glb_too_small');
|
|
5
|
+
const d = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
6
|
+
if (d.getUint32(0, true) !== 0x46546c67) throw new Error('glb_bad_magic');
|
|
7
|
+
const version = d.getUint32(4, true);
|
|
8
|
+
if (version !== 2) throw new Error('glb_unsupported_version');
|
|
9
|
+
const declaredLength = d.getUint32(8, true);
|
|
10
|
+
if (declaredLength !== bytes.byteLength) throw new Error('glb_length_mismatch');
|
|
11
|
+
let offset = 12, json = null, binaryBytes = 0, chunks = 0;
|
|
12
|
+
while (offset < bytes.byteLength) {
|
|
13
|
+
if (offset + 8 > bytes.byteLength) throw new Error('glb_truncated_chunk_header');
|
|
14
|
+
const len = d.getUint32(offset, true), type = d.getUint32(offset + 4, true);
|
|
15
|
+
offset += 8;
|
|
16
|
+
if (offset + len > bytes.byteLength || len % 4) throw new Error('glb_invalid_chunk_length');
|
|
17
|
+
if (chunks === 0 && type !== 0x4e4f534a) throw new Error('glb_json_not_first');
|
|
18
|
+
if (type === 0x4e4f534a) {
|
|
19
|
+
if (json) throw new Error('glb_duplicate_json');
|
|
20
|
+
let src = new TextDecoder('utf-8', { fatal: true }).decode(bytes.subarray(offset, offset + len));
|
|
21
|
+
src = src.replace(/[\u0000-\u0020]+$/g, '');
|
|
22
|
+
json = JSON.parse(src);
|
|
23
|
+
} else if (type === 0x004e4942) binaryBytes += len;
|
|
24
|
+
offset += len; chunks++;
|
|
25
|
+
}
|
|
26
|
+
if (!json || json.asset?.version !== '2.0') throw new Error('glb_missing_gltf2_asset');
|
|
27
|
+
return {
|
|
28
|
+
ok: true, mediaKind: 'model3d', format: 'glb', version,
|
|
29
|
+
byteLength: bytes.byteLength, binaryBytes, chunks,
|
|
30
|
+
scenes: json.scenes?.length || 0,
|
|
31
|
+
nodes: json.nodes?.length || 0,
|
|
32
|
+
meshes: json.meshes?.length || 0,
|
|
33
|
+
primitives: (json.meshes || []).reduce((n, m) => n + (m.primitives?.length || 0), 0),
|
|
34
|
+
materials: json.materials?.length || 0,
|
|
35
|
+
textures: json.textures?.length || 0,
|
|
36
|
+
images: json.images?.length || 0,
|
|
37
|
+
animations: json.animations?.length || 0,
|
|
38
|
+
extensionsUsed: json.extensionsUsed || [],
|
|
39
|
+
note: 'structural inspection only; full Khronos validation requires a dedicated validator'
|
|
40
|
+
};
|
|
41
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host adapter for existing /inneranimalmedia/backend/agentsam/tools/image_generation.js
|
|
3
|
+
* The host explicitly injects the existing exported runImageGenerationForTool(env, name, params, ctx).
|
|
4
|
+
* No duplicate OpenAI/Gemini/Workers AI client is created.
|
|
5
|
+
*/
|
|
6
|
+
export function createInnerAnimalMediaImageProvider({ env, runImageGenerationForTool, resolveImageReference } = {}) {
|
|
7
|
+
if (typeof runImageGenerationForTool !== 'function') throw new Error('image_generation_provider_not_connected');
|
|
8
|
+
return async (legacyToolName, input, identity) => {
|
|
9
|
+
if (!identity?.actorId || !identity.accountId || !identity.installationId) throw new Error('trusted_identity_required');
|
|
10
|
+
const params = { ...input };
|
|
11
|
+
if (legacyToolName === 'imgx_edit_image') {
|
|
12
|
+
if (typeof resolveImageReference !== 'function') throw new Error('authorized_source_image_resolver_required');
|
|
13
|
+
const source = await resolveImageReference({ sourceArtifactRef: input.sourceArtifactRef, identity });
|
|
14
|
+
if (!source?.url) throw new Error('source_image_not_authorized_or_missing');
|
|
15
|
+
params.image_url = source.url;
|
|
16
|
+
delete params.sourceArtifactRef;
|
|
17
|
+
}
|
|
18
|
+
return runImageGenerationForTool(env, legacyToolName, params, {
|
|
19
|
+
authUser: { id: identity.actorId }, userId: identity.actorId,
|
|
20
|
+
tenantId: identity.accountId, workspaceId: identity.workspaceId || null,
|
|
21
|
+
conversationId: identity.conversationId || null,
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { createMediaHandlers } from './raster.js';
|
|
2
|
+
import { createScriptHandlers } from './scripts.js';
|
|
3
|
+
import { OPERATION_CATALOG } from './catalog.js';
|
|
4
|
+
|
|
5
|
+
const SCRIPT_TOOL_DOCS = Object.freeze({
|
|
6
|
+
'sam.superbash': {
|
|
7
|
+
description: 'Execute an explicitly authorized local Bash script for project-scoped multi-command work, testing or batch processing. Prefer a specialized SAM operation when available. This is trusted local shell access, not a filesystem sandbox. No paid cloud runner is selected automatically. Returns a verified execution receipt with status, exit code and bounded diagnostics.',
|
|
8
|
+
output_schema: {
|
|
9
|
+
type: 'object',
|
|
10
|
+
properties: {
|
|
11
|
+
ok: { type: 'boolean' }, executionId: { type: 'string' },
|
|
12
|
+
status: { type: 'string' }, exitCode: { type: ['integer','null'] },
|
|
13
|
+
stdout: { type: 'string' }, stderr: { type: 'string' },
|
|
14
|
+
scriptHash: { type: 'string' }, lane: { type: 'string' },
|
|
15
|
+
durationMs: { type: 'integer' }, error: { type: 'object' },
|
|
16
|
+
},
|
|
17
|
+
required: ['ok','executionId','status','exitCode','stdout','stderr','scriptHash','lane','durationMs'],
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
'sam.script.save': {
|
|
21
|
+
description: 'Save a versioned local Bash script artifact for this authorized account, actor and project installation. Revisions require expectedVersion; saving does not execute the script.',
|
|
22
|
+
output_schema: {
|
|
23
|
+
type: 'object', properties: {
|
|
24
|
+
ok: { type: 'boolean' }, scriptId: { type: 'string' },
|
|
25
|
+
version: { type: 'integer' }, artifactRef: { type: 'string' },
|
|
26
|
+
}, required: ['ok','scriptId','version','artifactRef'],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
'sam.script.get': {
|
|
30
|
+
description: 'Read a saved Bash script and its immutable version from the current authorized installation. Does not execute the script or access other users scripts.',
|
|
31
|
+
output_schema: {
|
|
32
|
+
type: 'object', properties: {
|
|
33
|
+
ok: { type: 'boolean' }, scriptId: { type: 'string' },
|
|
34
|
+
version: { type: 'integer' }, script: { type: 'string' },
|
|
35
|
+
artifactRef: { type: 'string' },
|
|
36
|
+
}, required: ['ok','scriptId','version','script','artifactRef'],
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
import { validateSamInput as validate } from '../../validation.js';
|
|
43
|
+
export { validateSamInput } from '../../validation.js';
|
|
44
|
+
function reject(code) { const e = new Error(code); e.code = code; throw e; }
|
|
45
|
+
|
|
46
|
+
function mapExecution(policy) {
|
|
47
|
+
const write = !['read', 'platform_read', 'script_artifact_read'].includes(policy.effect);
|
|
48
|
+
return {
|
|
49
|
+
lanes: policy.pack === 'sam' && policy.effect === 'shell_execution' ? ['local', 'remote', 'sandbox'] : ['platform', 'local', 'remote'],
|
|
50
|
+
model: 'never', network: 'optional',
|
|
51
|
+
sideEffects: write ? (policy.pack === 'sam' ? 'local_write' : 'remote_write') : 'none',
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The host supplies the authoritative identity and permission decision.
|
|
57
|
+
* This never installs an unresolved or fake handler into the SAM registry.
|
|
58
|
+
* CMS/Cloudflare tools bind their existing domain command handlers via `handlers`.
|
|
59
|
+
*/
|
|
60
|
+
export function createGeneratedSamOperations({
|
|
61
|
+
defineSamOperation, registerSamOperation, getSamOperation,
|
|
62
|
+
handlers = {}, assetStore, sharp, subjectSegmenter, imageProvider, imageEditEnabled,
|
|
63
|
+
scriptStore, processRuntime, scriptExecutionLanes = null,
|
|
64
|
+
resolveTrustedContext, authorize, extra = {},
|
|
65
|
+
} = {}) {
|
|
66
|
+
if (typeof defineSamOperation !== 'function' || typeof registerSamOperation !== 'function') reject('sam_kernel_registry_required');
|
|
67
|
+
if (typeof resolveTrustedContext !== 'function' || typeof authorize !== 'function') reject('trusted_identity_and_policy_required');
|
|
68
|
+
const native = createMediaHandlers({ assetStore, sharp, subjectSegmenter, imageProvider, imageEditEnabled });
|
|
69
|
+
const nativeScripts = createScriptHandlers({ scriptStore, processRuntime });
|
|
70
|
+
const all = { ...native, ...nativeScripts, ...handlers };
|
|
71
|
+
const installed = [], unavailable = [], aliases = [];
|
|
72
|
+
for (const record of OPERATION_CATALOG) {
|
|
73
|
+
if (record.aliasFor) {
|
|
74
|
+
aliases.push({ name: record.name, aliasFor: record.aliasFor });
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
// An existing domain owner is already bound; do not misreport it as
|
|
78
|
+
// unavailable solely because generated-v2 was not given a second handler.
|
|
79
|
+
if (getSamOperation?.(record.name)) {
|
|
80
|
+
installed.push({ name: record.name, status: 'existing' });
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
const fn = all[record.name];
|
|
84
|
+
if (typeof fn !== 'function') {
|
|
85
|
+
unavailable.push({
|
|
86
|
+
name: record.name, reason: 'handler_not_bound',
|
|
87
|
+
owner: record.policy?.pack || record.name.split('.')[0],
|
|
88
|
+
nextAction: 'connect_authorized_host_handler_or_implement',
|
|
89
|
+
});
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
const operation = defineSamOperation({
|
|
93
|
+
id: record.name, version: 1, module: record.name.split('.')[0],
|
|
94
|
+
action: record.name.split('.').slice(1).join('.'),
|
|
95
|
+
summary: SCRIPT_TOOL_DOCS[record.name]?.description || record.description,
|
|
96
|
+
description: SCRIPT_TOOL_DOCS[record.name]?.description || record.description,
|
|
97
|
+
capabilities: [record.capability_key],
|
|
98
|
+
execution: {
|
|
99
|
+
...mapExecution(record.policy),
|
|
100
|
+
...(record.name === 'sam.superbash' && scriptExecutionLanes
|
|
101
|
+
? { lanes: [...scriptExecutionLanes] } : {}),
|
|
102
|
+
},
|
|
103
|
+
risk: ['read','platform_read','script_artifact_read'].includes(record.policy.effect) ? 'read_only'
|
|
104
|
+
: ['live_publish','shell_execution'].includes(record.policy.effect) ? 'privileged' : 'write',
|
|
105
|
+
input_schema: record.input_schema, output_schema: SCRIPT_TOOL_DOCS[record.name]?.output_schema || record.output_schema,
|
|
106
|
+
status: 'stable',
|
|
107
|
+
async handler(input, sdkCtx) {
|
|
108
|
+
validate(input, record.input_schema);
|
|
109
|
+
const trusted = await resolveTrustedContext(sdkCtx);
|
|
110
|
+
if (!trusted?.accountId || !trusted?.actorId || !trusted?.installationId) reject('missing_trusted_identity');
|
|
111
|
+
const decision = await authorize({ operation: record.name, policy: record.policy, input, identity: trusted });
|
|
112
|
+
if (decision !== true && decision?.allow !== true) reject('capability_or_resource_denied');
|
|
113
|
+
const result = await fn(input, { ...trusted, signal: sdkCtx?.signal, execution: sdkCtx?.execution, ...extra });
|
|
114
|
+
// Script failures need their stderr/exit-code receipt in the model
|
|
115
|
+
// result. Preserve prior error semantics for other domain operations.
|
|
116
|
+
if (result?.ok === false && record.name !== 'sam.superbash') {
|
|
117
|
+
reject(result.error?.code || result.error || 'handler_returned_failure');
|
|
118
|
+
}
|
|
119
|
+
return result;
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
registerSamOperation(operation);
|
|
123
|
+
installed.push({ name: record.name, status: 'registered' });
|
|
124
|
+
}
|
|
125
|
+
return { registered: installed, unavailable, aliases };
|
|
126
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { removeConnectedBackgroundPixels } from './background.js';
|
|
3
|
+
import { inspectGlb } from './glb.js';
|
|
4
|
+
|
|
5
|
+
function fail(code) { const e = new Error(code); e.code = code; throw e; }
|
|
6
|
+
function hash(buffer) { return createHash('sha256').update(buffer).digest('hex'); }
|
|
7
|
+
function assertIdentity(ctx) {
|
|
8
|
+
if (!ctx?.accountId || !ctx.actorId || !ctx.installationId) fail('trusted_execution_identity_required');
|
|
9
|
+
}
|
|
10
|
+
async function getSource(store, input, ctx, { write = false } = {}) {
|
|
11
|
+
assertIdentity(ctx);
|
|
12
|
+
if (!store?.getOwnedAsset || (write && !store?.writeDerivative)) fail('owned_asset_store_required');
|
|
13
|
+
const asset = await store.getOwnedAsset({ assetId: input.assetId, accountId: ctx.accountId, actorId: ctx.actorId, installationId: ctx.installationId });
|
|
14
|
+
if (!asset || asset.accountId !== ctx.accountId) fail('asset_not_found_or_forbidden');
|
|
15
|
+
if (!(asset.bytes instanceof Uint8Array || Buffer.isBuffer(asset.bytes))) fail('asset_bytes_unavailable');
|
|
16
|
+
if (asset.bytes.byteLength > 50 * 1024 * 1024) fail('media_source_too_large');
|
|
17
|
+
return asset;
|
|
18
|
+
}
|
|
19
|
+
async function persist(store, asset, bytes, contentType, input, ctx, transformations, metadata = {}) {
|
|
20
|
+
const target = Buffer.from(bytes);
|
|
21
|
+
const sourceHash = hash(Buffer.from(asset.bytes)), derivativeHash = hash(target);
|
|
22
|
+
const result = await store.writeDerivative({
|
|
23
|
+
accountId: ctx.accountId, actorId: ctx.actorId, installationId: ctx.installationId,
|
|
24
|
+
sourceAssetId: asset.id, sourceHash, bytes: target, derivativeHash,
|
|
25
|
+
contentType, transformations, metadata, idempotencyKey: input.idempotencyKey || undefined,
|
|
26
|
+
preservation: 'retain_original',
|
|
27
|
+
});
|
|
28
|
+
if (!result?.id || result.id === asset.id) fail('derivative_not_distinct_from_original');
|
|
29
|
+
return { ok: true, sourceAssetId: asset.id, sourceHash, derivativeAssetId: result.id, derivativeHash, contentType, bytes: target.byteLength, transformations, ...metadata };
|
|
30
|
+
}
|
|
31
|
+
async function getSharp(injected) {
|
|
32
|
+
if (injected) return injected;
|
|
33
|
+
try { const m = await import('sharp'); return m.default || m; }
|
|
34
|
+
catch { return fail('sharp_runtime_not_installed'); }
|
|
35
|
+
}
|
|
36
|
+
async function imageTransform(sharp, asset, config) {
|
|
37
|
+
const source = Buffer.from(asset.bytes);
|
|
38
|
+
let pipeline = sharp(source, { failOn: 'warning' }).rotate();
|
|
39
|
+
const operation = config.operation;
|
|
40
|
+
if (operation === 'resize') {
|
|
41
|
+
if (!Number.isInteger(config.width) && !Number.isInteger(config.height)) fail('resize_dimensions_required');
|
|
42
|
+
pipeline = pipeline.resize({ width: config.width, height: config.height, fit: config.fit || 'inside', withoutEnlargement: config.allowUpscale !== true });
|
|
43
|
+
} else if (operation === 'crop') {
|
|
44
|
+
const { left, top, width, height } = config;
|
|
45
|
+
if (![left, top, width, height].every(Number.isInteger) || left < 0 || top < 0 || width < 1 || height < 1) fail('invalid_crop_rectangle');
|
|
46
|
+
pipeline = pipeline.extract({ left, top, width, height });
|
|
47
|
+
} else if (operation === 'trim_alpha') pipeline = pipeline.trim({ background: { r: 0, g: 0, b: 0, alpha: 0 } });
|
|
48
|
+
else if (operation === 'normalize_color') pipeline = pipeline.toColourspace('srgb');
|
|
49
|
+
else if (!['optimize', 'convert'].includes(operation)) fail('unsupported_image_operation');
|
|
50
|
+
const format = (config.format || (operation === 'optimize' ? 'webp' : 'png')).toLowerCase();
|
|
51
|
+
const quality = Number.isInteger(config.quality) ? Math.min(100, Math.max(1, config.quality)) : 82;
|
|
52
|
+
if (format === 'png') pipeline = pipeline.png({ compressionLevel: 9 });
|
|
53
|
+
else if (format === 'webp') pipeline = pipeline.webp({ quality });
|
|
54
|
+
else if (format === 'jpeg' || format === 'jpg') pipeline = pipeline.jpeg({ quality });
|
|
55
|
+
else fail('unsupported_output_format');
|
|
56
|
+
return { bytes: await pipeline.toBuffer(), contentType: format === 'jpg' || format === 'jpeg' ? 'image/jpeg' : `image/${format}` };
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** All handlers are real, but only install when an authorized asset store exists. */
|
|
60
|
+
export function createMediaHandlers({ assetStore, sharp: suppliedSharp, subjectSegmenter, imageProvider, imageEditEnabled = false } = {}) {
|
|
61
|
+
const handlers = {};
|
|
62
|
+
if (assetStore?.getOwnedAsset && assetStore?.writeDerivative) {
|
|
63
|
+
handlers['media.image.background.remove'] = async (input, ctx) => {
|
|
64
|
+
const source = await getSource(assetStore, input, ctx, { write: true });
|
|
65
|
+
if (input.method === 'subject_ai') {
|
|
66
|
+
if (typeof subjectSegmenter !== 'function') fail('subject_segmentation_provider_unavailable');
|
|
67
|
+
const result = await subjectSegmenter({ bytes: Buffer.from(source.bytes), asset: source, ctx, signal: ctx.signal });
|
|
68
|
+
if (!result?.bytes || result.contentType !== 'image/png') fail('invalid_segmentation_result');
|
|
69
|
+
return persist(assetStore, source, result.bytes, 'image/png', input, ctx, ['background.remove.subject_ai'], { method: 'subject_ai' });
|
|
70
|
+
}
|
|
71
|
+
if (input.method && input.method !== 'flat_connected') fail('unknown_background_method');
|
|
72
|
+
const sharp = await getSharp(suppliedSharp);
|
|
73
|
+
const metadata = await sharp(Buffer.from(source.bytes), { failOn: 'warning' }).metadata();
|
|
74
|
+
if (!metadata.width || !metadata.height || metadata.width * metadata.height > 10_000_000) fail('background_removal_pixel_limit');
|
|
75
|
+
const decoded = await sharp(Buffer.from(source.bytes), { failOn: 'warning' }).ensureAlpha().raw().toBuffer({ resolveWithObject: true });
|
|
76
|
+
const { data, info } = decoded;
|
|
77
|
+
if (info.channels !== 4) fail('expected_rgba_after_decode');
|
|
78
|
+
const removal = removeConnectedBackgroundPixels(data, info.width, info.height, { tolerance: input.tolerance ?? 42 });
|
|
79
|
+
const bytes = await sharp(Buffer.from(removal.pixels), { raw: { width: info.width, height: info.height, channels: 4 } }).png().toBuffer();
|
|
80
|
+
return persist(assetStore, source, bytes, 'image/png', input, ctx, ['background.remove.flat_connected'], { method: 'flat_connected', removedPixels: removal.removedPixels, width: info.width, height: info.height });
|
|
81
|
+
};
|
|
82
|
+
handlers['media.asset.background.remove'] = handlers['media.image.background.remove']; // legacy alias, catalog should advertise only canonical
|
|
83
|
+
}
|
|
84
|
+
if (assetStore?.getOwnedAsset) {
|
|
85
|
+
// Read the owning store's authoritative metadata; image codecs are not
|
|
86
|
+
// needed and arbitrary model/3D/document assets remain inspectable.
|
|
87
|
+
handlers['media.asset.inspect'] = async (input, ctx) => {
|
|
88
|
+
const source = await getSource(assetStore, input, ctx);
|
|
89
|
+
return {
|
|
90
|
+
ok: true, assetId: source.id, contentType: source.contentType || 'application/octet-stream',
|
|
91
|
+
byteLength: source.bytes.byteLength, sha256: source.sha256 || hash(Buffer.from(source.bytes)),
|
|
92
|
+
sourceAssetId: source.sourceAssetId || null, createdAt: source.createdAt || null,
|
|
93
|
+
transformations: source.transformations || [],
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
handlers['media.image.inspect'] = async (input, ctx) => {
|
|
97
|
+
const source = await getSource(assetStore, input, ctx);
|
|
98
|
+
const sharp = await getSharp(suppliedSharp);
|
|
99
|
+
const meta = await sharp(Buffer.from(source.bytes), { failOn: 'warning' }).metadata();
|
|
100
|
+
return { ok: true, assetId: source.id, format: meta.format, width: meta.width, height: meta.height, hasAlpha: meta.hasAlpha, colourspace: meta.space, bytes: source.bytes.byteLength };
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
if (assetStore?.getOwnedAsset && assetStore?.writeDerivative) {
|
|
104
|
+
for (const name of ['optimize', 'resize', 'crop', 'convert', 'trim_alpha', 'normalize_color']) {
|
|
105
|
+
const operation = name === 'normalize_color' ? 'normalize_color' : name;
|
|
106
|
+
handlers[`media.image.${name}`] = async (input, ctx) => {
|
|
107
|
+
const source = await getSource(assetStore, input, ctx, { write: true });
|
|
108
|
+
const sharp = await getSharp(suppliedSharp);
|
|
109
|
+
const transformed = await imageTransform(sharp, source, { ...input, operation });
|
|
110
|
+
return persist(assetStore, source, transformed.bytes, transformed.contentType, input, ctx, [`image.${name}`]);
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
if (assetStore?.getOwnedAsset) {
|
|
115
|
+
handlers['media.model.inspect'] = async (input, ctx) => {
|
|
116
|
+
const source = await getSource(assetStore, input, ctx);
|
|
117
|
+
return { assetId: source.id, ...inspectGlb(source.bytes) };
|
|
118
|
+
};
|
|
119
|
+
handlers['media.model.validateStructural'] = handlers['media.model.inspect']; // no claim of Khronos conformance
|
|
120
|
+
handlers['media.model.validate'] = async (input, ctx) => {
|
|
121
|
+
const inspection = await handlers['media.model.validateStructural'](input, ctx);
|
|
122
|
+
return { ...inspection, validationLevel: 'structural_only', conformanceVerified: false };
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
if (typeof imageProvider === 'function') {
|
|
126
|
+
for (const [name, legacy] of [['media.image.generate', 'imgx_generate_image'], ...(imageEditEnabled ? [['media.image.edit', 'imgx_edit_image']] : [])]) {
|
|
127
|
+
handlers[name] = async (input, ctx) => {
|
|
128
|
+
assertIdentity(ctx);
|
|
129
|
+
if (!String(input.prompt || '').trim()) fail('prompt_required');
|
|
130
|
+
const safe = { ...input };
|
|
131
|
+
// The host's verified identity is authoritative; model-provided IDs are ignored.
|
|
132
|
+
for (const key of ['accountId', 'account_id', 'tenantId', 'tenant_id', 'userId', 'user_id', 'actorId', 'workspaceId']) delete safe[key];
|
|
133
|
+
const output = await imageProvider(legacy, safe, ctx);
|
|
134
|
+
if (output?.ok === false || (!output?.image_url && !output?.preview_url)) fail('image_provider_missing_result');
|
|
135
|
+
return output;
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return handlers;
|
|
140
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Independent SAM script operations. No new terminal daemon.
|
|
3
|
+
* The host must inject authorized scriptStore and ExecOS/agentsamd process runner.
|
|
4
|
+
*/
|
|
5
|
+
function deny(msg) {const e=new Error(msg); e.code=msg;throw e;}
|
|
6
|
+
function context(ctx) {if(!ctx?.accountId||!ctx?.actorId||!ctx?.installationId)deny('trusted_identity_required');return ctx;}
|
|
7
|
+
export function createScriptHandlers({ scriptStore, processRuntime } = {}) {
|
|
8
|
+
const handlers={};
|
|
9
|
+
if (scriptStore?.saveVersion && scriptStore?.getVersion) {
|
|
10
|
+
handlers['sam.script.save'] = async (input, ctx) => {
|
|
11
|
+
context(ctx);
|
|
12
|
+
if (!String(input.script||'').trim()) deny('script_source_required');
|
|
13
|
+
const result=await scriptStore.saveVersion({
|
|
14
|
+
accountId:ctx.accountId,actorId:ctx.actorId,installationId:ctx.installationId,
|
|
15
|
+
scriptId:input.scriptId||null,expectedVersion:input.expectedVersion||null,
|
|
16
|
+
script:input.script,description:input.description||null,
|
|
17
|
+
});
|
|
18
|
+
if (!result?.scriptId||!Number.isInteger(result.version))deny('invalid_script_store_result');
|
|
19
|
+
return {ok:true,scriptId:result.scriptId,version:result.version,artifactRef:result.artifactRef||null};
|
|
20
|
+
};
|
|
21
|
+
handlers['sam.script.get'] = async (input, ctx) => {
|
|
22
|
+
context(ctx);
|
|
23
|
+
const result=await scriptStore.getVersion({accountId:ctx.accountId,actorId:ctx.actorId,installationId:ctx.installationId,scriptId:input.scriptId,version:input.version||null});
|
|
24
|
+
if (!result?.script || !result?.scriptId)deny('script_not_found_or_forbidden');
|
|
25
|
+
return {ok:true,...result};
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
if (processRuntime?.executeScript) {
|
|
29
|
+
handlers['sam.superbash'] = async (input, ctx) => {
|
|
30
|
+
context(ctx);
|
|
31
|
+
let script=input.script;
|
|
32
|
+
if (!script && input.scriptArtifactRef) {
|
|
33
|
+
if (!scriptStore?.getByArtifactRef) deny('script_artifact_store_unavailable');
|
|
34
|
+
const found=await scriptStore.getByArtifactRef({accountId:ctx.accountId,actorId:ctx.actorId,
|
|
35
|
+
installationId:ctx.installationId,artifactRef:input.scriptArtifactRef});
|
|
36
|
+
if (!found?.script)deny('script_artifact_not_found_or_forbidden');
|
|
37
|
+
script=found.script;
|
|
38
|
+
}
|
|
39
|
+
if (!String(script||'').trim())deny('script_source_required');
|
|
40
|
+
// Trusted laneRef is NOT model input. Runtime resolves authorized lane/workspace.
|
|
41
|
+
const result=await processRuntime.executeScript({
|
|
42
|
+
accountId:ctx.accountId,actorId:ctx.actorId,installationId:ctx.installationId,
|
|
43
|
+
script,relativeCwd:input.relativeCwd||'.',idempotencyKey:input.idempotencyKey||null,
|
|
44
|
+
laneRef:ctx.authorizedLaneRef||null,signal:ctx.signal,
|
|
45
|
+
onEvent:ctx.onEvent,
|
|
46
|
+
});
|
|
47
|
+
if (!result?.executionId || !result?.status) deny('invalid_process_runtime_result');
|
|
48
|
+
const completed = result.status === 'completed' && result.exitCode === 0;
|
|
49
|
+
// Script failures are structured tool results, never false success.
|
|
50
|
+
return {
|
|
51
|
+
...result,
|
|
52
|
+
ok: completed,
|
|
53
|
+
...(completed ? {} : {
|
|
54
|
+
error: result.error || {
|
|
55
|
+
code: 'script_execution_failed',
|
|
56
|
+
message: 'Script did not complete successfully (' + result.status + ')',
|
|
57
|
+
},
|
|
58
|
+
}),
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
return handlers;
|
|
63
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** SDK-native registration; call from an authenticated host installation. */
|
|
2
|
+
import { defineSamOperation } from '../../define.js';
|
|
3
|
+
import { registerSamOperation, getSamOperation } from '../../registry.js';
|
|
4
|
+
import { createGeneratedSamOperations } from './operation-pack.js';
|
|
5
|
+
export function installGeneratedOperations(dependencies = {}) {
|
|
6
|
+
return createGeneratedSamOperations({
|
|
7
|
+
defineSamOperation, registerSamOperation, getSamOperation, ...dependencies,
|
|
8
|
+
});
|
|
9
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { createSamOS } from '../../../os.js';
|
|
4
|
+
import { AgentSamClient } from '../../../client.js';
|
|
5
|
+
|
|
6
|
+
const identity = { accountId:'acct_one', actorId:'actor_one', installationId:'install_one' };
|
|
7
|
+
|
|
8
|
+
test('legacy media operation alias executes the canonical handler but is not double-advertised', async () => {
|
|
9
|
+
const authorized = [];
|
|
10
|
+
let executions = 0;
|
|
11
|
+
const os = createSamOS({
|
|
12
|
+
core:false, generated:{
|
|
13
|
+
resolveTrustedContext:async()=>identity,
|
|
14
|
+
authorize:async({operation})=>{authorized.push(operation);return true;},
|
|
15
|
+
handlers:{
|
|
16
|
+
'media.image.background.remove':async()=>{
|
|
17
|
+
executions++;
|
|
18
|
+
return {ok:true,derivativeAssetId:'ast_saved',sourceAssetId:'ast_original'};
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
const client = new AgentSamClient({os});
|
|
24
|
+
const alias = 'media.asset.background.remove';
|
|
25
|
+
const canonical = 'media.image.background.remove';
|
|
26
|
+
assert.equal(os.get(alias),os.get(canonical));
|
|
27
|
+
const result = await client.invoke(alias,{assetId:'ast_original'});
|
|
28
|
+
assert.equal(result.ok,true,JSON.stringify(result.error));
|
|
29
|
+
assert.equal(result.data.derivativeAssetId,'ast_saved');
|
|
30
|
+
assert.equal(executions,1);
|
|
31
|
+
assert.deepEqual(authorized,[canonical],'canonical policy remains the execution authority');
|
|
32
|
+
assert.equal(os.list().filter(x=>x.id===canonical).length,1);
|
|
33
|
+
assert.equal(os.list().some(x=>x.id===alias),false,'no duplicate model tool');
|
|
34
|
+
assert.equal(os.status().generated_unavailable.some(x=>x.name===alias),false);
|
|
35
|
+
assert.deepEqual(os.status().generated_aliases.find(x=>x.name===alias),
|
|
36
|
+
{name:alias,aliasFor:canonical,bound:true});
|
|
37
|
+
assert.throws(()=>os.install([{...os.get(canonical),id:alias}]),/sam_os_duplicate_operation/);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
test('aliases never fabricate a handler when the canonical implementation is missing',()=>{
|
|
41
|
+
const os=createSamOS({
|
|
42
|
+
core:false, generated:{resolveTrustedContext:async()=>identity, authorize:async()=>true},
|
|
43
|
+
});
|
|
44
|
+
assert.equal(os.get('media.asset.background.remove'),null);
|
|
45
|
+
assert.deepEqual(os.status().generated_aliases.find(x=>x.name==='media.asset.background.remove'),
|
|
46
|
+
{name:'media.asset.background.remove',aliasFor:'media.image.background.remove',bound:false});
|
|
47
|
+
const gap=os.status().generated_unavailable.find(x=>x.name==='media.image.background.remove');
|
|
48
|
+
assert.equal(gap.reason,'handler_not_bound');
|
|
49
|
+
assert.equal(gap.owner,'media');
|
|
50
|
+
assert.equal(gap.nextAction,'connect_authorized_host_handler_or_implement');
|
|
51
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { removeConnectedBackgroundPixels } from '../background.js';
|
|
4
|
+
|
|
5
|
+
test('flat-connected removes edge background while preserving non-background island and original', () => {
|
|
6
|
+
const width=7,height=7,pixels=new Uint8ClampedArray(width*height*4);
|
|
7
|
+
for(let i=0;i<width*height;i++) pixels.set([255,255,255,255],i*4);
|
|
8
|
+
for(let y=2;y<5;y++) for(let x=2;x<5;x++) pixels.set([0,0,0,255],(y*width+x)*4);
|
|
9
|
+
const before=Uint8ClampedArray.from(pixels);
|
|
10
|
+
const result=removeConnectedBackgroundPixels(pixels,width,height,{tolerance:20});
|
|
11
|
+
assert.equal(result.removedPixels,40);
|
|
12
|
+
assert.equal(result.pixels[(3*width+3)*4+3],255);
|
|
13
|
+
assert.equal(result.pixels[3],0);
|
|
14
|
+
assert.deepEqual(pixels,before);
|
|
15
|
+
});
|
|
16
|
+
test('dimensions and RGBA buffers are validated',()=>{
|
|
17
|
+
assert.throws(()=>removeConnectedBackgroundPixels(new Uint8Array(4),2,2),/expected_rgba/);
|
|
18
|
+
assert.throws(()=>removeConnectedBackgroundPixels(new Uint8Array(4),100_000,100_000),/oversized/);
|
|
19
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { inspectGlb } from '../glb.js';
|
|
4
|
+
function fixture() {
|
|
5
|
+
const json = Buffer.from(JSON.stringify({asset:{version:'2.0'},meshes:[{primitives:[{}]}],nodes:[{}]}));
|
|
6
|
+
const padding = (4-json.length%4)%4;
|
|
7
|
+
const bytes = Buffer.alloc(12+8+json.length+padding);
|
|
8
|
+
bytes.writeUInt32LE(0x46546c67,0);bytes.writeUInt32LE(2,4);bytes.writeUInt32LE(bytes.length,8);
|
|
9
|
+
bytes.writeUInt32LE(json.length+padding,12);bytes.writeUInt32LE(0x4e4f534a,16);json.copy(bytes,20);
|
|
10
|
+
bytes.fill(0x20,20+json.length);
|
|
11
|
+
return bytes;
|
|
12
|
+
}
|
|
13
|
+
test('GLB structural inspect returns counts',()=>{
|
|
14
|
+
const result=inspectGlb(fixture());
|
|
15
|
+
assert.equal(result.ok,true);assert.equal(result.meshes,1);assert.equal(result.primitives,1);assert.equal(result.mediaKind,'model3d');
|
|
16
|
+
});
|
|
17
|
+
test('GLB malformed header is rejected',()=>{
|
|
18
|
+
const b=fixture();b[0]=0;assert.throws(()=>inspectGlb(b),/magic/);
|
|
19
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { createMediaHandlers } from '../raster.js';
|
|
4
|
+
function mockSharp(arg,options) {
|
|
5
|
+
// Exercise the actual pixel algorithm while standing in for image codecs.
|
|
6
|
+
if(options?.raw) return {png(){return {toBuffer:async()=>Buffer.from(arg)};}};
|
|
7
|
+
const width=7,height=7;const pixels=Buffer.alloc(width*height*4);
|
|
8
|
+
for(let i=0;i<width*height;i++)pixels.set([255,255,255,255],i*4);
|
|
9
|
+
for(let y=2;y<5;y++)for(let x=2;x<5;x++)pixels.set([0,0,0,255],(y*width+x)*4);
|
|
10
|
+
return {ensureAlpha(){return this;},raw(){return this;},
|
|
11
|
+
toBuffer:async()=>({data:pixels,info:{width,height,channels:4}}),
|
|
12
|
+
metadata:async()=>({format:'png',width,height,hasAlpha:true,space:'srgb'})};
|
|
13
|
+
}
|
|
14
|
+
function fixture(){
|
|
15
|
+
const source=Buffer.from([1,2,3]);let saved=null;
|
|
16
|
+
const store={getOwnedAsset:async({accountId})=>({id:'asset_a',accountId,bytes:source}),
|
|
17
|
+
writeDerivative:async args=>{saved=args;return {id:'asset_b'};}};
|
|
18
|
+
return {store,source,get saved(){return saved}};
|
|
19
|
+
}
|
|
20
|
+
const identity={accountId:'a',actorId:'au_a',installationId:'ia'};
|
|
21
|
+
test('background removal is executable via scoped asset store, produces new derivative',async()=>{
|
|
22
|
+
const f=fixture();const handlers=createMediaHandlers({assetStore:f.store,sharp:mockSharp});
|
|
23
|
+
const result=await handlers['media.image.background.remove']({assetId:'asset_a'},identity);
|
|
24
|
+
assert.equal(result.ok,true);assert.equal(result.derivativeAssetId,'asset_b');assert.equal(result.sourceAssetId,'asset_a');
|
|
25
|
+
assert.equal(f.saved.preservation,'retain_original');assert.deepEqual(f.source,Buffer.from([1,2,3]));
|
|
26
|
+
assert.equal(f.saved.bytes[3],0);
|
|
27
|
+
});
|
|
28
|
+
test('missing actor/install identity rejects transformation',async()=>{
|
|
29
|
+
const f=fixture();const handlers=createMediaHandlers({assetStore:f.store,sharp:mockSharp});
|
|
30
|
+
await assert.rejects(handlers['media.image.background.remove']({assetId:'asset_a'},{accountId:'a'}),/trusted_execution_identity_required/);
|
|
31
|
+
});
|
|
32
|
+
test('generation tool connects to explicitly supplied provider, not a placeholder',async()=>{
|
|
33
|
+
const calls=[];const handlers=createMediaHandlers({imageProvider:async(name,input,ctx)=>{calls.push({name,input,ctx});return {image_url:'https://example.invalid/img.png'};}});
|
|
34
|
+
const out=await handlers['media.image.generate']({prompt:'drawing',userId:'forged'},identity);
|
|
35
|
+
assert.equal(out.image_url,'https://example.invalid/img.png');
|
|
36
|
+
assert.equal(calls[0].name,'imgx_generate_image');assert.equal(calls[0].input.userId,undefined);
|
|
37
|
+
assert.equal(handlers['media.image.edit'],undefined);
|
|
38
|
+
});
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import os from 'node:os';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { mkdtemp, rm } from 'node:fs/promises';
|
|
6
|
+
import { AgentSamClient, createSamOS, createLocalMediaStore } from '../../../index.js';
|
|
7
|
+
|
|
8
|
+
const account = { accountId: 'acct_real', actorId: 'actor_real', installationId: 'install_real' };
|
|
9
|
+
const intruder = { accountId: 'acct_other', actorId: 'actor_other', installationId: 'install_other' };
|
|
10
|
+
|
|
11
|
+
function glbFixture() {
|
|
12
|
+
const json = Buffer.from(JSON.stringify({asset:{version:'2.0'},meshes:[{primitives:[{}]}]}));
|
|
13
|
+
const padding = (4 - json.length % 4) % 4;
|
|
14
|
+
const bytes = Buffer.alloc(20 + json.length + padding, 0x20);
|
|
15
|
+
bytes.writeUInt32LE(0x46546c67, 0);
|
|
16
|
+
bytes.writeUInt32LE(2, 4);
|
|
17
|
+
bytes.writeUInt32LE(bytes.length, 8);
|
|
18
|
+
bytes.writeUInt32LE(json.length + padding, 12);
|
|
19
|
+
bytes.writeUInt32LE(0x4e4f534a, 16);
|
|
20
|
+
json.copy(bytes, 20);
|
|
21
|
+
return bytes;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function clientFor(assetStore, principal, authorize = async () => true) {
|
|
25
|
+
return new AgentSamClient({ os: createSamOS({
|
|
26
|
+
core:false, generated:{
|
|
27
|
+
assetStore, resolveTrustedContext: async () => principal, authorize,
|
|
28
|
+
},
|
|
29
|
+
}) });
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
test('generated-v2 asset inspect binds real local store, returns authoritative lineage and rejects forged scope', async () => {
|
|
33
|
+
const dir = await mkdtemp(path.join(os.tmpdir(), 'sam-asset-inspect-'));
|
|
34
|
+
try {
|
|
35
|
+
const store = createLocalMediaStore({root:dir});
|
|
36
|
+
const saved = await store.importAsset({...account, bytes:Buffer.from('immutable source'), contentType:'text/plain'});
|
|
37
|
+
const client = clientFor(store, account);
|
|
38
|
+
assert.equal((await client.describe('media.asset.inspect')).ok,true);
|
|
39
|
+
const inspected = await client.invoke('media.asset.inspect',{assetId:saved.id});
|
|
40
|
+
assert.equal(inspected.ok,true,JSON.stringify(inspected.error));
|
|
41
|
+
assert.equal(inspected.data.assetId,saved.id);
|
|
42
|
+
assert.equal(inspected.data.sha256,saved.sha256);
|
|
43
|
+
assert.equal(inspected.data.contentType,'text/plain');
|
|
44
|
+
assert.equal(inspected.data.byteLength,16);
|
|
45
|
+
assert.equal(inspected.data.sourceAssetId,null);
|
|
46
|
+
|
|
47
|
+
const forged = await client.invoke('media.asset.inspect',{assetId:saved.id,accountId:'acct_other'});
|
|
48
|
+
assert.equal(forged.ok,false);
|
|
49
|
+
const foreign = await clientFor(store,intruder).invoke('media.asset.inspect',{assetId:saved.id});
|
|
50
|
+
assert.equal(foreign.ok,false);
|
|
51
|
+
const denied = await clientFor(store,account,async()=>false).invoke('media.asset.inspect',{assetId:saved.id});
|
|
52
|
+
assert.equal(denied.ok,false);
|
|
53
|
+
} finally { await rm(dir,{recursive:true,force:true}); }
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
test('generated-v2 GLB validation executes real structural checks without claiming full conformance', async () => {
|
|
57
|
+
const dir = await mkdtemp(path.join(os.tmpdir(), 'sam-glb-validate-'));
|
|
58
|
+
try {
|
|
59
|
+
const store = createLocalMediaStore({root:dir});
|
|
60
|
+
const good = await store.importAsset({...account,bytes:glbFixture(),contentType:'model/gltf-binary'});
|
|
61
|
+
const bad = await store.importAsset({...account,bytes:Buffer.from('not a glb'),contentType:'model/gltf-binary'});
|
|
62
|
+
const client = clientFor(store, account);
|
|
63
|
+
assert.equal((await client.describe('media.model.validate')).ok,true);
|
|
64
|
+
const valid = await client.invoke('media.model.validate',{assetId:good.id});
|
|
65
|
+
assert.equal(valid.ok,true,JSON.stringify(valid.error));
|
|
66
|
+
assert.equal(valid.data.meshes,1);
|
|
67
|
+
assert.equal(valid.data.validationLevel,'structural_only');
|
|
68
|
+
assert.equal(valid.data.conformanceVerified,false);
|
|
69
|
+
const invalid = await client.invoke('media.model.validate',{assetId:bad.id});
|
|
70
|
+
assert.equal(invalid.ok,false);
|
|
71
|
+
const foreign = await clientFor(store,intruder).invoke('media.model.validate',{assetId:good.id});
|
|
72
|
+
assert.equal(foreign.ok,false);
|
|
73
|
+
} finally { await rm(dir,{recursive:true,force:true}); }
|
|
74
|
+
});
|