@langadventurellc/task-trellis-mcp 1.0.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -263
- package/dist/__tests__/e2e/autoPrune.e2e.test.d.ts +2 -0
- package/dist/__tests__/e2e/autoPrune.e2e.test.d.ts.map +1 -0
- package/dist/__tests__/e2e/autoPrune.e2e.test.js +533 -0
- package/dist/__tests__/e2e/autoPrune.e2e.test.js.map +1 -0
- package/dist/__tests__/e2e/configuration/activation.e2e.test.js +6 -6
- package/dist/__tests__/e2e/configuration/activation.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/configuration/commandLineArgs.e2e.test.js +55 -6
- package/dist/__tests__/e2e/configuration/commandLineArgs.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/configuration/directorySetup.e2e.test.js +19 -19
- package/dist/__tests__/e2e/configuration/directorySetup.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/configuration/invalidConfig.e2e.test.js +9 -9
- package/dist/__tests__/e2e/configuration/invalidConfig.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/configuration/preActivation.e2e.test.js +15 -15
- package/dist/__tests__/e2e/configuration/preActivation.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/crud/createObject.e2e.test.js +94 -42
- package/dist/__tests__/e2e/crud/createObject.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/crud/deleteObject.e2e.test.js +19 -19
- package/dist/__tests__/e2e/crud/deleteObject.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/crud/fileValidation.e2e.test.js +32 -32
- package/dist/__tests__/e2e/crud/fileValidation.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/crud/getObject.e2e.test.js +143 -22
- package/dist/__tests__/e2e/crud/getObject.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/crud/listObjects.e2e.test.js +810 -121
- package/dist/__tests__/e2e/crud/listObjects.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/crud/updateObject.e2e.test.js +497 -25
- package/dist/__tests__/e2e/crud/updateObject.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/hierarchicalPrerequisites.e2e.test.d.ts +2 -0
- package/dist/__tests__/e2e/hierarchicalPrerequisites.e2e.test.d.ts.map +1 -0
- package/dist/__tests__/e2e/hierarchicalPrerequisites.e2e.test.js +319 -0
- package/dist/__tests__/e2e/hierarchicalPrerequisites.e2e.test.js.map +1 -0
- package/dist/__tests__/e2e/infrastructure/client.e2e.test.js +4 -4
- package/dist/__tests__/e2e/infrastructure/client.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/infrastructure/server.e2e.test.js +6 -6
- package/dist/__tests__/e2e/infrastructure/server.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/utils/extractObjectIds.d.ts +5 -0
- package/dist/__tests__/e2e/utils/extractObjectIds.d.ts.map +1 -0
- package/dist/__tests__/e2e/utils/extractObjectIds.js +12 -0
- package/dist/__tests__/e2e/utils/extractObjectIds.js.map +1 -0
- package/dist/__tests__/e2e/utils/index.d.ts +1 -0
- package/dist/__tests__/e2e/utils/index.d.ts.map +1 -1
- package/dist/__tests__/e2e/utils/index.js +3 -1
- package/dist/__tests__/e2e/utils/index.js.map +1 -1
- package/dist/__tests__/e2e/utils/mcpTestClient.d.ts +2 -1
- package/dist/__tests__/e2e/utils/mcpTestClient.d.ts.map +1 -1
- package/dist/__tests__/e2e/utils/mcpTestClient.js +15 -8
- package/dist/__tests__/e2e/utils/mcpTestClient.js.map +1 -1
- package/dist/__tests__/e2e/utils/parseListObjectsResponse.d.ts +4 -2
- package/dist/__tests__/e2e/utils/parseListObjectsResponse.d.ts.map +1 -1
- package/dist/__tests__/e2e/utils/parseListObjectsResponse.js +2 -1
- package/dist/__tests__/e2e/utils/parseListObjectsResponse.js.map +1 -1
- package/dist/__tests__/e2e/utils/parseUpdateObjectResponse.d.ts +1 -1
- package/dist/__tests__/e2e/utils/parseUpdateObjectResponse.js +1 -1
- package/dist/__tests__/e2e/workflow/appendLog.e2e.test.js +4 -4
- package/dist/__tests__/e2e/workflow/appendLog.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/workflow/appendModifiedFiles.e2e.test.d.ts +2 -0
- package/dist/__tests__/e2e/workflow/appendModifiedFiles.e2e.test.d.ts.map +1 -0
- package/dist/__tests__/e2e/workflow/appendModifiedFiles.e2e.test.js +597 -0
- package/dist/__tests__/e2e/workflow/appendModifiedFiles.e2e.test.js.map +1 -0
- package/dist/__tests__/e2e/workflow/claimTask.e2e.test.js +233 -0
- package/dist/__tests__/e2e/workflow/claimTask.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/workflow/completeTask.e2e.test.js +447 -1
- package/dist/__tests__/e2e/workflow/completeTask.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/workflow/prerequisites.e2e.test.js +43 -43
- package/dist/__tests__/e2e/workflow/prerequisites.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/workflow/taskLifecycle.e2e.test.js +22 -26
- package/dist/__tests__/e2e/workflow/taskLifecycle.e2e.test.js.map +1 -1
- package/dist/__tests__/serverStartup.test.d.ts +2 -0
- package/dist/__tests__/serverStartup.test.d.ts.map +1 -0
- package/dist/__tests__/serverStartup.test.js +171 -0
- package/dist/__tests__/serverStartup.test.js.map +1 -0
- package/dist/configuration/ServerConfig.d.ts +2 -0
- package/dist/configuration/ServerConfig.d.ts.map +1 -1
- package/dist/models/TrellisObjectSummary.d.ts +16 -0
- package/dist/models/TrellisObjectSummary.d.ts.map +1 -0
- package/dist/{utils/ReplaceStringOptions.js → models/TrellisObjectSummary.js} +1 -1
- package/dist/models/TrellisObjectSummary.js.map +1 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js.map +1 -1
- package/dist/repositories/Repository.d.ts +2 -1
- package/dist/repositories/Repository.d.ts.map +1 -1
- package/dist/repositories/local/LocalRepository.d.ts +2 -1
- package/dist/repositories/local/LocalRepository.d.ts.map +1 -1
- package/dist/repositories/local/LocalRepository.js +4 -0
- package/dist/repositories/local/LocalRepository.js.map +1 -1
- package/dist/repositories/local/__tests__/getChildrenOf.test.d.ts +2 -0
- package/dist/repositories/local/__tests__/getChildrenOf.test.d.ts.map +1 -0
- package/dist/repositories/local/__tests__/getChildrenOf.test.js +306 -0
- package/dist/repositories/local/__tests__/getChildrenOf.test.js.map +1 -0
- package/dist/repositories/local/__tests__/getObjectFilePath.test.js +9 -6
- package/dist/repositories/local/__tests__/getObjectFilePath.test.js.map +1 -1
- package/dist/repositories/local/__tests__/getObjects.test.js +349 -10
- package/dist/repositories/local/__tests__/getObjects.test.js.map +1 -1
- package/dist/repositories/local/deleteObjectById.d.ts.map +1 -1
- package/dist/repositories/local/deleteObjectById.js +2 -0
- package/dist/repositories/local/deleteObjectById.js.map +1 -1
- package/dist/repositories/local/getChildrenOf.d.ts +11 -0
- package/dist/repositories/local/getChildrenOf.d.ts.map +1 -0
- package/dist/repositories/local/getChildrenOf.js +73 -0
- package/dist/repositories/local/getChildrenOf.js.map +1 -0
- package/dist/repositories/local/getObjectFilePath.d.ts.map +1 -1
- package/dist/repositories/local/getObjectFilePath.js +8 -4
- package/dist/repositories/local/getObjectFilePath.js.map +1 -1
- package/dist/repositories/local/getObjects.d.ts +1 -1
- package/dist/repositories/local/getObjects.d.ts.map +1 -1
- package/dist/repositories/local/getObjects.js +31 -7
- package/dist/repositories/local/getObjects.js.map +1 -1
- package/dist/server.js +57 -19
- package/dist/server.js.map +1 -1
- package/dist/services/TaskTrellisService.d.ts +78 -0
- package/dist/services/TaskTrellisService.d.ts.map +1 -0
- package/dist/services/TaskTrellisService.js +3 -0
- package/dist/services/TaskTrellisService.js.map +1 -0
- package/dist/services/local/LocalTaskTrellisService.d.ts +55 -0
- package/dist/services/local/LocalTaskTrellisService.d.ts.map +1 -0
- package/dist/services/local/LocalTaskTrellisService.js +73 -0
- package/dist/services/local/LocalTaskTrellisService.js.map +1 -0
- package/dist/services/local/__tests__/appendAffectedFiles.test.d.ts +2 -0
- package/dist/services/local/__tests__/appendAffectedFiles.test.d.ts.map +1 -0
- package/dist/services/local/__tests__/appendAffectedFiles.test.js +202 -0
- package/dist/services/local/__tests__/appendAffectedFiles.test.js.map +1 -0
- package/dist/services/local/__tests__/appendModifiedFiles.test.d.ts +2 -0
- package/dist/services/local/__tests__/appendModifiedFiles.test.d.ts.map +1 -0
- package/dist/services/local/__tests__/appendModifiedFiles.test.js +162 -0
- package/dist/services/local/__tests__/appendModifiedFiles.test.js.map +1 -0
- package/dist/services/local/__tests__/appendObjectLog.test.d.ts +2 -0
- package/dist/services/local/__tests__/appendObjectLog.test.d.ts.map +1 -0
- package/dist/services/local/__tests__/appendObjectLog.test.js +105 -0
- package/dist/services/local/__tests__/appendObjectLog.test.js.map +1 -0
- package/dist/services/local/__tests__/claimTask.test.d.ts +2 -0
- package/dist/services/local/__tests__/claimTask.test.d.ts.map +1 -0
- package/dist/services/local/__tests__/claimTask.test.js +459 -0
- package/dist/services/local/__tests__/claimTask.test.js.map +1 -0
- package/dist/services/local/__tests__/completeTask.test.d.ts +2 -0
- package/dist/services/local/__tests__/completeTask.test.d.ts.map +1 -0
- package/dist/services/local/__tests__/completeTask.test.js +470 -0
- package/dist/services/local/__tests__/completeTask.test.js.map +1 -0
- package/dist/services/local/__tests__/createObject.test.d.ts +2 -0
- package/dist/services/local/__tests__/createObject.test.d.ts.map +1 -0
- package/dist/services/local/__tests__/createObject.test.js +333 -0
- package/dist/services/local/__tests__/createObject.test.js.map +1 -0
- package/dist/services/local/__tests__/listObjects.test.d.ts +2 -0
- package/dist/services/local/__tests__/listObjects.test.d.ts.map +1 -0
- package/dist/services/local/__tests__/listObjects.test.js +351 -0
- package/dist/services/local/__tests__/listObjects.test.js.map +1 -0
- package/dist/services/local/__tests__/pruneClosed.test.d.ts +2 -0
- package/dist/services/local/__tests__/pruneClosed.test.d.ts.map +1 -0
- package/dist/services/local/__tests__/pruneClosed.test.js +473 -0
- package/dist/services/local/__tests__/pruneClosed.test.js.map +1 -0
- package/dist/services/local/__tests__/updateObject.test.d.ts +2 -0
- package/dist/services/local/__tests__/updateObject.test.d.ts.map +1 -0
- package/dist/services/local/__tests__/updateObject.test.js +521 -0
- package/dist/services/local/__tests__/updateObject.test.js.map +1 -0
- package/dist/services/local/appendAffectedFiles.d.ts +12 -0
- package/dist/services/local/appendAffectedFiles.d.ts.map +1 -0
- package/dist/services/local/appendAffectedFiles.js +34 -0
- package/dist/services/local/appendAffectedFiles.js.map +1 -0
- package/dist/services/local/appendModifiedFiles.d.ts +15 -0
- package/dist/services/local/appendModifiedFiles.d.ts.map +1 -0
- package/dist/services/local/appendModifiedFiles.js +39 -0
- package/dist/services/local/appendModifiedFiles.js.map +1 -0
- package/dist/services/local/appendObjectLog.d.ts +8 -0
- package/dist/services/local/appendObjectLog.d.ts.map +1 -0
- package/dist/services/local/appendObjectLog.js +45 -0
- package/dist/services/local/appendObjectLog.js.map +1 -0
- package/dist/services/local/claimTask.d.ts +8 -0
- package/dist/services/local/claimTask.d.ts.map +1 -0
- package/dist/services/local/claimTask.js +109 -0
- package/dist/services/local/claimTask.js.map +1 -0
- package/dist/services/local/completeTask.d.ts +9 -0
- package/dist/services/local/completeTask.d.ts.map +1 -0
- package/dist/services/local/completeTask.js +38 -0
- package/dist/services/local/completeTask.js.map +1 -0
- package/dist/services/local/createObject.d.ts +9 -0
- package/dist/services/local/createObject.d.ts.map +1 -0
- package/dist/services/local/createObject.js +44 -0
- package/dist/services/local/createObject.js.map +1 -0
- package/dist/services/local/listObjects.d.ts +9 -0
- package/dist/services/local/listObjects.d.ts.map +1 -0
- package/dist/services/local/listObjects.js +52 -0
- package/dist/services/local/listObjects.js.map +1 -0
- package/dist/services/local/pruneClosed.d.ts +8 -0
- package/dist/services/local/pruneClosed.d.ts.map +1 -0
- package/dist/services/local/pruneClosed.js +112 -0
- package/dist/services/local/pruneClosed.js.map +1 -0
- package/dist/services/local/updateObject.d.ts +10 -0
- package/dist/services/local/updateObject.d.ts.map +1 -0
- package/dist/services/local/updateObject.js +80 -0
- package/dist/services/local/updateObject.js.map +1 -0
- package/dist/tools/__tests__/appendModifiedFilesTool.test.d.ts +2 -0
- package/dist/tools/__tests__/appendModifiedFilesTool.test.d.ts.map +1 -0
- package/dist/tools/__tests__/appendModifiedFilesTool.test.js +178 -0
- package/dist/tools/__tests__/appendModifiedFilesTool.test.js.map +1 -0
- package/dist/tools/__tests__/appendObjectLogTool.test.js +34 -101
- package/dist/tools/__tests__/appendObjectLogTool.test.js.map +1 -1
- package/dist/tools/__tests__/claimTaskTool.test.js +98 -311
- package/dist/tools/__tests__/claimTaskTool.test.js.map +1 -1
- package/dist/tools/__tests__/completeTaskTool.test.js +140 -183
- package/dist/tools/__tests__/completeTaskTool.test.js.map +1 -1
- package/dist/tools/__tests__/createObjectTool.test.js +62 -325
- package/dist/tools/__tests__/createObjectTool.test.js.map +1 -1
- package/dist/tools/__tests__/deleteObjectTool.test.js +1 -0
- package/dist/tools/__tests__/deleteObjectTool.test.js.map +1 -1
- package/dist/tools/__tests__/getObjectTool.test.js +1 -0
- package/dist/tools/__tests__/getObjectTool.test.js.map +1 -1
- package/dist/tools/__tests__/listObjectsTool.test.js +228 -108
- package/dist/tools/__tests__/listObjectsTool.test.js.map +1 -1
- package/dist/tools/__tests__/updateObjectTool.test.js +78 -167
- package/dist/tools/__tests__/updateObjectTool.test.js.map +1 -1
- package/dist/tools/appendModifiedFilesTool.d.ts +30 -0
- package/dist/tools/appendModifiedFilesTool.d.ts.map +1 -0
- package/dist/tools/appendModifiedFilesTool.js +55 -0
- package/dist/tools/appendModifiedFilesTool.js.map +1 -0
- package/dist/tools/appendObjectLogTool.d.ts +7 -6
- package/dist/tools/appendObjectLogTool.d.ts.map +1 -1
- package/dist/tools/appendObjectLogTool.js +6 -44
- package/dist/tools/appendObjectLogTool.js.map +1 -1
- package/dist/tools/claimTaskTool.d.ts +4 -3
- package/dist/tools/claimTaskTool.d.ts.map +1 -1
- package/dist/tools/claimTaskTool.js +2 -80
- package/dist/tools/claimTaskTool.js.map +1 -1
- package/dist/tools/completeTaskTool.d.ts +5 -3
- package/dist/tools/completeTaskTool.d.ts.map +1 -1
- package/dist/tools/completeTaskTool.js +3 -29
- package/dist/tools/completeTaskTool.js.map +1 -1
- package/dist/tools/createObjectTool.d.ts +13 -12
- package/dist/tools/createObjectTool.d.ts.map +1 -1
- package/dist/tools/createObjectTool.js +22 -55
- package/dist/tools/createObjectTool.js.map +1 -1
- package/dist/tools/deleteObjectTool.d.ts +3 -3
- package/dist/tools/deleteObjectTool.js +12 -12
- package/dist/tools/deleteObjectTool.js.map +1 -1
- package/dist/tools/getObjectTool.d.ts +3 -3
- package/dist/tools/getObjectTool.d.ts.map +1 -1
- package/dist/tools/getObjectTool.js +12 -7
- package/dist/tools/getObjectTool.js.map +1 -1
- package/dist/tools/index.d.ts +7 -8
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +22 -25
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/listObjectsTool.d.ts +24 -14
- package/dist/tools/listObjectsTool.d.ts.map +1 -1
- package/dist/tools/listObjectsTool.js +114 -50
- package/dist/tools/listObjectsTool.js.map +1 -1
- package/dist/tools/updateObjectTool.d.ts +15 -9
- package/dist/tools/updateObjectTool.d.ts.map +1 -1
- package/dist/tools/updateObjectTool.js +20 -60
- package/dist/tools/updateObjectTool.js.map +1 -1
- package/dist/utils/__tests__/checkHierarchicalPrerequisitesComplete.test.d.ts +2 -0
- package/dist/utils/__tests__/checkHierarchicalPrerequisitesComplete.test.d.ts.map +1 -0
- package/dist/utils/__tests__/checkHierarchicalPrerequisitesComplete.test.js +206 -0
- package/dist/utils/__tests__/checkHierarchicalPrerequisitesComplete.test.js.map +1 -0
- package/dist/utils/__tests__/checkPrerequisitesComplete.test.js +5 -0
- package/dist/utils/__tests__/checkPrerequisitesComplete.test.js.map +1 -1
- package/dist/utils/__tests__/filterUnavailableObjects.test.js +51 -25
- package/dist/utils/__tests__/filterUnavailableObjects.test.js.map +1 -1
- package/dist/utils/__tests__/isRequiredForOtherObjects.test.js +5 -0
- package/dist/utils/__tests__/isRequiredForOtherObjects.test.js.map +1 -1
- package/dist/utils/__tests__/updateParentHierarchy.test.d.ts +2 -0
- package/dist/utils/__tests__/updateParentHierarchy.test.d.ts.map +1 -0
- package/dist/utils/__tests__/updateParentHierarchy.test.js +137 -0
- package/dist/utils/__tests__/updateParentHierarchy.test.js.map +1 -0
- package/dist/utils/autoCompleteParentHierarchy.d.ts +11 -0
- package/dist/utils/autoCompleteParentHierarchy.d.ts.map +1 -0
- package/dist/utils/autoCompleteParentHierarchy.js +49 -0
- package/dist/utils/autoCompleteParentHierarchy.js.map +1 -0
- package/dist/utils/checkHierarchicalPrerequisitesComplete.d.ts +14 -0
- package/dist/utils/checkHierarchicalPrerequisitesComplete.d.ts.map +1 -0
- package/dist/utils/checkHierarchicalPrerequisitesComplete.js +47 -0
- package/dist/utils/checkHierarchicalPrerequisitesComplete.js.map +1 -0
- package/dist/utils/filterUnavailableObjects.d.ts +6 -4
- package/dist/utils/filterUnavailableObjects.d.ts.map +1 -1
- package/dist/utils/filterUnavailableObjects.js +16 -22
- package/dist/utils/filterUnavailableObjects.js.map +1 -1
- package/dist/utils/index.d.ts +3 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +7 -3
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/updateParentHierarchy.d.ts +11 -0
- package/dist/utils/updateParentHierarchy.d.ts.map +1 -0
- package/dist/utils/updateParentHierarchy.js +40 -0
- package/dist/utils/updateParentHierarchy.js.map +1 -0
- package/dist/validation/__tests__/validateObjectCreation.test.js +1 -0
- package/dist/validation/__tests__/validateObjectCreation.test.js.map +1 -1
- package/dist/validation/__tests__/validateParentExists.test.js +1 -0
- package/dist/validation/__tests__/validateParentExists.test.js.map +1 -1
- package/dist/validation/__tests__/validateParentType.test.js +5 -5
- package/dist/validation/__tests__/validateParentType.test.js.map +1 -1
- package/dist/validation/__tests__/validateStatusTransition.test.js +1 -0
- package/dist/validation/__tests__/validateStatusTransition.test.js.map +1 -1
- package/dist/validation/validateParentType.d.ts +1 -1
- package/dist/validation/validateParentType.d.ts.map +1 -1
- package/dist/validation/validateParentType.js +2 -5
- package/dist/validation/validateParentType.js.map +1 -1
- package/package.json +1 -1
- package/dist/__tests__/e2e/crud/replaceObjectBodyRegex.e2e.test.d.ts +0 -2
- package/dist/__tests__/e2e/crud/replaceObjectBodyRegex.e2e.test.d.ts.map +0 -1
- package/dist/__tests__/e2e/crud/replaceObjectBodyRegex.e2e.test.js +0 -693
- package/dist/__tests__/e2e/crud/replaceObjectBodyRegex.e2e.test.js.map +0 -1
- package/dist/__tests__/e2e/workflow/pruneClosed.e2e.test.d.ts +0 -2
- package/dist/__tests__/e2e/workflow/pruneClosed.e2e.test.d.ts.map +0 -1
- package/dist/__tests__/e2e/workflow/pruneClosed.e2e.test.js +0 -352
- package/dist/__tests__/e2e/workflow/pruneClosed.e2e.test.js.map +0 -1
- package/dist/tools/__tests__/pruneClosedTool.test.d.ts +0 -2
- package/dist/tools/__tests__/pruneClosedTool.test.d.ts.map +0 -1
- package/dist/tools/__tests__/pruneClosedTool.test.js +0 -171
- package/dist/tools/__tests__/pruneClosedTool.test.js.map +0 -1
- package/dist/tools/__tests__/replaceObjectBodyRegexTool.test.d.ts +0 -2
- package/dist/tools/__tests__/replaceObjectBodyRegexTool.test.d.ts.map +0 -1
- package/dist/tools/__tests__/replaceObjectBodyRegexTool.test.js +0 -258
- package/dist/tools/__tests__/replaceObjectBodyRegexTool.test.js.map +0 -1
- package/dist/tools/pruneClosedTool.d.ts +0 -26
- package/dist/tools/pruneClosedTool.d.ts.map +0 -1
- package/dist/tools/pruneClosedTool.js +0 -106
- package/dist/tools/pruneClosedTool.js.map +0 -1
- package/dist/tools/replaceObjectBodyRegexTool.d.ts +0 -35
- package/dist/tools/replaceObjectBodyRegexTool.d.ts.map +0 -1
- package/dist/tools/replaceObjectBodyRegexTool.js +0 -145
- package/dist/tools/replaceObjectBodyRegexTool.js.map +0 -1
- package/dist/utils/ReplaceStringOptions.d.ts +0 -12
- package/dist/utils/ReplaceStringOptions.d.ts.map +0 -1
- package/dist/utils/ReplaceStringOptions.js.map +0 -1
- package/dist/utils/__tests__/replaceStringWithRegex.test.d.ts +0 -2
- package/dist/utils/__tests__/replaceStringWithRegex.test.d.ts.map +0 -1
- package/dist/utils/__tests__/replaceStringWithRegex.test.js +0 -281
- package/dist/utils/__tests__/replaceStringWithRegex.test.js.map +0 -1
- package/dist/utils/replaceStringWithRegex.d.ts +0 -45
- package/dist/utils/replaceStringWithRegex.d.ts.map +0 -1
- package/dist/utils/replaceStringWithRegex.js +0 -91
- package/dist/utils/replaceStringWithRegex.js.map +0 -1
|
@@ -81,48 +81,44 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
81
81
|
}), { status: "open" });
|
|
82
82
|
});
|
|
83
83
|
it("should list only projects when type=project", async () => {
|
|
84
|
-
const result = await client.callTool("
|
|
84
|
+
const result = await client.callTool("list_issues", {
|
|
85
85
|
type: "project",
|
|
86
86
|
});
|
|
87
|
-
const objects = (0, utils_1.
|
|
87
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
88
88
|
expect(objects).toHaveLength(1);
|
|
89
|
-
expect(objects[0]
|
|
90
|
-
expect(objects[0].type).toBe("project");
|
|
89
|
+
expect(objects[0]).toBe("P-test-project");
|
|
91
90
|
});
|
|
92
91
|
it("should list only tasks when type=task", async () => {
|
|
93
|
-
const result = await client.callTool("
|
|
92
|
+
const result = await client.callTool("list_issues", {
|
|
94
93
|
type: "task",
|
|
95
94
|
});
|
|
96
|
-
const objects = (0, utils_1.
|
|
95
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
97
96
|
expect(objects).toHaveLength(1);
|
|
98
|
-
expect(objects[0]
|
|
99
|
-
expect(objects[0].type).toBe("task");
|
|
97
|
+
expect(objects[0]).toBe("T-test-task");
|
|
100
98
|
});
|
|
101
99
|
it("should list only epics when type=epic", async () => {
|
|
102
|
-
const result = await client.callTool("
|
|
100
|
+
const result = await client.callTool("list_issues", {
|
|
103
101
|
type: "epic",
|
|
104
102
|
});
|
|
105
|
-
const objects = (0, utils_1.
|
|
103
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
106
104
|
expect(objects).toHaveLength(1);
|
|
107
|
-
expect(objects[0]
|
|
108
|
-
expect(objects[0].type).toBe("epic");
|
|
105
|
+
expect(objects[0]).toBe("E-test-epic");
|
|
109
106
|
});
|
|
110
107
|
it("should list only features when type=feature", async () => {
|
|
111
|
-
const result = await client.callTool("
|
|
108
|
+
const result = await client.callTool("list_issues", {
|
|
112
109
|
type: "feature",
|
|
113
110
|
});
|
|
114
|
-
const objects = (0, utils_1.
|
|
111
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
115
112
|
expect(objects).toHaveLength(1);
|
|
116
|
-
expect(objects[0]
|
|
117
|
-
expect(objects[0].type).toBe("feature");
|
|
113
|
+
expect(objects[0]).toBe("F-test-feature");
|
|
118
114
|
});
|
|
119
115
|
it("should return empty array when no objects of specified type exist", async () => {
|
|
120
116
|
// Test with a scope that doesn't exist to get empty results
|
|
121
|
-
const result = await client.callTool("
|
|
117
|
+
const result = await client.callTool("list_issues", {
|
|
122
118
|
type: "task",
|
|
123
119
|
scope: "E-nonexistent-epic",
|
|
124
120
|
});
|
|
125
|
-
const objects = (0, utils_1.
|
|
121
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
126
122
|
expect(objects).toEqual([]);
|
|
127
123
|
});
|
|
128
124
|
});
|
|
@@ -141,41 +137,235 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
141
137
|
}
|
|
142
138
|
});
|
|
143
139
|
it("should filter objects by status", async () => {
|
|
144
|
-
const result = await client.callTool("
|
|
140
|
+
const result = await client.callTool("list_issues", {
|
|
145
141
|
type: "task",
|
|
146
142
|
status: "in-progress",
|
|
147
143
|
});
|
|
148
|
-
const objects = (0, utils_1.
|
|
144
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
149
145
|
expect(objects).toHaveLength(1);
|
|
150
|
-
expect(objects[0].status).toBe("in-progress");
|
|
151
146
|
});
|
|
152
147
|
it("should exclude closed tasks by default", async () => {
|
|
153
|
-
const result = await client.callTool("
|
|
148
|
+
const result = await client.callTool("list_issues", {
|
|
154
149
|
type: "task",
|
|
155
150
|
});
|
|
156
|
-
const objects = (0, utils_1.
|
|
157
|
-
|
|
158
|
-
|
|
151
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
152
|
+
// Note: Can't filter by status since only IDs are returned
|
|
153
|
+
// Expect only open objects to be returned by default (3 in this case)
|
|
154
|
+
expect(objects).toHaveLength(3);
|
|
159
155
|
});
|
|
160
156
|
it("should include closed tasks when includeClosed=true", async () => {
|
|
161
|
-
const result = await client.callTool("
|
|
157
|
+
const result = await client.callTool("list_issues", {
|
|
162
158
|
type: "task",
|
|
163
159
|
includeClosed: true,
|
|
164
160
|
});
|
|
165
|
-
const objects = (0, utils_1.
|
|
161
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
166
162
|
expect(objects).toHaveLength(5);
|
|
167
|
-
|
|
168
|
-
expect(closedTasks).toHaveLength(2);
|
|
163
|
+
// Note: Can't test individual object status since only IDs are returned
|
|
169
164
|
});
|
|
170
165
|
it("should filter open tasks correctly", async () => {
|
|
171
|
-
const result = await client.callTool("
|
|
166
|
+
const result = await client.callTool("list_issues", {
|
|
172
167
|
type: "task",
|
|
173
168
|
status: "open",
|
|
174
169
|
});
|
|
175
|
-
const objects = (0, utils_1.
|
|
170
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
176
171
|
expect(objects).toHaveLength(1);
|
|
177
|
-
expect(objects[0]
|
|
178
|
-
|
|
172
|
+
expect(objects[0]).toBe("T-open-task");
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
describe("includeClosed Flag with Different Object Types", () => {
|
|
176
|
+
beforeEach(async () => {
|
|
177
|
+
// Create projects with different statuses
|
|
178
|
+
const projectStatuses = [
|
|
179
|
+
{ status: "open", folder: "open" },
|
|
180
|
+
{ status: "done", folder: "closed" },
|
|
181
|
+
{ status: "wont-do", folder: "closed" },
|
|
182
|
+
];
|
|
183
|
+
for (const config of projectStatuses) {
|
|
184
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "project", `P-${config.status}-project`, (0, utils_1.createObjectContent)({
|
|
185
|
+
id: `P-${config.status}-project`,
|
|
186
|
+
title: `${config.status} Project`,
|
|
187
|
+
status: config.status,
|
|
188
|
+
}));
|
|
189
|
+
}
|
|
190
|
+
// Create a project first for epics to belong to
|
|
191
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "project", "P-epic-container", (0, utils_1.createObjectContent)({
|
|
192
|
+
id: "P-epic-container",
|
|
193
|
+
title: "Epic Container Project",
|
|
194
|
+
status: "open",
|
|
195
|
+
}));
|
|
196
|
+
// Create epics with different statuses within the project
|
|
197
|
+
const epicStatuses = [
|
|
198
|
+
{ status: "open", folder: "open" },
|
|
199
|
+
{ status: "in-progress", folder: "open" },
|
|
200
|
+
{ status: "done", folder: "closed" },
|
|
201
|
+
{ status: "wont-do", folder: "closed" },
|
|
202
|
+
];
|
|
203
|
+
for (const config of epicStatuses) {
|
|
204
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "epic", `E-${config.status}-epic`, (0, utils_1.createObjectContent)({
|
|
205
|
+
id: `E-${config.status}-epic`,
|
|
206
|
+
title: `${config.status} Epic`,
|
|
207
|
+
status: config.status,
|
|
208
|
+
parent: "P-epic-container",
|
|
209
|
+
}), { projectId: "P-epic-container" });
|
|
210
|
+
}
|
|
211
|
+
// Create features with different statuses
|
|
212
|
+
const featureStatuses = [
|
|
213
|
+
{ status: "draft", folder: "open" },
|
|
214
|
+
{ status: "open", folder: "open" },
|
|
215
|
+
{ status: "done", folder: "closed" },
|
|
216
|
+
{ status: "wont-do", folder: "closed" },
|
|
217
|
+
];
|
|
218
|
+
for (const config of featureStatuses) {
|
|
219
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "feature", `F-${config.status}-feature`, (0, utils_1.createObjectContent)({
|
|
220
|
+
id: `F-${config.status}-feature`,
|
|
221
|
+
title: `${config.status} Feature`,
|
|
222
|
+
status: config.status,
|
|
223
|
+
}));
|
|
224
|
+
}
|
|
225
|
+
// Create tasks with different statuses (already covered in other tests, but adding for completeness)
|
|
226
|
+
const taskStatuses = [
|
|
227
|
+
{ status: "draft", folder: "open" },
|
|
228
|
+
{ status: "open", folder: "open" },
|
|
229
|
+
{ status: "in-progress", folder: "open" },
|
|
230
|
+
{ status: "done", folder: "closed" },
|
|
231
|
+
{ status: "wont-do", folder: "closed" },
|
|
232
|
+
];
|
|
233
|
+
for (const config of taskStatuses) {
|
|
234
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "task", `T-${config.status}-includeclosed`, (0, utils_1.createObjectContent)({
|
|
235
|
+
id: `T-${config.status}-includeclosed`,
|
|
236
|
+
title: `${config.status} Task`,
|
|
237
|
+
status: config.status,
|
|
238
|
+
}), { status: config.folder });
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
it("should exclude closed projects by default", async () => {
|
|
242
|
+
const result = await client.callTool("list_issues", {
|
|
243
|
+
type: "project",
|
|
244
|
+
});
|
|
245
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
246
|
+
// Filter to only the objects we created in this test (excluding the epic container)
|
|
247
|
+
const testObjects = objects.filter((id) => id.includes("-project") && !id.includes("epic-container"));
|
|
248
|
+
expect(testObjects).toHaveLength(1);
|
|
249
|
+
expect(testObjects).toContain("P-open-project");
|
|
250
|
+
expect(testObjects).not.toContain("P-done-project");
|
|
251
|
+
expect(testObjects).not.toContain("P-wont-do-project");
|
|
252
|
+
});
|
|
253
|
+
it("should include closed projects when includeClosed=true", async () => {
|
|
254
|
+
const result = await client.callTool("list_issues", {
|
|
255
|
+
type: "project",
|
|
256
|
+
includeClosed: true,
|
|
257
|
+
});
|
|
258
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
259
|
+
// Filter to only the objects we created in this test (excluding the epic container)
|
|
260
|
+
const testObjects = objects.filter((id) => id.includes("-project") && !id.includes("epic-container"));
|
|
261
|
+
expect(testObjects).toHaveLength(3);
|
|
262
|
+
expect(testObjects).toContain("P-open-project");
|
|
263
|
+
expect(testObjects).toContain("P-done-project");
|
|
264
|
+
expect(testObjects).toContain("P-wont-do-project");
|
|
265
|
+
});
|
|
266
|
+
it("should exclude closed epics by default", async () => {
|
|
267
|
+
const result = await client.callTool("list_issues", {
|
|
268
|
+
type: "epic",
|
|
269
|
+
});
|
|
270
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
271
|
+
expect(objects).toHaveLength(2);
|
|
272
|
+
expect(objects).toContain("E-open-epic");
|
|
273
|
+
expect(objects).toContain("E-in-progress-epic");
|
|
274
|
+
expect(objects).not.toContain("E-done-epic");
|
|
275
|
+
expect(objects).not.toContain("E-wont-do-epic");
|
|
276
|
+
});
|
|
277
|
+
it("should include closed epics when includeClosed=true", async () => {
|
|
278
|
+
const result = await client.callTool("list_issues", {
|
|
279
|
+
type: "epic",
|
|
280
|
+
includeClosed: true,
|
|
281
|
+
});
|
|
282
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
283
|
+
expect(objects).toHaveLength(4);
|
|
284
|
+
expect(objects).toContain("E-open-epic");
|
|
285
|
+
expect(objects).toContain("E-in-progress-epic");
|
|
286
|
+
expect(objects).toContain("E-done-epic");
|
|
287
|
+
expect(objects).toContain("E-wont-do-epic");
|
|
288
|
+
});
|
|
289
|
+
it("should exclude closed features by default", async () => {
|
|
290
|
+
const result = await client.callTool("list_issues", {
|
|
291
|
+
type: "feature",
|
|
292
|
+
});
|
|
293
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
294
|
+
expect(objects).toHaveLength(2);
|
|
295
|
+
expect(objects).toContain("F-draft-feature");
|
|
296
|
+
expect(objects).toContain("F-open-feature");
|
|
297
|
+
expect(objects).not.toContain("F-done-feature");
|
|
298
|
+
expect(objects).not.toContain("F-wont-do-feature");
|
|
299
|
+
});
|
|
300
|
+
it("should include closed features when includeClosed=true", async () => {
|
|
301
|
+
const result = await client.callTool("list_issues", {
|
|
302
|
+
type: "feature",
|
|
303
|
+
includeClosed: true,
|
|
304
|
+
});
|
|
305
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
306
|
+
expect(objects).toHaveLength(4);
|
|
307
|
+
expect(objects).toContain("F-draft-feature");
|
|
308
|
+
expect(objects).toContain("F-open-feature");
|
|
309
|
+
expect(objects).toContain("F-done-feature");
|
|
310
|
+
expect(objects).toContain("F-wont-do-feature");
|
|
311
|
+
});
|
|
312
|
+
it("should exclude closed tasks by default", async () => {
|
|
313
|
+
const result = await client.callTool("list_issues", {
|
|
314
|
+
type: "task",
|
|
315
|
+
});
|
|
316
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
317
|
+
// Filter to only the objects we created in this test
|
|
318
|
+
const testObjects = objects.filter((id) => id.includes("includeclosed"));
|
|
319
|
+
expect(testObjects).toHaveLength(3);
|
|
320
|
+
expect(testObjects).toContain("T-draft-includeclosed");
|
|
321
|
+
expect(testObjects).toContain("T-open-includeclosed");
|
|
322
|
+
expect(testObjects).toContain("T-in-progress-includeclosed");
|
|
323
|
+
expect(testObjects).not.toContain("T-done-includeclosed");
|
|
324
|
+
expect(testObjects).not.toContain("T-wont-do-includeclosed");
|
|
325
|
+
});
|
|
326
|
+
it("should include closed tasks when includeClosed=true", async () => {
|
|
327
|
+
const result = await client.callTool("list_issues", {
|
|
328
|
+
type: "task",
|
|
329
|
+
includeClosed: true,
|
|
330
|
+
});
|
|
331
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
332
|
+
// Filter to only the objects we created in this test
|
|
333
|
+
const testObjects = objects.filter((id) => id.includes("includeclosed"));
|
|
334
|
+
expect(testObjects).toHaveLength(5);
|
|
335
|
+
expect(testObjects).toContain("T-draft-includeclosed");
|
|
336
|
+
expect(testObjects).toContain("T-open-includeclosed");
|
|
337
|
+
expect(testObjects).toContain("T-in-progress-includeclosed");
|
|
338
|
+
expect(testObjects).toContain("T-done-includeclosed");
|
|
339
|
+
expect(testObjects).toContain("T-wont-do-includeclosed");
|
|
340
|
+
});
|
|
341
|
+
it("should work with includeClosed and status filters for projects", async () => {
|
|
342
|
+
const result = await client.callTool("list_issues", {
|
|
343
|
+
type: "project",
|
|
344
|
+
status: "done",
|
|
345
|
+
includeClosed: true,
|
|
346
|
+
});
|
|
347
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
348
|
+
expect(objects).toHaveLength(1);
|
|
349
|
+
expect(objects).toContain("P-done-project");
|
|
350
|
+
});
|
|
351
|
+
it("should work with includeClosed and status filters for epics", async () => {
|
|
352
|
+
const result = await client.callTool("list_issues", {
|
|
353
|
+
type: "epic",
|
|
354
|
+
status: "wont-do",
|
|
355
|
+
includeClosed: true,
|
|
356
|
+
});
|
|
357
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
358
|
+
expect(objects).toHaveLength(1);
|
|
359
|
+
expect(objects).toContain("E-wont-do-epic");
|
|
360
|
+
});
|
|
361
|
+
it("should return empty array when status filter requires closed objects but includeClosed=false", async () => {
|
|
362
|
+
const result = await client.callTool("list_issues", {
|
|
363
|
+
type: "feature",
|
|
364
|
+
status: "done",
|
|
365
|
+
includeClosed: false,
|
|
366
|
+
});
|
|
367
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
368
|
+
expect(objects).toEqual([]);
|
|
179
369
|
});
|
|
180
370
|
});
|
|
181
371
|
describe("Priority Filtering", () => {
|
|
@@ -190,45 +380,43 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
190
380
|
}
|
|
191
381
|
});
|
|
192
382
|
it("should filter objects by priority", async () => {
|
|
193
|
-
const result = await client.callTool("
|
|
383
|
+
const result = await client.callTool("list_issues", {
|
|
194
384
|
type: "feature",
|
|
195
385
|
priority: "high",
|
|
196
386
|
});
|
|
197
|
-
const objects = (0, utils_1.
|
|
387
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
198
388
|
expect(objects).toHaveLength(1);
|
|
199
|
-
expect(objects[0]
|
|
200
|
-
expect(objects[0].id).toBe("F-high-priority");
|
|
389
|
+
expect(objects[0]).toBe("F-high-priority");
|
|
201
390
|
});
|
|
202
391
|
it("should filter objects by medium priority", async () => {
|
|
203
|
-
const result = await client.callTool("
|
|
392
|
+
const result = await client.callTool("list_issues", {
|
|
204
393
|
type: "feature",
|
|
205
394
|
priority: "medium",
|
|
206
395
|
});
|
|
207
|
-
const objects = (0, utils_1.
|
|
396
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
208
397
|
expect(objects).toHaveLength(1);
|
|
209
|
-
expect(objects[0]
|
|
210
|
-
expect(objects[0].id).toBe("F-medium-priority");
|
|
398
|
+
expect(objects[0]).toBe("F-medium-priority");
|
|
211
399
|
});
|
|
212
400
|
it("should filter objects by low priority", async () => {
|
|
213
|
-
const result = await client.callTool("
|
|
401
|
+
const result = await client.callTool("list_issues", {
|
|
214
402
|
type: "feature",
|
|
215
403
|
priority: "low",
|
|
216
404
|
});
|
|
217
|
-
const objects = (0, utils_1.
|
|
405
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
218
406
|
expect(objects).toHaveLength(1);
|
|
219
|
-
expect(objects[0]
|
|
220
|
-
expect(objects[0].id).toBe("F-low-priority");
|
|
407
|
+
expect(objects[0]).toBe("F-low-priority");
|
|
221
408
|
});
|
|
222
409
|
it("should return all priorities when no filter specified", async () => {
|
|
223
|
-
const result = await client.callTool("
|
|
410
|
+
const result = await client.callTool("list_issues", {
|
|
224
411
|
type: "feature",
|
|
225
412
|
});
|
|
226
|
-
const objects = (0, utils_1.
|
|
413
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
227
414
|
expect(objects).toHaveLength(3);
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
expect(
|
|
231
|
-
expect(
|
|
415
|
+
// Note: Can't test individual priorities since only IDs are returned
|
|
416
|
+
// Just verify we have all the expected feature IDs
|
|
417
|
+
expect(objects).toContain("F-high-priority");
|
|
418
|
+
expect(objects).toContain("F-medium-priority");
|
|
419
|
+
expect(objects).toContain("F-low-priority");
|
|
232
420
|
});
|
|
233
421
|
});
|
|
234
422
|
describe("Scope Filtering", () => {
|
|
@@ -262,39 +450,39 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
262
450
|
}));
|
|
263
451
|
});
|
|
264
452
|
it("should list objects within project scope", async () => {
|
|
265
|
-
const result = await client.callTool("
|
|
453
|
+
const result = await client.callTool("list_issues", {
|
|
266
454
|
type: "epic",
|
|
267
455
|
scope: "P-parent",
|
|
268
456
|
});
|
|
269
|
-
const objects = (0, utils_1.
|
|
457
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
270
458
|
expect(objects).toHaveLength(2);
|
|
271
|
-
expect(objects
|
|
272
|
-
expect(objects
|
|
459
|
+
expect(objects).toContain("E-child-1");
|
|
460
|
+
expect(objects).toContain("E-child-2");
|
|
273
461
|
});
|
|
274
462
|
it("should list objects within epic scope", async () => {
|
|
275
|
-
const result = await client.callTool("
|
|
463
|
+
const result = await client.callTool("list_issues", {
|
|
276
464
|
type: "feature",
|
|
277
465
|
scope: "E-child-1",
|
|
278
466
|
});
|
|
279
|
-
const objects = (0, utils_1.
|
|
467
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
280
468
|
expect(objects).toHaveLength(1);
|
|
281
|
-
expect(objects[0]
|
|
469
|
+
expect(objects[0]).toBe("F-grandchild-1");
|
|
282
470
|
});
|
|
283
471
|
it("should not include objects outside of scope", async () => {
|
|
284
|
-
const result = await client.callTool("
|
|
472
|
+
const result = await client.callTool("list_issues", {
|
|
285
473
|
type: "feature",
|
|
286
474
|
scope: "P-parent",
|
|
287
475
|
});
|
|
288
|
-
const objects = (0, utils_1.
|
|
289
|
-
expect(objects
|
|
290
|
-
expect(objects
|
|
476
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
477
|
+
expect(objects).toContain("F-grandchild-1");
|
|
478
|
+
expect(objects).not.toContain("F-standalone");
|
|
291
479
|
});
|
|
292
480
|
it("should return empty array for non-existent scope", async () => {
|
|
293
|
-
const result = await client.callTool("
|
|
481
|
+
const result = await client.callTool("list_issues", {
|
|
294
482
|
type: "task",
|
|
295
483
|
scope: "P-nonexistent",
|
|
296
484
|
});
|
|
297
|
-
const objects = (0, utils_1.
|
|
485
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
298
486
|
expect(objects).toEqual([]);
|
|
299
487
|
});
|
|
300
488
|
});
|
|
@@ -354,48 +542,48 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
354
542
|
}
|
|
355
543
|
});
|
|
356
544
|
it("should apply multiple filters simultaneously", async () => {
|
|
357
|
-
const result = await client.callTool("
|
|
545
|
+
const result = await client.callTool("list_issues", {
|
|
358
546
|
type: "task",
|
|
359
547
|
status: "open",
|
|
360
548
|
priority: "high",
|
|
361
549
|
scope: "P-complex",
|
|
362
550
|
});
|
|
363
|
-
const objects = (0, utils_1.
|
|
551
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
364
552
|
expect(objects).toHaveLength(1);
|
|
365
|
-
expect(objects[0]
|
|
553
|
+
expect(objects[0]).toBe("T-high-open");
|
|
366
554
|
});
|
|
367
555
|
it("should combine includeClosed with other filters", async () => {
|
|
368
|
-
const result = await client.callTool("
|
|
556
|
+
const result = await client.callTool("list_issues", {
|
|
369
557
|
type: "task",
|
|
370
558
|
priority: "high",
|
|
371
559
|
scope: "P-complex",
|
|
372
560
|
includeClosed: true,
|
|
373
561
|
});
|
|
374
|
-
const objects = (0, utils_1.
|
|
562
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
375
563
|
expect(objects).toHaveLength(2);
|
|
376
|
-
expect(objects
|
|
377
|
-
expect(objects
|
|
564
|
+
expect(objects).toContain("T-high-open");
|
|
565
|
+
expect(objects).toContain("T-high-done");
|
|
378
566
|
});
|
|
379
567
|
it("should return empty when combined filters match nothing", async () => {
|
|
380
|
-
const result = await client.callTool("
|
|
568
|
+
const result = await client.callTool("list_issues", {
|
|
381
569
|
type: "task",
|
|
382
570
|
status: "draft",
|
|
383
571
|
priority: "high",
|
|
384
572
|
scope: "P-complex",
|
|
385
573
|
});
|
|
386
|
-
const objects = (0, utils_1.
|
|
574
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
387
575
|
expect(objects).toEqual([]);
|
|
388
576
|
});
|
|
389
577
|
it("should combine status and priority filters", async () => {
|
|
390
|
-
const result = await client.callTool("
|
|
578
|
+
const result = await client.callTool("list_issues", {
|
|
391
579
|
type: "task",
|
|
392
580
|
status: "in-progress",
|
|
393
581
|
priority: "medium",
|
|
394
582
|
scope: "P-complex",
|
|
395
583
|
});
|
|
396
|
-
const objects = (0, utils_1.
|
|
584
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
397
585
|
expect(objects).toHaveLength(1);
|
|
398
|
-
expect(objects[0]
|
|
586
|
+
expect(objects[0]).toBe("T-medium-progress");
|
|
399
587
|
});
|
|
400
588
|
});
|
|
401
589
|
describe("Object Structure Validation", () => {
|
|
@@ -418,43 +606,26 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
418
606
|
title: "Child Epic",
|
|
419
607
|
parent: "P-detailed",
|
|
420
608
|
}), { projectId: "P-detailed" });
|
|
421
|
-
const result = await client.callTool("
|
|
609
|
+
const result = await client.callTool("list_issues", {
|
|
422
610
|
type: "project",
|
|
423
611
|
});
|
|
424
|
-
const objects = (0, utils_1.
|
|
612
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
425
613
|
expect(objects).toHaveLength(1);
|
|
426
|
-
|
|
427
|
-
expect(
|
|
428
|
-
id: "P-detailed",
|
|
429
|
-
type: "project",
|
|
430
|
-
title: "Detailed Project",
|
|
431
|
-
status: "open",
|
|
432
|
-
priority: "high",
|
|
433
|
-
prerequisites: ["P-dep1", "P-dep2"],
|
|
434
|
-
log: ["Created", "Updated"],
|
|
435
|
-
schema: "1.1",
|
|
436
|
-
childrenIds: ["E-child"],
|
|
437
|
-
body: "Project description",
|
|
438
|
-
});
|
|
439
|
-
// Verify no parent field for projects
|
|
440
|
-
expect(project.parent).toBeUndefined();
|
|
614
|
+
// Note: Only object IDs are returned, not full objects
|
|
615
|
+
expect(objects[0]).toBe("P-detailed");
|
|
441
616
|
});
|
|
442
617
|
it("should handle objects with minimal fields", async () => {
|
|
443
618
|
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "task", "T-minimal", (0, utils_1.createObjectContent)({
|
|
444
619
|
id: "T-minimal",
|
|
445
620
|
title: "Minimal Task",
|
|
446
621
|
}), { status: "open" });
|
|
447
|
-
const result = await client.callTool("
|
|
622
|
+
const result = await client.callTool("list_issues", {
|
|
448
623
|
type: "task",
|
|
449
624
|
});
|
|
450
|
-
const objects = (0, utils_1.
|
|
451
|
-
|
|
452
|
-
expect(
|
|
453
|
-
|
|
454
|
-
expect(task.status).toBe("open");
|
|
455
|
-
expect(task.priority).toBe("medium");
|
|
456
|
-
expect(task.prerequisites).toEqual([]);
|
|
457
|
-
expect(task.body).toBe("");
|
|
625
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
626
|
+
// Note: Only object IDs are returned, not full objects
|
|
627
|
+
expect(objects[0]).toBe("T-minimal");
|
|
628
|
+
// Note: Only IDs returned, cannot test object properties
|
|
458
629
|
});
|
|
459
630
|
it("should preserve object hierarchy relationships", async () => {
|
|
460
631
|
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "project", "P-hierarchy", (0, utils_1.createObjectContent)({
|
|
@@ -481,13 +652,13 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
481
652
|
featureId: "F-hierarchy",
|
|
482
653
|
status: "open",
|
|
483
654
|
});
|
|
484
|
-
const result = await client.callTool("
|
|
655
|
+
const result = await client.callTool("list_issues", {
|
|
485
656
|
type: "task",
|
|
486
657
|
scope: "P-hierarchy",
|
|
487
658
|
});
|
|
488
|
-
const objects = (0, utils_1.
|
|
659
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
489
660
|
expect(objects).toHaveLength(1);
|
|
490
|
-
|
|
661
|
+
// Note: Only object IDs are returned, not full objects with parent property
|
|
491
662
|
});
|
|
492
663
|
});
|
|
493
664
|
describe("Large Dataset Handling", () => {
|
|
@@ -506,20 +677,19 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
506
677
|
}), { status: folder });
|
|
507
678
|
}
|
|
508
679
|
const startTime = Date.now();
|
|
509
|
-
const result = await client.callTool("
|
|
680
|
+
const result = await client.callTool("list_issues", {
|
|
510
681
|
type: "task",
|
|
511
682
|
includeClosed: true,
|
|
512
683
|
});
|
|
513
684
|
const duration = Date.now() - startTime;
|
|
514
|
-
const objects = (0, utils_1.
|
|
685
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
515
686
|
expect(objects).toHaveLength(NUM_OBJECTS);
|
|
516
687
|
// Performance check - should complete within reasonable time
|
|
517
688
|
expect(duration).toBeLessThan(3000);
|
|
518
689
|
// Verify all objects have correct structure
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
expect(
|
|
522
|
-
expect(obj.title).toMatch(/^Bulk Task \d+$/);
|
|
690
|
+
// Note: Only IDs returned, cannot test object properties
|
|
691
|
+
objects.forEach((id) => {
|
|
692
|
+
expect(id).toMatch(/^T-bulk-\d{3}$/);
|
|
523
693
|
});
|
|
524
694
|
});
|
|
525
695
|
it("should filter large datasets correctly", async () => {
|
|
@@ -532,25 +702,25 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
532
702
|
priority: priority,
|
|
533
703
|
}));
|
|
534
704
|
}
|
|
535
|
-
const result = await client.callTool("
|
|
705
|
+
const result = await client.callTool("list_issues", {
|
|
536
706
|
type: "feature",
|
|
537
707
|
priority: "high",
|
|
538
708
|
});
|
|
539
|
-
const objects = (0, utils_1.
|
|
709
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
710
|
+
// Note: Only IDs returned, cannot test object properties - just verify count
|
|
540
711
|
expect(objects).toHaveLength(5);
|
|
541
|
-
expect(objects.every((o) => o.priority === "high")).toBe(true);
|
|
542
712
|
});
|
|
543
713
|
});
|
|
544
714
|
describe("Error Handling", () => {
|
|
545
715
|
it("should handle invalid type parameter", async () => {
|
|
546
|
-
const result = await client.callTool("
|
|
716
|
+
const result = await client.callTool("list_issues", {
|
|
547
717
|
type: "invalid-type",
|
|
548
718
|
});
|
|
549
719
|
expect(result.content[0].text).toContain("Error listing objects");
|
|
550
720
|
expect(result.content[0].text).toContain("Invalid type value: invalid-type");
|
|
551
721
|
});
|
|
552
722
|
it("should handle invalid status parameter", async () => {
|
|
553
|
-
const result = await client.callTool("
|
|
723
|
+
const result = await client.callTool("list_issues", {
|
|
554
724
|
type: "task",
|
|
555
725
|
status: "invalid-status",
|
|
556
726
|
});
|
|
@@ -558,7 +728,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
558
728
|
expect(result.content[0].text).toContain("Invalid status value: invalid-status");
|
|
559
729
|
});
|
|
560
730
|
it("should handle invalid priority parameter", async () => {
|
|
561
|
-
const result = await client.callTool("
|
|
731
|
+
const result = await client.callTool("list_issues", {
|
|
562
732
|
type: "task",
|
|
563
733
|
priority: "critical",
|
|
564
734
|
});
|
|
@@ -573,21 +743,540 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
573
743
|
await fs.mkdir(path.dirname(invalidPath), { recursive: true });
|
|
574
744
|
await fs.writeFile(invalidPath, "Invalid YAML content\n---\nBody", "utf-8");
|
|
575
745
|
// Should skip invalid files and continue
|
|
576
|
-
const result = await client.callTool("
|
|
746
|
+
const result = await client.callTool("list_issues", {
|
|
577
747
|
type: "task",
|
|
578
748
|
});
|
|
579
|
-
const objects = (0, utils_1.
|
|
749
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
580
750
|
// Should return empty array or only valid objects
|
|
581
751
|
expect(Array.isArray(objects)).toBe(true);
|
|
582
752
|
});
|
|
583
753
|
it("should handle empty directories gracefully", async () => {
|
|
584
|
-
const result = await client.callTool("
|
|
754
|
+
const result = await client.callTool("list_issues", {
|
|
585
755
|
type: "task",
|
|
586
756
|
});
|
|
587
|
-
const objects = (0, utils_1.
|
|
757
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
588
758
|
expect(Array.isArray(objects)).toBe(true);
|
|
589
759
|
expect(objects).toEqual([]);
|
|
590
760
|
});
|
|
591
761
|
});
|
|
762
|
+
describe("Multiple Value Filtering", () => {
|
|
763
|
+
beforeEach(async () => {
|
|
764
|
+
// Create diverse test objects for comprehensive filtering validation
|
|
765
|
+
// Projects with different priorities
|
|
766
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "project", "P-high-priority-multi", (0, utils_1.createObjectContent)({
|
|
767
|
+
id: "P-high-priority-multi",
|
|
768
|
+
title: "High Priority Project",
|
|
769
|
+
priority: "high",
|
|
770
|
+
status: "open",
|
|
771
|
+
}));
|
|
772
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "project", "P-medium-priority-multi", (0, utils_1.createObjectContent)({
|
|
773
|
+
id: "P-medium-priority-multi",
|
|
774
|
+
title: "Medium Priority Project",
|
|
775
|
+
priority: "medium",
|
|
776
|
+
status: "in-progress",
|
|
777
|
+
}));
|
|
778
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "project", "P-low-priority-multi", (0, utils_1.createObjectContent)({
|
|
779
|
+
id: "P-low-priority-multi",
|
|
780
|
+
title: "Low Priority Project",
|
|
781
|
+
priority: "low",
|
|
782
|
+
status: "done",
|
|
783
|
+
}));
|
|
784
|
+
// Epics with different statuses
|
|
785
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "epic", "E-open-multi", (0, utils_1.createObjectContent)({
|
|
786
|
+
id: "E-open-multi",
|
|
787
|
+
title: "Open Epic",
|
|
788
|
+
status: "open",
|
|
789
|
+
priority: "high",
|
|
790
|
+
parent: "P-high-priority-multi",
|
|
791
|
+
}), { projectId: "P-high-priority-multi" });
|
|
792
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "epic", "E-progress-multi", (0, utils_1.createObjectContent)({
|
|
793
|
+
id: "E-progress-multi",
|
|
794
|
+
title: "In Progress Epic",
|
|
795
|
+
status: "in-progress",
|
|
796
|
+
priority: "medium",
|
|
797
|
+
parent: "P-medium-priority-multi",
|
|
798
|
+
}), { projectId: "P-medium-priority-multi" });
|
|
799
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "epic", "E-done-multi", (0, utils_1.createObjectContent)({
|
|
800
|
+
id: "E-done-multi",
|
|
801
|
+
title: "Done Epic",
|
|
802
|
+
status: "done",
|
|
803
|
+
priority: "low",
|
|
804
|
+
parent: "P-low-priority-multi",
|
|
805
|
+
}), { projectId: "P-low-priority-multi" });
|
|
806
|
+
// Features with various combinations
|
|
807
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "feature", "F-high-open-multi", (0, utils_1.createObjectContent)({
|
|
808
|
+
id: "F-high-open-multi",
|
|
809
|
+
title: "High Priority Open Feature",
|
|
810
|
+
status: "open",
|
|
811
|
+
priority: "high",
|
|
812
|
+
}));
|
|
813
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "feature", "F-medium-progress-multi", (0, utils_1.createObjectContent)({
|
|
814
|
+
id: "F-medium-progress-multi",
|
|
815
|
+
title: "Medium Priority In Progress Feature",
|
|
816
|
+
status: "in-progress",
|
|
817
|
+
priority: "medium",
|
|
818
|
+
}));
|
|
819
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "feature", "F-low-draft-multi", (0, utils_1.createObjectContent)({
|
|
820
|
+
id: "F-low-draft-multi",
|
|
821
|
+
title: "Low Priority Draft Feature",
|
|
822
|
+
status: "draft",
|
|
823
|
+
priority: "low",
|
|
824
|
+
}));
|
|
825
|
+
// Tasks with different combinations
|
|
826
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "task", "T-open-high-multi", (0, utils_1.createObjectContent)({
|
|
827
|
+
id: "T-open-high-multi",
|
|
828
|
+
title: "Open High Priority Task",
|
|
829
|
+
status: "open",
|
|
830
|
+
priority: "high",
|
|
831
|
+
}), { status: "open" });
|
|
832
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "task", "T-progress-medium-multi", (0, utils_1.createObjectContent)({
|
|
833
|
+
id: "T-progress-medium-multi",
|
|
834
|
+
title: "In Progress Medium Priority Task",
|
|
835
|
+
status: "in-progress",
|
|
836
|
+
priority: "medium",
|
|
837
|
+
}), { status: "open" });
|
|
838
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "task", "T-done-low-multi", (0, utils_1.createObjectContent)({
|
|
839
|
+
id: "T-done-low-multi",
|
|
840
|
+
title: "Done Low Priority Task",
|
|
841
|
+
status: "done",
|
|
842
|
+
priority: "low",
|
|
843
|
+
}), { status: "closed" });
|
|
844
|
+
});
|
|
845
|
+
describe("Multiple Type Filtering", () => {
|
|
846
|
+
it("should filter for multiple types using array", async () => {
|
|
847
|
+
const result = await client.callTool("list_issues", {
|
|
848
|
+
type: ["feature", "task"],
|
|
849
|
+
includeClosed: true,
|
|
850
|
+
});
|
|
851
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
852
|
+
// Should include all features and tasks, but no projects or epics
|
|
853
|
+
const features = objects.filter((id) => id.startsWith("F-"));
|
|
854
|
+
const tasks = objects.filter((id) => id.startsWith("T-"));
|
|
855
|
+
const projects = objects.filter((id) => id.startsWith("P-"));
|
|
856
|
+
const epics = objects.filter((id) => id.startsWith("E-"));
|
|
857
|
+
expect(features.length).toBeGreaterThan(0);
|
|
858
|
+
expect(tasks.length).toBeGreaterThan(0);
|
|
859
|
+
expect(projects.length).toBe(0);
|
|
860
|
+
expect(epics.length).toBe(0);
|
|
861
|
+
});
|
|
862
|
+
it("should filter for project and epic types", async () => {
|
|
863
|
+
const result = await client.callTool("list_issues", {
|
|
864
|
+
type: ["project", "epic"],
|
|
865
|
+
includeClosed: true,
|
|
866
|
+
});
|
|
867
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
868
|
+
const projects = objects.filter((id) => id.startsWith("P-"));
|
|
869
|
+
const epics = objects.filter((id) => id.startsWith("E-"));
|
|
870
|
+
const features = objects.filter((id) => id.startsWith("F-"));
|
|
871
|
+
const tasks = objects.filter((id) => id.startsWith("T-"));
|
|
872
|
+
expect(projects.length).toBeGreaterThan(0);
|
|
873
|
+
expect(epics.length).toBeGreaterThan(0);
|
|
874
|
+
expect(features.length).toBe(0);
|
|
875
|
+
expect(tasks.length).toBe(0);
|
|
876
|
+
});
|
|
877
|
+
it("should handle single type in array format", async () => {
|
|
878
|
+
const result = await client.callTool("list_issues", {
|
|
879
|
+
type: ["task"],
|
|
880
|
+
includeClosed: true,
|
|
881
|
+
});
|
|
882
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
883
|
+
const tasks = objects.filter((id) => id.startsWith("T-"));
|
|
884
|
+
const nonTasks = objects.filter((id) => !id.startsWith("T-"));
|
|
885
|
+
expect(tasks.length).toBeGreaterThan(0);
|
|
886
|
+
expect(nonTasks.length).toBe(0);
|
|
887
|
+
});
|
|
888
|
+
});
|
|
889
|
+
describe("Multiple Status Filtering", () => {
|
|
890
|
+
it("should filter for multiple statuses using array", async () => {
|
|
891
|
+
const result = await client.callTool("list_issues", {
|
|
892
|
+
type: "task",
|
|
893
|
+
status: ["open", "in-progress"],
|
|
894
|
+
});
|
|
895
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
896
|
+
// Should include T-open-high-multi and T-progress-medium-multi
|
|
897
|
+
expect(objects).toContain("T-open-high-multi");
|
|
898
|
+
expect(objects).toContain("T-progress-medium-multi");
|
|
899
|
+
expect(objects).not.toContain("T-done-low-multi");
|
|
900
|
+
});
|
|
901
|
+
it("should filter for draft and open statuses", async () => {
|
|
902
|
+
const result = await client.callTool("list_issues", {
|
|
903
|
+
type: "feature",
|
|
904
|
+
status: ["draft", "open"],
|
|
905
|
+
});
|
|
906
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
907
|
+
expect(objects).toContain("F-high-open-multi");
|
|
908
|
+
expect(objects).toContain("F-low-draft-multi");
|
|
909
|
+
expect(objects).not.toContain("F-medium-progress-multi");
|
|
910
|
+
});
|
|
911
|
+
it("should handle closed statuses with includeClosed flag", async () => {
|
|
912
|
+
const result = await client.callTool("list_issues", {
|
|
913
|
+
type: "task",
|
|
914
|
+
status: ["done", "wont-do"],
|
|
915
|
+
includeClosed: true,
|
|
916
|
+
});
|
|
917
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
918
|
+
expect(objects).toContain("T-done-low-multi");
|
|
919
|
+
});
|
|
920
|
+
});
|
|
921
|
+
describe("Multiple Priority Filtering", () => {
|
|
922
|
+
it("should filter for multiple priorities using array", async () => {
|
|
923
|
+
const result = await client.callTool("list_issues", {
|
|
924
|
+
type: "feature",
|
|
925
|
+
priority: ["high", "medium"],
|
|
926
|
+
});
|
|
927
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
928
|
+
expect(objects).toContain("F-high-open-multi");
|
|
929
|
+
expect(objects).toContain("F-medium-progress-multi");
|
|
930
|
+
expect(objects).not.toContain("F-low-draft-multi");
|
|
931
|
+
});
|
|
932
|
+
it("should filter for low priority across all types", async () => {
|
|
933
|
+
const result = await client.callTool("list_issues", {
|
|
934
|
+
type: ["project", "epic", "feature", "task"],
|
|
935
|
+
priority: ["low"],
|
|
936
|
+
includeClosed: true,
|
|
937
|
+
});
|
|
938
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
939
|
+
expect(objects).toContain("P-low-priority-multi");
|
|
940
|
+
expect(objects).toContain("E-done-multi");
|
|
941
|
+
expect(objects).toContain("F-low-draft-multi");
|
|
942
|
+
expect(objects).toContain("T-done-low-multi");
|
|
943
|
+
});
|
|
944
|
+
it("should handle high and low priorities", async () => {
|
|
945
|
+
const result = await client.callTool("list_issues", {
|
|
946
|
+
type: "task",
|
|
947
|
+
priority: ["high", "low"],
|
|
948
|
+
includeClosed: true,
|
|
949
|
+
});
|
|
950
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
951
|
+
expect(objects).toContain("T-open-high-multi");
|
|
952
|
+
expect(objects).toContain("T-done-low-multi");
|
|
953
|
+
expect(objects).not.toContain("T-progress-medium-multi");
|
|
954
|
+
});
|
|
955
|
+
});
|
|
956
|
+
describe("Combined Multiple Filters", () => {
|
|
957
|
+
it("should combine multiple type and status filters", async () => {
|
|
958
|
+
const result = await client.callTool("list_issues", {
|
|
959
|
+
type: ["feature", "task"],
|
|
960
|
+
status: ["open", "in-progress"],
|
|
961
|
+
});
|
|
962
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
963
|
+
expect(objects).toContain("F-high-open-multi");
|
|
964
|
+
expect(objects).toContain("F-medium-progress-multi");
|
|
965
|
+
expect(objects).toContain("T-open-high-multi");
|
|
966
|
+
expect(objects).toContain("T-progress-medium-multi");
|
|
967
|
+
expect(objects).not.toContain("F-low-draft-multi");
|
|
968
|
+
expect(objects).not.toContain("T-done-low-multi");
|
|
969
|
+
});
|
|
970
|
+
it("should combine multiple filters across all parameters", async () => {
|
|
971
|
+
const result = await client.callTool("list_issues", {
|
|
972
|
+
type: ["feature", "task"],
|
|
973
|
+
status: ["open", "in-progress"],
|
|
974
|
+
priority: ["high", "medium"],
|
|
975
|
+
});
|
|
976
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
977
|
+
expect(objects).toContain("F-high-open-multi");
|
|
978
|
+
expect(objects).toContain("F-medium-progress-multi");
|
|
979
|
+
expect(objects).toContain("T-open-high-multi");
|
|
980
|
+
expect(objects).toContain("T-progress-medium-multi");
|
|
981
|
+
expect(objects).not.toContain("F-low-draft-multi");
|
|
982
|
+
expect(objects).not.toContain("T-done-low-multi");
|
|
983
|
+
});
|
|
984
|
+
it("should apply AND logic between different filter types", async () => {
|
|
985
|
+
const result = await client.callTool("list_issues", {
|
|
986
|
+
type: ["task"],
|
|
987
|
+
status: ["open"],
|
|
988
|
+
priority: ["high"],
|
|
989
|
+
});
|
|
990
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
991
|
+
expect(objects).toContain("T-open-high-multi");
|
|
992
|
+
expect(objects).not.toContain("T-progress-medium-multi");
|
|
993
|
+
expect(objects).not.toContain("T-done-low-multi");
|
|
994
|
+
});
|
|
995
|
+
});
|
|
996
|
+
});
|
|
997
|
+
describe("Optional Type Parameter", () => {
|
|
998
|
+
beforeEach(async () => {
|
|
999
|
+
// Create objects of all types with same status/priority for testing
|
|
1000
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "project", "P-optional-type", (0, utils_1.createObjectContent)({
|
|
1001
|
+
id: "P-optional-type",
|
|
1002
|
+
title: "Optional Type Project",
|
|
1003
|
+
status: "open",
|
|
1004
|
+
priority: "high",
|
|
1005
|
+
}));
|
|
1006
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "epic", "E-optional-type", (0, utils_1.createObjectContent)({
|
|
1007
|
+
id: "E-optional-type",
|
|
1008
|
+
title: "Optional Type Epic",
|
|
1009
|
+
status: "open",
|
|
1010
|
+
priority: "high",
|
|
1011
|
+
parent: "P-optional-type",
|
|
1012
|
+
}), { projectId: "P-optional-type" });
|
|
1013
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "feature", "F-optional-type", (0, utils_1.createObjectContent)({
|
|
1014
|
+
id: "F-optional-type",
|
|
1015
|
+
title: "Optional Type Feature",
|
|
1016
|
+
status: "open",
|
|
1017
|
+
priority: "high",
|
|
1018
|
+
}));
|
|
1019
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "task", "T-optional-type", (0, utils_1.createObjectContent)({
|
|
1020
|
+
id: "T-optional-type",
|
|
1021
|
+
title: "Optional Type Task",
|
|
1022
|
+
status: "open",
|
|
1023
|
+
priority: "high",
|
|
1024
|
+
}), { status: "open" });
|
|
1025
|
+
});
|
|
1026
|
+
it("should return all object types when type parameter is omitted", async () => {
|
|
1027
|
+
const result = await client.callTool("list_issues", {
|
|
1028
|
+
status: "open",
|
|
1029
|
+
priority: "high",
|
|
1030
|
+
});
|
|
1031
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
1032
|
+
expect(objects).toContain("P-optional-type");
|
|
1033
|
+
expect(objects).toContain("E-optional-type");
|
|
1034
|
+
expect(objects).toContain("F-optional-type");
|
|
1035
|
+
expect(objects).toContain("T-optional-type");
|
|
1036
|
+
});
|
|
1037
|
+
it("should filter by status across all types when type is omitted", async () => {
|
|
1038
|
+
// Add objects with different statuses
|
|
1039
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "task", "T-different-status", (0, utils_1.createObjectContent)({
|
|
1040
|
+
id: "T-different-status",
|
|
1041
|
+
title: "Different Status Task",
|
|
1042
|
+
status: "in-progress",
|
|
1043
|
+
priority: "high",
|
|
1044
|
+
}), { status: "open" });
|
|
1045
|
+
const result = await client.callTool("list_issues", {
|
|
1046
|
+
status: "open",
|
|
1047
|
+
priority: "high",
|
|
1048
|
+
});
|
|
1049
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
1050
|
+
expect(objects).toContain("P-optional-type");
|
|
1051
|
+
expect(objects).toContain("E-optional-type");
|
|
1052
|
+
expect(objects).toContain("F-optional-type");
|
|
1053
|
+
expect(objects).toContain("T-optional-type");
|
|
1054
|
+
expect(objects).not.toContain("T-different-status");
|
|
1055
|
+
});
|
|
1056
|
+
it("should filter by priority across all types when type is omitted", async () => {
|
|
1057
|
+
// Add objects with different priorities
|
|
1058
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "feature", "F-different-priority", (0, utils_1.createObjectContent)({
|
|
1059
|
+
id: "F-different-priority",
|
|
1060
|
+
title: "Different Priority Feature",
|
|
1061
|
+
status: "open",
|
|
1062
|
+
priority: "low",
|
|
1063
|
+
}));
|
|
1064
|
+
const result = await client.callTool("list_issues", {
|
|
1065
|
+
status: "open",
|
|
1066
|
+
priority: "high",
|
|
1067
|
+
});
|
|
1068
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
1069
|
+
expect(objects).toContain("P-optional-type");
|
|
1070
|
+
expect(objects).toContain("E-optional-type");
|
|
1071
|
+
expect(objects).toContain("F-optional-type");
|
|
1072
|
+
expect(objects).toContain("T-optional-type");
|
|
1073
|
+
expect(objects).not.toContain("F-different-priority");
|
|
1074
|
+
});
|
|
1075
|
+
});
|
|
1076
|
+
describe("Mixed Single and Multiple Value Tests", () => {
|
|
1077
|
+
beforeEach(async () => {
|
|
1078
|
+
// Create test objects for mixed filtering scenarios
|
|
1079
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "task", "T-mixed-high-open", (0, utils_1.createObjectContent)({
|
|
1080
|
+
id: "T-mixed-high-open",
|
|
1081
|
+
title: "Mixed High Open Task",
|
|
1082
|
+
status: "open",
|
|
1083
|
+
priority: "high",
|
|
1084
|
+
}), { status: "open" });
|
|
1085
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "task", "T-mixed-high-progress", (0, utils_1.createObjectContent)({
|
|
1086
|
+
id: "T-mixed-high-progress",
|
|
1087
|
+
title: "Mixed High Progress Task",
|
|
1088
|
+
status: "in-progress",
|
|
1089
|
+
priority: "high",
|
|
1090
|
+
}), { status: "open" });
|
|
1091
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "task", "T-mixed-medium-open", (0, utils_1.createObjectContent)({
|
|
1092
|
+
id: "T-mixed-medium-open",
|
|
1093
|
+
title: "Mixed Medium Open Task",
|
|
1094
|
+
status: "open",
|
|
1095
|
+
priority: "medium",
|
|
1096
|
+
}), { status: "open" });
|
|
1097
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "feature", "F-mixed-high-open", (0, utils_1.createObjectContent)({
|
|
1098
|
+
id: "F-mixed-high-open",
|
|
1099
|
+
title: "Mixed High Open Feature",
|
|
1100
|
+
status: "open",
|
|
1101
|
+
priority: "high",
|
|
1102
|
+
}));
|
|
1103
|
+
});
|
|
1104
|
+
it("should handle single type with multiple statuses", async () => {
|
|
1105
|
+
const result = await client.callTool("list_issues", {
|
|
1106
|
+
type: "task",
|
|
1107
|
+
status: ["open", "in-progress"],
|
|
1108
|
+
priority: "high",
|
|
1109
|
+
});
|
|
1110
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
1111
|
+
expect(objects).toContain("T-mixed-high-open");
|
|
1112
|
+
expect(objects).toContain("T-mixed-high-progress");
|
|
1113
|
+
expect(objects).not.toContain("T-mixed-medium-open");
|
|
1114
|
+
});
|
|
1115
|
+
it("should handle multiple types with single status", async () => {
|
|
1116
|
+
const result = await client.callTool("list_issues", {
|
|
1117
|
+
type: ["task", "feature"],
|
|
1118
|
+
status: "open",
|
|
1119
|
+
priority: "high",
|
|
1120
|
+
});
|
|
1121
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
1122
|
+
expect(objects).toContain("T-mixed-high-open");
|
|
1123
|
+
expect(objects).toContain("F-mixed-high-open");
|
|
1124
|
+
expect(objects).not.toContain("T-mixed-high-progress");
|
|
1125
|
+
expect(objects).not.toContain("T-mixed-medium-open");
|
|
1126
|
+
});
|
|
1127
|
+
it("should handle single type and status with multiple priorities", async () => {
|
|
1128
|
+
const result = await client.callTool("list_issues", {
|
|
1129
|
+
type: "task",
|
|
1130
|
+
status: "open",
|
|
1131
|
+
priority: ["high", "medium"],
|
|
1132
|
+
});
|
|
1133
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
1134
|
+
expect(objects).toContain("T-mixed-high-open");
|
|
1135
|
+
expect(objects).toContain("T-mixed-medium-open");
|
|
1136
|
+
expect(objects).not.toContain("T-mixed-high-progress");
|
|
1137
|
+
});
|
|
1138
|
+
it("should handle mixed array and single value parameters", async () => {
|
|
1139
|
+
const result = await client.callTool("list_issues", {
|
|
1140
|
+
type: ["task", "feature"],
|
|
1141
|
+
status: ["open", "in-progress"],
|
|
1142
|
+
priority: "high",
|
|
1143
|
+
});
|
|
1144
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
1145
|
+
expect(objects).toContain("T-mixed-high-open");
|
|
1146
|
+
expect(objects).toContain("T-mixed-high-progress");
|
|
1147
|
+
expect(objects).toContain("F-mixed-high-open");
|
|
1148
|
+
expect(objects).not.toContain("T-mixed-medium-open");
|
|
1149
|
+
});
|
|
1150
|
+
});
|
|
1151
|
+
describe("Backward Compatibility Validation", () => {
|
|
1152
|
+
beforeEach(async () => {
|
|
1153
|
+
// Create objects to test that existing single-value behavior is preserved
|
|
1154
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "task", "T-compat-single", (0, utils_1.createObjectContent)({
|
|
1155
|
+
id: "T-compat-single",
|
|
1156
|
+
title: "Compatibility Single Task",
|
|
1157
|
+
status: "open",
|
|
1158
|
+
priority: "high",
|
|
1159
|
+
}), { status: "open" });
|
|
1160
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "feature", "F-compat-single", (0, utils_1.createObjectContent)({
|
|
1161
|
+
id: "F-compat-single",
|
|
1162
|
+
title: "Compatibility Single Feature",
|
|
1163
|
+
status: "in-progress",
|
|
1164
|
+
priority: "medium",
|
|
1165
|
+
}));
|
|
1166
|
+
});
|
|
1167
|
+
it("should preserve existing single value type filtering", async () => {
|
|
1168
|
+
const result = await client.callTool("list_issues", {
|
|
1169
|
+
type: "task",
|
|
1170
|
+
});
|
|
1171
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
1172
|
+
const tasks = objects.filter((id) => id.startsWith("T-"));
|
|
1173
|
+
const nonTasks = objects.filter((id) => !id.startsWith("T-"));
|
|
1174
|
+
expect(tasks.length).toBeGreaterThan(0);
|
|
1175
|
+
expect(nonTasks.length).toBe(0);
|
|
1176
|
+
});
|
|
1177
|
+
it("should preserve existing single value status filtering", async () => {
|
|
1178
|
+
const result = await client.callTool("list_issues", {
|
|
1179
|
+
type: "task",
|
|
1180
|
+
status: "open",
|
|
1181
|
+
});
|
|
1182
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
1183
|
+
expect(objects).toContain("T-compat-single");
|
|
1184
|
+
});
|
|
1185
|
+
it("should preserve existing single value priority filtering", async () => {
|
|
1186
|
+
const result = await client.callTool("list_issues", {
|
|
1187
|
+
type: "feature",
|
|
1188
|
+
priority: "medium",
|
|
1189
|
+
});
|
|
1190
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
1191
|
+
expect(objects).toContain("F-compat-single");
|
|
1192
|
+
});
|
|
1193
|
+
it("should preserve existing combined single value filters", async () => {
|
|
1194
|
+
const result = await client.callTool("list_issues", {
|
|
1195
|
+
type: "task",
|
|
1196
|
+
status: "open",
|
|
1197
|
+
priority: "high",
|
|
1198
|
+
});
|
|
1199
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
1200
|
+
expect(objects).toContain("T-compat-single");
|
|
1201
|
+
});
|
|
1202
|
+
it("should maintain existing error behavior for invalid single values", async () => {
|
|
1203
|
+
const result = await client.callTool("list_issues", {
|
|
1204
|
+
type: "invalid-type",
|
|
1205
|
+
});
|
|
1206
|
+
expect(result.content[0].text).toContain("Error listing objects");
|
|
1207
|
+
expect(result.content[0].text).toContain("Invalid type value: invalid-type");
|
|
1208
|
+
});
|
|
1209
|
+
});
|
|
1210
|
+
describe("Error Handling for Array Inputs", () => {
|
|
1211
|
+
it("should handle invalid array values for type parameter", async () => {
|
|
1212
|
+
const result = await client.callTool("list_issues", {
|
|
1213
|
+
type: ["invalid-type"],
|
|
1214
|
+
});
|
|
1215
|
+
expect(result.content[0].text).toContain("Error listing objects");
|
|
1216
|
+
expect(result.content[0].text).toContain("Invalid type value: invalid-type");
|
|
1217
|
+
});
|
|
1218
|
+
it("should handle mixed valid and invalid values in type array", async () => {
|
|
1219
|
+
const result = await client.callTool("list_issues", {
|
|
1220
|
+
type: ["task", "invalid-type"],
|
|
1221
|
+
});
|
|
1222
|
+
expect(result.content[0].text).toContain("Error listing objects");
|
|
1223
|
+
expect(result.content[0].text).toContain("Invalid type value: invalid-type");
|
|
1224
|
+
});
|
|
1225
|
+
it("should handle invalid array values for status parameter", async () => {
|
|
1226
|
+
const result = await client.callTool("list_issues", {
|
|
1227
|
+
type: "task",
|
|
1228
|
+
status: ["invalid-status"],
|
|
1229
|
+
});
|
|
1230
|
+
expect(result.content[0].text).toContain("Error listing objects");
|
|
1231
|
+
expect(result.content[0].text).toContain("Invalid status value: invalid-status");
|
|
1232
|
+
});
|
|
1233
|
+
it("should handle mixed valid and invalid values in status array", async () => {
|
|
1234
|
+
const result = await client.callTool("list_issues", {
|
|
1235
|
+
type: "task",
|
|
1236
|
+
status: ["open", "invalid-status"],
|
|
1237
|
+
});
|
|
1238
|
+
expect(result.content[0].text).toContain("Error listing objects");
|
|
1239
|
+
expect(result.content[0].text).toContain("Invalid status value: invalid-status");
|
|
1240
|
+
});
|
|
1241
|
+
it("should handle invalid array values for priority parameter", async () => {
|
|
1242
|
+
const result = await client.callTool("list_issues", {
|
|
1243
|
+
type: "task",
|
|
1244
|
+
priority: ["invalid-priority"],
|
|
1245
|
+
});
|
|
1246
|
+
expect(result.content[0].text).toContain("Error listing objects");
|
|
1247
|
+
expect(result.content[0].text).toContain("Invalid priority value: invalid-priority");
|
|
1248
|
+
});
|
|
1249
|
+
it("should handle multiple invalid values in priority array", async () => {
|
|
1250
|
+
const result = await client.callTool("list_issues", {
|
|
1251
|
+
type: "task",
|
|
1252
|
+
priority: ["invalid1", "invalid2"],
|
|
1253
|
+
});
|
|
1254
|
+
expect(result.content[0].text).toContain("Error listing objects");
|
|
1255
|
+
expect(result.content[0].text).toContain("Invalid priority value");
|
|
1256
|
+
});
|
|
1257
|
+
it("should handle empty arrays as no filter provided", async () => {
|
|
1258
|
+
const result = await client.callTool("list_issues", {
|
|
1259
|
+
type: "task",
|
|
1260
|
+
status: [],
|
|
1261
|
+
});
|
|
1262
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
1263
|
+
// Empty array should be treated as no filter, so all tasks should be returned
|
|
1264
|
+
expect(Array.isArray(objects)).toBe(true);
|
|
1265
|
+
});
|
|
1266
|
+
it("should require at least one filter when type is omitted", async () => {
|
|
1267
|
+
const result = await client.callTool("list_issues", {});
|
|
1268
|
+
expect(result.content[0].text).toContain("Error listing objects");
|
|
1269
|
+
expect(result.content[0].text).toContain("At least one filter parameter (type, status, priority, or scope) must be provided");
|
|
1270
|
+
});
|
|
1271
|
+
it("should handle empty arrays in all parameters", async () => {
|
|
1272
|
+
const result = await client.callTool("list_issues", {
|
|
1273
|
+
type: [],
|
|
1274
|
+
status: [],
|
|
1275
|
+
priority: [],
|
|
1276
|
+
});
|
|
1277
|
+
expect(result.content[0].text).toContain("Error listing objects");
|
|
1278
|
+
expect(result.content[0].text).toContain("At least one filter parameter (type, status, priority, or scope) must be provided");
|
|
1279
|
+
});
|
|
1280
|
+
});
|
|
592
1281
|
});
|
|
593
1282
|
//# sourceMappingURL=listObjects.e2e.test.js.map
|