@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
|
@@ -3113,6 +3113,19 @@ var X = createLucideIcon("x", __iconNode54);
|
|
|
3113
3113
|
|
|
3114
3114
|
// src/useAdminApps.ts
|
|
3115
3115
|
import { useEffect as useEffect13, useState as useState11 } from "react";
|
|
3116
|
+
function accountAppsErrorMessage(error) {
|
|
3117
|
+
const code = error instanceof Error ? error.message : String(error ?? "");
|
|
3118
|
+
if (/unsupported_studio_service_operation|studio_service_apps_(?:path|method)_invalid|studio_service_bridge_unavailable/.test(code)) {
|
|
3119
|
+
return "This AgentSam Desktop build cannot load account Apps. Update the desktop app; no installations were changed.";
|
|
3120
|
+
}
|
|
3121
|
+
if (code.includes("apps_account_sign_in_required")) {
|
|
3122
|
+
return "AgentSam Desktop needs a valid account session. Sign in again to verify your Apps; no installations were changed.";
|
|
3123
|
+
}
|
|
3124
|
+
if (code.includes("apps_account_service_unavailable")) {
|
|
3125
|
+
return "The account Apps service is temporarily unavailable. Retry; no installations were changed.";
|
|
3126
|
+
}
|
|
3127
|
+
return "Could not verify account Apps. Retry; no installations were changed.";
|
|
3128
|
+
}
|
|
3116
3129
|
function useAdminApps({ loadApps, installApp, removeApp, updateApp, onInstalled, initialView = "installed" }) {
|
|
3117
3130
|
const [apps, setApps] = useState11([]);
|
|
3118
3131
|
const [view, setView] = useState11(initialView);
|
|
@@ -3128,8 +3141,8 @@ function useAdminApps({ loadApps, installApp, removeApp, updateApp, onInstalled,
|
|
|
3128
3141
|
setError("");
|
|
3129
3142
|
void loadApps().then((next) => {
|
|
3130
3143
|
if (!cancelled) setApps(next);
|
|
3131
|
-
}).catch(() => {
|
|
3132
|
-
if (!cancelled) setError(
|
|
3144
|
+
}).catch((error2) => {
|
|
3145
|
+
if (!cancelled) setError(accountAppsErrorMessage(error2));
|
|
3133
3146
|
}).finally(() => {
|
|
3134
3147
|
if (!cancelled) setLoading(false);
|
|
3135
3148
|
});
|
|
@@ -3145,7 +3158,7 @@ function useAdminApps({ loadApps, installApp, removeApp, updateApp, onInstalled,
|
|
|
3145
3158
|
setError("");
|
|
3146
3159
|
setActive(app.key);
|
|
3147
3160
|
try {
|
|
3148
|
-
if (kind === "install") await installApp(app.key);
|
|
3161
|
+
if (kind === "install") await installApp(app.key, app);
|
|
3149
3162
|
if (kind === "remove") await removeApp?.(app.key);
|
|
3150
3163
|
if (kind === "enable") await updateApp?.(app.key, true);
|
|
3151
3164
|
if (kind === "disable") await updateApp?.(app.key, false);
|
|
@@ -3154,8 +3167,9 @@ function useAdminApps({ loadApps, installApp, removeApp, updateApp, onInstalled,
|
|
|
3154
3167
|
setConfirmRemove(null);
|
|
3155
3168
|
onInstalled?.();
|
|
3156
3169
|
if (kind === "install" && view !== "all") setView("installed");
|
|
3157
|
-
} catch {
|
|
3158
|
-
|
|
3170
|
+
} catch (failure) {
|
|
3171
|
+
const code = String(failure);
|
|
3172
|
+
setError(/app_package_|desktop_app_package|Device package/.test(code) ? `Device installation could not be verified: ${code}. No account installation success has been assumed.` : "Account App change failed. No success has been assumed; refresh to verify its current state.");
|
|
3159
3173
|
} finally {
|
|
3160
3174
|
setActive(null);
|
|
3161
3175
|
}
|
|
@@ -3199,17 +3213,19 @@ function AdminAppMark({ app, size: size4 = 20 }) {
|
|
|
3199
3213
|
}
|
|
3200
3214
|
function AdminAppsDirectory({ loadApps, installApp, removeApp, updateApp, onOpenApp, onInstalled }) {
|
|
3201
3215
|
const { apps, visible, view, setView, query, setQuery, needle, loading, error, active, confirmRemove, setConfirmRemove, perform, refresh } = useAdminApps({ loadApps, installApp, removeApp, updateApp, onInstalled });
|
|
3216
|
+
const installedCount = !apps.length && (loading || Boolean(error)) ? "\u2014" : String(apps.filter((a) => a.installed).length);
|
|
3217
|
+
const browseCount = !apps.length && (loading || Boolean(error)) ? "\u2014" : String(apps.filter((a) => !a.installed).length);
|
|
3202
3218
|
return /* @__PURE__ */ jsxs("div", { className: "as-apps-directory", children: [
|
|
3203
3219
|
/* @__PURE__ */ jsxs("div", { className: "as-apps-picker-controls", children: [
|
|
3204
3220
|
/* @__PURE__ */ jsxs("div", { className: "as-apps-picker-tabs", role: "tablist", "aria-label": "Apps view", children: [
|
|
3205
3221
|
/* @__PURE__ */ jsxs("button", { role: "tab", "aria-selected": view === "installed", type: "button", onClick: () => setView("installed"), children: [
|
|
3206
3222
|
"Installed (",
|
|
3207
|
-
|
|
3223
|
+
installedCount,
|
|
3208
3224
|
")"
|
|
3209
3225
|
] }),
|
|
3210
3226
|
/* @__PURE__ */ jsxs("button", { role: "tab", "aria-selected": view === "browse", type: "button", onClick: () => setView("browse"), children: [
|
|
3211
3227
|
"Browse (",
|
|
3212
|
-
|
|
3228
|
+
browseCount,
|
|
3213
3229
|
")"
|
|
3214
3230
|
] }),
|
|
3215
3231
|
/* @__PURE__ */ jsx7("button", { type: "button", className: "as-apps-picker-refresh", onClick: () => refresh(), disabled: loading || Boolean(active), children: "Refresh" })
|
|
@@ -3229,7 +3245,7 @@ function AdminAppsDirectory({ loadApps, installApp, removeApp, updateApp, onOpen
|
|
|
3229
3245
|
/* @__PURE__ */ jsxs("small", { children: [
|
|
3230
3246
|
app.description || "Admin application",
|
|
3231
3247
|
" \xB7 ",
|
|
3232
|
-
app.installed ? app.enabled ? "Installed" : "Disabled" : "Not installed"
|
|
3248
|
+
app.installed ? app.enabled ? app.delivery ? "Account enabled" : "Installed" : "Disabled" : "Not installed"
|
|
3233
3249
|
] })
|
|
3234
3250
|
] }),
|
|
3235
3251
|
confirmRemove === app.key ? /* @__PURE__ */ jsxs("span", { className: "as-apps-picker-actions", children: [
|
|
@@ -3237,7 +3253,7 @@ function AdminAppsDirectory({ loadApps, installApp, removeApp, updateApp, onOpen
|
|
|
3237
3253
|
/* @__PURE__ */ jsx7("button", { type: "button", onClick: () => setConfirmRemove(null), children: "Cancel" }),
|
|
3238
3254
|
/* @__PURE__ */ jsx7("button", { type: "button", disabled: Boolean(active), onClick: () => void perform(app, "remove"), children: "Remove" })
|
|
3239
3255
|
] }) : app.installed ? /* @__PURE__ */ jsxs("span", { className: "as-apps-picker-actions", children: [
|
|
3240
|
-
app.enabled && app.href ? /* @__PURE__ */ jsx7("button", { type: "button", className: "as-apps-picker-primary", onClick: () => onOpenApp?.(app.href), children: "Open" }) : null,
|
|
3256
|
+
app.enabled && app.href ? /* @__PURE__ */ jsx7("button", { type: "button", className: "as-apps-picker-primary", onClick: () => onOpenApp?.(app.href, app), children: "Open" }) : null,
|
|
3241
3257
|
updateApp ? /* @__PURE__ */ jsx7("button", { type: "button", disabled: Boolean(active), onClick: () => void perform(app, app.enabled ? "disable" : "enable"), children: app.enabled ? "Disable" : "Enable" }) : null,
|
|
3242
3258
|
removeApp ? /* @__PURE__ */ jsx7("button", { type: "button", disabled: Boolean(active), onClick: () => setConfirmRemove(app.key), children: "Remove" }) : null,
|
|
3243
3259
|
!updateApp && !removeApp ? /* @__PURE__ */ jsxs("span", { className: "as-apps-picker-status", children: [
|
|
@@ -3393,7 +3409,8 @@ function NavProvider({
|
|
|
3393
3409
|
return { ...input, destinations, breadcrumbs: input.breadcrumbs ?? navBreadcrumbs(destinations) };
|
|
3394
3410
|
}, [input]);
|
|
3395
3411
|
const [ownedStore] = useState12(() => createNavState({
|
|
3396
|
-
desktopOpen: defaultOpen && (typeof window === "undefined" || window.innerWidth >= 1024)
|
|
3412
|
+
desktopOpen: defaultOpen && (typeof window === "undefined" || window.innerWidth >= 1024),
|
|
3413
|
+
isMobile: typeof window !== "undefined" && window.innerWidth < mobileBreakpoint
|
|
3397
3414
|
}));
|
|
3398
3415
|
const stateStore = useMemo6(() => suppliedStore ? stabilizeNavStateStore(suppliedStore) : ownedStore, [suppliedStore, ownedStore]);
|
|
3399
3416
|
const { menu, desktopOpen, mobileOpen, isMobile, isPeeking, width } = useSyncExternalStore(stateStore.subscribe, stateStore.getSnapshot, stateStore.getSnapshot);
|
|
@@ -3603,7 +3620,11 @@ function NavTrigger({ className, onClick, "aria-label": ariaLabel = "Toggle navi
|
|
|
3603
3620
|
toggle();
|
|
3604
3621
|
onClick?.(event);
|
|
3605
3622
|
}, children: [
|
|
3606
|
-
/* @__PURE__ */
|
|
3623
|
+
/* @__PURE__ */ jsxs4("span", { className: "agentsam-nav__trigger-morph", "aria-hidden": "true", children: [
|
|
3624
|
+
/* @__PURE__ */ jsx15("span", {}),
|
|
3625
|
+
/* @__PURE__ */ jsx15("span", {}),
|
|
3626
|
+
/* @__PURE__ */ jsx15("span", {})
|
|
3627
|
+
] }),
|
|
3607
3628
|
/* @__PURE__ */ jsx15("span", { className: "agentsam-nav__trigger-help", "aria-hidden": "true", children: "Navigation" })
|
|
3608
3629
|
] });
|
|
3609
3630
|
}
|
|
@@ -7598,8 +7619,8 @@ function useNavStyle() {
|
|
|
7598
7619
|
const { accentColor, tokens, width, resizable } = useNav();
|
|
7599
7620
|
return { ...resizable ? { "--nav-width": width + "px" } : {}, ...Object.fromEntries(Object.entries(tokens).map(([key, value]) => [`--nav-${key}`, value])), "--nav-accent": accentColor };
|
|
7600
7621
|
}
|
|
7601
|
-
function NavLaunchDock({ items }) {
|
|
7602
|
-
return /* @__PURE__ */ jsx23("nav", { className: "as-nav-launch-dock", "aria-label":
|
|
7622
|
+
function NavLaunchDock({ items, coverage = "phone", label = "Quick navigation" }) {
|
|
7623
|
+
return /* @__PURE__ */ jsx23("nav", { className: "as-nav-launch-dock", "data-nav-dock-coverage": coverage, "aria-label": label, children: items.map((item) => /* @__PURE__ */ jsxs5(
|
|
7603
7624
|
"button",
|
|
7604
7625
|
{
|
|
7605
7626
|
type: "button",
|
|
@@ -7637,15 +7658,15 @@ function MenuActions({ actions }) {
|
|
|
7637
7658
|
] })
|
|
7638
7659
|
] }, action.id)) });
|
|
7639
7660
|
}
|
|
7640
|
-
function NavOverflowMenu({ label = "More options", actions = [], children, id: suppliedId, align = "end" }) {
|
|
7661
|
+
function NavOverflowMenu({ label = "More options", actions = [], children, id: suppliedId, align = "end", heading, conversationMobile = false }) {
|
|
7641
7662
|
const { menu, setMenu, theme } = useNav();
|
|
7642
7663
|
const generatedId = useId3();
|
|
7643
7664
|
const id = suppliedId ?? generatedId;
|
|
7644
7665
|
const style = useNavStyle();
|
|
7645
7666
|
return /* @__PURE__ */ jsxs5(Root22, { open: menu === id, onOpenChange: (open) => setMenu(open ? id : null), children: [
|
|
7646
7667
|
/* @__PURE__ */ jsx23(Trigger, { asChild: true, children: /* @__PURE__ */ jsx23("button", { type: "button", className: "as-nav-button", "aria-label": label, title: label, children: children ?? /* @__PURE__ */ jsx23(Ellipsis, {}) }) }),
|
|
7647
|
-
/* @__PURE__ */ jsx23(Portal22, { children: /* @__PURE__ */ jsxs5(Content22, { "data-nav-theme": theme, style, className: "as-nav-scope as-nav-popover", align, sideOffset: 8, collisionPadding: 12, children: [
|
|
7648
|
-
/* @__PURE__ */ jsx23(Label2, { className: "as-nav-menu-heading", children: label }),
|
|
7668
|
+
/* @__PURE__ */ jsx23(Portal22, { children: /* @__PURE__ */ jsxs5(Content22, { "data-nav-theme": theme, style, className: cx("as-nav-scope as-nav-popover", conversationMobile && "as-nav-conversation-mobile-menu"), align, sideOffset: conversationMobile ? -40 : 8, collisionPadding: 12, children: [
|
|
7669
|
+
/* @__PURE__ */ jsx23(Label2, { className: "as-nav-menu-heading", children: heading ?? label }),
|
|
7649
7670
|
actions.length ? /* @__PURE__ */ jsx23(MenuActions, { actions }) : /* @__PURE__ */ jsx23("div", { className: "as-nav-empty", children: "No actions available" })
|
|
7650
7671
|
] }) })
|
|
7651
7672
|
] });
|
|
@@ -7678,7 +7699,7 @@ function NavTopbarLogo({ variant = "mark", onClick, toggle = false }) {
|
|
|
7678
7699
|
}
|
|
7679
7700
|
)
|
|
7680
7701
|
] }) : /* @__PURE__ */ jsx23(PanelLeft, {}) }),
|
|
7681
|
-
/* @__PURE__ */ jsx23("span", { className: "as-nav-work-brand-toggle__control", "aria-hidden": "true", children: /* @__PURE__ */ jsx23(PanelLeft, { size: 20 }) })
|
|
7702
|
+
/* @__PURE__ */ jsx23("span", { className: "as-nav-work-brand-toggle__control", "aria-hidden": "true", children: open ? /* @__PURE__ */ jsx23(X, { size: 20 }) : /* @__PURE__ */ jsx23(PanelLeft, { size: 20 }) })
|
|
7682
7703
|
]
|
|
7683
7704
|
}
|
|
7684
7705
|
);
|
|
@@ -7867,7 +7888,7 @@ function NavShareIcon() {
|
|
|
7867
7888
|
/* @__PURE__ */ jsx23("path", { d: "M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8" })
|
|
7868
7889
|
] });
|
|
7869
7890
|
}
|
|
7870
|
-
function NavConversationActions() {
|
|
7891
|
+
function NavConversationActions({ additionalActions = [], mobile = false } = {}) {
|
|
7871
7892
|
const { data } = useNav();
|
|
7872
7893
|
const [renaming, setRenaming] = useState21(false);
|
|
7873
7894
|
const [deleting, setDeleting] = useState21(false);
|
|
@@ -7885,8 +7906,8 @@ function NavConversationActions() {
|
|
|
7885
7906
|
if (data.onRenameConversation) add({ id: "rename", label: "Rename", icon: /* @__PURE__ */ jsx23(Pencil, {}), onSelect: () => setRenaming(true) });
|
|
7886
7907
|
if (data.onPinConversation) add({ id: "pin", label: conversation.pinned ? "Unpin" : "Pin", icon: /* @__PURE__ */ jsx23(Pin, {}), onSelect: () => data.onPinConversation?.(conversation.id) });
|
|
7887
7908
|
extras.forEach((action, index2) => add({ ...action, separatorBefore: action.separatorBefore || index2 === 0 && actions.length > 0 }));
|
|
7909
|
+
additionalActions.forEach((action, index2) => add({ ...action, separatorBefore: action.separatorBefore || index2 === 0 && actions.length > 0 }));
|
|
7888
7910
|
if (data.onArchiveConversation) add({ id: "archive", label: "Archive", icon: /* @__PURE__ */ jsx23(Archive, {}), separatorBefore: true, onSelect: () => data.onArchiveConversation?.(conversation.id) });
|
|
7889
|
-
else if (data.onDeleteConversation) add({ id: "archive", label: "Archive (save to account first)", icon: /* @__PURE__ */ jsx23(Archive, {}), separatorBefore: true, disabled: true });
|
|
7890
7911
|
if (data.onDeleteConversation) add({ id: "delete", label: "Delete", icon: /* @__PURE__ */ jsx23(Trash2, {}), destructive: true, separatorBefore: !data.onArchiveConversation && !actions.some((item) => item.id === "archive"), onSelect: () => setDeleting(true) });
|
|
7891
7912
|
if (data.onAssignConversationToProject && data.projects?.length) add({
|
|
7892
7913
|
id: "project",
|
|
@@ -7898,8 +7919,18 @@ function NavConversationActions() {
|
|
|
7898
7919
|
...conversation.projectId ? [{ id: "project-clear", label: "Remove from project", separatorBefore: true, onSelect: () => data.onAssignConversationToProject?.(conversation.id, null) }] : []
|
|
7899
7920
|
]
|
|
7900
7921
|
});
|
|
7922
|
+
const mobileOrder = ["share-chat", "pin", "project", "plugins", "lock-chat", "uploaded-files", "find-chat", "rename", "workspace-actions", "copy", "archive", "delete"];
|
|
7923
|
+
if (mobile && data.onShare) add({ id: "share-chat", label: "Share", icon: /* @__PURE__ */ jsx23(NavShareIcon, {}), onSelect: data.onShare });
|
|
7924
|
+
const displayedActions = mobile ? [...actions].sort((a, b) => {
|
|
7925
|
+
const rank = (id) => mobileOrder.includes(id) ? mobileOrder.indexOf(id) : 9;
|
|
7926
|
+
return rank(a.id) - rank(b.id);
|
|
7927
|
+
}).map((action) => ({
|
|
7928
|
+
...action,
|
|
7929
|
+
separatorBefore: false,
|
|
7930
|
+
label: action.id === "project" ? "Add to project" : action.id === "share-chat" ? "Share" : action.label
|
|
7931
|
+
})) : actions;
|
|
7901
7932
|
return /* @__PURE__ */ jsxs5(Fragment8, { children: [
|
|
7902
|
-
/* @__PURE__ */ jsx23(NavOverflowMenu, { id: "active-conversation-actions", label: "Conversation options", actions }),
|
|
7933
|
+
/* @__PURE__ */ jsx23(NavOverflowMenu, { id: "active-conversation-actions", label: "Conversation options", heading: mobile ? conversation.title : void 0, conversationMobile: mobile, actions: displayedActions }),
|
|
7903
7934
|
data.onRenameConversation ? /* @__PURE__ */ jsx23(RenameDialog, { open: renaming, onOpenChange: setRenaming, title: "Rename conversation", value: conversation.title, onSave: (title) => data.onRenameConversation?.(conversation.id, title) }) : null,
|
|
7904
7935
|
data.onDeleteConversation ? /* @__PURE__ */ jsx23(ConfirmDeleteDialog, { open: deleting, onOpenChange: setDeleting, title: conversation.title, onConfirm: () => data.onDeleteConversation?.(conversation.id) }) : null
|
|
7905
7936
|
] });
|
|
@@ -8356,7 +8387,7 @@ function SidenavContents() {
|
|
|
8356
8387
|
] });
|
|
8357
8388
|
}
|
|
8358
8389
|
function NavSidenav() {
|
|
8359
|
-
const { open, isMobile, isPeeking, peekable, setPeeking, toggle, menu, resizable, width, setWidth } = useNav();
|
|
8390
|
+
const { data, open, isMobile, isPeeking, peekable, setPeeking, setOpen, toggle, menu, resizable, width, setWidth } = useNav();
|
|
8360
8391
|
const mobileDrawerRef = useRef18(null);
|
|
8361
8392
|
const wasMobileOpen = useRef18(false);
|
|
8362
8393
|
const [hint, setHint] = useState21(null);
|
|
@@ -8445,6 +8476,15 @@ function NavSidenav() {
|
|
|
8445
8476
|
document.querySelector("[data-shared-nav-toggle]")?.focus();
|
|
8446
8477
|
}
|
|
8447
8478
|
}, [isMobile, open]);
|
|
8479
|
+
if (isMobile && data.mobileNavigationPresentation === "immersive") return /* @__PURE__ */ jsx23(Dialog, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsx23(DialogPortal, { children: /* @__PURE__ */ jsxs5(NavScope, { className: "as-nav-mobile-immersive-portal", children: [
|
|
8480
|
+
/* @__PURE__ */ jsx23(DialogOverlay, { className: "as-nav-mobile-immersive-overlay" }),
|
|
8481
|
+
/* @__PURE__ */ jsxs5(DialogContent, { ref: (element) => {
|
|
8482
|
+
mobileDrawerRef.current = element;
|
|
8483
|
+
}, className: "as-nav-mobile-immersive-drawer", children: [
|
|
8484
|
+
/* @__PURE__ */ jsx23(DialogTitle, { className: "as-nav-sr-only", children: "Application navigation" }),
|
|
8485
|
+
/* @__PURE__ */ jsx23(SidenavContents, {})
|
|
8486
|
+
] })
|
|
8487
|
+
] }) }) });
|
|
8448
8488
|
if (isMobile) return /* @__PURE__ */ jsx23(NavScope, { className: "as-nav-mobile-push-shell", "data-open": open, children: /* @__PURE__ */ jsx23(
|
|
8449
8489
|
"aside",
|
|
8450
8490
|
{
|
|
@@ -8607,7 +8647,10 @@ function mountNav(options2) {
|
|
|
8607
8647
|
anchor.style.display = "contents";
|
|
8608
8648
|
(options2.sidenav ?? options2.topbar ?? options2.breadcrumbs).parentElement.appendChild(anchor);
|
|
8609
8649
|
const root = createRoot(anchor, { identifierPrefix: "agentsam-host-nav-" + crypto.randomUUID() + "-" });
|
|
8610
|
-
const stateStore = options2.stateStore ?? createNavState({
|
|
8650
|
+
const stateStore = options2.stateStore ?? createNavState({
|
|
8651
|
+
desktopOpen: (options2.defaultOpen ?? true) && window.innerWidth >= 1024,
|
|
8652
|
+
isMobile: window.innerWidth < (options2.mobileBreakpoint ?? 768)
|
|
8653
|
+
});
|
|
8611
8654
|
let current = { ...options2, stateStore };
|
|
8612
8655
|
let controls;
|
|
8613
8656
|
function StateBridge() {
|
|
@@ -83,6 +83,8 @@ export interface NavValue {
|
|
|
83
83
|
pathname?: string;
|
|
84
84
|
/** Commerce or other non-conversation hosts may omit the history region. */
|
|
85
85
|
showHistory?: boolean;
|
|
86
|
+
/** Host-selected mobile navigation treatment; defaults to the existing drawer. */
|
|
87
|
+
mobileNavigationPresentation?: 'drawer' | 'immersive';
|
|
86
88
|
/** Insert the built-in New chat action after this destination id. */
|
|
87
89
|
newConversationAfter?: string;
|
|
88
90
|
historyStatus?: "loading" | "error" | "ready";
|
|
@@ -12,4 +12,4 @@ export { NavMenu, NavMenuItem, NavMenuButton, NavMenuSub, NavMenuSubButton, NavM
|
|
|
12
12
|
export { NavCollapsible, NavCollapsibleTrigger, NavCollapsibleContent } from './NavCollapsible.js';
|
|
13
13
|
export { NavTrigger } from './NavTrigger.js';
|
|
14
14
|
export { AdminAppsDialog, AdminAppsDirectory, AdminAppMark, type AdminAppsDialogProps, type AdminAppsDirectoryProps, type AdminInstallableApp } from './AdminAppsDialog.js';
|
|
15
|
-
export { useAdminApps, type AdminAppAction, type AdminAppsView, type UseAdminAppsOptions } from './useAdminApps.js';
|
|
15
|
+
export { useAdminApps, accountAppsErrorMessage, type AdminAppAction, type AdminAppsView, type UseAdminAppsOptions } from './useAdminApps.js';
|
|
@@ -123,7 +123,8 @@ function NavProvider({
|
|
|
123
123
|
return { ...input, destinations, breadcrumbs: input.breadcrumbs ?? navBreadcrumbs(destinations) };
|
|
124
124
|
}, [input]);
|
|
125
125
|
const [ownedStore] = useState(() => createNavState({
|
|
126
|
-
desktopOpen: defaultOpen && (typeof window === "undefined" || window.innerWidth >= 1024)
|
|
126
|
+
desktopOpen: defaultOpen && (typeof window === "undefined" || window.innerWidth >= 1024),
|
|
127
|
+
isMobile: typeof window !== "undefined" && window.innerWidth < mobileBreakpoint
|
|
127
128
|
}));
|
|
128
129
|
const stateStore = useMemo(() => suppliedStore ? stabilizeNavStateStore(suppliedStore) : ownedStore, [suppliedStore, ownedStore]);
|
|
129
130
|
const { menu, desktopOpen, mobileOpen, isMobile, isPeeking, width } = useSyncExternalStore(stateStore.subscribe, stateStore.getSnapshot, stateStore.getSnapshot);
|
|
@@ -326,7 +327,11 @@ function NavTrigger({ className, onClick, "aria-label": ariaLabel = "Toggle navi
|
|
|
326
327
|
toggle();
|
|
327
328
|
onClick?.(event);
|
|
328
329
|
}, children: [
|
|
329
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ jsxs3("span", { className: "agentsam-nav__trigger-morph", "aria-hidden": "true", children: [
|
|
331
|
+
/* @__PURE__ */ jsx8("span", {}),
|
|
332
|
+
/* @__PURE__ */ jsx8("span", {}),
|
|
333
|
+
/* @__PURE__ */ jsx8("span", {})
|
|
334
|
+
] }),
|
|
330
335
|
/* @__PURE__ */ jsx8("span", { className: "agentsam-nav__trigger-help", "aria-hidden": "true", children: "Navigation" })
|
|
331
336
|
] });
|
|
332
337
|
}
|
|
@@ -7204,8 +7209,8 @@ function useNavStyle() {
|
|
|
7204
7209
|
const { accentColor, tokens, width, resizable } = useNav();
|
|
7205
7210
|
return { ...resizable ? { "--nav-width": width + "px" } : {}, ...Object.fromEntries(Object.entries(tokens).map(([key, value]) => [`--nav-${key}`, value])), "--nav-accent": accentColor };
|
|
7206
7211
|
}
|
|
7207
|
-
function NavLaunchDock({ items }) {
|
|
7208
|
-
return /* @__PURE__ */ jsx21("nav", { className: "as-nav-launch-dock", "aria-label":
|
|
7212
|
+
function NavLaunchDock({ items, coverage = "phone", label = "Quick navigation" }) {
|
|
7213
|
+
return /* @__PURE__ */ jsx21("nav", { className: "as-nav-launch-dock", "data-nav-dock-coverage": coverage, "aria-label": label, children: items.map((item) => /* @__PURE__ */ jsxs4(
|
|
7209
7214
|
"button",
|
|
7210
7215
|
{
|
|
7211
7216
|
type: "button",
|
|
@@ -7243,15 +7248,15 @@ function MenuActions({ actions }) {
|
|
|
7243
7248
|
] })
|
|
7244
7249
|
] }, action.id)) });
|
|
7245
7250
|
}
|
|
7246
|
-
function NavOverflowMenu({ label = "More options", actions = [], children, id: suppliedId, align = "end" }) {
|
|
7251
|
+
function NavOverflowMenu({ label = "More options", actions = [], children, id: suppliedId, align = "end", heading, conversationMobile = false }) {
|
|
7247
7252
|
const { menu, setMenu, theme } = useNav();
|
|
7248
7253
|
const generatedId = useId3();
|
|
7249
7254
|
const id = suppliedId ?? generatedId;
|
|
7250
7255
|
const style = useNavStyle();
|
|
7251
7256
|
return /* @__PURE__ */ jsxs4(Root22, { open: menu === id, onOpenChange: (open) => setMenu(open ? id : null), children: [
|
|
7252
7257
|
/* @__PURE__ */ jsx21(Trigger, { asChild: true, children: /* @__PURE__ */ jsx21("button", { type: "button", className: "as-nav-button", "aria-label": label, title: label, children: children ?? /* @__PURE__ */ jsx21(Ellipsis, {}) }) }),
|
|
7253
|
-
/* @__PURE__ */ jsx21(Portal22, { children: /* @__PURE__ */ jsxs4(Content22, { "data-nav-theme": theme, style, className: "as-nav-scope as-nav-popover", align, sideOffset: 8, collisionPadding: 12, children: [
|
|
7254
|
-
/* @__PURE__ */ jsx21(Label2, { className: "as-nav-menu-heading", children: label }),
|
|
7258
|
+
/* @__PURE__ */ jsx21(Portal22, { children: /* @__PURE__ */ jsxs4(Content22, { "data-nav-theme": theme, style, className: cx("as-nav-scope as-nav-popover", conversationMobile && "as-nav-conversation-mobile-menu"), align, sideOffset: conversationMobile ? -40 : 8, collisionPadding: 12, children: [
|
|
7259
|
+
/* @__PURE__ */ jsx21(Label2, { className: "as-nav-menu-heading", children: heading ?? label }),
|
|
7255
7260
|
actions.length ? /* @__PURE__ */ jsx21(MenuActions, { actions }) : /* @__PURE__ */ jsx21("div", { className: "as-nav-empty", children: "No actions available" })
|
|
7256
7261
|
] }) })
|
|
7257
7262
|
] });
|
|
@@ -7284,7 +7289,7 @@ function NavTopbarLogo({ variant = "mark", onClick, toggle = false }) {
|
|
|
7284
7289
|
}
|
|
7285
7290
|
)
|
|
7286
7291
|
] }) : /* @__PURE__ */ jsx21(PanelLeft, {}) }),
|
|
7287
|
-
/* @__PURE__ */ jsx21("span", { className: "as-nav-work-brand-toggle__control", "aria-hidden": "true", children: /* @__PURE__ */ jsx21(PanelLeft, { size: 20 }) })
|
|
7292
|
+
/* @__PURE__ */ jsx21("span", { className: "as-nav-work-brand-toggle__control", "aria-hidden": "true", children: open ? /* @__PURE__ */ jsx21(X, { size: 20 }) : /* @__PURE__ */ jsx21(PanelLeft, { size: 20 }) })
|
|
7288
7293
|
]
|
|
7289
7294
|
}
|
|
7290
7295
|
);
|
|
@@ -7473,7 +7478,7 @@ function NavShareIcon() {
|
|
|
7473
7478
|
/* @__PURE__ */ jsx21("path", { d: "M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8" })
|
|
7474
7479
|
] });
|
|
7475
7480
|
}
|
|
7476
|
-
function NavConversationActions() {
|
|
7481
|
+
function NavConversationActions({ additionalActions = [], mobile = false } = {}) {
|
|
7477
7482
|
const { data } = useNav();
|
|
7478
7483
|
const [renaming, setRenaming] = useState20(false);
|
|
7479
7484
|
const [deleting, setDeleting] = useState20(false);
|
|
@@ -7491,8 +7496,8 @@ function NavConversationActions() {
|
|
|
7491
7496
|
if (data.onRenameConversation) add({ id: "rename", label: "Rename", icon: /* @__PURE__ */ jsx21(Pencil, {}), onSelect: () => setRenaming(true) });
|
|
7492
7497
|
if (data.onPinConversation) add({ id: "pin", label: conversation.pinned ? "Unpin" : "Pin", icon: /* @__PURE__ */ jsx21(Pin, {}), onSelect: () => data.onPinConversation?.(conversation.id) });
|
|
7493
7498
|
extras.forEach((action, index2) => add({ ...action, separatorBefore: action.separatorBefore || index2 === 0 && actions.length > 0 }));
|
|
7499
|
+
additionalActions.forEach((action, index2) => add({ ...action, separatorBefore: action.separatorBefore || index2 === 0 && actions.length > 0 }));
|
|
7494
7500
|
if (data.onArchiveConversation) add({ id: "archive", label: "Archive", icon: /* @__PURE__ */ jsx21(Archive, {}), separatorBefore: true, onSelect: () => data.onArchiveConversation?.(conversation.id) });
|
|
7495
|
-
else if (data.onDeleteConversation) add({ id: "archive", label: "Archive (save to account first)", icon: /* @__PURE__ */ jsx21(Archive, {}), separatorBefore: true, disabled: true });
|
|
7496
7501
|
if (data.onDeleteConversation) add({ id: "delete", label: "Delete", icon: /* @__PURE__ */ jsx21(Trash2, {}), destructive: true, separatorBefore: !data.onArchiveConversation && !actions.some((item) => item.id === "archive"), onSelect: () => setDeleting(true) });
|
|
7497
7502
|
if (data.onAssignConversationToProject && data.projects?.length) add({
|
|
7498
7503
|
id: "project",
|
|
@@ -7504,8 +7509,18 @@ function NavConversationActions() {
|
|
|
7504
7509
|
...conversation.projectId ? [{ id: "project-clear", label: "Remove from project", separatorBefore: true, onSelect: () => data.onAssignConversationToProject?.(conversation.id, null) }] : []
|
|
7505
7510
|
]
|
|
7506
7511
|
});
|
|
7512
|
+
const mobileOrder = ["share-chat", "pin", "project", "plugins", "lock-chat", "uploaded-files", "find-chat", "rename", "workspace-actions", "copy", "archive", "delete"];
|
|
7513
|
+
if (mobile && data.onShare) add({ id: "share-chat", label: "Share", icon: /* @__PURE__ */ jsx21(NavShareIcon, {}), onSelect: data.onShare });
|
|
7514
|
+
const displayedActions = mobile ? [...actions].sort((a, b) => {
|
|
7515
|
+
const rank = (id) => mobileOrder.includes(id) ? mobileOrder.indexOf(id) : 9;
|
|
7516
|
+
return rank(a.id) - rank(b.id);
|
|
7517
|
+
}).map((action) => ({
|
|
7518
|
+
...action,
|
|
7519
|
+
separatorBefore: false,
|
|
7520
|
+
label: action.id === "project" ? "Add to project" : action.id === "share-chat" ? "Share" : action.label
|
|
7521
|
+
})) : actions;
|
|
7507
7522
|
return /* @__PURE__ */ jsxs4(Fragment8, { children: [
|
|
7508
|
-
/* @__PURE__ */ jsx21(NavOverflowMenu, { id: "active-conversation-actions", label: "Conversation options", actions }),
|
|
7523
|
+
/* @__PURE__ */ jsx21(NavOverflowMenu, { id: "active-conversation-actions", label: "Conversation options", heading: mobile ? conversation.title : void 0, conversationMobile: mobile, actions: displayedActions }),
|
|
7509
7524
|
data.onRenameConversation ? /* @__PURE__ */ jsx21(RenameDialog, { open: renaming, onOpenChange: setRenaming, title: "Rename conversation", value: conversation.title, onSave: (title) => data.onRenameConversation?.(conversation.id, title) }) : null,
|
|
7510
7525
|
data.onDeleteConversation ? /* @__PURE__ */ jsx21(ConfirmDeleteDialog, { open: deleting, onOpenChange: setDeleting, title: conversation.title, onConfirm: () => data.onDeleteConversation?.(conversation.id) }) : null
|
|
7511
7526
|
] });
|
|
@@ -7962,7 +7977,7 @@ function SidenavContents() {
|
|
|
7962
7977
|
] });
|
|
7963
7978
|
}
|
|
7964
7979
|
function NavSidenav() {
|
|
7965
|
-
const { open, isMobile, isPeeking, peekable, setPeeking, toggle, menu, resizable, width, setWidth } = useNav();
|
|
7980
|
+
const { data, open, isMobile, isPeeking, peekable, setPeeking, setOpen, toggle, menu, resizable, width, setWidth } = useNav();
|
|
7966
7981
|
const mobileDrawerRef = useRef18(null);
|
|
7967
7982
|
const wasMobileOpen = useRef18(false);
|
|
7968
7983
|
const [hint, setHint] = useState20(null);
|
|
@@ -8051,6 +8066,15 @@ function NavSidenav() {
|
|
|
8051
8066
|
document.querySelector("[data-shared-nav-toggle]")?.focus();
|
|
8052
8067
|
}
|
|
8053
8068
|
}, [isMobile, open]);
|
|
8069
|
+
if (isMobile && data.mobileNavigationPresentation === "immersive") return /* @__PURE__ */ jsx21(Dialog, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsx21(DialogPortal, { children: /* @__PURE__ */ jsxs4(NavScope, { className: "as-nav-mobile-immersive-portal", children: [
|
|
8070
|
+
/* @__PURE__ */ jsx21(DialogOverlay, { className: "as-nav-mobile-immersive-overlay" }),
|
|
8071
|
+
/* @__PURE__ */ jsxs4(DialogContent, { ref: (element) => {
|
|
8072
|
+
mobileDrawerRef.current = element;
|
|
8073
|
+
}, className: "as-nav-mobile-immersive-drawer", children: [
|
|
8074
|
+
/* @__PURE__ */ jsx21(DialogTitle, { className: "as-nav-sr-only", children: "Application navigation" }),
|
|
8075
|
+
/* @__PURE__ */ jsx21(SidenavContents, {})
|
|
8076
|
+
] })
|
|
8077
|
+
] }) }) });
|
|
8054
8078
|
if (isMobile) return /* @__PURE__ */ jsx21(NavScope, { className: "as-nav-mobile-push-shell", "data-open": open, children: /* @__PURE__ */ jsx21(
|
|
8055
8079
|
"aside",
|
|
8056
8080
|
{
|
|
@@ -8203,6 +8227,19 @@ var Nav = Object.assign(NavRoot, {
|
|
|
8203
8227
|
|
|
8204
8228
|
// src/useAdminApps.ts
|
|
8205
8229
|
import { useEffect as useEffect21, useState as useState21 } from "react";
|
|
8230
|
+
function accountAppsErrorMessage(error) {
|
|
8231
|
+
const code = error instanceof Error ? error.message : String(error ?? "");
|
|
8232
|
+
if (/unsupported_studio_service_operation|studio_service_apps_(?:path|method)_invalid|studio_service_bridge_unavailable/.test(code)) {
|
|
8233
|
+
return "This AgentSam Desktop build cannot load account Apps. Update the desktop app; no installations were changed.";
|
|
8234
|
+
}
|
|
8235
|
+
if (code.includes("apps_account_sign_in_required")) {
|
|
8236
|
+
return "AgentSam Desktop needs a valid account session. Sign in again to verify your Apps; no installations were changed.";
|
|
8237
|
+
}
|
|
8238
|
+
if (code.includes("apps_account_service_unavailable")) {
|
|
8239
|
+
return "The account Apps service is temporarily unavailable. Retry; no installations were changed.";
|
|
8240
|
+
}
|
|
8241
|
+
return "Could not verify account Apps. Retry; no installations were changed.";
|
|
8242
|
+
}
|
|
8206
8243
|
function useAdminApps({ loadApps, installApp, removeApp, updateApp, onInstalled, initialView = "installed" }) {
|
|
8207
8244
|
const [apps, setApps] = useState21([]);
|
|
8208
8245
|
const [view, setView] = useState21(initialView);
|
|
@@ -8218,8 +8255,8 @@ function useAdminApps({ loadApps, installApp, removeApp, updateApp, onInstalled,
|
|
|
8218
8255
|
setError("");
|
|
8219
8256
|
void loadApps().then((next) => {
|
|
8220
8257
|
if (!cancelled) setApps(next);
|
|
8221
|
-
}).catch(() => {
|
|
8222
|
-
if (!cancelled) setError(
|
|
8258
|
+
}).catch((error2) => {
|
|
8259
|
+
if (!cancelled) setError(accountAppsErrorMessage(error2));
|
|
8223
8260
|
}).finally(() => {
|
|
8224
8261
|
if (!cancelled) setLoading(false);
|
|
8225
8262
|
});
|
|
@@ -8235,7 +8272,7 @@ function useAdminApps({ loadApps, installApp, removeApp, updateApp, onInstalled,
|
|
|
8235
8272
|
setError("");
|
|
8236
8273
|
setActive(app.key);
|
|
8237
8274
|
try {
|
|
8238
|
-
if (kind === "install") await installApp(app.key);
|
|
8275
|
+
if (kind === "install") await installApp(app.key, app);
|
|
8239
8276
|
if (kind === "remove") await removeApp?.(app.key);
|
|
8240
8277
|
if (kind === "enable") await updateApp?.(app.key, true);
|
|
8241
8278
|
if (kind === "disable") await updateApp?.(app.key, false);
|
|
@@ -8244,8 +8281,9 @@ function useAdminApps({ loadApps, installApp, removeApp, updateApp, onInstalled,
|
|
|
8244
8281
|
setConfirmRemove(null);
|
|
8245
8282
|
onInstalled?.();
|
|
8246
8283
|
if (kind === "install" && view !== "all") setView("installed");
|
|
8247
|
-
} catch {
|
|
8248
|
-
|
|
8284
|
+
} catch (failure) {
|
|
8285
|
+
const code = String(failure);
|
|
8286
|
+
setError(/app_package_|desktop_app_package|Device package/.test(code) ? `Device installation could not be verified: ${code}. No account installation success has been assumed.` : "Account App change failed. No success has been assumed; refresh to verify its current state.");
|
|
8249
8287
|
} finally {
|
|
8250
8288
|
setActive(null);
|
|
8251
8289
|
}
|
|
@@ -8289,17 +8327,19 @@ function AdminAppMark({ app, size: size4 = 20 }) {
|
|
|
8289
8327
|
}
|
|
8290
8328
|
function AdminAppsDirectory({ loadApps, installApp, removeApp, updateApp, onOpenApp, onInstalled }) {
|
|
8291
8329
|
const { apps, visible, view, setView, query, setQuery, needle, loading, error, active, confirmRemove, setConfirmRemove, perform, refresh } = useAdminApps({ loadApps, installApp, removeApp, updateApp, onInstalled });
|
|
8330
|
+
const installedCount = !apps.length && (loading || Boolean(error)) ? "\u2014" : String(apps.filter((a) => a.installed).length);
|
|
8331
|
+
const browseCount = !apps.length && (loading || Boolean(error)) ? "\u2014" : String(apps.filter((a) => !a.installed).length);
|
|
8292
8332
|
return /* @__PURE__ */ jsxs6("div", { className: "as-apps-directory", children: [
|
|
8293
8333
|
/* @__PURE__ */ jsxs6("div", { className: "as-apps-picker-controls", children: [
|
|
8294
8334
|
/* @__PURE__ */ jsxs6("div", { className: "as-apps-picker-tabs", role: "tablist", "aria-label": "Apps view", children: [
|
|
8295
8335
|
/* @__PURE__ */ jsxs6("button", { role: "tab", "aria-selected": view === "installed", type: "button", onClick: () => setView("installed"), children: [
|
|
8296
8336
|
"Installed (",
|
|
8297
|
-
|
|
8337
|
+
installedCount,
|
|
8298
8338
|
")"
|
|
8299
8339
|
] }),
|
|
8300
8340
|
/* @__PURE__ */ jsxs6("button", { role: "tab", "aria-selected": view === "browse", type: "button", onClick: () => setView("browse"), children: [
|
|
8301
8341
|
"Browse (",
|
|
8302
|
-
|
|
8342
|
+
browseCount,
|
|
8303
8343
|
")"
|
|
8304
8344
|
] }),
|
|
8305
8345
|
/* @__PURE__ */ jsx24("button", { type: "button", className: "as-apps-picker-refresh", onClick: () => refresh(), disabled: loading || Boolean(active), children: "Refresh" })
|
|
@@ -8319,7 +8359,7 @@ function AdminAppsDirectory({ loadApps, installApp, removeApp, updateApp, onOpen
|
|
|
8319
8359
|
/* @__PURE__ */ jsxs6("small", { children: [
|
|
8320
8360
|
app.description || "Admin application",
|
|
8321
8361
|
" \xB7 ",
|
|
8322
|
-
app.installed ? app.enabled ? "Installed" : "Disabled" : "Not installed"
|
|
8362
|
+
app.installed ? app.enabled ? app.delivery ? "Account enabled" : "Installed" : "Disabled" : "Not installed"
|
|
8323
8363
|
] })
|
|
8324
8364
|
] }),
|
|
8325
8365
|
confirmRemove === app.key ? /* @__PURE__ */ jsxs6("span", { className: "as-apps-picker-actions", children: [
|
|
@@ -8327,7 +8367,7 @@ function AdminAppsDirectory({ loadApps, installApp, removeApp, updateApp, onOpen
|
|
|
8327
8367
|
/* @__PURE__ */ jsx24("button", { type: "button", onClick: () => setConfirmRemove(null), children: "Cancel" }),
|
|
8328
8368
|
/* @__PURE__ */ jsx24("button", { type: "button", disabled: Boolean(active), onClick: () => void perform(app, "remove"), children: "Remove" })
|
|
8329
8369
|
] }) : app.installed ? /* @__PURE__ */ jsxs6("span", { className: "as-apps-picker-actions", children: [
|
|
8330
|
-
app.enabled && app.href ? /* @__PURE__ */ jsx24("button", { type: "button", className: "as-apps-picker-primary", onClick: () => onOpenApp?.(app.href), children: "Open" }) : null,
|
|
8370
|
+
app.enabled && app.href ? /* @__PURE__ */ jsx24("button", { type: "button", className: "as-apps-picker-primary", onClick: () => onOpenApp?.(app.href, app), children: "Open" }) : null,
|
|
8331
8371
|
updateApp ? /* @__PURE__ */ jsx24("button", { type: "button", disabled: Boolean(active), onClick: () => void perform(app, app.enabled ? "disable" : "enable"), children: app.enabled ? "Disable" : "Enable" }) : null,
|
|
8332
8372
|
removeApp ? /* @__PURE__ */ jsx24("button", { type: "button", disabled: Boolean(active), onClick: () => setConfirmRemove(app.key), children: "Remove" }) : null,
|
|
8333
8373
|
!updateApp && !removeApp ? /* @__PURE__ */ jsxs6("span", { className: "as-apps-picker-status", children: [
|
|
@@ -8397,6 +8437,7 @@ export {
|
|
|
8397
8437
|
NavTopbarLogo,
|
|
8398
8438
|
NavTopbarSpacer,
|
|
8399
8439
|
NavTrigger,
|
|
8440
|
+
accountAppsErrorMessage,
|
|
8400
8441
|
createNavState,
|
|
8401
8442
|
navBreadcrumbs,
|
|
8402
8443
|
navDestinationActive,
|