@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 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { render, screen, fireEvent, waitFor } from '@testing-library/react';
|
|
3
|
-
import userEvent from '@testing-library/user-event';
|
|
4
|
-
import { describe, it, expect, vi } from 'vitest';
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { TaskforceWidget } from './TaskforceWidget';
|
|
7
|
-
// Mock TaskforceCore to avoid testing integration twice
|
|
8
|
-
vi.mock('./TaskforceCore', () => ({
|
|
9
|
-
TaskforceCore: ({ onTaskCountChange, onHeaderMouseDown, onClose }) => {
|
|
10
|
-
// Report a count of 3 on mount
|
|
11
|
-
React.useEffect(() => {
|
|
12
|
-
if (onTaskCountChange)
|
|
13
|
-
onTaskCountChange(3);
|
|
14
|
-
}, [onTaskCountChange]);
|
|
15
|
-
return (_jsxs("div", { "data-testid": "core-component", children: [_jsx("div", { "data-testid": "header", onMouseDown: onHeaderMouseDown, children: "Header" }), _jsx("button", { onClick: onClose, children: "Close" })] }));
|
|
16
|
-
}
|
|
17
|
-
}));
|
|
18
|
-
describe('TaskforceWidget Component', () => {
|
|
19
|
-
const user = userEvent.setup();
|
|
20
|
-
it('6.1 & 6.2 Renders floating button with badge count', async () => {
|
|
21
|
-
render(_jsx(TaskforceWidget, {}));
|
|
22
|
-
const button = screen.getByTitle(/Taskforce/i);
|
|
23
|
-
expect(button).toBeInTheDocument();
|
|
24
|
-
// Mock core reports 3 tasks
|
|
25
|
-
await waitFor(() => {
|
|
26
|
-
expect(screen.getByText('3')).toBeInTheDocument(); // Badge
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
it('6.3 & 6.4 Toggles modal on click', async () => {
|
|
30
|
-
render(_jsx(TaskforceWidget, {}));
|
|
31
|
-
const button = screen.getByTitle(/Taskforce/i);
|
|
32
|
-
// Initially hidden (display: none)
|
|
33
|
-
const root = document.getElementById('taskforce-root');
|
|
34
|
-
expect(root).toHaveStyle({ display: 'none' });
|
|
35
|
-
// Open
|
|
36
|
-
await user.click(button);
|
|
37
|
-
expect(root).toHaveStyle({ display: 'flex' });
|
|
38
|
-
// Close via internal button (passed to onClose)
|
|
39
|
-
const closeBtn = screen.getByText('Close');
|
|
40
|
-
await user.click(closeBtn);
|
|
41
|
-
expect(root).toHaveStyle({ display: 'none' });
|
|
42
|
-
});
|
|
43
|
-
it('6.6 Toggles modal on Alt+T keyboard shortcut', async () => {
|
|
44
|
-
render(_jsx(TaskforceWidget, {}));
|
|
45
|
-
const root = document.getElementById('taskforce-root');
|
|
46
|
-
// Alt+T
|
|
47
|
-
fireEvent.keyDown(window, { key: 't', altKey: true });
|
|
48
|
-
expect(root).toHaveStyle({ display: 'flex' });
|
|
49
|
-
// Alt+T again
|
|
50
|
-
fireEvent.keyDown(window, { key: 't', altKey: true });
|
|
51
|
-
expect(root).toHaveStyle({ display: 'none' });
|
|
52
|
-
});
|
|
53
|
-
it('6.9 State persistence: Core remains mounted when closed', async () => {
|
|
54
|
-
render(_jsx(TaskforceWidget, {}));
|
|
55
|
-
// It's always mounted
|
|
56
|
-
expect(screen.getByTestId('core-component')).toBeInTheDocument();
|
|
57
|
-
// Toggle open
|
|
58
|
-
fireEvent.keyDown(window, { key: 't', altKey: true });
|
|
59
|
-
// Use waitFor because of potential state updates
|
|
60
|
-
await waitFor(() => {
|
|
61
|
-
expect(screen.getByTestId('core-component')).toBeInTheDocument();
|
|
62
|
-
});
|
|
63
|
-
// Toggle closed
|
|
64
|
-
fireEvent.keyDown(window, { key: 't', altKey: true });
|
|
65
|
-
const root = document.getElementById('taskforce-root');
|
|
66
|
-
expect(root).toHaveStyle({ display: 'none' });
|
|
67
|
-
// Component is still in DOM (preserves state)
|
|
68
|
-
expect(screen.getByTestId('core-component')).toBeInTheDocument();
|
|
69
|
-
});
|
|
70
|
-
it('Locks body scroll when open and unlocks when closed', async () => {
|
|
71
|
-
render(_jsx(TaskforceWidget, {}));
|
|
72
|
-
const button = screen.getByTitle(/Taskforce/i);
|
|
73
|
-
// Initial state
|
|
74
|
-
expect(document.body.style.overflow).toBe('');
|
|
75
|
-
// Open
|
|
76
|
-
await user.click(button);
|
|
77
|
-
expect(document.body.style.overflow).toBe('hidden');
|
|
78
|
-
// Close
|
|
79
|
-
const closeBtn = screen.getByText('Close');
|
|
80
|
-
await user.click(closeBtn);
|
|
81
|
-
expect(document.body.style.overflow).toBe('');
|
|
82
|
-
});
|
|
83
|
-
it('Draggable: handles mouse down on header', () => {
|
|
84
|
-
render(_jsx(TaskforceWidget, {}));
|
|
85
|
-
const header = screen.getByTestId('header');
|
|
86
|
-
fireEvent.mouseDown(header, { clientX: 100, clientY: 100 });
|
|
87
|
-
fireEvent.mouseMove(window, { clientX: 150, clientY: 150 });
|
|
88
|
-
fireEvent.mouseUp(window);
|
|
89
|
-
const modal = screen.getByTestId('core-component').parentElement;
|
|
90
|
-
expect(modal).toBeInTheDocument();
|
|
91
|
-
});
|
|
92
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import { describe, it, expect } from 'vitest';
|
|
4
|
-
describe('Unsaved Changes Dialog Contract', () => {
|
|
5
|
-
const standaloneLayoutPath = path.resolve(__dirname, 'components/views/StandaloneLayout.tsx');
|
|
6
|
-
const source = fs.readFileSync(standaloneLayoutPath, 'utf-8');
|
|
7
|
-
it('includes the unsaved changes modal title and message', () => {
|
|
8
|
-
expect(source).toContain('Unsaved Changes');
|
|
9
|
-
expect(source).toContain('You have unsaved changes. Would you like to save them?');
|
|
10
|
-
});
|
|
11
|
-
it('includes explicit action labels for close, discard, and save', () => {
|
|
12
|
-
expect(source).toContain('Close dialog and continue editing');
|
|
13
|
-
expect(source).toContain('Discard unsaved changes and leave');
|
|
14
|
-
expect(source).toContain('Save changes and leave');
|
|
15
|
-
});
|
|
16
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { enUS } from '../localization/locales/en-US';
|
|
3
|
-
import { es419 } from '../localization/locales/es-419';
|
|
4
|
-
import { ptBR } from '../localization/locales/pt-BR';
|
|
5
|
-
const NON_DEFAULT_LOCALES = [
|
|
6
|
-
{ name: 'es-419', catalog: es419 },
|
|
7
|
-
{ name: 'pt-BR', catalog: ptBR }
|
|
8
|
-
];
|
|
9
|
-
function collectLeafPaths(obj, prefix = '') {
|
|
10
|
-
const paths = [];
|
|
11
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
12
|
-
const path = prefix ? `${prefix}.${key}` : key;
|
|
13
|
-
if (typeof value === 'object' && value !== null) {
|
|
14
|
-
paths.push(...collectLeafPaths(value, path));
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
paths.push(path);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return paths;
|
|
21
|
-
}
|
|
22
|
-
function getByPath(obj, path) {
|
|
23
|
-
return path.split('.').reduce((cur, part) => {
|
|
24
|
-
if (cur && typeof cur === 'object')
|
|
25
|
-
return cur[part];
|
|
26
|
-
return undefined;
|
|
27
|
-
}, obj);
|
|
28
|
-
}
|
|
29
|
-
const enUSPaths = collectLeafPaths(enUS);
|
|
30
|
-
describe('Localization catalog parity', () => {
|
|
31
|
-
for (const { name, catalog } of NON_DEFAULT_LOCALES) {
|
|
32
|
-
describe(`${name}`, () => {
|
|
33
|
-
it('has all keys present in en-US', () => {
|
|
34
|
-
const missingKeys = [];
|
|
35
|
-
for (const path of enUSPaths) {
|
|
36
|
-
if (getByPath(catalog, path) === undefined) {
|
|
37
|
-
missingKeys.push(path);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
expect(missingKeys, `Missing keys in ${name}: ${missingKeys.join(', ')}`).toHaveLength(0);
|
|
41
|
-
});
|
|
42
|
-
it('has no empty string values', () => {
|
|
43
|
-
const emptyKeys = [];
|
|
44
|
-
const paths = collectLeafPaths(catalog);
|
|
45
|
-
for (const path of paths) {
|
|
46
|
-
if (getByPath(catalog, path) === '') {
|
|
47
|
-
emptyKeys.push(path);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
expect(emptyKeys, `Empty values in ${name}: ${emptyKeys.join(', ')}`).toHaveLength(0);
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import fs from 'fs';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import yaml from 'js-yaml';
|
|
5
|
-
const workflowsDir = path.resolve(process.cwd(), 'src/resources/templates/workflows');
|
|
6
|
-
function loadWorkflow(name) {
|
|
7
|
-
const raw = fs.readFileSync(path.join(workflowsDir, `${name}.yaml`), 'utf8');
|
|
8
|
-
return yaml.load(raw);
|
|
9
|
-
}
|
|
10
|
-
function buildAliasMap(names) {
|
|
11
|
-
const map = new Map();
|
|
12
|
-
for (const name of names) {
|
|
13
|
-
const workflow = loadWorkflow(name);
|
|
14
|
-
for (const alias of workflow.dispatch?.aliases || []) {
|
|
15
|
-
map.set(alias, name);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
return map;
|
|
19
|
-
}
|
|
20
|
-
function simulateDoDispatch(params) {
|
|
21
|
-
const doWorkflow = loadWorkflow('do');
|
|
22
|
-
const aliasMap = buildAliasMap(['do', 'execute', 'plan', 'evaluate', 'collaborate', 'review']);
|
|
23
|
-
const calls = [];
|
|
24
|
-
if (params.knownTaskId) {
|
|
25
|
-
calls.push({ tool: 'get_task' });
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
calls.push({ tool: 'list_tasks' });
|
|
29
|
-
calls.push({ tool: 'get_task' });
|
|
30
|
-
}
|
|
31
|
-
const explicitRoute = aliasMap.get(params.command);
|
|
32
|
-
if (explicitRoute && explicitRoute !== 'do') {
|
|
33
|
-
return { routedTo: explicitRoute, calls };
|
|
34
|
-
}
|
|
35
|
-
const mapped = params.approach ? doWorkflow.dispatch?.approachMap?.[params.approach] : undefined;
|
|
36
|
-
return {
|
|
37
|
-
routedTo: mapped || doWorkflow.dispatch?.default || 'execute',
|
|
38
|
-
calls
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
function simulateExecuteFlow(params) {
|
|
42
|
-
const calls = [{ tool: 'update_task', args: { status: 'in-progress' } }];
|
|
43
|
-
const requested = params.explicitFinalStatus;
|
|
44
|
-
if (!requested) {
|
|
45
|
-
calls.push({ tool: 'add_comment', args: { kind: 'summary' } });
|
|
46
|
-
calls.push({ tool: 'update_task', args: { status: 'review' } });
|
|
47
|
-
return calls;
|
|
48
|
-
}
|
|
49
|
-
if ((requested === 'done' || requested === 'cancelled') && !params.explicitUserInstructionForDoneOrCancelled) {
|
|
50
|
-
throw new Error('Blocked unsafe status transition');
|
|
51
|
-
}
|
|
52
|
-
if (requested === 'task' || requested === 'on-hold') {
|
|
53
|
-
calls.push({ tool: 'add_comment', args: { kind: 'status-justification' } });
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
calls.push({ tool: 'add_comment', args: { kind: 'summary' } });
|
|
57
|
-
}
|
|
58
|
-
calls.push({ tool: 'update_task', args: { status: requested } });
|
|
59
|
-
return calls;
|
|
60
|
-
}
|
|
61
|
-
function simulateOptionalArtifactSave(workflowName, approveSave) {
|
|
62
|
-
const workflow = loadWorkflow(workflowName);
|
|
63
|
-
const artifact = Object.values(workflow.artifacts || {})[0];
|
|
64
|
-
const calls = [{ tool: 'render_in_screen' }];
|
|
65
|
-
if (!artifact || artifact.required || artifact.savePolicy !== 'ask-before-save') {
|
|
66
|
-
return calls;
|
|
67
|
-
}
|
|
68
|
-
calls.push({ tool: 'prompt_save_artifact', args: { path: artifact.path } });
|
|
69
|
-
if (approveSave) {
|
|
70
|
-
calls.push({ tool: 'write_file', args: { path: artifact.path } });
|
|
71
|
-
calls.push({ tool: 'link_task_context', args: { path: artifact.path } });
|
|
72
|
-
}
|
|
73
|
-
return calls;
|
|
74
|
-
}
|
|
75
|
-
describe('Workflow simulation', () => {
|
|
76
|
-
it('/do routes by approach to execute when approach is implement', () => {
|
|
77
|
-
const result = simulateDoDispatch({ command: '/do', approach: 'implement', knownTaskId: true });
|
|
78
|
-
expect(result.routedTo).toBe('execute');
|
|
79
|
-
expect(result.calls[0].tool).toBe('get_task');
|
|
80
|
-
});
|
|
81
|
-
it('/do defaults to execute when approach is missing', () => {
|
|
82
|
-
const result = simulateDoDispatch({ command: '/do', knownTaskId: true });
|
|
83
|
-
expect(result.routedTo).toBe('execute');
|
|
84
|
-
});
|
|
85
|
-
it('explicit slash command wins over approach routing', () => {
|
|
86
|
-
const result = simulateDoDispatch({ command: '/review', approach: 'implement', knownTaskId: true });
|
|
87
|
-
expect(result.routedTo).toBe('review');
|
|
88
|
-
});
|
|
89
|
-
it('unknown task id uses list before get', () => {
|
|
90
|
-
const result = simulateDoDispatch({ command: '/do', approach: 'plan', knownTaskId: false });
|
|
91
|
-
expect(result.calls.map((c) => c.tool)).toEqual(['list_tasks', 'get_task']);
|
|
92
|
-
});
|
|
93
|
-
it('execute flow defaults to in-progress then review', () => {
|
|
94
|
-
const calls = simulateExecuteFlow({});
|
|
95
|
-
expect(calls.map((c) => c.tool)).toEqual(['update_task', 'add_comment', 'update_task']);
|
|
96
|
-
expect(calls[0].args?.status).toBe('in-progress');
|
|
97
|
-
expect(calls[2].args?.status).toBe('review');
|
|
98
|
-
});
|
|
99
|
-
it('execute flow requires justification for task/on-hold final status', () => {
|
|
100
|
-
const calls = simulateExecuteFlow({ explicitFinalStatus: 'on-hold' });
|
|
101
|
-
expect(calls[1].args?.kind).toBe('status-justification');
|
|
102
|
-
expect(calls[2].args?.status).toBe('on-hold');
|
|
103
|
-
});
|
|
104
|
-
it('execute flow blocks done/cancelled without explicit user instruction', () => {
|
|
105
|
-
expect(() => simulateExecuteFlow({ explicitFinalStatus: 'done' })).toThrow('Blocked unsafe status transition');
|
|
106
|
-
});
|
|
107
|
-
it('optional artifact flow prompts first and only attaches on approval', () => {
|
|
108
|
-
const noSave = simulateOptionalArtifactSave('evaluate', false);
|
|
109
|
-
expect(noSave.map((c) => c.tool)).toEqual(['render_in_screen', 'prompt_save_artifact']);
|
|
110
|
-
const saved = simulateOptionalArtifactSave('evaluate', true);
|
|
111
|
-
expect(saved.map((c) => c.tool)).toEqual(['render_in_screen', 'prompt_save_artifact', 'write_file', 'link_task_context']);
|
|
112
|
-
});
|
|
113
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,278 +0,0 @@
|
|
|
1
|
-
import { afterEach, describe, expect, it } from 'vitest';
|
|
2
|
-
import fs from 'fs';
|
|
3
|
-
import os from 'os';
|
|
4
|
-
import path from 'path';
|
|
5
|
-
import { createDatabaseAdapter } from '../storage/createDatabaseAdapter.js';
|
|
6
|
-
import { ensureAnnotatedAttachmentSessionsSchema } from '../migrations/taskSchemaMigrations.js';
|
|
7
|
-
import { AnnotatedAttachmentSessionStore } from './AnnotatedAttachmentSessionStore.js';
|
|
8
|
-
function makeStore() {
|
|
9
|
-
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'taskforce-annotated-attachments-'));
|
|
10
|
-
const dbPath = path.join(root, 'taskforce.db');
|
|
11
|
-
const db = createDatabaseAdapter({ sqliteDbPath: dbPath });
|
|
12
|
-
ensureAnnotatedAttachmentSessionsSchema(db);
|
|
13
|
-
const store = new AnnotatedAttachmentSessionStore(db, 'default');
|
|
14
|
-
return {
|
|
15
|
-
root,
|
|
16
|
-
db,
|
|
17
|
-
store,
|
|
18
|
-
cleanup() {
|
|
19
|
-
db.close();
|
|
20
|
-
fs.rmSync(root, { recursive: true, force: true });
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
describe('AnnotatedAttachmentSessionStore', () => {
|
|
25
|
-
const cleanups = [];
|
|
26
|
-
afterEach(() => {
|
|
27
|
-
while (cleanups.length > 0) {
|
|
28
|
-
cleanups.pop()?.();
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
it('creates and reads sessions with normalized ordered annotations', () => {
|
|
32
|
-
const ctx = makeStore();
|
|
33
|
-
cleanups.push(() => ctx.cleanup());
|
|
34
|
-
const created = ctx.store.create({
|
|
35
|
-
id: 'session-1',
|
|
36
|
-
workspaceId: 'workspace-1',
|
|
37
|
-
taskId: 'task-1',
|
|
38
|
-
baseImageAssetId: 'asset-1',
|
|
39
|
-
title: 'Homepage review',
|
|
40
|
-
globalInstruction: 'Review the marked items.',
|
|
41
|
-
createdByActorId: 'user-1',
|
|
42
|
-
updatedByActorId: 'user-1',
|
|
43
|
-
annotations: [
|
|
44
|
-
{
|
|
45
|
-
id: 'b',
|
|
46
|
-
kind: 'box',
|
|
47
|
-
order: 2,
|
|
48
|
-
markerType: 'issue',
|
|
49
|
-
instruction: 'Inspect this area.',
|
|
50
|
-
x: 0.2,
|
|
51
|
-
y: 0.3,
|
|
52
|
-
width: 0.4,
|
|
53
|
-
height: 0.2,
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
id: 'a',
|
|
57
|
-
kind: 'pin',
|
|
58
|
-
order: 1,
|
|
59
|
-
markerType: 'question',
|
|
60
|
-
instruction: 'What should change here?',
|
|
61
|
-
x: 0.1,
|
|
62
|
-
y: 0.15,
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
});
|
|
66
|
-
expect(created).toMatchObject({
|
|
67
|
-
id: 'session-1',
|
|
68
|
-
workspaceId: 'workspace-1',
|
|
69
|
-
taskId: 'task-1',
|
|
70
|
-
baseImageAssetId: 'asset-1',
|
|
71
|
-
title: 'Homepage review',
|
|
72
|
-
globalInstruction: 'Review the marked items.',
|
|
73
|
-
createdByActorId: 'user-1',
|
|
74
|
-
updatedByActorId: 'user-1',
|
|
75
|
-
});
|
|
76
|
-
expect(created.annotations.map((annotation) => annotation.id)).toEqual(['a', 'b']);
|
|
77
|
-
});
|
|
78
|
-
it('lists active sessions and keeps soft-deleted rows hidden by default', () => {
|
|
79
|
-
const ctx = makeStore();
|
|
80
|
-
cleanups.push(() => ctx.cleanup());
|
|
81
|
-
ctx.store.create({
|
|
82
|
-
id: 'session-a',
|
|
83
|
-
workspaceId: 'workspace-1',
|
|
84
|
-
taskId: 'task-1',
|
|
85
|
-
baseImageAssetId: 'asset-1',
|
|
86
|
-
});
|
|
87
|
-
ctx.store.create({
|
|
88
|
-
id: 'session-b',
|
|
89
|
-
workspaceId: 'workspace-1',
|
|
90
|
-
taskId: 'task-1',
|
|
91
|
-
baseImageAssetId: 'asset-2',
|
|
92
|
-
});
|
|
93
|
-
expect(ctx.store.softDelete('session-b', 'workspace-1')).toBe(true);
|
|
94
|
-
const active = ctx.store.listForTask('task-1', 'workspace-1');
|
|
95
|
-
expect(active.map((session) => session.id)).toEqual(['session-a']);
|
|
96
|
-
const all = ctx.store.listForTask('task-1', 'workspace-1', { includeDeleted: true });
|
|
97
|
-
expect(all.map((session) => session.id).sort()).toEqual(['session-a', 'session-b']);
|
|
98
|
-
});
|
|
99
|
-
it('updates title, instructions, and annotations without changing task identity', () => {
|
|
100
|
-
const ctx = makeStore();
|
|
101
|
-
cleanups.push(() => ctx.cleanup());
|
|
102
|
-
ctx.store.create({
|
|
103
|
-
id: 'session-1',
|
|
104
|
-
workspaceId: 'workspace-1',
|
|
105
|
-
taskId: 'task-1',
|
|
106
|
-
baseImageAssetId: 'asset-1',
|
|
107
|
-
title: 'Before',
|
|
108
|
-
globalInstruction: 'Initial',
|
|
109
|
-
annotations: [
|
|
110
|
-
{ id: 'a', kind: 'text-note', order: 0, instruction: 'hello', x: 0.4, y: 0.5 },
|
|
111
|
-
],
|
|
112
|
-
});
|
|
113
|
-
const updated = ctx.store.update({
|
|
114
|
-
id: 'session-1',
|
|
115
|
-
workspaceId: 'workspace-1',
|
|
116
|
-
title: 'After',
|
|
117
|
-
globalInstruction: 'Revised',
|
|
118
|
-
updatedByActorId: 'user-2',
|
|
119
|
-
annotations: [
|
|
120
|
-
{ id: 'pin-1', kind: 'pin', order: 0, instruction: 'look here', x: 0.8, y: 0.9 },
|
|
121
|
-
],
|
|
122
|
-
});
|
|
123
|
-
expect(updated).toMatchObject({
|
|
124
|
-
id: 'session-1',
|
|
125
|
-
taskId: 'task-1',
|
|
126
|
-
baseImageAssetId: 'asset-1',
|
|
127
|
-
title: 'After',
|
|
128
|
-
globalInstruction: 'Revised',
|
|
129
|
-
updatedByActorId: 'user-2',
|
|
130
|
-
});
|
|
131
|
-
expect(updated?.annotations).toEqual([
|
|
132
|
-
{ id: 'pin-1', kind: 'pin', order: 0, instruction: 'look here', color: null, x: 0.8, y: 0.9 },
|
|
133
|
-
]);
|
|
134
|
-
});
|
|
135
|
-
it('lists all workspace sessions and upserts sync records', () => {
|
|
136
|
-
const ctx = makeStore();
|
|
137
|
-
cleanups.push(() => ctx.cleanup());
|
|
138
|
-
ctx.store.create({
|
|
139
|
-
id: 'session-a',
|
|
140
|
-
workspaceId: 'workspace-1',
|
|
141
|
-
taskId: 'task-1',
|
|
142
|
-
baseImageAssetId: 'asset-1',
|
|
143
|
-
});
|
|
144
|
-
const created = ctx.store.upsertForSync({
|
|
145
|
-
id: 'session-b',
|
|
146
|
-
workspaceId: 'workspace-1',
|
|
147
|
-
taskId: 'task-2',
|
|
148
|
-
baseImageAssetId: 'asset-2',
|
|
149
|
-
title: 'Synced session',
|
|
150
|
-
globalInstruction: 'From sync',
|
|
151
|
-
annotations: [
|
|
152
|
-
{ id: 'note-1', kind: 'text-note', order: 0, instruction: 'synced', x: 0.2, y: 0.4 },
|
|
153
|
-
],
|
|
154
|
-
createdByActorId: 'user-sync',
|
|
155
|
-
updatedByActorId: 'user-sync',
|
|
156
|
-
createdAt: '2026-03-26T10:00:00.000Z',
|
|
157
|
-
updatedAt: '2026-03-26T11:00:00.000Z',
|
|
158
|
-
});
|
|
159
|
-
expect(created).toMatchObject({
|
|
160
|
-
id: 'session-b',
|
|
161
|
-
taskId: 'task-2',
|
|
162
|
-
baseImageAssetId: 'asset-2',
|
|
163
|
-
title: 'Synced session',
|
|
164
|
-
globalInstruction: 'From sync',
|
|
165
|
-
createdByActorId: 'user-sync',
|
|
166
|
-
updatedByActorId: 'user-sync',
|
|
167
|
-
});
|
|
168
|
-
const updated = ctx.store.upsertForSync({
|
|
169
|
-
id: 'session-b',
|
|
170
|
-
workspaceId: 'workspace-1',
|
|
171
|
-
taskId: 'task-2',
|
|
172
|
-
baseImageAssetId: 'asset-2',
|
|
173
|
-
title: 'Synced session updated',
|
|
174
|
-
globalInstruction: 'Changed',
|
|
175
|
-
annotations: [
|
|
176
|
-
{ id: 'pin-2', kind: 'pin', order: 0, instruction: 'updated', x: 0.6, y: 0.7 },
|
|
177
|
-
],
|
|
178
|
-
createdByActorId: 'user-sync',
|
|
179
|
-
updatedByActorId: 'user-sync-2',
|
|
180
|
-
createdAt: '2026-03-26T10:00:00.000Z',
|
|
181
|
-
updatedAt: '2026-03-26T12:00:00.000Z',
|
|
182
|
-
deletedAt: '2026-03-26T12:30:00.000Z',
|
|
183
|
-
});
|
|
184
|
-
expect(updated).toMatchObject({
|
|
185
|
-
id: 'session-b',
|
|
186
|
-
title: 'Synced session updated',
|
|
187
|
-
globalInstruction: 'Changed',
|
|
188
|
-
updatedByActorId: 'user-sync-2',
|
|
189
|
-
deletedAt: '2026-03-26T12:30:00.000Z',
|
|
190
|
-
});
|
|
191
|
-
const all = ctx.store.listByWorkspace('workspace-1', { includeDeleted: true });
|
|
192
|
-
expect(all.map((session) => session.id).sort()).toEqual(['session-a', 'session-b']);
|
|
193
|
-
});
|
|
194
|
-
it('soft-deletes all active sessions for a base image asset', () => {
|
|
195
|
-
const ctx = makeStore();
|
|
196
|
-
cleanups.push(() => ctx.cleanup());
|
|
197
|
-
ctx.store.create({
|
|
198
|
-
id: 'session-a',
|
|
199
|
-
workspaceId: 'workspace-1',
|
|
200
|
-
taskId: 'task-1',
|
|
201
|
-
baseImageAssetId: 'asset-1',
|
|
202
|
-
});
|
|
203
|
-
ctx.store.create({
|
|
204
|
-
id: 'session-b',
|
|
205
|
-
workspaceId: 'workspace-1',
|
|
206
|
-
taskId: 'task-2',
|
|
207
|
-
baseImageAssetId: 'asset-1',
|
|
208
|
-
});
|
|
209
|
-
ctx.store.create({
|
|
210
|
-
id: 'session-c',
|
|
211
|
-
workspaceId: 'workspace-1',
|
|
212
|
-
taskId: 'task-1',
|
|
213
|
-
baseImageAssetId: 'asset-2',
|
|
214
|
-
});
|
|
215
|
-
expect(ctx.store.softDeleteByImageAsset('asset-1', 'workspace-1')).toBe(2);
|
|
216
|
-
expect(ctx.store.get('session-a', 'workspace-1')).toBeNull();
|
|
217
|
-
expect(ctx.store.get('session-b', 'workspace-1')).toBeNull();
|
|
218
|
-
expect(ctx.store.get('session-c', 'workspace-1')).toMatchObject({ id: 'session-c' });
|
|
219
|
-
expect(ctx.store.get('session-a', 'workspace-1', { includeDeleted: true })?.deletedAt).toBeTruthy();
|
|
220
|
-
expect(ctx.store.get('session-b', 'workspace-1', { includeDeleted: true })?.deletedAt).toBeTruthy();
|
|
221
|
-
});
|
|
222
|
-
it('includes unattached sessions when includeUnattached is true', () => {
|
|
223
|
-
const ctx = makeStore();
|
|
224
|
-
cleanups.push(() => ctx.cleanup());
|
|
225
|
-
ctx.store.create({
|
|
226
|
-
id: 'session-task',
|
|
227
|
-
workspaceId: 'workspace-1',
|
|
228
|
-
taskId: 'task-1',
|
|
229
|
-
baseImageAssetId: 'asset-1',
|
|
230
|
-
title: 'Task-scoped session',
|
|
231
|
-
});
|
|
232
|
-
ctx.store.create({
|
|
233
|
-
id: 'session-unattached',
|
|
234
|
-
workspaceId: 'workspace-1',
|
|
235
|
-
taskId: '',
|
|
236
|
-
baseImageAssetId: 'asset-1',
|
|
237
|
-
title: 'Unattached session',
|
|
238
|
-
});
|
|
239
|
-
ctx.store.create({
|
|
240
|
-
id: 'session-other-task',
|
|
241
|
-
workspaceId: 'workspace-1',
|
|
242
|
-
taskId: 'task-2',
|
|
243
|
-
baseImageAssetId: 'asset-1',
|
|
244
|
-
title: 'Other task session',
|
|
245
|
-
});
|
|
246
|
-
const withoutUnattached = ctx.store.listForTask('task-1', 'workspace-1', { imageAssetId: 'asset-1' });
|
|
247
|
-
expect(withoutUnattached.map((s) => s.id)).toEqual(['session-task']);
|
|
248
|
-
const withUnattached = ctx.store.listForTask('task-1', 'workspace-1', { imageAssetId: 'asset-1', includeUnattached: true });
|
|
249
|
-
expect(withUnattached.map((s) => s.id).sort()).toEqual(['session-task', 'session-unattached']);
|
|
250
|
-
});
|
|
251
|
-
it('soft-deletes only the sessions for one task-image pair', () => {
|
|
252
|
-
const ctx = makeStore();
|
|
253
|
-
cleanups.push(() => ctx.cleanup());
|
|
254
|
-
ctx.store.create({
|
|
255
|
-
id: 'session-a',
|
|
256
|
-
workspaceId: 'workspace-1',
|
|
257
|
-
taskId: 'task-1',
|
|
258
|
-
baseImageAssetId: 'asset-1',
|
|
259
|
-
});
|
|
260
|
-
ctx.store.create({
|
|
261
|
-
id: 'session-b',
|
|
262
|
-
workspaceId: 'workspace-1',
|
|
263
|
-
taskId: 'task-2',
|
|
264
|
-
baseImageAssetId: 'asset-1',
|
|
265
|
-
});
|
|
266
|
-
ctx.store.create({
|
|
267
|
-
id: 'session-c',
|
|
268
|
-
workspaceId: 'workspace-1',
|
|
269
|
-
taskId: 'task-1',
|
|
270
|
-
baseImageAssetId: 'asset-2',
|
|
271
|
-
});
|
|
272
|
-
expect(ctx.store.softDeleteByTaskAndImage('task-1', 'asset-1', 'workspace-1')).toBe(1);
|
|
273
|
-
expect(ctx.store.get('session-a', 'workspace-1')).toBeNull();
|
|
274
|
-
expect(ctx.store.get('session-b', 'workspace-1')).toMatchObject({ id: 'session-b' });
|
|
275
|
-
expect(ctx.store.get('session-c', 'workspace-1')).toMatchObject({ id: 'session-c' });
|
|
276
|
-
expect(ctx.store.get('session-a', 'workspace-1', { includeDeleted: true })?.deletedAt).toBeTruthy();
|
|
277
|
-
});
|
|
278
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { buildAnnotationCropHint } from './payload.js';
|
|
3
|
-
describe('buildAnnotationCropHint', () => {
|
|
4
|
-
it('builds a clamped square crop around a pin marker', () => {
|
|
5
|
-
const crop = buildAnnotationCropHint({
|
|
6
|
-
id: 'pin-1',
|
|
7
|
-
kind: 'pin',
|
|
8
|
-
order: 0,
|
|
9
|
-
instruction: 'Check this point',
|
|
10
|
-
x: 0.05,
|
|
11
|
-
y: 0.07,
|
|
12
|
-
color: null,
|
|
13
|
-
});
|
|
14
|
-
expect(crop).toEqual({
|
|
15
|
-
x: 0,
|
|
16
|
-
y: 0,
|
|
17
|
-
width: 0.18,
|
|
18
|
-
height: 0.18,
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
it('pads and clamps box annotations', () => {
|
|
22
|
-
const crop = buildAnnotationCropHint({
|
|
23
|
-
id: 'box-1',
|
|
24
|
-
kind: 'box',
|
|
25
|
-
order: 0,
|
|
26
|
-
instruction: 'Inspect this region',
|
|
27
|
-
x: 0.9,
|
|
28
|
-
y: 0.88,
|
|
29
|
-
width: 0.2,
|
|
30
|
-
height: 0.2,
|
|
31
|
-
color: null,
|
|
32
|
-
});
|
|
33
|
-
expect(crop?.x).toBeCloseTo(0.86, 10);
|
|
34
|
-
expect(crop?.y).toBeCloseTo(0.84, 10);
|
|
35
|
-
expect(crop?.width).toBeCloseTo(0.14, 10);
|
|
36
|
-
expect(crop?.height).toBeCloseTo(0.16, 10);
|
|
37
|
-
});
|
|
38
|
-
it('builds union crops for arrows and omits crops for text notes', () => {
|
|
39
|
-
const arrowCrop = buildAnnotationCropHint({
|
|
40
|
-
id: 'arrow-1',
|
|
41
|
-
kind: 'arrow',
|
|
42
|
-
order: 1,
|
|
43
|
-
instruction: 'Compare these points',
|
|
44
|
-
x: 0.7,
|
|
45
|
-
y: 0.6,
|
|
46
|
-
x2: 0.2,
|
|
47
|
-
y2: 0.3,
|
|
48
|
-
color: null,
|
|
49
|
-
});
|
|
50
|
-
const noteCrop = buildAnnotationCropHint({
|
|
51
|
-
id: 'note-1',
|
|
52
|
-
kind: 'text-note',
|
|
53
|
-
order: 2,
|
|
54
|
-
instruction: 'General note',
|
|
55
|
-
x: 0.5,
|
|
56
|
-
y: 0.5,
|
|
57
|
-
color: null,
|
|
58
|
-
});
|
|
59
|
-
expect(arrowCrop).toEqual({
|
|
60
|
-
x: 0.16,
|
|
61
|
-
y: 0.26,
|
|
62
|
-
width: 0.58,
|
|
63
|
-
height: 0.38,
|
|
64
|
-
});
|
|
65
|
-
expect(noteCrop).toBeUndefined();
|
|
66
|
-
});
|
|
67
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|