@taskforcehq/taskforce 0.3.328 → 0.3.329
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 +233 -34
- package/dist/TaskforceCore.js +237 -230
- package/dist/annotatedAttachments/AnnotatedAttachmentSessionStore.js +1 -1
- package/dist/cli.js +34 -0
- package/dist/cliCloudTargetGuard.d.ts +5 -0
- package/dist/cliCloudTargetGuard.js +11 -0
- package/dist/components/features/AnnotatedAttachmentWorkspace.js +24 -8
- package/dist/components/features/TaskSettings.d.ts +12 -1
- package/dist/components/features/TaskSettings.js +147 -40
- package/dist/components/features/agentCapabilities/AgentCapabilitiesPrototype.d.ts +1 -1
- package/dist/components/features/planning/PlanningModule.js +2 -5
- package/dist/components/features/planning/PlanningTaskOrderList.d.ts +1 -1
- package/dist/components/features/planning/PlanningTaskOrderList.js +17 -6
- package/dist/components/features/planning/planningTaskArrangement.d.ts +1 -0
- package/dist/components/features/planning/planningTaskArrangement.js +5 -5
- package/dist/components/features/taskforceAgentEditorModel.js +3 -1
- package/dist/components/task/TaskCard.d.ts +5 -0
- package/dist/components/task/TaskCard.js +65 -10
- package/dist/components/task/TaskImageReviews.js +14 -5
- package/dist/components/task/TaskKanban.d.ts +6 -1
- package/dist/components/task/TaskKanban.js +152 -6
- package/dist/components/task/TaskList.d.ts +5 -0
- package/dist/components/task/TaskList.js +3 -3
- package/dist/components/ui/PasswordInput.d.ts +6 -0
- package/dist/components/ui/PasswordInput.js +11 -0
- package/dist/components/ui/TopNoticeLayer.js +1 -1
- package/dist/components/views/AppShellHeader.js +32 -11
- package/dist/components/views/PlanComparisonPage.js +12 -0
- package/dist/components/views/StandaloneLayout.js +7 -31
- package/dist/components/views/WidgetView.js +3 -3
- package/dist/components/views/panels/PlanningDrawer.js +5 -12
- package/dist/components/views/standalone/modals/AccountSettingsModal.js +26 -17
- package/dist/config/envSchema.js +12 -0
- package/dist/config/localServiceRuntimeContract.d.ts +13 -0
- package/dist/config/localServiceRuntimeContract.js +135 -0
- package/dist/core/AiProfileService.js +46 -8
- package/dist/core/DeletedTaskLifecycleService.d.ts +1 -0
- package/dist/core/DeletedTaskLifecycleService.js +37 -6
- package/dist/core/TaskAttachmentLinksDurableMutationService.d.ts +3 -2
- package/dist/core/TaskAttachmentLinksDurableMutationService.js +33 -9
- package/dist/core/Taskforce.d.ts +62 -2
- package/dist/core/Taskforce.js +635 -32
- package/dist/core/types.d.ts +6 -0
- package/dist/hooks/sync/useDurableLocalOutboxDrain.d.ts +1 -1
- package/dist/hooks/sync/useDurableTaskCreateMutation.js +1 -1
- package/dist/hooks/sync/useDurableTaskMetadataMutation.d.ts +1 -0
- package/dist/hooks/sync/useDurableTaskMetadataMutation.js +1 -0
- package/dist/hooks/sync/useDurableTaskStatusMutation.d.ts +1 -0
- package/dist/hooks/tasks/taskHttpMutation.js +1 -0
- package/dist/hooks/tasks/useCloudTaskSearch.d.ts +12 -0
- package/dist/hooks/tasks/useCloudTaskSearch.js +71 -0
- package/dist/hooks/tasks/useTaskDescriptionImageDraftRecovery.d.ts +16 -0
- package/dist/hooks/tasks/useTaskDescriptionImageDraftRecovery.js +197 -0
- package/dist/hooks/tasks/useTaskEditorNavigation.d.ts +16 -3
- package/dist/hooks/tasks/useTaskEditorNavigation.js +72 -13
- package/dist/hooks/tasks/useTaskFormActions.d.ts +6 -0
- package/dist/hooks/tasks/useTaskFormActions.js +65 -12
- package/dist/hooks/ui/useSettingsModel.d.ts +24 -2
- package/dist/hooks/ui/useSettingsModel.js +13 -2
- package/dist/hooks/ui/useSettingsPersistence.d.ts +12 -1
- package/dist/hooks/ui/useSettingsPersistence.js +74 -47
- package/dist/hooks/useFilterSort.d.ts +7 -3
- package/dist/hooks/useFilterSort.js +15 -5
- package/dist/hooks/useTaskData.d.ts +10 -1
- package/dist/hooks/useTaskData.js +216 -7
- package/dist/hooks/useTaskMutations.d.ts +10 -2
- package/dist/hooks/useTaskMutations.js +223 -43
- package/dist/hooks/useTaskforce.d.ts +37 -9
- package/dist/hooks/useTaskforce.js +349 -39
- package/dist/hooks/useUiNotice.d.ts +4 -0
- package/dist/hooks/useUiNotice.js +4 -0
- package/dist/mcp/adminWorkspaceRegistrar.js +3 -3
- package/dist/mcp/documentAssetRegistrar.js +44 -35
- package/dist/mcp/documentHelpers.d.ts +1 -0
- package/dist/mcp/documentHelpers.js +7 -3
- package/dist/mcp/runtime.js +172 -42
- package/dist/mcp/taskPlanningRegistrar.js +41 -38
- package/dist/mcp/toolCallCompatibility.js +38 -1
- package/dist/mcp/toolCatalog.d.ts +1 -0
- package/dist/migrations/taskSchemaMigrations.js +12 -0
- package/dist/runtime/appGateDefinitions.d.ts +30 -6
- package/dist/runtime/appGateDefinitions.js +6 -6
- package/dist/runtime/appGates.d.ts +12 -13
- package/dist/runtime/appGates.js +29 -13
- package/dist/runtime/nodeAppGates.d.ts +8 -0
- package/dist/runtime/nodeAppGates.js +27 -0
- package/dist/server/cloudCollectionRead.d.ts +1 -1
- package/dist/server/cloudCollectionRead.js +2 -2
- package/dist/server/index.d.ts +3 -0
- package/dist/server/index.js +15 -3
- package/dist/server/localServiceLease.d.ts +3 -0
- package/dist/server/localServiceLease.js +9 -1
- package/dist/server/localWorkspaceSyncServerRuntime.js +10 -3
- package/dist/server/rateLimit.d.ts +1 -0
- package/dist/server/rateLimit.js +4 -0
- package/dist/server/realtimeSyncWs.js +36 -12
- package/dist/server/routes/admin.js +1 -0
- package/dist/server/routes/agentRoles.js +3 -2
- package/dist/server/routes/agentSkills.js +3 -2
- package/dist/server/routes/agents.js +118 -16
- package/dist/server/routes/annotatedAttachments.js +3 -2
- package/dist/server/routes/auth.js +3 -1
- package/dist/server/routes/durableTaskHttpRouters.d.ts +9 -2
- package/dist/server/routes/localService.js +2 -0
- package/dist/server/routes/primitives.d.ts +2 -0
- package/dist/server/routes/syncAuxRoutes.js +5 -2
- package/dist/server/routes/syncPullApplyRoutes.js +23 -4
- package/dist/server/routes/syncV3FeedRoutes.js +18 -16
- package/dist/server/routes/syncV3LocalCaptureRoutes.js +28 -2
- package/dist/server/routes/syncV3LocalFeedApplyRoutes.d.ts +1 -0
- package/dist/server/routes/syncV3LocalFeedApplyRoutes.js +26 -0
- package/dist/server/routes/syncV3OperationRoutes.js +10 -0
- package/dist/server/routes/tasks.js +103 -11
- package/dist/server/routes/workspaces.js +43 -1
- package/dist/server/workspaceDeletionAdmission.d.ts +23 -0
- package/dist/server/workspaceDeletionAdmission.js +50 -0
- package/dist/service/localServiceCli.js +16 -0
- package/dist/service/localServiceClientLifecycle.js +36 -10
- package/dist/services/codexAppServerModelGateway.d.ts +112 -0
- package/dist/services/codexAppServerModelGateway.js +438 -0
- package/dist/services/taskforceAgentMcpBridge.d.ts +7 -1
- package/dist/services/taskforceAgentMcpBridge.js +23 -3
- package/dist/shared/taskforceAgentDefinition.js +7 -1
- package/dist/shared/taskforceAgentModels.d.ts +1 -0
- package/dist/shared/taskforceAgentModels.js +30 -1
- package/dist/storage/postgresAdapter.d.ts +20 -3
- package/dist/storage/postgresAdapter.js +106 -14
- package/dist/storage/postgresWorker.js +13 -4
- package/dist/storage/postgresWorkerProtocol.d.ts +29 -0
- package/dist/storage/postgresWorkerProtocol.js +30 -0
- package/dist/sync/cloudSyncApi.d.ts +4 -1
- package/dist/sync/cloudSyncApi.js +7 -2
- package/dist/sync/contentSyncState.d.ts +1 -1
- package/dist/sync/coordinator/localSyncExecutionPermitStore.d.ts +1 -0
- package/dist/sync/coordinator/localSyncExecutionPermitStore.js +7 -1
- package/dist/sync/coordinator/localWorkspaceSyncRunner.js +6 -2
- package/dist/sync/engine/workspaceSyncEngineBrowserGatewayRemoteServices.js +20 -2
- package/dist/sync/engine/workspaceSyncEngineLocalServices.d.ts +4 -0
- package/dist/sync/engine/workspaceSyncEngineLocalServices.js +11 -0
- package/dist/sync/engine/workspaceSyncEngineRemoteServices.d.ts +11 -0
- package/dist/sync/engine/workspaceSyncEngineRemoteServices.js +2 -1
- package/dist/sync/engine/workspaceSyncEngineServerRemoteServices.js +31 -4
- package/dist/sync/engine/workspaceSyncEngineServerRunnerOperations.d.ts +3 -1
- package/dist/sync/engine/workspaceSyncEngineServerRunnerOperations.js +25 -8
- package/dist/sync/engine/workspaceSyncEngineTransfers.d.ts +1 -1
- package/dist/sync/engine/workspaceSyncEngineTransfers.js +8 -3
- package/dist/sync/syncService.d.ts +2 -0
- package/dist/sync/syncService.js +4 -1
- package/dist/sync/v3/combinedFeedCapability.js +4 -0
- package/dist/sync/v3/durableTaskAttachmentLinksMutationRouter.d.ts +2 -0
- package/dist/sync/v3/durableTaskAttachmentLinksMutationRouter.js +11 -1
- package/dist/sync/v3/durableTaskChecklistMutationRouter.d.ts +2 -0
- package/dist/sync/v3/durableTaskChecklistMutationRouter.js +4 -0
- package/dist/sync/v3/durableTaskHttpBulkMutationRouter.d.ts +1 -0
- package/dist/sync/v3/durableTaskHttpBulkMutationRouter.js +30 -8
- package/dist/sync/v3/durableTaskHttpRootMutationRouter.d.ts +5 -3
- package/dist/sync/v3/durableTaskHttpRootMutationRouter.js +27 -2
- package/dist/sync/v3/localTaskAttachmentLinksOutboxService.d.ts +2 -0
- package/dist/sync/v3/localTaskAttachmentLinksOutboxService.js +47 -7
- package/dist/sync/v3/localTaskCreateOutboxService.js +15 -6
- package/dist/sync/v3/localTaskMetadataClient.d.ts +1 -0
- package/dist/sync/v3/localTaskMetadataClient.js +1 -0
- package/dist/sync/v3/localTaskMetadataOutboxHandler.js +5 -1
- package/dist/sync/v3/localTaskMetadataOutboxService.d.ts +2 -0
- package/dist/sync/v3/localTaskMetadataOutboxService.js +7 -0
- package/dist/sync/v3/localTaskRestoreOutboxService.js +14 -6
- package/dist/sync/v3/localTaskStatusClient.d.ts +1 -0
- package/dist/sync/v3/localTaskStatusClient.js +6 -1
- package/dist/sync/v3/localTaskStatusOutboxService.d.ts +2 -0
- package/dist/sync/v3/localTaskStatusOutboxService.js +54 -13
- package/dist/sync/v3/syncDurabilityStore.d.ts +7 -0
- package/dist/sync/v3/syncDurabilityStore.js +31 -11
- package/dist/sync/v3/taskAttachmentLinksMutationService.d.ts +6 -4
- package/dist/sync/v3/taskAttachmentLinksMutationService.js +19 -10
- package/dist/sync/v3/taskChecklistMutationService.d.ts +4 -2
- package/dist/sync/v3/taskChecklistMutationService.js +4 -0
- package/dist/sync/v3/taskCreateMutationService.d.ts +2 -2
- package/dist/sync/v3/taskCreateMutationService.js +7 -4
- package/dist/sync/v3/taskMetadataMutationService.d.ts +3 -0
- package/dist/sync/v3/taskMetadataMutationService.js +4 -0
- package/dist/sync/v3/taskRestoreMutationService.d.ts +2 -2
- package/dist/sync/v3/taskRestoreMutationService.js +7 -4
- package/dist/sync/v3/taskStatusMutationService.d.ts +2 -0
- package/dist/sync/v3/taskStatusMutationService.js +4 -0
- package/dist/sync/v3/workflowAssignmentSync.d.ts +1 -0
- package/dist/sync/v3/workflowAssignmentSync.js +3 -0
- package/dist/sync/v3/workspaceSyncV2ProjectionExclusions.d.ts +1 -1
- package/dist/sync/v3/workspaceSyncV2ProjectionExclusions.js +13 -3
- package/dist/sync/v3/workspaceSyncV3AttachmentApplyObligationStore.d.ts +11 -0
- package/dist/sync/v3/workspaceSyncV3AttachmentApplyObligationStore.js +27 -10
- package/dist/sync/v3/workspaceSyncV3AttachmentAssetHydration.d.ts +2 -1
- package/dist/sync/v3/workspaceSyncV3AttachmentAssetHydration.js +52 -10
- package/dist/sync/v3/workspaceSyncV3CloudOperationHandler.js +9 -1
- package/dist/sync/v3/workspaceSyncV3CombinedFeedOrchestrator.js +8 -3
- package/dist/sync/v3/workspaceSyncV3CombinedLocalApply.js +51 -10
- package/dist/sync/v3/workspaceSyncV3CombinedRepairBaseline.d.ts +7 -0
- package/dist/sync/v3/workspaceSyncV3CombinedRepairBaseline.js +30 -18
- package/dist/sync/v3/workspaceSyncV3CombinedRepairMaterialization.d.ts +9 -4
- package/dist/sync/v3/workspaceSyncV3CombinedRepairMaterialization.js +98 -47
- package/dist/sync/v3/workspaceSyncV3CombinedRepairSnapshot.d.ts +10 -0
- package/dist/sync/v3/workspaceSyncV3CombinedRepairSnapshot.js +58 -21
- package/dist/sync/v3/workspaceSyncV3CombinedWireContract.d.ts +3 -1
- package/dist/sync/v3/workspaceSyncV3CombinedWireContract.js +18 -0
- package/dist/sync/v3/workspaceSyncV3CoverageRegistry.js +6 -0
- package/dist/sync/v3/workspaceSyncV3FeedProfile.d.ts +1 -1
- package/dist/sync/v3/workspaceSyncV3LegacyBoundaryAttestation.d.ts +1 -0
- package/dist/sync/v3/workspaceSyncV3LegacyBoundaryAttestation.js +23 -10
- package/dist/sync/v3/workspaceSyncV3NestedTaskApply.d.ts +3 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskApply.js +64 -13
- package/dist/sync/v3/workspaceSyncV3NestedTaskCodecs.d.ts +9 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskCodecs.js +26 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskProjection.d.ts +15 -5
- package/dist/sync/v3/workspaceSyncV3NestedTaskProjection.js +50 -14
- package/dist/sync/v3/workspaceSyncV3NestedTaskRepairSnapshot.d.ts +2 -1
- package/dist/sync/v3/workspaceSyncV3NestedTaskRepairSnapshot.js +11 -3
- package/dist/sync/v3/workspaceSyncV3OperationProtocol.d.ts +2 -0
- package/dist/sync/v3/workspaceSyncV3OperatorDiagnostics.d.ts +2 -0
- package/dist/sync/v3/workspaceSyncV3OperatorDiagnostics.js +19 -7
- package/dist/sync/v3/workspaceSyncV3TaskCommentAudit.js +9 -2
- package/dist/sync/v3/workspaceSyncV3TaskCoverCoverage.d.ts +7 -0
- package/dist/sync/v3/workspaceSyncV3TaskCoverCoverage.js +37 -0
- package/dist/sync/v3/workspaceSyncV3TaskCoverWireContract.d.ts +6 -0
- package/dist/sync/v3/workspaceSyncV3TaskCoverWireContract.js +9 -0
- package/dist/sync/workspacePullFeed.js +2 -1
- package/dist/sync/workspaceRepair.d.ts +3 -0
- package/dist/sync/workspaceRepair.js +67 -6
- package/dist/types.d.ts +47 -1
- package/dist/types.js +6 -0
- package/dist/ui/assets/{AiIdentityRosterCard-MZs7lVED.js → AiIdentityRosterCard-BZM4aQnM.js} +1 -1
- package/dist/ui/assets/AiProfilesModule-BbAEWtHH.js +1 -0
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-B68Wg-RV.js +3 -0
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-TzYu7pkG.css +1 -0
- package/dist/ui/assets/{AssetTraySortControl-Kf1pelSy.js → AssetTraySortControl-C8Rztyal.js} +1 -1
- package/dist/ui/assets/{ContextAttachmentManager-B8boOs6Q.js → ContextAttachmentManager-Cj3c7X9y.js} +2 -2
- package/dist/ui/assets/{DocumentWorkspace-DXH4XUsB.js → DocumentWorkspace-B5uvzems.js} +1 -1
- package/dist/ui/assets/{EntityActivityTimeline-BtSTq0ON.js → EntityActivityTimeline-BVFvCB5R.js} +1 -1
- package/dist/ui/assets/PlanningModule-B5DWQOGz.js +1 -0
- package/dist/ui/assets/PlansPage-AY4cGWco.js +1 -0
- package/dist/ui/assets/TaskContextUpload-DZxTVesW.js +1 -0
- package/dist/ui/assets/TaskSettings-BeWAuyZj.js +12 -0
- package/dist/ui/assets/{TaskforceAgentsModule-BazdUwxZ.js → TaskforceAgentsModule-BifCYtjR.js} +6 -6
- package/dist/ui/assets/{WorkflowManagerModule-DWFspC-o.js → WorkflowManagerModule-DEr5di_r.js} +1 -1
- package/dist/ui/assets/index-I5zhdtgt.js +7 -0
- package/dist/ui/assets/index-VRFsx3wz.css +1 -0
- package/dist/ui/assets/{vendor-icons-BkFLXavV.js → vendor-icons-D9Lpw-j4.js} +1 -1
- package/dist/ui/index.html +3 -3
- package/dist/utils/taskActivity.d.ts +3 -2
- package/dist/utils/taskActivity.js +19 -2
- package/dist/utils/taskEditorReconciliation.d.ts +40 -0
- package/dist/utils/taskEditorReconciliation.js +217 -0
- package/dist/utils/taskNormalization.d.ts +1 -0
- package/dist/utils/taskNormalization.js +39 -0
- package/dist/utils/taskSearch.js +2 -2
- package/dist/utils/uiNotice.d.ts +4 -0
- package/package.json +16 -4
- package/dist/ui/assets/AiProfilesModule-C3i0LOxe.js +0 -1
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-CBRZ8rca.css +0 -1
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-DVZk5Tln.js +0 -3
- package/dist/ui/assets/PlanningModule-BPVyEa-f.js +0 -1
- package/dist/ui/assets/PlansPage-ChqgxALc.js +0 -1
- package/dist/ui/assets/TaskContextUpload-CB3ol0sN.js +0 -1
- package/dist/ui/assets/TaskSettings-g4ECKNOz.js +0 -12
- package/dist/ui/assets/index-BUplSsv_.js +0 -7
- package/dist/ui/assets/index-gz2EXuoK.css +0 -1
|
@@ -2,8 +2,16 @@ import { bindDomainTool } from './toolCatalog.js';
|
|
|
2
2
|
function stringProperty(description, enumValues) {
|
|
3
3
|
return enumValues ? { type: 'string', description, enum: enumValues } : { type: 'string', description };
|
|
4
4
|
}
|
|
5
|
-
function
|
|
6
|
-
return { type: 'number', description };
|
|
5
|
+
function boundedNumberProperty(description, minimum, maximum) {
|
|
6
|
+
return { type: 'number', description, minimum, maximum };
|
|
7
|
+
}
|
|
8
|
+
function integerProperty(description, minimum, maximum) {
|
|
9
|
+
return {
|
|
10
|
+
type: 'integer',
|
|
11
|
+
description,
|
|
12
|
+
...(minimum === undefined ? {} : { minimum }),
|
|
13
|
+
...(maximum === undefined ? {} : { maximum }),
|
|
14
|
+
};
|
|
7
15
|
}
|
|
8
16
|
function booleanProperty(description) {
|
|
9
17
|
return { type: 'boolean', description };
|
|
@@ -17,12 +25,12 @@ function annotatedAttachmentMarkerProperty() {
|
|
|
17
25
|
properties: {
|
|
18
26
|
type: { type: 'string' },
|
|
19
27
|
kind: { type: 'string' },
|
|
20
|
-
x: { type: 'number' },
|
|
21
|
-
y: { type: 'number' },
|
|
22
|
-
width: { type: 'number' },
|
|
23
|
-
height: { type: 'number' },
|
|
24
|
-
x2: { type: 'number' },
|
|
25
|
-
y2: { type: 'number' },
|
|
28
|
+
x: { type: 'number', minimum: 0, maximum: 1 },
|
|
29
|
+
y: { type: 'number', minimum: 0, maximum: 1 },
|
|
30
|
+
width: { type: 'number', minimum: 0, maximum: 1 },
|
|
31
|
+
height: { type: 'number', minimum: 0, maximum: 1 },
|
|
32
|
+
x2: { type: 'number', minimum: 0, maximum: 1 },
|
|
33
|
+
y2: { type: 'number', minimum: 0, maximum: 1 },
|
|
26
34
|
text: { type: 'string' },
|
|
27
35
|
instruction: { type: 'string' },
|
|
28
36
|
instructionType: { type: 'string' },
|
|
@@ -96,11 +104,11 @@ export function registerDocumentAssetTools(registerTool, executeTool) {
|
|
|
96
104
|
inputSchema: {
|
|
97
105
|
properties: {
|
|
98
106
|
taskId: stringProperty('Task ID or task reference such as T-123.'),
|
|
99
|
-
id: stringProperty('Alias for taskId. Task ID or task reference such as T-123.'),
|
|
100
107
|
attachmentId: stringProperty('Optional attachment descriptor id to include content for one attachment.'),
|
|
101
108
|
format: stringProperty('Optional read format when attachmentId is provided. Use metadata for descriptors or download for a download URL.', ['text', 'metadata', 'download']),
|
|
102
|
-
maxChars:
|
|
109
|
+
maxChars: integerProperty('Optional max inline character count for readable text attachments. Longer content is truncated with size metadata and a download hint.', 1),
|
|
103
110
|
},
|
|
111
|
+
required: ['taskId'],
|
|
104
112
|
},
|
|
105
113
|
}));
|
|
106
114
|
register('get_workstream_attachments', (context) => ({
|
|
@@ -110,7 +118,7 @@ export function registerDocumentAssetTools(registerTool, executeTool) {
|
|
|
110
118
|
id: stringProperty('Workstream ID or workstream reference such as WS-123.'),
|
|
111
119
|
attachmentId: stringProperty('Optional attachment descriptor id to include content for one attachment.'),
|
|
112
120
|
format: stringProperty('Optional read format when attachmentId is provided. Use metadata for descriptors or download for a download URL.', ['text', 'metadata', 'download']),
|
|
113
|
-
maxChars:
|
|
121
|
+
maxChars: integerProperty('Optional max inline character count for readable text attachments. Longer content is truncated with size metadata and a download hint.', 1),
|
|
114
122
|
},
|
|
115
123
|
required: ['id'],
|
|
116
124
|
},
|
|
@@ -195,7 +203,7 @@ export function registerDocumentAssetTools(registerTool, executeTool) {
|
|
|
195
203
|
id: stringProperty('Initiative ID or initiative reference such as IN-123.'),
|
|
196
204
|
attachmentId: stringProperty('Optional attachment descriptor id to include content for one attachment.'),
|
|
197
205
|
format: stringProperty('Optional read format when attachmentId is provided. Use metadata for descriptors or download for a download URL.', ['text', 'metadata', 'download']),
|
|
198
|
-
maxChars:
|
|
206
|
+
maxChars: integerProperty('Optional max inline character count for readable text attachments. Longer content is truncated with size metadata and a download hint.', 1),
|
|
199
207
|
},
|
|
200
208
|
required: ['id'],
|
|
201
209
|
},
|
|
@@ -229,11 +237,12 @@ export function registerDocumentAssetTools(registerTool, executeTool) {
|
|
|
229
237
|
},
|
|
230
238
|
}));
|
|
231
239
|
register('search_images', (context) => ({
|
|
232
|
-
description: context.describeTool('Search image assets by keyword, title, filename, caption, or I-123 reference. Use
|
|
240
|
+
description: context.describeTool('Search image assets by keyword, title, filename, caption, or I-123 reference. Use offset/limit to continue broad searches, then call get_image for the selected result.'),
|
|
233
241
|
inputSchema: {
|
|
234
242
|
properties: {
|
|
235
243
|
query: stringProperty('Search term for image lookup, including I-123 references.'),
|
|
236
|
-
limit:
|
|
244
|
+
limit: integerProperty('Page size (default 10; max 50).', 1, 50),
|
|
245
|
+
offset: integerProperty('Non-negative result offset (default 0).', 0),
|
|
237
246
|
},
|
|
238
247
|
required: ['query'],
|
|
239
248
|
},
|
|
@@ -242,17 +251,18 @@ export function registerDocumentAssetTools(registerTool, executeTool) {
|
|
|
242
251
|
description: context.describeTool('Get a single image by asset id or image reference such as I-123. Use this first when the user references an image, then use get_image_annotations for saved annotation sessions and payloads. When the image is being used for UI, placement, or visual correction feedback, read the saved annotation payload before making changes.'),
|
|
243
252
|
inputSchema: {
|
|
244
253
|
properties: {
|
|
245
|
-
|
|
246
|
-
imageId: stringProperty('Alias for id. Image asset id or image reference such as I-123.'),
|
|
254
|
+
imageId: stringProperty('Image asset id or image reference such as I-123.'),
|
|
247
255
|
},
|
|
256
|
+
required: ['imageId'],
|
|
248
257
|
},
|
|
249
258
|
}));
|
|
250
259
|
register('search_documents', (context) => ({
|
|
251
|
-
description: context.describeTool('Search document assets by keyword, title, filename, caption, or D-123 reference. Use
|
|
260
|
+
description: context.describeTool('Search document assets by keyword, title, filename, caption, or D-123 reference. Use offset/limit to continue broad searches, then call get_document for the selected result.'),
|
|
252
261
|
inputSchema: {
|
|
253
262
|
properties: {
|
|
254
263
|
query: stringProperty('Search term for document lookup, including D-123 references.'),
|
|
255
|
-
limit:
|
|
264
|
+
limit: integerProperty('Page size (default 10; max 50).', 1, 50),
|
|
265
|
+
offset: integerProperty('Non-negative result offset (default 0).', 0),
|
|
256
266
|
},
|
|
257
267
|
required: ['query'],
|
|
258
268
|
},
|
|
@@ -264,7 +274,7 @@ export function registerDocumentAssetTools(registerTool, executeTool) {
|
|
|
264
274
|
documentId: stringProperty('Document asset id or document reference such as D-123.'),
|
|
265
275
|
includeContent: booleanProperty('When true, include bounded inline text content or a download reference for binary documents.'),
|
|
266
276
|
format: stringProperty('Optional read mode when including content.', ['metadata', 'text', 'content', 'full', 'download']),
|
|
267
|
-
maxChars:
|
|
277
|
+
maxChars: integerProperty('Optional max inline character count for readable documents. Longer content is truncated with size metadata and a download hint.', 1),
|
|
268
278
|
},
|
|
269
279
|
required: ['documentId'],
|
|
270
280
|
},
|
|
@@ -289,7 +299,6 @@ export function registerDocumentAssetTools(registerTool, executeTool) {
|
|
|
289
299
|
inputSchema: {
|
|
290
300
|
properties: {
|
|
291
301
|
imageId: stringProperty('Image asset id or image reference such as I-123.'),
|
|
292
|
-
imageAssetId: stringProperty('Alias for imageId. Image asset id or image reference such as I-123.'),
|
|
293
302
|
taskId: stringProperty('Optional task ID or task reference such as T-123 to narrow sessions linked to one task.'),
|
|
294
303
|
sessionId: stringProperty('Optional annotated attachment session id to include the structured payload for one session.'),
|
|
295
304
|
},
|
|
@@ -348,16 +357,16 @@ export function registerDocumentAssetTools(registerTool, executeTool) {
|
|
|
348
357
|
sessionId: stringProperty('Annotated attachment session id.'),
|
|
349
358
|
type: stringProperty('Marker type.'),
|
|
350
359
|
kind: stringProperty('Alias for type. Marker kind: pin, box, arrow, or text-note.'),
|
|
351
|
-
x:
|
|
352
|
-
y:
|
|
353
|
-
width:
|
|
354
|
-
height:
|
|
360
|
+
x: boundedNumberProperty('Normalized x coordinate in the 0..1 range.', 0, 1),
|
|
361
|
+
y: boundedNumberProperty('Normalized y coordinate in the 0..1 range.', 0, 1),
|
|
362
|
+
width: boundedNumberProperty('Optional normalized width in the 0..1 range.', 0, 1),
|
|
363
|
+
height: boundedNumberProperty('Optional normalized height in the 0..1 range.', 0, 1),
|
|
355
364
|
text: stringProperty('Optional marker text or note.'),
|
|
356
365
|
instruction: stringProperty('Alias for text. Marker instruction or note.'),
|
|
357
366
|
instructionType: stringProperty('Optional marker instruction category.'),
|
|
358
367
|
color: stringProperty('Optional marker color.'),
|
|
359
|
-
x2:
|
|
360
|
-
y2:
|
|
368
|
+
x2: boundedNumberProperty('Arrow endpoint normalized x coordinate.', 0, 1),
|
|
369
|
+
y2: boundedNumberProperty('Arrow endpoint normalized y coordinate.', 0, 1),
|
|
361
370
|
},
|
|
362
371
|
required: ['sessionId'],
|
|
363
372
|
},
|
|
@@ -378,12 +387,12 @@ export function registerDocumentAssetTools(registerTool, executeTool) {
|
|
|
378
387
|
properties: {
|
|
379
388
|
sessionId: stringProperty('Annotated attachment session id.'),
|
|
380
389
|
markerId: stringProperty('Marker id within the session.'),
|
|
381
|
-
x:
|
|
382
|
-
y:
|
|
383
|
-
width:
|
|
384
|
-
height:
|
|
385
|
-
x2:
|
|
386
|
-
y2:
|
|
390
|
+
x: boundedNumberProperty('Updated normalized x coordinate.', 0, 1),
|
|
391
|
+
y: boundedNumberProperty('Updated normalized y coordinate.', 0, 1),
|
|
392
|
+
width: boundedNumberProperty('Updated normalized width.', 0, 1),
|
|
393
|
+
height: boundedNumberProperty('Updated normalized height.', 0, 1),
|
|
394
|
+
x2: boundedNumberProperty('Updated arrow endpoint normalized x coordinate.', 0, 1),
|
|
395
|
+
y2: boundedNumberProperty('Updated arrow endpoint normalized y coordinate.', 0, 1),
|
|
387
396
|
instruction: stringProperty('Updated marker instruction.'),
|
|
388
397
|
instructionType: stringProperty('Updated marker instruction category.'),
|
|
389
398
|
color: stringProperty('Updated marker color.'),
|
|
@@ -397,7 +406,7 @@ export function registerDocumentAssetTools(registerTool, executeTool) {
|
|
|
397
406
|
properties: {
|
|
398
407
|
sessionId: stringProperty('Annotated attachment session id.'),
|
|
399
408
|
markerId: stringProperty('Marker id within the session.'),
|
|
400
|
-
toIndex:
|
|
409
|
+
toIndex: integerProperty('Target zero-based review order.', 0),
|
|
401
410
|
},
|
|
402
411
|
required: ['sessionId', 'markerId', 'toIndex'],
|
|
403
412
|
},
|
|
@@ -541,9 +550,9 @@ export function registerDocumentAssetTools(registerTool, executeTool) {
|
|
|
541
550
|
uploadedPath: stringProperty('Finalize a previously staged remote upload by passing the uploaded Taskforce storage path returned by save_task_attachment init mode.'),
|
|
542
551
|
uploadDraftId: stringProperty('Finalize a previously staged remote upload by passing the uploadDraftId returned by save_task_attachment init mode.'),
|
|
543
552
|
mimeType: stringProperty('Mime type for staged remote uploads such as image/png or image/jpeg. Provide this with sizeBytes to start a staged upload.'),
|
|
544
|
-
sizeBytes:
|
|
553
|
+
sizeBytes: integerProperty('File size in bytes for staged remote uploads. Provide this with mimeType to start a staged upload.', 0),
|
|
545
554
|
}),
|
|
546
|
-
expectedSizeBytes:
|
|
555
|
+
expectedSizeBytes: integerProperty('Optional exact byte count for integrity verification. The save is rejected before attachment when the persisted bytes would differ.', 0),
|
|
547
556
|
expectedSha256: stringProperty('Optional lowercase or uppercase SHA-256 hex digest for integrity verification. The save is rejected before attachment when the persisted bytes would differ.'),
|
|
548
557
|
displayName: stringProperty('Optional attachment display name. Defaults to filename and is independent from caption.'),
|
|
549
558
|
caption: stringProperty('Optional attachment caption.'),
|
|
@@ -51,8 +51,10 @@ export function createDocumentHelpers(deps) {
|
|
|
51
51
|
}
|
|
52
52
|
const requestedLimit = Number(options?.limit);
|
|
53
53
|
const limit = Number.isFinite(requestedLimit)
|
|
54
|
-
? Math.max(1, Math.min(
|
|
54
|
+
? Math.max(1, Math.min(51, Math.trunc(requestedLimit)))
|
|
55
55
|
: 10;
|
|
56
|
+
const requestedOffset = Number(options?.offset);
|
|
57
|
+
const offset = Number.isFinite(requestedOffset) ? Math.max(0, Math.trunc(requestedOffset)) : 0;
|
|
56
58
|
const normalize = (value) => typeof value === 'string' ? value.trim().toLowerCase() : '';
|
|
57
59
|
const tokenize = (value) => normalize(value).split(/[^a-z0-9]+/i).filter(Boolean);
|
|
58
60
|
const allDocuments = deps.workspaceAssetStore.listDocumentsByWorkspace(deps.activeWorkspaceId);
|
|
@@ -103,8 +105,10 @@ export function createDocumentHelpers(deps) {
|
|
|
103
105
|
return [{ asset, matchedOn: Array.from(matchedOn), score }];
|
|
104
106
|
});
|
|
105
107
|
return scoredMatches
|
|
106
|
-
.sort((a, b) => b.score - a.score
|
|
107
|
-
.
|
|
108
|
+
.sort((a, b) => b.score - a.score
|
|
109
|
+
|| String(b.asset.updatedAt || '').localeCompare(String(a.asset.updatedAt || ''))
|
|
110
|
+
|| a.asset.assetId.localeCompare(b.asset.assetId))
|
|
111
|
+
.slice(offset, offset + limit);
|
|
108
112
|
};
|
|
109
113
|
const resolveDocumentAssetByIdentifierOrThrow = (documentIdentifier, options) => {
|
|
110
114
|
const normalizedValue = typeof documentIdentifier === 'string' ? documentIdentifier.trim() : '';
|