@taskforcehq/taskforce 0.3.327 → 0.3.328
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/dist/Taskforce.module.css +24 -53
- package/dist/components/activity/EntityActivityTimeline.js +15 -5
- package/dist/components/context/AttachmentPreviewHost.js +1 -1
- package/dist/components/context/ContextAttachmentManager.d.ts +3 -0
- package/dist/components/context/ContextAttachmentManager.js +116 -20
- package/dist/components/features/planning/PlanningEntitySummary.d.ts +3 -1
- package/dist/components/features/planning/PlanningEntitySummary.js +3 -2
- package/dist/components/features/planning/PlanningLinkPicker.d.ts +3 -1
- package/dist/components/features/planning/PlanningLinkPicker.js +5 -3
- package/dist/components/features/planning/PlanningModule.js +26 -9
- package/dist/components/features/planning/PlanningVisualIdentity.d.ts +14 -0
- package/dist/components/features/planning/PlanningVisualIdentity.js +106 -0
- package/dist/components/features/planning/planningWorkspaceModel.d.ts +11 -0
- package/dist/components/task/TaskActionHeader.d.ts +2 -1
- package/dist/components/task/TaskActionHeader.js +2 -2
- package/dist/components/task/TaskCard.js +37 -4
- package/dist/components/task/TaskContextUpload.d.ts +3 -0
- package/dist/components/task/TaskContextUpload.js +2 -2
- package/dist/components/task/TaskForm.d.ts +4 -0
- package/dist/components/task/TaskForm.js +32 -7
- package/dist/components/task/TaskImageReviews.js +16 -16
- package/dist/components/task/TaskStatusActions.js +11 -2
- package/dist/components/task/TaskWorkstreamPicker.js +2 -1
- package/dist/components/ui/DocumentTypeIcon.d.ts +7 -0
- package/dist/components/ui/DocumentTypeIcon.js +8 -0
- package/dist/components/ui/TaxonomyDropdown.d.ts +9 -1
- package/dist/components/ui/TaxonomyDropdown.js +30 -3
- package/dist/components/views/StandaloneLayout.js +62 -9
- package/dist/components/views/WidgetView.js +8 -5
- package/dist/components/views/panels/PlanningDrawer.d.ts +7 -1
- package/dist/components/views/panels/PlanningDrawer.js +48 -44
- package/dist/config/envSchema.js +1 -0
- package/dist/config/localServiceCloudTarget.d.ts +10 -0
- package/dist/config/localServiceCloudTarget.js +76 -0
- package/dist/core/AiProfileService.d.ts +1 -0
- package/dist/core/AiProfileService.js +2 -1
- package/dist/core/AttachmentLinkService.js +7 -4
- package/dist/core/DeletedTaskLifecycleService.d.ts +4 -0
- package/dist/core/DeletedTaskLifecycleService.js +21 -0
- package/dist/core/McpTokenService.d.ts +4 -0
- package/dist/core/McpTokenService.js +52 -0
- package/dist/core/TaskAttachmentLinksDurableMutationService.d.ts +5 -0
- package/dist/core/TaskAttachmentLinksDurableMutationService.js +20 -11
- package/dist/core/Taskforce.d.ts +63 -1
- package/dist/core/Taskforce.js +558 -73
- package/dist/core/types.d.ts +2 -1
- package/dist/documentReviews/DocumentReviewCommentStore.d.ts +11 -0
- package/dist/documentReviews/DocumentReviewCommentStore.js +35 -2
- package/dist/documentReviews/service.d.ts +4 -0
- package/dist/documentReviews/service.js +141 -46
- package/dist/hooks/tasks/useTaskFormActions.d.ts +3 -0
- package/dist/hooks/tasks/useTaskFormActions.js +33 -7
- package/dist/hooks/useTaskforce.d.ts +59 -50
- package/dist/hooks/useTaskforce.js +103 -1
- package/dist/mcp/canonicalAssetHelpers.d.ts +13 -0
- package/dist/mcp/canonicalAssetHelpers.js +39 -5
- package/dist/mcp/collaborationRegistrar.js +15 -13
- package/dist/mcp/documentAssetRegistrar.js +16 -9
- package/dist/mcp/localServiceProxy.js +4 -1
- package/dist/mcp/runtime.d.ts +16 -0
- package/dist/mcp/runtime.js +566 -171
- package/dist/mcp/taskAttachmentCommandAdapter.d.ts +2 -0
- package/dist/mcp/taskAttachmentCommandAdapter.js +14 -8
- package/dist/mcp/taskPlanningRegistrar.js +42 -34
- package/dist/mcp/toolRegistry.js +2 -2
- package/dist/migrations/taskSchemaMigrations.js +35 -0
- package/dist/runtime/appGateDefinitions.d.ts +2 -2
- package/dist/runtime/appGateDefinitions.js +2 -2
- package/dist/server/appAccess.d.ts +12 -0
- package/dist/server/appAccess.js +21 -0
- package/dist/server/authorizedWorkspaceAccess.d.ts +12 -0
- package/dist/server/authorizedWorkspaceAccess.js +40 -0
- package/dist/server/cloudCollectionRead.d.ts +25 -0
- package/dist/server/cloudCollectionRead.js +120 -0
- package/dist/server/cloudCollectionReadPool.d.ts +52 -0
- package/dist/server/cloudCollectionReadPool.js +140 -0
- package/dist/server/cloudCollectionReadWorker.d.ts +1 -0
- package/dist/server/cloudCollectionReadWorker.js +36 -0
- package/dist/server/index.d.ts +3 -11
- package/dist/server/index.js +53 -40
- package/dist/server/localServiceLease.d.ts +3 -0
- package/dist/server/localServiceLease.js +9 -1
- package/dist/server/routes/documents.d.ts +5 -2
- package/dist/server/routes/documents.js +160 -13
- package/dist/server/routes/durableTaskHttpRouters.d.ts +2 -0
- package/dist/server/routes/durableTaskHttpRouters.js +2 -2
- package/dist/server/routes/localService.js +2 -0
- package/dist/server/routes/primitives.d.ts +2 -0
- package/dist/server/routes/shared.d.ts +24 -0
- package/dist/server/routes/shared.js +114 -18
- package/dist/server/routes/sync.js +22 -0
- package/dist/server/routes/syncV3FeedRoutes.js +4 -2
- package/dist/server/routes/syncV3LocalCaptureRoutes.js +20 -2
- package/dist/server/routes/syncV3OperationRoutes.js +17 -2
- package/dist/server/routes/tasks.js +199 -89
- package/dist/server/routes.js +35 -7
- package/dist/service/localServiceCli.js +36 -25
- package/dist/service/localServiceClientLifecycle.js +67 -6
- package/dist/shared/planningIdentity.d.ts +20 -0
- package/dist/shared/planningIdentity.js +79 -0
- package/dist/storage/postgresAdapter.js +4 -0
- package/dist/storage/postgresRequestDiagnostics.d.ts +8 -0
- package/dist/storage/postgresRequestDiagnostics.js +24 -0
- package/dist/storage/workspaceAssetStore.d.ts +32 -0
- package/dist/storage/workspaceAssetStore.js +70 -0
- package/dist/sync/coordinator/localSyncExecutionPermitStore.d.ts +16 -0
- package/dist/sync/coordinator/localSyncExecutionPermitStore.js +70 -22
- package/dist/sync/coordinator/workspaceSyncTransportGateway.js +4 -2
- package/dist/sync/engine/workspaceSyncEngineRemoteServices.d.ts +5 -0
- package/dist/sync/engine/workspaceSyncEngineServerRemoteServices.d.ts +1 -1
- package/dist/sync/engine/workspaceSyncEngineServerRemoteServices.js +15 -0
- package/dist/sync/engine/workspaceSyncEngineServerRunnerOperations.js +26 -3
- package/dist/sync/engine/workspaceSyncV2ChangeDispatcher.js +2 -0
- package/dist/sync/syncApplyHandlers.d.ts +3 -1
- package/dist/sync/syncApplyHandlers.js +29 -0
- package/dist/sync/syncService.js +9 -0
- package/dist/sync/taskSyncPayload.d.ts +1 -0
- package/dist/sync/taskSyncPayload.js +6 -0
- package/dist/sync/v3/durableTaskAttachmentLinksMutationRouter.d.ts +1 -0
- package/dist/sync/v3/durableTaskAttachmentLinksMutationRouter.js +21 -3
- package/dist/sync/v3/durableTaskHttpBulkMutationRouter.js +17 -4
- package/dist/sync/v3/localInitiativeOutboxService.js +4 -2
- package/dist/sync/v3/localOutboxDispatcher.js +5 -1
- package/dist/sync/v3/localTaskAttachmentLinksOutboxHandler.js +12 -2
- package/dist/sync/v3/localTaskAttachmentLinksOutboxService.d.ts +1 -0
- package/dist/sync/v3/localTaskAttachmentLinksOutboxService.js +15 -3
- package/dist/sync/v3/localWorkstreamOutboxService.js +4 -2
- package/dist/sync/v3/syncDurabilityStore.d.ts +8 -0
- package/dist/sync/v3/syncDurabilityStore.js +171 -33
- package/dist/sync/v3/taskAttachmentLinksMutationService.d.ts +1 -0
- package/dist/sync/v3/taskAttachmentLinksMutationService.js +18 -2
- package/dist/sync/v3/taskMetadataCoexistence.js +4 -0
- package/dist/sync/v3/workspaceSyncV2ProjectionExclusions.js +1 -9
- package/dist/sync/v3/workspaceSyncV3CloudOperationHandler.js +1 -0
- package/dist/sync/v3/workspaceSyncV3CombinedFeedOrchestrator.js +7 -1
- package/dist/sync/v3/workspaceSyncV3CombinedLocalApply.js +15 -3
- package/dist/sync/v3/workspaceSyncV3CombinedRepairBaseline.d.ts +4 -0
- package/dist/sync/v3/workspaceSyncV3CombinedRepairBaseline.js +29 -6
- package/dist/sync/v3/workspaceSyncV3CombinedRepairMaterialization.d.ts +1 -0
- package/dist/sync/v3/workspaceSyncV3CombinedRepairMaterialization.js +29 -7
- package/dist/sync/v3/workspaceSyncV3CombinedRepairSnapshot.js +62 -7
- package/dist/sync/v3/workspaceSyncV3OperationProtocol.d.ts +1 -0
- package/dist/sync/v3/workspaceSyncV3RepairSqlBatching.d.ts +2 -0
- package/dist/sync/v3/workspaceSyncV3RepairSqlBatching.js +10 -0
- package/dist/sync/v3/workspaceSyncV3TaskRootProjection.d.ts +1 -1
- package/dist/sync/v3/workspaceSyncV3TaskRootProjection.js +1 -1
- package/dist/sync/workspacePullFeed.d.ts +6 -1
- package/dist/sync/workspacePullFeed.js +172 -161
- package/dist/sync/workspaceSyncModel.d.ts +11 -0
- package/dist/sync/workspaceSyncModel.js +27 -2
- package/dist/types.d.ts +8 -0
- package/dist/ui/assets/{AiIdentityRosterCard-DB1BLO_j.js → AiIdentityRosterCard-MZs7lVED.js} +1 -1
- package/dist/ui/assets/{AiProfilesModule-DPxQeF9N.js → AiProfilesModule-C3i0LOxe.js} +1 -1
- package/dist/ui/assets/{AnnotatedAttachmentWorkspace-DHNYaNg6.js → AnnotatedAttachmentWorkspace-DVZk5Tln.js} +1 -1
- package/dist/ui/assets/AssetTraySortControl-Kf1pelSy.js +1 -0
- package/dist/ui/assets/ContextAttachmentManager-B8boOs6Q.js +3 -0
- package/dist/ui/assets/{DocumentWorkspace-BC7sy5TG.js → DocumentWorkspace-DXH4XUsB.js} +4 -4
- package/dist/ui/assets/EntityActivityTimeline-BtSTq0ON.js +1 -0
- package/dist/ui/assets/PlanningModule-BPVyEa-f.js +1 -0
- package/dist/ui/assets/PlanningModule-CoIR9hbV.css +1 -0
- package/dist/ui/assets/{PlansPage-BVH_NfgT.js → PlansPage-ChqgxALc.js} +1 -1
- package/dist/ui/assets/TaskContextUpload-CB3ol0sN.js +1 -0
- package/dist/ui/assets/TaskContextUpload-qmBeUw3u.css +1 -0
- package/dist/ui/assets/{TaskSettings-xVsxSa0g.js → TaskSettings-g4ECKNOz.js} +1 -1
- package/dist/ui/assets/{TaskforceAgentsModule-CkAxW19K.js → TaskforceAgentsModule-BazdUwxZ.js} +1 -1
- package/dist/ui/assets/WorkflowManagerModule-DWFspC-o.js +1 -0
- package/dist/ui/assets/index-BUplSsv_.js +7 -0
- package/dist/ui/assets/index-gz2EXuoK.css +1 -0
- package/dist/ui/assets/{vendor-icons-B8ZNsH1g.js → vendor-icons-BkFLXavV.js} +1 -1
- package/dist/ui/index.html +3 -3
- package/dist/utils/constants.d.ts +2 -2
- package/dist/utils/constants.js +1 -1
- package/dist/utils/contextAttachmentUpload.d.ts +2 -0
- package/dist/utils/contextAttachmentUpload.js +7 -0
- package/dist/utils/contextFiles.d.ts +1 -1
- package/dist/utils/contextFiles.js +4 -4
- package/package.json +6 -1
- package/dist/ui/assets/AssetTraySortControl-DphbyHVc.js +0 -1
- package/dist/ui/assets/ContextAttachmentManager-CMxSzHqc.js +0 -3
- package/dist/ui/assets/EntityActivityTimeline-pJ2ZjZ-k.js +0 -1
- package/dist/ui/assets/PlanningModule-CeTqXMMz.css +0 -1
- package/dist/ui/assets/PlanningModule-t5GbvVR9.js +0 -1
- package/dist/ui/assets/TaskContextUpload-Ds4LnDzV.css +0 -1
- package/dist/ui/assets/TaskContextUpload-bl4fOOUz.js +0 -1
- package/dist/ui/assets/WorkflowManagerModule-BKqIGVnF.js +0 -1
- package/dist/ui/assets/index-BzJlVnNS.css +0 -1
- package/dist/ui/assets/index-Cx7vZJHL.js +0 -7
|
@@ -245,6 +245,14 @@ export async function buildWorkspacePullFeed(input) {
|
|
|
245
245
|
workstream
|
|
246
246
|
}))
|
|
247
247
|
.filter((entry) => Number.isFinite(Date.parse(entry.watermark)) && entry.workstream.id.length > 0);
|
|
248
|
+
const planningIdentityEntries = readSnapshot('planning-identities', [], () => core.listPlanningEntityIdentities(workspaceId))
|
|
249
|
+
.map((identity) => ({
|
|
250
|
+
kind: 'planning-identity',
|
|
251
|
+
watermark: String(identity.updatedAt || '').trim(),
|
|
252
|
+
sortId: `planning-identity:${identity.entityType}:${identity.entityId}`,
|
|
253
|
+
identity,
|
|
254
|
+
}))
|
|
255
|
+
.filter((entry) => Number.isFinite(Date.parse(entry.watermark)) && entry.identity.entityId.length > 0);
|
|
248
256
|
const aiProfileEntries = readSnapshot('ai-profiles', [], () => core.listAiProfiles(workspaceId, { includeArchived: true }))
|
|
249
257
|
.map((profile) => ({
|
|
250
258
|
kind: 'ai-profile',
|
|
@@ -469,6 +477,7 @@ export async function buildWorkspacePullFeed(input) {
|
|
|
469
477
|
...taxonomyEntries,
|
|
470
478
|
...initiativeEntries,
|
|
471
479
|
...workstreamEntries,
|
|
480
|
+
...planningIdentityEntries,
|
|
472
481
|
...aiProfileEntries,
|
|
473
482
|
...documentEntries,
|
|
474
483
|
...documentDeleteEntries,
|
|
@@ -568,171 +577,173 @@ export async function buildWorkspacePullFeed(input) {
|
|
|
568
577
|
? [{ op: 'initiative-upsert', initiative: entry.initiative, watermark: entry.watermark }]
|
|
569
578
|
: entry.kind === 'workstream'
|
|
570
579
|
? [{ op: 'workstream-upsert', workstream: entry.workstream, watermark: entry.watermark }]
|
|
571
|
-
: entry.kind === '
|
|
572
|
-
? [{ op: '
|
|
573
|
-
: entry.kind === '
|
|
574
|
-
? [{ op: '
|
|
575
|
-
: entry.kind === 'document-review-session
|
|
576
|
-
? [{ op: 'document-review-session-
|
|
577
|
-
: entry.kind === 'document-review-
|
|
578
|
-
? [{ op: 'document-review-
|
|
579
|
-
: entry.kind === 'document-review-comment
|
|
580
|
-
? [{
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
: entry.kind === 'annotated-attachment-session
|
|
590
|
-
? [{ op: 'annotated-attachment-session-
|
|
591
|
-
: entry.kind === '
|
|
592
|
-
? [{ op: '
|
|
593
|
-
: entry.kind === 'agent
|
|
594
|
-
? [{ op: 'agent-
|
|
595
|
-
: entry.kind === '
|
|
596
|
-
? [{ op: '
|
|
597
|
-
: entry.kind === 'agent-
|
|
598
|
-
? [{ op: 'agent-
|
|
599
|
-
: entry.kind === '
|
|
600
|
-
? [{ op: '
|
|
601
|
-
: entry.kind === '
|
|
602
|
-
? [{ op: '
|
|
603
|
-
: entry.kind === '
|
|
604
|
-
?
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
sha256: entry.contentSha256,
|
|
629
|
-
sizeBytes: entry.sizeBytes,
|
|
630
|
-
updatedAt: entry.watermark,
|
|
631
|
-
metadataFingerprint: createWorkspaceContentMetadataFingerprintV1({
|
|
580
|
+
: entry.kind === 'planning-identity'
|
|
581
|
+
? [{ op: 'planning-identity-upsert', identity: entry.identity, watermark: entry.watermark }]
|
|
582
|
+
: entry.kind === 'ai-profile'
|
|
583
|
+
? [{ op: 'ai-profile-upsert', profile: entry.profile, watermark: entry.watermark }]
|
|
584
|
+
: entry.kind === 'document-review-session'
|
|
585
|
+
? [{ op: 'document-review-session-upsert', session: entry.session, watermark: entry.watermark }]
|
|
586
|
+
: entry.kind === 'document-review-session-delete'
|
|
587
|
+
? [{ op: 'document-review-session-delete', sessionId: entry.sessionId, deletedAt: entry.watermark, watermark: entry.watermark }]
|
|
588
|
+
: entry.kind === 'document-review-comment'
|
|
589
|
+
? [{ op: 'document-review-comment-upsert', comment: entry.comment, watermark: entry.watermark }]
|
|
590
|
+
: entry.kind === 'document-review-comment-delete'
|
|
591
|
+
? [{
|
|
592
|
+
op: 'document-review-comment-delete',
|
|
593
|
+
commentId: entry.commentId,
|
|
594
|
+
deletedAt: entry.watermark,
|
|
595
|
+
deletedByActorId: entry.deletedByActorId,
|
|
596
|
+
watermark: entry.watermark,
|
|
597
|
+
}]
|
|
598
|
+
: entry.kind === 'annotated-attachment-session'
|
|
599
|
+
? [{ op: 'annotated-attachment-session-upsert', session: entry.session, watermark: entry.watermark }]
|
|
600
|
+
: entry.kind === 'annotated-attachment-session-delete'
|
|
601
|
+
? [{ op: 'annotated-attachment-session-delete', sessionId: entry.sessionId, deletedAt: entry.watermark, watermark: entry.watermark }]
|
|
602
|
+
: entry.kind === 'taskforce-agent'
|
|
603
|
+
? [{ op: 'taskforce-agent-upsert', agent: entry.agent, watermark: entry.watermark }]
|
|
604
|
+
: entry.kind === 'agent-role'
|
|
605
|
+
? [{ op: 'agent-role-upsert', role: entry.role, watermark: entry.watermark }]
|
|
606
|
+
: entry.kind === 'taskforce-agent-skill'
|
|
607
|
+
? [{ op: 'taskforce-agent-skill-upsert', skill: entry.skill, watermark: entry.watermark }]
|
|
608
|
+
: entry.kind === 'agent-conversation'
|
|
609
|
+
? [{ op: 'agent-conversation-upsert', conversation: entry.conversation, watermark: entry.watermark }]
|
|
610
|
+
: entry.kind === 'task-event'
|
|
611
|
+
? [{ op: 'task-event-upsert', event: entry.event, watermark: entry.watermark }]
|
|
612
|
+
: entry.kind === 'entity-event'
|
|
613
|
+
? [{ op: 'entity-event-upsert', event: entry.event, watermark: entry.watermark }]
|
|
614
|
+
: entry.kind === 'document'
|
|
615
|
+
? (() => {
|
|
616
|
+
if (contentMode === 'manifest'
|
|
617
|
+
|| isHydrationMissing(entry)
|
|
618
|
+
|| isContentUnavailable(entry)) {
|
|
619
|
+
const metadata = {
|
|
620
|
+
assetId: entry.assetId,
|
|
621
|
+
documentId: entry.documentId,
|
|
622
|
+
referenceNumber: entry.referenceNumber,
|
|
623
|
+
version: entry.version,
|
|
624
|
+
taskId: entry.taskId,
|
|
625
|
+
linkTargetType: entry.linkTargetType,
|
|
626
|
+
linkTargetId: entry.linkTargetId,
|
|
627
|
+
logicalName: entry.logicalName,
|
|
628
|
+
caption: entry.caption,
|
|
629
|
+
originalFilename: entry.originalFilename,
|
|
630
|
+
linkRole: entry.linkRole,
|
|
631
|
+
links: entry.links,
|
|
632
|
+
};
|
|
633
|
+
return [{
|
|
634
|
+
op: 'document-manifest',
|
|
635
|
+
manifest: {
|
|
636
|
+
manifestVersion: WORKSPACE_CONTENT_MANIFEST_VERSION,
|
|
632
637
|
kind: 'document',
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
638
|
+
path: entry.path,
|
|
639
|
+
sha256: entry.contentSha256,
|
|
640
|
+
sizeBytes: entry.sizeBytes,
|
|
641
|
+
updatedAt: entry.watermark,
|
|
642
|
+
metadataFingerprint: createWorkspaceContentMetadataFingerprintV1({
|
|
643
|
+
kind: 'document',
|
|
644
|
+
metadata,
|
|
645
|
+
}),
|
|
646
|
+
existsLocally: entry.contentAvailable,
|
|
647
|
+
},
|
|
648
|
+
metadata,
|
|
649
|
+
watermark: entry.watermark,
|
|
650
|
+
}];
|
|
651
|
+
}
|
|
652
|
+
const payload = hydratedDocuments.get(entry.path);
|
|
653
|
+
if (!payload)
|
|
654
|
+
return [];
|
|
655
|
+
return [{
|
|
656
|
+
op: 'document-upsert',
|
|
657
|
+
path: entry.path,
|
|
658
|
+
updatedAt: entry.watermark,
|
|
659
|
+
content: payload.content,
|
|
660
|
+
assetId: payload.assetId,
|
|
661
|
+
documentId: payload.documentId,
|
|
662
|
+
referenceNumber: payload.referenceNumber,
|
|
663
|
+
version: payload.version,
|
|
664
|
+
taskId: payload.taskId,
|
|
665
|
+
linkTargetType: payload.linkTargetType,
|
|
666
|
+
linkTargetId: payload.linkTargetId,
|
|
667
|
+
logicalName: payload.logicalName,
|
|
668
|
+
caption: payload.caption,
|
|
669
|
+
originalFilename: payload.originalFilename,
|
|
670
|
+
linkRole: payload.linkRole === 'reference' ? 'reference' : 'attachment',
|
|
671
|
+
...(payload.links ? { links: payload.links } : {}),
|
|
672
|
+
watermark: entry.watermark
|
|
639
673
|
}];
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
: entry.kind === 'asset'
|
|
667
|
-
? (() => {
|
|
668
|
-
if (contentMode === 'manifest'
|
|
669
|
-
|| isHydrationMissing(entry)
|
|
670
|
-
|| isContentUnavailable(entry)) {
|
|
671
|
-
const metadata = {
|
|
672
|
-
assetId: entry.assetId,
|
|
673
|
-
assetKind: entry.kindValue,
|
|
674
|
-
mimeType: entry.mimeType,
|
|
675
|
-
referenceNumber: entry.referenceNumber,
|
|
676
|
-
taskId: entry.taskId,
|
|
677
|
-
linkTargetType: entry.linkTargetType,
|
|
678
|
-
linkTargetId: entry.linkTargetId,
|
|
679
|
-
logicalName: entry.logicalName,
|
|
680
|
-
caption: entry.caption,
|
|
681
|
-
originalFilename: entry.originalFilename,
|
|
682
|
-
linkRole: entry.linkRole,
|
|
683
|
-
links: entry.links,
|
|
684
|
-
};
|
|
685
|
-
return [{
|
|
686
|
-
op: 'asset-manifest',
|
|
687
|
-
manifest: {
|
|
688
|
-
manifestVersion: WORKSPACE_CONTENT_MANIFEST_VERSION,
|
|
689
|
-
kind: 'asset',
|
|
690
|
-
path: entry.path,
|
|
691
|
-
sha256: entry.contentSha256,
|
|
692
|
-
sizeBytes: entry.sizeBytes,
|
|
693
|
-
updatedAt: entry.watermark,
|
|
694
|
-
metadataFingerprint: createWorkspaceContentMetadataFingerprintV1({
|
|
674
|
+
})()
|
|
675
|
+
: entry.kind === 'document-delete'
|
|
676
|
+
? [{ op: 'document-delete', path: entry.path, assetId: entry.assetId, deletedAt: entry.watermark, watermark: entry.watermark }]
|
|
677
|
+
: entry.kind === 'asset'
|
|
678
|
+
? (() => {
|
|
679
|
+
if (contentMode === 'manifest'
|
|
680
|
+
|| isHydrationMissing(entry)
|
|
681
|
+
|| isContentUnavailable(entry)) {
|
|
682
|
+
const metadata = {
|
|
683
|
+
assetId: entry.assetId,
|
|
684
|
+
assetKind: entry.kindValue,
|
|
685
|
+
mimeType: entry.mimeType,
|
|
686
|
+
referenceNumber: entry.referenceNumber,
|
|
687
|
+
taskId: entry.taskId,
|
|
688
|
+
linkTargetType: entry.linkTargetType,
|
|
689
|
+
linkTargetId: entry.linkTargetId,
|
|
690
|
+
logicalName: entry.logicalName,
|
|
691
|
+
caption: entry.caption,
|
|
692
|
+
originalFilename: entry.originalFilename,
|
|
693
|
+
linkRole: entry.linkRole,
|
|
694
|
+
links: entry.links,
|
|
695
|
+
};
|
|
696
|
+
return [{
|
|
697
|
+
op: 'asset-manifest',
|
|
698
|
+
manifest: {
|
|
699
|
+
manifestVersion: WORKSPACE_CONTENT_MANIFEST_VERSION,
|
|
695
700
|
kind: 'asset',
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
701
|
+
path: entry.path,
|
|
702
|
+
sha256: entry.contentSha256,
|
|
703
|
+
sizeBytes: entry.sizeBytes,
|
|
704
|
+
updatedAt: entry.watermark,
|
|
705
|
+
metadataFingerprint: createWorkspaceContentMetadataFingerprintV1({
|
|
706
|
+
kind: 'asset',
|
|
707
|
+
metadata,
|
|
708
|
+
}),
|
|
709
|
+
existsLocally: entry.contentAvailable,
|
|
710
|
+
},
|
|
711
|
+
metadata,
|
|
712
|
+
watermark: entry.watermark,
|
|
713
|
+
}];
|
|
714
|
+
}
|
|
715
|
+
const payload = hydratedAssets.get(entry.path);
|
|
716
|
+
if (!payload)
|
|
717
|
+
return [];
|
|
718
|
+
return [{
|
|
719
|
+
op: 'asset-upsert',
|
|
720
|
+
path: entry.path,
|
|
721
|
+
updatedAt: entry.watermark,
|
|
722
|
+
contentBase64: payload.contentBase64,
|
|
723
|
+
assetId: payload.assetId,
|
|
724
|
+
kind: payload.kind,
|
|
725
|
+
mimeType: payload.mimeType,
|
|
726
|
+
referenceNumber: payload.referenceNumber,
|
|
727
|
+
taskId: payload.taskId,
|
|
728
|
+
linkTargetType: payload.linkTargetType,
|
|
729
|
+
linkTargetId: payload.linkTargetId,
|
|
730
|
+
logicalName: payload.logicalName,
|
|
731
|
+
caption: payload.caption,
|
|
732
|
+
originalFilename: payload.originalFilename,
|
|
733
|
+
linkRole: payload.linkRole,
|
|
734
|
+
...(payload.links ? { links: payload.links } : {}),
|
|
735
|
+
watermark: entry.watermark
|
|
702
736
|
}];
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
kind: payload.kind,
|
|
714
|
-
mimeType: payload.mimeType,
|
|
715
|
-
referenceNumber: payload.referenceNumber,
|
|
716
|
-
taskId: payload.taskId,
|
|
717
|
-
linkTargetType: payload.linkTargetType,
|
|
718
|
-
linkTargetId: payload.linkTargetId,
|
|
719
|
-
logicalName: payload.logicalName,
|
|
720
|
-
caption: payload.caption,
|
|
721
|
-
originalFilename: payload.originalFilename,
|
|
722
|
-
linkRole: payload.linkRole,
|
|
723
|
-
...(payload.links ? { links: payload.links } : {}),
|
|
724
|
-
watermark: entry.watermark
|
|
725
|
-
}];
|
|
726
|
-
})()
|
|
727
|
-
: entry.kind === 'asset-delete'
|
|
728
|
-
? [{ op: 'asset-delete', path: entry.path, assetId: entry.assetId, deletedAt: entry.watermark, watermark: entry.watermark }]
|
|
729
|
-
: [{
|
|
730
|
-
op: 'upsert',
|
|
731
|
-
task: entry.task,
|
|
732
|
-
archived: Boolean(entry.archived),
|
|
733
|
-
...(entry.durableRevision ? { durableRevision: entry.durableRevision } : {}),
|
|
734
|
-
watermark: entry.watermark,
|
|
735
|
-
}]));
|
|
737
|
+
})()
|
|
738
|
+
: entry.kind === 'asset-delete'
|
|
739
|
+
? [{ op: 'asset-delete', path: entry.path, assetId: entry.assetId, deletedAt: entry.watermark, watermark: entry.watermark }]
|
|
740
|
+
: [{
|
|
741
|
+
op: 'upsert',
|
|
742
|
+
task: entry.task,
|
|
743
|
+
archived: Boolean(entry.archived),
|
|
744
|
+
...(entry.durableRevision ? { durableRevision: entry.durableRevision } : {}),
|
|
745
|
+
watermark: entry.watermark,
|
|
746
|
+
}]));
|
|
736
747
|
let pageBytes = Buffer.byteLength(JSON.stringify({ workspaceId, changes: [], workspaceMembers }), 'utf8');
|
|
737
748
|
let includedEntryCount = 0;
|
|
738
749
|
let includedChangeCount = 0;
|
|
@@ -11,6 +11,7 @@ import type { WorkspaceAssetSyncLinkPayload } from './contentSyncPayload.js';
|
|
|
11
11
|
import type { WorkspaceAssetManifestMetadata, WorkspaceContentManifestEntry, WorkspaceDocumentManifestMetadata } from './workspaceContentManifest.js';
|
|
12
12
|
import type { TaskRelationshipRecord } from '../core/Taskforce.js';
|
|
13
13
|
import type { AgentConfigurationIssue, AgentConfigurationState } from '../shared/taskforceAgentDefinition.js';
|
|
14
|
+
import type { PlanningIdentityColor, PlanningIdentityEntityType, PlanningIdentityIcon } from '../shared/planningIdentity.js';
|
|
14
15
|
export type WorkspaceSyncTaskSnapshot = TaskSyncPayload;
|
|
15
16
|
export interface WorkspaceSyncTaskDelete {
|
|
16
17
|
taskId: string;
|
|
@@ -246,6 +247,13 @@ export interface WorkspaceSyncWorkstreamSnapshot {
|
|
|
246
247
|
isArchived?: boolean;
|
|
247
248
|
durableRevision?: WorkspaceSyncDurablePlanningRevision<'workstream'>;
|
|
248
249
|
}
|
|
250
|
+
export interface WorkspaceSyncPlanningIdentitySnapshot {
|
|
251
|
+
entityType: PlanningIdentityEntityType;
|
|
252
|
+
entityId: string;
|
|
253
|
+
icon: PlanningIdentityIcon | null;
|
|
254
|
+
color: PlanningIdentityColor | null;
|
|
255
|
+
updatedAt: string;
|
|
256
|
+
}
|
|
249
257
|
export type WorkspaceSyncPlanningComment = CanonicalPlanningComment;
|
|
250
258
|
export type WorkspaceSyncPlanningDomain = 'initiative' | 'workstream';
|
|
251
259
|
export type WorkspaceSyncPlanningMutationKind = 'create' | 'metadata-update' | 'append-comment' | 'archive' | 'unarchive';
|
|
@@ -300,6 +308,9 @@ export type WorkspaceSyncChange = {
|
|
|
300
308
|
} | {
|
|
301
309
|
op: 'workstream-upsert';
|
|
302
310
|
workstream: WorkspaceSyncWorkstreamSnapshot;
|
|
311
|
+
} | {
|
|
312
|
+
op: 'planning-identity-upsert';
|
|
313
|
+
identity: WorkspaceSyncPlanningIdentitySnapshot;
|
|
303
314
|
} | {
|
|
304
315
|
op: 'taxonomy-upsert';
|
|
305
316
|
taxonomies?: unknown[];
|
|
@@ -223,6 +223,24 @@ export function buildWorkspaceSyncPayloadModel(input) {
|
|
|
223
223
|
return true;
|
|
224
224
|
return previousWorkstreamWatermarks.get(change.workstream.id) !== change.workstream.updatedAt;
|
|
225
225
|
});
|
|
226
|
+
const planningIdentityUpsertChanges = [
|
|
227
|
+
...(Array.isArray(input.initiatives) ? input.initiatives : []).map((initiative) => ({
|
|
228
|
+
entityType: 'initiative',
|
|
229
|
+
entityId: String(initiative?.id || '').trim(),
|
|
230
|
+
icon: initiative?.icon ?? null,
|
|
231
|
+
color: initiative?.color ?? null,
|
|
232
|
+
updatedAt: String(initiative?.identityUpdatedAt || '').trim(),
|
|
233
|
+
})),
|
|
234
|
+
...(Array.isArray(input.workstreams) ? input.workstreams : []).map((workstream) => ({
|
|
235
|
+
entityType: 'workstream',
|
|
236
|
+
entityId: String(workstream?.id || '').trim(),
|
|
237
|
+
icon: workstream?.icon ?? null,
|
|
238
|
+
color: workstream?.color ?? null,
|
|
239
|
+
updatedAt: String(workstream?.identityUpdatedAt || '').trim(),
|
|
240
|
+
})),
|
|
241
|
+
]
|
|
242
|
+
.filter((identity) => identity.entityId.length > 0 && Number.isFinite(Date.parse(identity.updatedAt)))
|
|
243
|
+
.map((identity) => ({ op: 'planning-identity-upsert', identity }));
|
|
226
244
|
const currentAiProfileIds = new Set((Array.isArray(input.aiProfiles) ? input.aiProfiles : [])
|
|
227
245
|
.map((profile) => String(profile?.id || '').trim())
|
|
228
246
|
.filter((profileId) => profileId.length > 0));
|
|
@@ -836,6 +854,7 @@ export function buildWorkspaceSyncPayloadModel(input) {
|
|
|
836
854
|
const changes = [
|
|
837
855
|
...initiativeUpsertChanges,
|
|
838
856
|
...workstreamUpsertChanges,
|
|
857
|
+
...planningIdentityUpsertChanges,
|
|
839
858
|
...(taxonomyChanged && input.taxonomyState && typeof input.taxonomyState === 'object'
|
|
840
859
|
? [{
|
|
841
860
|
op: 'taxonomy-upsert',
|
|
@@ -1081,7 +1100,10 @@ export function buildWorkspaceSyncSignatureModel(input) {
|
|
|
1081
1100
|
ownerId: typeof initiative.ownerId === 'string' ? initiative.ownerId.trim() : '',
|
|
1082
1101
|
comments: normalizePlanningComments(initiative.comments) || [],
|
|
1083
1102
|
attachments: normalizeLegacyPlanningAttachments(initiative.attachments) || [],
|
|
1084
|
-
isArchived: Boolean(initiative.isArchived)
|
|
1103
|
+
isArchived: Boolean(initiative.isArchived),
|
|
1104
|
+
icon: initiative.icon ?? null,
|
|
1105
|
+
color: initiative.color ?? null,
|
|
1106
|
+
identityUpdatedAt: String(initiative.identityUpdatedAt || '').trim()
|
|
1085
1107
|
}))
|
|
1086
1108
|
.filter((initiative) => initiative.id.length > 0)
|
|
1087
1109
|
.sort((a, b) => a.id.localeCompare(b.id));
|
|
@@ -1094,7 +1116,10 @@ export function buildWorkspaceSyncSignatureModel(input) {
|
|
|
1094
1116
|
ownerId: typeof workstream.ownerId === 'string' ? workstream.ownerId.trim() : '',
|
|
1095
1117
|
comments: normalizePlanningComments(workstream.comments) || [],
|
|
1096
1118
|
attachments: normalizeLegacyPlanningAttachments(workstream.attachments) || [],
|
|
1097
|
-
isArchived: Boolean(workstream.isArchived)
|
|
1119
|
+
isArchived: Boolean(workstream.isArchived),
|
|
1120
|
+
icon: workstream.icon ?? null,
|
|
1121
|
+
color: workstream.color ?? null,
|
|
1122
|
+
identityUpdatedAt: String(workstream.identityUpdatedAt || '').trim()
|
|
1098
1123
|
}))
|
|
1099
1124
|
.filter((workstream) => workstream.id.length > 0)
|
|
1100
1125
|
.sort((a, b) => a.id.localeCompare(b.id));
|
package/dist/types.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export type { TaskforceTheme } from './utils/theme';
|
|
|
7
7
|
export type { TaskActor } from './shared/taskActor.js';
|
|
8
8
|
import type { TaskforceTheme } from './utils/theme';
|
|
9
9
|
import type { TaskActor } from './shared/taskActor.js';
|
|
10
|
+
import type { PlanningIdentityColor, PlanningIdentityIcon } from './shared/planningIdentity.js';
|
|
10
11
|
export interface Comment {
|
|
11
12
|
id: string;
|
|
12
13
|
author: 'user' | 'ai' | string;
|
|
@@ -143,6 +144,9 @@ export interface InitiativeItem {
|
|
|
143
144
|
title: string;
|
|
144
145
|
description: string | null;
|
|
145
146
|
ownerId?: string | null;
|
|
147
|
+
icon?: PlanningIdentityIcon | null;
|
|
148
|
+
color?: PlanningIdentityColor | null;
|
|
149
|
+
identityUpdatedAt?: string | null;
|
|
146
150
|
comments?: Comment[];
|
|
147
151
|
activity?: EntityActivityItem[];
|
|
148
152
|
entityEvents?: PlanningEntityEvent[];
|
|
@@ -160,6 +164,9 @@ export interface WorkstreamItem {
|
|
|
160
164
|
title: string;
|
|
161
165
|
description: string | null;
|
|
162
166
|
ownerId?: string | null;
|
|
167
|
+
icon?: PlanningIdentityIcon | null;
|
|
168
|
+
color?: PlanningIdentityColor | null;
|
|
169
|
+
identityUpdatedAt?: string | null;
|
|
163
170
|
comments?: Comment[];
|
|
164
171
|
activity?: EntityActivityItem[];
|
|
165
172
|
entityEvents?: PlanningEntityEvent[];
|
|
@@ -236,6 +243,7 @@ export interface TaskItem {
|
|
|
236
243
|
activity?: TaskActivityItem[];
|
|
237
244
|
taskEvents?: TaskEvent[];
|
|
238
245
|
attachments?: Array<string | AttachmentItem>;
|
|
246
|
+
cardCoverAssetId?: string | null;
|
|
239
247
|
/** @deprecated Use status='cancelled'. Safe to remove after v0.4.x migration gate. */
|
|
240
248
|
cancelled?: boolean;
|
|
241
249
|
/** @deprecated Use status='done'. Safe to remove after v0.4.x migration gate. */
|
package/dist/ui/assets/{AiIdentityRosterCard-DB1BLO_j.js → AiIdentityRosterCard-MZs7lVED.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{V as C,t as a}from"./index-
|
|
1
|
+
import{V as C,t as a}from"./index-BUplSsv_.js";import{j as i}from"./vendor-react-CKJs5o3c.js";const l=["red-500","orange-500","amber-500","green-700","teal-700","sky-500","sky-700","blue-500","indigo-700","violet-500"];function y(e){const r=String(e||"ai").trim().toLowerCase();let s=2166136261;for(let t=0;t<r.length;t+=1)s^=r.charCodeAt(t),s=Math.imul(s,16777619);const o=l[(s>>>0)%l.length];return C[o].toLowerCase()}function $(e){const[r,s=""]=e.split("#"),o=r.includes("?")?"&":"?";return`${r}${o}taskforceCloud=1${s?`#${s}`:""}`}function A(e){return/^https?:\/\//i.test(e)?e:$(e)}function N({name:e,username:r,subtitle:s,avatar:o,selected:t,disabled:n=!1,onSelect:c,ariaLabel:d,avatarVariant:u="portrait",avatarClassName:f="",avatarStyle:p,className:m="",topUtility:h,bottomUtility:P,footer:x}){return i.jsxs("button",{type:"button",className:`${a.aiProfileGroup} ${t?a.aiProfileGroupSelected:""} ${m}`.trim(),onClick:c,disabled:n,"aria-label":d,"aria-pressed":t,children:[h,P,i.jsxs("span",{className:a.aiProfileGroupHeader,children:[i.jsx("span",{className:`${a.aiProfileGroupAvatar} ${u==="logo"?a.aiProfileGroupAvatarLogo:""} ${f}`.trim(),style:p,"aria-hidden":"true",children:o}),i.jsxs("span",{className:a.aiProfileGroupIdentity,children:[i.jsx("span",{className:a.aiProfileName,children:e}),r?i.jsxs("span",{className:a.aiProfileHandle,children:["@",r]}):null,i.jsx("span",{className:a.aiProfileRole,children:s}),x]})]})]})}export{N as A,y as a,l as b,A as r,$ as w};
|