@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,111 +0,0 @@
|
|
|
1
|
-
import { afterEach, describe, expect, it, vi } from 'vitest';
|
|
2
|
-
import { applyLocalWorkspaceChanges } from './cloudSyncApi';
|
|
3
|
-
describe('cloudSyncApi.applyLocalWorkspaceChanges', () => {
|
|
4
|
-
afterEach(() => {
|
|
5
|
-
vi.unstubAllGlobals();
|
|
6
|
-
vi.restoreAllMocks();
|
|
7
|
-
window.history.replaceState({}, '', '/');
|
|
8
|
-
});
|
|
9
|
-
it('uses canonical local apply endpoint by default', async () => {
|
|
10
|
-
const fetchMock = vi.fn().mockResolvedValue({
|
|
11
|
-
ok: true,
|
|
12
|
-
status: 200,
|
|
13
|
-
json: () => Promise.resolve({ success: true })
|
|
14
|
-
});
|
|
15
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
16
|
-
const result = await applyLocalWorkspaceChanges('ws-1', [{ op: 'upsert', archived: false, task: { id: 't-1' } }]);
|
|
17
|
-
expect(result.ok).toBe(true);
|
|
18
|
-
expect(fetchMock).toHaveBeenCalledTimes(1);
|
|
19
|
-
expect(fetchMock).toHaveBeenCalledWith('/api/taskforce/sync/workspace/apply-local', expect.any(Object));
|
|
20
|
-
});
|
|
21
|
-
it('keeps the canonical local apply endpoint when running under /taskforce path', async () => {
|
|
22
|
-
window.history.replaceState({}, '', '/taskforce');
|
|
23
|
-
const fetchMock = vi.fn().mockResolvedValue({
|
|
24
|
-
ok: true,
|
|
25
|
-
status: 200,
|
|
26
|
-
json: () => Promise.resolve({ success: true })
|
|
27
|
-
});
|
|
28
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
29
|
-
const result = await applyLocalWorkspaceChanges('ws-2', [{ op: 'delete', taskId: 't-2' }]);
|
|
30
|
-
expect(result.ok).toBe(true);
|
|
31
|
-
expect(fetchMock).toHaveBeenCalledTimes(1);
|
|
32
|
-
expect(fetchMock).toHaveBeenCalledWith('/api/taskforce/sync/workspace/apply-local', expect.any(Object));
|
|
33
|
-
});
|
|
34
|
-
it('includes bootstrap snapshot reconciliation metadata when provided', async () => {
|
|
35
|
-
const fetchMock = vi.fn().mockResolvedValue({
|
|
36
|
-
ok: true,
|
|
37
|
-
status: 200,
|
|
38
|
-
json: () => Promise.resolve({ success: true })
|
|
39
|
-
});
|
|
40
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
41
|
-
const result = await applyLocalWorkspaceChanges('ws-bootstrap', [], {
|
|
42
|
-
bootstrapSnapshot: {
|
|
43
|
-
currentAnnotatedAttachmentSessionIds: ['session-1', 'session-2']
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
expect(result.ok).toBe(true);
|
|
47
|
-
expect(fetchMock).toHaveBeenCalledTimes(1);
|
|
48
|
-
const [, requestInit] = fetchMock.mock.calls[0] || [];
|
|
49
|
-
expect(typeof requestInit?.body).toBe('string');
|
|
50
|
-
expect(JSON.parse(String(requestInit?.body))).toMatchObject({
|
|
51
|
-
workspaceId: 'ws-bootstrap',
|
|
52
|
-
bootstrapSnapshot: {
|
|
53
|
-
currentAnnotatedAttachmentSessionIds: ['session-1', 'session-2']
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
it('includes workspace members when provided', async () => {
|
|
58
|
-
const fetchMock = vi.fn().mockResolvedValue({
|
|
59
|
-
ok: true,
|
|
60
|
-
status: 200,
|
|
61
|
-
json: () => Promise.resolve({ success: true })
|
|
62
|
-
});
|
|
63
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
64
|
-
const result = await applyLocalWorkspaceChanges('ws-members', [], {
|
|
65
|
-
workspaceMembers: [
|
|
66
|
-
{
|
|
67
|
-
userId: 'user-1',
|
|
68
|
-
workspaceId: 'ws-members',
|
|
69
|
-
email: 'member@example.com',
|
|
70
|
-
displayName: 'Member One',
|
|
71
|
-
role: 'member',
|
|
72
|
-
permissionMode: 'read-write',
|
|
73
|
-
betaAccess: true,
|
|
74
|
-
status: 'active',
|
|
75
|
-
disabled: false
|
|
76
|
-
}
|
|
77
|
-
]
|
|
78
|
-
});
|
|
79
|
-
expect(result.ok).toBe(true);
|
|
80
|
-
const [, requestInit] = fetchMock.mock.calls[0] || [];
|
|
81
|
-
expect(JSON.parse(String(requestInit?.body))).toMatchObject({
|
|
82
|
-
workspaceId: 'ws-members',
|
|
83
|
-
workspaceMembers: [
|
|
84
|
-
expect.objectContaining({
|
|
85
|
-
userId: 'user-1',
|
|
86
|
-
email: 'member@example.com'
|
|
87
|
-
})
|
|
88
|
-
]
|
|
89
|
-
});
|
|
90
|
-
});
|
|
91
|
-
it('returns single-endpoint status diagnostics on non-ok response', async () => {
|
|
92
|
-
const fetchMock = vi.fn().mockResolvedValue({
|
|
93
|
-
ok: false,
|
|
94
|
-
status: 503,
|
|
95
|
-
text: () => Promise.resolve(JSON.stringify({ error: 'unavailable' }))
|
|
96
|
-
});
|
|
97
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
98
|
-
const result = await applyLocalWorkspaceChanges('ws-3', [{ op: 'upsert', archived: false, task: { id: 't-3' } }]);
|
|
99
|
-
expect(result.ok).toBe(false);
|
|
100
|
-
expect(result.failures).toEqual(['/api/taskforce/sync/workspace/apply-local:503']);
|
|
101
|
-
expect(fetchMock).toHaveBeenCalledTimes(1);
|
|
102
|
-
});
|
|
103
|
-
it('returns single-endpoint network diagnostics on fetch error', async () => {
|
|
104
|
-
const fetchMock = vi.fn().mockRejectedValue(new Error('network down'));
|
|
105
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
106
|
-
const result = await applyLocalWorkspaceChanges('ws-4', [{ op: 'upsert', archived: false, task: { id: 't-4' } }]);
|
|
107
|
-
expect(result.ok).toBe(false);
|
|
108
|
-
expect(result.failures).toEqual(['/api/taskforce/sync/workspace/apply-local:network']);
|
|
109
|
-
expect(fetchMock).toHaveBeenCalledTimes(1);
|
|
110
|
-
});
|
|
111
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { normalizeAiProfileSyncPayload, normalizeAnnotatedAttachmentSessionSyncPayload, normalizeDeleteSyncPayload, normalizeDocumentReviewCommentSyncPayload, normalizeDocumentReviewSessionSyncPayload, } from './collaborationSyncPayload';
|
|
3
|
-
describe('collaborationSyncPayload', () => {
|
|
4
|
-
const normalizeSurfaceType = (value) => {
|
|
5
|
-
if (value === undefined || value === null || value === '')
|
|
6
|
-
return null;
|
|
7
|
-
return String(value).trim();
|
|
8
|
-
};
|
|
9
|
-
const normalizeSeatScope = (value) => {
|
|
10
|
-
if (value === undefined || value === null || value === '')
|
|
11
|
-
return null;
|
|
12
|
-
return String(value).trim();
|
|
13
|
-
};
|
|
14
|
-
it('normalizes ai profile sync payloads with workspace and surface type', () => {
|
|
15
|
-
const profile = normalizeAiProfileSyncPayload({
|
|
16
|
-
id: 'profile-1',
|
|
17
|
-
workspaceId: 'workspace-a',
|
|
18
|
-
profileToken: ' token-1 ',
|
|
19
|
-
name: ' Agent ',
|
|
20
|
-
username: ' agent ',
|
|
21
|
-
icon: ' Bot ',
|
|
22
|
-
color: ' #111111 ',
|
|
23
|
-
description: ' Product coding agent ',
|
|
24
|
-
role: ' Implementer ',
|
|
25
|
-
provider: ' OpenAI ',
|
|
26
|
-
model: ' gpt-5.4 ',
|
|
27
|
-
surfaceType: 'agent',
|
|
28
|
-
seatScope: 'cloud_metered',
|
|
29
|
-
providerMetadata: { foo: 'bar' },
|
|
30
|
-
createdAt: '2026-04-10T10:00:00.000Z',
|
|
31
|
-
updatedAt: '2026-04-10T11:00:00.000Z',
|
|
32
|
-
lastActiveAt: '2026-04-10T12:00:00.000Z',
|
|
33
|
-
}, 'workspace-a', normalizeSurfaceType, normalizeSeatScope, 'test.ai');
|
|
34
|
-
expect(profile).toEqual({
|
|
35
|
-
id: 'profile-1',
|
|
36
|
-
workspaceId: 'workspace-a',
|
|
37
|
-
profileToken: 'token-1',
|
|
38
|
-
name: 'Agent',
|
|
39
|
-
username: 'agent',
|
|
40
|
-
icon: 'Bot',
|
|
41
|
-
color: '#111111',
|
|
42
|
-
avatarUpdatedAt: null,
|
|
43
|
-
description: 'Product coding agent',
|
|
44
|
-
role: 'Implementer',
|
|
45
|
-
provider: 'OpenAI',
|
|
46
|
-
model: 'gpt-5.4',
|
|
47
|
-
surfaceType: 'agent',
|
|
48
|
-
seatScope: 'cloud_metered',
|
|
49
|
-
providerMetadata: { foo: 'bar' },
|
|
50
|
-
archivedAt: null,
|
|
51
|
-
archivedBy: null,
|
|
52
|
-
archivedReason: null,
|
|
53
|
-
mergedIntoProfileId: null,
|
|
54
|
-
rosterStateUpdatedAt: null,
|
|
55
|
-
createdAt: '2026-04-10T10:00:00.000Z',
|
|
56
|
-
updatedAt: '2026-04-10T11:00:00.000Z',
|
|
57
|
-
lastActiveAt: '2026-04-10T12:00:00.000Z',
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
it('normalizes document review session and comment payloads', () => {
|
|
61
|
-
const session = normalizeDocumentReviewSessionSyncPayload({
|
|
62
|
-
id: 'session-1',
|
|
63
|
-
assetId: 'asset-1',
|
|
64
|
-
documentId: ' doc-1 ',
|
|
65
|
-
documentVersion: '2',
|
|
66
|
-
title: ' Review ',
|
|
67
|
-
status: 'resolved',
|
|
68
|
-
comments: [],
|
|
69
|
-
createdByActorId: ' ai-1 ',
|
|
70
|
-
updatedByActorId: ' ai-2 ',
|
|
71
|
-
createdAt: '2026-04-10T10:00:00.000Z',
|
|
72
|
-
updatedAt: '2026-04-10T11:00:00.000Z',
|
|
73
|
-
});
|
|
74
|
-
expect(session).toEqual(expect.objectContaining({
|
|
75
|
-
id: 'session-1',
|
|
76
|
-
assetId: 'asset-1',
|
|
77
|
-
documentId: 'doc-1',
|
|
78
|
-
documentVersion: 2,
|
|
79
|
-
title: 'Review',
|
|
80
|
-
status: 'resolved',
|
|
81
|
-
createdByActorId: 'ai-1',
|
|
82
|
-
updatedByActorId: 'ai-2',
|
|
83
|
-
}));
|
|
84
|
-
const comment = normalizeDocumentReviewCommentSyncPayload({
|
|
85
|
-
id: 'comment-1',
|
|
86
|
-
body: 'Looks good',
|
|
87
|
-
order: '3',
|
|
88
|
-
authorActorId: ' ai-3 ',
|
|
89
|
-
createdAt: '2026-04-10T10:00:00.000Z',
|
|
90
|
-
updatedAt: '2026-04-10T11:00:00.000Z',
|
|
91
|
-
}, { sessionId: 'session-1' });
|
|
92
|
-
expect(comment).toEqual(expect.objectContaining({
|
|
93
|
-
id: 'comment-1',
|
|
94
|
-
sessionId: 'session-1',
|
|
95
|
-
body: 'Looks good',
|
|
96
|
-
order: 3,
|
|
97
|
-
authorActorId: 'ai-3',
|
|
98
|
-
}));
|
|
99
|
-
});
|
|
100
|
-
it('normalizes annotated attachment sessions and delete payloads', () => {
|
|
101
|
-
const session = normalizeAnnotatedAttachmentSessionSyncPayload({
|
|
102
|
-
id: 'annotated-1',
|
|
103
|
-
workspaceId: 'workspace-a',
|
|
104
|
-
taskId: 'task-1',
|
|
105
|
-
baseImageAssetId: 'asset-img-1',
|
|
106
|
-
title: ' Notes ',
|
|
107
|
-
globalInstruction: ' Review this ',
|
|
108
|
-
annotations: [{ id: 'a1' }],
|
|
109
|
-
createdAt: '2026-04-10T10:00:00.000Z',
|
|
110
|
-
updatedAt: '2026-04-10T11:00:00.000Z',
|
|
111
|
-
}, 'workspace-a');
|
|
112
|
-
expect(session).toEqual(expect.objectContaining({
|
|
113
|
-
id: 'annotated-1',
|
|
114
|
-
workspaceId: 'workspace-a',
|
|
115
|
-
taskId: 'task-1',
|
|
116
|
-
baseImageAssetId: 'asset-img-1',
|
|
117
|
-
title: 'Notes',
|
|
118
|
-
globalInstruction: 'Review this',
|
|
119
|
-
}));
|
|
120
|
-
expect(normalizeDeleteSyncPayload({ sessionId: 'annotated-1', deletedAt: '2026-04-10T12:00:00.000Z' }, 'sessionId')).toEqual({
|
|
121
|
-
id: 'annotated-1',
|
|
122
|
-
deletedAt: '2026-04-10T12:00:00.000Z',
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { normalizeBinaryAssetDeleteSyncPayload, normalizeBinaryAssetSyncPayload, normalizeDocumentDeleteSyncPayload, normalizeDocumentSyncPayload, serializeBinaryAssetSyncPayload, serializeDocumentSyncPayload, } from './contentSyncPayload';
|
|
3
|
-
describe('contentSyncPayload', () => {
|
|
4
|
-
const normalizeDocumentPath = (rawPath) => {
|
|
5
|
-
const value = typeof rawPath === 'string' ? rawPath.trim() : '';
|
|
6
|
-
return value.startsWith('docs/') ? value : null;
|
|
7
|
-
};
|
|
8
|
-
const normalizeAssetPath = (rawPath) => {
|
|
9
|
-
const value = typeof rawPath === 'string' ? rawPath.trim() : '';
|
|
10
|
-
return value.startsWith('workspaces/') ? value : null;
|
|
11
|
-
};
|
|
12
|
-
it('normalizes document sync payloads and trims metadata', () => {
|
|
13
|
-
const payload = normalizeDocumentSyncPayload({
|
|
14
|
-
path: 'docs/spec.md',
|
|
15
|
-
updatedAt: '2026-04-10T17:00:00.000Z',
|
|
16
|
-
content: '# Spec',
|
|
17
|
-
documentId: ' doc-1 ',
|
|
18
|
-
referenceNumber: '7',
|
|
19
|
-
version: '2',
|
|
20
|
-
taskId: ' task-1 ',
|
|
21
|
-
linkTargetType: 'task',
|
|
22
|
-
linkTargetId: ' task-1 ',
|
|
23
|
-
logicalName: ' Spec ',
|
|
24
|
-
caption: ' Draft ',
|
|
25
|
-
originalFilename: ' spec.md ',
|
|
26
|
-
linkRole: 'reference',
|
|
27
|
-
}, normalizeDocumentPath);
|
|
28
|
-
expect(payload).toEqual({
|
|
29
|
-
path: 'docs/spec.md',
|
|
30
|
-
updatedAt: '2026-04-10T17:00:00.000Z',
|
|
31
|
-
content: '# Spec',
|
|
32
|
-
assetId: undefined,
|
|
33
|
-
documentId: 'doc-1',
|
|
34
|
-
referenceNumber: 7,
|
|
35
|
-
version: 2,
|
|
36
|
-
taskId: 'task-1',
|
|
37
|
-
linkTargetType: 'task',
|
|
38
|
-
linkTargetId: 'task-1',
|
|
39
|
-
logicalName: 'Spec',
|
|
40
|
-
caption: 'Draft',
|
|
41
|
-
originalFilename: 'spec.md',
|
|
42
|
-
linkRole: 'reference',
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
it('normalizes binary asset sync payloads and delete payloads', () => {
|
|
46
|
-
const payload = normalizeBinaryAssetSyncPayload({
|
|
47
|
-
path: 'workspaces/a/assets/images/test.png',
|
|
48
|
-
updatedAt: '2026-04-10T17:00:00.000Z',
|
|
49
|
-
contentBase64: 'YWJj',
|
|
50
|
-
kind: 'image',
|
|
51
|
-
mimeType: ' image/png ',
|
|
52
|
-
referenceNumber: '3',
|
|
53
|
-
taskId: ' task-2 ',
|
|
54
|
-
linkTargetType: 'task',
|
|
55
|
-
linkTargetId: ' task-2 ',
|
|
56
|
-
logicalName: ' Hero ',
|
|
57
|
-
caption: ' Screenshot ',
|
|
58
|
-
originalFilename: ' hero.png ',
|
|
59
|
-
linkRole: 'image',
|
|
60
|
-
}, normalizeAssetPath);
|
|
61
|
-
expect(payload).toEqual({
|
|
62
|
-
path: 'workspaces/a/assets/images/test.png',
|
|
63
|
-
updatedAt: '2026-04-10T17:00:00.000Z',
|
|
64
|
-
contentBase64: 'YWJj',
|
|
65
|
-
assetId: undefined,
|
|
66
|
-
kind: 'image',
|
|
67
|
-
mimeType: 'image/png',
|
|
68
|
-
referenceNumber: 3,
|
|
69
|
-
taskId: 'task-2',
|
|
70
|
-
linkTargetType: 'task',
|
|
71
|
-
linkTargetId: 'task-2',
|
|
72
|
-
logicalName: 'Hero',
|
|
73
|
-
caption: 'Screenshot',
|
|
74
|
-
originalFilename: 'hero.png',
|
|
75
|
-
linkRole: 'image',
|
|
76
|
-
});
|
|
77
|
-
expect(normalizeBinaryAssetDeleteSyncPayload({ path: 'workspaces/a/assets/images/test.png', deletedAt: '2026-04-10T18:00:00.000Z' }, normalizeAssetPath)).toEqual({
|
|
78
|
-
path: 'workspaces/a/assets/images/test.png',
|
|
79
|
-
deletedAt: '2026-04-10T18:00:00.000Z',
|
|
80
|
-
assetId: undefined,
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
it('normalizes planning link targets for document and asset payloads', () => {
|
|
84
|
-
expect(normalizeDocumentSyncPayload({
|
|
85
|
-
path: 'docs/plan.md',
|
|
86
|
-
updatedAt: '2026-04-10T17:00:00.000Z',
|
|
87
|
-
content: 'hello',
|
|
88
|
-
linkTargetType: 'initiative',
|
|
89
|
-
linkTargetId: ' initiative-1 ',
|
|
90
|
-
caption: ' Plan ',
|
|
91
|
-
}, normalizeDocumentPath)).toEqual(expect.objectContaining({
|
|
92
|
-
path: 'docs/plan.md',
|
|
93
|
-
linkTargetType: 'initiative',
|
|
94
|
-
linkTargetId: 'initiative-1',
|
|
95
|
-
taskId: null,
|
|
96
|
-
caption: 'Plan',
|
|
97
|
-
}));
|
|
98
|
-
expect(normalizeBinaryAssetSyncPayload({
|
|
99
|
-
path: 'workspaces/a/assets/files/file.bin',
|
|
100
|
-
updatedAt: '2026-04-10T17:00:00.000Z',
|
|
101
|
-
contentBase64: 'YWJj',
|
|
102
|
-
kind: 'file',
|
|
103
|
-
mimeType: 'application/octet-stream',
|
|
104
|
-
linkTargetType: 'workstream',
|
|
105
|
-
linkTargetId: ' workstream-1 ',
|
|
106
|
-
}, normalizeAssetPath)).toEqual(expect.objectContaining({
|
|
107
|
-
path: 'workspaces/a/assets/files/file.bin',
|
|
108
|
-
kind: 'file',
|
|
109
|
-
linkTargetType: 'workstream',
|
|
110
|
-
linkTargetId: 'workstream-1',
|
|
111
|
-
taskId: null,
|
|
112
|
-
}));
|
|
113
|
-
});
|
|
114
|
-
it('serializes push-side document and asset payloads without route-local parsing', () => {
|
|
115
|
-
expect(serializeDocumentSyncPayload({
|
|
116
|
-
path: 'docs/plan.md',
|
|
117
|
-
updatedAt: '2026-04-10T17:00:00.000Z',
|
|
118
|
-
content: 'hello',
|
|
119
|
-
referenceNumber: '9',
|
|
120
|
-
linkRole: 'reference',
|
|
121
|
-
})).toEqual(expect.objectContaining({
|
|
122
|
-
path: 'docs/plan.md',
|
|
123
|
-
referenceNumber: 9,
|
|
124
|
-
linkRole: 'reference',
|
|
125
|
-
}));
|
|
126
|
-
expect(serializeBinaryAssetSyncPayload({
|
|
127
|
-
path: 'workspaces/a/assets/files/file.bin',
|
|
128
|
-
updatedAt: '2026-04-10T17:00:00.000Z',
|
|
129
|
-
contentBase64: 'YWJj',
|
|
130
|
-
kind: 'file',
|
|
131
|
-
mimeType: 'application/octet-stream',
|
|
132
|
-
})).toEqual(expect.objectContaining({
|
|
133
|
-
path: 'workspaces/a/assets/files/file.bin',
|
|
134
|
-
kind: 'file',
|
|
135
|
-
contentBase64: 'YWJj',
|
|
136
|
-
}));
|
|
137
|
-
expect(normalizeDocumentDeleteSyncPayload({ path: 'docs/plan.md', deletedAt: '2026-04-10T19:00:00.000Z' }, normalizeDocumentPath)).toEqual({
|
|
138
|
-
path: 'docs/plan.md',
|
|
139
|
-
deletedAt: '2026-04-10T19:00:00.000Z',
|
|
140
|
-
assetId: undefined,
|
|
141
|
-
});
|
|
142
|
-
});
|
|
143
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { encryptDocument, decryptDocument, ENCRYPTION_PREFIX } from './encryptionService';
|
|
3
|
-
import crypto from 'crypto';
|
|
4
|
-
// Polyfill node crypto to webcrypto for testing
|
|
5
|
-
if (!globalThis.crypto) {
|
|
6
|
-
globalThis.crypto = crypto.webcrypto;
|
|
7
|
-
}
|
|
8
|
-
describe('AES-256-GCM Document Encryption', () => {
|
|
9
|
-
// 32-byte key in Base64
|
|
10
|
-
const TEST_SYNC_KEY = 'NmhazvMJ8D0kG5btEJtW0uh9rM4l+xOCray0cWFZyBE=';
|
|
11
|
-
// A distinct 32-byte key
|
|
12
|
-
const DIFFERENT_TEST_KEY = 'h/ONWavchmshsOGoNWOePgNdQAtbCMmVGqCLL5dzej4=';
|
|
13
|
-
it('should correctly encrypt and decrypt a markdown document', async () => {
|
|
14
|
-
const plaintext = '# Hello World\n\nThis is a secret task document.';
|
|
15
|
-
const ciphertext = await encryptDocument(plaintext, TEST_SYNC_KEY);
|
|
16
|
-
expect(ciphertext).toBeDefined();
|
|
17
|
-
expect(ciphertext.startsWith(ENCRYPTION_PREFIX)).toBe(true);
|
|
18
|
-
expect(ciphertext).not.toContain('Hello World');
|
|
19
|
-
const decrypted = await decryptDocument(ciphertext, TEST_SYNC_KEY);
|
|
20
|
-
expect(decrypted).toBe(plaintext);
|
|
21
|
-
});
|
|
22
|
-
it('should generate different ciphertexts for the exact same plaintext (random IV)', async () => {
|
|
23
|
-
const plaintext = 'Repeat after me: randomness is secure.';
|
|
24
|
-
const cipher1 = await encryptDocument(plaintext, TEST_SYNC_KEY);
|
|
25
|
-
const cipher2 = await encryptDocument(plaintext, TEST_SYNC_KEY);
|
|
26
|
-
expect(cipher1).not.toBe(cipher2);
|
|
27
|
-
expect(cipher1.startsWith(ENCRYPTION_PREFIX)).toBe(true);
|
|
28
|
-
expect(cipher2.startsWith(ENCRYPTION_PREFIX)).toBe(true);
|
|
29
|
-
});
|
|
30
|
-
it('should fail to decrypt with the wrong key (Auth Tag mismatch / Bad Mac)', async () => {
|
|
31
|
-
const plaintext = 'Secret Document';
|
|
32
|
-
const ciphertext = await encryptDocument(plaintext, TEST_SYNC_KEY);
|
|
33
|
-
await expect(decryptDocument(ciphertext, DIFFERENT_TEST_KEY)).rejects.toThrow('Failed to decrypt document');
|
|
34
|
-
});
|
|
35
|
-
it('should ignore and pass through unencrypted plaintexts during decryption', async () => {
|
|
36
|
-
const plaintext = 'I am just a normal document.';
|
|
37
|
-
const result = await decryptDocument(plaintext, TEST_SYNC_KEY);
|
|
38
|
-
expect(result).toBe(plaintext);
|
|
39
|
-
});
|
|
40
|
-
it('should return empty string if asked to encrypt empty input', async () => {
|
|
41
|
-
const ciphertext = await encryptDocument('', TEST_SYNC_KEY);
|
|
42
|
-
expect(ciphertext).toBe('');
|
|
43
|
-
});
|
|
44
|
-
it('should gracefully handle empty or invalid decryption payloads', async () => {
|
|
45
|
-
await expect(decryptDocument(`${ENCRYPTION_PREFIX}invalid`, TEST_SYNC_KEY)).rejects.toThrow('Malformed encrypted document payload.');
|
|
46
|
-
await expect(decryptDocument(`${ENCRYPTION_PREFIX}validBase64=`, TEST_SYNC_KEY)).rejects.toThrow('Malformed encrypted document payload.');
|
|
47
|
-
});
|
|
48
|
-
it('should throw immediately if the provided encryption key is not 256-bit (32 bytes)', async () => {
|
|
49
|
-
const tooShortKey = Buffer.from('too short key').toString('base64');
|
|
50
|
-
await expect(encryptDocument('test', tooShortKey)).rejects.toThrow('Encryption key must be exactly 32 bytes (256-bit).');
|
|
51
|
-
});
|
|
52
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { normalizeInitiativeSyncPayload, normalizeTaxonomySyncPayload, normalizeWorkstreamSyncPayload, } from './planningSyncPayload';
|
|
3
|
-
describe('planningSyncPayload', () => {
|
|
4
|
-
it('normalizes taxonomy sync payloads', () => {
|
|
5
|
-
const payload = normalizeTaxonomySyncPayload({
|
|
6
|
-
taxonomies: [{ id: 'priority' }],
|
|
7
|
-
updatedAt: '2026-04-10T10:00:00.000Z',
|
|
8
|
-
});
|
|
9
|
-
expect(payload).toEqual({
|
|
10
|
-
taxonomies: [{ id: 'priority' }],
|
|
11
|
-
updatedAt: '2026-04-10T10:00:00.000Z',
|
|
12
|
-
});
|
|
13
|
-
});
|
|
14
|
-
it('normalizes initiative sync payloads', () => {
|
|
15
|
-
const initiative = normalizeInitiativeSyncPayload({
|
|
16
|
-
id: 'initiative-1',
|
|
17
|
-
referenceNumber: '4',
|
|
18
|
-
referenceLabel: ' IN-4 ',
|
|
19
|
-
title: ' Launch ',
|
|
20
|
-
description: ' Ship it ',
|
|
21
|
-
ownerId: ' owner-1 ',
|
|
22
|
-
createdAt: '2026-04-10T10:00:00.000Z',
|
|
23
|
-
updatedAt: '2026-04-10T11:00:00.000Z',
|
|
24
|
-
order: '2',
|
|
25
|
-
attachments: [{
|
|
26
|
-
path: 'workspaces/ws-1/assets/documents/asset-initiative.md',
|
|
27
|
-
assetId: 'asset-initiative',
|
|
28
|
-
referenceLabel: 'D-10',
|
|
29
|
-
caption: 'Launch plan',
|
|
30
|
-
}],
|
|
31
|
-
isArchived: true,
|
|
32
|
-
});
|
|
33
|
-
expect(initiative).toEqual({
|
|
34
|
-
id: 'initiative-1',
|
|
35
|
-
referenceNumber: 4,
|
|
36
|
-
referenceLabel: 'IN-4',
|
|
37
|
-
title: 'Launch',
|
|
38
|
-
description: ' Ship it ',
|
|
39
|
-
ownerId: 'owner-1',
|
|
40
|
-
createdAt: '2026-04-10T10:00:00.000Z',
|
|
41
|
-
updatedAt: '2026-04-10T11:00:00.000Z',
|
|
42
|
-
order: 2,
|
|
43
|
-
attachments: [{
|
|
44
|
-
path: 'workspaces/ws-1/assets/documents/asset-initiative.md',
|
|
45
|
-
assetId: 'asset-initiative',
|
|
46
|
-
referenceLabel: 'D-10',
|
|
47
|
-
caption: 'Launch plan',
|
|
48
|
-
}],
|
|
49
|
-
isArchived: true,
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
it('normalizes workstream sync payloads', () => {
|
|
53
|
-
const workstream = normalizeWorkstreamSyncPayload({
|
|
54
|
-
id: 'workstream-1',
|
|
55
|
-
referenceNumber: '2',
|
|
56
|
-
referenceLabel: ' WS-2 ',
|
|
57
|
-
initiativeId: ' initiative-1 ',
|
|
58
|
-
title: ' Backend ',
|
|
59
|
-
description: ' API work ',
|
|
60
|
-
ownerId: ' owner-2 ',
|
|
61
|
-
createdAt: '2026-04-10T10:00:00.000Z',
|
|
62
|
-
updatedAt: '2026-04-10T11:00:00.000Z',
|
|
63
|
-
order: '5',
|
|
64
|
-
attachments: [{
|
|
65
|
-
path: 'workspaces/ws-1/assets/documents/asset-workstream.md',
|
|
66
|
-
assetId: 'asset-workstream',
|
|
67
|
-
referenceLabel: 'D-11',
|
|
68
|
-
caption: 'Backend plan',
|
|
69
|
-
}],
|
|
70
|
-
isArchived: false,
|
|
71
|
-
});
|
|
72
|
-
expect(workstream).toEqual({
|
|
73
|
-
id: 'workstream-1',
|
|
74
|
-
referenceNumber: 2,
|
|
75
|
-
referenceLabel: 'WS-2',
|
|
76
|
-
initiativeId: 'initiative-1',
|
|
77
|
-
title: 'Backend',
|
|
78
|
-
description: ' API work ',
|
|
79
|
-
ownerId: 'owner-2',
|
|
80
|
-
createdAt: '2026-04-10T10:00:00.000Z',
|
|
81
|
-
updatedAt: '2026-04-10T11:00:00.000Z',
|
|
82
|
-
order: 5,
|
|
83
|
-
attachments: [{
|
|
84
|
-
path: 'workspaces/ws-1/assets/documents/asset-workstream.md',
|
|
85
|
-
assetId: 'asset-workstream',
|
|
86
|
-
referenceLabel: 'D-11',
|
|
87
|
-
caption: 'Backend plan',
|
|
88
|
-
}],
|
|
89
|
-
isArchived: false,
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { resolveRealtimeSyncFlag } from './realtimeFeature';
|
|
3
|
-
describe('sync/realtimeFeature', () => {
|
|
4
|
-
it('defaults to disabled when neither env nor global setting is provided', () => {
|
|
5
|
-
expect(resolveRealtimeSyncFlag({})).toEqual({
|
|
6
|
-
enabled: false,
|
|
7
|
-
source: 'default'
|
|
8
|
-
});
|
|
9
|
-
});
|
|
10
|
-
it('uses global setting when env is unset', () => {
|
|
11
|
-
expect(resolveRealtimeSyncFlag({}, true)).toEqual({
|
|
12
|
-
enabled: true,
|
|
13
|
-
source: 'global'
|
|
14
|
-
});
|
|
15
|
-
expect(resolveRealtimeSyncFlag({}, false)).toEqual({
|
|
16
|
-
enabled: false,
|
|
17
|
-
source: 'global'
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
it('env override takes precedence over global setting', () => {
|
|
21
|
-
expect(resolveRealtimeSyncFlag({ TASKFORCE_REALTIME_SYNC: 'true' }, false)).toEqual({
|
|
22
|
-
enabled: true,
|
|
23
|
-
source: 'env'
|
|
24
|
-
});
|
|
25
|
-
expect(resolveRealtimeSyncFlag({ TASKFORCE_REALTIME_SYNC: '0' }, true)).toEqual({
|
|
26
|
-
enabled: false,
|
|
27
|
-
source: 'env'
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { RealtimeReconcileTracker } from './realtimeReconcile';
|
|
3
|
-
describe('RealtimeReconcileTracker', () => {
|
|
4
|
-
it('accepts ordered events and discards duplicate eventId safely', () => {
|
|
5
|
-
const tracker = new RealtimeReconcileTracker();
|
|
6
|
-
const first = tracker.process({ eventId: 'epoch-1:1', serverEpoch: 'epoch-1', seq: 1 });
|
|
7
|
-
const duplicate = tracker.process({ eventId: 'epoch-1:1', serverEpoch: 'epoch-1', seq: 1 });
|
|
8
|
-
expect(first.accepted).toBe(true);
|
|
9
|
-
expect(duplicate.accepted).toBe(false);
|
|
10
|
-
expect(duplicate.reason).toBe('duplicate');
|
|
11
|
-
expect(duplicate.shouldRecover).toBe(false);
|
|
12
|
-
const telemetry = tracker.getTelemetry();
|
|
13
|
-
expect(telemetry.accepted).toBe(1);
|
|
14
|
-
expect(telemetry.duplicateDiscarded).toBe(1);
|
|
15
|
-
});
|
|
16
|
-
it('flags out-of-order gaps for recovery', () => {
|
|
17
|
-
const tracker = new RealtimeReconcileTracker();
|
|
18
|
-
tracker.process({ eventId: 'epoch-1:1', serverEpoch: 'epoch-1', seq: 1 });
|
|
19
|
-
const gap = tracker.process({ eventId: 'epoch-1:3', serverEpoch: 'epoch-1', seq: 3 });
|
|
20
|
-
expect(gap.accepted).toBe(false);
|
|
21
|
-
expect(gap.reason).toBe('out-of-order');
|
|
22
|
-
expect(gap.shouldRecover).toBe(true);
|
|
23
|
-
const telemetry = tracker.getTelemetry();
|
|
24
|
-
expect(telemetry.outOfOrderDiscarded).toBe(1);
|
|
25
|
-
expect(telemetry.recoveryTriggered).toBe(1);
|
|
26
|
-
});
|
|
27
|
-
it('accepts new epoch as ordered reset baseline', () => {
|
|
28
|
-
const tracker = new RealtimeReconcileTracker();
|
|
29
|
-
tracker.process({ eventId: 'epoch-1:5', serverEpoch: 'epoch-1', seq: 5 });
|
|
30
|
-
const nextEpoch = tracker.process({ eventId: 'epoch-2:1', serverEpoch: 'epoch-2', seq: 1 });
|
|
31
|
-
expect(nextEpoch.accepted).toBe(true);
|
|
32
|
-
expect(nextEpoch.shouldRecover).toBe(false);
|
|
33
|
-
});
|
|
34
|
-
it('treats same epoch/seq with different eventId as duplicate no-op', () => {
|
|
35
|
-
const tracker = new RealtimeReconcileTracker();
|
|
36
|
-
const first = tracker.process({ eventId: 'epoch-1:7', serverEpoch: 'epoch-1', seq: 7 });
|
|
37
|
-
const duplicateSeq = tracker.process({ eventId: 'epoch-1:7b', serverEpoch: 'epoch-1', seq: 7 });
|
|
38
|
-
expect(first.accepted).toBe(true);
|
|
39
|
-
expect(duplicateSeq.accepted).toBe(false);
|
|
40
|
-
expect(duplicateSeq.reason).toBe('duplicate');
|
|
41
|
-
expect(duplicateSeq.shouldRecover).toBe(false);
|
|
42
|
-
});
|
|
43
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|