@taskforcehq/taskforce 0.3.304 → 0.3.306
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 +140 -247
- package/dist/Taskforce.module.css +295 -89
- package/dist/TaskforceCore.js +378 -111
- package/dist/TaskforceCore.test.js +1221 -107
- package/dist/assets/fonts/CourierPrime-Bold.woff2 +0 -0
- package/dist/assets/fonts/CourierPrime-BoldItalic.woff2 +0 -0
- package/dist/assets/fonts/CourierPrime-Italic.woff2 +0 -0
- package/dist/assets/fonts/CourierPrime-Regular.woff2 +0 -0
- package/dist/assets/fonts/Noir_medium.woff2 +0 -0
- package/dist/assets/fonts/Noir_regular.woff2 +0 -0
- package/dist/assets/fonts/RussoOne-Regular.woff2 +0 -0
- package/dist/assets/fonts/SpecialElite-Regular.woff2 +0 -0
- package/dist/compat/workspaceSyncCompat.js +52 -2
- package/dist/compat/workspaceSyncCompat.test.js +38 -1
- package/dist/components/context/ContextAttachmentManager.d.ts +14 -0
- package/dist/components/context/ContextAttachmentManager.js +549 -0
- package/dist/components/features/AgentsModule.d.ts +10 -1
- package/dist/components/features/AgentsModule.js +260 -15
- package/dist/components/features/AgentsModule.test.js +255 -5
- package/dist/components/features/DocumentIndex.d.ts +1 -1
- package/dist/components/features/DocumentIndex.js +1 -1
- package/dist/components/features/DocumentViewer.d.ts +6 -2
- package/dist/components/features/DocumentViewer.js +90 -10
- package/dist/components/features/DocumentWorkspace.d.ts +5 -22
- package/dist/components/features/DocumentWorkspace.js +12 -155
- package/dist/components/features/DocumentWorkspace.test.js +226 -6
- package/dist/components/features/TaskSettings.js +29 -3
- package/dist/components/features/TaskSettings.test.js +42 -1
- package/dist/components/features/documentWorkspaceModel.d.ts +24 -0
- package/dist/components/features/documentWorkspaceModel.js +57 -0
- package/dist/components/features/useDocumentWorkspaceController.d.ts +34 -0
- package/dist/components/features/useDocumentWorkspaceController.js +113 -0
- package/dist/components/task/TaskCard.js +19 -28
- package/dist/components/task/TaskCard.test.js +38 -3
- package/dist/components/task/TaskContextUpload.js +4 -526
- package/dist/components/task/TaskForm.d.ts +8 -8
- package/dist/components/task/TaskForm.js +362 -230
- package/dist/components/task/TaskForm.test.js +558 -381
- package/dist/components/task/TaskKanban.d.ts +2 -1
- package/dist/components/task/TaskKanban.js +96 -14
- package/dist/components/task/TaskKanban.test.js +36 -0
- package/dist/components/ui/EditableAvatarButton.d.ts +18 -0
- package/dist/components/ui/EditableAvatarButton.js +18 -0
- package/dist/components/views/PlanComparisonPage.d.ts +9 -1
- package/dist/components/views/PlanComparisonPage.js +70 -17
- package/dist/components/views/PlanComparisonPage.test.js +289 -41
- package/dist/components/views/PlansPage.js +239 -106
- package/dist/components/views/PlansPage.test.js +593 -42
- package/dist/components/views/StandaloneLayout.js +310 -554
- package/dist/components/views/panels/FilterToolbar.test.js +6 -4
- package/dist/components/views/panels/PlanningDrawer.d.ts +8 -1
- package/dist/components/views/panels/PlanningDrawer.js +18 -11
- package/dist/components/views/panels/PlanningDrawer.test.d.ts +1 -0
- package/dist/components/views/panels/PlanningDrawer.test.js +141 -0
- package/dist/components/views/planningScope.d.ts +20 -0
- package/dist/components/views/planningScope.js +25 -0
- package/dist/components/views/planningScope.test.d.ts +1 -0
- package/dist/components/views/planningScope.test.js +60 -0
- package/dist/components/views/standalone/modals/AccountHubModal.d.ts +27 -14
- package/dist/components/views/standalone/modals/AccountHubModal.js +87 -15
- package/dist/components/views/standalone/modals/AccountHubModal.test.js +42 -2
- package/dist/components/views/standalone/modals/AvatarImageManagerModal.d.ts +20 -0
- package/dist/components/views/standalone/modals/AvatarImageManagerModal.js +127 -0
- package/dist/components/views/standalone/modals/EditProfileModal.d.ts +2 -9
- package/dist/components/views/standalone/modals/EditProfileModal.js +3 -2
- package/dist/components/views/standalone/modals/SyncEnableWarningModal.d.ts +9 -0
- package/dist/components/views/standalone/modals/SyncEnableWarningModal.js +6 -0
- package/dist/components/views/standalone/modals/SyncEnableWarningModal.test.d.ts +1 -0
- package/dist/components/views/standalone/modals/SyncEnableWarningModal.test.js +24 -0
- package/dist/components/views/standalone/modals/SyncStatusModal.d.ts +2 -1
- package/dist/components/views/standalone/modals/SyncStatusModal.js +2 -2
- package/dist/config/envSchema.js +1 -1
- package/dist/core/AiProfileService.d.ts +45 -3
- package/dist/core/AiProfileService.js +774 -63
- package/dist/core/AiProfileService.test.js +22 -2
- package/dist/core/AiProfiles.test.js +761 -2
- package/dist/core/AttachmentLinkService.js +57 -15
- package/dist/core/AuthIdentityService.d.ts +107 -0
- package/dist/core/AuthIdentityService.js +284 -0
- package/dist/core/AuthTokenService.d.ts +4 -0
- package/dist/core/AuthTokenService.js +34 -6
- package/dist/core/AuthTokenService.test.d.ts +1 -0
- package/dist/core/AuthTokenService.test.js +78 -0
- package/dist/core/EntitlementsPolicy.test.js +77 -15
- package/dist/core/GlobalSettingsService.js +115 -6
- package/dist/core/PlanEntitlementService.d.ts +30 -3
- package/dist/core/PlanEntitlementService.js +454 -93
- package/dist/core/PlanFeatureCatalog.test.d.ts +1 -0
- package/dist/core/PlanFeatureCatalog.test.js +84 -0
- package/dist/core/PlanVersionPolicy.test.js +54 -28
- package/dist/core/PlanningEntities.test.js +52 -0
- package/dist/core/SignupMonetizationSettings.test.js +241 -44
- package/dist/core/SyncReconciliationService.js +2 -65
- package/dist/core/SystemAdmin.test.js +244 -88
- package/dist/core/TaskAttachmentsCanonical.test.js +51 -1
- package/dist/core/TaskTaxonomyValidation.test.js +53 -0
- package/dist/core/Taskforce.d.ts +228 -14
- package/dist/core/Taskforce.js +814 -201
- package/dist/core/Taskforce.listTasksSlim.test.d.ts +1 -0
- package/dist/core/Taskforce.listTasksSlim.test.js +91 -0
- package/dist/core/UserProfileAvatarDrafts.test.js +30 -3
- package/dist/core/WorkspaceLifecycleService.js +0 -5
- package/dist/core/WorkspacePermissions.test.js +25 -1
- package/dist/core/WorkspacePlanMode.test.js +128 -27
- package/dist/core/shared.d.ts +3 -1
- package/dist/core/shared.js +16 -1
- package/dist/core/types.d.ts +68 -2
- package/dist/hooks/auth/useTaskforceAuthBootstrap.js +26 -1
- package/dist/hooks/sync/auth.js +3 -1
- package/dist/hooks/sync/bootstrap.js +2 -0
- package/dist/hooks/sync/controlPlane.d.ts +37 -0
- package/dist/hooks/sync/controlPlane.js +78 -0
- package/dist/hooks/sync/controlPlane.test.d.ts +1 -0
- package/dist/hooks/sync/controlPlane.test.js +121 -0
- package/dist/hooks/sync/lifecyclePolicy.d.ts +45 -0
- package/dist/hooks/sync/lifecyclePolicy.js +93 -0
- package/dist/hooks/sync/lifecyclePolicy.test.d.ts +1 -0
- package/dist/hooks/sync/lifecyclePolicy.test.js +124 -0
- package/dist/hooks/sync/orchestratorShared.d.ts +10 -1
- package/dist/hooks/sync/orchestratorShared.js +68 -47
- package/dist/hooks/sync/orchestratorShared.test.js +50 -1
- package/dist/hooks/sync/pullLifecycle.d.ts +31 -0
- package/dist/hooks/sync/pullLifecycle.js +24 -0
- package/dist/hooks/sync/pullLifecycle.test.d.ts +1 -0
- package/dist/hooks/sync/pullLifecycle.test.js +80 -0
- package/dist/hooks/sync/recovery.d.ts +16 -2
- package/dist/hooks/sync/recovery.js +171 -53
- package/dist/hooks/sync/recovery.test.d.ts +1 -0
- package/dist/hooks/sync/recovery.test.js +292 -0
- package/dist/hooks/sync/transfers.d.ts +16 -3
- package/dist/hooks/sync/transfers.js +186 -65
- package/dist/hooks/sync/transfers.test.d.ts +1 -0
- package/dist/hooks/sync/transfers.test.js +396 -0
- package/dist/hooks/sync/useRecentSyncEvents.d.ts +21 -0
- package/dist/hooks/sync/useRecentSyncEvents.js +92 -0
- package/dist/hooks/sync/useRecentSyncEvents.test.d.ts +1 -0
- package/dist/hooks/sync/useRecentSyncEvents.test.js +124 -0
- package/dist/hooks/sync/useSyncStatusActions.d.ts +30 -0
- package/dist/hooks/sync/useSyncStatusActions.js +88 -0
- package/dist/hooks/sync/useSyncStatusActions.test.d.ts +1 -0
- package/dist/hooks/sync/useSyncStatusActions.test.js +133 -0
- package/dist/hooks/sync/useSyncStatusControls.d.ts +25 -0
- package/dist/hooks/sync/useSyncStatusControls.js +60 -0
- package/dist/hooks/sync/useSyncStatusControls.test.d.ts +1 -0
- package/dist/hooks/sync/useSyncStatusControls.test.js +88 -0
- package/dist/hooks/useSyncOrchestrator.aiProfiles.test.js +12 -0
- package/dist/hooks/useSyncOrchestrator.d.ts +16 -6
- package/dist/hooks/useSyncOrchestrator.js +424 -175
- package/dist/hooks/useSyncOrchestrator.retry-closure.test.js +487 -10
- package/dist/hooks/useTaskData.js +8 -3
- package/dist/hooks/useTaskData.test.js +45 -0
- package/dist/hooks/useTaskMutations.d.ts +2 -1
- package/dist/hooks/useTaskMutations.js +12 -1
- package/dist/hooks/useTaskMutations.test.js +30 -1
- package/dist/hooks/useTaskforce.d.ts +65 -4
- package/dist/hooks/useTaskforce.js +564 -243
- package/dist/hooks/useTaskforce.runtime-routing.test.d.ts +1 -0
- package/dist/hooks/useTaskforce.runtime-routing.test.js +152 -0
- package/dist/hooks/useTaskforce.sync-behavior.test.js +2454 -208
- package/dist/hooks/useWorkspaceSyncController.d.ts +4 -1
- package/dist/hooks/useWorkspaceSyncController.js +17 -2
- package/dist/hooks/useWorkspaceSyncController.test.js +1 -0
- package/dist/hooks/workspace/useTaskforceWorkspaceBootstrap.d.ts +16 -0
- package/dist/hooks/workspace/useTaskforceWorkspaceBootstrap.js +316 -35
- package/dist/localization/locales/en-US.d.ts +0 -1
- package/dist/localization/locales/en-US.js +0 -1
- package/dist/localization/locales/es-419.js +0 -1
- package/dist/localization/locales/pt-BR.js +0 -1
- package/dist/mcp/adminWorkspaceRegistrar.d.ts +2 -0
- package/dist/mcp/adminWorkspaceRegistrar.js +154 -0
- package/dist/mcp/collaborationRegistrar.d.ts +2 -0
- package/dist/mcp/collaborationRegistrar.js +71 -0
- package/dist/mcp/documentAssetRegistrar.d.ts +2 -0
- package/dist/mcp/documentAssetRegistrar.js +346 -0
- package/dist/mcp/runtime.d.ts +2 -0
- package/dist/mcp/runtime.js +2433 -3534
- package/dist/mcp/runtime.test.js +440 -2
- package/dist/mcp/taskPlanningRegistrar.d.ts +2 -0
- package/dist/mcp/taskPlanningRegistrar.js +418 -0
- package/dist/mcp/toolCatalog.d.ts +35 -0
- package/dist/mcp/toolCatalog.js +3 -0
- package/dist/migrations/taskSchemaMigrations.d.ts +1 -1
- package/dist/migrations/taskSchemaMigrations.js +171 -61
- package/dist/migrations/taskSchemaMigrations.test.js +15 -0
- package/dist/resources/templates/workflow-sources/workflowDocs.mjs +6 -6
- package/dist/resources/templates/workflows/collaborate.yaml +1 -1
- package/dist/resources/templates/workflows/evaluate.yaml +2 -2
- package/dist/resources/templates/workflows/plan.yaml +1 -1
- package/dist/resources/templates/workflows/review.yaml +2 -2
- package/dist/server/annotatedAttachmentsRoutes.test.js +3 -3
- package/dist/server/auth/providers/apple.d.ts +33 -0
- package/dist/server/auth/providers/apple.js +82 -0
- package/dist/server/auth/providers/appleClientSecret.d.ts +37 -0
- package/dist/server/auth/providers/appleClientSecret.js +65 -0
- package/dist/server/auth/providers/github.d.ts +26 -0
- package/dist/server/auth/providers/github.js +86 -0
- package/dist/server/auth/providers/google.d.ts +21 -0
- package/dist/server/auth/providers/google.js +56 -0
- package/dist/server/auth/providers/types.d.ts +21 -0
- package/dist/server/auth/providers/types.js +1 -0
- package/dist/server/auth.d.ts +2 -0
- package/dist/server/auth.js +6 -3
- package/dist/server/documentReviewRoutes.test.js +36 -3
- package/dist/server/index.cookieProxy.test.js +1 -0
- package/dist/server/index.d.ts +12 -0
- package/dist/server/index.js +120 -9
- package/dist/server/index.rateLimit.test.js +3 -0
- package/dist/server/index.test.js +106 -3
- package/dist/server/routes/admin.d.ts +4 -5
- package/dist/server/routes/admin.js +410 -80
- package/dist/server/routes/annotatedAttachments.d.ts +1 -1
- package/dist/server/routes/annotatedAttachments.js +1 -1
- package/dist/server/routes/auth.d.ts +16 -6
- package/dist/server/routes/auth.js +1015 -118
- package/dist/server/routes/authSupport.d.ts +30 -0
- package/dist/server/routes/authSupport.js +81 -0
- package/dist/server/routes/billing.d.ts +1 -1
- package/dist/server/routes/billing.js +276 -34
- package/dist/server/routes/billing.test.js +760 -52
- package/dist/server/routes/documentReviews.d.ts +1 -1
- package/dist/server/routes/documentReviews.js +1 -1
- package/dist/server/routes/documents.d.ts +5 -2
- package/dist/server/routes/documents.js +242 -74
- package/dist/server/routes/primitives.d.ts +11 -0
- package/dist/server/routes/primitives.js +73 -0
- package/dist/server/routes/resources.d.ts +1 -1
- package/dist/server/routes/resources.js +1 -1
- package/dist/server/routes/shared.d.ts +29 -3
- package/dist/server/routes/shared.js +69 -4
- package/dist/server/routes/sync.d.ts +1 -1
- package/dist/server/routes/sync.integration.test.js +437 -39
- package/dist/server/routes/sync.js +62 -606
- package/dist/server/routes/syncAuxRoutes.d.ts +15 -0
- package/dist/server/routes/syncAuxRoutes.js +91 -0
- package/dist/server/routes/syncAuxRoutes.test.d.ts +1 -0
- package/dist/server/routes/syncAuxRoutes.test.js +158 -0
- package/dist/server/routes/syncPullApplyRoutes.d.ts +36 -0
- package/dist/server/routes/syncPullApplyRoutes.js +204 -0
- package/dist/server/routes/syncPushRoutes.d.ts +24 -0
- package/dist/server/routes/syncPushRoutes.js +212 -0
- package/dist/server/routes/syncRouteGuards.d.ts +36 -0
- package/dist/server/routes/syncRouteGuards.js +67 -0
- package/dist/server/routes/syncRouteGuards.test.d.ts +1 -0
- package/dist/server/routes/syncRouteGuards.test.js +94 -0
- package/dist/server/routes/syncRouteTypes.d.ts +13 -0
- package/dist/server/routes/syncRouteTypes.js +1 -0
- package/dist/server/routes/syncSnapshotRoutes.d.ts +66 -0
- package/dist/server/routes/syncSnapshotRoutes.js +180 -0
- package/dist/server/routes/tasks.d.ts +1 -1
- package/dist/server/routes/tasks.js +44 -2
- package/dist/server/routes/workspaces.d.ts +1 -1
- package/dist/server/routes/workspaces.js +37 -6
- package/dist/server/routes.d.ts +2 -9
- package/dist/server/routes.js +136 -165
- package/dist/server/routes.test.js +2457 -162
- package/dist/services/workflowExportSnapshots.test.js +2 -0
- package/dist/shared/aiProfileSeatScope.d.ts +5 -0
- package/dist/shared/aiProfileSeatScope.js +21 -0
- package/dist/shared/passwordPolicy.d.ts +13 -0
- package/dist/shared/passwordPolicy.js +84 -0
- package/dist/shared/passwordPolicy.test.d.ts +1 -0
- package/dist/shared/passwordPolicy.test.js +34 -0
- package/dist/storage/workspaceAssetStore.d.ts +15 -3
- package/dist/storage/workspaceAssetStore.js +132 -44
- package/dist/storage/workspaceAssetStore.test.js +93 -6
- package/dist/styles/fonts.css +70 -0
- package/dist/sync/collaborationSyncPayload.d.ts +6 -1
- package/dist/sync/collaborationSyncPayload.js +17 -11
- package/dist/sync/collaborationSyncPayload.test.js +13 -1
- package/dist/sync/contentSyncState.d.ts +4 -8
- package/dist/sync/contentSyncState.js +33 -77
- package/dist/sync/syncApplyHandlers.d.ts +7 -0
- package/dist/sync/syncApplyHandlers.js +28 -13
- package/dist/sync/syncApplyHandlers.test.js +72 -3
- package/dist/sync/syncFieldSemantics.d.ts +12 -0
- package/dist/sync/syncFieldSemantics.js +55 -0
- package/dist/sync/syncResourceAdapters.d.ts +44 -0
- package/dist/sync/syncResourceAdapters.js +77 -0
- package/dist/sync/syncService.d.ts +6 -0
- package/dist/sync/syncService.js +60 -0
- package/dist/sync/syncService.test.js +71 -3
- package/dist/sync/taskSyncChangeKey.d.ts +2 -0
- package/dist/sync/taskSyncChangeKey.js +143 -0
- package/dist/sync/taskSyncPayload.js +3 -8
- package/dist/sync/workspacePullFeed.js +4 -3
- package/dist/sync/workspacePullFeed.test.js +43 -0
- package/dist/sync/workspaceRepair.js +5 -2
- package/dist/sync/workspaceSyncModel.d.ts +48 -0
- package/dist/sync/workspaceSyncModel.js +195 -31
- package/dist/sync/workspaceSyncModel.test.js +325 -12
- package/dist/sync/workspaceSyncState.d.ts +19 -0
- package/dist/sync/workspaceSyncState.js +3 -1
- package/dist/sync/workspaceSyncSurface.js +3 -8
- package/dist/types.d.ts +17 -0
- package/dist/ui/assets/AgentsModule-DrLawwNl.js +1 -0
- package/dist/ui/assets/{AnnotatedAttachmentWorkspace-BlS-cqnl.js → AnnotatedAttachmentWorkspace-Z9_whf7F.js} +1 -1
- package/dist/ui/assets/CourierPrime-Bold-BuLj_dpw.woff2 +0 -0
- package/dist/ui/assets/CourierPrime-BoldItalic-BrK2pUkZ.woff2 +0 -0
- package/dist/ui/assets/CourierPrime-Italic-DFUZK5Ey.woff2 +0 -0
- package/dist/ui/assets/CourierPrime-Regular-BsKphzVf.woff2 +0 -0
- package/dist/ui/assets/DocumentWorkspace-B03MaSkw.js +252 -0
- package/dist/ui/assets/DocumentWorkspace-Dhdso07p.css +1 -0
- package/dist/ui/assets/{InitiativesModule-BjR6iBf9.js → InitiativesModule-9E6ParrY.js} +1 -1
- package/dist/ui/assets/Noir_medium-bxQwKGzB.woff2 +0 -0
- package/dist/ui/assets/Noir_regular-ojf2kxlG.woff2 +0 -0
- package/dist/ui/assets/PlansPage-CvfnMiWq.css +1 -0
- package/dist/ui/assets/PlansPage-DRXscYxH.js +1 -0
- package/dist/ui/assets/RussoOne-Regular-Cu_qq_qC.woff2 +0 -0
- package/dist/ui/assets/SpecialElite-Regular-Di6gSvAS.woff2 +0 -0
- package/dist/ui/assets/TaskSettings-DZX4jk7e.js +9 -0
- package/dist/ui/assets/{WorkflowsModule-DnFqdUME.js → WorkflowsModule-BA7jcEpH.js} +1 -1
- package/dist/ui/assets/index-9eT8e0Lu.css +1 -0
- package/dist/ui/assets/index-C6k75jr8.js +6 -0
- package/dist/ui/assets/{vendor-icons-I7ZwG1z_.js → vendor-icons-DuEd_65c.js} +1 -1
- package/dist/ui/fonts/CourierPrime-Bold.ttf +0 -0
- package/dist/ui/fonts/CourierPrime-Bold.woff2 +0 -0
- package/dist/ui/fonts/CourierPrime-BoldItalic.ttf +0 -0
- package/dist/ui/fonts/CourierPrime-BoldItalic.woff2 +0 -0
- package/dist/ui/fonts/CourierPrime-Italic.ttf +0 -0
- package/dist/ui/fonts/CourierPrime-Italic.woff2 +0 -0
- package/dist/ui/fonts/CourierPrime-Regular.ttf +0 -0
- package/dist/ui/fonts/CourierPrime-Regular.woff2 +0 -0
- package/dist/ui/fonts/Noir_medium.otf +0 -0
- package/dist/ui/fonts/Noir_medium.woff2 +0 -0
- package/dist/ui/fonts/Noir_regular.otf +0 -0
- package/dist/ui/fonts/Noir_regular.woff2 +0 -0
- package/dist/ui/fonts/RussoOne-Regular.woff2 +0 -0
- package/dist/ui/fonts/SpecialElite-Regular.ttf +0 -0
- package/dist/ui/fonts/SpecialElite-Regular.woff2 +0 -0
- package/dist/ui/index.html +3 -3
- package/dist/utils/accountProfileSummaryCache.d.ts +5 -0
- package/dist/utils/assignees.d.ts +2 -0
- package/dist/utils/assignees.js +2 -0
- package/dist/utils/avatarUpload.d.ts +27 -0
- package/dist/utils/avatarUpload.js +132 -0
- package/dist/utils/avatarUpload.test.d.ts +1 -0
- package/dist/utils/avatarUpload.test.js +40 -0
- package/dist/utils/bootstrapTrace.d.ts +7 -0
- package/dist/utils/bootstrapTrace.js +29 -0
- package/dist/utils/commercialLifecyclePresentation.d.ts +19 -0
- package/dist/utils/commercialLifecyclePresentation.js +199 -0
- package/dist/utils/contextAssetEvents.d.ts +2 -0
- package/dist/utils/syncEventDetails.d.ts +3 -0
- package/dist/utils/syncEventDetails.js +64 -0
- package/dist/utils/syncEventDetails.test.d.ts +1 -0
- package/dist/utils/syncEventDetails.test.js +23 -0
- package/dist/utils/syncEventPresentation.d.ts +15 -0
- package/dist/utils/syncEventPresentation.js +129 -0
- package/dist/utils/syncEventPresentation.test.d.ts +1 -0
- package/dist/utils/syncEventPresentation.test.js +64 -0
- package/dist/utils/syncStatusPresentation.d.ts +72 -0
- package/dist/utils/syncStatusPresentation.js +217 -0
- package/dist/utils/syncStatusPresentation.test.d.ts +1 -0
- package/dist/utils/syncStatusPresentation.test.js +164 -0
- package/dist/utils/taskActivity.d.ts +2 -0
- package/dist/utils/taskActivity.js +228 -22
- package/dist/utils/taskActivity.test.js +119 -8
- package/dist/utils/workspaceSyncPresentation.d.ts +4 -0
- package/dist/utils/workspaceSyncPresentation.js +68 -2
- package/dist/utils/workspaceSyncPresentation.test.js +36 -1
- package/package.json +10 -2
- package/scripts/check-cloud-mcp.mjs +83 -0
- package/scripts/export-sqlite-to-postgres.mjs +7 -9
- package/scripts/playwright-auth.sh +5 -1
- package/scripts/run-billing-performance-smoke.sh +24 -0
- package/scripts/run-e2e-realtime.sh +17 -3
- package/scripts/run-smoke.sh +17 -5
- package/scripts/run-soak.sh +17 -5
- package/src/resources/templates/workflow-sources/workflowDocs.mjs +6 -6
- package/src/resources/templates/workflows/collaborate.yaml +1 -1
- package/src/resources/templates/workflows/evaluate.yaml +2 -2
- package/src/resources/templates/workflows/plan.yaml +1 -1
- package/src/resources/templates/workflows/review.yaml +2 -2
- package/dist/ui/assets/AgentsModule-BLWVbuKP.js +0 -1
- package/dist/ui/assets/DocumentWorkspace-BH_6DF6x.js +0 -250
- package/dist/ui/assets/DocumentWorkspace-C_8T8oz-.css +0 -1
- package/dist/ui/assets/PlansPage-C2dd2n1X.css +0 -1
- package/dist/ui/assets/PlansPage-CSDQ4sLa.js +0 -1
- package/dist/ui/assets/RussoOne-Regular-C3BxZIj7.ttf +0 -0
- package/dist/ui/assets/TaskSettings-CEDy34Jo.js +0 -9
- package/dist/ui/assets/index-DXUdtH1B.js +0 -6
- package/dist/ui/assets/index-Ii0B0rTO.css +0 -1
- package/scripts/migrate-planning-model.ts +0 -233
|
@@ -91,6 +91,56 @@ describe('TaskforceCore canonical task attachments', () => {
|
|
|
91
91
|
})
|
|
92
92
|
]);
|
|
93
93
|
});
|
|
94
|
+
it('starts cleanly with legacy workspace asset links that predate target_type', () => {
|
|
95
|
+
const projectRoot = createProjectRoot();
|
|
96
|
+
const core = new TaskforceCore({ projectRoot, storagePath: '.taskforce' });
|
|
97
|
+
const created = core.createTask({
|
|
98
|
+
title: 'Legacy attachment startup task'
|
|
99
|
+
}, { workspaceId: 'default' });
|
|
100
|
+
const db = core.getDatabaseAdapter();
|
|
101
|
+
const now = new Date().toISOString();
|
|
102
|
+
const storageKey = 'workspaces/default/assets/documents/asset-legacy-doc-1-spec.md';
|
|
103
|
+
db.exec(`
|
|
104
|
+
DROP TABLE IF EXISTS workspace_asset_links;
|
|
105
|
+
CREATE TABLE workspace_asset_links (
|
|
106
|
+
tenant_id TEXT NOT NULL DEFAULT 'default',
|
|
107
|
+
workspace_id TEXT NOT NULL,
|
|
108
|
+
asset_id TEXT NOT NULL,
|
|
109
|
+
task_id TEXT NOT NULL,
|
|
110
|
+
role TEXT NOT NULL,
|
|
111
|
+
display_name TEXT,
|
|
112
|
+
sort_order INTEGER,
|
|
113
|
+
created_at TEXT NOT NULL,
|
|
114
|
+
updated_at TEXT NOT NULL,
|
|
115
|
+
deleted_at TEXT,
|
|
116
|
+
PRIMARY KEY (tenant_id, workspace_id, asset_id, task_id, role)
|
|
117
|
+
);
|
|
118
|
+
`);
|
|
119
|
+
db.prepare(`
|
|
120
|
+
INSERT INTO workspace_assets (
|
|
121
|
+
asset_id, tenant_id, workspace_id, kind, logical_name, original_filename, mime_type,
|
|
122
|
+
storage_provider, storage_key, content_sha256, size_bytes, document_id, reference_number, version,
|
|
123
|
+
is_latest, scan_status, created_at, updated_at
|
|
124
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
125
|
+
`).run('asset-legacy-doc-1', 'default', 'default', 'document', 'Legacy Spec', 'spec.md', 'text/markdown', 'r2', storageKey, 'sha-legacy-doc-1', 120, 'doc-legacy-1', 1, 1, 1, 'clean', now, now);
|
|
126
|
+
db.prepare(`
|
|
127
|
+
INSERT INTO workspace_asset_links (
|
|
128
|
+
tenant_id, workspace_id, asset_id, task_id, role, display_name, created_at, updated_at
|
|
129
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
|
130
|
+
`).run('default', 'default', 'asset-legacy-doc-1', created.id, 'attachment', 'Legacy Spec', now, now);
|
|
131
|
+
core.close();
|
|
132
|
+
const repairedCore = new TaskforceCore({ projectRoot, storagePath: '.taskforce' });
|
|
133
|
+
const tasks = repairedCore.listTasks('default').tasks;
|
|
134
|
+
const task = tasks.find((entry) => entry.id === created.id);
|
|
135
|
+
expect(task?.attachments).toEqual([
|
|
136
|
+
expect.objectContaining({
|
|
137
|
+
path: '/api/taskforce/documents/asset-legacy-doc-1/content',
|
|
138
|
+
fsPath: storageKey,
|
|
139
|
+
caption: 'Legacy Spec',
|
|
140
|
+
assetId: 'asset-legacy-doc-1'
|
|
141
|
+
})
|
|
142
|
+
]);
|
|
143
|
+
});
|
|
94
144
|
it('renders canonical image attachments through the unified context route', () => {
|
|
95
145
|
const projectRoot = createProjectRoot();
|
|
96
146
|
const core = new TaskforceCore({ projectRoot, storagePath: '.taskforce' });
|
|
@@ -246,7 +296,7 @@ describe('TaskforceCore canonical task attachments', () => {
|
|
|
246
296
|
taskId: created.id,
|
|
247
297
|
imageAssetId: 'asset-image-repair',
|
|
248
298
|
includeDeleted: true,
|
|
249
|
-
});
|
|
299
|
+
}).filter((session) => session.taskId === created.id);
|
|
250
300
|
const unattachedSessions = repairedCore.listAnnotatedAttachmentSessions({
|
|
251
301
|
workspaceId: 'default',
|
|
252
302
|
imageAssetId: 'asset-image-repair',
|
|
@@ -348,6 +348,59 @@ describe('TaskforceCore taxonomy validation', () => {
|
|
|
348
348
|
core.close();
|
|
349
349
|
fs.rmSync(projectRoot, { recursive: true, force: true });
|
|
350
350
|
});
|
|
351
|
+
it('migrates legacy config-backed taxonomy data once and no longer depends on config for runtime state', () => {
|
|
352
|
+
const projectRoot = makeTempProjectRoot();
|
|
353
|
+
fs.mkdirSync(path.join(projectRoot, '.taskforce'), { recursive: true });
|
|
354
|
+
const configPath = path.join(projectRoot, '.taskforce', 'config.json');
|
|
355
|
+
fs.writeFileSync(configPath, JSON.stringify({
|
|
356
|
+
categories: [{ value: 'legacy', label: 'Legacy' }],
|
|
357
|
+
types: [{ value: 'legacy-type', label: 'Legacy Type' }],
|
|
358
|
+
priorities: [{ value: 9, label: 'Legacy Priority', color: 'red-500', icon: 'AlertTriangle' }],
|
|
359
|
+
taxonomies: [{ id: 'legacy-taxonomy', label: 'Legacy Taxonomy', widgetType: 'select', isSystem: false, multiSelect: false, options: [] }]
|
|
360
|
+
}, null, 2));
|
|
361
|
+
const core = new TaskforceCore({ projectRoot, storagePath: '.taskforce' });
|
|
362
|
+
const migratedState = core.getTaxonomyState('default');
|
|
363
|
+
expect((migratedState.categories || []).map((category) => (typeof category === 'string' ? category : category.value))).toEqual(['default', 'legacy']);
|
|
364
|
+
expect((migratedState.types || []).map((type) => type.value)).toEqual(['legacy-type']);
|
|
365
|
+
expect((migratedState.priorities || []).map((priority) => priority.value)).toEqual([9]);
|
|
366
|
+
expect((migratedState.taxonomies || []).map((taxonomy) => taxonomy.id)).toEqual(['legacy-taxonomy']);
|
|
367
|
+
core.close();
|
|
368
|
+
fs.writeFileSync(configPath, JSON.stringify({ checklistDropdownEnabled: true }, null, 2));
|
|
369
|
+
const reopened = new TaskforceCore({ projectRoot, storagePath: '.taskforce' });
|
|
370
|
+
const persistedState = reopened.getTaxonomyState('default');
|
|
371
|
+
expect((persistedState.categories || []).map((category) => (typeof category === 'string' ? category : category.value))).toEqual(['default', 'legacy']);
|
|
372
|
+
expect((persistedState.types || []).map((type) => type.value)).toEqual(['legacy-type']);
|
|
373
|
+
expect((persistedState.priorities || []).map((priority) => priority.value)).toEqual([9]);
|
|
374
|
+
expect((persistedState.taxonomies || []).map((taxonomy) => taxonomy.id)).toEqual(['legacy-taxonomy']);
|
|
375
|
+
reopened.close();
|
|
376
|
+
fs.rmSync(projectRoot, { recursive: true, force: true });
|
|
377
|
+
});
|
|
378
|
+
it('does not seed new workspaces from legacy config-backed taxonomy definitions', () => {
|
|
379
|
+
const projectRoot = makeTempProjectRoot();
|
|
380
|
+
fs.mkdirSync(path.join(projectRoot, '.taskforce'), { recursive: true });
|
|
381
|
+
const configPath = path.join(projectRoot, '.taskforce', 'config.json');
|
|
382
|
+
fs.writeFileSync(configPath, JSON.stringify({
|
|
383
|
+
categories: [{ value: 'legacy', label: 'Legacy' }],
|
|
384
|
+
types: [{ value: 'legacy-type', label: 'Legacy Type' }],
|
|
385
|
+
priorities: [{ value: 9, label: 'Legacy Priority' }],
|
|
386
|
+
taxonomies: [{ id: 'legacy-taxonomy', label: 'Legacy Taxonomy' }]
|
|
387
|
+
}, null, 2));
|
|
388
|
+
const core = new TaskforceCore({ projectRoot, storagePath: '.taskforce' });
|
|
389
|
+
core.createWorkspace({ workspaceId: 'workspace-new', name: 'New Workspace' });
|
|
390
|
+
const state = core.getTaxonomyState('workspace-new');
|
|
391
|
+
expect((state.categories || []).map((category) => (typeof category === 'string' ? category : category.value))).toEqual(['default']);
|
|
392
|
+
expect((state.types || []).map((type) => type.value)).toEqual([
|
|
393
|
+
'task',
|
|
394
|
+
'deliverable',
|
|
395
|
+
'issue',
|
|
396
|
+
'idea',
|
|
397
|
+
'review'
|
|
398
|
+
]);
|
|
399
|
+
expect((state.priorities || []).map((priority) => priority.value)).toEqual([1, 2, 3]);
|
|
400
|
+
expect(state.taxonomies || []).toEqual([]);
|
|
401
|
+
core.close();
|
|
402
|
+
fs.rmSync(projectRoot, { recursive: true, force: true });
|
|
403
|
+
});
|
|
351
404
|
it('preserves existing first-class taxonomy sections when taxonomy state updates are partial', () => {
|
|
352
405
|
const projectRoot = makeTempProjectRoot();
|
|
353
406
|
const core = new TaskforceCore({ projectRoot, storagePath: '.taskforce' });
|
package/dist/core/Taskforce.d.ts
CHANGED
|
@@ -3,10 +3,22 @@ import { WorkspaceAssetStore } from '../storage/workspaceAssetStore.js';
|
|
|
3
3
|
import { type SyncEventInput } from './SyncReconciliationService.js';
|
|
4
4
|
import { type FirstClassTaxonomyDisplayLabels, type WorkspaceTaxonomyState } from '../shared/taxonomyState.js';
|
|
5
5
|
import { type AiProfileSurfaceType } from '../shared/aiProfileSurfaceType.js';
|
|
6
|
+
import { type AiProfileSeatScope } from '../shared/aiProfileSeatScope.js';
|
|
7
|
+
import type { PlanningBootstrapPayload } from '../types.js';
|
|
6
8
|
import type { TaskActor } from '../shared/taskActor.js';
|
|
7
9
|
export type { TaskActor } from '../shared/taskActor.js';
|
|
8
10
|
export type { WorkspaceDeletedAssetRecord, WorkspaceDeleteSummary } from './types.js';
|
|
9
|
-
import type { GlobalTaskforceSettings, UserGlobalSyncSettings, WorkspaceDeleteSummary } from './types.js';
|
|
11
|
+
import type { GlobalTaskforceSettings, UserGlobalSyncSettings, WorkspaceDeleteSummary, UserAuthProvider } from './types.js';
|
|
12
|
+
export interface PlanningBootstrapDiagnostics {
|
|
13
|
+
initiativeCount?: number;
|
|
14
|
+
workstreamCount?: number;
|
|
15
|
+
workstreamLinkedTaskCount?: number;
|
|
16
|
+
workstreamTaskSummaryCount?: number;
|
|
17
|
+
initiativeLoadMs?: number;
|
|
18
|
+
workstreamLoadMs?: number;
|
|
19
|
+
taskSummaryQueryMs?: number;
|
|
20
|
+
taskSummaryBuildMs?: number;
|
|
21
|
+
}
|
|
10
22
|
import type { AnnotatedAttachmentAnnotation, AnnotatedAttachmentPayload, AnnotatedAttachmentSession, AnnotatedAttachmentSessionRecord } from '../annotatedAttachments/types.js';
|
|
11
23
|
import type { DocumentReviewAnchor, DocumentReviewCommentSyncRecord, DocumentReviewSession, DocumentReviewSessionRecord, DocumentReviewSessionStatus } from '../documentReviews/types.js';
|
|
12
24
|
import { type TaskforceTheme } from '../utils/theme.js';
|
|
@@ -350,6 +362,8 @@ interface UserAccessRecord {
|
|
|
350
362
|
role: AccessRole;
|
|
351
363
|
permissionMode: PermissionMode;
|
|
352
364
|
disabled: boolean;
|
|
365
|
+
accountDisabled?: boolean;
|
|
366
|
+
workspaceDisabled?: boolean;
|
|
353
367
|
betaAccess: boolean;
|
|
354
368
|
}
|
|
355
369
|
interface UserIdentityRecord {
|
|
@@ -378,6 +392,7 @@ interface WorkspaceUserRecord {
|
|
|
378
392
|
userId: string;
|
|
379
393
|
email: string;
|
|
380
394
|
displayName?: string | null;
|
|
395
|
+
avatarUrl?: string | null;
|
|
381
396
|
role: AccessRole;
|
|
382
397
|
permissionMode: PermissionMode;
|
|
383
398
|
betaAccess: boolean;
|
|
@@ -395,12 +410,20 @@ export interface AiProfileRecord {
|
|
|
395
410
|
username: string;
|
|
396
411
|
icon: string;
|
|
397
412
|
color: string;
|
|
413
|
+
avatarUrl?: string | null;
|
|
414
|
+
avatarSourceUrl?: string | null;
|
|
398
415
|
description?: string | null;
|
|
399
416
|
role?: string | null;
|
|
400
417
|
provider?: string | null;
|
|
401
418
|
model?: string | null;
|
|
402
419
|
surfaceType?: AiProfileSurfaceType | null;
|
|
420
|
+
seatScope?: AiProfileSeatScope | null;
|
|
403
421
|
providerMetadata?: Record<string, unknown> | null;
|
|
422
|
+
archivedAt?: string | null;
|
|
423
|
+
archivedBy?: string | null;
|
|
424
|
+
archivedReason?: string | null;
|
|
425
|
+
mergedIntoProfileId?: string | null;
|
|
426
|
+
rosterStateUpdatedAt?: string | null;
|
|
404
427
|
createdAt: string;
|
|
405
428
|
updatedAt: string;
|
|
406
429
|
lastActiveAt?: string | null;
|
|
@@ -418,6 +441,9 @@ export interface ResolveAiProfileInput {
|
|
|
418
441
|
profileToken?: string | null;
|
|
419
442
|
providerMetadata?: Record<string, unknown> | null;
|
|
420
443
|
}
|
|
444
|
+
export interface ResolveAiProfileOptions {
|
|
445
|
+
trustedSeatScope?: AiProfileSeatScope | null;
|
|
446
|
+
}
|
|
421
447
|
export interface ResolveAiProfileResult {
|
|
422
448
|
created: boolean;
|
|
423
449
|
profile: AiProfileRecord;
|
|
@@ -563,6 +589,7 @@ export interface PlanVersionSnapshot {
|
|
|
563
589
|
export interface PlanCatalogSnapshot {
|
|
564
590
|
planId: string;
|
|
565
591
|
displayName: string;
|
|
592
|
+
description: string | null;
|
|
566
593
|
status: 'active' | 'archived';
|
|
567
594
|
createdAt: string;
|
|
568
595
|
updatedAt: string;
|
|
@@ -594,6 +621,7 @@ interface PasswordAuthResult {
|
|
|
594
621
|
userId: string;
|
|
595
622
|
workspaceId: string;
|
|
596
623
|
role: AccessRole;
|
|
624
|
+
identityId?: string;
|
|
597
625
|
};
|
|
598
626
|
code?: 'INVALID_CREDENTIALS' | 'EMAIL_NOT_VERIFIED';
|
|
599
627
|
}
|
|
@@ -733,7 +761,9 @@ export interface TaskforceSyncCapable {
|
|
|
733
761
|
};
|
|
734
762
|
listInitiatives(workspaceId?: string): InitiativeItem[];
|
|
735
763
|
listWorkstreams(workspaceId?: string): WorkstreamItem[];
|
|
736
|
-
listAiProfiles(workspaceId: string
|
|
764
|
+
listAiProfiles(workspaceId: string, options?: {
|
|
765
|
+
includeArchived?: boolean;
|
|
766
|
+
}): AiProfileRecord[];
|
|
737
767
|
listWorkspaceUsers(workspaceId: string): WorkspaceUserRecord[];
|
|
738
768
|
listDocumentReviewSessionsForSync(input: {
|
|
739
769
|
workspaceId?: string | null;
|
|
@@ -781,6 +811,18 @@ export interface TaskforceSyncCapable {
|
|
|
781
811
|
keepId: string;
|
|
782
812
|
mergeId: string;
|
|
783
813
|
}): AiProfileRecord;
|
|
814
|
+
archiveAiProfile(input: {
|
|
815
|
+
workspaceId: string;
|
|
816
|
+
profileId: string;
|
|
817
|
+
archivedBy?: string | null;
|
|
818
|
+
reason?: string | null;
|
|
819
|
+
}): AiProfileRecord;
|
|
820
|
+
updateAiProfileAvatar(input: {
|
|
821
|
+
workspaceId: string;
|
|
822
|
+
profileId: string;
|
|
823
|
+
avatarUrl?: string | null;
|
|
824
|
+
avatarSourceUrl?: string | null;
|
|
825
|
+
}): AiProfileRecord;
|
|
784
826
|
resolveWorkspaceActor(workspaceId: string, actorRef: unknown): TaskActor | null;
|
|
785
827
|
}
|
|
786
828
|
export declare class TaskforceCore implements TaskforceSyncCapable {
|
|
@@ -798,6 +840,7 @@ export declare class TaskforceCore implements TaskforceSyncCapable {
|
|
|
798
840
|
private db;
|
|
799
841
|
private globalSettingsDb;
|
|
800
842
|
private authTokenService;
|
|
843
|
+
private identityService;
|
|
801
844
|
private mcpTokenService;
|
|
802
845
|
private planEntitlementService;
|
|
803
846
|
private realtimeMutationListeners;
|
|
@@ -911,6 +954,7 @@ export declare class TaskforceCore implements TaskforceSyncCapable {
|
|
|
911
954
|
getAccountAccessStatus(accountId: string): import("./types.js").AccountAccessStatus;
|
|
912
955
|
getEffectivePlanVersion(accountId: string): import("./types.js").PlanVersionSnapshot;
|
|
913
956
|
getAccountEntitlement(accountId: string): import("./types.js").AccountEntitlementSnapshot;
|
|
957
|
+
countAiProfileUsage(workspaceId: string): import("./types.js").SeatUsageSnapshot;
|
|
914
958
|
countWorkspaceSeatUsage(workspaceId: string, options?: {
|
|
915
959
|
includeInvited?: boolean;
|
|
916
960
|
}): import("./types.js").SeatUsageSnapshot;
|
|
@@ -934,6 +978,7 @@ export declare class TaskforceCore implements TaskforceSyncCapable {
|
|
|
934
978
|
};
|
|
935
979
|
private ensureDirectories;
|
|
936
980
|
private migrateLegacyGlobalSettingsDbIfNeeded;
|
|
981
|
+
private supportsWorkspaceAssetLinkTargetType;
|
|
937
982
|
private initializeSchema;
|
|
938
983
|
private performMigrationIfNeeded;
|
|
939
984
|
private backfillMcpAuditLogMetadataColumns;
|
|
@@ -968,6 +1013,8 @@ export declare class TaskforceCore implements TaskforceSyncCapable {
|
|
|
968
1013
|
private resolveDefaultTypeValue;
|
|
969
1014
|
private getLegacyTaxonomiesConfig;
|
|
970
1015
|
private getLegacyPrioritiesConfig;
|
|
1016
|
+
private readLegacyWorkspaceTaxonomyStateFromConfig;
|
|
1017
|
+
private migrateLegacyWorkspaceTaxonomyStateIfNeeded;
|
|
971
1018
|
private buildEmergencyWorkspaceTaxonomyState;
|
|
972
1019
|
private getConfiguredDefaultStarterTaxonomyPackId;
|
|
973
1020
|
private getResolvedStarterWorkspaceTaxonomyState;
|
|
@@ -989,9 +1036,10 @@ export declare class TaskforceCore implements TaskforceSyncCapable {
|
|
|
989
1036
|
getEffectiveTheme(workspaceId?: string, userId?: string): TaskforceTheme;
|
|
990
1037
|
hasProjectJsonBackupOverride(workspaceId?: string, userId?: string): boolean;
|
|
991
1038
|
getOnboardingPolicy(): import("./types.js").OnboardingPolicy;
|
|
1039
|
+
listOnboardingPlanOptions(): import("./types.js").OnboardingPlanOption[];
|
|
992
1040
|
validateOnboardingPolicy(input?: {
|
|
993
1041
|
mode?: 'require_plan_selection' | 'auto_grant_free' | 'auto_start_trial';
|
|
994
|
-
|
|
1042
|
+
planId?: string | null;
|
|
995
1043
|
}): import("./types.js").OnboardingPolicyValidationResult;
|
|
996
1044
|
updateGlobalSettings(settings: GlobalTaskforceSettings): void;
|
|
997
1045
|
private sanitizeUserGlobalSyncSettings;
|
|
@@ -1034,6 +1082,7 @@ export declare class TaskforceCore implements TaskforceSyncCapable {
|
|
|
1034
1082
|
unarchiveInitiative(id: string, workspaceId?: string): InitiativeItem;
|
|
1035
1083
|
getWorkstream(id: string, workspaceId?: string): WorkstreamItem | null;
|
|
1036
1084
|
listWorkstreams(workspaceId?: string): WorkstreamItem[];
|
|
1085
|
+
listPlanningBootstrap(workspaceId?: string, diagnostics?: PlanningBootstrapDiagnostics): PlanningBootstrapPayload;
|
|
1037
1086
|
createWorkstream(input: Partial<WorkstreamItem>, workspaceId?: string): WorkstreamItem;
|
|
1038
1087
|
updateWorkstream(id: string, patch: Partial<WorkstreamItem>, workspaceId?: string): WorkstreamItem;
|
|
1039
1088
|
archiveWorkstream(id: string, workspaceId?: string): WorkstreamItem;
|
|
@@ -1109,6 +1158,24 @@ export declare class TaskforceCore implements TaskforceSyncCapable {
|
|
|
1109
1158
|
private getSyncReconciliationServiceDeps;
|
|
1110
1159
|
private getWorkspaceLifecycleServiceDeps;
|
|
1111
1160
|
listTasks(workspaceId?: string): TaskFile;
|
|
1161
|
+
/**
|
|
1162
|
+
* Filter-pushdown listing used by read-only surfaces that don't need the
|
|
1163
|
+
* full task graph (MCP list_tasks, CLI summaries). Avoids the per-task
|
|
1164
|
+
* comments/events/attachments/checklist subqueries and actor resolution
|
|
1165
|
+
* that rowToTask performs, and applies filters + sort + limit at the SQL
|
|
1166
|
+
* layer so hot polls don't load the entire workspace.
|
|
1167
|
+
*/
|
|
1168
|
+
listTasksSlim(workspaceId: string | undefined, filters?: {
|
|
1169
|
+
category?: string;
|
|
1170
|
+
status?: TaskStatus;
|
|
1171
|
+
openOnly?: boolean;
|
|
1172
|
+
assignee?: string;
|
|
1173
|
+
priority?: number;
|
|
1174
|
+
type?: string;
|
|
1175
|
+
sort?: 'created' | 'priority' | 'updated';
|
|
1176
|
+
order?: 'asc' | 'desc';
|
|
1177
|
+
limit?: number;
|
|
1178
|
+
}): Array<Record<string, unknown>>;
|
|
1112
1179
|
getDataVersion(): number;
|
|
1113
1180
|
getDatabaseProvider(): DatabaseProvider;
|
|
1114
1181
|
isDatabaseHealthy(): boolean;
|
|
@@ -1166,7 +1233,15 @@ export declare class TaskforceCore implements TaskforceSyncCapable {
|
|
|
1166
1233
|
getUserBetaAccess(userId: string): boolean;
|
|
1167
1234
|
countSystemAdmins(): number;
|
|
1168
1235
|
hasAnySystemAdmin(): boolean;
|
|
1169
|
-
|
|
1236
|
+
countSystemUsers(input?: {
|
|
1237
|
+
query?: string | null;
|
|
1238
|
+
}): number;
|
|
1239
|
+
listSystemUsers(input?: {
|
|
1240
|
+
query?: string | null;
|
|
1241
|
+
sort?: 'newest' | 'oldest' | null;
|
|
1242
|
+
limit?: number | null;
|
|
1243
|
+
offset?: number | null;
|
|
1244
|
+
}): SystemUserRecord[];
|
|
1170
1245
|
setSystemRole(userId: string, role: SystemRole): boolean;
|
|
1171
1246
|
setUserDisabledGlobal(userId: string, disabled: boolean): boolean;
|
|
1172
1247
|
setUserBetaAccessGlobal(userId: string, enabled: boolean): boolean;
|
|
@@ -1182,10 +1257,17 @@ export declare class TaskforceCore implements TaskforceSyncCapable {
|
|
|
1182
1257
|
users: WorkspaceUserRecord[];
|
|
1183
1258
|
pruneMissing?: boolean;
|
|
1184
1259
|
}): WorkspaceUserRecord[];
|
|
1185
|
-
listAiProfiles(workspaceId: string
|
|
1260
|
+
listAiProfiles(workspaceId: string, options?: {
|
|
1261
|
+
includeArchived?: boolean;
|
|
1262
|
+
diagnostics?: {
|
|
1263
|
+
metadataBackfillCount?: number;
|
|
1264
|
+
};
|
|
1265
|
+
}): AiProfileRecord[];
|
|
1186
1266
|
getAiProfileByToken(input: {
|
|
1187
1267
|
workspaceId: string;
|
|
1188
1268
|
profileToken: string;
|
|
1269
|
+
includeArchived?: boolean;
|
|
1270
|
+
seatScope?: AiProfileSeatScope | null;
|
|
1189
1271
|
}): AiProfileRecord | null;
|
|
1190
1272
|
upsertAiProfileForSync(profile: AiProfileRecord): AiProfileRecord;
|
|
1191
1273
|
mergeAiProfiles(input: {
|
|
@@ -1193,7 +1275,19 @@ export declare class TaskforceCore implements TaskforceSyncCapable {
|
|
|
1193
1275
|
keepId: string;
|
|
1194
1276
|
mergeId: string;
|
|
1195
1277
|
}): AiProfileRecord;
|
|
1196
|
-
|
|
1278
|
+
archiveAiProfile(input: {
|
|
1279
|
+
workspaceId: string;
|
|
1280
|
+
profileId: string;
|
|
1281
|
+
archivedBy?: string | null;
|
|
1282
|
+
reason?: string | null;
|
|
1283
|
+
}): AiProfileRecord;
|
|
1284
|
+
updateAiProfileAvatar(input: {
|
|
1285
|
+
workspaceId: string;
|
|
1286
|
+
profileId: string;
|
|
1287
|
+
avatarUrl?: string | null;
|
|
1288
|
+
avatarSourceUrl?: string | null;
|
|
1289
|
+
}): AiProfileRecord;
|
|
1290
|
+
resolveAiProfile(input: ResolveAiProfileInput, options?: ResolveAiProfileOptions): ResolveAiProfileResult;
|
|
1197
1291
|
listAnnotatedAttachmentSessions(input: {
|
|
1198
1292
|
workspaceId?: string | null;
|
|
1199
1293
|
taskId?: string | null;
|
|
@@ -1382,6 +1476,7 @@ export declare class TaskforceCore implements TaskforceSyncCapable {
|
|
|
1382
1476
|
upsertPlanCatalog(input: {
|
|
1383
1477
|
planId: string;
|
|
1384
1478
|
displayName: string;
|
|
1479
|
+
description?: string | null;
|
|
1385
1480
|
status?: 'active' | 'archived';
|
|
1386
1481
|
initialMode?: 'personal' | 'team';
|
|
1387
1482
|
initialSeatLimit?: number | null;
|
|
@@ -1389,10 +1484,17 @@ export declare class TaskforceCore implements TaskforceSyncCapable {
|
|
|
1389
1484
|
}): {
|
|
1390
1485
|
planId: string;
|
|
1391
1486
|
displayName: string;
|
|
1487
|
+
description: string | null;
|
|
1392
1488
|
status: "active" | "archived";
|
|
1393
1489
|
};
|
|
1394
1490
|
listPlanCatalog(): import("./types.js").PlanCatalogSnapshot[];
|
|
1395
1491
|
listPlanFeatureCatalog(): import("./types.js").PlanFeatureCatalogItem[];
|
|
1492
|
+
updatePlanFeatureCatalogMarketingCopy(input: {
|
|
1493
|
+
featureKey: string;
|
|
1494
|
+
publicLabel?: string | null;
|
|
1495
|
+
publicDescription?: string | null;
|
|
1496
|
+
publicDisplayOrder?: number | null;
|
|
1497
|
+
}): import("./types.js").PlanFeatureCatalogItem;
|
|
1396
1498
|
listPlanVersions(planId: string): import("./types.js").PlanVersionSnapshot[];
|
|
1397
1499
|
getPlanVersionFeatures(planId: string, versionId: string): import("./types.js").PlanVersionSnapshot;
|
|
1398
1500
|
searchAccountsByEmail(query: string, limit?: number): {
|
|
@@ -1513,6 +1615,99 @@ export declare class TaskforceCore implements TaskforceSyncCapable {
|
|
|
1513
1615
|
checkoutPending: boolean;
|
|
1514
1616
|
commercialState: EntitlementState;
|
|
1515
1617
|
};
|
|
1618
|
+
/**
|
|
1619
|
+
* Creates an OAuth state record and returns the state token + PKCE materials.
|
|
1620
|
+
* Delegates to AuthIdentityService.createOAuthState.
|
|
1621
|
+
*/
|
|
1622
|
+
createOAuthLoginState(input: {
|
|
1623
|
+
provider: string;
|
|
1624
|
+
flowMode: string;
|
|
1625
|
+
userId?: string | null;
|
|
1626
|
+
inviteToken?: string | null;
|
|
1627
|
+
returnTo?: string | null;
|
|
1628
|
+
createdIp?: string | null;
|
|
1629
|
+
}): {
|
|
1630
|
+
state: string;
|
|
1631
|
+
codeVerifier: string;
|
|
1632
|
+
codeChallenge: string;
|
|
1633
|
+
nonce: string;
|
|
1634
|
+
};
|
|
1635
|
+
/**
|
|
1636
|
+
* Atomically consumes an OAuth state token and returns the row.
|
|
1637
|
+
* Returns null if invalid, expired, or already consumed.
|
|
1638
|
+
*/
|
|
1639
|
+
consumeOAuthLoginState(state: string): import('./AuthIdentityService.js').OAuthStateRecord | null;
|
|
1640
|
+
/**
|
|
1641
|
+
* Finds the Taskforce user associated with a provider identity.
|
|
1642
|
+
* Returns { userId, identityId } or null if not yet linked.
|
|
1643
|
+
*/
|
|
1644
|
+
findUserByOAuthProvider(provider: UserAuthProvider, providerSubject: string): {
|
|
1645
|
+
userId: string;
|
|
1646
|
+
identityId: string;
|
|
1647
|
+
} | null;
|
|
1648
|
+
/**
|
|
1649
|
+
* Links an OAuth provider identity to an existing user.
|
|
1650
|
+
* Throws IDENTITY_ALREADY_EXISTS if the user already has an identity for this provider.
|
|
1651
|
+
*/
|
|
1652
|
+
linkOAuthProviderToUser(input: {
|
|
1653
|
+
userId: string;
|
|
1654
|
+
provider: UserAuthProvider;
|
|
1655
|
+
providerSubject: string;
|
|
1656
|
+
providerEmail?: string | null;
|
|
1657
|
+
providerEmailVerified?: boolean | null;
|
|
1658
|
+
displayNameSnapshot?: string | null;
|
|
1659
|
+
avatarUrlSnapshot?: string | null;
|
|
1660
|
+
}): string;
|
|
1661
|
+
/**
|
|
1662
|
+
* Lists all active login identities for a user.
|
|
1663
|
+
* Used by the Account Hub "Login methods" section.
|
|
1664
|
+
*/
|
|
1665
|
+
listLoginMethodsForUser(userId: string): import('./types.js').UserAuthIdentity[];
|
|
1666
|
+
/**
|
|
1667
|
+
* Unlinks a provider identity from a user.
|
|
1668
|
+
* Throws LAST_IDENTITY_REQUIRED if it would be the last active method.
|
|
1669
|
+
*/
|
|
1670
|
+
unlinkLoginMethod(userId: string, provider: UserAuthProvider): boolean;
|
|
1671
|
+
/**
|
|
1672
|
+
* Adds or replaces a password identity for a user that signed up via OAuth.
|
|
1673
|
+
* Uses upsert semantics (safe to call on accounts that already have a password).
|
|
1674
|
+
*/
|
|
1675
|
+
addPasswordToAccount(userId: string, password: string): string;
|
|
1676
|
+
/**
|
|
1677
|
+
* Registers a new user account via an OAuth provider (no password).
|
|
1678
|
+
*
|
|
1679
|
+
* Creates the user row, applies commercial onboarding, and links the
|
|
1680
|
+
* provider identity — all in a single transaction.
|
|
1681
|
+
*
|
|
1682
|
+
* Returns the same shape as `registerPasswordUser` so callers can use
|
|
1683
|
+
* the same session-issuance path.
|
|
1684
|
+
*/
|
|
1685
|
+
registerOAuthUser(input: {
|
|
1686
|
+
email: string | null;
|
|
1687
|
+
emailVerified?: boolean;
|
|
1688
|
+
provider: UserAuthProvider;
|
|
1689
|
+
providerSubject: string;
|
|
1690
|
+
displayName?: string | null;
|
|
1691
|
+
avatarUrl?: string | null;
|
|
1692
|
+
planVersionId?: string;
|
|
1693
|
+
betaAccess?: boolean;
|
|
1694
|
+
}): {
|
|
1695
|
+
userId: string;
|
|
1696
|
+
workspaceId: string | null;
|
|
1697
|
+
role: AccessRole;
|
|
1698
|
+
identityId: string;
|
|
1699
|
+
planSelectionRequired: boolean;
|
|
1700
|
+
checkoutPending: boolean;
|
|
1701
|
+
commercialState: EntitlementState;
|
|
1702
|
+
};
|
|
1703
|
+
/**
|
|
1704
|
+
* Looks up a user by email address (exact, case-insensitive).
|
|
1705
|
+
* Returns { userId, email } or null.
|
|
1706
|
+
*/
|
|
1707
|
+
findUserByEmail(email: string): {
|
|
1708
|
+
userId: string;
|
|
1709
|
+
email: string;
|
|
1710
|
+
} | null;
|
|
1516
1711
|
private createOneTimeAuthToken;
|
|
1517
1712
|
private consumeOneTimeAuthToken;
|
|
1518
1713
|
inspectOneTimeAuthToken(token: string, purpose: AuthTokenPurpose): AuthTokenInspection;
|
|
@@ -1617,15 +1812,33 @@ export declare class TaskforceCore implements TaskforceSyncCapable {
|
|
|
1617
1812
|
revokeInviteAcceptanceForUser(userId: string): {
|
|
1618
1813
|
revoked: number;
|
|
1619
1814
|
};
|
|
1620
|
-
inspectInviteAcceptance(token: string):
|
|
1621
|
-
state: 'valid' | 'expired' | 'used' | 'missing' | 'revoked';
|
|
1622
|
-
email?: string;
|
|
1623
|
-
userId?: string;
|
|
1624
|
-
workspaceId?: string;
|
|
1625
|
-
inviteeKind?: 'existing_user' | 'new_user';
|
|
1626
|
-
passwordRequired?: boolean;
|
|
1627
|
-
};
|
|
1815
|
+
inspectInviteAcceptance(token: string): import('./types.js').InviteAcceptanceDetails;
|
|
1628
1816
|
private completeInviteWorkspaceActivation;
|
|
1817
|
+
/**
|
|
1818
|
+
* Claims an invite by linking an OAuth provider identity to the invited user.
|
|
1819
|
+
*
|
|
1820
|
+
* Used when an invited user with `inviteeState: 'pending_setup'` completes an
|
|
1821
|
+
* OAuth flow with `flow_mode: 'invite_claim'`. The invite token must still be
|
|
1822
|
+
* valid and the user must have zero active identities (pending setup).
|
|
1823
|
+
*
|
|
1824
|
+
* Returns the same shape as `acceptInviteWithToken` so callers can issue a
|
|
1825
|
+
* session cookie on the same path.
|
|
1826
|
+
*/
|
|
1827
|
+
claimInviteWithOAuthProvider(input: {
|
|
1828
|
+
token: string;
|
|
1829
|
+
provider: UserAuthProvider;
|
|
1830
|
+
providerSubject: string;
|
|
1831
|
+
providerEmail?: string | null;
|
|
1832
|
+
providerEmailVerified?: boolean | null;
|
|
1833
|
+
displayNameSnapshot?: string | null;
|
|
1834
|
+
avatarUrlSnapshot?: string | null;
|
|
1835
|
+
}): {
|
|
1836
|
+
userId: string;
|
|
1837
|
+
email: string;
|
|
1838
|
+
workspaceId: string;
|
|
1839
|
+
role: AccessRole;
|
|
1840
|
+
identityId: string;
|
|
1841
|
+
};
|
|
1629
1842
|
acceptInviteWithToken(input: {
|
|
1630
1843
|
token: string;
|
|
1631
1844
|
password: string;
|
|
@@ -1634,6 +1847,7 @@ export declare class TaskforceCore implements TaskforceSyncCapable {
|
|
|
1634
1847
|
email: string;
|
|
1635
1848
|
workspaceId: string;
|
|
1636
1849
|
role: AccessRole;
|
|
1850
|
+
identityId: string;
|
|
1637
1851
|
};
|
|
1638
1852
|
joinInviteWithAuthenticatedUser(input: {
|
|
1639
1853
|
token: string;
|