monday-cli 0.2.0 → 0.4.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/CHANGELOG.md +675 -2
- package/README.md +223 -31
- package/dist/api/assets.d.ts +326 -0
- package/dist/api/assets.d.ts.map +1 -0
- package/dist/api/assets.js +519 -0
- package/dist/api/assets.js.map +1 -0
- package/dist/api/board-favorites.d.ts +329 -0
- package/dist/api/board-favorites.d.ts.map +1 -0
- package/dist/api/board-favorites.js +353 -0
- package/dist/api/board-favorites.js.map +1 -0
- package/dist/api/board-mutation-result.d.ts +9 -5
- package/dist/api/board-mutation-result.d.ts.map +1 -1
- package/dist/api/board-mutation-result.js +9 -5
- package/dist/api/board-mutation-result.js.map +1 -1
- package/dist/api/board-relation-validation.d.ts +161 -0
- package/dist/api/board-relation-validation.d.ts.map +1 -0
- package/dist/api/board-relation-validation.js +317 -0
- package/dist/api/board-relation-validation.js.map +1 -0
- package/dist/api/cache.d.ts +14 -5
- package/dist/api/cache.d.ts.map +1 -1
- package/dist/api/cache.js +8 -10
- package/dist/api/cache.js.map +1 -1
- package/dist/api/column-mapping.js +2 -2
- package/dist/api/column-mapping.js.map +1 -1
- package/dist/api/column-mutation-result.d.ts +9 -5
- package/dist/api/column-mutation-result.d.ts.map +1 -1
- package/dist/api/column-mutation-result.js +9 -5
- package/dist/api/column-mutation-result.js.map +1 -1
- package/dist/api/column-types.d.ts +37 -14
- package/dist/api/column-types.d.ts.map +1 -1
- package/dist/api/column-types.js +47 -6
- package/dist/api/column-types.js.map +1 -1
- package/dist/api/column-values.d.ts +234 -31
- package/dist/api/column-values.d.ts.map +1 -1
- package/dist/api/column-values.js +560 -124
- package/dist/api/column-values.js.map +1 -1
- package/dist/api/cross-board-search.d.ts +501 -0
- package/dist/api/cross-board-search.d.ts.map +1 -0
- package/dist/api/cross-board-search.js +547 -0
- package/dist/api/cross-board-search.js.map +1 -0
- package/dist/api/dev-conventions.d.ts +1038 -0
- package/dist/api/dev-conventions.d.ts.map +1 -0
- package/dist/api/dev-conventions.js +1556 -0
- package/dist/api/dev-conventions.js.map +1 -0
- package/dist/api/documents.d.ts +519 -0
- package/dist/api/documents.d.ts.map +1 -0
- package/dist/api/documents.js +586 -0
- package/dist/api/documents.js.map +1 -0
- package/dist/api/dry-run.d.ts +32 -5
- package/dist/api/dry-run.d.ts.map +1 -1
- package/dist/api/dry-run.js +149 -32
- package/dist/api/dry-run.js.map +1 -1
- package/dist/api/errors.d.ts.map +1 -1
- package/dist/api/errors.js +28 -7
- package/dist/api/errors.js.map +1 -1
- package/dist/api/group-mutation-result.d.ts +9 -5
- package/dist/api/group-mutation-result.d.ts.map +1 -1
- package/dist/api/group-mutation-result.js +9 -5
- package/dist/api/group-mutation-result.js.map +1 -1
- package/dist/api/item-history-projection.d.ts +919 -0
- package/dist/api/item-history-projection.d.ts.map +1 -0
- package/dist/api/item-history-projection.js +1104 -0
- package/dist/api/item-history-projection.js.map +1 -0
- package/dist/api/item-mutation-execute.d.ts +82 -0
- package/dist/api/item-mutation-execute.d.ts.map +1 -0
- package/dist/api/item-mutation-execute.js +199 -0
- package/dist/api/item-mutation-execute.js.map +1 -0
- package/dist/api/item-watch.d.ts +263 -0
- package/dist/api/item-watch.d.ts.map +1 -0
- package/dist/api/item-watch.js +709 -0
- package/dist/api/item-watch.js.map +1 -0
- package/dist/api/multipart-transport.d.ts +223 -0
- package/dist/api/multipart-transport.d.ts.map +1 -0
- package/dist/api/multipart-transport.js +274 -0
- package/dist/api/multipart-transport.js.map +1 -0
- package/dist/api/notifications.d.ts +156 -0
- package/dist/api/notifications.d.ts.map +1 -0
- package/dist/api/notifications.js +215 -0
- package/dist/api/notifications.js.map +1 -0
- package/dist/api/oauth-test-helper.d.ts +64 -0
- package/dist/api/oauth-test-helper.d.ts.map +1 -0
- package/dist/api/oauth-test-helper.js +179 -0
- package/dist/api/oauth-test-helper.js.map +1 -0
- package/dist/api/oauth.d.ts +198 -0
- package/dist/api/oauth.d.ts.map +1 -0
- package/dist/api/oauth.js +471 -0
- package/dist/api/oauth.js.map +1 -0
- package/dist/api/parallel-dispatch.d.ts +155 -0
- package/dist/api/parallel-dispatch.d.ts.map +1 -0
- package/dist/api/parallel-dispatch.js +243 -0
- package/dist/api/parallel-dispatch.js.map +1 -0
- package/dist/api/partial-success-bulk.d.ts +480 -0
- package/dist/api/partial-success-bulk.d.ts.map +1 -0
- package/dist/api/partial-success-bulk.js +436 -0
- package/dist/api/partial-success-bulk.js.map +1 -0
- package/dist/api/partial-success-mutation.d.ts +13 -1
- package/dist/api/partial-success-mutation.d.ts.map +1 -1
- package/dist/api/partial-success-mutation.js +5 -1
- package/dist/api/partial-success-mutation.js.map +1 -1
- package/dist/api/people.d.ts +54 -1
- package/dist/api/people.d.ts.map +1 -1
- package/dist/api/people.js +27 -3
- package/dist/api/people.js.map +1 -1
- package/dist/api/probes.d.ts +487 -0
- package/dist/api/probes.d.ts.map +1 -0
- package/dist/api/probes.js +881 -0
- package/dist/api/probes.js.map +1 -0
- package/dist/api/raw-document.d.ts.map +1 -1
- package/dist/api/raw-document.js +2 -2
- package/dist/api/raw-document.js.map +1 -1
- package/dist/api/raw-write.d.ts +12 -4
- package/dist/api/raw-write.d.ts.map +1 -1
- package/dist/api/raw-write.js +32 -14
- package/dist/api/raw-write.js.map +1 -1
- package/dist/api/resolution-context.d.ts +23 -11
- package/dist/api/resolution-context.d.ts.map +1 -1
- package/dist/api/resolution-context.js +53 -12
- package/dist/api/resolution-context.js.map +1 -1
- package/dist/api/resolution-pass.d.ts +30 -1
- package/dist/api/resolution-pass.d.ts.map +1 -1
- package/dist/api/resolution-pass.js +36 -1
- package/dist/api/resolution-pass.js.map +1 -1
- package/dist/api/resolve-client.d.ts +22 -0
- package/dist/api/resolve-client.d.ts.map +1 -1
- package/dist/api/resolve-client.js +9 -1
- package/dist/api/resolve-client.js.map +1 -1
- package/dist/api/response-root.d.ts +92 -46
- package/dist/api/response-root.d.ts.map +1 -1
- package/dist/api/response-root.js +93 -41
- package/dist/api/response-root.js.map +1 -1
- package/dist/api/tag-directory.d.ts +154 -0
- package/dist/api/tag-directory.d.ts.map +1 -0
- package/dist/api/tag-directory.js +325 -0
- package/dist/api/tag-directory.js.map +1 -0
- package/dist/api/time-tracking.d.ts +165 -0
- package/dist/api/time-tracking.d.ts.map +1 -0
- package/dist/api/time-tracking.js +135 -0
- package/dist/api/time-tracking.js.map +1 -0
- package/dist/api/transport.js +3 -3
- package/dist/api/transport.js.map +1 -1
- package/dist/api/usage.d.ts +190 -0
- package/dist/api/usage.d.ts.map +1 -0
- package/dist/api/usage.js +194 -0
- package/dist/api/usage.js.map +1 -0
- package/dist/api/users-fan-out-mutation.d.ts.map +1 -1
- package/dist/api/users-fan-out-mutation.js +10 -5
- package/dist/api/users-fan-out-mutation.js.map +1 -1
- package/dist/api/webhooks.d.ts +357 -0
- package/dist/api/webhooks.d.ts.map +1 -0
- package/dist/api/webhooks.js +333 -0
- package/dist/api/webhooks.js.map +1 -0
- package/dist/cli/envelope-out.d.ts +18 -1
- package/dist/cli/envelope-out.d.ts.map +1 -1
- package/dist/cli/envelope-out.js +16 -2
- package/dist/cli/envelope-out.js.map +1 -1
- package/dist/cli/program.d.ts.map +1 -1
- package/dist/cli/program.js +120 -1
- package/dist/cli/program.js.map +1 -1
- package/dist/cli/run.d.ts +32 -0
- package/dist/cli/run.d.ts.map +1 -1
- package/dist/cli/run.js +3 -0
- package/dist/cli/run.js.map +1 -1
- package/dist/commands/account/tags.d.ts +37 -0
- package/dist/commands/account/tags.d.ts.map +1 -0
- package/dist/commands/account/tags.js +84 -0
- package/dist/commands/account/tags.js.map +1 -0
- package/dist/commands/auth/login.d.ts +14 -0
- package/dist/commands/auth/login.d.ts.map +1 -0
- package/dist/commands/auth/login.js +314 -0
- package/dist/commands/auth/login.js.map +1 -0
- package/dist/commands/auth/logout.d.ts +28 -0
- package/dist/commands/auth/logout.d.ts.map +1 -0
- package/dist/commands/auth/logout.js +94 -0
- package/dist/commands/auth/logout.js.map +1 -0
- package/dist/commands/board/archive.d.ts.map +1 -1
- package/dist/commands/board/archive.js +14 -14
- package/dist/commands/board/archive.js.map +1 -1
- package/dist/commands/board/column-create.d.ts +9 -8
- package/dist/commands/board/column-create.d.ts.map +1 -1
- package/dist/commands/board/column-create.js +61 -51
- package/dist/commands/board/column-create.js.map +1 -1
- package/dist/commands/board/column-delete.d.ts.map +1 -1
- package/dist/commands/board/column-delete.js +15 -16
- package/dist/commands/board/column-delete.js.map +1 -1
- package/dist/commands/board/column-update.d.ts.map +1 -1
- package/dist/commands/board/column-update.js +23 -22
- package/dist/commands/board/column-update.js.map +1 -1
- package/dist/commands/board/create.d.ts.map +1 -1
- package/dist/commands/board/create.js +14 -17
- package/dist/commands/board/create.js.map +1 -1
- package/dist/commands/board/delete.d.ts.map +1 -1
- package/dist/commands/board/delete.js +12 -15
- package/dist/commands/board/delete.js.map +1 -1
- package/dist/commands/board/describe.d.ts.map +1 -1
- package/dist/commands/board/describe.js +30 -0
- package/dist/commands/board/describe.js.map +1 -1
- package/dist/commands/board/duplicate.d.ts.map +1 -1
- package/dist/commands/board/duplicate.js +12 -13
- package/dist/commands/board/duplicate.js.map +1 -1
- package/dist/commands/board/favorites.d.ts +33 -0
- package/dist/commands/board/favorites.d.ts.map +1 -0
- package/dist/commands/board/favorites.js +74 -0
- package/dist/commands/board/favorites.js.map +1 -0
- package/dist/commands/board/find.d.ts +1 -1
- package/dist/commands/board/group-archive.d.ts.map +1 -1
- package/dist/commands/board/group-archive.js +12 -16
- package/dist/commands/board/group-archive.js.map +1 -1
- package/dist/commands/board/group-create.d.ts.map +1 -1
- package/dist/commands/board/group-create.js +9 -19
- package/dist/commands/board/group-create.js.map +1 -1
- package/dist/commands/board/group-delete.d.ts.map +1 -1
- package/dist/commands/board/group-delete.js +12 -16
- package/dist/commands/board/group-delete.js.map +1 -1
- package/dist/commands/board/group-duplicate.d.ts.map +1 -1
- package/dist/commands/board/group-duplicate.js +12 -16
- package/dist/commands/board/group-duplicate.js.map +1 -1
- package/dist/commands/board/group-update.d.ts.map +1 -1
- package/dist/commands/board/group-update.js +12 -11
- package/dist/commands/board/group-update.js.map +1 -1
- package/dist/commands/board/list.d.ts +1 -1
- package/dist/commands/board/update.d.ts.map +1 -1
- package/dist/commands/board/update.js +16 -11
- package/dist/commands/board/update.js.map +1 -1
- package/dist/commands/cache/list.d.ts +2 -0
- package/dist/commands/cache/list.d.ts.map +1 -1
- package/dist/commands/cache/list.js +2 -2
- package/dist/commands/cache/list.js.map +1 -1
- package/dist/commands/completion.d.ts +188 -0
- package/dist/commands/completion.d.ts.map +1 -0
- package/dist/commands/completion.js +418 -0
- package/dist/commands/completion.js.map +1 -0
- package/dist/commands/dev/_shared.d.ts +40 -0
- package/dist/commands/dev/_shared.d.ts.map +1 -0
- package/dist/commands/dev/_shared.js +104 -0
- package/dist/commands/dev/_shared.js.map +1 -0
- package/dist/commands/dev/configure.d.ts +36 -0
- package/dist/commands/dev/configure.d.ts.map +1 -0
- package/dist/commands/dev/configure.js +145 -0
- package/dist/commands/dev/configure.js.map +1 -0
- package/dist/commands/dev/discover.d.ts +34 -0
- package/dist/commands/dev/discover.d.ts.map +1 -0
- package/dist/commands/dev/discover.js +117 -0
- package/dist/commands/dev/discover.js.map +1 -0
- package/dist/commands/dev/doctor.d.ts +39 -0
- package/dist/commands/dev/doctor.d.ts.map +1 -0
- package/dist/commands/dev/doctor.js +91 -0
- package/dist/commands/dev/doctor.js.map +1 -0
- package/dist/commands/dev/epic/items.d.ts +24 -0
- package/dist/commands/dev/epic/items.d.ts.map +1 -0
- package/dist/commands/dev/epic/items.js +103 -0
- package/dist/commands/dev/epic/items.js.map +1 -0
- package/dist/commands/dev/epic/list.d.ts +36 -0
- package/dist/commands/dev/epic/list.d.ts.map +1 -0
- package/dist/commands/dev/epic/list.js +120 -0
- package/dist/commands/dev/epic/list.js.map +1 -0
- package/dist/commands/dev/release/list.d.ts +21 -0
- package/dist/commands/dev/release/list.d.ts.map +1 -0
- package/dist/commands/dev/release/list.js +73 -0
- package/dist/commands/dev/release/list.js.map +1 -0
- package/dist/commands/dev/sprint/current.d.ts +24 -0
- package/dist/commands/dev/sprint/current.d.ts.map +1 -0
- package/dist/commands/dev/sprint/current.js +90 -0
- package/dist/commands/dev/sprint/current.js.map +1 -0
- package/dist/commands/dev/sprint/items.d.ts +34 -0
- package/dist/commands/dev/sprint/items.d.ts.map +1 -0
- package/dist/commands/dev/sprint/items.js +118 -0
- package/dist/commands/dev/sprint/items.js.map +1 -0
- package/dist/commands/dev/sprint/list.d.ts +41 -0
- package/dist/commands/dev/sprint/list.d.ts.map +1 -0
- package/dist/commands/dev/sprint/list.js +104 -0
- package/dist/commands/dev/sprint/list.js.map +1 -0
- package/dist/commands/dev/task/block.d.ts +29 -0
- package/dist/commands/dev/task/block.d.ts.map +1 -0
- package/dist/commands/dev/task/block.js +106 -0
- package/dist/commands/dev/task/block.js.map +1 -0
- package/dist/commands/dev/task/done.d.ts +30 -0
- package/dist/commands/dev/task/done.d.ts.map +1 -0
- package/dist/commands/dev/task/done.js +113 -0
- package/dist/commands/dev/task/done.js.map +1 -0
- package/dist/commands/dev/task/list.d.ts +42 -0
- package/dist/commands/dev/task/list.d.ts.map +1 -0
- package/dist/commands/dev/task/list.js +227 -0
- package/dist/commands/dev/task/list.js.map +1 -0
- package/dist/commands/dev/task/start.d.ts +29 -0
- package/dist/commands/dev/task/start.d.ts.map +1 -0
- package/dist/commands/dev/task/start.js +90 -0
- package/dist/commands/dev/task/start.js.map +1 -0
- package/dist/commands/doc/get.d.ts +46 -0
- package/dist/commands/doc/get.d.ts.map +1 -0
- package/dist/commands/doc/get.js +95 -0
- package/dist/commands/doc/get.js.map +1 -0
- package/dist/commands/doc/list.d.ts +83 -0
- package/dist/commands/doc/list.d.ts.map +1 -0
- package/dist/commands/doc/list.js +248 -0
- package/dist/commands/doc/list.js.map +1 -0
- package/dist/commands/emit.d.ts.map +1 -1
- package/dist/commands/emit.js +5 -3
- package/dist/commands/emit.js.map +1 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +141 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/item/archive.d.ts.map +1 -1
- package/dist/commands/item/archive.js +11 -0
- package/dist/commands/item/archive.js.map +1 -1
- package/dist/commands/item/clear.d.ts.map +1 -1
- package/dist/commands/item/clear.js +15 -0
- package/dist/commands/item/clear.js.map +1 -1
- package/dist/commands/item/create.d.ts.map +1 -1
- package/dist/commands/item/create.js +41 -8
- package/dist/commands/item/create.js.map +1 -1
- package/dist/commands/item/delete.d.ts.map +1 -1
- package/dist/commands/item/delete.js +11 -0
- package/dist/commands/item/delete.js.map +1 -1
- package/dist/commands/item/duplicate.d.ts.map +1 -1
- package/dist/commands/item/duplicate.js +12 -0
- package/dist/commands/item/duplicate.js.map +1 -1
- package/dist/commands/item/history.d.ts +60 -0
- package/dist/commands/item/history.d.ts.map +1 -0
- package/dist/commands/item/history.js +309 -0
- package/dist/commands/item/history.js.map +1 -0
- package/dist/commands/item/list.d.ts.map +1 -1
- package/dist/commands/item/list.js +16 -13
- package/dist/commands/item/list.js.map +1 -1
- package/dist/commands/item/move.d.ts.map +1 -1
- package/dist/commands/item/move.js +41 -7
- package/dist/commands/item/move.js.map +1 -1
- package/dist/commands/item/search.d.ts +99 -15
- package/dist/commands/item/search.d.ts.map +1 -1
- package/dist/commands/item/search.js +480 -36
- package/dist/commands/item/search.js.map +1 -1
- package/dist/commands/item/set.d.ts.map +1 -1
- package/dist/commands/item/set.js +52 -8
- package/dist/commands/item/set.js.map +1 -1
- package/dist/commands/item/time-track/start.d.ts +61 -0
- package/dist/commands/item/time-track/start.d.ts.map +1 -0
- package/dist/commands/item/time-track/start.js +138 -0
- package/dist/commands/item/time-track/start.js.map +1 -0
- package/dist/commands/item/time-track/stop.d.ts +32 -0
- package/dist/commands/item/time-track/stop.d.ts.map +1 -0
- package/dist/commands/item/time-track/stop.js +97 -0
- package/dist/commands/item/time-track/stop.js.map +1 -0
- package/dist/commands/item/update.d.ts +2 -0
- package/dist/commands/item/update.d.ts.map +1 -1
- package/dist/commands/item/update.js +164 -113
- package/dist/commands/item/update.js.map +1 -1
- package/dist/commands/item/upload.d.ts +108 -0
- package/dist/commands/item/upload.d.ts.map +1 -0
- package/dist/commands/item/upload.js +370 -0
- package/dist/commands/item/upload.js.map +1 -0
- package/dist/commands/item/upsert.d.ts.map +1 -1
- package/dist/commands/item/upsert.js +48 -1
- package/dist/commands/item/upsert.js.map +1 -1
- package/dist/commands/item/watch.d.ts +90 -0
- package/dist/commands/item/watch.d.ts.map +1 -0
- package/dist/commands/item/watch.js +342 -0
- package/dist/commands/item/watch.js.map +1 -0
- package/dist/commands/notification/send.d.ts +60 -0
- package/dist/commands/notification/send.d.ts.map +1 -0
- package/dist/commands/notification/send.js +147 -0
- package/dist/commands/notification/send.js.map +1 -0
- package/dist/commands/parse-argv.d.ts.map +1 -1
- package/dist/commands/parse-argv.js +14 -4
- package/dist/commands/parse-argv.js.map +1 -1
- package/dist/commands/raw/index.d.ts.map +1 -1
- package/dist/commands/raw/index.js +13 -15
- package/dist/commands/raw/index.js.map +1 -1
- package/dist/commands/run-by-id-lookup.d.ts.map +1 -1
- package/dist/commands/run-by-id-lookup.js +2 -2
- package/dist/commands/run-by-id-lookup.js.map +1 -1
- package/dist/commands/schema/index.d.ts +2 -0
- package/dist/commands/schema/index.d.ts.map +1 -1
- package/dist/commands/status.d.ts +120 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +365 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/update/body-source.d.ts.map +1 -1
- package/dist/commands/update/body-source.js +2 -2
- package/dist/commands/update/body-source.js.map +1 -1
- package/dist/commands/update/create.d.ts +2 -3
- package/dist/commands/update/create.d.ts.map +1 -1
- package/dist/commands/update/create.js +15 -3
- package/dist/commands/update/create.js.map +1 -1
- package/dist/commands/update/delete.d.ts.map +1 -1
- package/dist/commands/update/delete.js +11 -0
- package/dist/commands/update/delete.js.map +1 -1
- package/dist/commands/update/edit.d.ts.map +1 -1
- package/dist/commands/update/edit.js +11 -0
- package/dist/commands/update/edit.js.map +1 -1
- package/dist/commands/update/list.d.ts.map +1 -1
- package/dist/commands/update/list.js +15 -12
- package/dist/commands/update/list.js.map +1 -1
- package/dist/commands/update/reply.d.ts.map +1 -1
- package/dist/commands/update/reply.js +11 -0
- package/dist/commands/update/reply.js.map +1 -1
- package/dist/commands/update/toggle.d.ts.map +1 -1
- package/dist/commands/update/toggle.js +13 -0
- package/dist/commands/update/toggle.js.map +1 -1
- package/dist/commands/update/upload.d.ts +69 -0
- package/dist/commands/update/upload.d.ts.map +1 -0
- package/dist/commands/update/upload.js +235 -0
- package/dist/commands/update/upload.js.map +1 -0
- package/dist/commands/usage.d.ts +58 -0
- package/dist/commands/usage.d.ts.map +1 -0
- package/dist/commands/usage.js +94 -0
- package/dist/commands/usage.js.map +1 -0
- package/dist/commands/webhook/create.d.ts +74 -0
- package/dist/commands/webhook/create.d.ts.map +1 -0
- package/dist/commands/webhook/create.js +150 -0
- package/dist/commands/webhook/create.js.map +1 -0
- package/dist/commands/webhook/delete.d.ts +46 -0
- package/dist/commands/webhook/delete.d.ts.map +1 -0
- package/dist/commands/webhook/delete.js +141 -0
- package/dist/commands/webhook/delete.js.map +1 -0
- package/dist/commands/webhook/list.d.ts +23 -0
- package/dist/commands/webhook/list.d.ts.map +1 -0
- package/dist/commands/webhook/list.js +68 -0
- package/dist/commands/webhook/list.js.map +1 -0
- package/dist/commands/workspace/create.d.ts.map +1 -1
- package/dist/commands/workspace/create.js +16 -0
- package/dist/commands/workspace/create.js.map +1 -1
- package/dist/commands/workspace/delete.d.ts.map +1 -1
- package/dist/commands/workspace/delete.js +13 -13
- package/dist/commands/workspace/delete.js.map +1 -1
- package/dist/commands/workspace/list.d.ts +1 -1
- package/dist/commands/workspace/update.d.ts.map +1 -1
- package/dist/commands/workspace/update.js +15 -15
- package/dist/commands/workspace/update.js.map +1 -1
- package/dist/config/credentials.d.ts +189 -0
- package/dist/config/credentials.d.ts.map +1 -0
- package/dist/config/credentials.js +300 -0
- package/dist/config/credentials.js.map +1 -0
- package/dist/config/profiles.d.ts +125 -0
- package/dist/config/profiles.d.ts.map +1 -0
- package/dist/config/profiles.js +227 -0
- package/dist/config/profiles.js.map +1 -0
- package/dist/types/global-flags.d.ts +1 -1
- package/dist/types/global-flags.d.ts.map +1 -1
- package/dist/types/global-flags.js +28 -16
- package/dist/types/global-flags.js.map +1 -1
- package/dist/types/ids.d.ts +4 -0
- package/dist/types/ids.d.ts.map +1 -1
- package/dist/types/ids.js +12 -3
- package/dist/types/ids.js.map +1 -1
- package/dist/utils/errors.d.ts +57 -3
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +69 -2
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/fs.d.ts +35 -0
- package/dist/utils/fs.d.ts.map +1 -0
- package/dist/utils/fs.js +36 -0
- package/dist/utils/fs.js.map +1 -0
- package/dist/utils/json.d.ts +60 -0
- package/dist/utils/json.d.ts.map +1 -0
- package/dist/utils/json.js +86 -0
- package/dist/utils/json.js.map +1 -0
- package/dist/utils/mime.d.ts +24 -0
- package/dist/utils/mime.d.ts.map +1 -0
- package/dist/utils/mime.js +64 -0
- package/dist/utils/mime.js.map +1 -0
- package/dist/utils/output/envelope.d.ts +30 -0
- package/dist/utils/output/envelope.d.ts.map +1 -1
- package/dist/utils/output/envelope.js +26 -0
- package/dist/utils/output/envelope.js.map +1 -1
- package/dist/utils/output/ndjson.d.ts +90 -3
- package/dist/utils/output/ndjson.d.ts.map +1 -1
- package/dist/utils/output/ndjson.js +33 -0
- package/dist/utils/output/ndjson.js.map +1 -1
- package/dist/utils/redact.d.ts.map +1 -1
- package/dist/utils/redact.js +31 -0
- package/dist/utils/redact.js.map +1 -1
- package/dist/utils/signal.d.ts +42 -0
- package/dist/utils/signal.d.ts.map +1 -0
- package/dist/utils/signal.js +45 -0
- package/dist/utils/signal.js.map +1 -0
- package/package.json +2 -1
- package/dist/commands/account/client-helper.d.ts +0 -37
- package/dist/commands/account/client-helper.d.ts.map +0 -1
- package/dist/commands/account/client-helper.js +0 -55
- package/dist/commands/account/client-helper.js.map +0 -1
|
@@ -1,12 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `monday item search --board <bid> --
|
|
3
|
-
*
|
|
2
|
+
* `monday item search [--board <bid> | --workspace <wid> | --favorites]
|
|
3
|
+
* --where ...` — column-value search across one or many boards
|
|
4
|
+
* (`cli-design.md` §5.5 / §13 v0.3 entry, `v0.1-plan.md` §3 M4,
|
|
5
|
+
* `v0.3-plan.md` §3 M23).
|
|
4
6
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* column count as a
|
|
7
|
+
* **v0.1 single-board path (`--board <bid>` set).** Backed by
|
|
8
|
+
* Monday's `items_page_by_column_values` endpoint — a narrower
|
|
9
|
+
* surface than `items_page`'s `query_params.rules`: value-equality
|
|
10
|
+
* only, AND across columns, OR within a column's values. Items
|
|
11
|
+
* matching ANY of the listed values for a given column count as a
|
|
12
|
+
* hit.
|
|
13
|
+
*
|
|
14
|
+
* **v0.3-M23 cross-board path (`--board` omitted; `--workspace <wid>`,
|
|
15
|
+
* `--favorites`, or no scoping lever set — all-accessible-boards
|
|
16
|
+
* mode).** Uses a different shape on the wire: `boards(ids: [...])
|
|
17
|
+
* { items_page(query_params: { rules }) }` fan-out via
|
|
18
|
+
* `src/api/cross-board-search.ts`. Per-board cursors, per-board
|
|
19
|
+
* column resolution, `--max-boards 25` default cap (hard cap 100
|
|
20
|
+
* per Decision 5 closure `3a2f1db`). At most ONE of `--board` /
|
|
21
|
+
* `--workspace` / `--favorites` may be supplied — supplying two
|
|
22
|
+
* raises `usage_error` at the input-schema layer. **Runtime body
|
|
23
|
+
* shipped at `1f09a25`** — `--favorites` calls `fetchBoardFavorites`
|
|
24
|
+
* for the ID set; `--workspace <wid>` enumerates via
|
|
25
|
+
* `boards(workspace_ids:[wid])`; no scoping lever enumerates
|
|
26
|
+
* `boards(limit:N)` for all-accessible mode. Per-board column-
|
|
27
|
+
* resolution pre-pass surfaces `column_not_found_on_board` warnings
|
|
28
|
+
* for boards lacking the `--where` columns; the walker fans out
|
|
29
|
+
* over the surviving plans + surfaces `inaccessible_boards` /
|
|
30
|
+
* `cross_board_truncated` warnings per the empirical-probe findings.
|
|
10
31
|
*
|
|
11
32
|
* Why a separate command from `item list --where`: the endpoints
|
|
12
33
|
* are different. `items_page_by_column_values` is purpose-built for
|
|
@@ -16,12 +37,13 @@
|
|
|
16
37
|
* Monday's full filter DSL (any_of, contains_text, comparators,
|
|
17
38
|
* is_empty) but pays the per-page complexity cost.
|
|
18
39
|
*
|
|
19
|
-
* v0.1 surface: only the `=` operator is
|
|
20
|
-
* Multiple `--where status=A --where
|
|
21
|
-
* column merge into one entry with
|
|
22
|
-
* Multiple columns AND across entries.
|
|
23
|
-
* `:is_empty`, etc.) raises `usage_error`
|
|
24
|
-
* list --where` for the richer surface.
|
|
40
|
+
* v0.1 single-board operator surface: only the `=` operator is
|
|
41
|
+
* supported via this command. Multiple `--where status=A --where
|
|
42
|
+
* status=B` against the same column merge into one entry with
|
|
43
|
+
* `[A, B]` (OR within column). Multiple columns AND across entries.
|
|
44
|
+
* Anything else (`~=`, `<`, `:is_empty`, etc.) raises `usage_error`
|
|
45
|
+
* — agents pick `item list --where` for the richer surface. Same
|
|
46
|
+
* operator surface applies to the cross-board path.
|
|
25
47
|
*
|
|
26
48
|
* Idempotent: yes.
|
|
27
49
|
*/
|
|
@@ -29,9 +51,12 @@ import { z } from 'zod';
|
|
|
29
51
|
import { ensureSubcommand } from '../types.js';
|
|
30
52
|
import { emitSuccess } from '../emit.js';
|
|
31
53
|
import { resolveClient } from '../../api/resolve-client.js';
|
|
32
|
-
import { BoardIdSchema } from '../../types/ids.js';
|
|
54
|
+
import { BoardIdSchema, WorkspaceIdSchema } from '../../types/ids.js';
|
|
33
55
|
import { parseArgv } from '../parse-argv.js';
|
|
34
|
-
import { UsageError } from '../../utils/errors.js';
|
|
56
|
+
import { ApiError, UsageError } from '../../utils/errors.js';
|
|
57
|
+
import { DEFAULT_MAX_BOARDS, HARD_CAP_MAX_BOARDS, buildColumnNotFoundOnBoardWarning, crossBoardSearch, crossBoardSearchOutputSchema, } from '../../api/cross-board-search.js';
|
|
58
|
+
import { fetchBoardFavorites, } from '../../api/board-favorites.js';
|
|
59
|
+
import { SourceAggregator } from '../../api/source-aggregator.js';
|
|
35
60
|
import { loadBoardMetadata, refreshBoardMetadata, } from '../../api/board-metadata.js';
|
|
36
61
|
import { parseWhereSyntax } from '../../api/filters.js';
|
|
37
62
|
import { resolveColumnsAcrossClauses } from '../../api/columns.js';
|
|
@@ -39,9 +64,8 @@ import { isMeToken } from '../../api/me-token.js';
|
|
|
39
64
|
import { DEFAULT_PAGE_SIZE, paginate, } from '../../api/pagination.js';
|
|
40
65
|
import { idFromRawItem, projectedItemSchema, } from '../../api/item-projection.js';
|
|
41
66
|
import { ITEM_FIELDS_FRAGMENT, collectColumnHeads, projectFromRaw, resolveMeFactory, titleMap, } from '../../api/item-helpers.js';
|
|
42
|
-
import { buildMeta } from '../../utils/output/envelope.js';
|
|
43
67
|
import { selectOutput } from '../../utils/output/select.js';
|
|
44
|
-
import { startNdjsonStream } from '../../utils/output/ndjson.js';
|
|
68
|
+
import { buildStreamingTrailerMeta, startNdjsonStream, } from '../../utils/output/ndjson.js';
|
|
45
69
|
import { collectSecrets } from '../../cli/envelope-out.js';
|
|
46
70
|
const ITEMS_PAGE_BY_COLUMN_VALUES_QUERY = `
|
|
47
71
|
query ItemsByColumnValues(
|
|
@@ -72,15 +96,97 @@ const ITEMS_BY_COLUMN_VALUES_NEXT_QUERY = `
|
|
|
72
96
|
}
|
|
73
97
|
`;
|
|
74
98
|
export const itemSearchOutputSchema = z.array(projectedItemSchema);
|
|
99
|
+
/**
|
|
100
|
+
* The command-registry-facing output schema. Per Codex round-2 P1-1,
|
|
101
|
+
* `monday item search`'s registry-level `outputSchema` is a union of
|
|
102
|
+
* the v0.1 single-board projection (`itemSearchOutputSchema` —
|
|
103
|
+
* `ProjectedItem[]`) AND the v0.3-M23 cross-board projection
|
|
104
|
+
* (`crossBoardSearchOutputSchema` — `CrossBoardItem[]`, each item
|
|
105
|
+
* carrying its source board id+name). The action body emits via
|
|
106
|
+
* the branch-specific schema (single-board uses
|
|
107
|
+
* `itemSearchOutputSchema` for the existing v0.1 path; cross-board
|
|
108
|
+
* uses `crossBoardSearchOutputSchema` at M23 implementation). The
|
|
109
|
+
* UNION here keeps `monday schema item.search` accurate to the
|
|
110
|
+
* runtime output across both branches.
|
|
111
|
+
*
|
|
112
|
+
* **Why a plain union and not a discriminated union.** The two
|
|
113
|
+
* shapes overlap on `id` / `name` but differ on the `board` slot
|
|
114
|
+
* (absent in single-board; required object in cross-board). Adding
|
|
115
|
+
* an explicit `cross_board: true` discriminator to one branch
|
|
116
|
+
* would carry-cost on every cross-board row for marginal agent
|
|
117
|
+
* value (the presence of the `board` slot itself discriminates).
|
|
118
|
+
* Agents that care can check `'board' in item`; agents that just
|
|
119
|
+
* want `id`/`name` consume both shapes uniformly.
|
|
120
|
+
*/
|
|
121
|
+
export const itemSearchCommandOutputSchema = z.union([
|
|
122
|
+
itemSearchOutputSchema,
|
|
123
|
+
crossBoardSearchOutputSchema,
|
|
124
|
+
]);
|
|
75
125
|
const inputSchema = z
|
|
76
126
|
.object({
|
|
77
|
-
board
|
|
127
|
+
// v0.1 single-board scoping lever. v0.3-M23 makes this optional
|
|
128
|
+
// — when omitted, one of `workspace` / `favorites` / neither (=
|
|
129
|
+
// all-accessible-boards mode) picks the cross-board path.
|
|
130
|
+
board: BoardIdSchema.optional(),
|
|
131
|
+
// v0.3-M23 cross-board scoping levers (mutually exclusive with
|
|
132
|
+
// `--board` AND with each other per `.superRefine` below).
|
|
133
|
+
workspace: WorkspaceIdSchema.optional(),
|
|
134
|
+
favorites: z.boolean().optional(),
|
|
135
|
+
// v0.3-M23 cross-board fan-out cap (Decision 5 closure
|
|
136
|
+
// `3a2f1db`). Default 25, hard cap 100. Only meaningful when
|
|
137
|
+
// the cross-board path runs; with `--board` the flag is
|
|
138
|
+
// silently ignored. Codex P2-2 fix: the hard-cap enforcement
|
|
139
|
+
// is CONDITIONAL — applied only when `board` is absent (the
|
|
140
|
+
// cross-board path). On the single-board path the v0.1 user-
|
|
141
|
+
// facing contract is "flag is ignored", so we accept any
|
|
142
|
+
// positive integer there to honour that wording rather than
|
|
143
|
+
// rejecting agents that pass the flag harmlessly under
|
|
144
|
+
// `--board`.
|
|
145
|
+
maxBoards: z.coerce.number().int().positive().optional(),
|
|
78
146
|
where: z.array(z.string()).min(1),
|
|
79
147
|
all: z.boolean().optional(),
|
|
80
148
|
limit: z.coerce.number().int().positive().max(10_000).optional(),
|
|
81
149
|
pageSize: z.coerce.number().int().positive().max(500).optional(),
|
|
82
150
|
})
|
|
83
|
-
.strict()
|
|
151
|
+
.strict()
|
|
152
|
+
.superRefine((value, ctx) => {
|
|
153
|
+
// v0.3-M23 mutual-exclusion rule per cli-design §13 v0.3 entry.
|
|
154
|
+
// At most ONE of `--board` / `--workspace` / `--favorites` may
|
|
155
|
+
// be supplied; supplying two surfaces a usage_error at the
|
|
156
|
+
// parse boundary rather than letting the runtime resolver
|
|
157
|
+
// surface a confusing error.
|
|
158
|
+
//
|
|
159
|
+
// Codex P2-3 fix: the path on the issue is empty (`[]`)
|
|
160
|
+
// because the conflict is about the COMBINATION of fields,
|
|
161
|
+
// not one specific field. The message + an explicit
|
|
162
|
+
// `conflicting_flags` slot in details carries the named
|
|
163
|
+
// levers for agent introspection.
|
|
164
|
+
const scopingLevers = [
|
|
165
|
+
value.board !== undefined ? 'board' : null,
|
|
166
|
+
value.workspace !== undefined ? 'workspace' : null,
|
|
167
|
+
value.favorites === true ? 'favorites' : null,
|
|
168
|
+
].filter((s) => s !== null);
|
|
169
|
+
if (scopingLevers.length > 1) {
|
|
170
|
+
ctx.addIssue({
|
|
171
|
+
code: 'custom',
|
|
172
|
+
message: `at most one of --board / --workspace / --favorites may be supplied; got: ${scopingLevers.join(', ')}`,
|
|
173
|
+
path: [],
|
|
174
|
+
params: { conflicting_flags: scopingLevers },
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
// Codex P2-2 fix: cap only applies on the cross-board path.
|
|
178
|
+
// On the single-board path (board set), `--max-boards` is
|
|
179
|
+
// documented as ignored — accept any positive integer.
|
|
180
|
+
if (value.board === undefined &&
|
|
181
|
+
value.maxBoards !== undefined &&
|
|
182
|
+
value.maxBoards > HARD_CAP_MAX_BOARDS) {
|
|
183
|
+
ctx.addIssue({
|
|
184
|
+
code: 'custom',
|
|
185
|
+
message: `--max-boards exceeds the hard cap of ${String(HARD_CAP_MAX_BOARDS)} (wall-clock fan-out latency cap, not a complexity-budget cap; the cap protects against the 30s request timeout per Decision 5 \`3a2f1db\`); narrow the cross-board set with --workspace or --favorites`,
|
|
186
|
+
path: ['maxBoards'],
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
});
|
|
84
190
|
const buildColumnQueries = async (inputs) => {
|
|
85
191
|
// Reject non-equality operators upfront — the endpoint doesn't
|
|
86
192
|
// support them and validating before resolution avoids burning a
|
|
@@ -173,24 +279,204 @@ const extractNext = (r) => {
|
|
|
173
279
|
next_items_page; same rationale as item/list.ts. */
|
|
174
280
|
return { cursor: page?.cursor ?? null, items: page?.items ?? [] };
|
|
175
281
|
};
|
|
282
|
+
/**
|
|
283
|
+
* GraphQL document for cross-board enumeration (workspace + all-
|
|
284
|
+
* accessible scoping levers). Selects only `id` + `name` — the
|
|
285
|
+
* fan-out walker hydrates `name` again per-board, but we read it
|
|
286
|
+
* here too so a future debug path (e.g. printing the resolved set)
|
|
287
|
+
* has it without an extra round-trip.
|
|
288
|
+
*
|
|
289
|
+
* State filter pinned to `active` so archived/deleted boards don't
|
|
290
|
+
* pollute the cross-board set; agents wanting archived must use the
|
|
291
|
+
* v0.1 `--board <bid>` single-board path.
|
|
292
|
+
*/
|
|
293
|
+
const CROSS_BOARD_ENUM_QUERY = `
|
|
294
|
+
query CrossBoardEnumerate($workspaceIds: [ID], $limit: Int) {
|
|
295
|
+
boards(workspace_ids: $workspaceIds, limit: $limit, state: active) {
|
|
296
|
+
id
|
|
297
|
+
name
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
`;
|
|
301
|
+
/**
|
|
302
|
+
* Resolves the cross-board ID set per the scoping lever. Three
|
|
303
|
+
* paths:
|
|
304
|
+
*
|
|
305
|
+
* - `--favorites`: call `fetchBoardFavorites`; project to board
|
|
306
|
+
* IDs; truncate to `--max-boards`. Stale-favorites warning (if
|
|
307
|
+
* surfaced by the favorites resolver) is folded into
|
|
308
|
+
* `preWarnings`.
|
|
309
|
+
* - `--workspace <wid>`: `boards(workspace_ids: [<wid>], limit:
|
|
310
|
+
* <maxBoards>, state: active)`.
|
|
311
|
+
* - neither: `boards(limit: <maxBoards>, state: active)`
|
|
312
|
+
* (all-accessible mode).
|
|
313
|
+
*
|
|
314
|
+
* All three paths cap at `--max-boards` (parse boundary already
|
|
315
|
+
* rejected above-hard-cap values; here we honour the agent's
|
|
316
|
+
* resolved cap). `aggregator` records `'live'` for the enum call
|
|
317
|
+
* (the lever queries are pure-live; the cache-bearing source is
|
|
318
|
+
* the per-board metadata pre-pass which records separately).
|
|
319
|
+
*/
|
|
320
|
+
const resolveCrossBoardSet = async (inputs) => {
|
|
321
|
+
if (inputs.parsed.favorites === true) {
|
|
322
|
+
const result = await fetchBoardFavorites({ client: inputs.client });
|
|
323
|
+
inputs.aggregator.record(result.source, result.cacheAgeSeconds);
|
|
324
|
+
inputs.preWarnings.push(...result.warnings);
|
|
325
|
+
return result.boards
|
|
326
|
+
.slice(0, inputs.maxBoards)
|
|
327
|
+
.map((b) => BoardIdSchema.parse(b.id));
|
|
328
|
+
}
|
|
329
|
+
const variables = { limit: inputs.maxBoards };
|
|
330
|
+
if (inputs.parsed.workspace !== undefined) {
|
|
331
|
+
variables.workspaceIds = [inputs.parsed.workspace];
|
|
332
|
+
}
|
|
333
|
+
const response = await inputs.client.raw(CROSS_BOARD_ENUM_QUERY, variables, { operationName: 'CrossBoardEnumerate' });
|
|
334
|
+
inputs.aggregator.record('live', null);
|
|
335
|
+
const boards = response.data.boards ?? [];
|
|
336
|
+
return boards.map((b) => BoardIdSchema.parse(b.id));
|
|
337
|
+
};
|
|
338
|
+
/**
|
|
339
|
+
* Builds the `PerBoardScanPlan` for one board, or returns
|
|
340
|
+
* `undefined` if the board doesn't have all the columns the
|
|
341
|
+
* `--where` clauses need.
|
|
342
|
+
*
|
|
343
|
+
* Per-board steps:
|
|
344
|
+
* 1. Load metadata (cache-first; `--no-cache` bypasses).
|
|
345
|
+
* Record per-leg source via `aggregator`.
|
|
346
|
+
* 2. Resolve every clause's column token against this board's
|
|
347
|
+
* columns. On `column_not_found`, surface a
|
|
348
|
+
* `column_not_found_on_board` warning (which board, which
|
|
349
|
+
* token) and return `undefined` — the walker skips this
|
|
350
|
+
* board.
|
|
351
|
+
* 3. Project the `--where` clauses into wire rules: resolve
|
|
352
|
+
* `me` for people columns, group by resolved column ID, OR
|
|
353
|
+
* multiple values within a column.
|
|
354
|
+
* 4. Validate clauses use only the `=` operator (cross-board
|
|
355
|
+
* surface inherits the v0.1 single-board restriction).
|
|
356
|
+
*/
|
|
357
|
+
const buildPerBoardPlan = async (inputs) => {
|
|
358
|
+
// Validate operators upfront — same rule the v0.1 single-board
|
|
359
|
+
// path applies in buildColumnQueries. Cross-board uses the
|
|
360
|
+
// narrower `=`-only surface; richer filters live on
|
|
361
|
+
// `item list --where`.
|
|
362
|
+
for (const clause of inputs.clauses) {
|
|
363
|
+
if (clause.operator.kind !== 'equals') {
|
|
364
|
+
throw new UsageError(`item search supports only the = operator (got ${clause.operator.literal} ` +
|
|
365
|
+
`in ${JSON.stringify(clause.raw)}); use \`item list --where\` for richer filters`, { details: { clause: clause.raw, operator: clause.operator.literal } });
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
const meta = await loadBoardMetadata({
|
|
369
|
+
client: inputs.client,
|
|
370
|
+
boardId: inputs.boardId,
|
|
371
|
+
env: inputs.env,
|
|
372
|
+
noCache: inputs.noCache,
|
|
373
|
+
});
|
|
374
|
+
inputs.aggregator.record(meta.source, meta.cacheAgeSeconds);
|
|
375
|
+
// Per-board column resolution. We don't auto-refresh on
|
|
376
|
+
// column_not_found here — the cross-board path treats per-board
|
|
377
|
+
// column-not-found as a structured warning (the agent's intent
|
|
378
|
+
// is fan-out; a board missing a column is not a fatal error).
|
|
379
|
+
let resolved;
|
|
380
|
+
try {
|
|
381
|
+
resolved = await resolveColumnsAcrossClauses({
|
|
382
|
+
metadata: meta.metadata,
|
|
383
|
+
tokens: inputs.clauses.map((c) => c.token),
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
catch (err) {
|
|
387
|
+
if (err instanceof ApiError && err.code === 'column_not_found') {
|
|
388
|
+
const details = err.details;
|
|
389
|
+
const token = details?.token ?? '<unknown>';
|
|
390
|
+
inputs.preWarnings.push(buildColumnNotFoundOnBoardWarning(String(inputs.boardId), token));
|
|
391
|
+
return undefined;
|
|
392
|
+
}
|
|
393
|
+
// Defensive: resolveColumnsAcrossClauses throws either
|
|
394
|
+
// column_not_found (handled above) or `ambiguous_column` — the
|
|
395
|
+
// latter requires duplicate same-cased column titles within one
|
|
396
|
+
// board, which the cross-board action filters out at the
|
|
397
|
+
// BoardMetadata step (each board's resolution happens against
|
|
398
|
+
// its own metadata). Other ApiError codes here would indicate
|
|
399
|
+
// a contract bug in the resolver, not a recoverable path —
|
|
400
|
+
// re-throw so the action's error envelope surfaces it.
|
|
401
|
+
/* c8 ignore next */
|
|
402
|
+
throw err;
|
|
403
|
+
}
|
|
404
|
+
// Resolver collision / refresh warnings ResolverWarning widens
|
|
405
|
+
// cleanly to envelope.Warning per the v0.1 single-board path.
|
|
406
|
+
inputs.preWarnings.push(...resolved.warnings);
|
|
407
|
+
// Group clauses by resolved column ID, resolving `me` for people
|
|
408
|
+
// columns lazily.
|
|
409
|
+
let cachedMe;
|
|
410
|
+
const me = async () => {
|
|
411
|
+
cachedMe ??= await inputs.resolveMe();
|
|
412
|
+
return cachedMe;
|
|
413
|
+
};
|
|
414
|
+
const byColumn = new Map();
|
|
415
|
+
for (let i = 0; i < inputs.clauses.length; i++) {
|
|
416
|
+
const clause = inputs.clauses[i];
|
|
417
|
+
const match = resolved.matches[i];
|
|
418
|
+
/* c8 ignore next 4 — defensive: helper contract pins
|
|
419
|
+
matches.length === clauses.length. */
|
|
420
|
+
if (clause === undefined || match === undefined) {
|
|
421
|
+
throw new UsageError(`buildPerBoardPlan: lost clause/match alignment at index ${String(i)}`);
|
|
422
|
+
}
|
|
423
|
+
/* c8 ignore next 3 — defensive: parser guarantees binary ops
|
|
424
|
+
carry a value. */
|
|
425
|
+
if (clause.value === undefined) {
|
|
426
|
+
throw new UsageError(`internal: missing value for ${clause.raw}`);
|
|
427
|
+
}
|
|
428
|
+
let value = clause.value;
|
|
429
|
+
if (match.column.type === 'people' && isMeToken(value)) {
|
|
430
|
+
value = await me();
|
|
431
|
+
}
|
|
432
|
+
const existing = byColumn.get(match.column.id);
|
|
433
|
+
if (existing === undefined) {
|
|
434
|
+
byColumn.set(match.column.id, [value]);
|
|
435
|
+
}
|
|
436
|
+
else {
|
|
437
|
+
existing.push(value);
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
const rules = Array.from(byColumn, ([columnId, values]) => ({
|
|
441
|
+
column_id: columnId,
|
|
442
|
+
compare_values: values,
|
|
443
|
+
}));
|
|
444
|
+
return { board_id: inputs.boardId, rules };
|
|
445
|
+
};
|
|
176
446
|
export const itemSearchCommand = {
|
|
177
447
|
name: 'item.search',
|
|
178
|
-
summary: 'Search items by column value (any_of) on one board',
|
|
448
|
+
summary: 'Search items by column value (any_of) on one board (v0.1) or across many boards (v0.3-M23 — --workspace / --favorites / no-scoping-lever)',
|
|
179
449
|
examples: [
|
|
180
450
|
"monday item search --board 12345 --where 'status=Done'",
|
|
181
451
|
"monday item search --board 12345 --where 'status=Done' --where 'status=Backlog'",
|
|
182
452
|
'monday item search --board 12345 --where owner=me --json',
|
|
183
453
|
'monday item search --board 12345 --where status=Done --all --output ndjson',
|
|
454
|
+
'monday item search --favorites --where status=Done # v0.3-M23',
|
|
455
|
+
'monday item search --workspace 67890 --where status=Done --max-boards 50 # v0.3-M23',
|
|
184
456
|
],
|
|
185
457
|
idempotent: true,
|
|
186
458
|
inputSchema,
|
|
187
|
-
|
|
459
|
+
// Codex round-2 P1-1: command-registry-facing schema is the union
|
|
460
|
+
// of single-board + cross-board projections. The action body emits
|
|
461
|
+
// via the branch-specific schema below (existing v0.1 path uses
|
|
462
|
+
// `itemSearchOutputSchema` directly; M23 cross-board impl uses
|
|
463
|
+
// `crossBoardSearchOutputSchema`). The union keeps
|
|
464
|
+
// `monday schema item.search` accurate across both branches.
|
|
465
|
+
outputSchema: itemSearchCommandOutputSchema,
|
|
188
466
|
attach: (program, ctx) => {
|
|
189
467
|
const noun = ensureSubcommand(program, 'item', 'Item commands');
|
|
190
468
|
noun
|
|
191
469
|
.command('search')
|
|
192
470
|
.description(itemSearchCommand.summary)
|
|
193
|
-
.
|
|
471
|
+
// v0.3-M23: `--board` is now optional (v0.1 path still works when
|
|
472
|
+
// supplied; cross-board path runs when omitted). Mutual-exclusion
|
|
473
|
+
// with `--workspace` / `--favorites` enforced at the schema layer
|
|
474
|
+
// (`.superRefine`); missing-all-of-three is treated as
|
|
475
|
+
// "all-accessible-boards" cross-board mode at M23 implementation.
|
|
476
|
+
.option('--board <bid>', 'board ID (v0.1 single-board path; omit for v0.3 cross-board)')
|
|
477
|
+
.option('--workspace <wid>', 'workspace ID (v0.3-M23 cross-board scoping lever; mutually exclusive with --board / --favorites)')
|
|
478
|
+
.option('--favorites', "v0.3-M23 cross-board scoping lever — use the current user's `board favorites` set; mutually exclusive with --board / --workspace")
|
|
479
|
+
.option('--max-boards <n>', `v0.3-M23 cross-board fan-out cap (default ${String(DEFAULT_MAX_BOARDS)}, hard cap ${String(HARD_CAP_MAX_BOARDS)}; ignored on the single-board path)`)
|
|
194
480
|
.requiredOption('--where <expr>', 'repeatable: <col>=<val> only (no <, ~=, :is_empty)', (value, prev) => [...prev, value], [])
|
|
195
481
|
.option('--all', 'auto-paginate every page')
|
|
196
482
|
.option('--limit <n>', 'cap total items returned across pages')
|
|
@@ -198,10 +484,164 @@ export const itemSearchCommand = {
|
|
|
198
484
|
.addHelpText('after', ['', 'Examples:', ...itemSearchCommand.examples.map((e) => ` ${e}`), ''].join('\n'))
|
|
199
485
|
.action(async (opts) => {
|
|
200
486
|
const parsed = parseArgv(itemSearchCommand.inputSchema, opts);
|
|
487
|
+
// v0.3-M23 cross-board path. Dispatches on the scoping
|
|
488
|
+
// lever (`--favorites` / `--workspace <wid>` / neither =
|
|
489
|
+
// all-accessible-boards). Each branch resolves the board
|
|
490
|
+
// ID set, runs the per-board column-resolution pre-pass,
|
|
491
|
+
// and calls the fan-out walker.
|
|
492
|
+
if (parsed.board === undefined) {
|
|
493
|
+
const maxBoards = parsed.maxBoards ?? DEFAULT_MAX_BOARDS;
|
|
494
|
+
const { client, globalFlags, apiVersion, } = resolveClient(ctx, program.opts());
|
|
495
|
+
// Step 1: resolve the cross-board ID set per scoping lever.
|
|
496
|
+
// SourceAggregator tracks per-leg `meta.source`. The
|
|
497
|
+
// walker is always `'live'`; the pre-pass legs may be
|
|
498
|
+
// `'cache'` for cached board-metadata fetches.
|
|
499
|
+
const aggregator = new SourceAggregator();
|
|
500
|
+
const preWarnings = [];
|
|
501
|
+
const boardIds = await resolveCrossBoardSet({
|
|
502
|
+
parsed,
|
|
503
|
+
client,
|
|
504
|
+
maxBoards,
|
|
505
|
+
preWarnings,
|
|
506
|
+
aggregator,
|
|
507
|
+
});
|
|
508
|
+
// Step 2: per-board column-resolution pre-pass. Each
|
|
509
|
+
// board's metadata is loaded (cache-first), the where
|
|
510
|
+
// clauses are resolved per-board, and any board where a
|
|
511
|
+
// clause's column doesn't resolve gets dropped with a
|
|
512
|
+
// `column_not_found_on_board` warning. The surviving
|
|
513
|
+
// boards become `PerBoardScanPlan` entries.
|
|
514
|
+
const clauses = parsed.where.map(parseWhereSyntax);
|
|
515
|
+
const resolveMe = resolveMeFactory(client);
|
|
516
|
+
const plans = [];
|
|
517
|
+
for (const boardId of boardIds) {
|
|
518
|
+
const planResult = await buildPerBoardPlan({
|
|
519
|
+
boardId,
|
|
520
|
+
clauses,
|
|
521
|
+
client,
|
|
522
|
+
env: ctx.env,
|
|
523
|
+
noCache: globalFlags.noCache,
|
|
524
|
+
resolveMe,
|
|
525
|
+
preWarnings,
|
|
526
|
+
aggregator,
|
|
527
|
+
});
|
|
528
|
+
if (planResult !== undefined) {
|
|
529
|
+
plans.push(planResult);
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
const format = selectOutput({
|
|
533
|
+
json: globalFlags.json,
|
|
534
|
+
table: globalFlags.table,
|
|
535
|
+
...(globalFlags.output === undefined
|
|
536
|
+
? {}
|
|
537
|
+
: { output: globalFlags.output }),
|
|
538
|
+
env: ctx.env,
|
|
539
|
+
isTTY: ctx.isTTY,
|
|
540
|
+
});
|
|
541
|
+
// Step 3: if no boards have viable plans, short-circuit
|
|
542
|
+
// with empty data + the per-board warnings. The walker
|
|
543
|
+
// requires non-empty boardIds (defensive); the empty
|
|
544
|
+
// case is the action's concern.
|
|
545
|
+
if (plans.length === 0) {
|
|
546
|
+
aggregator.record('live', null);
|
|
547
|
+
const aggregated = aggregator.result('live');
|
|
548
|
+
emitSuccess({
|
|
549
|
+
ctx,
|
|
550
|
+
data: [],
|
|
551
|
+
schema: crossBoardSearchOutputSchema,
|
|
552
|
+
programOpts: program.opts(),
|
|
553
|
+
kind: 'collection',
|
|
554
|
+
source: aggregated.source,
|
|
555
|
+
cacheAgeSeconds: aggregated.cacheAgeSeconds,
|
|
556
|
+
warnings: preWarnings,
|
|
557
|
+
apiVersion,
|
|
558
|
+
hasMore: false,
|
|
559
|
+
totalReturned: 0,
|
|
560
|
+
});
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
563
|
+
// Step 4: streaming NDJSON path emits items as they
|
|
564
|
+
// arrive + writes the §6.3 trailer; bypasses
|
|
565
|
+
// emitSuccess because the streaming contract requires
|
|
566
|
+
// bytes hitting stdout before the walk completes.
|
|
567
|
+
if (format === 'ndjson') {
|
|
568
|
+
const stream = startNdjsonStream({
|
|
569
|
+
stream: ctx.stdout,
|
|
570
|
+
secrets: collectSecrets(ctx.env, ctx.runtimeSecrets),
|
|
571
|
+
project: (item) => ({ ...item }),
|
|
572
|
+
});
|
|
573
|
+
const walkResult = await crossBoardSearch({
|
|
574
|
+
client,
|
|
575
|
+
boardIds: plans.map((p) => p.board_id),
|
|
576
|
+
plans,
|
|
577
|
+
pageSize: parsed.pageSize ?? DEFAULT_PAGE_SIZE,
|
|
578
|
+
...(parsed.limit === undefined ? {} : { maxItems: parsed.limit }),
|
|
579
|
+
onItem: stream.onItem,
|
|
580
|
+
});
|
|
581
|
+
aggregator.record(walkResult.source, null);
|
|
582
|
+
const aggregated = aggregator.result('live');
|
|
583
|
+
stream.writeTrailer(buildStreamingTrailerMeta({
|
|
584
|
+
ctx: {
|
|
585
|
+
cliVersion: ctx.cliVersion,
|
|
586
|
+
requestId: ctx.requestId,
|
|
587
|
+
clock: ctx.clock,
|
|
588
|
+
},
|
|
589
|
+
apiVersion,
|
|
590
|
+
source: aggregated.source,
|
|
591
|
+
cacheAgeSeconds: aggregated.cacheAgeSeconds,
|
|
592
|
+
result: {
|
|
593
|
+
hasMore: walkResult.hasMore,
|
|
594
|
+
totalReturned: walkResult.totalReturned,
|
|
595
|
+
complexity: walkResult.complexity,
|
|
596
|
+
nextCursor: null,
|
|
597
|
+
},
|
|
598
|
+
}));
|
|
599
|
+
return;
|
|
600
|
+
}
|
|
601
|
+
// Step 5: non-streaming path — full walker run, then
|
|
602
|
+
// emitSuccess with merged source aggregation + the union
|
|
603
|
+
// schema's cross-board branch.
|
|
604
|
+
const walkResult = await crossBoardSearch({
|
|
605
|
+
client,
|
|
606
|
+
boardIds: plans.map((p) => p.board_id),
|
|
607
|
+
plans,
|
|
608
|
+
pageSize: parsed.pageSize ?? DEFAULT_PAGE_SIZE,
|
|
609
|
+
...(parsed.limit === undefined ? {} : { maxItems: parsed.limit }),
|
|
610
|
+
});
|
|
611
|
+
aggregator.record(walkResult.source, null);
|
|
612
|
+
const aggregated = aggregator.result('live');
|
|
613
|
+
const warnings = [
|
|
614
|
+
...preWarnings,
|
|
615
|
+
...walkResult.warnings,
|
|
616
|
+
];
|
|
617
|
+
emitSuccess({
|
|
618
|
+
ctx,
|
|
619
|
+
data: walkResult.items,
|
|
620
|
+
schema: crossBoardSearchOutputSchema,
|
|
621
|
+
programOpts: program.opts(),
|
|
622
|
+
kind: 'collection',
|
|
623
|
+
source: aggregated.source,
|
|
624
|
+
cacheAgeSeconds: aggregated.cacheAgeSeconds,
|
|
625
|
+
warnings,
|
|
626
|
+
apiVersion,
|
|
627
|
+
complexity: walkResult.complexity,
|
|
628
|
+
hasMore: walkResult.hasMore,
|
|
629
|
+
totalReturned: walkResult.totalReturned,
|
|
630
|
+
});
|
|
631
|
+
return;
|
|
632
|
+
}
|
|
633
|
+
// v0.3-M23: `parsed.board` is now `BoardId | undefined` at
|
|
634
|
+
// the schema layer; the cross-board branch above threw so
|
|
635
|
+
// `board` is `BoardId` here, but the narrowing doesn't carry
|
|
636
|
+
// through inner closures (the `onColumnNotFound` lambda
|
|
637
|
+
// captures the original optional type). Bind to a local
|
|
638
|
+
// before the single-board path so every reference inside
|
|
639
|
+
// closures sees the narrowed type.
|
|
640
|
+
const boardId = parsed.board;
|
|
201
641
|
const { client, globalFlags, apiVersion, toEmit } = resolveClient(ctx, program.opts());
|
|
202
642
|
const meta = await loadBoardMetadata({
|
|
203
643
|
client,
|
|
204
|
-
boardId
|
|
644
|
+
boardId,
|
|
205
645
|
env: ctx.env,
|
|
206
646
|
noCache: globalFlags.noCache,
|
|
207
647
|
});
|
|
@@ -210,7 +650,7 @@ export const itemSearchCommand = {
|
|
|
210
650
|
? async () => {
|
|
211
651
|
const refreshed = await refreshBoardMetadata({
|
|
212
652
|
client,
|
|
213
|
-
boardId
|
|
653
|
+
boardId,
|
|
214
654
|
env: ctx.env,
|
|
215
655
|
});
|
|
216
656
|
return refreshed.metadata;
|
|
@@ -244,11 +684,11 @@ export const itemSearchCommand = {
|
|
|
244
684
|
if (format === 'ndjson') {
|
|
245
685
|
const stream = startNdjsonStream({
|
|
246
686
|
stream: ctx.stdout,
|
|
247
|
-
secrets: collectSecrets(ctx.env),
|
|
687
|
+
secrets: collectSecrets(ctx.env, ctx.runtimeSecrets),
|
|
248
688
|
project: (raw) => projectFromRaw(raw, titles, { omitColumnTitles: true }),
|
|
249
689
|
});
|
|
250
690
|
const result = await paginate({
|
|
251
|
-
fetchInitial: initialFetcher(client,
|
|
691
|
+
fetchInitial: initialFetcher(client, boardId, columns),
|
|
252
692
|
fetchNext: nextFetcher(client),
|
|
253
693
|
now: ctx.clock,
|
|
254
694
|
extractPage: (r) => {
|
|
@@ -267,17 +707,21 @@ export const itemSearchCommand = {
|
|
|
267
707
|
// they're dropped per the §6.3 "no warnings in trailer"
|
|
268
708
|
// rule. Same shape as item list's streaming branch.
|
|
269
709
|
void filterWarnings;
|
|
270
|
-
stream.writeTrailer(
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
710
|
+
stream.writeTrailer(buildStreamingTrailerMeta({
|
|
711
|
+
ctx: {
|
|
712
|
+
cliVersion: ctx.cliVersion,
|
|
713
|
+
requestId: ctx.requestId,
|
|
714
|
+
clock: ctx.clock,
|
|
715
|
+
},
|
|
716
|
+
apiVersion,
|
|
274
717
|
source: effectiveSource,
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
718
|
+
cacheAgeSeconds: effectiveCacheAge,
|
|
719
|
+
result: {
|
|
720
|
+
hasMore: result.hasMore,
|
|
721
|
+
totalReturned: result.totalReturned,
|
|
722
|
+
complexity: result.complexity,
|
|
723
|
+
nextCursor: result.nextCursor,
|
|
724
|
+
},
|
|
281
725
|
columns: columnHeads,
|
|
282
726
|
}));
|
|
283
727
|
return;
|