@taskforcehq/taskforce 0.3.309 → 0.3.313
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/README.md +89 -127
- package/dist/TaskforceCore.js +1 -1
- package/dist/components/context/ContextAttachmentManager.js +4 -3
- package/dist/components/features/InitiativesModule.js +1 -1
- package/dist/components/features/TaskSettings.js +1 -1
- package/dist/components/ui/DisclosureSectionHeader.d.ts +12 -0
- package/dist/components/ui/DisclosureSectionHeader.js +8 -0
- package/dist/components/views/PlanComparisonPage.js +1 -1
- package/dist/components/views/StandaloneLayout.js +18 -4
- package/dist/components/views/panels/PlanningDrawer.js +2 -1
- package/dist/components/views/standalone/modals/AccountHubModal.js +1 -1
- package/dist/components/views/standalone/modals/HelpModal.d.ts +3 -1
- package/dist/components/views/standalone/modals/HelpModal.js +17 -2
- package/dist/core/PlanEntitlementService.d.ts +2 -0
- package/dist/core/PlanEntitlementService.js +57 -4
- package/dist/hooks/useFilterSort.js +1 -1
- package/dist/hooks/useTaskforce.js +2 -2
- package/dist/hooks/workspace/useTaskforceWorkspaceBootstrap.js +5 -2
- package/dist/localization/locales/en-US.js +1 -1
- package/dist/localization/locales/es-419.js +1 -1
- package/dist/localization/locales/pt-BR.js +1 -1
- package/dist/mcp/runtime.js +49 -14
- package/dist/server/routes/billing.js +0 -1
- package/dist/ui/assets/AgentsModule-BULqIo8e.js +1 -0
- package/dist/ui/assets/{AnnotatedAttachmentWorkspace-CCckzWYZ.js → AnnotatedAttachmentWorkspace-DHr4rHK9.js} +1 -1
- package/dist/ui/assets/ContextAttachmentManager-DoMe2OpY.js +3 -0
- package/dist/ui/assets/{DocumentWorkspace-BVaWPA25.js → DocumentWorkspace-DumBWhvb.js} +1 -1
- package/dist/ui/assets/{EntityActivityTimeline-DSj0ThaK.js → EntityActivityTimeline-sHk8Nzbq.js} +1 -1
- package/dist/ui/assets/{InitiativesModule-AxMkWtxH.js → InitiativesModule-3X9UNzHh.js} +1 -1
- package/dist/ui/assets/PlansPage-C3A3EYaV.js +1 -0
- package/dist/ui/assets/PlansPage-DeAzWYTb.css +1 -0
- package/dist/ui/assets/{TaskContextUpload-Dw4rTF4i.js → TaskContextUpload-C8G7pWkX.js} +1 -1
- package/dist/ui/assets/{TaskSettings-f2ga42_V.js → TaskSettings-DM1o9Wla.js} +2 -2
- package/dist/ui/assets/{WorkflowsModule-E4UL3mov.js → WorkflowsModule-CW0crzvD.js} +1 -1
- package/dist/ui/assets/documentReferences-BZB3nMRb.js +1 -0
- package/dist/ui/assets/index-BWFQ9mGn.js +5 -0
- package/dist/ui/assets/{index-BvAbqx5Q.css → index-DcK_8tuE.css} +1 -1
- package/dist/ui/assets/{vendor-icons-B32hGuF2.js → vendor-icons-CLnehDTw.js} +1 -1
- package/dist/ui/index.html +3 -3
- package/dist/utils/supportContact.d.ts +9 -0
- package/dist/utils/supportContact.js +32 -0
- package/package.json +12 -4
- package/scripts/postinstall.js +4 -3
- package/dist/TaskforceCore.CategoryFallback.test.d.ts +0 -1
- package/dist/TaskforceCore.CategoryFallback.test.js +0 -101
- package/dist/TaskforceCore.filter-persistence.test.d.ts +0 -1
- package/dist/TaskforceCore.filter-persistence.test.js +0 -402
- package/dist/TaskforceCore.routing.test.d.ts +0 -1
- package/dist/TaskforceCore.routing.test.js +0 -311
- package/dist/TaskforceCore.test.d.ts +0 -1
- package/dist/TaskforceCore.test.js +0 -7910
- package/dist/TaskforceWidget.test.d.ts +0 -1
- package/dist/TaskforceWidget.test.js +0 -92
- package/dist/UnsavedChangesRelaxed.test.d.ts +0 -1
- package/dist/UnsavedChangesRelaxed.test.js +0 -16
- package/dist/__tests__/localizationCatalogs.test.d.ts +0 -1
- package/dist/__tests__/localizationCatalogs.test.js +0 -54
- package/dist/__tests__/workflowSimulation.test.d.ts +0 -1
- package/dist/__tests__/workflowSimulation.test.js +0 -113
- package/dist/annotatedAttachments/AnnotatedAttachmentSessionStore.test.d.ts +0 -1
- package/dist/annotatedAttachments/AnnotatedAttachmentSessionStore.test.js +0 -278
- package/dist/annotatedAttachments/payload.test.d.ts +0 -1
- package/dist/annotatedAttachments/payload.test.js +0 -67
- package/dist/compat/workspaceSyncCompat.test.d.ts +0 -1
- package/dist/compat/workspaceSyncCompat.test.js +0 -124
- package/dist/components/features/AgentsModule.test.d.ts +0 -1
- package/dist/components/features/AgentsModule.test.js +0 -601
- package/dist/components/features/AnnotatedAttachmentWorkspace.test.d.ts +0 -1
- package/dist/components/features/AnnotatedAttachmentWorkspace.test.js +0 -2883
- package/dist/components/features/DocumentWorkspace.test.d.ts +0 -1
- package/dist/components/features/DocumentWorkspace.test.js +0 -1439
- package/dist/components/features/TaskSettings.test.d.ts +0 -1
- package/dist/components/features/TaskSettings.test.js +0 -1674
- package/dist/components/features/settings/TaxonomyLibraryManager.test.d.ts +0 -1
- package/dist/components/features/settings/TaxonomyLibraryManager.test.js +0 -141
- package/dist/components/task/TaskActionHeader.test.d.ts +0 -1
- package/dist/components/task/TaskActionHeader.test.js +0 -91
- package/dist/components/task/TaskCard.test.d.ts +0 -1
- package/dist/components/task/TaskCard.test.js +0 -513
- package/dist/components/task/TaskContextUpload.test.d.ts +0 -1
- package/dist/components/task/TaskContextUpload.test.js +0 -506
- package/dist/components/task/TaskForm.test.d.ts +0 -1
- package/dist/components/task/TaskForm.test.js +0 -946
- package/dist/components/task/TaskKanban.empty-column-drop.test.d.ts +0 -1
- package/dist/components/task/TaskKanban.empty-column-drop.test.js +0 -66
- package/dist/components/task/TaskKanban.planning-drop.test.d.ts +0 -1
- package/dist/components/task/TaskKanban.planning-drop.test.js +0 -93
- package/dist/components/task/TaskKanban.test.d.ts +0 -1
- package/dist/components/task/TaskKanban.test.js +0 -99
- package/dist/components/task/TaskList.test.d.ts +0 -1
- package/dist/components/task/TaskList.test.js +0 -473
- package/dist/components/task/TaskStatusActions.test.d.ts +0 -1
- package/dist/components/task/TaskStatusActions.test.js +0 -54
- package/dist/components/task/taskKanbanDropRules.test.d.ts +0 -1
- package/dist/components/task/taskKanbanDropRules.test.js +0 -114
- package/dist/components/ui/LevelSelector.test.d.ts +0 -1
- package/dist/components/ui/LevelSelector.test.js +0 -55
- package/dist/components/ui/Markdown.test.d.ts +0 -1
- package/dist/components/ui/Markdown.test.js +0 -38
- package/dist/components/ui/MultiSelectFilter.test.d.ts +0 -1
- package/dist/components/ui/MultiSelectFilter.test.js +0 -74
- package/dist/components/ui/TaxonomyDropdown.test.d.ts +0 -1
- package/dist/components/ui/TaxonomyDropdown.test.js +0 -130
- package/dist/components/ui/TopNoticeLayer.test.d.ts +0 -1
- package/dist/components/ui/TopNoticeLayer.test.js +0 -25
- package/dist/components/views/AppShellHeader.test.d.ts +0 -1
- package/dist/components/views/AppShellHeader.test.js +0 -42
- package/dist/components/views/PlanComparisonPage.test.d.ts +0 -1
- package/dist/components/views/PlanComparisonPage.test.js +0 -757
- package/dist/components/views/PlansPage.test.d.ts +0 -1
- package/dist/components/views/PlansPage.test.js +0 -710
- package/dist/components/views/chrome/WorkspaceChromeSections.test.d.ts +0 -1
- package/dist/components/views/chrome/WorkspaceChromeSections.test.js +0 -54
- package/dist/components/views/chrome/workspaceChrome.test.d.ts +0 -1
- package/dist/components/views/chrome/workspaceChrome.test.js +0 -52
- package/dist/components/views/panels/DocumentFilterToolbar.test.d.ts +0 -1
- package/dist/components/views/panels/DocumentFilterToolbar.test.js +0 -19
- package/dist/components/views/panels/FilterToolbar.test.d.ts +0 -1
- package/dist/components/views/panels/FilterToolbar.test.js +0 -47
- package/dist/components/views/panels/PlanningDrawer.test.d.ts +0 -1
- package/dist/components/views/panels/PlanningDrawer.test.js +0 -529
- package/dist/components/views/planningScope.test.d.ts +0 -1
- package/dist/components/views/planningScope.test.js +0 -60
- package/dist/components/views/standalone/modals/AccountHubModal.test.d.ts +0 -1
- package/dist/components/views/standalone/modals/AccountHubModal.test.js +0 -66
- package/dist/components/views/standalone/modals/SyncEnableWarningModal.test.d.ts +0 -1
- package/dist/components/views/standalone/modals/SyncEnableWarningModal.test.js +0 -24
- package/dist/components/views/teamManagementAccess.test.d.ts +0 -1
- package/dist/components/views/teamManagementAccess.test.js +0 -44
- package/dist/config/deployment.test.d.ts +0 -1
- package/dist/config/deployment.test.js +0 -90
- package/dist/config/envSchema.test.d.ts +0 -1
- package/dist/config/envSchema.test.js +0 -125
- package/dist/core/AiProfileService.test.d.ts +0 -1
- package/dist/core/AiProfileService.test.js +0 -184
- package/dist/core/AiProfiles.test.d.ts +0 -1
- package/dist/core/AiProfiles.test.js +0 -1873
- package/dist/core/AuthTokenService.test.d.ts +0 -1
- package/dist/core/AuthTokenService.test.js +0 -78
- package/dist/core/BulkUpdateFieldsPreview.test.d.ts +0 -1
- package/dist/core/BulkUpdateFieldsPreview.test.js +0 -62
- package/dist/core/CompletedAt.test.d.ts +0 -1
- package/dist/core/CompletedAt.test.js +0 -44
- package/dist/core/CreatedBy.test.d.ts +0 -1
- package/dist/core/CreatedBy.test.js +0 -188
- package/dist/core/DeletedTaskTrash.test.d.ts +0 -1
- package/dist/core/DeletedTaskTrash.test.js +0 -104
- package/dist/core/EntitlementsPolicy.test.d.ts +0 -1
- package/dist/core/EntitlementsPolicy.test.js +0 -280
- package/dist/core/GlobalSettingsService.test.d.ts +0 -1
- package/dist/core/GlobalSettingsService.test.js +0 -45
- package/dist/core/JsonBackupRuntime.test.d.ts +0 -1
- package/dist/core/JsonBackupRuntime.test.js +0 -155
- package/dist/core/PlanFeatureCatalog.test.d.ts +0 -1
- package/dist/core/PlanFeatureCatalog.test.js +0 -139
- package/dist/core/PlanVersionPolicy.test.d.ts +0 -1
- package/dist/core/PlanVersionPolicy.test.js +0 -204
- package/dist/core/PlanningEntities.test.d.ts +0 -1
- package/dist/core/PlanningEntities.test.js +0 -509
- package/dist/core/ScheduleFields.test.d.ts +0 -1
- package/dist/core/ScheduleFields.test.js +0 -193
- package/dist/core/SetupState.test.d.ts +0 -1
- package/dist/core/SetupState.test.js +0 -113
- package/dist/core/SignupMonetizationSettings.test.d.ts +0 -1
- package/dist/core/SignupMonetizationSettings.test.js +0 -515
- package/dist/core/Stats.test.d.ts +0 -1
- package/dist/core/Stats.test.js +0 -36
- package/dist/core/SystemAdmin.test.d.ts +0 -1
- package/dist/core/SystemAdmin.test.js +0 -1106
- package/dist/core/TaskActivitySync.test.d.ts +0 -1
- package/dist/core/TaskActivitySync.test.js +0 -90
- package/dist/core/TaskAttachmentsCanonical.test.d.ts +0 -1
- package/dist/core/TaskAttachmentsCanonical.test.js +0 -356
- package/dist/core/TaskAuditTimeline.test.d.ts +0 -1
- package/dist/core/TaskAuditTimeline.test.js +0 -319
- package/dist/core/TaskTaxonomyValidation.test.d.ts +0 -1
- package/dist/core/TaskTaxonomyValidation.test.js +0 -440
- package/dist/core/Taskforce.ids.test.d.ts +0 -1
- package/dist/core/Taskforce.ids.test.js +0 -611
- package/dist/core/Taskforce.listTasksSlim.test.d.ts +0 -1
- package/dist/core/Taskforce.listTasksSlim.test.js +0 -91
- package/dist/core/Taskforce.mcpAuth.test.d.ts +0 -1
- package/dist/core/Taskforce.mcpAuth.test.js +0 -450
- package/dist/core/Taskforce.realtimeMutation.test.d.ts +0 -1
- package/dist/core/Taskforce.realtimeMutation.test.js +0 -131
- package/dist/core/UserProfileAvatarDrafts.test.d.ts +0 -1
- package/dist/core/UserProfileAvatarDrafts.test.js +0 -138
- package/dist/core/WorkspaceDelete.test.d.ts +0 -1
- package/dist/core/WorkspaceDelete.test.js +0 -159
- package/dist/core/WorkspacePermissions.test.d.ts +0 -1
- package/dist/core/WorkspacePermissions.test.js +0 -270
- package/dist/core/WorkspacePlanMode.test.d.ts +0 -1
- package/dist/core/WorkspacePlanMode.test.js +0 -383
- package/dist/core/WorkspaceSyncSettings.test.d.ts +0 -1
- package/dist/core/WorkspaceSyncSettings.test.js +0 -65
- package/dist/core/__tests__/TaskAttachmentsCanonical.test.d.ts +0 -1
- package/dist/core/__tests__/TaskAttachmentsCanonical.test.js +0 -212
- package/dist/documentReviews/DocumentReviewSessionStore.test.d.ts +0 -1
- package/dist/documentReviews/DocumentReviewSessionStore.test.js +0 -127
- package/dist/hooks/authGuardPolicy.test.d.ts +0 -1
- package/dist/hooks/authGuardPolicy.test.js +0 -76
- package/dist/hooks/bootstrapTimeouts.test.d.ts +0 -1
- package/dist/hooks/bootstrapTimeouts.test.js +0 -12
- package/dist/hooks/sync/controlPlane.test.d.ts +0 -1
- package/dist/hooks/sync/controlPlane.test.js +0 -121
- package/dist/hooks/sync/lifecyclePolicy.test.d.ts +0 -1
- package/dist/hooks/sync/lifecyclePolicy.test.js +0 -124
- package/dist/hooks/sync/orchestratorShared.test.d.ts +0 -1
- package/dist/hooks/sync/orchestratorShared.test.js +0 -98
- package/dist/hooks/sync/pullLifecycle.test.d.ts +0 -1
- package/dist/hooks/sync/pullLifecycle.test.js +0 -80
- package/dist/hooks/sync/recovery.test.d.ts +0 -1
- package/dist/hooks/sync/recovery.test.js +0 -292
- package/dist/hooks/sync/transfers.test.d.ts +0 -1
- package/dist/hooks/sync/transfers.test.js +0 -928
- package/dist/hooks/sync/useRecentSyncEvents.test.d.ts +0 -1
- package/dist/hooks/sync/useRecentSyncEvents.test.js +0 -124
- package/dist/hooks/sync/useSyncStatusActions.test.d.ts +0 -1
- package/dist/hooks/sync/useSyncStatusActions.test.js +0 -133
- package/dist/hooks/sync/useSyncStatusControls.test.d.ts +0 -1
- package/dist/hooks/sync/useSyncStatusControls.test.js +0 -88
- package/dist/hooks/useFilterSort.test.d.ts +0 -1
- package/dist/hooks/useFilterSort.test.js +0 -419
- package/dist/hooks/useRealtimeSync.test.d.ts +0 -1
- package/dist/hooks/useRealtimeSync.test.js +0 -311
- package/dist/hooks/useSyncOrchestrator.aiProfiles.test.d.ts +0 -1
- package/dist/hooks/useSyncOrchestrator.aiProfiles.test.js +0 -54
- package/dist/hooks/useSyncOrchestrator.context-assets.test.d.ts +0 -1
- package/dist/hooks/useSyncOrchestrator.context-assets.test.js +0 -228
- package/dist/hooks/useSyncOrchestrator.retry-closure.test.d.ts +0 -1
- package/dist/hooks/useSyncOrchestrator.retry-closure.test.js +0 -2027
- package/dist/hooks/useTaskData.test.d.ts +0 -1
- package/dist/hooks/useTaskData.test.js +0 -291
- package/dist/hooks/useTaskMutations.test.d.ts +0 -1
- package/dist/hooks/useTaskMutations.test.js +0 -256
- package/dist/hooks/useTaskforce.contract.test.d.ts +0 -1
- package/dist/hooks/useTaskforce.contract.test.js +0 -7
- package/dist/hooks/useTaskforce.priority-filters.test.d.ts +0 -1
- package/dist/hooks/useTaskforce.priority-filters.test.js +0 -28
- package/dist/hooks/useTaskforce.runtime-routing.test.d.ts +0 -1
- package/dist/hooks/useTaskforce.runtime-routing.test.js +0 -246
- package/dist/hooks/useTaskforce.sync-behavior.test.d.ts +0 -1
- package/dist/hooks/useTaskforce.sync-behavior.test.js +0 -3644
- package/dist/hooks/useWorkspaceSyncController.test.d.ts +0 -1
- package/dist/hooks/useWorkspaceSyncController.test.js +0 -192
- package/dist/hooks/workspace/useTaskforceApiRouting.test.d.ts +0 -1
- package/dist/hooks/workspace/useTaskforceApiRouting.test.js +0 -77
- package/dist/hooks/workspace/workspaceLocalState.test.d.ts +0 -1
- package/dist/hooks/workspace/workspaceLocalState.test.js +0 -59
- package/dist/localization/localizationCatalogs.test.d.ts +0 -1
- package/dist/localization/localizationCatalogs.test.js +0 -37
- package/dist/mcp/aiProfileBootstrap.test.d.ts +0 -1
- package/dist/mcp/aiProfileBootstrap.test.js +0 -68
- package/dist/mcp/canonicalAssetHelpers.test.d.ts +0 -1
- package/dist/mcp/canonicalAssetHelpers.test.js +0 -67
- package/dist/mcp/clientIntegrations.test.d.ts +0 -1
- package/dist/mcp/clientIntegrations.test.js +0 -219
- package/dist/mcp/optionResolution.test.d.ts +0 -1
- package/dist/mcp/optionResolution.test.js +0 -43
- package/dist/mcp/runtime.test.d.ts +0 -1
- package/dist/mcp/runtime.test.js +0 -5120
- package/dist/mcp/structuredCommentValidation.test.d.ts +0 -1
- package/dist/mcp/structuredCommentValidation.test.js +0 -31
- package/dist/mcp/structuredDocValidation.test.d.ts +0 -1
- package/dist/mcp/structuredDocValidation.test.js +0 -35
- package/dist/mcp/toolRegistry.test.d.ts +0 -1
- package/dist/mcp/toolRegistry.test.js +0 -34
- package/dist/migrations/billingSchemaParity.test.d.ts +0 -1
- package/dist/migrations/billingSchemaParity.test.js +0 -160
- package/dist/migrations/taskSchemaMigrations.test.d.ts +0 -1
- package/dist/migrations/taskSchemaMigrations.test.js +0 -225
- package/dist/qaOpen.test.d.ts +0 -1
- package/dist/qaOpen.test.js +0 -56
- package/dist/releaseVersion.test.d.ts +0 -1
- package/dist/releaseVersion.test.js +0 -32
- package/dist/runtime/appGates.test.d.ts +0 -1
- package/dist/runtime/appGates.test.js +0 -42
- package/dist/server/aiProfileAvatarAssets.test.d.ts +0 -1
- package/dist/server/aiProfileAvatarAssets.test.js +0 -213
- package/dist/server/annotatedAttachmentsRoutes.test.d.ts +0 -1
- package/dist/server/annotatedAttachmentsRoutes.test.js +0 -532
- package/dist/server/auth.test.d.ts +0 -1
- package/dist/server/auth.test.js +0 -131
- package/dist/server/buildInfo.test.d.ts +0 -1
- package/dist/server/buildInfo.test.js +0 -29
- package/dist/server/cors.test.d.ts +0 -1
- package/dist/server/cors.test.js +0 -77
- package/dist/server/documentReviewRoutes.test.d.ts +0 -1
- package/dist/server/documentReviewRoutes.test.js +0 -190
- package/dist/server/email.test.d.ts +0 -1
- package/dist/server/email.test.js +0 -113
- package/dist/server/index.cookieProxy.test.d.ts +0 -1
- package/dist/server/index.cookieProxy.test.js +0 -67
- package/dist/server/index.rateLimit.test.d.ts +0 -1
- package/dist/server/index.rateLimit.test.js +0 -22
- package/dist/server/index.test.d.ts +0 -1
- package/dist/server/index.test.js +0 -283
- package/dist/server/rateLimit.test.d.ts +0 -1
- package/dist/server/rateLimit.test.js +0 -107
- package/dist/server/realtimeSync.auth.test.d.ts +0 -1
- package/dist/server/realtimeSync.auth.test.js +0 -62
- package/dist/server/realtimeSync.replay.test.d.ts +0 -1
- package/dist/server/realtimeSync.replay.test.js +0 -192
- package/dist/server/realtimeSync.workspaceIsolation.test.d.ts +0 -1
- package/dist/server/realtimeSync.workspaceIsolation.test.js +0 -101
- package/dist/server/routes/billing.test.d.ts +0 -1
- package/dist/server/routes/billing.test.js +0 -3455
- package/dist/server/routes/shared.test.d.ts +0 -1
- package/dist/server/routes/shared.test.js +0 -32
- package/dist/server/routes/sync.integration.test.d.ts +0 -1
- package/dist/server/routes/sync.integration.test.js +0 -2932
- package/dist/server/routes/syncAuxRoutes.test.d.ts +0 -1
- package/dist/server/routes/syncAuxRoutes.test.js +0 -158
- package/dist/server/routes/syncRouteGuards.test.d.ts +0 -1
- package/dist/server/routes/syncRouteGuards.test.js +0 -94
- package/dist/server/routes.test.d.ts +0 -1
- package/dist/server/routes.test.js +0 -15612
- package/dist/server/runtimeMode.test.d.ts +0 -1
- package/dist/server/runtimeMode.test.js +0 -26
- package/dist/server/securityHeaders.test.d.ts +0 -1
- package/dist/server/securityHeaders.test.js +0 -70
- package/dist/services/templateEngine.test.d.ts +0 -1
- package/dist/services/templateEngine.test.js +0 -150
- package/dist/services/templates.test.d.ts +0 -1
- package/dist/services/templates.test.js +0 -45
- package/dist/services/workflowDocumentFixtures.test.d.ts +0 -1
- package/dist/services/workflowDocumentFixtures.test.js +0 -78
- package/dist/services/workflowExportMatrix.test.d.ts +0 -1
- package/dist/services/workflowExportMatrix.test.js +0 -113
- package/dist/services/workflowExportSnapshots.test.d.ts +0 -1
- package/dist/services/workflowExportSnapshots.test.js +0 -30
- package/dist/services/workflowGeneration.test.d.ts +0 -1
- package/dist/services/workflowGeneration.test.js +0 -12
- package/dist/services/workflowSimulation.test.d.ts +0 -1
- package/dist/services/workflowSimulation.test.js +0 -113
- package/dist/services/workflowV2Policy.test.d.ts +0 -1
- package/dist/services/workflowV2Policy.test.js +0 -80
- package/dist/shared/customTaxonomyLibrary.test.d.ts +0 -1
- package/dist/shared/customTaxonomyLibrary.test.js +0 -20
- package/dist/shared/passwordPolicy.test.d.ts +0 -1
- package/dist/shared/passwordPolicy.test.js +0 -34
- package/dist/shared/runtimeContract.test.d.ts +0 -1
- package/dist/shared/runtimeContract.test.js +0 -23
- package/dist/shared/taxonomyLibrary.test.d.ts +0 -1
- package/dist/shared/taxonomyLibrary.test.js +0 -26
- package/dist/shared/taxonomyState.test.d.ts +0 -1
- package/dist/shared/taxonomyState.test.js +0 -71
- package/dist/soak/preflight.cli.d.ts +0 -1
- package/dist/soak/preflight.cli.js +0 -28
- package/dist/soak/preflight.d.ts +0 -26
- package/dist/soak/preflight.js +0 -113
- package/dist/soak/preflight.test.d.ts +0 -1
- package/dist/soak/preflight.test.js +0 -39
- package/dist/storage/objectStorageClient.test.d.ts +0 -1
- package/dist/storage/objectStorageClient.test.js +0 -82
- package/dist/storage/objectStorageConfig.test.d.ts +0 -1
- package/dist/storage/objectStorageConfig.test.js +0 -50
- package/dist/storage/postgresAdapter.test.d.ts +0 -1
- package/dist/storage/postgresAdapter.test.js +0 -29
- package/dist/storage/workspaceAssetStore.test.d.ts +0 -1
- package/dist/storage/workspaceAssetStore.test.js +0 -588
- package/dist/sync/cloudSyncApi.test.d.ts +0 -1
- package/dist/sync/cloudSyncApi.test.js +0 -111
- package/dist/sync/collaborationSyncPayload.test.d.ts +0 -1
- package/dist/sync/collaborationSyncPayload.test.js +0 -125
- package/dist/sync/contentSyncPayload.test.d.ts +0 -1
- package/dist/sync/contentSyncPayload.test.js +0 -143
- package/dist/sync/encryptionService.test.d.ts +0 -1
- package/dist/sync/encryptionService.test.js +0 -52
- package/dist/sync/planningSyncPayload.test.d.ts +0 -1
- package/dist/sync/planningSyncPayload.test.js +0 -92
- package/dist/sync/realtimeFeature.test.d.ts +0 -1
- package/dist/sync/realtimeFeature.test.js +0 -30
- package/dist/sync/realtimeReconcile.test.d.ts +0 -1
- package/dist/sync/realtimeReconcile.test.js +0 -43
- package/dist/sync/syncApplyHandlers.test.d.ts +0 -1
- package/dist/sync/syncApplyHandlers.test.js +0 -626
- package/dist/sync/syncService.test.d.ts +0 -1
- package/dist/sync/syncService.test.js +0 -903
- package/dist/sync/taskSyncPayload.test.d.ts +0 -1
- package/dist/sync/taskSyncPayload.test.js +0 -54
- package/dist/sync/workspacePullFeed.test.d.ts +0 -1
- package/dist/sync/workspacePullFeed.test.js +0 -438
- package/dist/sync/workspaceSyncModel.test.d.ts +0 -1
- package/dist/sync/workspaceSyncModel.test.js +0 -1442
- package/dist/test/setup.d.ts +0 -1
- package/dist/test/setup.js +0 -15
- package/dist/ui/assets/AgentsModule-BS4Pi_nC.js +0 -1
- package/dist/ui/assets/ContextAttachmentManager-CfG_ER7C.js +0 -3
- package/dist/ui/assets/PlansPage-B_z-D6Nh.css +0 -1
- package/dist/ui/assets/PlansPage-Ndt7mYfo.js +0 -1
- package/dist/ui/assets/documentReferences-BOUcJm6-.js +0 -1
- package/dist/ui/assets/index-MAHKvFqp.js +0 -4
- package/dist/utils/accountProfileSummaryCache.test.d.ts +0 -1
- package/dist/utils/accountProfileSummaryCache.test.js +0 -63
- package/dist/utils/annotatedAttachments.test.d.ts +0 -1
- package/dist/utils/annotatedAttachments.test.js +0 -108
- package/dist/utils/assignees.test.d.ts +0 -1
- package/dist/utils/assignees.test.js +0 -25
- package/dist/utils/avatarUpload.test.d.ts +0 -1
- package/dist/utils/avatarUpload.test.js +0 -40
- package/dist/utils/canonicalAssetKind.test.d.ts +0 -1
- package/dist/utils/canonicalAssetKind.test.js +0 -24
- package/dist/utils/coalescedRefresh.test.d.ts +0 -1
- package/dist/utils/coalescedRefresh.test.js +0 -30
- package/dist/utils/constants.icons.test.d.ts +0 -1
- package/dist/utils/constants.icons.test.js +0 -41
- package/dist/utils/planParser.test.d.ts +0 -1
- package/dist/utils/planParser.test.js +0 -183
- package/dist/utils/planningReferences.test.d.ts +0 -1
- package/dist/utils/planningReferences.test.js +0 -17
- package/dist/utils/syncEventDetails.test.d.ts +0 -1
- package/dist/utils/syncEventDetails.test.js +0 -23
- package/dist/utils/syncEventPresentation.test.d.ts +0 -1
- package/dist/utils/syncEventPresentation.test.js +0 -64
- package/dist/utils/syncStatusPresentation.test.d.ts +0 -1
- package/dist/utils/syncStatusPresentation.test.js +0 -164
- package/dist/utils/taskActivity.test.d.ts +0 -1
- package/dist/utils/taskActivity.test.js +0 -218
- package/dist/utils/taskDraftDefaults.test.d.ts +0 -1
- package/dist/utils/taskDraftDefaults.test.js +0 -34
- package/dist/utils/taskDragZones.test.d.ts +0 -1
- package/dist/utils/taskDragZones.test.js +0 -14
- package/dist/utils/taskNormalization.test.d.ts +0 -1
- package/dist/utils/taskNormalization.test.js +0 -158
- package/dist/utils/taskSearch.test.d.ts +0 -1
- package/dist/utils/taskSearch.test.js +0 -69
- package/dist/utils/taskUtils.test.d.ts +0 -1
- package/dist/utils/taskUtils.test.js +0 -19
- package/dist/utils/taskforceApiClient.test.d.ts +0 -1
- package/dist/utils/taskforceApiClient.test.js +0 -44
- package/dist/utils/taxonomyFormDefaults.test.d.ts +0 -1
- package/dist/utils/taxonomyFormDefaults.test.js +0 -63
- package/dist/utils/uiNotice.test.d.ts +0 -1
- package/dist/utils/uiNotice.test.js +0 -18
- package/dist/utils/workspaceIdentity.test.d.ts +0 -1
- package/dist/utils/workspaceIdentity.test.js +0 -61
- package/dist/utils/workspaceLifecycle.test.d.ts +0 -1
- package/dist/utils/workspaceLifecycle.test.js +0 -64
- package/dist/utils/workspaceSyncPresentation.test.d.ts +0 -1
- package/dist/utils/workspaceSyncPresentation.test.js +0 -71
- package/scripts/bootstrap-playwright-auth.mjs +0 -155
- package/scripts/check-cloud-mcp.mjs +0 -83
- package/scripts/check-compat-boundaries.mjs +0 -41
- package/scripts/check-env.ts +0 -31
- package/scripts/check-localization-strings.mjs +0 -49
- package/scripts/check-runtime-boundaries.mjs +0 -44
- package/scripts/debug-global.mjs +0 -34
- package/scripts/debug-login.mjs +0 -32
- package/scripts/debug-server.mjs +0 -36
- package/scripts/deploy-prod.sh +0 -41
- package/scripts/deploy-staging.sh +0 -23
- package/scripts/export-sqlite-to-postgres.mjs +0 -123
- package/scripts/generate-env-example.ts +0 -8
- package/scripts/mcp-stdio-adapter.mjs +0 -160
- package/scripts/migrate-task-data-assets.mjs +0 -408
- package/scripts/playwright-auth.sh +0 -19
- package/scripts/qa-open-lib.mjs +0 -175
- package/scripts/qa-open-lib.mjs.d.ts +0 -49
- package/scripts/qa-open.mjs +0 -352
- package/scripts/release-version-lib.mjs +0 -88
- package/scripts/release-version.mjs +0 -72
- package/scripts/run-billing-performance-smoke.sh +0 -24
- package/scripts/run-dev-proxy.sh +0 -51
- package/scripts/run-e2e-realtime.sh +0 -30
- package/scripts/run-smoke.sh +0 -35
- package/scripts/run-soak.sh +0 -41
- package/scripts/test-global.js +0 -143
- package/scripts/update-homebrew-formula.sh +0 -108
- package/scripts/with-esbuild.sh +0 -11
|
@@ -1,601 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { fireEvent, render, screen, waitFor } from '@testing-library/react';
|
|
3
|
-
import { afterEach, describe, expect, it, vi } from 'vitest';
|
|
4
|
-
import { AgentsModule } from './AgentsModule';
|
|
5
|
-
describe('AgentsModule', () => {
|
|
6
|
-
afterEach(() => {
|
|
7
|
-
vi.restoreAllMocks();
|
|
8
|
-
vi.unstubAllGlobals();
|
|
9
|
-
});
|
|
10
|
-
it('groups registered AI profiles by surface type in a stable section order', async () => {
|
|
11
|
-
const fetchMock = vi.fn()
|
|
12
|
-
.mockResolvedValueOnce({
|
|
13
|
-
ok: true,
|
|
14
|
-
json: async () => ({
|
|
15
|
-
aiProfileSeatUsage: {
|
|
16
|
-
used: 2,
|
|
17
|
-
limit: null,
|
|
18
|
-
remaining: null
|
|
19
|
-
},
|
|
20
|
-
assignees: [
|
|
21
|
-
{ value: 'member-1', label: 'Member One', kind: 'member' },
|
|
22
|
-
{
|
|
23
|
-
value: 'ai-chatgpt',
|
|
24
|
-
label: 'ChatGPT',
|
|
25
|
-
username: 'chatgpt',
|
|
26
|
-
icon: 'Bot',
|
|
27
|
-
color: '#10a37f',
|
|
28
|
-
kind: 'agent',
|
|
29
|
-
surfaceType: 'chat_app',
|
|
30
|
-
seatScope: 'cloud_metered',
|
|
31
|
-
description: 'General-purpose chat surface for planning and writing.',
|
|
32
|
-
role: 'Product copilot',
|
|
33
|
-
provider: 'OpenAI',
|
|
34
|
-
model: 'gpt-5.4',
|
|
35
|
-
createdAt: '2026-04-01T12:00:00.000Z',
|
|
36
|
-
updatedAt: '2026-04-03T15:30:00.000Z',
|
|
37
|
-
lastActiveAt: '2026-04-04T10:00:00.000Z'
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
value: 'ai-codex-1',
|
|
41
|
-
label: 'Codex',
|
|
42
|
-
username: 'codex',
|
|
43
|
-
icon: 'Bot',
|
|
44
|
-
color: '#0ea5e9',
|
|
45
|
-
kind: 'agent',
|
|
46
|
-
surfaceType: 'coding_tool',
|
|
47
|
-
seatScope: 'local_unmetered',
|
|
48
|
-
description: 'Terminal-first coding agent.',
|
|
49
|
-
role: 'Implementation partner',
|
|
50
|
-
provider: 'OpenAI',
|
|
51
|
-
model: 'gpt-5-codex',
|
|
52
|
-
createdAt: '2026-04-02T09:00:00.000Z',
|
|
53
|
-
updatedAt: '2026-04-04T13:15:00.000Z',
|
|
54
|
-
lastActiveAt: '2026-04-04T13:45:00.000Z'
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
value: 'ai-codex-2',
|
|
58
|
-
label: 'Codex',
|
|
59
|
-
username: 'codex-duplicate',
|
|
60
|
-
icon: 'Bot',
|
|
61
|
-
color: '#0ea5e9',
|
|
62
|
-
kind: 'agent',
|
|
63
|
-
surfaceType: 'coding_tool',
|
|
64
|
-
seatScope: 'local_unmetered',
|
|
65
|
-
description: 'Duplicate Codex profile.',
|
|
66
|
-
role: 'Implementation partner',
|
|
67
|
-
provider: 'OpenAI',
|
|
68
|
-
model: 'gpt-5-codex',
|
|
69
|
-
createdAt: '2026-04-02T10:00:00.000Z',
|
|
70
|
-
updatedAt: '2026-04-04T13:16:00.000Z',
|
|
71
|
-
lastActiveAt: '2026-04-04T13:46:00.000Z'
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
value: 'ai-john',
|
|
75
|
-
label: 'John Drake',
|
|
76
|
-
username: 'john-drake',
|
|
77
|
-
icon: 'Bot',
|
|
78
|
-
color: '#64748b',
|
|
79
|
-
kind: 'agent',
|
|
80
|
-
surfaceType: null,
|
|
81
|
-
seatScope: 'cloud_metered',
|
|
82
|
-
createdAt: '2026-03-28T08:00:00.000Z',
|
|
83
|
-
updatedAt: '2026-04-01T08:00:00.000Z',
|
|
84
|
-
lastActiveAt: null
|
|
85
|
-
}
|
|
86
|
-
]
|
|
87
|
-
})
|
|
88
|
-
});
|
|
89
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
90
|
-
const { container } = render(_jsx(AgentsModule, { workspaceId: "workspace-1", cloudAuthConfigured: true, authSessionResolved: true, isAuthenticated: true, cloudAiProfileSeatUsage: { used: 2, limit: 5, remaining: 3 } }));
|
|
91
|
-
await waitFor(() => expect(fetchMock).toHaveBeenCalledTimes(1));
|
|
92
|
-
expect((await screen.findAllByText('Chat Apps')).length).toBeGreaterThan(0);
|
|
93
|
-
expect(screen.getAllByText('Coding Tools').length).toBeGreaterThan(0);
|
|
94
|
-
expect(screen.getAllByText('Unclassified').length).toBeGreaterThan(0);
|
|
95
|
-
expect(screen.getAllByText('Codex')).toHaveLength(1);
|
|
96
|
-
expect(screen.getByText(/1 duplicate/i)).toBeInTheDocument();
|
|
97
|
-
expect(screen.getAllByTitle('Cloud MCP').length).toBeGreaterThan(0);
|
|
98
|
-
expect(screen.getAllByTitle('Local MCP').length).toBeGreaterThan(0);
|
|
99
|
-
expect(screen.getByText('Registered Cloud Agents: 2/5')).toBeInTheDocument();
|
|
100
|
-
expect(screen.getAllByText('General-purpose chat surface for planning and writing.').length).toBeGreaterThan(0);
|
|
101
|
-
expect(screen.getAllByText('Product copilot').length).toBeGreaterThan(0);
|
|
102
|
-
expect(screen.getAllByText('OpenAI').length).toBeGreaterThan(0);
|
|
103
|
-
expect(screen.getAllByText('gpt-5.4').length).toBeGreaterThan(0);
|
|
104
|
-
expect(screen.queryByText(/Profile instances/i)).not.toBeInTheDocument();
|
|
105
|
-
expect(screen.queryByText(/Choose a keeper here if duplicates need to be merged/i)).not.toBeInTheDocument();
|
|
106
|
-
const text = container.textContent || '';
|
|
107
|
-
expect(text.indexOf('Chat Apps')).toBeLessThan(text.indexOf('Coding Tools'));
|
|
108
|
-
expect(text.indexOf('Coding Tools')).toBeLessThan(text.indexOf('Unclassified'));
|
|
109
|
-
fireEvent.click(screen.getByRole('button', { name: /codex/i }));
|
|
110
|
-
expect(screen.getByText('Coding Tool')).toBeInTheDocument();
|
|
111
|
-
expect(screen.getAllByText('Terminal-first coding agent.').length).toBeGreaterThan(0);
|
|
112
|
-
expect(screen.getAllByText('Implementation partner')[0]).toBeInTheDocument();
|
|
113
|
-
expect(screen.getAllByText('OpenAI').length).toBeGreaterThan(0);
|
|
114
|
-
expect(screen.getAllByText('gpt-5-codex').length).toBeGreaterThan(0);
|
|
115
|
-
expect(screen.getByText(/2 linked/i)).toBeInTheDocument();
|
|
116
|
-
expect(screen.getByText(/Profile instances/i)).toBeInTheDocument();
|
|
117
|
-
expect(screen.getByText(/Choose a keeper here if duplicates need to be merged/i)).toBeInTheDocument();
|
|
118
|
-
expect(screen.getAllByTitle('Keep this profile, merge others into it')).toHaveLength(2);
|
|
119
|
-
expect(screen.getByText('@codex-duplicate')).toBeInTheDocument();
|
|
120
|
-
expect(screen.getAllByTitle('Cloud MCP').length).toBeGreaterThan(0);
|
|
121
|
-
expect(screen.getAllByTitle('Local MCP').length).toBeGreaterThan(0);
|
|
122
|
-
});
|
|
123
|
-
it('does not mark local and cloud profiles with the same name as duplicates', async () => {
|
|
124
|
-
const fetchMock = vi.fn()
|
|
125
|
-
.mockResolvedValueOnce({
|
|
126
|
-
ok: true,
|
|
127
|
-
json: async () => ({
|
|
128
|
-
aiProfileSeatUsage: {
|
|
129
|
-
used: 1,
|
|
130
|
-
limit: null,
|
|
131
|
-
remaining: null
|
|
132
|
-
},
|
|
133
|
-
assignees: [
|
|
134
|
-
{
|
|
135
|
-
value: 'ai-codex-local',
|
|
136
|
-
label: 'Codex',
|
|
137
|
-
username: 'codex',
|
|
138
|
-
icon: 'Bot',
|
|
139
|
-
color: '#0ea5e9',
|
|
140
|
-
kind: 'agent',
|
|
141
|
-
surfaceType: 'cli',
|
|
142
|
-
seatScope: 'local_unmetered',
|
|
143
|
-
description: 'Terminal-first coding agent.',
|
|
144
|
-
role: 'Coding Agent',
|
|
145
|
-
provider: 'OpenAI',
|
|
146
|
-
model: 'Codex',
|
|
147
|
-
createdAt: '2026-04-02T09:00:00.000Z',
|
|
148
|
-
updatedAt: '2026-04-04T13:15:00.000Z',
|
|
149
|
-
lastActiveAt: '2026-04-04T13:45:00.000Z'
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
value: 'ai-codex-cloud',
|
|
153
|
-
label: 'Codex',
|
|
154
|
-
username: 'codex',
|
|
155
|
-
icon: 'Bot',
|
|
156
|
-
color: '#0ea5e9',
|
|
157
|
-
kind: 'agent',
|
|
158
|
-
surfaceType: 'cli',
|
|
159
|
-
seatScope: 'cloud_metered',
|
|
160
|
-
description: 'Cloud MCP coding profile.',
|
|
161
|
-
role: 'Coding Agent',
|
|
162
|
-
provider: 'OpenAI',
|
|
163
|
-
model: 'Codex',
|
|
164
|
-
createdAt: '2026-04-02T10:00:00.000Z',
|
|
165
|
-
updatedAt: '2026-04-04T13:16:00.000Z',
|
|
166
|
-
lastActiveAt: '2026-04-04T13:46:00.000Z'
|
|
167
|
-
}
|
|
168
|
-
]
|
|
169
|
-
})
|
|
170
|
-
});
|
|
171
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
172
|
-
render(_jsx(AgentsModule, { workspaceId: "workspace-1", cloudAuthConfigured: true, authSessionResolved: true, isAuthenticated: true, cloudAiProfileSeatUsage: { used: 1, limit: 5, remaining: 4 } }));
|
|
173
|
-
await waitFor(() => expect(fetchMock).toHaveBeenCalledTimes(1));
|
|
174
|
-
expect(screen.getAllByRole('button', { name: /codex/i })).toHaveLength(2);
|
|
175
|
-
expect(screen.queryByText(/\d+ duplicate/i)).not.toBeInTheDocument();
|
|
176
|
-
expect(screen.queryByText(/Profile instances/i)).not.toBeInTheDocument();
|
|
177
|
-
expect(screen.getAllByTitle('Cloud MCP').length).toBeGreaterThan(0);
|
|
178
|
-
expect(screen.getAllByTitle('Local MCP').length).toBeGreaterThan(0);
|
|
179
|
-
});
|
|
180
|
-
it('keeps a duplicate group avatar visible when the newest duplicate has no photo', async () => {
|
|
181
|
-
const avatarUrl = '/api/taskforce/context/workspaces%2Fworkspace-1%2Fassets%2Fimages%2Fai-profiles%2Fai-codex-old%2Favatar%2Fcropped.webp';
|
|
182
|
-
const fetchMock = vi.fn()
|
|
183
|
-
.mockResolvedValueOnce({
|
|
184
|
-
ok: true,
|
|
185
|
-
json: async () => ({
|
|
186
|
-
aiProfileSeatUsage: {
|
|
187
|
-
used: 2,
|
|
188
|
-
limit: null,
|
|
189
|
-
remaining: null
|
|
190
|
-
},
|
|
191
|
-
assignees: [
|
|
192
|
-
{
|
|
193
|
-
value: 'ai-codex-new',
|
|
194
|
-
label: 'Codex',
|
|
195
|
-
username: 'codex-new',
|
|
196
|
-
icon: 'Bot',
|
|
197
|
-
color: '#0ea5e9',
|
|
198
|
-
kind: 'agent',
|
|
199
|
-
surfaceType: 'coding_tool',
|
|
200
|
-
seatScope: 'local_unmetered',
|
|
201
|
-
createdAt: '2026-04-02T10:00:00.000Z',
|
|
202
|
-
updatedAt: '2026-04-04T16:00:00.000Z',
|
|
203
|
-
lastActiveAt: '2026-04-04T16:30:00.000Z',
|
|
204
|
-
avatarUrl: null,
|
|
205
|
-
avatarSourceUrl: null
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
value: 'ai-codex-old',
|
|
209
|
-
label: 'Codex',
|
|
210
|
-
username: 'codex-old',
|
|
211
|
-
icon: 'Bot',
|
|
212
|
-
color: '#0ea5e9',
|
|
213
|
-
kind: 'agent',
|
|
214
|
-
surfaceType: 'coding_tool',
|
|
215
|
-
seatScope: 'local_unmetered',
|
|
216
|
-
createdAt: '2026-04-02T09:00:00.000Z',
|
|
217
|
-
updatedAt: '2026-04-04T13:15:00.000Z',
|
|
218
|
-
lastActiveAt: '2026-04-04T13:45:00.000Z',
|
|
219
|
-
avatarUrl,
|
|
220
|
-
avatarSourceUrl: avatarUrl
|
|
221
|
-
}
|
|
222
|
-
]
|
|
223
|
-
})
|
|
224
|
-
});
|
|
225
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
226
|
-
render(_jsx(AgentsModule, { workspaceId: "workspace-1", cloudAuthConfigured: true, authSessionResolved: true, isAuthenticated: true, cloudAiProfileSeatUsage: { used: 2, limit: 5, remaining: 3 } }));
|
|
227
|
-
const codexButton = await screen.findByRole('button', { name: /codex/i });
|
|
228
|
-
expect(codexButton.querySelector('img')).toHaveAttribute('src', avatarUrl);
|
|
229
|
-
expect(screen.getByLabelText('Edit AI profile photo').querySelector('img')).toHaveAttribute('src', avatarUrl);
|
|
230
|
-
});
|
|
231
|
-
it('uploads AI profile avatars through the stable avatar endpoint', async () => {
|
|
232
|
-
const avatarUrl = '/api/taskforce/context/workspaces%2Fworkspace-1%2Fassets%2Fimages%2Fai-profiles%2Fai-codex%2Favatar%2Fdisplay.gif';
|
|
233
|
-
const fetchMock = vi.fn(async (input, init) => {
|
|
234
|
-
const url = String(input);
|
|
235
|
-
if (url.startsWith('/api/taskforce/workspace/assignee-options')) {
|
|
236
|
-
return {
|
|
237
|
-
ok: true,
|
|
238
|
-
json: async () => ({
|
|
239
|
-
aiProfileSeatUsage: {
|
|
240
|
-
used: 1,
|
|
241
|
-
limit: null,
|
|
242
|
-
remaining: null
|
|
243
|
-
},
|
|
244
|
-
assignees: [
|
|
245
|
-
{
|
|
246
|
-
value: 'ai-codex',
|
|
247
|
-
label: 'Codex',
|
|
248
|
-
username: 'codex',
|
|
249
|
-
icon: 'Bot',
|
|
250
|
-
color: '#0ea5e9',
|
|
251
|
-
kind: 'agent',
|
|
252
|
-
surfaceType: 'coding_tool',
|
|
253
|
-
seatScope: 'cloud_metered',
|
|
254
|
-
createdAt: '2026-04-02T09:00:00.000Z',
|
|
255
|
-
updatedAt: '2026-04-04T13:15:00.000Z',
|
|
256
|
-
lastActiveAt: '2026-04-04T13:45:00.000Z',
|
|
257
|
-
avatarUrl: null,
|
|
258
|
-
avatarSourceUrl: null
|
|
259
|
-
}
|
|
260
|
-
]
|
|
261
|
-
})
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
if (url === '/api/taskforce/workspace/ai-profiles/avatar/upload') {
|
|
265
|
-
return {
|
|
266
|
-
ok: true,
|
|
267
|
-
json: async () => ({
|
|
268
|
-
profile: {
|
|
269
|
-
id: 'ai-codex',
|
|
270
|
-
avatarUrl,
|
|
271
|
-
avatarSourceUrl: '/api/taskforce/context/workspaces%2Fworkspace-1%2Fassets%2Fimages%2Fai-profiles%2Fai-codex%2Favatar%2Fsource.gif',
|
|
272
|
-
avatarRevision: 1,
|
|
273
|
-
avatarUpdatedAt: '2026-04-28T00:00:00.000Z'
|
|
274
|
-
}
|
|
275
|
-
})
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
|
-
throw new Error(`Unexpected fetch ${url}: ${String(init?.body || '')}`);
|
|
279
|
-
});
|
|
280
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
281
|
-
vi.stubGlobal('URL', {
|
|
282
|
-
...URL,
|
|
283
|
-
createObjectURL: vi.fn(() => 'blob:avatar-preview'),
|
|
284
|
-
revokeObjectURL: vi.fn()
|
|
285
|
-
});
|
|
286
|
-
render(_jsx(AgentsModule, { workspaceId: "workspace-1", cloudAuthConfigured: true, authSessionResolved: true, isAuthenticated: true, cloudAiProfileSeatUsage: { used: 1, limit: 5, remaining: 4 } }));
|
|
287
|
-
fireEvent.click(await screen.findByLabelText('Edit AI profile photo'));
|
|
288
|
-
const input = await screen.findByLabelText('Choose profile photo');
|
|
289
|
-
const file = new File(['avatar'], 'avatar.gif', { type: 'image/gif' });
|
|
290
|
-
fireEvent.change(input, { target: { files: [file] } });
|
|
291
|
-
fireEvent.click(screen.getByRole('button', { name: 'Apply Photo' }));
|
|
292
|
-
await waitFor(() => {
|
|
293
|
-
expect(fetchMock).toHaveBeenCalledWith('/api/taskforce/workspace/ai-profiles/avatar/upload', expect.objectContaining({ method: 'POST' }));
|
|
294
|
-
});
|
|
295
|
-
const uploadBody = JSON.parse(String(fetchMock.mock.calls.find((call) => call[0] === '/api/taskforce/workspace/ai-profiles/avatar/upload')?.[1]?.body || '{}'));
|
|
296
|
-
expect(uploadBody).toEqual(expect.objectContaining({
|
|
297
|
-
profileId: 'ai-codex',
|
|
298
|
-
displayImage: expect.objectContaining({
|
|
299
|
-
mimeType: 'image/gif',
|
|
300
|
-
originalName: 'avatar.gif'
|
|
301
|
-
})
|
|
302
|
-
}));
|
|
303
|
-
expect(String(uploadBody.displayImage.dataUrl)).toMatch(new RegExp('^data:image/gif;base64,'));
|
|
304
|
-
expect(fetchMock.mock.calls.some((call) => call[0] === '/api/taskforce/context-upload/init')).toBe(false);
|
|
305
|
-
expect(fetchMock.mock.calls.some((call) => call[0] === '/api/taskforce/context-upload/finalize')).toBe(false);
|
|
306
|
-
expect(fetchMock.mock.calls.some((call) => call[0] === '/api/taskforce/context-upload' && String(call[1]?.method || '').toUpperCase() === 'POST')).toBe(false);
|
|
307
|
-
});
|
|
308
|
-
it('removes a profile from the active roster and reloads the list', async () => {
|
|
309
|
-
const confirmMock = vi.fn().mockReturnValue(true);
|
|
310
|
-
const fetchMock = vi.fn()
|
|
311
|
-
.mockResolvedValueOnce({
|
|
312
|
-
ok: true,
|
|
313
|
-
json: async () => ({
|
|
314
|
-
aiProfileSeatUsage: {
|
|
315
|
-
used: 1,
|
|
316
|
-
limit: null,
|
|
317
|
-
remaining: null
|
|
318
|
-
},
|
|
319
|
-
assignees: [
|
|
320
|
-
{
|
|
321
|
-
value: 'ai-codex',
|
|
322
|
-
label: 'Codex',
|
|
323
|
-
username: 'codex',
|
|
324
|
-
icon: 'Bot',
|
|
325
|
-
color: '#0ea5e9',
|
|
326
|
-
kind: 'agent',
|
|
327
|
-
surfaceType: 'coding_tool',
|
|
328
|
-
description: 'Terminal-first coding agent.',
|
|
329
|
-
role: 'Implementation partner',
|
|
330
|
-
provider: 'OpenAI',
|
|
331
|
-
model: 'gpt-5-codex',
|
|
332
|
-
createdAt: '2026-04-02T09:00:00.000Z',
|
|
333
|
-
updatedAt: '2026-04-04T13:15:00.000Z',
|
|
334
|
-
lastActiveAt: '2026-04-04T13:45:00.000Z'
|
|
335
|
-
}
|
|
336
|
-
]
|
|
337
|
-
})
|
|
338
|
-
})
|
|
339
|
-
.mockResolvedValueOnce({
|
|
340
|
-
ok: true,
|
|
341
|
-
json: async () => ({
|
|
342
|
-
profile: {
|
|
343
|
-
id: 'ai-codex',
|
|
344
|
-
archivedReason: 'manual_archive'
|
|
345
|
-
}
|
|
346
|
-
})
|
|
347
|
-
})
|
|
348
|
-
.mockResolvedValueOnce({
|
|
349
|
-
ok: true,
|
|
350
|
-
json: async () => ({
|
|
351
|
-
aiProfileSeatUsage: {
|
|
352
|
-
used: 0,
|
|
353
|
-
limit: null,
|
|
354
|
-
remaining: null
|
|
355
|
-
},
|
|
356
|
-
assignees: []
|
|
357
|
-
})
|
|
358
|
-
});
|
|
359
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
360
|
-
vi.stubGlobal('confirm', confirmMock);
|
|
361
|
-
render(_jsx(AgentsModule, { workspaceId: "workspace-1", cloudAuthConfigured: true, authSessionResolved: true, isAuthenticated: true, cloudAiProfileSeatUsage: { used: 1, limit: 3, remaining: 2 } }));
|
|
362
|
-
expect(await screen.findByRole('button', { name: /codex/i })).toBeInTheDocument();
|
|
363
|
-
fireEvent.change(screen.getByLabelText('Agent roster status'), { target: { value: 'retire' } });
|
|
364
|
-
await waitFor(() => expect(confirmMock).toHaveBeenCalledTimes(1));
|
|
365
|
-
expect(fetchMock).toHaveBeenNthCalledWith(2, '/api/taskforce/workspace/ai-profiles/archive', expect.objectContaining({
|
|
366
|
-
method: 'POST',
|
|
367
|
-
credentials: 'include'
|
|
368
|
-
}));
|
|
369
|
-
expect(fetchMock).toHaveBeenNthCalledWith(3, '/api/taskforce/workspace/assignee-options?workspaceId=workspace-1&kind=agent', expect.objectContaining({
|
|
370
|
-
credentials: 'include'
|
|
371
|
-
}));
|
|
372
|
-
expect(await screen.findByText('AI profile removed from active roster.')).toBeInTheDocument();
|
|
373
|
-
expect(await screen.findByText('No AI profiles registered yet.')).toBeInTheDocument();
|
|
374
|
-
});
|
|
375
|
-
it('updates an AI profile category from the detail dropdown', async () => {
|
|
376
|
-
const fetchMock = vi.fn(async (input, init) => {
|
|
377
|
-
const url = String(input);
|
|
378
|
-
if (url.startsWith('/api/taskforce/workspace/assignee-options')) {
|
|
379
|
-
return {
|
|
380
|
-
ok: true,
|
|
381
|
-
json: async () => ({
|
|
382
|
-
aiProfileSeatUsage: {
|
|
383
|
-
used: 1,
|
|
384
|
-
limit: null,
|
|
385
|
-
remaining: null
|
|
386
|
-
},
|
|
387
|
-
assignees: [
|
|
388
|
-
{
|
|
389
|
-
value: 'ai-chatgpt',
|
|
390
|
-
label: 'ChatGPT',
|
|
391
|
-
username: 'chatgpt',
|
|
392
|
-
icon: 'Bot',
|
|
393
|
-
color: '#10a37f',
|
|
394
|
-
kind: 'agent',
|
|
395
|
-
surfaceType: 'chat_app',
|
|
396
|
-
seatScope: 'cloud_metered',
|
|
397
|
-
provider: 'OpenAI',
|
|
398
|
-
model: 'GPT-5',
|
|
399
|
-
createdAt: '2026-04-02T09:00:00.000Z',
|
|
400
|
-
updatedAt: '2026-04-04T13:15:00.000Z',
|
|
401
|
-
lastActiveAt: '2026-04-04T13:45:00.000Z'
|
|
402
|
-
}
|
|
403
|
-
]
|
|
404
|
-
})
|
|
405
|
-
};
|
|
406
|
-
}
|
|
407
|
-
if (url === '/api/taskforce/workspace/ai-profiles/surface-type') {
|
|
408
|
-
return {
|
|
409
|
-
ok: true,
|
|
410
|
-
json: async () => ({
|
|
411
|
-
profile: {
|
|
412
|
-
id: 'ai-chatgpt',
|
|
413
|
-
surfaceType: 'cli',
|
|
414
|
-
updatedAt: '2026-04-28T00:00:00.000Z'
|
|
415
|
-
}
|
|
416
|
-
})
|
|
417
|
-
};
|
|
418
|
-
}
|
|
419
|
-
throw new Error(`Unexpected fetch ${url}: ${String(init?.body || '')}`);
|
|
420
|
-
});
|
|
421
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
422
|
-
render(_jsx(AgentsModule, { workspaceId: "workspace-1", cloudAuthConfigured: true, authSessionResolved: true, isAuthenticated: true, cloudAiProfileSeatUsage: { used: 1, limit: 3, remaining: 2 } }));
|
|
423
|
-
const categorySelect = await screen.findByLabelText('Agent category');
|
|
424
|
-
fireEvent.change(categorySelect, { target: { value: 'cli' } });
|
|
425
|
-
await waitFor(() => {
|
|
426
|
-
expect(fetchMock).toHaveBeenCalledWith('/api/taskforce/workspace/ai-profiles/surface-type', expect.objectContaining({
|
|
427
|
-
method: 'POST',
|
|
428
|
-
credentials: 'include',
|
|
429
|
-
body: JSON.stringify({
|
|
430
|
-
profileId: 'ai-chatgpt',
|
|
431
|
-
surfaceType: 'cli'
|
|
432
|
-
})
|
|
433
|
-
}));
|
|
434
|
-
});
|
|
435
|
-
expect(await screen.findByText('AI profile category updated.')).toBeInTheDocument();
|
|
436
|
-
expect(screen.getByLabelText('Agent category').value).toBe('cli');
|
|
437
|
-
expect(screen.getAllByText('CLI').length).toBeGreaterThan(0);
|
|
438
|
-
});
|
|
439
|
-
it('shows archive permission errors inline near the roster status control', async () => {
|
|
440
|
-
const confirmMock = vi.fn().mockReturnValue(true);
|
|
441
|
-
const fetchMock = vi.fn()
|
|
442
|
-
.mockResolvedValueOnce({
|
|
443
|
-
ok: true,
|
|
444
|
-
json: async () => ({
|
|
445
|
-
aiProfileSeatUsage: {
|
|
446
|
-
used: 1,
|
|
447
|
-
limit: null,
|
|
448
|
-
remaining: null
|
|
449
|
-
},
|
|
450
|
-
assignees: [
|
|
451
|
-
{
|
|
452
|
-
value: 'ai-codex',
|
|
453
|
-
label: 'Codex',
|
|
454
|
-
username: 'codex',
|
|
455
|
-
icon: 'Bot',
|
|
456
|
-
color: '#0ea5e9',
|
|
457
|
-
kind: 'agent',
|
|
458
|
-
surfaceType: 'coding_tool',
|
|
459
|
-
description: 'Terminal-first coding agent.',
|
|
460
|
-
role: 'Implementation partner',
|
|
461
|
-
provider: 'OpenAI',
|
|
462
|
-
model: 'gpt-5-codex',
|
|
463
|
-
createdAt: '2026-04-02T09:00:00.000Z',
|
|
464
|
-
updatedAt: '2026-04-04T13:15:00.000Z',
|
|
465
|
-
lastActiveAt: '2026-04-04T13:45:00.000Z'
|
|
466
|
-
}
|
|
467
|
-
]
|
|
468
|
-
})
|
|
469
|
-
})
|
|
470
|
-
.mockResolvedValueOnce({
|
|
471
|
-
ok: false,
|
|
472
|
-
json: async () => ({
|
|
473
|
-
error: 'Forbidden: owner or admin role required.'
|
|
474
|
-
})
|
|
475
|
-
});
|
|
476
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
477
|
-
vi.stubGlobal('confirm', confirmMock);
|
|
478
|
-
render(_jsx(AgentsModule, { workspaceId: "workspace-1", cloudAuthConfigured: true, authSessionResolved: true, isAuthenticated: true, cloudAiProfileSeatUsage: { used: 1, limit: 3, remaining: 2 } }));
|
|
479
|
-
expect(await screen.findByRole('button', { name: /codex/i })).toBeInTheDocument();
|
|
480
|
-
fireEvent.change(screen.getByLabelText('Agent roster status'), { target: { value: 'retire' } });
|
|
481
|
-
const inlineError = await screen.findByRole('alert');
|
|
482
|
-
expect(inlineError).toHaveTextContent('Forbidden: owner or admin role required.');
|
|
483
|
-
expect(screen.getByLabelText('Agent roster status')).toBeInTheDocument();
|
|
484
|
-
});
|
|
485
|
-
it('falls back to local seat usage only when cloud auth is not configured', async () => {
|
|
486
|
-
const fetchMock = vi.fn()
|
|
487
|
-
.mockResolvedValueOnce({
|
|
488
|
-
ok: true,
|
|
489
|
-
json: async () => ({
|
|
490
|
-
aiProfileSeatUsage: {
|
|
491
|
-
used: 1,
|
|
492
|
-
limit: 3,
|
|
493
|
-
remaining: 2
|
|
494
|
-
},
|
|
495
|
-
assignees: [
|
|
496
|
-
{
|
|
497
|
-
value: 'ai-codex',
|
|
498
|
-
label: 'Codex',
|
|
499
|
-
username: 'codex',
|
|
500
|
-
icon: 'Bot',
|
|
501
|
-
color: '#0ea5e9',
|
|
502
|
-
kind: 'agent',
|
|
503
|
-
surfaceType: 'coding_tool',
|
|
504
|
-
seatScope: 'local_unmetered',
|
|
505
|
-
createdAt: '2026-04-02T09:00:00.000Z',
|
|
506
|
-
updatedAt: '2026-04-04T13:15:00.000Z',
|
|
507
|
-
lastActiveAt: '2026-04-04T13:45:00.000Z'
|
|
508
|
-
}
|
|
509
|
-
]
|
|
510
|
-
})
|
|
511
|
-
});
|
|
512
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
513
|
-
render(_jsx(AgentsModule, { workspaceId: "workspace-1" }));
|
|
514
|
-
expect(await screen.findByText('Registered Cloud Agents: 1/3')).toBeInTheDocument();
|
|
515
|
-
});
|
|
516
|
-
it('shows no cloud seat label when cloud auth is configured but cloud seat usage is unavailable', async () => {
|
|
517
|
-
const fetchMock = vi.fn()
|
|
518
|
-
.mockResolvedValueOnce({
|
|
519
|
-
ok: true,
|
|
520
|
-
json: async () => ({
|
|
521
|
-
aiProfileSeatUsage: {
|
|
522
|
-
used: 0,
|
|
523
|
-
limit: null,
|
|
524
|
-
remaining: null
|
|
525
|
-
},
|
|
526
|
-
assignees: [
|
|
527
|
-
{
|
|
528
|
-
value: 'ai-codex',
|
|
529
|
-
label: 'Codex',
|
|
530
|
-
username: 'codex',
|
|
531
|
-
icon: 'Bot',
|
|
532
|
-
color: '#0ea5e9',
|
|
533
|
-
kind: 'agent',
|
|
534
|
-
surfaceType: 'coding_tool',
|
|
535
|
-
seatScope: 'cloud_metered',
|
|
536
|
-
createdAt: '2026-04-02T09:00:00.000Z',
|
|
537
|
-
updatedAt: '2026-04-04T13:15:00.000Z',
|
|
538
|
-
lastActiveAt: '2026-04-04T13:45:00.000Z'
|
|
539
|
-
}
|
|
540
|
-
]
|
|
541
|
-
})
|
|
542
|
-
});
|
|
543
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
544
|
-
render(_jsx(AgentsModule, { workspaceId: "workspace-1", cloudAuthConfigured: true, authSessionResolved: true, isAuthenticated: true }));
|
|
545
|
-
await screen.findByRole('button', { name: /codex/i });
|
|
546
|
-
expect(screen.queryByText(/Registered Cloud Agents:/i)).not.toBeInTheDocument();
|
|
547
|
-
expect(screen.queryByText('Registered Cloud Agents: 0/Unlimited')).not.toBeInTheDocument();
|
|
548
|
-
});
|
|
549
|
-
it('shows resolved cloud seat usage when the account summary updates after mount', async () => {
|
|
550
|
-
const fetchMock = vi.fn()
|
|
551
|
-
.mockResolvedValueOnce({
|
|
552
|
-
ok: true,
|
|
553
|
-
json: async () => ({
|
|
554
|
-
aiProfileSeatUsage: {
|
|
555
|
-
used: 0,
|
|
556
|
-
limit: null,
|
|
557
|
-
remaining: null
|
|
558
|
-
},
|
|
559
|
-
assignees: [
|
|
560
|
-
{
|
|
561
|
-
value: 'ai-codex',
|
|
562
|
-
label: 'Codex',
|
|
563
|
-
username: 'codex',
|
|
564
|
-
icon: 'Bot',
|
|
565
|
-
color: '#0ea5e9',
|
|
566
|
-
kind: 'agent',
|
|
567
|
-
surfaceType: 'coding_tool',
|
|
568
|
-
seatScope: 'cloud_metered',
|
|
569
|
-
createdAt: '2026-04-02T09:00:00.000Z',
|
|
570
|
-
updatedAt: '2026-04-04T13:15:00.000Z',
|
|
571
|
-
lastActiveAt: '2026-04-04T13:45:00.000Z'
|
|
572
|
-
}
|
|
573
|
-
]
|
|
574
|
-
})
|
|
575
|
-
});
|
|
576
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
577
|
-
const { rerender } = render(_jsx(AgentsModule, { workspaceId: "workspace-1", cloudAuthConfigured: true, authSessionResolved: true, isAuthenticated: true, cloudAiProfileSeatUsage: null }));
|
|
578
|
-
await screen.findByRole('button', { name: /codex/i });
|
|
579
|
-
expect(screen.queryByText(/Registered Cloud Agents:/i)).not.toBeInTheDocument();
|
|
580
|
-
rerender(_jsx(AgentsModule, { workspaceId: "workspace-1", cloudAuthConfigured: true, authSessionResolved: true, isAuthenticated: true, cloudAiProfileSeatUsage: { used: 0, limit: 20, remaining: 20 } }));
|
|
581
|
-
expect(await screen.findByText('Registered Cloud Agents: 0/20')).toBeInTheDocument();
|
|
582
|
-
});
|
|
583
|
-
it('shows a cloud login prompt instead of unlimited when cloud auth is configured but the user is signed out', async () => {
|
|
584
|
-
const fetchMock = vi.fn()
|
|
585
|
-
.mockResolvedValueOnce({
|
|
586
|
-
ok: true,
|
|
587
|
-
json: async () => ({
|
|
588
|
-
aiProfileSeatUsage: {
|
|
589
|
-
used: 0,
|
|
590
|
-
limit: null,
|
|
591
|
-
remaining: null
|
|
592
|
-
},
|
|
593
|
-
assignees: []
|
|
594
|
-
})
|
|
595
|
-
});
|
|
596
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
597
|
-
render(_jsx(AgentsModule, { workspaceId: "workspace-1", cloudAuthConfigured: true, authSessionResolved: true, isAuthenticated: false }));
|
|
598
|
-
expect(await screen.findByText('Log into account for Cloud agents')).toBeInTheDocument();
|
|
599
|
-
expect(screen.queryByText('Registered Cloud Agents: 0/Unlimited')).not.toBeInTheDocument();
|
|
600
|
-
});
|
|
601
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|