@inneranimalmedia/agentsam-sdk 2.6.17 → 2.6.18
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 +19 -0
- package/README.md +15 -0
- package/apps/agentsam-copro-studio/agentsam.app.json +125 -0
- package/apps/cad-creator/agentsam.app.json +230 -0
- package/apps/cad-creator/shared/cad/package.json +1 -1
- package/apps/cad-creator/shared/cad/src/index.ts +1 -0
- package/apps/cad-creator/shared/cad/src/lighting.test.ts +32 -0
- package/apps/cad-creator/shared/cad/src/lighting.ts +79 -0
- package/apps/cad-creator/shared/cad/src/types.ts +106 -4
- package/apps/design-canvas/agentsam.app.json +144 -0
- package/apps/ecommerce-cms-agentsam/agentsam.app.json +658 -0
- package/apps/local-studio/agentsam.app.json +271 -0
- package/apps/samsketch/agentsam.app.json +136 -0
- package/contracts/source-types.v2.json +86 -1
- package/docs/CAPABILITIES.md +56 -0
- package/docs/PRODUCT_LIFECYCLE.md +2 -0
- package/docs/REPOSITORY_KNOWLEDGE.md +24 -0
- package/docs/adr/ADR-0010-widget-contributions-registry-persistence.md +60 -0
- package/docs/architecture/ACP_D1_HOSTING.md +67 -0
- package/docs/architecture/AGENTSAM-PRODUCT-CATALOG-RELEASES-20261028.md +3 -1
- package/docs/architecture/AGENTSAM_APPLICATION_CONTRACT.md +6 -2
- package/docs/architecture/AGENTSAM_APPLICATION_INVENTORY.md +135 -0
- package/docs/architecture/AGENTSAM_DISTRIBUTION_OWNERSHIP.md +1 -1
- package/docs/architecture/AGENTSAM_GO_RUNTIME.md +1 -1
- package/docs/architecture/APP_PRODUCT_DATA_MODEL.md +121 -0
- package/docs/architecture/BRAND_WORKSPACE_V1.md +71 -0
- package/docs/architecture/CANONICAL_CAD_FORMAT_SPINE.md +79 -0
- package/docs/architecture/ECOMMERCE_THEME_START_FLOW.md +31 -0
- package/docs/architecture/LIVE_AST_AND_CREATIVE_RESOURCE_GRAPH.md +129 -0
- package/docs/architecture/PRIMETECH_SCENE_V2_READINESS.md +89 -0
- package/docs/architecture/PYTHON_CAD_SERVICE_TRANSPORT.md +116 -0
- package/docs/architecture/SCHEMA_AUTHORITIES.md +83 -0
- package/docs/architecture/app-module-plugin-classification.md +71 -0
- package/docs/architecture/primetech/BARNDOMINIUM_BIM_BUILDOUT_RUNBOOK_20261123.md +139 -0
- package/docs/architecture/primetech/BARNDOMINIUM_SPACE_DELIVERY_20261123.md +58 -0
- package/docs/architecture/primetech/CAPABILITY_AND_ACCEPTANCE_MATRIX.md +176 -0
- package/docs/architecture/primetech/IMPLEMENTATION_WAVES.md +203 -0
- package/docs/architecture/primetech/PORTABLE_EDITOR_CONTRACTS.md +192 -0
- package/docs/architecture/primetech/README.md +65 -0
- package/docs/architecture/universal-registry-recovery.md +62 -0
- package/docs/audits/2026-11-22-sdk-d1-registry-parity.md +116 -0
- package/docs/brand/BRAND_CAPABILITY_INVENTORY.md +160 -0
- package/docs/cad/FORMAT_SUPPORT.md +46 -0
- package/docs/cad/LIB_CAD_REMASTER_AUDIT.md +49 -0
- package/docs/engineering/CMS_DATA_AUTHORITY_2026-11-03.md +4 -2
- package/docs/generated/SDK_CAPABILITY_INVENTORY.md +10 -10
- package/docs/intake/product-capabilities.proposed.ts +6 -6
- package/docs/operations/CLOUDFLARE-QUEUE-OBSERVABILITY.md +1 -1
- package/docs/product/AGENTSAM_PRODUCT_EXPERIENCE_STANDARD.md +1 -1
- package/docs/reference/AGENTSAM-CLI-WORKFLOWS.md +1 -1
- package/docs/reference/AGENTSAM-REGISTRY.generated.md +25 -16
- package/docs/sam/opencv-media.md +63 -0
- package/docs/standards/DESKTOP_WEB_PARITY_ACCEPTANCE.md +42 -0
- package/migrations/d1/0001_agentsam_plugin_runtime.sql +0 -2
- package/migrations/d1/0028_drop_unused_tool_handler_families.sql +4 -0
- package/migrations/d1/0029_agentsam_tools_account_plugin_key_unique.sql +26 -0
- package/migrations/d1/0030_cad_engine_plugins_contract_agnostic.sql +21 -0
- package/migrations/d1/0031_ops_trail_single_tool_call_source.sql +13 -0
- package/migrations/d1/0033_service_registry_model_discovery.sql +50 -0
- package/migrations/d1/20261123_skill_package_staging.sql +64 -0
- package/migrations/d1/20261123_universal_registry_stage.sql +58 -0
- package/migrations/d1/20261126_agentsam_tool_legacy_metadata_compact.sql +6 -0
- package/migrations/d1/20261126_agentsam_tools_archive_legacy_metadata.sql +20 -0
- package/migrations/d1/20261126_agentsam_tools_normalize_intent_tags.sql +49 -0
- package/migrations/d1/20261126_agentsam_tools_normalize_policy_health.sql +89 -0
- package/migrations/d1/20261126_agentsam_tools_remove_legacy_scope_keys.sql +29 -0
- package/migrations/d1/20261126_agentsam_tools_runtime_view_compat.sql +65 -0
- package/migrations/d1/generated/20261123_portable_cli_seed.sql +97 -0
- package/migrations/d1/generated/20261123_source_skill_seed.sql +3881 -0
- package/migrations/runtime/0012_agent_run_event_sequence.sql +27 -0
- package/package.json +57 -17
- package/packages/agentsam-3d-viewer/README.md +5 -0
- package/packages/agentsam-3d-viewer/package.json +1 -1
- package/packages/agentsam-3d-viewer/src/atmosphere.js +90 -0
- package/packages/agentsam-3d-viewer/src/gltf-loader.js +42 -0
- package/packages/agentsam-3d-viewer/src/index.d.ts +53 -1
- package/packages/agentsam-3d-viewer/src/index.js +18 -3
- package/packages/agentsam-3d-viewer/src/pbr-materials.js +330 -0
- package/packages/agentsam-3d-viewer/src/procedural-material.js +96 -0
- package/packages/agentsam-3d-viewer/src/procedural-textures.js +334 -0
- package/packages/agentsam-3d-viewer/src/renderer-capabilities.js +12 -0
- package/packages/agentsam-3d-viewer/src/stroke-geometry.js +4 -0
- package/packages/agentsam-3d-viewer/src/studio-finishes.js +67 -0
- package/packages/agentsam-3d-viewer/test/atmosphere.test.mjs +17 -0
- package/packages/agentsam-3d-viewer/test/gltf-loader.test.mjs +49 -0
- package/packages/agentsam-3d-viewer/test/pbr-mined-presets.test.mjs +44 -0
- package/packages/agentsam-3d-viewer/test/procedural-material.test.mjs +56 -0
- package/packages/agentsam-3d-viewer/test/renderer-capabilities.test.mjs +18 -0
- package/packages/agentsam-3d-viewer/test/studio-shared.test.mjs +23 -0
- package/packages/agentsam-architectural-intelligence/package.json +1 -1
- package/packages/agentsam-brand/package.json +3 -2
- package/packages/agentsam-brand/src/core/capabilities.js +108 -48
- package/packages/agentsam-brand/src/extract.js +6 -1
- package/packages/agentsam-brand/src/index.js +1 -0
- package/packages/agentsam-brand/src/public.js +15 -1
- package/packages/agentsam-brand/src/scan.js +47 -0
- package/packages/agentsam-brand/src/workspace.d.ts +19 -0
- package/packages/agentsam-brand/src/workspace.js +166 -0
- package/packages/agentsam-cms/README.md +11 -0
- package/packages/agentsam-cms/package.json +4 -3
- package/packages/agentsam-cms/src/contracts.js +16 -0
- package/packages/agentsam-cms/src/studio-bridge-protocol.js +113 -0
- package/packages/agentsam-cms/test/standalone.test.mjs +7 -3
- package/packages/agentsam-cms/test/studio-bridge-protocol.test.mjs +26 -0
- package/packages/agentsam-communications/package.json +3 -2
- package/packages/agentsam-communications/src/samspeaks-runtime.js +126 -0
- package/packages/agentsam-contracts/README.md +67 -0
- package/packages/agentsam-contracts/agentsam.package.json +46 -12
- package/packages/agentsam-contracts/dist/agent.d.ts +6 -3
- package/packages/agentsam-contracts/dist/agent.js +20 -0
- package/packages/agentsam-contracts/dist/bim-model.d.ts +95 -0
- package/packages/agentsam-contracts/dist/bim-model.js +57 -0
- package/packages/agentsam-contracts/dist/cad-source-formats.d.ts +55 -0
- package/packages/agentsam-contracts/dist/cad-source-formats.js +9617 -0
- package/packages/agentsam-contracts/dist/design-workspace.d.ts +13 -1
- package/packages/agentsam-contracts/dist/index.d.ts +6 -0
- package/packages/agentsam-contracts/dist/index.js +17836 -349
- package/packages/agentsam-contracts/dist/json-schema.d.ts +8 -0
- package/packages/agentsam-contracts/dist/json-schema.js +7787 -0
- package/packages/agentsam-contracts/dist/operations.d.ts +6 -1
- package/packages/agentsam-contracts/dist/operations.js +7795 -5
- package/packages/agentsam-contracts/dist/resource-ref.d.ts +21 -0
- package/packages/agentsam-contracts/dist/resource-ref.js +23 -0
- package/packages/agentsam-contracts/dist/run.d.ts +91 -3
- package/packages/agentsam-contracts/dist/run.js +28 -0
- package/packages/agentsam-contracts/dist/scene-document.d.ts +32 -0
- package/packages/agentsam-contracts/dist/scene-document.js +30 -0
- package/packages/agentsam-contracts/dist/scene-format.d.ts +44 -0
- package/packages/agentsam-contracts/dist/scene-format.js +35 -0
- package/packages/agentsam-contracts/dist/source-types-registry.d.ts +9 -0
- package/packages/agentsam-contracts/dist/source-types-registry.js +9512 -0
- package/packages/agentsam-contracts/dist/tools.d.ts +2 -1
- package/packages/agentsam-contracts/dist/tools.js +7794 -9
- package/packages/agentsam-contracts/dist/widgets.d.ts +2 -0
- package/packages/agentsam-contracts/package.json +42 -3
- package/packages/agentsam-contracts/schemas/activity.v1.schema.json +142 -0
- package/packages/agentsam-contracts/schemas/bim-model.v1.schema.json +76 -0
- package/packages/agentsam-contracts/schemas/resource-ref.v1.schema.json +18 -0
- package/packages/agentsam-contracts/schemas/run-receipt.v1.schema.json +411 -0
- package/packages/agentsam-contracts/schemas/run-start.v1.schema.json +40 -0
- package/packages/agentsam-contracts/schemas/run.v1.schema.json +243 -0
- package/packages/agentsam-contracts/schemas/sam-operation.v1.schema.json +8 -0
- package/packages/agentsam-contracts/schemas/scene-document.v2.schema.json +212 -0
- package/packages/agentsam-contracts/schemas/scene-format.v1.schema.json +173 -0
- package/packages/agentsam-contracts/schemas/source-types.v2.json +86 -1
- package/packages/agentsam-contracts/scripts/build.mjs +2 -1
- package/packages/agentsam-contracts/src/agent.ts +10 -18
- package/packages/agentsam-contracts/src/bim-model.ts +143 -0
- package/packages/agentsam-contracts/src/cad-source-formats.ts +195 -0
- package/packages/agentsam-contracts/src/design-workspace.ts +9 -0
- package/packages/agentsam-contracts/src/index.ts +6 -0
- package/packages/agentsam-contracts/src/json-schema.ts +37 -0
- package/packages/agentsam-contracts/src/operations.ts +12 -1
- package/packages/agentsam-contracts/src/resource-ref.ts +36 -0
- package/packages/agentsam-contracts/src/run.ts +93 -16
- package/packages/agentsam-contracts/src/scene-document.ts +58 -0
- package/packages/agentsam-contracts/src/scene-format.ts +91 -0
- package/packages/agentsam-contracts/src/source-types-registry.ts +65 -0
- package/packages/agentsam-contracts/src/tools.ts +4 -1
- package/packages/agentsam-contracts/src/widgets.ts +2 -0
- package/packages/agentsam-contracts/test/bim-model.test.mjs +66 -0
- package/packages/agentsam-contracts/test/cad-source-formats.test.mjs +103 -0
- package/packages/agentsam-contracts/test/contracts.test.mjs +23 -1
- package/packages/agentsam-contracts/test/resource-ref.test.mjs +29 -0
- package/packages/agentsam-contracts/test/run-contract.test.mjs +44 -0
- package/packages/agentsam-contracts/test/scene-document.test.mjs +30 -0
- package/packages/agentsam-contracts/test/scene-format.test.mjs +40 -0
- package/packages/agentsam-contracts/test/source-types.test.mjs +29 -0
- package/packages/agentsam-desktop-shell/scripts/app-discovery.mjs +36 -25
- package/packages/agentsam-errors/package.json +1 -1
- package/packages/agentsam-goalguru/agentsam.app.json +97 -0
- package/packages/agentsam-goap/package.json +2 -2
- package/packages/agentsam-hooks/package.json +1 -1
- package/packages/agentsam-knowledge/package.json +1 -1
- package/packages/agentsam-merch/package.json +1 -1
- package/packages/agentsam-nav/dist/Surfaces.d.ts +14 -4
- package/packages/agentsam-nav/dist/browser.global.js +16 -16
- package/packages/agentsam-nav/dist/browser.js +65 -22
- package/packages/agentsam-nav/dist/contracts.d.ts +2 -0
- package/packages/agentsam-nav/dist/index.d.ts +1 -1
- package/packages/agentsam-nav/dist/index.js +62 -21
- package/packages/agentsam-nav/dist/shell.css +149 -4
- package/packages/agentsam-nav/dist/theme.css +149 -4
- package/packages/agentsam-nav/dist/useAdminApps.d.ts +21 -2
- package/packages/agentsam-nav/package.json +1 -1
- package/packages/agentsam-occt/dist/native-provider.d.mts +1 -1
- package/packages/agentsam-occt/dist/native-provider.mjs +1 -1
- package/packages/agentsam-occt/package.json +1 -1
- package/packages/agentsam-occt/src/native-provider.mjs +1 -1
- package/packages/agentsam-queue-control/package.json +1 -1
- package/packages/agentsam-queue-control/src/adapters/sqlite.js +8 -6
- package/packages/agentsam-repository/package.json +1 -1
- package/packages/agentsam-vault/package.json +5 -1
- package/packages/agentsam-vault/src/crypto/aes-gcm.d.ts +25 -0
- package/packages/agentsam-vault/src/crypto/aes-gcm.js +149 -0
- package/packages/agentsam-vault/src/crypto/classify.d.ts +22 -0
- package/packages/agentsam-vault/src/crypto/classify.js +83 -0
- package/packages/agentsam-vault/src/crypto/oauth-envelope.d.ts +7 -0
- package/packages/agentsam-vault/src/index.js +10 -0
- package/packages/agentsam-vault/src/providers/registry.js +8 -0
- package/packages/agentsam-workbench/README.md +27 -3
- package/packages/agentsam-workbench/package.json +26 -4
- package/packages/agentsam-workbench/src/agent/AskAgentSamPill.tsx +17 -0
- package/packages/agentsam-workbench/src/agent/MiniAgentSam.tsx +144 -20
- package/packages/agentsam-workbench/src/agent/contextual-composer.css +7 -0
- package/packages/agentsam-workbench/src/agent/index.ts +1 -0
- package/packages/agentsam-workbench/src/agent/mini-agentsam.css +54 -0
- package/packages/agentsam-workbench/src/design/DesignWorkspaceFrame.tsx +277 -82
- package/packages/agentsam-workbench/src/design/design-workspace.css +173 -109
- package/packages/agentsam-workbench/src/index.ts +1 -0
- package/packages/agentsam-workbench/src/shell/InspectorPicker.tsx +38 -0
- package/packages/agentsam-workbench/src/shell/ResizableStage.tsx +26 -5
- package/packages/agentsam-workbench/src/shell/SidePanel.tsx +3 -3
- package/packages/agentsam-workbench/src/shell/StudioCommands.tsx +32 -0
- package/packages/agentsam-workbench/src/shell/appearance.d.mts +28 -0
- package/packages/agentsam-workbench/src/shell/appearance.mjs +279 -0
- package/packages/agentsam-workbench/src/shell/index.ts +2 -0
- package/packages/agentsam-workbench/src/shell/inspector-picker.css +48 -0
- package/packages/agentsam-workbench/src/shell/studio-icons.ts +104 -0
- package/packages/agentsam-workbench/src/shell/studio-panels.ts +21 -0
- package/packages/agentsam-workbench/src/widgets/registry.ts +4 -4
- package/packages/agentsam-workbench/src/workflows/WorkflowStudio.tsx +936 -0
- package/packages/agentsam-workbench/src/workflows/index.ts +5 -0
- package/packages/agentsam-workbench/src/workflows/model.ts +207 -0
- package/packages/agentsam-workbench/src/workflows/types.ts +206 -0
- package/packages/agentsam-workbench/src/workflows/workflow-studio.css +290 -0
- package/packages/catalog/generated/packages.json +157 -45
- package/packages/connectors/cfoa/package.json +7 -2
- package/packages/connectors/cfoa/src/PERMISSION_REGISTRY.md +45 -0
- package/packages/connectors/cfoa/src/api-client.js +4 -0
- package/packages/connectors/cfoa/src/capabilities.js +123 -285
- package/packages/connectors/cfoa/src/families/media.js +16 -12
- package/packages/connectors/cfoa/src/index.js +31 -37
- package/packages/connectors/cfoa/src/oauth-persist.js +18 -2
- package/packages/connectors/cfoa/src/permission-options.js +147 -1038
- package/packages/connectors/cfoa/src/routes.js +92 -35
- package/packages/connectors/cfoa/src/scope-catalog.js +16 -351
- package/packages/connectors/cfoa/src/scope-registry.js +248 -0
- package/packages/connectors/cfoa/test/scope-registry.test.mjs +168 -0
- package/packages/connectors/cfoa/tests/capabilities.test.mjs +86 -45
- package/packages/connectors/cfoa/tests/connector.test.mjs +143 -0
- package/packages/connectors/cfoa/tests/media-discovery.test.mjs +34 -10
- package/packages/identity/.agentsam/features/oauth-login-portal/agentsam.feature.json +1 -1
- package/packages/identity/agentsam.package.json +4 -4
- package/packages/identity/migrations/apply-portable.js +11 -4
- package/packages/identity/migrations/sqlite/007_identity_session_revoke_reason.sql +3 -0
- package/packages/identity/migrations/sqlite/008_identity_accounts.sql +41 -0
- package/packages/identity/migrations/sqlite/009_identity_scope.sql +30 -0
- package/packages/identity/package.json +11 -6
- package/packages/identity/schema/agentsam.identity/manifest.json +21 -4
- package/packages/identity/src/adapters/account-security-store.js +7 -0
- package/packages/identity/src/adapters/column-support.js +39 -0
- package/packages/identity/src/adapters/iam-compat/index.js +19 -4
- package/packages/identity/src/adapters/portable-d1/index.js +3 -1
- package/packages/identity/src/adapters/portable-store.js +80 -51
- package/packages/identity/src/app/verify-app.js +27 -0
- package/packages/identity/src/contracts/identity-store.js +2 -2
- package/packages/identity/src/core/password-gate.js +116 -0
- package/packages/identity/src/frontend/auth-portal/pages/login.html +1 -1
- package/packages/identity/src/frontend/auth-portal/pages/reset.html +1 -1
- package/packages/identity/src/frontend/auth-portal/pages/signup.html +1 -1
- package/packages/identity/src/frontend/auth-portal/shared/company-branding.js +18 -7
- package/packages/identity/src/frontend/auth-portal/shared/default-auth-logo.svg +4 -0
- package/packages/identity/src/frontend/auth-portal/store-access.js +97 -0
- package/packages/identity/src/migrations/0005_session_audit_columns.sql +6 -0
- package/packages/identity/src/migrations/README.md +2 -0
- package/packages/identity/src/oauth/native-handoff.js +2 -2
- package/packages/identity/src/server/identity-service.js +1 -1
- package/packages/identity/src/server/worker-router.js +16 -5
- package/packages/identity/tests/identity-portal-e2e.test.mjs +166 -0
- package/packages/identity/tests/lane1-identity-store-parity.test.mjs +17 -6
- package/packages/identity/tests/password-gate.test.mjs +66 -0
- package/packages/identity/tests/portable-identity-scope.test.mjs +59 -0
- package/packages/identity/tests/session-audit.test.mjs +135 -0
- package/packages/identity/tests/worker-portal-assets.test.mjs +47 -0
- package/packages/primetech-procedures/README.md +46 -5
- package/packages/primetech-procedures/agentsam.package.json +6 -6
- package/packages/primetech-procedures/package.json +14 -3
- package/packages/primetech-procedures/procedures/arch.assembly.calculate/procedure.json +83 -0
- package/packages/primetech-procedures/procedures/media.asset.preflight/procedure.json +85 -0
- package/packages/primetech-procedures/procedures/media.image.optimize-asset/procedure.json +102 -0
- package/packages/primetech-procedures/procedures/repo.asset.inventory/__pycache__/run.cpython-314.pyc +0 -0
- package/packages/primetech-procedures/procedures/repo.git.status/procedure.json +58 -0
- package/packages/primetech-procedures/procedures/repo.git.status/run.sh +10 -0
- package/packages/primetech-procedures/src/index.js +140 -41
- package/packages/primetech-procedures/test/__pycache__/test_inventory.cpython-314.pyc +0 -0
- package/packages/primetech-procedures/test/runtime-kinds.test.mjs +210 -0
- package/packages/theme-scenes/package.json +1 -1
- package/packages/work-graph/package.json +1 -1
- package/protocol/README.md +18 -0
- package/protocol/capabilities/capability-manifest.schema.json +111 -19
- package/protocol/capabilities/manifest.json +12 -1
- package/protocol/contracts/source-types.v2.json +86 -1
- package/protocol/product-releases/README.md +15 -12
- package/protocol/registry/universal-catalog.v1.json +2820 -0
- package/protocol/sam/activity.v1.schema.json +111 -17
- package/protocol/sam/operation.schema.json +8 -0
- package/protocol/sam/run-receipt.v1.schema.json +411 -0
- package/protocol/sam/run-start.v1.schema.json +40 -0
- package/protocol/sam/run.v1.schema.json +243 -0
- package/protocol/theme-refinery/d1-reconciliation.md +66 -32
- package/protocol/theme-refinery/product-metadata.schema.json +1 -1
- package/python/README.md +81 -8
- package/python/agentsam_sdk/cad/__init__.py +26 -3
- package/python/agentsam_sdk/cad/adapters/__init__.py +6 -0
- package/python/agentsam_sdk/cad/adapters/freecad.py +200 -0
- package/python/agentsam_sdk/cad/building.py +42 -0
- package/python/agentsam_sdk/cad/jobs.py +174 -0
- package/python/agentsam_sdk/cad/native.py +68 -9
- package/python/agentsam_sdk/cad/service.py +570 -0
- package/python/agentsam_sdk/cli.py +31 -0
- package/python/agentsam_sdk/client.py +49 -16
- package/python/agentsam_sdk/data/d1_bloat.py +0 -1
- package/python/agentsam_sdk/media/__init__.py +8 -0
- package/python/agentsam_sdk/media/opencv.py +188 -0
- package/python/agentsam_sdk/procedures/client.py +1 -1
- package/python/agentsam_sdk/registry_cli.py +88 -0
- package/python/agentsam_sdk/runtime/native.py +1 -1
- package/python/agentsam_sdk/terminal_art.py +5 -6
- package/python/pyproject.toml +3 -0
- package/python/tests/fixtures/freecad_host_cases.json +30 -0
- package/python/tests/test_bridge_policy.py +40 -0
- package/python/tests/test_cad_building_client.py +47 -0
- package/python/tests/test_cad_jobs_client.py +102 -0
- package/python/tests/test_cad_native.py +104 -1
- package/python/tests/test_cad_service_client.py +288 -0
- package/python/tests/test_opencv_media.py +79 -0
- package/python/tests/test_procedure_client.py +6 -0
- package/python/tests/test_public_client.py +13 -0
- package/services/cad/blender/adapter.py +49 -0
- package/services/cad/ifc/__pycache__/adapter.cpython-311.pyc +0 -0
- package/services/cad/ifc/adapter.py +836 -0
- package/services/cad/server.py +435 -132
- package/skills/README.md +1 -1
- package/skills/agentsam-app-fundamentals/agentsam.skill.json +20 -0
- package/skills/agentsam-arch-bim/SKILL.md +166 -6
- package/skills/agentsam-arch-bim/agentsam.skill.json +2 -2
- package/skills/agentsam-cad/SKILL.md +122 -36
- package/skills/agentsam-cad/agentsam.skill.json +20 -0
- package/skills/agentsam-cad/evals/README.md +56 -0
- package/skills/agentsam-cad/references/engines-and-lanes.md +70 -0
- package/skills/agentsam-cad/references/projects-and-operations.md +112 -0
- package/skills/agentsam-cad/references/proof-and-triage.md +89 -0
- package/skills/agentsam-cad/references/python-service-and-jobs.md +102 -0
- package/skills/agentsam-cad/references/scene-geometry-bim.md +113 -0
- package/skills/agentsam-canvas-creation/agentsam.skill.json +20 -0
- package/skills/agentsam-cloudflare-workers/agentsam.skill.json +20 -0
- package/skills/agentsam-cms-ready-creation/agentsam.skill.json +20 -0
- package/skills/agentsam-codebaseindex/agentsam.skill.json +20 -0
- package/skills/agentsam-jr-dev/agentsam.skill.json +20 -0
- package/skills/agentsam-plan-and-goap/agentsam.skill.json +20 -0
- package/skills/agentsam-progression-guard/agentsam.skill.json +20 -0
- package/skills/agentsam-repo-recon/agentsam.skill.json +20 -0
- package/skills/agentsam-sam-operations/SKILL.md +76 -36
- package/skills/agentsam-sam-operations/agentsam.skill.json +20 -0
- package/skills/agentsam-sdk-orientation/agentsam.skill.json +20 -0
- package/skills/catalog.json +21 -6
- package/src/acp/agent-executor.js +38 -2
- package/src/acp/client.js +128 -39
- package/src/acp/dependencies.js +159 -19
- package/src/acp/http.js +14 -0
- package/src/acp/index.js +3 -0
- package/src/acp/runs.js +5 -3
- package/src/agent/capability-adapter.js +21 -23
- package/src/cli/command-catalog.js +4 -4
- package/src/cli/desktop-launch.js +2 -2
- package/src/cli/update-check.js +131 -0
- package/src/cli.js +6 -5
- package/src/commands/account-auth.js +36 -26
- package/src/commands/app-inventory.js +343 -0
- package/src/commands/app.js +162 -27
- package/src/commands/ast.js +80 -0
- package/src/commands/cad.js +2 -0
- package/src/commands/cheat-sheet.js +1 -1
- package/src/commands/cloudflare-login.js +170 -65
- package/src/commands/cloudflare-status.js +38 -0
- package/src/commands/cloudflare.js +54 -42
- package/src/commands/codebaseindex.js +34 -13
- package/src/commands/db.js +2 -2
- package/src/commands/go.js +1 -1
- package/src/commands/interactive.js +5 -0
- package/src/commands/knowledge.js +4 -2
- package/src/commands/mcp.js +5 -2
- package/src/commands/preferences.js +48 -6
- package/src/commands/product.js +4 -4
- package/src/commands/run.js +3 -4
- package/src/commands/shell.js +32 -10
- package/src/go/contract.js +1 -1
- package/src/go/official-registry.js +41 -36
- package/src/go/product-catalog.test.mjs +52 -0
- package/src/go/receipts.js +19 -6
- package/src/indexing/index.js +10 -0
- package/src/indexing/live-ast.js +200 -0
- package/src/indexing/live-cad-graph.js +107 -0
- package/src/indexing/live-resource-graph.js +95 -0
- package/src/knowledge/config.js +5 -4
- package/src/knowledge/store-discovery.js +22 -5
- package/src/knowledge/stores/d1.js +141 -0
- package/src/lib/auth.js +7 -4
- package/src/lib/cad/bim-bridge.d.ts +6 -0
- package/src/lib/cad/bim-bridge.js +96 -0
- package/src/lib/cad/d1-project-store.js +1 -1
- package/src/lib/cad/delivery-profiles.d.ts +1 -1
- package/src/lib/cad/delivery-profiles.js +82 -6
- package/src/lib/cad/format-policy.d.ts +11 -0
- package/src/lib/cad/format-policy.js +14 -0
- package/src/lib/cad/freecad-host.d.ts +19 -0
- package/src/lib/cad/freecad-host.js +171 -0
- package/src/lib/cad/freecad.js +38 -65
- package/src/lib/cad/ifc-cli.js +82 -0
- package/src/lib/cad/ifc.js +152 -0
- package/src/lib/cad/index.js +3 -0
- package/src/lib/cad/production-operations.js +2 -0
- package/src/lib/cad/project-runtime.js +2 -2
- package/src/lib/cad/project-v2.js +13 -25
- package/src/lib/cad-docker.js +35 -17
- package/src/lib/whoami-capabilities.js +8 -14
- package/src/mcp/cloudflare-bundles.js +39 -41
- package/src/models/inventory-core.d.ts +32 -1
- package/src/models/inventory-core.js +118 -36
- package/src/plugins/cloudflare.js +3 -3
- package/src/plugins/completeful.js +2 -4
- package/src/plugins/contracts.js +2 -3
- package/src/plugins/creative.js +2 -2
- package/src/plugins/registry.js +52 -33
- package/src/plugins/runtime.js +64 -13
- package/src/registry/generated/inventory.json +289 -66
- package/src/registry/universal-reconcile.js +120 -0
- package/src/registry/universal-source.js +253 -0
- package/src/sam/adapters/opencv-video.js +206 -0
- package/src/sam/adapters/workspace-media.js +15 -2
- package/src/sam/bridge/policy.mjs +50 -0
- package/src/sam/bridge/stdio.mjs +61 -38
- package/src/sam/operations/architectural-knowledge.js +1 -0
- package/src/sam/operations/artifact-render.js +2 -1
- package/src/sam/operations/cad-bim-ifc.js +89 -0
- package/src/sam/operations/decision-evaluate.js +1 -0
- package/src/sam/operations/planning-goap.js +1 -0
- package/src/sam/operations/repository-inspect.js +1 -0
- package/src/sam/operations/robotics.js +1 -1
- package/src/sam/packs/core.js +2 -0
- package/src/sam/packs/evidence/endpoint.js +39 -0
- package/src/sam/packs/evidence/media.js +3 -2
- package/src/sam/packs/evidence/store-hosted.js +5 -3
- package/src/sam/shell-host.js +26 -8
- package/src/skills/catalog.js +12 -1
- package/src/skills/registry.js +16 -17
- package/src/ui/boot.js +12 -14
- package/src/ui/brand/agentsam-mark.generated.js +49 -0
- package/src/ui/cli/prompt-box.js +151 -0
- package/src/ui/home-screen.js +49 -0
- package/apps/README.md +0 -67
- package/apps/cad-creator/README.md +0 -743
- package/packages/agentsam-brand/LICENSE +0 -110
- package/packages/agentsam-desktop-shell/LICENSE +0 -110
- package/packages/agentsam-desktop-shell/README.md +0 -73
- package/packages/agentsam-ide/LICENSE +0 -110
- package/packages/agentsam-ide/README.md +0 -147
- package/packages/agentsam-nav/LICENSE +0 -110
- package/packages/agentsam-vault/LICENSE +0 -110
- package/packages/agentsam-workbench/LICENSE +0 -110
- package/src/ui/art/geaux_boot.json +0 -25
- package/src/ui/companion-art.js +0 -40
- /package/{apps/cad-creator → packages/primetech-procedures}/LICENSE +0 -0
|
@@ -9,70 +9,82 @@
|
|
|
9
9
|
/** Per-extension capabilities */
|
|
10
10
|
export const FORMAT_CAPABILITIES = Object.freeze({
|
|
11
11
|
// Raster
|
|
12
|
-
png: { family: 'raster', resize_ladder: true, poster_frame: false, recolorable: false, transparency: true, ingest: true, edit: true },
|
|
13
|
-
jpg: { family: 'raster', resize_ladder: true, poster_frame: false, recolorable: false, transparency: false, ingest: true, edit: true },
|
|
14
|
-
jpeg: { family: 'raster', resize_ladder: true, poster_frame: false, recolorable: false, transparency: false, ingest: true, edit: true },
|
|
15
|
-
webp: { family: 'raster', resize_ladder: true, poster_frame: false, recolorable: false, transparency: true, ingest: true, edit: true },
|
|
16
|
-
avif: { family: 'raster', resize_ladder: true, poster_frame: false, recolorable: false, transparency: true, ingest: true, edit: true },
|
|
17
|
-
gif: { family: 'raster', resize_ladder: true, poster_frame: false, recolorable: false, transparency: true, ingest: true, edit: true, animated: true },
|
|
12
|
+
png: { family: 'raster', resize_ladder: true, poster_frame: false, recolorable: false, transparency: true, ingest: true, edit: true, inspect: true, convert: true, optimize: true, preview: true, export: true },
|
|
13
|
+
jpg: { family: 'raster', resize_ladder: true, poster_frame: false, recolorable: false, transparency: false, ingest: true, edit: true, inspect: true, convert: true, optimize: true, preview: true, export: true },
|
|
14
|
+
jpeg: { family: 'raster', resize_ladder: true, poster_frame: false, recolorable: false, transparency: false, ingest: true, edit: true, inspect: true, convert: true, optimize: true, preview: true, export: true },
|
|
15
|
+
webp: { family: 'raster', resize_ladder: true, poster_frame: false, recolorable: false, transparency: true, ingest: true, edit: true, inspect: true, convert: true, optimize: true, preview: true, export: true },
|
|
16
|
+
avif: { family: 'raster', resize_ladder: true, poster_frame: false, recolorable: false, transparency: true, ingest: true, edit: true, inspect: true, convert: true, optimize: true, preview: true, export: true },
|
|
17
|
+
gif: { family: 'raster', resize_ladder: true, poster_frame: false, recolorable: false, transparency: true, ingest: true, edit: true, inspect: true, convert: true, optimize: true, preview: true, export: true, animated: true },
|
|
18
18
|
apng: { family: 'raster', resize_ladder: false, poster_frame: false, recolorable: false, transparency: true, ingest: true, edit: false, animated: true },
|
|
19
|
-
tiff: { family: 'raster', resize_ladder: true, poster_frame: false, recolorable: false, transparency: true, ingest: true, edit: true },
|
|
20
|
-
tif: { family: 'raster', resize_ladder: true, poster_frame: false, recolorable: false, transparency: true, ingest: true, edit: true },
|
|
19
|
+
tiff: { family: 'raster', resize_ladder: true, poster_frame: false, recolorable: false, transparency: true, ingest: true, edit: true, inspect: true, convert: true, optimize: true, preview: true, export: true },
|
|
20
|
+
tif: { family: 'raster', resize_ladder: true, poster_frame: false, recolorable: false, transparency: true, ingest: true, edit: true, inspect: true, convert: true, optimize: true, preview: true, export: true },
|
|
21
21
|
heic: { family: 'raster', resize_ladder: true, poster_frame: false, recolorable: false, transparency: false, ingest: true, edit: false },
|
|
22
22
|
heif: { family: 'raster', resize_ladder: true, poster_frame: false, recolorable: false, transparency: false, ingest: true, edit: false },
|
|
23
23
|
|
|
24
24
|
// Vector / print ingest (preserve; limited edit)
|
|
25
|
-
svg: { family: 'vector', resize_ladder: false, poster_frame: false, recolorable: true, ingest: true, edit: true },
|
|
26
|
-
pdf: { family: 'vector', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, preserve: true },
|
|
27
|
-
eps: { family: 'vector', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, preserve: true },
|
|
28
|
-
ai: { family: 'vector', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, preserve: true },
|
|
25
|
+
svg: { family: 'vector', resize_ladder: false, poster_frame: false, recolorable: true, ingest: true, edit: true, inspect: true, convert: true, preview: true, export: true },
|
|
26
|
+
pdf: { family: 'vector', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, export: true, preserve: true },
|
|
27
|
+
eps: { family: 'vector', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, export: true, preserve: true },
|
|
28
|
+
ai: { family: 'vector', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, export: true, preserve: true },
|
|
29
29
|
|
|
30
30
|
// Platform icons
|
|
31
|
-
ico: { family: 'platform', resize_ladder: false, poster_frame: false, recolorable: false, platform: true, ingest: true, edit: false },
|
|
32
|
-
icns: { family: 'platform', resize_ladder: false, poster_frame: false, recolorable: false, platform: true, ingest: true, edit: false },
|
|
31
|
+
ico: { family: 'platform', resize_ladder: false, poster_frame: false, recolorable: false, platform: true, ingest: true, edit: false, inspect: true, export: true, preserve: true },
|
|
32
|
+
icns: { family: 'platform', resize_ladder: false, poster_frame: false, recolorable: false, platform: true, ingest: true, edit: false, inspect: true, export: true, preserve: true },
|
|
33
33
|
|
|
34
34
|
// Video
|
|
35
|
-
mp4: { family: 'video', resize_ladder: false, poster_frame: true, recolorable: false, ingest: true, edit: false },
|
|
36
|
-
mov: { family: 'video', resize_ladder: false, poster_frame: true, recolorable: false, ingest: true, edit: false },
|
|
37
|
-
webm: { family: 'video', resize_ladder: false, poster_frame: true, recolorable: false, ingest: true, edit: false },
|
|
38
|
-
mkv: { family: 'video', resize_ladder: false, poster_frame: true, recolorable: false, ingest: true, edit: false, preserve: true },
|
|
35
|
+
mp4: { family: 'video', resize_ladder: false, poster_frame: true, recolorable: false, ingest: true, edit: false, export: true, preserve: true },
|
|
36
|
+
mov: { family: 'video', resize_ladder: false, poster_frame: true, recolorable: false, ingest: true, edit: false, export: true, preserve: true },
|
|
37
|
+
webm: { family: 'video', resize_ladder: false, poster_frame: true, recolorable: false, ingest: true, edit: false, export: true, preserve: true },
|
|
38
|
+
mkv: { family: 'video', resize_ladder: false, poster_frame: true, recolorable: false, ingest: true, edit: false, export: true, preserve: true, preserve: true },
|
|
39
39
|
|
|
40
40
|
// Motion graphics
|
|
41
|
-
lottie: { family: 'motion-graphics', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, ext_alias: 'json' },
|
|
42
|
-
riv: { family: 'motion-graphics', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false },
|
|
41
|
+
lottie: { family: 'motion-graphics', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, export: true, preserve: true, ext_alias: 'json' },
|
|
42
|
+
riv: { family: 'motion-graphics', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, export: true, preserve: true },
|
|
43
43
|
|
|
44
44
|
// 3D
|
|
45
|
-
glb: { family: 'model', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false },
|
|
46
|
-
gltf: { family: 'model', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false },
|
|
47
|
-
usdz: { family: 'model', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false },
|
|
48
|
-
obj: { family: 'model', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, preserve: true },
|
|
49
|
-
fbx: { family: 'model', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, preserve: true },
|
|
45
|
+
glb: { family: 'model', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, export: true, preserve: true },
|
|
46
|
+
gltf: { family: 'model', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, export: true, preserve: true },
|
|
47
|
+
usdz: { family: 'model', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, export: true, preserve: true },
|
|
48
|
+
obj: { family: 'model', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, export: true, preserve: true, preserve: true },
|
|
49
|
+
fbx: { family: 'model', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, export: true, preserve: true, preserve: true },
|
|
50
50
|
|
|
51
51
|
// Textures
|
|
52
|
-
ktx2: { family: 'texture', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false },
|
|
52
|
+
ktx2: { family: 'texture', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, export: true, preserve: true },
|
|
53
53
|
|
|
54
54
|
// Fonts — licensing gate required before redistribute
|
|
55
|
-
otf: { family: 'font', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, licensing_required: true },
|
|
56
|
-
ttf: { family: 'font', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, licensing_required: true },
|
|
57
|
-
woff: { family: 'font', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, licensing_required: true },
|
|
58
|
-
woff2: { family: 'font', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, licensing_required: true },
|
|
55
|
+
otf: { family: 'font', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, export: true, preserve: true, licensing_required: true },
|
|
56
|
+
ttf: { family: 'font', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, export: true, preserve: true, licensing_required: true },
|
|
57
|
+
woff: { family: 'font', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, export: true, preserve: true, licensing_required: true },
|
|
58
|
+
woff2: { family: 'font', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, export: true, preserve: true, licensing_required: true },
|
|
59
59
|
|
|
60
60
|
// Tokens / theme / docs / code
|
|
61
|
-
json: { family: 'tokens', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: true },
|
|
62
|
-
yaml: { family: 'tokens', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: true },
|
|
63
|
-
yml: { family: 'tokens', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: true },
|
|
64
|
-
css: { family: 'theme', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: true },
|
|
65
|
-
scss: { family: 'theme', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: true },
|
|
66
|
-
md: { family: 'docs', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: true },
|
|
67
|
-
markdown: { family: 'docs', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: true },
|
|
68
|
-
html: { family: 'docs', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: true, extractable: true },
|
|
69
|
-
htm: { family: 'docs', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: true, extractable: true },
|
|
61
|
+
json: { family: 'tokens', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: true, inspect: true, export: true, preserve: true },
|
|
62
|
+
yaml: { family: 'tokens', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: true, inspect: true, export: true, preserve: true },
|
|
63
|
+
yml: { family: 'tokens', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: true, inspect: true, export: true, preserve: true },
|
|
64
|
+
css: { family: 'theme', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: true, inspect: true, export: true, preserve: true },
|
|
65
|
+
scss: { family: 'theme', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: true, inspect: true, export: true, preserve: true },
|
|
66
|
+
md: { family: 'docs', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: true, inspect: true, export: true, preserve: true },
|
|
67
|
+
markdown: { family: 'docs', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: true, inspect: true, export: true, preserve: true },
|
|
68
|
+
html: { family: 'docs', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: true, inspect: true, export: true, preserve: true, extractable: true },
|
|
69
|
+
htm: { family: 'docs', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: true, inspect: true, export: true, preserve: true, extractable: true },
|
|
70
|
+
// Office / interchange documents are inventoried and preserved. Deep text,
|
|
71
|
+
// table, slide, and embedded-media extraction belongs to document readers.
|
|
72
|
+
docx: { family: 'document', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, export: true, preserve: true },
|
|
73
|
+
pptx: { family: 'document', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, export: true, preserve: true },
|
|
74
|
+
xlsx: { family: 'document', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, export: true, preserve: true },
|
|
75
|
+
odt: { family: 'document', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, export: true, preserve: true },
|
|
76
|
+
odp: { family: 'document', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, export: true, preserve: true },
|
|
77
|
+
ods: { family: 'document', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, export: true, preserve: true },
|
|
78
|
+
rtf: { family: 'document', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: false, export: true, preserve: true },
|
|
79
|
+
txt: { family: 'document', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: true },
|
|
80
|
+
csv: { family: 'document', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: true },
|
|
81
|
+
xml: { family: 'document', resize_ladder: false, poster_frame: false, recolorable: false, ingest: true, edit: true },
|
|
70
82
|
|
|
71
83
|
// Archives (ingest containers — not assets themselves)
|
|
72
|
-
zip: { family: 'archive', resize_ladder: false, ingest: true, edit: false, container: true },
|
|
73
|
-
tar: { family: 'archive', resize_ladder: false, ingest: true, edit: false, container: true },
|
|
74
|
-
gz: { family: 'archive', resize_ladder: false, ingest: true, edit: false, container: true },
|
|
75
|
-
tgz: { family: 'archive', resize_ladder: false, ingest: true, edit: false, container: true },
|
|
84
|
+
zip: { family: 'archive', resize_ladder: false, ingest: true, edit: false, inspect: true, export: true, preserve: true, container: true },
|
|
85
|
+
tar: { family: 'archive', resize_ladder: false, ingest: true, edit: false, inspect: true, export: true, preserve: true, container: true },
|
|
86
|
+
gz: { family: 'archive', resize_ladder: false, ingest: true, edit: false, inspect: true, export: true, preserve: true, container: true },
|
|
87
|
+
tgz: { family: 'archive', resize_ladder: false, ingest: true, edit: false, inspect: true, export: true, preserve: true, container: true },
|
|
76
88
|
});
|
|
77
89
|
|
|
78
90
|
/**
|
|
@@ -166,6 +178,13 @@ export const FORMAT_FAMILIES = Object.freeze({
|
|
|
166
178
|
web_delivery: ['html'],
|
|
167
179
|
export: ['pdf', 'html', 'md'],
|
|
168
180
|
},
|
|
181
|
+
document: {
|
|
182
|
+
ingest: ['docx', 'pptx', 'xlsx', 'odt', 'odp', 'ods', 'rtf', 'txt', 'csv', 'xml'],
|
|
183
|
+
canonical: [],
|
|
184
|
+
web_delivery: [],
|
|
185
|
+
export: [],
|
|
186
|
+
preserve_original: true,
|
|
187
|
+
},
|
|
169
188
|
archive: {
|
|
170
189
|
ingest: ['zip', 'tar', 'gz', 'tgz'],
|
|
171
190
|
canonical: [],
|
|
@@ -175,13 +194,54 @@ export const FORMAT_FAMILIES = Object.freeze({
|
|
|
175
194
|
},
|
|
176
195
|
});
|
|
177
196
|
|
|
197
|
+
const OPERATION_KEYS = Object.freeze([
|
|
198
|
+
'read',
|
|
199
|
+
'inspect',
|
|
200
|
+
'edit',
|
|
201
|
+
'generate',
|
|
202
|
+
'convert',
|
|
203
|
+
'optimize',
|
|
204
|
+
'preview',
|
|
205
|
+
'export',
|
|
206
|
+
'preserve_original',
|
|
207
|
+
'validate_roundtrip',
|
|
208
|
+
]);
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Return explicit operation support without confusing ingest with editability.
|
|
212
|
+
* `read` means the source can be imported/preserved; `inspect` means the
|
|
213
|
+
* BrandPack processor has a real metadata/content inspection path. Other
|
|
214
|
+
* operations are true only when the format row declares them explicitly.
|
|
215
|
+
*/
|
|
178
216
|
export function formatCapabilities(format) {
|
|
179
217
|
const key = String(format || '').toLowerCase().replace(/^\./, '');
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
218
|
+
const row = FORMAT_CAPABILITIES[key];
|
|
219
|
+
if (!row) {
|
|
220
|
+
return {
|
|
221
|
+
resize_ladder: false,
|
|
222
|
+
poster_frame: false,
|
|
223
|
+
recolorable: false,
|
|
224
|
+
unknown: true,
|
|
225
|
+
operations: Object.fromEntries(OPERATION_KEYS.map((operation) => [operation, false])),
|
|
226
|
+
inspection_level: 'unsupported',
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
const operations = {
|
|
230
|
+
read: row.ingest === true,
|
|
231
|
+
inspect: row.inspect === true,
|
|
232
|
+
edit: row.edit === true,
|
|
233
|
+
generate: row.generate === true,
|
|
234
|
+
convert: row.convert === true,
|
|
235
|
+
optimize: row.optimize === true,
|
|
236
|
+
preview: row.preview === true,
|
|
237
|
+
export: row.export === true,
|
|
238
|
+
preserve_original: row.preserve === true || row.preserve_original === true || row.ingest === true,
|
|
239
|
+
validate_roundtrip: row.validate_roundtrip === true,
|
|
240
|
+
};
|
|
241
|
+
return {
|
|
242
|
+
...row,
|
|
243
|
+
operations,
|
|
244
|
+
inspection_level: operations.inspect ? 'metadata_and_declared_content' : operations.read ? 'inventory_only' : 'unsupported',
|
|
185
245
|
};
|
|
186
246
|
}
|
|
187
247
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { formatCapabilities } from './core/capabilities.js';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Color / token helpers — pure, deterministic.
|
|
3
5
|
*/
|
|
@@ -122,5 +124,8 @@ export function isComponentPath(relPath) {
|
|
|
122
124
|
}
|
|
123
125
|
|
|
124
126
|
export function isAssetPath(relPath) {
|
|
125
|
-
|
|
127
|
+
const value = String(relPath || '');
|
|
128
|
+
const ext = value.split('/').pop()?.split('.').pop()?.toLowerCase() || '';
|
|
129
|
+
const capabilities = formatCapabilities(ext);
|
|
130
|
+
return capabilities.unknown !== true && capabilities.ingest === true;
|
|
126
131
|
}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
export { brandScan } from './scan.js';
|
|
9
9
|
export { brandResolve, parseDeclaredColor } from './resolve.js';
|
|
10
10
|
export { buildBrandContractDraft, writeBrandArtifacts } from './contract.js';
|
|
11
|
+
export { normalizeBrandWorkspace, brandColors, brandContrast, renderBrandCoverSvg, renderCreationTileSvg } from './workspace.js';
|
|
11
12
|
export { brandPlan } from './plan.js';
|
|
12
13
|
export {
|
|
13
14
|
brandGoapActions,
|
|
@@ -40,8 +40,22 @@ export function inspectBrandEvidence(scan, options = {}) {
|
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
function assetRows(scan) {
|
|
44
|
+
const source = scan.assets;
|
|
45
|
+
if (Array.isArray(source)) return source;
|
|
46
|
+
if (Array.isArray(source?.items)) return source.items;
|
|
47
|
+
// Older repository scans exposed only a path sample. Keep those references
|
|
48
|
+
// visible rather than returning a misleading empty inventory.
|
|
49
|
+
if (Array.isArray(source?.sample)) {
|
|
50
|
+
return source.sample.map((entry) => typeof entry === 'string'
|
|
51
|
+
? { path: entry, label: entry.split('/').pop(), provenance: { source: 'repository.snapshot.sample', needs_review: true } }
|
|
52
|
+
: entry);
|
|
53
|
+
}
|
|
54
|
+
return [];
|
|
55
|
+
}
|
|
56
|
+
|
|
43
57
|
export function listBrandAssetEvidence(scan) {
|
|
44
|
-
return
|
|
58
|
+
return assetRows(assertScan(scan)).map((asset, index) => ({
|
|
45
59
|
id: assetId(asset, index),
|
|
46
60
|
...asset,
|
|
47
61
|
}));
|
|
@@ -7,6 +7,8 @@ import {
|
|
|
7
7
|
isComponentPath,
|
|
8
8
|
isStylePath,
|
|
9
9
|
} from './extract.js';
|
|
10
|
+
import { classifyAssetRole } from './core/v2/roles.js';
|
|
11
|
+
import { formatCapabilities } from './core/capabilities.js';
|
|
10
12
|
|
|
11
13
|
function sha256Json(value) {
|
|
12
14
|
return createHash('sha256').update(JSON.stringify(value)).digest('hex');
|
|
@@ -52,6 +54,7 @@ function stableSortTokens(arr) {
|
|
|
52
54
|
* repositorySnapshot?: (opts: object) => Promise<object>,
|
|
53
55
|
* onEvent?: (ev: object) => void,
|
|
54
56
|
* maxFiles?: number,
|
|
57
|
+
* maxAssetItems?: number,
|
|
55
58
|
* }} opts
|
|
56
59
|
*/
|
|
57
60
|
export async function brandScan(opts = {}) {
|
|
@@ -185,6 +188,47 @@ export async function brandScan(opts = {}) {
|
|
|
185
188
|
}
|
|
186
189
|
conflicts.sort((a, b) => (b.occurrences || 0) - (a.occurrences || 0));
|
|
187
190
|
|
|
191
|
+
const assetItemLimit = Math.max(1, Math.min(2500, Number(opts.maxAssetItems) || 500));
|
|
192
|
+
const fileMetadata = new Map((snapshot.tree.files || []).map((entry) => [entry.path, entry]));
|
|
193
|
+
const assetItems = assetPaths.slice(0, assetItemLimit).map((rel) => {
|
|
194
|
+
const file = fileMetadata.get(rel) || {};
|
|
195
|
+
const extension = path.extname(rel).slice(1).toLowerCase();
|
|
196
|
+
const format = formatCapabilities(extension);
|
|
197
|
+
const classification = format.container
|
|
198
|
+
? { role: 'source.archive', family: 'archive', label: 'Source archive', confidence: 1, needs_review: false }
|
|
199
|
+
: classifyAssetRole({ path: rel });
|
|
200
|
+
return {
|
|
201
|
+
id: `repo-asset:${rel}`,
|
|
202
|
+
role: classification.role,
|
|
203
|
+
family: classification.family || format.family || 'other',
|
|
204
|
+
label: classification.label || path.basename(rel),
|
|
205
|
+
path: rel,
|
|
206
|
+
format: extension || null,
|
|
207
|
+
bytes: Number.isSafeInteger(file.size) ? file.size : null,
|
|
208
|
+
sha256: typeof file.hash === 'string' ? file.hash : null,
|
|
209
|
+
capabilities: {
|
|
210
|
+
ingest: format.ingest === true,
|
|
211
|
+
edit: format.edit === true,
|
|
212
|
+
resize_ladder: format.resize_ladder === true,
|
|
213
|
+
poster_frame: format.poster_frame === true,
|
|
214
|
+
recolorable: format.recolorable === true,
|
|
215
|
+
preserve_original: format.preserve === true || format.ingest === true,
|
|
216
|
+
container: format.container === true,
|
|
217
|
+
licensing_required: format.licensing_required === true,
|
|
218
|
+
operations: format.operations,
|
|
219
|
+
inspection_level: format.inspection_level,
|
|
220
|
+
},
|
|
221
|
+
provenance: {
|
|
222
|
+
source: 'repository.snapshot',
|
|
223
|
+
snapshot_id: snapshot.snapshot_id,
|
|
224
|
+
repository_id: snapshot.repository?.repository_id || null,
|
|
225
|
+
revision_sha: snapshot.repository?.revision_sha || null,
|
|
226
|
+
confidence: classification.confidence,
|
|
227
|
+
needs_review: classification.needs_review,
|
|
228
|
+
},
|
|
229
|
+
};
|
|
230
|
+
});
|
|
231
|
+
|
|
188
232
|
const body = {
|
|
189
233
|
schema_version: 1,
|
|
190
234
|
capability: 'brand.scan',
|
|
@@ -216,6 +260,9 @@ export async function brandScan(opts = {}) {
|
|
|
216
260
|
assets: {
|
|
217
261
|
count: assetPaths.length,
|
|
218
262
|
sample: assetPaths.slice(0, 24),
|
|
263
|
+
items: assetItems,
|
|
264
|
+
truncated: assetPaths.length > assetItems.length,
|
|
265
|
+
inventory_source: 'repository.snapshot',
|
|
219
266
|
},
|
|
220
267
|
conflicts: conflicts.slice(0, 50),
|
|
221
268
|
evidence: [],
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type BrandColor = { name: string; value: string; usage: string; sourceValue: string };
|
|
2
|
+
export type BrandWorkspaceEntry = {
|
|
3
|
+
id: string; name: string; status: string; contract: Record<string, unknown>;
|
|
4
|
+
colors: unknown; assets: unknown; sources: unknown; themes: unknown; lastChange?: string;
|
|
5
|
+
};
|
|
6
|
+
export type BrandWorkspaceReadModel = {
|
|
7
|
+
workspaceId: string; brands: BrandWorkspaceEntry[]; connections: unknown[];
|
|
8
|
+
activeBrandId: string | null; source: "authorized_brand_workspace";
|
|
9
|
+
};
|
|
10
|
+
export declare function normalizeBrandWorkspace(raw: unknown): BrandWorkspaceReadModel;
|
|
11
|
+
export declare function brandColors(source: unknown, themeId?: string): BrandColor[];
|
|
12
|
+
export declare function brandContrast(a: string, b: string): number | null;
|
|
13
|
+
export declare function renderBrandCoverSvg(args?: {
|
|
14
|
+
id?: string; name?: string; tagline?: string; colors?: unknown; themeId?: string;
|
|
15
|
+
}): string | null;
|
|
16
|
+
export declare function renderCreationTileSvg(args?: {
|
|
17
|
+
type?: "slides" | "design" | "code" | "system" | "whiteboard";
|
|
18
|
+
tint?: string; ink?: string; seed?: string;
|
|
19
|
+
}): string | null;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brand Workspace read model and deterministic SVG presentation.
|
|
3
|
+
*
|
|
4
|
+
* Brand identity is NOT a CMS application theme. A brand has independent
|
|
5
|
+
* source evidence, an approval state and an optional list of visual variants.
|
|
6
|
+
* This module does not write records, invent tokens or fetch resources.
|
|
7
|
+
*/
|
|
8
|
+
const record = value => value !== null && typeof value === 'object' && !Array.isArray(value) ? value : {};
|
|
9
|
+
const safe = value => String(value ?? '').trim();
|
|
10
|
+
const colorPattern = /^(?:#[0-9a-f]{3,8}|rgba?\(\s*[\d.%\s,\/+-]+\)|hsla?\(\s*[\d.%\s,\/+-]+\)|oklch\(\s*[\d.%\s,\/+-]+\))$/i;
|
|
11
|
+
const escapeXml = value => safe(value).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''');
|
|
12
|
+
|
|
13
|
+
function entriesFromTokenSource(source) {
|
|
14
|
+
if (Array.isArray(source)) return source.filter(item => item && typeof item === 'object').map(item => ({
|
|
15
|
+
name: safe(item.name), value: safe(item.value), usage: safe(item.usage),
|
|
16
|
+
})).filter(item => item.name);
|
|
17
|
+
return Object.entries(record(source)).map(([name, raw]) => ({
|
|
18
|
+
name, value: safe(typeof raw === 'string' ? raw : record(raw).value), usage: safe(record(raw).usage),
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Preserve the source's exact values. Resolve aliases only within the supplied
|
|
24
|
+
* family. CSS variables and generated gradient values are not brand evidence.
|
|
25
|
+
*/
|
|
26
|
+
export function brandColors(source, themeId = '') {
|
|
27
|
+
const raw = Array.isArray(source) ? source : record(source);
|
|
28
|
+
const input = entriesFromTokenSource(raw);
|
|
29
|
+
const aliases = new Map(input.map(item => [item.name, item.value]));
|
|
30
|
+
const resolve = (value, visited = new Set()) => {
|
|
31
|
+
if (colorPattern.test(value)) return value;
|
|
32
|
+
const alias = value.replace(/^\{([^}]+)\}$/, '$1').replace(/^\$/, '');
|
|
33
|
+
if (!alias || visited.has(alias) || !aliases.has(alias)) return null;
|
|
34
|
+
visited.add(alias);
|
|
35
|
+
return resolve(aliases.get(alias), visited);
|
|
36
|
+
};
|
|
37
|
+
return input.map(item => {
|
|
38
|
+
const rawItem = Array.isArray(source) ? source.find(entry => record(entry).name === item.name) : record(source)[item.name];
|
|
39
|
+
const perTheme = record(record(rawItem).themes);
|
|
40
|
+
const themed = themeId && typeof perTheme[themeId] === 'string' ? perTheme[themeId] : item.value;
|
|
41
|
+
return { name: item.name, value: resolve(themed), usage: item.usage, sourceValue: themed };
|
|
42
|
+
}).filter(item => item.value);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function fromContract(contract) {
|
|
46
|
+
const c = record(contract);
|
|
47
|
+
return {
|
|
48
|
+
id: safe(c.id || c.brand_id || record(c.brand).id),
|
|
49
|
+
name: safe(c.name || record(c.identity).name || record(c.brand).name),
|
|
50
|
+
status: safe(c.status || 'draft'),
|
|
51
|
+
contract: c,
|
|
52
|
+
colors: record(record(c.visual_system).colors).resolved || record(c.tokens).color || {},
|
|
53
|
+
assets: c.assets || [],
|
|
54
|
+
sources: c.sources || [],
|
|
55
|
+
themes: c.themes || [],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function fromBrandEntry(entry) {
|
|
60
|
+
const e = record(entry), contract = record(e.contract || e.latestContract || e.brandContract || (e.visual_system || e.schema ? e : null));
|
|
61
|
+
const base = fromContract(contract);
|
|
62
|
+
const pack = record(e.pack);
|
|
63
|
+
return {
|
|
64
|
+
id: safe(e.id || e.brandId || record(pack.brand).id || base.id),
|
|
65
|
+
name: safe(e.name || e.displayName || record(pack.brand).name || base.name),
|
|
66
|
+
status: safe(e.status || base.status || 'draft'),
|
|
67
|
+
contract,
|
|
68
|
+
colors: e.colors || record(e.tokens).color || record(pack.tokens).color || base.colors,
|
|
69
|
+
assets: e.assets || pack.assets || base.assets,
|
|
70
|
+
sources: e.sources || record(pack.provenance).sources || base.sources,
|
|
71
|
+
themes: Array.isArray(e.themes) ? e.themes : [],
|
|
72
|
+
lastChange: safe(e.lastChange || e.updated_at || contract.updated_at),
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** One entry per real source brand. No seeded platform/customer brand names. */
|
|
77
|
+
export function normalizeBrandWorkspace(raw) {
|
|
78
|
+
const data = record(raw);
|
|
79
|
+
const collections = [data.brands, data.brandContracts, data.contracts].find(Array.isArray);
|
|
80
|
+
const candidates = collections?.length ? collections.map(fromBrandEntry) :
|
|
81
|
+
data.latestContract ? [fromBrandEntry({ contract: data.latestContract })] : [];
|
|
82
|
+
const seen = new Set();
|
|
83
|
+
const brands = candidates.filter(brand => {
|
|
84
|
+
if (!brand.id || seen.has(brand.id)) return false;
|
|
85
|
+
seen.add(brand.id);
|
|
86
|
+
return true;
|
|
87
|
+
});
|
|
88
|
+
return {
|
|
89
|
+
workspaceId: safe(data.workspaceId || record(data.workspace).id),
|
|
90
|
+
brands,
|
|
91
|
+
connections: Array.isArray(data.connections) ? data.connections : [],
|
|
92
|
+
activeBrandId: brands.some(brand => brand.id === data.activeBrandId) ? data.activeBrandId : null,
|
|
93
|
+
source: 'authorized_brand_workspace',
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function lum(hex) {
|
|
98
|
+
const match = /^#([a-f\d]{3}|[a-f\d]{6})$/i.exec(hex || '');
|
|
99
|
+
if (!match) return null;
|
|
100
|
+
const full = match[1].length === 3 ? [...match[1]].map(x => x + x).join('') : match[1];
|
|
101
|
+
const [r, g, b] = [0, 2, 4].map(i => parseInt(full.slice(i, i + 2), 16) / 255)
|
|
102
|
+
.map(v => v <= .04045 ? v / 12.92 : ((v + .055) / 1.055) ** 2.4);
|
|
103
|
+
return r * .2126 + g * .7152 + b * .0722;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function brandContrast(a, b) {
|
|
107
|
+
const x = lum(a), y = lum(b);
|
|
108
|
+
return x === null || y === null ? null : (Math.max(x, y) + .05) / (Math.min(x, y) + .05);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function role(colors, names) {
|
|
112
|
+
for (const name of names) {
|
|
113
|
+
const match = colors.find(item => item.name.toLowerCase().replace(/[^a-z]/g, '') === name);
|
|
114
|
+
if (match) return match.value;
|
|
115
|
+
}
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
function rng(seed) {
|
|
119
|
+
let value = 2166136261;
|
|
120
|
+
for (const char of seed) value = Math.imul(value ^ char.charCodeAt(0), 16777619);
|
|
121
|
+
return () => {
|
|
122
|
+
value ^= value << 13; value ^= value >>> 17; value ^= value << 5;
|
|
123
|
+
return (value >>> 0) / 4294967296;
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Cover preview derived only from supplied brand content.
|
|
129
|
+
* Null means the source does not yet support a faithful accessible cover.
|
|
130
|
+
* Pattern and layout are original vector artwork; no logo is fabricated.
|
|
131
|
+
*/
|
|
132
|
+
export function renderBrandCoverSvg({ id, name, tagline = '', colors: sourceColors, themeId = '' } = {}) {
|
|
133
|
+
const title = safe(name), colors = brandColors(sourceColors, themeId);
|
|
134
|
+
if (!title || colors.length < 3) return null;
|
|
135
|
+
const surface = role(colors, ['surface', 'page', 'background', 'canvas']) || colors[0].value;
|
|
136
|
+
const ink = role(colors, ['ink', 'foreground', 'text', 'onprimary']) || colors.find(c => (brandContrast(c.value, surface) ?? 0) >= 4.5)?.value;
|
|
137
|
+
if (!ink || (brandContrast(ink, surface) ?? 0) < 4.5) return null;
|
|
138
|
+
const blocks = colors.filter(c => c.value !== surface && c.value !== ink).slice(0, 4);
|
|
139
|
+
if (!blocks.length) return null;
|
|
140
|
+
const random = rng(safe(id || title));
|
|
141
|
+
const stipple = Array.from({ length: 58 }, () => {
|
|
142
|
+
const x = Math.round(18 + random() * 1150), y = Math.round(24 + random() * 220);
|
|
143
|
+
return `<circle cx="${x}" cy="${y}" r="${random() > .82 ? 1.35 : .7}" fill="${escapeXml(ink)}" opacity=".21"/>`;
|
|
144
|
+
}).join('');
|
|
145
|
+
const rectangles = blocks.map((color, i) =>
|
|
146
|
+
`<rect x="${i * 300}" y="0" width="300" height="250" fill="${escapeXml(color.value)}"/>`).join('');
|
|
147
|
+
const fontSize = title.length > 23 ? 66 : title.length > 13 ? 84 : 110;
|
|
148
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="675" viewBox="0 0 1200 675" role="img" aria-label="${escapeXml(title)} brand cover"><rect width="1200" height="675" fill="${escapeXml(surface)}"/>${rectangles}<g>${stipple}</g><path d="M0 250H1200" stroke="${escapeXml(ink)}" stroke-opacity=".17"/><text x="68" y="538" font-family="system-ui,sans-serif" font-weight="700" font-size="${fontSize}" letter-spacing="-3" fill="${escapeXml(ink)}">${escapeXml(title)}</text>${tagline ? `<text x="70" y="599" font-family="system-ui,sans-serif" font-size="23" fill="${escapeXml(ink)}">${escapeXml(tagline.slice(0, 95))}</text>` : ''}</svg>`;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/** An original flat tinted type cover, never a substituted brand logo. */
|
|
152
|
+
export function renderCreationTileSvg({ type, tint, ink, seed = '' } = {}) {
|
|
153
|
+
if (!colorPattern.test(safe(tint)) || !colorPattern.test(safe(ink))) return null;
|
|
154
|
+
const types = {
|
|
155
|
+
slides: '<rect x="30" y="32" width="88" height="60" rx="3"/><path d="M74 92v18m-23 0h46"/>',
|
|
156
|
+
design: '<path d="M32 34h83v65H32zM43 46h60v41H43z"/><path d="M43 88l18-21 14 11 12-14 16 24"/>',
|
|
157
|
+
code: '<path d="M55 52L37 67l18 15M94 52l18 15-18 15M83 43L69 92"/>',
|
|
158
|
+
system: '<rect x="31" y="34" width="89" height="67" rx="7"/><path d="M48 55h54M48 70h38M48 86h23"/><circle cx="105" cy="88" r="7"/>',
|
|
159
|
+
whiteboard: '<rect x="27" y="30" width="45" height="45" rx="5"/><path d="M87 39h35v35H87zM35 95h87M51 75v19m53-20v20"/>',
|
|
160
|
+
};
|
|
161
|
+
const icon = types[safe(type)];
|
|
162
|
+
if (!icon) return null;
|
|
163
|
+
const rand = rng(seed || type);
|
|
164
|
+
const points = Array.from({ length: 75 }, () => `<circle cx="${Math.floor(rand() * 150)}" cy="${Math.floor(rand() * 126)}" r=".5" opacity=".17"/>`).join('');
|
|
165
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 126" role="img" aria-label="${escapeXml(type)}"><rect width="150" height="126" rx="12" fill="${escapeXml(tint)}"/><g fill="${escapeXml(ink)}">${points}</g><g fill="none" stroke="${escapeXml(ink)}" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">${icon}</g></svg>`;
|
|
166
|
+
}
|
|
@@ -15,6 +15,17 @@ Theme Studio, storefront delivery, and Apps are owned by
|
|
|
15
15
|
- D1/R2/host adapters implement durable revisions, atomic CAS, immutable
|
|
16
16
|
publication manifests and rollback. The SDK does not initialize storage.
|
|
17
17
|
|
|
18
|
+
## Worker service-bridge contract
|
|
19
|
+
|
|
20
|
+
`@inneranimalmedia/agentsam-cms/studio-bridge-protocol` owns the portable,
|
|
21
|
+
short-lived signed Worker-to-Worker request protocol for Ecommerce CMS and
|
|
22
|
+
Local Studio. A host must verify the signed-in account, site membership,
|
|
23
|
+
site-scoped edit/publish permission and trusted service binding **before**
|
|
24
|
+
using this protocol. The receiving Worker independently verifies the HMAC,
|
|
25
|
+
project scope, timestamp, method, path, body digest and allowlist. This
|
|
26
|
+
module has no storage binding, CMS schema, or authority to publish by itself.
|
|
27
|
+
Local Studio and Ecommerce use their existing attached D1/R2 host bindings.
|
|
28
|
+
|
|
18
29
|
## Runtime entry points
|
|
19
30
|
|
|
20
31
|
`createCmsOperations()` retains the canonical SDK agent operation vocabulary
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inneranimalmedia/agentsam-cms",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.18",
|
|
4
4
|
"description": "Canonical CMS operations for merchant Page Editor, Theme Studio and publication with host-owned persistence; no SQL bootstrap.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"./application": {
|
|
25
25
|
"types": "./src/index.d.ts",
|
|
26
26
|
"import": "./src/application.js"
|
|
27
|
-
}
|
|
27
|
+
},
|
|
28
|
+
"./studio-bridge-protocol": "./src/studio-bridge-protocol.js"
|
|
28
29
|
},
|
|
29
30
|
"engines": {
|
|
30
31
|
"node": ">=22"
|
|
@@ -42,6 +43,6 @@
|
|
|
42
43
|
"access": "public"
|
|
43
44
|
},
|
|
44
45
|
"dependencies": {
|
|
45
|
-
"@inneranimalmedia/agentsam-contracts": "2.6.
|
|
46
|
+
"@inneranimalmedia/agentsam-contracts": "2.6.18"
|
|
46
47
|
}
|
|
47
48
|
}
|
|
@@ -143,5 +143,21 @@ export const CMS_OPERATION_CONTRACTS = Object.freeze([
|
|
|
143
143
|
input_schema:base({...versioned,confirmation:{type:'boolean',const:true},...idempotency},['pageId','expectedVersion','confirmation']),
|
|
144
144
|
output_schema:mutationResult({publishedVersion:positive}),
|
|
145
145
|
}),
|
|
146
|
+
operation({
|
|
147
|
+
id:'cms.navigation.list',capability:'cms.navigation.read',effect:'read',
|
|
148
|
+
description:'List the authorized website navigation menus for the resolved CMS site, including their active/draft state.',
|
|
149
|
+
input_schema:base({}),
|
|
150
|
+
output_schema:result({menus:{type:'array',items:object}}),
|
|
151
|
+
}),
|
|
152
|
+
operation({
|
|
153
|
+
id:'cms.navigation.save',capability:'cms.navigation.write',effect:'draft_update',
|
|
154
|
+
description:'Save a site-owned navigation menu draft with optimistic version checking; publishing remains an explicit separate action.',
|
|
155
|
+
input_schema:base({
|
|
156
|
+
menuId:string,expectedVersion:positive,
|
|
157
|
+
items:{type:'array',maxItems:100,items:object},
|
|
158
|
+
...idempotency,
|
|
159
|
+
},['menuId','expectedVersion','items']),
|
|
160
|
+
output_schema:result({menuId:string,version:positive,digest,idempotent:{type:'boolean'}}),
|
|
161
|
+
}),
|
|
146
162
|
]);
|
|
147
163
|
export const CMS_CONTRACTS_BY_NAME = new Map(CMS_OPERATION_CONTRACTS.map(x=>[x.id,x]));
|