@taskforcehq/taskforce 0.3.329 → 0.3.330

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.
Files changed (321) hide show
  1. package/dist/Taskforce.module.css +290 -45
  2. package/dist/components/features/AiProfilesModule.js +3 -5
  3. package/dist/components/features/TaskSettings.js +70 -14
  4. package/dist/components/features/TaskforceAgentsModule.d.ts +1 -2
  5. package/dist/components/features/TaskforceAgentsModule.js +586 -116
  6. package/dist/components/features/agentConnections/AgentConnectionControl.d.ts +15 -0
  7. package/dist/components/features/agentConnections/AgentConnectionControl.js +125 -0
  8. package/dist/components/features/agentConnections/ModelConnectionsPanel.d.ts +18 -0
  9. package/dist/components/features/agentConnections/ModelConnectionsPanel.js +393 -0
  10. package/dist/components/features/agentConnections/modelConnectionsApi.d.ts +65 -0
  11. package/dist/components/features/agentConnections/modelConnectionsApi.js +129 -0
  12. package/dist/components/features/taskforceAgentAssignments/AgentBehaviorAssignments.js +15 -24
  13. package/dist/components/features/taskforceAgentEditorModel.d.ts +2 -1
  14. package/dist/components/features/taskforceAgentEditorModel.js +3 -1
  15. package/dist/components/features/workflowManager/workflowManagerApi.d.ts +1 -1
  16. package/dist/components/features/workflowManager/workflowManagerApi.js +3 -0
  17. package/dist/components/task/TaskWorkflowAssignmentField.js +68 -10
  18. package/dist/components/views/StandaloneLayout.js +27 -26
  19. package/dist/components/views/standalone/modals/SyncStatusModal.d.ts +4 -3
  20. package/dist/components/views/standalone/modals/SyncStatusModal.js +33 -38
  21. package/dist/config/envSchema.js +48 -1
  22. package/dist/core/McpTokenService.d.ts +23 -1
  23. package/dist/core/McpTokenService.js +93 -10
  24. package/dist/core/TaskChecklistCommandService.d.ts +27 -0
  25. package/dist/core/TaskChecklistCommandService.js +83 -5
  26. package/dist/core/TaskLifecycleCommandService.d.ts +3 -1
  27. package/dist/core/TaskLifecycleCommandService.js +6 -2
  28. package/dist/core/Taskforce.d.ts +32 -0
  29. package/dist/core/Taskforce.js +125 -4
  30. package/dist/core/types.d.ts +8 -0
  31. package/dist/documentReviews/commandService.d.ts +2 -1
  32. package/dist/documentReviews/commandService.js +6 -3
  33. package/dist/hooks/sync/orchestratorShared.d.ts +1 -0
  34. package/dist/hooks/sync/orchestratorShared.js +2 -0
  35. package/dist/hooks/sync/useLocalSyncCoordinatorSnapshot.d.ts +3 -0
  36. package/dist/hooks/sync/useLocalSyncCoordinatorSnapshot.js +85 -9
  37. package/dist/hooks/sync/useSyncStatusControls.d.ts +4 -1
  38. package/dist/hooks/sync/useSyncStatusControls.js +47 -11
  39. package/dist/hooks/useSyncOrchestrator.d.ts +3 -0
  40. package/dist/hooks/useSyncOrchestrator.js +111 -2
  41. package/dist/hooks/useTaskData.d.ts +31 -1
  42. package/dist/hooks/useTaskData.js +29 -7
  43. package/dist/hooks/useTaskMutations.d.ts +3 -1
  44. package/dist/hooks/useTaskMutations.js +46 -12
  45. package/dist/hooks/useTaskforce.d.ts +2 -0
  46. package/dist/hooks/useTaskforce.js +11 -2
  47. package/dist/mcp/clientRegistry.d.ts +2 -2
  48. package/dist/mcp/clientRegistry.js +1 -1
  49. package/dist/mcp/documentAssetRegistrar.js +9 -6
  50. package/dist/mcp/durableTaskMutationRouter.d.ts +4 -1
  51. package/dist/mcp/durableTaskMutationRouter.js +10 -0
  52. package/dist/mcp/durableTaskRelationshipMutationRouter.js +4 -0
  53. package/dist/mcp/httpProtocolRouting.d.ts +10 -0
  54. package/dist/mcp/httpProtocolRouting.js +19 -0
  55. package/dist/mcp/localCliHealth.d.ts +2 -2
  56. package/dist/mcp/localCliHealth.js +2 -2
  57. package/dist/mcp/localServiceProxy.d.ts +1 -0
  58. package/dist/mcp/localServiceProxy.js +530 -68
  59. package/dist/mcp/planningAttachmentCommandAdapter.d.ts +3 -1
  60. package/dist/mcp/planningAttachmentCommandAdapter.js +20 -2
  61. package/dist/mcp/runtime.d.ts +54 -79
  62. package/dist/mcp/runtime.js +384 -97
  63. package/dist/mcp/taskPlanningRegistrar.js +23 -4
  64. package/dist/mcp/toolProfiles.d.ts +2 -0
  65. package/dist/mcp/toolProfiles.js +10 -0
  66. package/dist/mcp/toolRegistry.d.ts +1 -0
  67. package/dist/mcp/toolRegistry.js +1 -0
  68. package/dist/mcp/workflowExecutionRegistrar.js +4 -4
  69. package/dist/migrations/taskSchemaMigrations.d.ts +5 -0
  70. package/dist/migrations/taskSchemaMigrations.js +415 -0
  71. package/dist/runtime/appGates.d.ts +2 -1
  72. package/dist/runtime/appGates.js +7 -0
  73. package/dist/server/index.d.ts +3 -0
  74. package/dist/server/index.js +108 -11
  75. package/dist/server/localDatabaseIdentity.js +4 -1
  76. package/dist/server/localServiceLease.js +2 -1
  77. package/dist/server/localServiceSessions.d.ts +14 -17
  78. package/dist/server/localServiceSessions.js +308 -94
  79. package/dist/server/localWorkspaceSyncServerRuntime.js +12 -14
  80. package/dist/server/routes/admin.d.ts +4 -0
  81. package/dist/server/routes/admin.js +112 -3
  82. package/dist/server/routes/agents.d.ts +7 -0
  83. package/dist/server/routes/agents.js +277 -24
  84. package/dist/server/routes/billing.js +5 -1
  85. package/dist/server/routes/durableTaskHttpRouters.d.ts +2 -0
  86. package/dist/server/routes/executorPhaseAApprovals.d.ts +19 -0
  87. package/dist/server/routes/executorPhaseAApprovals.js +140 -0
  88. package/dist/server/routes/executorPhaseAIssuerRedemptions.d.ts +11 -0
  89. package/dist/server/routes/executorPhaseAIssuerRedemptions.js +24 -0
  90. package/dist/server/routes/githubReviewEvidence.d.ts +19 -0
  91. package/dist/server/routes/githubReviewEvidence.js +116 -0
  92. package/dist/server/routes/localService.d.ts +15 -4
  93. package/dist/server/routes/localService.js +136 -40
  94. package/dist/server/routes/modelConnections.d.ts +24 -0
  95. package/dist/server/routes/modelConnections.js +205 -0
  96. package/dist/server/routes/shared.d.ts +19 -0
  97. package/dist/server/routes/shared.js +95 -19
  98. package/dist/server/routes/sync.js +1 -0
  99. package/dist/server/routes/syncAuxRoutes.js +5 -1
  100. package/dist/server/routes/syncPushRoutes.d.ts +1 -0
  101. package/dist/server/routes/syncPushRoutes.js +1 -0
  102. package/dist/server/routes/syncV3FeedRoutes.js +10 -1
  103. package/dist/server/routes/syncV3OperationRoutes.js +35 -9
  104. package/dist/server/routes/tasks.js +21 -2
  105. package/dist/server/routes/workflows.js +9 -1
  106. package/dist/server/routes.js +59 -0
  107. package/dist/services/codexAppServerModelGateway.d.ts +54 -5
  108. package/dist/services/codexAppServerModelGateway.js +246 -21
  109. package/dist/services/codexDeviceCodeLoginManager.d.ts +39 -0
  110. package/dist/services/codexDeviceCodeLoginManager.js +265 -0
  111. package/dist/services/codexModelProviderConnectionLifecycle.d.ts +8 -0
  112. package/dist/services/codexModelProviderConnectionLifecycle.js +73 -0
  113. package/dist/services/executorPhaseAApprovalRuntime.d.ts +14 -0
  114. package/dist/services/executorPhaseAApprovalRuntime.js +24 -0
  115. package/dist/services/executorPhaseAApprovalService.d.ts +40 -0
  116. package/dist/services/executorPhaseAApprovalService.js +609 -0
  117. package/dist/services/executorPhaseADriftEvaluator.d.ts +78 -0
  118. package/dist/services/executorPhaseADriftEvaluator.js +93 -0
  119. package/dist/services/executorPhaseAIssuerCore.d.ts +126 -0
  120. package/dist/services/executorPhaseAIssuerCore.js +295 -0
  121. package/dist/services/executorPhaseAIssuerRedemptionService.d.ts +34 -0
  122. package/dist/services/executorPhaseAIssuerRedemptionService.js +158 -0
  123. package/dist/services/githubReviewEvidenceRuntime.d.ts +14 -0
  124. package/dist/services/githubReviewEvidenceRuntime.js +30 -0
  125. package/dist/services/githubReviewEvidenceService.d.ts +93 -0
  126. package/dist/services/githubReviewEvidenceService.js +336 -0
  127. package/dist/services/modelGateway.d.ts +7 -0
  128. package/dist/services/modelProviderConnectionService.d.ts +71 -0
  129. package/dist/services/modelProviderConnectionService.js +279 -0
  130. package/dist/services/modelProviderCredentialHome.d.ts +32 -0
  131. package/dist/services/modelProviderCredentialHome.js +271 -0
  132. package/dist/services/ownerScopedModelConnectionGateway.d.ts +12 -0
  133. package/dist/services/ownerScopedModelConnectionGateway.js +30 -0
  134. package/dist/services/taskforceAgentConnectionBindingService.d.ts +66 -0
  135. package/dist/services/taskforceAgentConnectionBindingService.js +185 -0
  136. package/dist/services/taskforceAgentMcpBridge.d.ts +1 -1
  137. package/dist/services/taskforceAgentMcpBridge.js +7 -24
  138. package/dist/shared/adminEdgeProxy.d.ts +5 -0
  139. package/dist/shared/adminEdgeProxy.js +94 -0
  140. package/dist/shared/adminProxySessionCookies.d.ts +16 -0
  141. package/dist/shared/adminProxySessionCookies.js +86 -0
  142. package/dist/shared/aiProfileColors.d.ts +31 -1
  143. package/dist/shared/aiProfileColors.js +14 -6
  144. package/dist/shared/executorPhaseAApprovalGoldenVector.json +269 -0
  145. package/dist/shared/executorPhaseAApprovalReceipt.d.ts +112 -0
  146. package/dist/shared/executorPhaseAApprovalReceipt.js +58 -0
  147. package/dist/shared/executorPhaseAApprovalTrustPolicy.json +10 -0
  148. package/dist/shared/executorPhaseADriftContracts.d.ts +37 -0
  149. package/dist/shared/executorPhaseADriftContracts.js +63 -0
  150. package/dist/shared/executorPhaseAIssuerContracts.d.ts +75 -0
  151. package/dist/shared/executorPhaseAIssuerContracts.js +90 -0
  152. package/dist/shared/executorPhaseARunAuthorization.d.ts +120 -0
  153. package/dist/shared/executorPhaseARunAuthorization.js +232 -0
  154. package/dist/shared/executorPhaseASchemaValidation.d.ts +7 -0
  155. package/dist/shared/executorPhaseASchemaValidation.js +53 -0
  156. package/dist/shared/executorPhaseASchemas/approval-receipt.schema.json +106 -0
  157. package/dist/shared/executorPhaseASchemas/drift-attestation.schema.json +54 -0
  158. package/dist/shared/executorPhaseASchemas/drift-request.schema.json +47 -0
  159. package/dist/shared/executorPhaseASchemas/foundation-manifest.schema.json +29 -0
  160. package/dist/shared/executorPhaseASchemas/issuer-audit-record.schema.json +24 -0
  161. package/dist/shared/executorPhaseASchemas/issuer-proof.schema.json +43 -0
  162. package/dist/shared/executorPhaseASchemas/issuer-redemption-request.schema.json +18 -0
  163. package/dist/shared/executorPhaseASchemas/issuer-redemption-response.schema.json +39 -0
  164. package/dist/shared/executorPhaseASchemas/logical-envelope.schema.json +149 -0
  165. package/dist/shared/executorPhaseASchemas/preflight-report.schema.json +216 -0
  166. package/dist/shared/executorPhaseASchemas/run-capability.schema.json +111 -0
  167. package/dist/shared/executorPhaseASchemas/sender-proof.schema.json +37 -0
  168. package/dist/shared/executorPhaseASchemas/workload-grant.schema.json +68 -0
  169. package/dist/shared/executorPhaseASchemas/workload-jwt-claims.schema.json +67 -0
  170. package/dist/shared/executorPhaseATiming.d.ts +1 -0
  171. package/dist/shared/executorPhaseATiming.js +1 -0
  172. package/dist/shared/planningIdentity.js +1 -1
  173. package/dist/shared/productLogoKeys.d.ts +2 -0
  174. package/dist/shared/productLogoKeys.js +18 -0
  175. package/dist/shared/taskforceAgentDefinition.d.ts +0 -1
  176. package/dist/shared/taskforceAgentDefinition.js +6 -9
  177. package/dist/shared/taskforceAgentModels.js +7 -3
  178. package/dist/shared/userFeatureGrants.d.ts +4 -0
  179. package/dist/shared/userFeatureGrants.js +7 -0
  180. package/dist/storage/executorPhaseAApprovalReceiptStore.d.ts +37 -0
  181. package/dist/storage/executorPhaseAApprovalReceiptStore.js +81 -0
  182. package/dist/storage/executorPhaseARunAuthorizationStore.d.ts +103 -0
  183. package/dist/storage/executorPhaseARunAuthorizationStore.js +492 -0
  184. package/dist/storage/githubReviewEvidenceInstallationStore.d.ts +26 -0
  185. package/dist/storage/githubReviewEvidenceInstallationStore.js +89 -0
  186. package/dist/storage/modelProviderConnectionStore.d.ts +99 -0
  187. package/dist/storage/modelProviderConnectionStore.js +446 -0
  188. package/dist/storage/postgresAdapter.d.ts +4 -0
  189. package/dist/storage/postgresAdapter.js +11 -0
  190. package/dist/storage/postgresWorker.js +9 -1
  191. package/dist/storage/postgresWorkerProtocol.d.ts +1 -0
  192. package/dist/storage/taskforceAgentConnectionBindingStore.d.ts +31 -0
  193. package/dist/storage/taskforceAgentConnectionBindingStore.js +84 -0
  194. package/dist/sync/coordinator/localSyncExecutionPermitStore.js +60 -29
  195. package/dist/sync/coordinator/localWorkspaceSyncPendingV2PushProgress.d.ts +10 -0
  196. package/dist/sync/coordinator/localWorkspaceSyncPendingV2PushProgress.js +29 -0
  197. package/dist/sync/coordinator/localWorkspaceSyncRunnerState.d.ts +15 -1
  198. package/dist/sync/coordinator/localWorkspaceSyncRunnerState.js +99 -2
  199. package/dist/sync/coordinator/workspaceSyncCredentialBroker.d.ts +1 -0
  200. package/dist/sync/coordinator/workspaceSyncCredentialBroker.js +33 -4
  201. package/dist/sync/engine/workspaceSyncContentLifecycleAdapter.d.ts +2 -1
  202. package/dist/sync/engine/workspaceSyncContentVersionStore.d.ts +38 -0
  203. package/dist/sync/engine/workspaceSyncContentVersionStore.js +50 -1
  204. package/dist/sync/engine/workspaceSyncEngineLifecyclePolicy.js +6 -6
  205. package/dist/sync/engine/workspaceSyncEnginePushCompletion.d.ts +14 -0
  206. package/dist/sync/engine/workspaceSyncEnginePushCompletion.js +84 -0
  207. package/dist/sync/engine/workspaceSyncEngineRecovery.js +1 -0
  208. package/dist/sync/engine/workspaceSyncEngineRuntime.d.ts +1 -0
  209. package/dist/sync/engine/workspaceSyncEngineRuntime.js +1 -0
  210. package/dist/sync/engine/workspaceSyncEngineServerRunnerOperations.js +112 -38
  211. package/dist/sync/engine/workspaceSyncEngineServerSnapshotReader.js +6 -0
  212. package/dist/sync/engine/workspaceSyncEngineTransfers.js +3 -1
  213. package/dist/sync/engine/workspaceSyncV2ChangeDispatcher.d.ts +1 -0
  214. package/dist/sync/engine/workspaceSyncV2ChangeDispatcher.js +29 -0
  215. package/dist/sync/syncApplyHandlers.d.ts +2 -0
  216. package/dist/sync/syncApplyHandlers.js +10 -1
  217. package/dist/sync/syncService.d.ts +15 -0
  218. package/dist/sync/syncService.js +83 -18
  219. package/dist/sync/taskforceAgentSyncAuthorization.d.ts +16 -0
  220. package/dist/sync/taskforceAgentSyncAuthorization.js +20 -0
  221. package/dist/sync/v3/combinedFeedCapability.js +4 -0
  222. package/dist/sync/v3/durableInitiativeMutationRouter.js +18 -10
  223. package/dist/sync/v3/durableOperationReplay.d.ts +14 -0
  224. package/dist/sync/v3/durableOperationReplay.js +18 -0
  225. package/dist/sync/v3/durableTaskAttachmentLinksMutationRouter.js +3 -0
  226. package/dist/sync/v3/durableTaskChecklistMutationRouter.d.ts +2 -1
  227. package/dist/sync/v3/durableTaskChecklistMutationRouter.js +58 -15
  228. package/dist/sync/v3/durableTaskCommentMutationRouter.js +3 -0
  229. package/dist/sync/v3/durableTaskHttpRootMutationRouter.d.ts +1 -1
  230. package/dist/sync/v3/durableTaskHttpRootMutationRouter.js +10 -0
  231. package/dist/sync/v3/durableTaxonomyMutationRouter.js +5 -0
  232. package/dist/sync/v3/durableWorkflowRuntimeMutationRouter.d.ts +11 -0
  233. package/dist/sync/v3/durableWorkflowRuntimeMutationRouter.js +39 -10
  234. package/dist/sync/v3/durableWorkstreamMutationRouter.js +18 -10
  235. package/dist/sync/v3/durableWorkstreamTaskOrderMutationRouter.js +16 -5
  236. package/dist/sync/v3/localOutboxDispatchRuntime.js +2 -2
  237. package/dist/sync/v3/localTaskChecklistOutboxHandler.js +16 -2
  238. package/dist/sync/v3/localTaskChecklistOutboxService.d.ts +4 -0
  239. package/dist/sync/v3/localTaskChecklistOutboxService.js +14 -1
  240. package/dist/sync/v3/localTaskStatusOutboxService.d.ts +8 -0
  241. package/dist/sync/v3/localTaskStatusOutboxService.js +219 -12
  242. package/dist/sync/v3/syncDurabilityStore.d.ts +34 -0
  243. package/dist/sync/v3/syncDurabilityStore.js +168 -2
  244. package/dist/sync/v3/taskChecklistMutationService.d.ts +11 -0
  245. package/dist/sync/v3/taskChecklistMutationService.js +44 -1
  246. package/dist/sync/v3/taskStatusMutationService.d.ts +29 -1
  247. package/dist/sync/v3/taskStatusMutationService.js +119 -3
  248. package/dist/sync/v3/workflowAssignmentSync.d.ts +5 -0
  249. package/dist/sync/v3/workflowAssignmentSync.js +27 -0
  250. package/dist/sync/v3/workspaceSyncJournalReader.js +1 -1
  251. package/dist/sync/v3/workspaceSyncOperationRetentionService.d.ts +16 -0
  252. package/dist/sync/v3/workspaceSyncOperationRetentionService.js +83 -0
  253. package/dist/sync/v3/workspaceSyncV3CloudOperationHandler.d.ts +1 -0
  254. package/dist/sync/v3/workspaceSyncV3CloudOperationHandler.js +9 -2
  255. package/dist/sync/v3/workspaceSyncV3CombinedRepairBaseline.d.ts +7 -0
  256. package/dist/sync/v3/workspaceSyncV3CombinedRepairBaseline.js +44 -32
  257. package/dist/sync/v3/workspaceSyncV3CombinedRepairMaterialization.d.ts +9 -5
  258. package/dist/sync/v3/workspaceSyncV3CombinedRepairMaterialization.js +54 -38
  259. package/dist/sync/v3/workspaceSyncV3CombinedRepairSnapshot.d.ts +10 -0
  260. package/dist/sync/v3/workspaceSyncV3CombinedRepairSnapshot.js +70 -31
  261. package/dist/sync/v3/workspaceSyncV3CombinedWireContract.d.ts +2 -1
  262. package/dist/sync/v3/workspaceSyncV3CombinedWireContract.js +16 -0
  263. package/dist/sync/v3/workspaceSyncV3CoverageRegistry.js +6 -0
  264. package/dist/sync/v3/workspaceSyncV3OperationProtocol.d.ts +3 -0
  265. package/dist/sync/v3/workspaceSyncV3OperatorDiagnostics.d.ts +5 -0
  266. package/dist/sync/v3/workspaceSyncV3OperatorDiagnostics.js +36 -2
  267. package/dist/sync/v3/workspaceSyncV3RepairSnapshotRetentionService.d.ts +17 -0
  268. package/dist/sync/v3/workspaceSyncV3RepairSnapshotRetentionService.js +64 -0
  269. package/dist/sync/v3/workspaceSyncV3WorkflowTaskCoverCoverage.d.ts +7 -0
  270. package/dist/sync/v3/workspaceSyncV3WorkflowTaskCoverCoverage.js +33 -0
  271. package/dist/sync/v3/workspaceSyncV3WorkflowTaskCoverWireContract.d.ts +7 -0
  272. package/dist/sync/v3/workspaceSyncV3WorkflowTaskCoverWireContract.js +8 -0
  273. package/dist/sync/workspaceRepair.d.ts +5 -2
  274. package/dist/sync/workspaceRepair.js +161 -6
  275. package/dist/sync/workspaceSyncModel.d.ts +21 -0
  276. package/dist/sync/workspaceSyncModel.js +35 -7
  277. package/dist/sync/workspaceSyncState.d.ts +1 -0
  278. package/dist/sync/workspaceSyncV2SnapshotBuilder.d.ts +6 -0
  279. package/dist/sync/workspaceSyncV2SnapshotBuilder.js +5 -0
  280. package/dist/ui/assets/AiIdentityRosterCard-OcSz1PkK.js +1 -0
  281. package/dist/ui/assets/AiProfilesModule-ByhYW5Xi.js +1 -0
  282. package/dist/ui/assets/{AnnotatedAttachmentWorkspace-B68Wg-RV.js → AnnotatedAttachmentWorkspace-BTM6nIg_.js} +1 -1
  283. package/dist/ui/assets/{AssetTraySortControl-C8Rztyal.js → AssetTraySortControl-DabEG8L4.js} +1 -1
  284. package/dist/ui/assets/{ContextAttachmentManager-Cj3c7X9y.js → ContextAttachmentManager-Coa8yVGM.js} +1 -1
  285. package/dist/ui/assets/{DocumentWorkspace-B5uvzems.js → DocumentWorkspace-BB0qhdix.js} +1 -1
  286. package/dist/ui/assets/{EntityActivityTimeline-BVFvCB5R.js → EntityActivityTimeline-CZ8x4UJE.js} +1 -1
  287. package/dist/ui/assets/{PlanningModule-B5DWQOGz.js → PlanningModule-pRPjR7v5.js} +1 -1
  288. package/dist/ui/assets/{PlansPage-AY4cGWco.js → PlansPage-D86pZSSl.js} +1 -1
  289. package/dist/ui/assets/{TaskContextUpload-DZxTVesW.js → TaskContextUpload-BVIkU9yT.js} +1 -1
  290. package/dist/ui/assets/TaskSettings-Cv1mNhv_.js +12 -0
  291. package/dist/ui/assets/TaskforceAgentsModule-b-8R25cJ.css +1 -0
  292. package/dist/ui/assets/TaskforceAgentsModule-gmH-PD2q.js +24 -0
  293. package/dist/ui/assets/{WorkflowManagerModule-DEr5di_r.js → WorkflowManagerModule-DbfnHJ-f.js} +1 -1
  294. package/dist/ui/assets/index-BZ-hdZSk.css +1 -0
  295. package/dist/ui/assets/index-CTsDBaef.js +7 -0
  296. package/dist/ui/assets/{vendor-icons-D9Lpw-j4.js → vendor-icons-Bsq-mcEn.js} +1 -1
  297. package/dist/ui/branding/logos/letterhead_dark.png +0 -0
  298. package/dist/ui/branding/logos/letterhead_light.png +0 -0
  299. package/dist/ui/branding/logos/signature_dark.png +0 -0
  300. package/dist/ui/branding/logos/signature_light.png +0 -0
  301. package/dist/ui/index.html +3 -3
  302. package/dist/utils/aiProfileDefaultLogo.js +16 -48
  303. package/dist/utils/httpSetCookie.d.ts +1 -0
  304. package/dist/utils/httpSetCookie.js +4 -1
  305. package/dist/utils/localRuntimeUrl.d.ts +1 -0
  306. package/dist/utils/localRuntimeUrl.js +14 -0
  307. package/dist/utils/productLogoRegistry.d.ts +2 -0
  308. package/dist/utils/productLogoRegistry.js +36 -0
  309. package/dist/utils/syncStatusPresentation.d.ts +4 -0
  310. package/dist/utils/syncStatusPresentation.js +17 -0
  311. package/dist/utils/taskEvents.d.ts +2 -0
  312. package/dist/utils/workspaceSyncPresentation.d.ts +1 -1
  313. package/dist/utils/workspaceSyncPresentation.js +23 -17
  314. package/package.json +22 -4
  315. package/dist/ui/assets/AiIdentityRosterCard-BZM4aQnM.js +0 -1
  316. package/dist/ui/assets/AiProfilesModule-BbAEWtHH.js +0 -1
  317. package/dist/ui/assets/TaskSettings-BeWAuyZj.js +0 -12
  318. package/dist/ui/assets/TaskforceAgentsModule-BifCYtjR.js +0 -21
  319. package/dist/ui/assets/TaskforceAgentsModule-D6IC0S7Q.css +0 -1
  320. package/dist/ui/assets/index-I5zhdtgt.js +0 -7
  321. package/dist/ui/assets/index-VRFsx3wz.css +0 -1
@@ -21,6 +21,7 @@
21
21
  * GET /api/taskforce/admin/collaboration-telemetry
22
22
  * PATCH /api/taskforce/admin/system-users/:id/disable
23
23
  * PATCH /api/taskforce/admin/system-users/:id/beta-access
24
+ * PATCH /api/taskforce/admin/system-users/:id/feature-grants/:featureKey
24
25
  * PATCH /api/taskforce/admin/system-users/:id/verify-email
25
26
  * GET/POST /api/taskforce/admin/email-settings
26
27
  * GET /api/taskforce/admin/email-settings/health
@@ -48,14 +49,17 @@
48
49
  * GET/POST /oauth/mcp/authorize
49
50
  * POST /oauth/mcp/token
50
51
  * GET/POST /api/taskforce/settings/mcp/tokens (+ revoke, regenerate)
52
+ * PATCH /api/taskforce/settings/mcp/tokens/:id/tool-profile
51
53
  * GET /api/taskforce/settings/mcp/connectors
52
54
  * POST /api/taskforce/settings/mcp/connectors/:id/disconnect
55
+ * PATCH /api/taskforce/settings/mcp/connectors/:id/tool-profile
53
56
  * POST /api/taskforce/settings/mcp/test-connection
54
57
  */
55
58
  import * as fs from 'fs';
56
59
  import * as path from 'path';
57
60
  import { TaskforceRuleError } from '../../core/Taskforce.js';
58
61
  import { classifyMcpOAuthClientProduct } from '../../mcp/clientRegistry.js';
62
+ import { getCloudMcpToolProfileMembership } from '../../mcp/toolProfiles.js';
59
63
  import { escapeHtml, formatApiErrorResponse, parseFormBody, parseJsonBody } from './primitives.js';
60
64
  import { resolveRequestAccess } from '../auth.js';
61
65
  import { sendEmail } from '../email.js';
@@ -70,19 +74,27 @@ import { randomUUID } from 'crypto';
70
74
  import { resolveDeploymentConfig } from '../../config/deployment.js';
71
75
  import { getTaskforceCloudEnvironmentConfig, resolveTaskforceCloudEnvironmentFromBaseUrl, resolveTaskforceMcpBaseUrlFromBaseUrl } from '../../config/cloudEnvironment.js';
72
76
  import { makeHandleCloudMcpRequest, resolveErrorStatusCode } from './shared.js';
77
+ import * as mcpRuntime from '../../mcp/runtime.js';
73
78
  import { buildAuthBehavior, buildSiteBehavior, getRouteEmailConfig, resolvePublicAuthBaseUrl, resolveRuntimeConfigBaseUrl, } from './authSupport.js';
74
79
  import { applyWorkspaceRepair, scanWorkspaceRepair } from '../../sync/workspaceRepair.js';
75
80
  import { testMintAppleClientSecret } from '../auth/providers/appleClientSecret.js';
76
81
  import { isAiProfileAvatarStorageKey } from '../../utils/aiProfileAvatarPaths.js';
82
+ import { WorkspaceSyncContentPullObligationStore } from '../../sync/engine/workspaceSyncContentPullObligationStore.js';
83
+ import { isSupportedInternalUserFeatureKey } from '../../shared/userFeatureGrants.js';
77
84
  const PRICING_PAGE_DESCRIPTION_MAX_LENGTH = 2000;
78
85
  const OPENAI_APPS_CHALLENGE_TOKEN = 'o9iBeJDuKPMtnKm5-B8OROga3bWDkJS6PBIg6JT9Izs';
79
86
  // === SECTION: Registration ===
80
87
  export function registerAdminRoutes(deps) {
81
- const { addRoute, core, context, requestWorkspaceId, requestUserId, requestRole, ensureAppAccess, ensureAdminRole, ensureCloudPlanData, requireCloudRuntime, resolveAuthenticatedUserId, resolveAdminRequestActor, auditAdminAction, resolveEffectiveObjectStorageConfig, getObjectStorageClient, taskAssetStore, publishedContentResolver, normalizeDocumentPathInput, ensureWithinDir, getAssetMetadata, markAssetDeleted, clearAssetDeleted, removeAssetMetadata, getStorageTelemetry, appendStorageTelemetry, getStorageIntegrityHistory, appendStorageIntegrityHistory, getDocumentPurgeHistory, appendDocumentPurgeHistory, getCollaborationTelemetry, isCollaborationPolicyEnabled, normalizeMcpOauthScopeString, MCP_TOKEN_SCOPE_VALUES, MCP_WRITE_RATE_LIMIT_ENABLED, MCP_WRITE_RATE_LIMIT_ACTOR_MAX_REQUESTS, MCP_WRITE_RATE_LIMIT_WORKSPACE_MAX_REQUESTS, MCP_WRITE_RATE_LIMIT_WINDOW_MS, } = deps;
88
+ const { addRoute, core, context, requestWorkspaceId, requestUserId, requestRole, ensureAppAccess, ensureAdminRole, ensureWorkspaceAdminRole, ensureCloudPlanData, requireCloudRuntime, resolveAuthenticatedUserId, resolveAdminRequestActor, auditAdminAction, resolveEffectiveObjectStorageConfig, getObjectStorageClient, taskAssetStore, publishedContentResolver, normalizeDocumentPathInput, ensureWithinDir, getAssetMetadata, markAssetDeleted, clearAssetDeleted, removeAssetMetadata, getStorageTelemetry, appendStorageTelemetry, getStorageIntegrityHistory, appendStorageIntegrityHistory, getDocumentPurgeHistory, appendDocumentPurgeHistory, getCollaborationTelemetry, isCollaborationPolicyEnabled, normalizeMcpOauthScopeString, MCP_TOKEN_SCOPE_VALUES, MCP_WRITE_RATE_LIMIT_ENABLED, MCP_WRITE_RATE_LIMIT_ACTOR_MAX_REQUESTS, MCP_WRITE_RATE_LIMIT_WORKSPACE_MAX_REQUESTS, MCP_WRITE_RATE_LIMIT_WINDOW_MS, } = deps;
82
89
  const baseVirusScanConfig = resolveVirusScanConfigFromEnv(process.env);
83
90
  const workspaceAssetStore = typeof core.getDatabaseAdapter === 'function' && typeof core.getTenantId === 'function'
84
91
  ? new WorkspaceAssetStore(core.getDatabaseAdapter(), core.getTenantId())
85
92
  : null;
93
+ const mcpToolProfileOptions = ['default', 'extended'].map((id) => ({
94
+ id,
95
+ label: id === 'extended' ? 'All cloud tools' : 'Standard',
96
+ toolCount: getCloudMcpToolProfileMembership(id).length,
97
+ }));
86
98
  const listReferencedAiProfileAvatarStorageKeys = (workspaceId) => {
87
99
  const referenced = new Set();
88
100
  const profiles = typeof core.listAiProfiles === 'function'
@@ -334,6 +346,8 @@ export function registerAdminRoutes(deps) {
334
346
  const handleCloudMcpRequest = makeHandleCloudMcpRequest(core, {
335
347
  ensureAppAccess,
336
348
  resolveAuthenticatedUserId,
349
+ // Keep the production factory unchanged while preserving the route-test injection seam.
350
+ createMcpServer: (options) => mcpRuntime.createTaskforceMcpServer(options),
337
351
  writeRateLimit: {
338
352
  enabled: MCP_WRITE_RATE_LIMIT_ENABLED,
339
353
  actorMaxRequests: MCP_WRITE_RATE_LIMIT_ACTOR_MAX_REQUESTS,
@@ -1039,6 +1053,42 @@ export function registerAdminRoutes(deps) {
1039
1053
  res.writeHead(200, { 'Content-Type': 'application/json' });
1040
1054
  res.end(JSON.stringify({ success: true }));
1041
1055
  });
1056
+ // PATCH /api/taskforce/admin/system-users/:id/feature-grants/:featureKey - Grant/revoke an internal user feature
1057
+ addRoute('PATCH', '/api/taskforce/admin/system-users/:id/feature-grants/:featureKey', async (req, res, params) => {
1058
+ if (!ensureAdminRole(req)) {
1059
+ res.writeHead(403, { 'Content-Type': 'application/json' });
1060
+ res.end(JSON.stringify({ error: 'Forbidden: system admin role required.' }));
1061
+ return;
1062
+ }
1063
+ if (!requireCloudRuntime(res, 'Internal user feature grants'))
1064
+ return;
1065
+ const featureKey = String(params.featureKey || '').trim();
1066
+ if (!isSupportedInternalUserFeatureKey(featureKey)) {
1067
+ res.writeHead(400, { 'Content-Type': 'application/json' });
1068
+ res.end(JSON.stringify({ error: 'Unsupported internal feature key.' }));
1069
+ return;
1070
+ }
1071
+ const body = await parseJsonBody(req);
1072
+ if (typeof body?.enabled !== 'boolean') {
1073
+ res.writeHead(400, { 'Content-Type': 'application/json' });
1074
+ res.end(JSON.stringify({ error: 'enabled must be a boolean.' }));
1075
+ return;
1076
+ }
1077
+ const actor = resolveAdminRequestActor(req);
1078
+ const success = core.setUserFeatureGrant(params.id, featureKey, body.enabled, actor.userId);
1079
+ if (!success) {
1080
+ res.writeHead(404, { 'Content-Type': 'application/json' });
1081
+ res.end(JSON.stringify({ error: 'User not found' }));
1082
+ return;
1083
+ }
1084
+ auditAdminAction(req, 'set-user-feature-grant', {
1085
+ targetUserId: params.id,
1086
+ featureKey,
1087
+ enabled: body.enabled,
1088
+ });
1089
+ res.writeHead(200, { 'Content-Type': 'application/json' });
1090
+ res.end(JSON.stringify({ success: true, featureKey, enabled: body.enabled }));
1091
+ });
1042
1092
  // PATCH /api/taskforce/admin/system-users/:id/verify-email - Mark a user's email as verified
1043
1093
  addRoute('PATCH', '/api/taskforce/admin/system-users/:id/verify-email', async (req, res, params) => {
1044
1094
  if (!ensureAdminRole(req)) {
@@ -1954,6 +2004,7 @@ export function registerAdminRoutes(deps) {
1954
2004
  publishedContentResolver,
1955
2005
  repairMissingAssetLinks: true,
1956
2006
  repairMissingContentFiles: body?.repairMissingContentFiles === true,
2007
+ contentPullObligationStore: new WorkspaceSyncContentPullObligationStore(core.getDatabaseAdapter()),
1957
2008
  aiProfiles: typeof core.listAiProfiles === 'function'
1958
2009
  ? core.listAiProfiles(workspaceId, { includeArchived: true }) || []
1959
2010
  : [],
@@ -2751,7 +2802,7 @@ export function registerAdminRoutes(deps) {
2751
2802
  try {
2752
2803
  const result = core.listMcpAccessTokens({ userId, workspaceId: requestWorkspaceId(req), page, pageSize });
2753
2804
  res.writeHead(200, { 'Content-Type': 'application/json' });
2754
- res.end(JSON.stringify({ success: true, ...result }));
2805
+ res.end(JSON.stringify({ success: true, ...result, profileOptions: mcpToolProfileOptions }));
2755
2806
  }
2756
2807
  catch (error) {
2757
2808
  const statusCode = resolveErrorStatusCode(error);
@@ -2773,7 +2824,7 @@ export function registerAdminRoutes(deps) {
2773
2824
  try {
2774
2825
  const items = core.listMcpOAuthConnectorGrants({ userId, workspaceId: requestWorkspaceId(req), provider: provider || null });
2775
2826
  res.writeHead(200, { 'Content-Type': 'application/json' });
2776
- res.end(JSON.stringify({ success: true, items }));
2827
+ res.end(JSON.stringify({ success: true, items, profileOptions: mcpToolProfileOptions }));
2777
2828
  }
2778
2829
  catch (error) {
2779
2830
  const statusCode = resolveErrorStatusCode(error);
@@ -2803,6 +2854,34 @@ export function registerAdminRoutes(deps) {
2803
2854
  res.end(JSON.stringify({ success: false, error: error.message, code: error?.code || 'MCP_CONNECTOR_DISCONNECT_FAILED' }));
2804
2855
  }
2805
2856
  });
2857
+ addRoute('PATCH', '/api/taskforce/settings/mcp/connectors/:id/tool-profile', async (req, res, params) => {
2858
+ if (!ensureAppAccess(req, res))
2859
+ return;
2860
+ const userId = resolveAuthenticatedUserId(req);
2861
+ if (!userId || userId === 'anonymous') {
2862
+ res.writeHead(401, { 'Content-Type': 'application/json' });
2863
+ res.end(JSON.stringify({ success: false, error: 'Authentication required.' }));
2864
+ return;
2865
+ }
2866
+ const wid = requestWorkspaceId(req);
2867
+ if (!ensureWorkspaceAdminRole(req, wid)) {
2868
+ res.writeHead(403, { 'Content-Type': 'application/json' });
2869
+ res.end(JSON.stringify({ success: false, error: 'Workspace owner or admin access is required.', code: 'MCP_TOOL_PROFILE_ADMIN_REQUIRED' }));
2870
+ return;
2871
+ }
2872
+ const body = await parseJsonBody(req);
2873
+ try {
2874
+ const updated = core.updateMcpOAuthConnectorGrantToolProfile({ actorUserId: userId, workspaceId: wid, grantId: params.id, toolProfile: body?.toolProfile });
2875
+ core.addAdminAuditLog({ action: 'mcp.connector.tool_profile.update', actorUserId: userId, actorRole: requestRole(req), workspaceId: wid, details: { grantId: updated.record.id, provider: updated.record.provider, clientId: updated.record.clientId, previousToolProfile: updated.previousToolProfile, toolProfile: updated.record.toolProfile } });
2876
+ res.writeHead(200, { 'Content-Type': 'application/json' });
2877
+ res.end(JSON.stringify({ success: true, record: updated.record }));
2878
+ }
2879
+ catch (error) {
2880
+ const statusCode = resolveErrorStatusCode(error);
2881
+ res.writeHead(statusCode, { 'Content-Type': 'application/json' });
2882
+ res.end(JSON.stringify({ success: false, error: error.message, code: error?.code || 'MCP_CONNECTOR_TOOL_PROFILE_UPDATE_FAILED' }));
2883
+ }
2884
+ });
2806
2885
  addRoute('POST', '/api/taskforce/settings/mcp/tokens', async (req, res) => {
2807
2886
  if (!ensureAppAccess(req, res))
2808
2887
  return;
@@ -2884,6 +2963,34 @@ export function registerAdminRoutes(deps) {
2884
2963
  res.end(JSON.stringify({ success: false, error: error.message, code: error?.code || 'MCP_TOKEN_REGENERATE_FAILED' }));
2885
2964
  }
2886
2965
  });
2966
+ addRoute('PATCH', '/api/taskforce/settings/mcp/tokens/:id/tool-profile', async (req, res, params) => {
2967
+ if (!ensureAppAccess(req, res))
2968
+ return;
2969
+ const userId = resolveAuthenticatedUserId(req);
2970
+ if (!userId || userId === 'anonymous') {
2971
+ res.writeHead(401, { 'Content-Type': 'application/json' });
2972
+ res.end(JSON.stringify({ success: false, error: 'Authentication required.' }));
2973
+ return;
2974
+ }
2975
+ const wid = requestWorkspaceId(req);
2976
+ if (!ensureWorkspaceAdminRole(req, wid)) {
2977
+ res.writeHead(403, { 'Content-Type': 'application/json' });
2978
+ res.end(JSON.stringify({ success: false, error: 'Workspace owner or admin access is required.', code: 'MCP_TOOL_PROFILE_ADMIN_REQUIRED' }));
2979
+ return;
2980
+ }
2981
+ const body = await parseJsonBody(req);
2982
+ try {
2983
+ const updated = core.updateMcpAccessTokenToolProfile({ actorUserId: userId, workspaceId: wid, tokenId: params.id, toolProfile: body?.toolProfile });
2984
+ core.addAdminAuditLog({ action: 'mcp.token.tool_profile.update', actorUserId: userId, actorRole: requestRole(req), workspaceId: wid, details: { tokenId: updated.record.id, previousToolProfile: updated.previousToolProfile, toolProfile: updated.record.toolProfile } });
2985
+ res.writeHead(200, { 'Content-Type': 'application/json' });
2986
+ res.end(JSON.stringify({ success: true, record: updated.record }));
2987
+ }
2988
+ catch (error) {
2989
+ const statusCode = resolveErrorStatusCode(error);
2990
+ res.writeHead(statusCode, { 'Content-Type': 'application/json' });
2991
+ res.end(JSON.stringify({ success: false, error: error.message, code: error?.code || 'MCP_TOKEN_TOOL_PROFILE_UPDATE_FAILED' }));
2992
+ }
2993
+ });
2887
2994
  addRoute('POST', '/api/taskforce/settings/mcp/test-connection', async (req, res) => {
2888
2995
  if (!ensureAppAccess(req, res))
2889
2996
  return;
@@ -2949,6 +3056,8 @@ export function registerAdminRoutes(deps) {
2949
3056
  workspaceId: wid,
2950
3057
  workspaceName: String(workspace?.name || wid),
2951
3058
  scopes: inspection.scopes,
3059
+ toolProfile: inspection.toolProfile,
3060
+ toolCount: getCloudMcpToolProfileMembership(inspection.toolProfile, inspection.scopes).length,
2952
3061
  requiredScopes,
2953
3062
  endpoint: probe.endpoint,
2954
3063
  serverName: probe.serverName,
@@ -6,6 +6,9 @@
6
6
  * POST /api/taskforce/agents
7
7
  * PATCH /api/taskforce/agents/:agentId
8
8
  * DELETE /api/taskforce/agents/:agentId
9
+ * GET /api/taskforce/agents/:agentId/connection-binding
10
+ * PUT /api/taskforce/agents/:agentId/connection-binding
11
+ * DELETE /api/taskforce/agents/:agentId/connection-binding
9
12
  * GET /api/taskforce/agents/:agentId/conversations
10
13
  * POST /api/taskforce/agents/:agentId/conversation/new
11
14
  * POST /api/taskforce/agents/model-gateway/test
@@ -13,6 +16,7 @@
13
16
  */
14
17
  import type { IncomingMessage, ServerResponse } from 'http';
15
18
  import type { TaskforceCore } from '../../core/Taskforce.js';
19
+ import { ModelProviderConnectionService } from '../../services/modelProviderConnectionService.js';
16
20
  import { saveAiProfileAvatarAssets, type AiProfileAvatarAssetDeps } from '../aiProfileAvatarAssets.js';
17
21
  import type { ModelGateway, ModelGatewaySelection } from '../../services/modelGateway.js';
18
22
  import { type TaskforceAgentAvatarImageProvider } from '../../services/taskforceAgentAvatarImageProvider.js';
@@ -20,6 +24,7 @@ import { type PreparedTaskforceAgentMcpBridge, type PrepareTaskforceAgentMcpBrid
20
24
  import { TaskforceAgentConversationStore } from '../../storage/taskforceAgentConversationStore.js';
21
25
  import { TaskforceAgentStore } from '../../storage/taskforceAgentStore.js';
22
26
  import { TaskforceAgentSkillStore } from '../../storage/taskforceAgentSkillStore.js';
27
+ import { TaskforceAgentConnectionBindingService } from '../../services/taskforceAgentConnectionBindingService.js';
23
28
  import { type TaskforceAgentRuntimeReferenceResolvers } from '../../shared/taskforceAgentRuntimeResolution.js';
24
29
  import { type RouteHandler } from './primitives.js';
25
30
  type SaveAiProfileAvatarAssets = typeof saveAiProfileAvatarAssets;
@@ -35,6 +40,8 @@ export interface AgentsRouteDependencies {
35
40
  agentStore?: TaskforceAgentStore;
36
41
  skillStore?: TaskforceAgentSkillStore;
37
42
  conversationStore?: TaskforceAgentConversationStore;
43
+ connectionBindingService?: Pick<TaskforceAgentConnectionBindingService, 'inspect' | 'bind' | 'clear' | 'resolveSaved' | 'resolveDraft'>;
44
+ modelConnectionService?: Pick<ModelProviderConnectionService, 'assertReady' | 'withConnectionLease'>;
38
45
  createModelGateway?: (selection?: ModelGatewaySelection) => ModelGateway;
39
46
  prepareMcpBridge?: (input: PrepareTaskforceAgentMcpBridgeInput) => Promise<PreparedTaskforceAgentMcpBridge | null>;
40
47
  agentRuntimeReferenceResolvers?: TaskforceAgentRuntimeReferenceResolvers;