@taskforcehq/taskforce 0.3.311 → 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 +40 -2
- package/dist/TaskforceCore.js +1 -1
- package/dist/components/features/InitiativesModule.js +1 -1
- package/dist/components/features/TaskSettings.js +1 -1
- package/dist/components/views/StandaloneLayout.js +3 -6
- package/dist/components/views/standalone/modals/AccountHubModal.d.ts +1 -2
- package/dist/components/views/standalone/modals/AccountHubModal.js +2 -3
- package/dist/components/views/standalone/modals/HelpModal.js +15 -2
- package/dist/hooks/useFilterSort.js +1 -1
- package/dist/hooks/useTaskforce.js +2 -2
- package/dist/hooks/workspace/useTaskforceWorkspaceBootstrap.js +5 -2
- package/dist/ui/assets/{AgentsModule-D8u9P5dZ.js → AgentsModule-BULqIo8e.js} +1 -1
- package/dist/ui/assets/{AnnotatedAttachmentWorkspace-CsUauFA2.js → AnnotatedAttachmentWorkspace-DHr4rHK9.js} +1 -1
- package/dist/ui/assets/{ContextAttachmentManager-DbQvDHFz.js → ContextAttachmentManager-DoMe2OpY.js} +1 -1
- package/dist/ui/assets/{DocumentWorkspace-BmTkN1A8.js → DocumentWorkspace-DumBWhvb.js} +1 -1
- package/dist/ui/assets/{EntityActivityTimeline-BXHTM-Nh.js → EntityActivityTimeline-sHk8Nzbq.js} +1 -1
- package/dist/ui/assets/{InitiativesModule-D33RyXx0.js → InitiativesModule-3X9UNzHh.js} +1 -1
- package/dist/ui/assets/{PlansPage-D0RXlT9_.js → PlansPage-C3A3EYaV.js} +1 -1
- package/dist/ui/assets/{TaskContextUpload-Vsg67lpR.js → TaskContextUpload-C8G7pWkX.js} +1 -1
- package/dist/ui/assets/{TaskSettings-DshLw7_d.js → TaskSettings-DM1o9Wla.js} +2 -2
- package/dist/ui/assets/{WorkflowsModule-CLM-1BnF.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-DOR9PRqt.css → index-DcK_8tuE.css} +1 -1
- package/dist/ui/index.html +2 -2
- 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 -758
- 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 -72
- package/dist/components/views/standalone/modals/HelpModal.test.d.ts +0 -1
- package/dist/components/views/standalone/modals/HelpModal.test.js +0 -23
- 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 -236
- 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 -5211
- 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 -3515
- 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/documentReferences-BPWp6ce0.js +0 -1
- package/dist/ui/assets/index-zvbo2Jse.js +0 -5
- 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/supportContact.test.d.ts +0 -1
- package/dist/utils/supportContact.test.js +0 -19
- 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,280 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import fs from 'fs';
|
|
3
|
-
import os from 'os';
|
|
4
|
-
import path from 'path';
|
|
5
|
-
import { TaskforceCore, TaskforceRuleError } from './Taskforce';
|
|
6
|
-
import { WorkspaceAssetStore } from '../storage/workspaceAssetStore.js';
|
|
7
|
-
function makeProjectRoot() {
|
|
8
|
-
return fs.mkdtempSync(path.join(os.tmpdir(), 'taskforce-entitlements-'));
|
|
9
|
-
}
|
|
10
|
-
function openCore(projectRoot) {
|
|
11
|
-
const core = new TaskforceCore({
|
|
12
|
-
projectRoot,
|
|
13
|
-
storagePath: path.join(projectRoot, '.taskforce')
|
|
14
|
-
});
|
|
15
|
-
const db = core.db;
|
|
16
|
-
const now = new Date().toISOString();
|
|
17
|
-
const addFreeMapping = (planVersionId) => {
|
|
18
|
-
db.prepare(`
|
|
19
|
-
INSERT OR IGNORE INTO billing_price_mappings (
|
|
20
|
-
tenant_id, plan_version_id, billing_interval, stripe_price_id, pricing_type, active, unit_amount, currency, created_at, updated_at
|
|
21
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
22
|
-
`).run('default', planVersionId, 'month', `free:${planVersionId}:month`, 'free', 1, 0, null, now, now);
|
|
23
|
-
};
|
|
24
|
-
core.upsertPlanCatalog({ planId: 'free', displayName: 'Free' });
|
|
25
|
-
addFreeMapping('free-v1');
|
|
26
|
-
core.upsertPlanCatalog({ planId: 'free', displayName: 'Free', status: 'active' });
|
|
27
|
-
core.upsertPlanCatalog({ planId: 'team-5', displayName: 'Team 5' });
|
|
28
|
-
addFreeMapping('team-5-v1');
|
|
29
|
-
core.upsertPlanCatalog({ planId: 'team-5', displayName: 'Team 5', status: 'active' });
|
|
30
|
-
core.createPlanVersion({
|
|
31
|
-
planId: 'team-5',
|
|
32
|
-
versionNumber: 2,
|
|
33
|
-
isDefault: true,
|
|
34
|
-
seatLimit: 5
|
|
35
|
-
});
|
|
36
|
-
core.updatePlanVersionFeatures({
|
|
37
|
-
planVersionId: 'team-5-v2',
|
|
38
|
-
features: [
|
|
39
|
-
{ featureKey: 'collaboration.invites', access: 'enabled' },
|
|
40
|
-
{ featureKey: 'collaboration.team_management', access: 'enabled' },
|
|
41
|
-
{ featureKey: 'workspace.workspaces', access: 'enabled' }
|
|
42
|
-
]
|
|
43
|
-
});
|
|
44
|
-
return core;
|
|
45
|
-
}
|
|
46
|
-
describe('Taskforce entitlements policy engine', () => {
|
|
47
|
-
it('counts active + invited + disabled seats and removal frees a seat', () => {
|
|
48
|
-
const projectRoot = makeProjectRoot();
|
|
49
|
-
const core = openCore(projectRoot);
|
|
50
|
-
try {
|
|
51
|
-
core.createWorkspace({ workspaceId: 'workspace-seat', name: 'Seat Workspace' });
|
|
52
|
-
core.ensureBootstrapUserAccess({
|
|
53
|
-
userId: 'owner-u1',
|
|
54
|
-
workspaceId: 'workspace-seat',
|
|
55
|
-
role: 'owner',
|
|
56
|
-
email: 'owner@example.com'
|
|
57
|
-
});
|
|
58
|
-
core.setUserAccountPlanMode('owner-u1', 'team');
|
|
59
|
-
core.ensureBootstrapUserAccess({
|
|
60
|
-
userId: 'member-u2',
|
|
61
|
-
workspaceId: 'workspace-seat',
|
|
62
|
-
role: 'member',
|
|
63
|
-
email: 'member2@example.com'
|
|
64
|
-
});
|
|
65
|
-
core.ensureBootstrapUserAccess({
|
|
66
|
-
userId: 'member-u3',
|
|
67
|
-
workspaceId: 'workspace-seat',
|
|
68
|
-
role: 'member',
|
|
69
|
-
email: 'member3@example.com'
|
|
70
|
-
});
|
|
71
|
-
core.setWorkspaceUserDisabled('member-u3', 'workspace-seat', true);
|
|
72
|
-
core.inviteWorkspaceUser({
|
|
73
|
-
workspaceId: 'workspace-seat',
|
|
74
|
-
email: 'invite4@example.com',
|
|
75
|
-
role: 'member'
|
|
76
|
-
});
|
|
77
|
-
const initial = core.countWorkspaceSeatUsage('workspace-seat', { includeInvited: true });
|
|
78
|
-
expect(initial.used).toBe(4);
|
|
79
|
-
expect(initial.limit).toBe(5);
|
|
80
|
-
expect(initial.remaining).toBe(1);
|
|
81
|
-
const inviteUser = core.listWorkspaceUsers('workspace-seat').find((item) => item.email === 'invite4@example.com');
|
|
82
|
-
expect(inviteUser?.status).toBe('invited');
|
|
83
|
-
core.removeWorkspaceUser(String(inviteUser?.userId || ''), 'workspace-seat');
|
|
84
|
-
const afterRemoval = core.countWorkspaceSeatUsage('workspace-seat', { includeInvited: true });
|
|
85
|
-
expect(afterRemoval.used).toBe(3);
|
|
86
|
-
expect(afterRemoval.remaining).toBe(2);
|
|
87
|
-
}
|
|
88
|
-
finally {
|
|
89
|
-
core.close();
|
|
90
|
-
fs.rmSync(projectRoot, { recursive: true, force: true });
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
it('blocks collaboration features when entitlement state is suspended', () => {
|
|
94
|
-
const projectRoot = makeProjectRoot();
|
|
95
|
-
const core = openCore(projectRoot);
|
|
96
|
-
try {
|
|
97
|
-
core.createWorkspace({ workspaceId: 'workspace-suspend', name: 'Suspend Workspace' });
|
|
98
|
-
core.ensureBootstrapUserAccess({
|
|
99
|
-
userId: 'owner-u1',
|
|
100
|
-
workspaceId: 'workspace-suspend',
|
|
101
|
-
role: 'owner',
|
|
102
|
-
email: 'owner@example.com'
|
|
103
|
-
});
|
|
104
|
-
core.setUserAccountPlanMode('owner-u1', 'team');
|
|
105
|
-
core.updateAccountEntitlement({
|
|
106
|
-
accountId: 'owner-u1',
|
|
107
|
-
entitlementState: 'suspended',
|
|
108
|
-
reason: 'billing hold',
|
|
109
|
-
actorUserId: 'system-admin',
|
|
110
|
-
actorRole: 'system_admin'
|
|
111
|
-
});
|
|
112
|
-
const evaluation = core.evaluateFeatureAccess({
|
|
113
|
-
userId: 'owner-u1',
|
|
114
|
-
workspaceId: 'workspace-suspend',
|
|
115
|
-
featureKey: 'collaboration.invites'
|
|
116
|
-
});
|
|
117
|
-
expect(evaluation.allowed).toBe(false);
|
|
118
|
-
expect(evaluation.reasonCode).toBe('ENTITLEMENT_STATE_BLOCKED');
|
|
119
|
-
expect(core.getAccountAccessStatus('owner-u1')).toEqual(expect.objectContaining({
|
|
120
|
-
gate: 'missing_entitlement',
|
|
121
|
-
canAccessApp: false,
|
|
122
|
-
canAccessPlans: true,
|
|
123
|
-
hasEntitlement: true
|
|
124
|
-
}));
|
|
125
|
-
}
|
|
126
|
-
finally {
|
|
127
|
-
core.close();
|
|
128
|
-
fs.rmSync(projectRoot, { recursive: true, force: true });
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
it('enforces seat limits on invite path', () => {
|
|
132
|
-
const projectRoot = makeProjectRoot();
|
|
133
|
-
const core = openCore(projectRoot);
|
|
134
|
-
try {
|
|
135
|
-
core.createWorkspace({ workspaceId: 'workspace-cap', name: 'Cap Workspace' });
|
|
136
|
-
core.ensureBootstrapUserAccess({
|
|
137
|
-
userId: 'owner-u1',
|
|
138
|
-
workspaceId: 'workspace-cap',
|
|
139
|
-
role: 'owner',
|
|
140
|
-
email: 'owner@example.com'
|
|
141
|
-
});
|
|
142
|
-
core.createPlanVersion({
|
|
143
|
-
planId: 'team-5',
|
|
144
|
-
versionNumber: 3,
|
|
145
|
-
isDefault: false,
|
|
146
|
-
seatLimit: 2
|
|
147
|
-
});
|
|
148
|
-
core.updatePlanVersionFeatures({
|
|
149
|
-
planVersionId: 'team-5-v3',
|
|
150
|
-
features: [
|
|
151
|
-
{ featureKey: 'collaboration.invites', access: 'enabled' },
|
|
152
|
-
{ featureKey: 'collaboration.team_management', access: 'enabled' },
|
|
153
|
-
{ featureKey: 'collaboration.seat_limit', access: 'limited', config: { seat_limit: 2 } }
|
|
154
|
-
]
|
|
155
|
-
});
|
|
156
|
-
core.updateAccountEntitlement({
|
|
157
|
-
accountId: 'owner-u1',
|
|
158
|
-
planVersionId: 'team-5-v3',
|
|
159
|
-
entitlementState: 'active',
|
|
160
|
-
actorUserId: 'system-admin',
|
|
161
|
-
actorRole: 'system_admin'
|
|
162
|
-
});
|
|
163
|
-
core.ensureBootstrapUserAccess({
|
|
164
|
-
userId: 'member-u2',
|
|
165
|
-
workspaceId: 'workspace-cap',
|
|
166
|
-
role: 'member',
|
|
167
|
-
email: 'member2@example.com'
|
|
168
|
-
});
|
|
169
|
-
expect(() => {
|
|
170
|
-
core.inviteWorkspaceUser({
|
|
171
|
-
workspaceId: 'workspace-cap',
|
|
172
|
-
email: 'member3@example.com',
|
|
173
|
-
role: 'member'
|
|
174
|
-
});
|
|
175
|
-
}).toThrowError(/Seat limit reached/);
|
|
176
|
-
expect(() => core.assertSeatAvailable('workspace-cap')).toThrowError(/Seat limit reached/);
|
|
177
|
-
}
|
|
178
|
-
finally {
|
|
179
|
-
core.close();
|
|
180
|
-
fs.rmSync(projectRoot, { recursive: true, force: true });
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
it('enforces workspace limits from the workspaces feature config', () => {
|
|
184
|
-
const projectRoot = makeProjectRoot();
|
|
185
|
-
const core = openCore(projectRoot);
|
|
186
|
-
try {
|
|
187
|
-
core.updatePlanVersionFeatures({
|
|
188
|
-
planVersionId: 'free-v1',
|
|
189
|
-
features: [
|
|
190
|
-
{ featureKey: 'workspace.workspaces', access: 'limited', config: { maxWorkspaces: 1 } }
|
|
191
|
-
]
|
|
192
|
-
});
|
|
193
|
-
core.createWorkspace({ workspaceId: 'workspace-one', name: 'Workspace One' });
|
|
194
|
-
core.ensureBootstrapUserAccess({
|
|
195
|
-
userId: 'owner-u1',
|
|
196
|
-
workspaceId: 'workspace-one',
|
|
197
|
-
role: 'owner',
|
|
198
|
-
email: 'owner@example.com'
|
|
199
|
-
});
|
|
200
|
-
core.updateAccountEntitlement({
|
|
201
|
-
accountId: 'owner-u1',
|
|
202
|
-
planVersionId: 'free-v1',
|
|
203
|
-
entitlementState: 'active',
|
|
204
|
-
actorUserId: 'system-admin',
|
|
205
|
-
actorRole: 'system_admin'
|
|
206
|
-
});
|
|
207
|
-
expect(() => {
|
|
208
|
-
core.createWorkspaceForUser({
|
|
209
|
-
userId: 'owner-u1',
|
|
210
|
-
name: 'Workspace Two'
|
|
211
|
-
});
|
|
212
|
-
}).toThrowError(TaskforceRuleError);
|
|
213
|
-
}
|
|
214
|
-
finally {
|
|
215
|
-
core.close();
|
|
216
|
-
fs.rmSync(projectRoot, { recursive: true, force: true });
|
|
217
|
-
}
|
|
218
|
-
});
|
|
219
|
-
it('enforces limited document cloud storage allowances by current usage plus requested upload size', () => {
|
|
220
|
-
const projectRoot = makeProjectRoot();
|
|
221
|
-
const core = openCore(projectRoot);
|
|
222
|
-
try {
|
|
223
|
-
core.updatePlanVersionFeatures({
|
|
224
|
-
planVersionId: 'free-v1',
|
|
225
|
-
features: [
|
|
226
|
-
{ featureKey: 'context.uploads', access: 'limited', config: { storageLimitMb: 1 } }
|
|
227
|
-
]
|
|
228
|
-
});
|
|
229
|
-
core.createWorkspace({ workspaceId: 'workspace-storage', name: 'Storage Workspace' });
|
|
230
|
-
core.ensureBootstrapUserAccess({
|
|
231
|
-
userId: 'owner-u1',
|
|
232
|
-
workspaceId: 'workspace-storage',
|
|
233
|
-
role: 'owner',
|
|
234
|
-
email: 'owner@example.com'
|
|
235
|
-
});
|
|
236
|
-
core.updateAccountEntitlement({
|
|
237
|
-
accountId: 'owner-u1',
|
|
238
|
-
planVersionId: 'free-v1',
|
|
239
|
-
entitlementState: 'active',
|
|
240
|
-
actorUserId: 'system-admin',
|
|
241
|
-
actorRole: 'system_admin'
|
|
242
|
-
});
|
|
243
|
-
const store = new WorkspaceAssetStore(core.getDatabaseAdapter(), core.getTenantId());
|
|
244
|
-
store.upsertAsset({
|
|
245
|
-
assetId: 'asset-storage-1',
|
|
246
|
-
workspaceId: 'workspace-storage',
|
|
247
|
-
kind: 'document',
|
|
248
|
-
originalFilename: 'existing.pdf',
|
|
249
|
-
mimeType: 'application/pdf',
|
|
250
|
-
storageProvider: 'local',
|
|
251
|
-
storageKey: 'workspaces/workspace-storage/assets/documents/asset-storage-1-existing.pdf',
|
|
252
|
-
contentSha256: 'existing-hash',
|
|
253
|
-
sizeBytes: 900_000,
|
|
254
|
-
documentId: 'document-storage-1',
|
|
255
|
-
version: 1,
|
|
256
|
-
isLatest: true
|
|
257
|
-
});
|
|
258
|
-
const withinLimit = core.evaluateFeatureAccess({
|
|
259
|
-
userId: 'owner-u1',
|
|
260
|
-
workspaceId: 'workspace-storage',
|
|
261
|
-
featureKey: 'context.uploads',
|
|
262
|
-
context: { requestedBytes: 100_000 }
|
|
263
|
-
});
|
|
264
|
-
expect(withinLimit.allowed).toBe(true);
|
|
265
|
-
expect(withinLimit.reasonCode).toBe('OK');
|
|
266
|
-
const overLimit = core.evaluateFeatureAccess({
|
|
267
|
-
userId: 'owner-u1',
|
|
268
|
-
workspaceId: 'workspace-storage',
|
|
269
|
-
featureKey: 'context.uploads',
|
|
270
|
-
context: { requestedBytes: 200_000 }
|
|
271
|
-
});
|
|
272
|
-
expect(overLimit.allowed).toBe(false);
|
|
273
|
-
expect(overLimit.reasonCode).toBe('UPLOAD_STORAGE_LIMIT_REACHED');
|
|
274
|
-
}
|
|
275
|
-
finally {
|
|
276
|
-
core.close();
|
|
277
|
-
fs.rmSync(projectRoot, { recursive: true, force: true });
|
|
278
|
-
}
|
|
279
|
-
});
|
|
280
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import os from 'os';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import { afterEach, describe, expect, it } from 'vitest';
|
|
5
|
-
import { TaskforceCore } from './Taskforce';
|
|
6
|
-
const roots = [];
|
|
7
|
-
function makeProjectRoot() {
|
|
8
|
-
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'taskforce-global-settings-'));
|
|
9
|
-
roots.push(root);
|
|
10
|
-
return root;
|
|
11
|
-
}
|
|
12
|
-
afterEach(() => {
|
|
13
|
-
while (roots.length > 0) {
|
|
14
|
-
const root = roots.pop();
|
|
15
|
-
if (root)
|
|
16
|
-
fs.rmSync(root, { recursive: true, force: true });
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
describe('TaskforceCore global site settings', () => {
|
|
20
|
-
it('persists pricing page title and description', () => {
|
|
21
|
-
const projectRoot = makeProjectRoot();
|
|
22
|
-
const storagePath = '.taskforce';
|
|
23
|
-
const core = new TaskforceCore({ projectRoot, storagePath });
|
|
24
|
-
core.updateGlobalSettings({
|
|
25
|
-
site: {
|
|
26
|
-
pricingPageTitle: 'Choose Your Plan',
|
|
27
|
-
pricingPageDescription: 'Compare plans and pick the right fit.',
|
|
28
|
-
pricingPageShowPublicDescriptions: false
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
expect(core.getGlobalSettings().site).toMatchObject({
|
|
32
|
-
pricingPageTitle: 'Choose Your Plan',
|
|
33
|
-
pricingPageDescription: 'Compare plans and pick the right fit.',
|
|
34
|
-
pricingPageShowPublicDescriptions: false
|
|
35
|
-
});
|
|
36
|
-
core.close();
|
|
37
|
-
const reopened = new TaskforceCore({ projectRoot, storagePath });
|
|
38
|
-
expect(reopened.getGlobalSettings().site).toMatchObject({
|
|
39
|
-
pricingPageTitle: 'Choose Your Plan',
|
|
40
|
-
pricingPageDescription: 'Compare plans and pick the right fit.',
|
|
41
|
-
pricingPageShowPublicDescriptions: false
|
|
42
|
-
});
|
|
43
|
-
reopened.close();
|
|
44
|
-
});
|
|
45
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import os from 'os';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import { afterEach, describe, expect, it } from 'vitest';
|
|
5
|
-
import { TaskforceCore } from './Taskforce';
|
|
6
|
-
const roots = [];
|
|
7
|
-
function createProjectRoot(prefix) {
|
|
8
|
-
const projectRoot = fs.mkdtempSync(path.join(os.tmpdir(), prefix));
|
|
9
|
-
roots.push(projectRoot);
|
|
10
|
-
return projectRoot;
|
|
11
|
-
}
|
|
12
|
-
afterEach(() => {
|
|
13
|
-
while (roots.length > 0) {
|
|
14
|
-
const root = roots.pop();
|
|
15
|
-
if (root)
|
|
16
|
-
fs.rmSync(root, { recursive: true, force: true });
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
describe('TaskforceCore JSON backup runtime behavior', () => {
|
|
20
|
-
it('does not persist tasks.json in cloud runtime even when project and global backup settings are enabled', () => {
|
|
21
|
-
const projectRoot = createProjectRoot('taskforce-json-backup-cloud-');
|
|
22
|
-
const core = new TaskforceCore({
|
|
23
|
-
projectRoot,
|
|
24
|
-
runtimeMode: 'cloud',
|
|
25
|
-
database: {
|
|
26
|
-
provider: 'sqlite'
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
core.updateConfig({ jsonBackupEnabled: true });
|
|
30
|
-
core.updateGlobalSettings({ jsonBackupEnabled: true });
|
|
31
|
-
core.createTask({ title: 'Cloud task' });
|
|
32
|
-
expect(core.getJsonBackupEnabled()).toBe(false);
|
|
33
|
-
expect(fs.existsSync(path.join(projectRoot, '.taskforce', 'tasks.json'))).toBe(false);
|
|
34
|
-
core.close();
|
|
35
|
-
});
|
|
36
|
-
it('persists tasks.json in local runtime when JSON backup is enabled', () => {
|
|
37
|
-
const projectRoot = createProjectRoot('taskforce-json-backup-local-');
|
|
38
|
-
const core = new TaskforceCore({
|
|
39
|
-
projectRoot,
|
|
40
|
-
runtimeMode: 'local'
|
|
41
|
-
});
|
|
42
|
-
core.updateConfig({ jsonBackupEnabled: true });
|
|
43
|
-
core.createTask({ title: 'Local task' });
|
|
44
|
-
expect(core.getJsonBackupEnabled()).toBe(true);
|
|
45
|
-
expect(fs.existsSync(path.join(projectRoot, '.taskforce', 'tasks.json'))).toBe(true);
|
|
46
|
-
core.close();
|
|
47
|
-
});
|
|
48
|
-
it('persists generic project config settings in the database instead of config.json', () => {
|
|
49
|
-
const projectRoot = createProjectRoot('taskforce-project-config-db-');
|
|
50
|
-
const core = new TaskforceCore({
|
|
51
|
-
projectRoot,
|
|
52
|
-
runtimeMode: 'local'
|
|
53
|
-
});
|
|
54
|
-
core.updateConfig({
|
|
55
|
-
theme: 'light',
|
|
56
|
-
jsonBackupEnabled: true,
|
|
57
|
-
manualComplexityEnabled: true,
|
|
58
|
-
checklistDropdownEnabled: true
|
|
59
|
-
});
|
|
60
|
-
expect(core.getConfig()).toMatchObject({
|
|
61
|
-
theme: 'light',
|
|
62
|
-
jsonBackupEnabled: true,
|
|
63
|
-
manualComplexityEnabled: true,
|
|
64
|
-
checklistDropdownEnabled: true
|
|
65
|
-
});
|
|
66
|
-
expect(core.getEffectiveTheme()).toBe('light');
|
|
67
|
-
expect(core.getJsonBackupEnabled()).toBe(true);
|
|
68
|
-
const configPath = path.join(projectRoot, '.taskforce', 'config.json');
|
|
69
|
-
expect(JSON.parse(fs.readFileSync(configPath, 'utf-8'))).toEqual({});
|
|
70
|
-
core.close();
|
|
71
|
-
const reopened = new TaskforceCore({
|
|
72
|
-
projectRoot,
|
|
73
|
-
runtimeMode: 'local'
|
|
74
|
-
});
|
|
75
|
-
expect(reopened.getConfig()).toMatchObject({
|
|
76
|
-
theme: 'light',
|
|
77
|
-
jsonBackupEnabled: true,
|
|
78
|
-
manualComplexityEnabled: true,
|
|
79
|
-
checklistDropdownEnabled: true
|
|
80
|
-
});
|
|
81
|
-
expect(reopened.getEffectiveTheme()).toBe('light');
|
|
82
|
-
expect(reopened.getJsonBackupEnabled()).toBe(true);
|
|
83
|
-
reopened.close();
|
|
84
|
-
});
|
|
85
|
-
it('stores theme, json backup, and checklist dropdown settings per user while keeping manual complexity shared', () => {
|
|
86
|
-
const projectRoot = createProjectRoot('taskforce-project-config-user-scope-');
|
|
87
|
-
const core = new TaskforceCore({
|
|
88
|
-
projectRoot,
|
|
89
|
-
runtimeMode: 'local'
|
|
90
|
-
});
|
|
91
|
-
core.updateConfig({
|
|
92
|
-
theme: 'light',
|
|
93
|
-
jsonBackupEnabled: true,
|
|
94
|
-
manualComplexityEnabled: true,
|
|
95
|
-
checklistDropdownEnabled: true
|
|
96
|
-
}, 'default', 'user-a');
|
|
97
|
-
expect(core.getConfig('default', 'user-a')).toMatchObject({
|
|
98
|
-
theme: 'light',
|
|
99
|
-
jsonBackupEnabled: true,
|
|
100
|
-
manualComplexityEnabled: true,
|
|
101
|
-
checklistDropdownEnabled: true
|
|
102
|
-
});
|
|
103
|
-
const userBConfig = core.getConfig('default', 'user-b') || {};
|
|
104
|
-
expect(userBConfig).toMatchObject({
|
|
105
|
-
manualComplexityEnabled: true
|
|
106
|
-
});
|
|
107
|
-
expect(userBConfig.theme).toBeUndefined();
|
|
108
|
-
expect(userBConfig.jsonBackupEnabled).toBeUndefined();
|
|
109
|
-
expect(userBConfig.checklistDropdownEnabled).toBeUndefined();
|
|
110
|
-
expect(core.getEffectiveTheme('default', 'user-a')).toBe('light');
|
|
111
|
-
expect(core.getJsonBackupEnabled('default', 'user-a')).toBe(true);
|
|
112
|
-
expect(core.hasProjectThemeOverride('default', 'user-a')).toBe(true);
|
|
113
|
-
expect(core.hasProjectThemeOverride('default', 'user-b')).toBe(false);
|
|
114
|
-
core.close();
|
|
115
|
-
});
|
|
116
|
-
it('migrates legacy generic project config settings from config.json into the database', () => {
|
|
117
|
-
const projectRoot = createProjectRoot('taskforce-project-config-migration-');
|
|
118
|
-
const storagePath = path.join(projectRoot, '.taskforce');
|
|
119
|
-
fs.mkdirSync(storagePath, { recursive: true });
|
|
120
|
-
fs.writeFileSync(path.join(storagePath, 'config.json'), JSON.stringify({
|
|
121
|
-
theme: 'light',
|
|
122
|
-
jsonBackupEnabled: true,
|
|
123
|
-
manualComplexityEnabled: true,
|
|
124
|
-
checklistDropdownEnabled: true,
|
|
125
|
-
categories: [{ value: 'default', label: 'General', icon: 'Inbox' }]
|
|
126
|
-
}, null, 2));
|
|
127
|
-
const core = new TaskforceCore({
|
|
128
|
-
projectRoot,
|
|
129
|
-
runtimeMode: 'local'
|
|
130
|
-
});
|
|
131
|
-
expect(core.getConfig()).toMatchObject({
|
|
132
|
-
theme: 'light',
|
|
133
|
-
jsonBackupEnabled: true,
|
|
134
|
-
manualComplexityEnabled: true,
|
|
135
|
-
checklistDropdownEnabled: true
|
|
136
|
-
});
|
|
137
|
-
fs.writeFileSync(path.join(storagePath, 'config.json'), JSON.stringify({
|
|
138
|
-
categories: [{ value: 'default', label: 'General', icon: 'Inbox' }]
|
|
139
|
-
}, null, 2));
|
|
140
|
-
core.close();
|
|
141
|
-
const reopened = new TaskforceCore({
|
|
142
|
-
projectRoot,
|
|
143
|
-
runtimeMode: 'local'
|
|
144
|
-
});
|
|
145
|
-
expect(reopened.getConfig()).toMatchObject({
|
|
146
|
-
theme: 'light',
|
|
147
|
-
jsonBackupEnabled: true,
|
|
148
|
-
manualComplexityEnabled: true,
|
|
149
|
-
checklistDropdownEnabled: true
|
|
150
|
-
});
|
|
151
|
-
expect(reopened.getEffectiveTheme()).toBe('light');
|
|
152
|
-
expect(reopened.getJsonBackupEnabled()).toBe(true);
|
|
153
|
-
reopened.close();
|
|
154
|
-
});
|
|
155
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import fs from 'fs';
|
|
3
|
-
import os from 'os';
|
|
4
|
-
import path from 'path';
|
|
5
|
-
import { TaskforceCore } from './Taskforce';
|
|
6
|
-
function makeProjectRoot() {
|
|
7
|
-
return fs.mkdtempSync(path.join(os.tmpdir(), 'taskforce-plan-feature-catalog-'));
|
|
8
|
-
}
|
|
9
|
-
describe('TaskforceCore plan feature catalog marketing copy', () => {
|
|
10
|
-
it('persists public marketing copy overrides and falls back after clearing them', () => {
|
|
11
|
-
const projectRoot = makeProjectRoot();
|
|
12
|
-
const core = new TaskforceCore({
|
|
13
|
-
projectRoot,
|
|
14
|
-
storagePath: path.join(projectRoot, '.taskforce')
|
|
15
|
-
});
|
|
16
|
-
const initialFeature = core.listPlanFeatureCatalog().find((feature) => feature.featureKey === 'collaboration.ai_profiles');
|
|
17
|
-
expect(initialFeature?.label).toBe('AI Profiles');
|
|
18
|
-
expect(initialFeature?.publicLabel ?? null).toBeNull();
|
|
19
|
-
expect(initialFeature?.publicDescription ?? null).toBeNull();
|
|
20
|
-
expect(initialFeature?.publicDescriptionVisible ?? null).toBeNull();
|
|
21
|
-
expect(initialFeature?.publicDisplayOrder).toBe(20);
|
|
22
|
-
const updated = core.updatePlanFeatureCatalogMarketingCopy({
|
|
23
|
-
featureKey: 'collaboration.ai_profiles',
|
|
24
|
-
publicLabel: 'AI teammates',
|
|
25
|
-
publicDescription: 'Add reusable AI teammates to your workspace.',
|
|
26
|
-
publicDescriptionVisible: false,
|
|
27
|
-
publicDisplayOrder: 24
|
|
28
|
-
});
|
|
29
|
-
expect(updated.publicLabel).toBe('AI teammates');
|
|
30
|
-
expect(updated.publicDescription).toBe('Add reusable AI teammates to your workspace.');
|
|
31
|
-
expect(updated.publicDescriptionVisible).toBe(false);
|
|
32
|
-
expect(updated.publicDisplayOrder).toBe(24);
|
|
33
|
-
const persisted = core.listPlanFeatureCatalog().find((feature) => feature.featureKey === 'collaboration.ai_profiles');
|
|
34
|
-
expect(persisted?.publicLabel).toBe('AI teammates');
|
|
35
|
-
expect(persisted?.publicDescription).toBe('Add reusable AI teammates to your workspace.');
|
|
36
|
-
expect(persisted?.publicDescriptionVisible).toBe(false);
|
|
37
|
-
expect(persisted?.publicDisplayOrder).toBe(24);
|
|
38
|
-
const cleared = core.updatePlanFeatureCatalogMarketingCopy({
|
|
39
|
-
featureKey: 'collaboration.ai_profiles',
|
|
40
|
-
publicLabel: ' ',
|
|
41
|
-
publicDescription: '',
|
|
42
|
-
publicDescriptionVisible: null,
|
|
43
|
-
publicDisplayOrder: null
|
|
44
|
-
});
|
|
45
|
-
expect(cleared.publicLabel ?? null).toBeNull();
|
|
46
|
-
expect(cleared.publicDescription ?? null).toBeNull();
|
|
47
|
-
expect(cleared.publicDescriptionVisible ?? null).toBeNull();
|
|
48
|
-
expect(cleared.publicDisplayOrder).toBe(20);
|
|
49
|
-
const fallback = core.listPlanFeatureCatalog().find((feature) => feature.featureKey === 'collaboration.ai_profiles');
|
|
50
|
-
expect(fallback?.label).toBe('AI Profiles');
|
|
51
|
-
expect(fallback?.publicLabel ?? null).toBeNull();
|
|
52
|
-
expect(fallback?.publicDescription ?? null).toBeNull();
|
|
53
|
-
expect(fallback?.publicDescriptionVisible ?? null).toBeNull();
|
|
54
|
-
expect(fallback?.publicDisplayOrder).toBe(20);
|
|
55
|
-
core.close();
|
|
56
|
-
fs.rmSync(projectRoot, { recursive: true, force: true });
|
|
57
|
-
});
|
|
58
|
-
it('migrates legacy workspace feature catalog overrides to the canonical key', () => {
|
|
59
|
-
const projectRoot = makeProjectRoot();
|
|
60
|
-
const core = new TaskforceCore({
|
|
61
|
-
projectRoot,
|
|
62
|
-
storagePath: path.join(projectRoot, '.taskforce')
|
|
63
|
-
});
|
|
64
|
-
const db = core.db;
|
|
65
|
-
db.prepare(`
|
|
66
|
-
INSERT INTO plan_feature_catalog_overrides (
|
|
67
|
-
tenant_id,
|
|
68
|
-
feature_key,
|
|
69
|
-
public_label,
|
|
70
|
-
public_description,
|
|
71
|
-
public_display_order,
|
|
72
|
-
created_at,
|
|
73
|
-
updated_at
|
|
74
|
-
) VALUES (?, 'workspace.switching', ?, ?, ?, ?, ?)
|
|
75
|
-
`).run('default', 'Workspace access', 'Let a user create and switch between multiple workspaces.', 14, '2026-01-01T00:00:00.000Z', '2026-01-01T00:00:00.000Z');
|
|
76
|
-
core.planEntitlementService.normalizeLegacyPlanDataIfNeeded();
|
|
77
|
-
const feature = core.listPlanFeatureCatalog().find((item) => item.featureKey === 'workspace.workspaces');
|
|
78
|
-
expect(feature?.publicLabel).toBe('Workspace access');
|
|
79
|
-
expect(feature?.publicDescription).toBe('Let a user create and switch between multiple workspaces.');
|
|
80
|
-
expect(feature?.publicDisplayOrder).toBe(14);
|
|
81
|
-
const rows = db.prepare(`
|
|
82
|
-
SELECT feature_key
|
|
83
|
-
FROM plan_feature_catalog_overrides
|
|
84
|
-
WHERE tenant_id = ?
|
|
85
|
-
`).all('default');
|
|
86
|
-
expect(rows.some((row) => row.feature_key === 'workspace.switching')).toBe(false);
|
|
87
|
-
expect(rows.some((row) => row.feature_key === 'workspace.workspaces')).toBe(true);
|
|
88
|
-
core.close();
|
|
89
|
-
fs.rmSync(projectRoot, { recursive: true, force: true });
|
|
90
|
-
});
|
|
91
|
-
it('creates, updates, and deletes custom feature catalog entries', () => {
|
|
92
|
-
const projectRoot = makeProjectRoot();
|
|
93
|
-
const core = new TaskforceCore({
|
|
94
|
-
projectRoot,
|
|
95
|
-
storagePath: path.join(projectRoot, '.taskforce')
|
|
96
|
-
});
|
|
97
|
-
const created = core.createCustomPlanFeatureCatalogEntry({
|
|
98
|
-
label: 'Unlimited Local Workspaces',
|
|
99
|
-
description: 'Run unlimited local workspaces on your device.',
|
|
100
|
-
publicDescriptionVisible: false,
|
|
101
|
-
publicDisplayOrder: 12
|
|
102
|
-
});
|
|
103
|
-
expect(created.featureKey).toMatch(/^marketing\./);
|
|
104
|
-
expect(created.isCustom).toBe(true);
|
|
105
|
-
expect(created.label).toBe('Unlimited Local Workspaces');
|
|
106
|
-
expect(created.description).toBe('Run unlimited local workspaces on your device.');
|
|
107
|
-
expect(created.publicDescriptionVisible).toBe(false);
|
|
108
|
-
expect(created.publicDisplayOrder).toBe(12);
|
|
109
|
-
const updated = core.updatePlanFeatureCatalogMarketingCopy({
|
|
110
|
-
featureKey: created.featureKey,
|
|
111
|
-
label: 'Unlimited Local Workspaces',
|
|
112
|
-
description: 'Run unlimited local workspaces offline on your device.',
|
|
113
|
-
publicLabel: 'Unlimited Local Workspaces',
|
|
114
|
-
publicDescription: 'Create as many fully local workspaces as you need.',
|
|
115
|
-
publicDescriptionVisible: true,
|
|
116
|
-
publicDisplayOrder: 14
|
|
117
|
-
});
|
|
118
|
-
expect(updated.isCustom).toBe(true);
|
|
119
|
-
expect(updated.description).toBe('Run unlimited local workspaces offline on your device.');
|
|
120
|
-
expect(updated.publicLabel).toBe('Unlimited Local Workspaces');
|
|
121
|
-
expect(updated.publicDescription).toBe('Create as many fully local workspaces as you need.');
|
|
122
|
-
expect(updated.publicDescriptionVisible).toBe(true);
|
|
123
|
-
expect(updated.publicDisplayOrder).toBe(14);
|
|
124
|
-
const plan = core.upsertPlanCatalog({ planId: 'free', displayName: 'Free', status: 'active' });
|
|
125
|
-
expect(plan.planId).toBe('free');
|
|
126
|
-
core.updatePlanVersionFeatures({
|
|
127
|
-
planVersionId: 'free-v1',
|
|
128
|
-
features: [
|
|
129
|
-
{ featureKey: created.featureKey, access: 'enabled', config: {} }
|
|
130
|
-
]
|
|
131
|
-
});
|
|
132
|
-
expect(core.getPlanVersionFeatures('free', 'free-v1').features[created.featureKey]?.access).toBe('enabled');
|
|
133
|
-
core.deleteCustomPlanFeatureCatalogEntry(created.featureKey);
|
|
134
|
-
expect(core.listPlanFeatureCatalog().some((feature) => feature.featureKey === created.featureKey)).toBe(false);
|
|
135
|
-
expect(core.getPlanVersionFeatures('free', 'free-v1').features[created.featureKey]).toBeUndefined();
|
|
136
|
-
core.close();
|
|
137
|
-
fs.rmSync(projectRoot, { recursive: true, force: true });
|
|
138
|
-
});
|
|
139
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|