outask 0.0.0-stage → 1.7.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/LICENSE +661 -0
- package/README.md +38 -2
- package/bin/outask +7 -0
- package/bin/tasks +7 -0
- package/cli.mjs +151 -0
- package/mcp/package-lock.json +175 -0
- package/mcp/package.json +15 -0
- package/mcp/server.mjs +132 -0
- package/node_modules/@modelcontextprotocol/core/LICENSE +216 -0
- package/node_modules/@modelcontextprotocol/core/README.md +40 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-Anm-lwWi.d.mts +8507 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-Anm-lwWi.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-BNDyLTqp.mjs +1681 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-BNDyLTqp.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-D1CeV_Jr.cjs +2902 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-D1CeV_Jr.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-V9XJSCfa.d.cts +8507 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-V9XJSCfa.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/index.cjs +175 -0
- package/node_modules/@modelcontextprotocol/core/dist/index.d.cts +2 -0
- package/node_modules/@modelcontextprotocol/core/dist/index.d.mts +2 -0
- package/node_modules/@modelcontextprotocol/core/dist/index.mjs +3 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.cjs +201 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.cts +99 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.mts +99 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.mjs +3 -0
- package/node_modules/@modelcontextprotocol/core/package.json +85 -0
- package/node_modules/@modelcontextprotocol/server/LICENSE +216 -0
- package/node_modules/@modelcontextprotocol/server/README.md +30 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CEoC__sr.mjs +7514 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CEoC__sr.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CgI-5L6O.d.mts +1071 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CgI-5L6O.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-FOQRM7up.d.cts +1071 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-FOQRM7up.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-ZaoO9afR.cjs +7531 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-ZaoO9afR.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-BwbPzsdI.cjs +986 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-BwbPzsdI.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-C03CSigr.d.mts +74 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-C03CSigr.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-doTkZbTr.d.cts +74 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-doTkZbTr.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-p3WaZPqB.mjs +981 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-p3WaZPqB.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/chunk-Bnu9O96Y.cjs +60 -0
- package/node_modules/@modelcontextprotocol/server/dist/chunk-Br0eD_fh.mjs +42 -0
- package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-D4NN8WsG.d.mts +4168 -0
- package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-D4NN8WsG.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-DZmmlN8e.d.cts +4170 -0
- package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-DZmmlN8e.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/dialects-D8eXzoGv.cjs +46 -0
- package/node_modules/@modelcontextprotocol/server/dist/dialects-D8eXzoGv.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/dialects-DoSzNhcb.mjs +34 -0
- package/node_modules/@modelcontextprotocol/server/dist/dialects-DoSzNhcb.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.cjs +1978 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.d.cts +810 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.d.mts +810 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.mjs +1790 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/mcp-BumlNux0.cjs +2477 -0
- package/node_modules/@modelcontextprotocol/server/dist/mcp-BumlNux0.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/mcp-DIH4cS6P.mjs +2326 -0
- package/node_modules/@modelcontextprotocol/server/dist/mcp-DIH4cS6P.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.cjs +23 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.cts +11 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.mts +11 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.mjs +22 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsNode.cjs +12 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsNode.d.cts +3 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsNode.d.mts +3 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsNode.mjs +4 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.cjs +30 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.cts +10 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.mts +10 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.mjs +29 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/src-BhnGYybN.cjs +8200 -0
- package/node_modules/@modelcontextprotocol/server/dist/src-BhnGYybN.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/src-Cqbh3MYc.mjs +7702 -0
- package/node_modules/@modelcontextprotocol/server/dist/src-Cqbh3MYc.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.cjs +591 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.d.cts +115 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.d.mts +115 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.mjs +589 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/types-DUs7mGBv.d.mts +1099 -0
- package/node_modules/@modelcontextprotocol/server/dist/types-DUs7mGBv.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/types-DsbMXNFL.d.cts +1099 -0
- package/node_modules/@modelcontextprotocol/server/dist/types-DsbMXNFL.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.cjs +5 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.d.cts +2 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.d.mts +2 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.mjs +3 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.cjs +3 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.d.cts +2 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.d.mts +2 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.mjs +3 -0
- package/node_modules/@modelcontextprotocol/server/package.json +160 -0
- package/node_modules/jsonc-parser/CHANGELOG.md +76 -0
- package/node_modules/jsonc-parser/LICENSE.md +21 -0
- package/node_modules/jsonc-parser/README.md +364 -0
- package/node_modules/jsonc-parser/SECURITY.md +41 -0
- package/node_modules/jsonc-parser/lib/esm/impl/edit.js +185 -0
- package/node_modules/jsonc-parser/lib/esm/impl/format.js +261 -0
- package/node_modules/jsonc-parser/lib/esm/impl/parser.js +659 -0
- package/node_modules/jsonc-parser/lib/esm/impl/scanner.js +443 -0
- package/node_modules/jsonc-parser/lib/esm/impl/string-intern.js +29 -0
- package/node_modules/jsonc-parser/lib/esm/main.d.ts +351 -0
- package/node_modules/jsonc-parser/lib/esm/main.js +178 -0
- package/node_modules/jsonc-parser/lib/umd/impl/edit.js +201 -0
- package/node_modules/jsonc-parser/lib/umd/impl/format.js +275 -0
- package/node_modules/jsonc-parser/lib/umd/impl/parser.js +682 -0
- package/node_modules/jsonc-parser/lib/umd/impl/scanner.js +456 -0
- package/node_modules/jsonc-parser/lib/umd/impl/string-intern.js +42 -0
- package/node_modules/jsonc-parser/lib/umd/main.d.ts +351 -0
- package/node_modules/jsonc-parser/lib/umd/main.js +194 -0
- package/node_modules/jsonc-parser/package.json +37 -0
- package/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +218 -0
- package/node_modules/zod/compile.cjs +96 -0
- package/node_modules/zod/compile.d.cts +1 -0
- package/node_modules/zod/compile.d.ts +1 -0
- package/node_modules/zod/compile.js +52 -0
- package/node_modules/zod/index.cjs +52 -0
- package/node_modules/zod/index.d.cts +3 -0
- package/node_modules/zod/index.d.ts +3 -0
- package/node_modules/zod/index.js +7 -0
- package/node_modules/zod/locales/index.cjs +36 -0
- package/node_modules/zod/locales/index.d.cts +1 -0
- package/node_modules/zod/locales/index.d.ts +1 -0
- package/node_modules/zod/locales/index.js +1 -0
- package/node_modules/zod/locales/package.json +7 -0
- package/node_modules/zod/mini/index.cjs +51 -0
- package/node_modules/zod/mini/index.d.cts +3 -0
- package/node_modules/zod/mini/index.d.ts +3 -0
- package/node_modules/zod/mini/index.js +3 -0
- package/node_modules/zod/mini/package.json +7 -0
- package/node_modules/zod/package.json +147 -0
- package/node_modules/zod/src/compile.ts +56 -0
- package/node_modules/zod/src/index.ts +7 -0
- package/node_modules/zod/src/locales/index.ts +1 -0
- package/node_modules/zod/src/mini/index.ts +3 -0
- package/node_modules/zod/src/v3/ZodError.ts +340 -0
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/zod/src/v3/types.ts +5138 -0
- package/node_modules/zod/src/v4/classic/checks.ts +33 -0
- package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/zod/src/v4/classic/compat.ts +78 -0
- package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
- package/node_modules/zod/src/v4/classic/errors.ts +97 -0
- package/node_modules/zod/src/v4/classic/external.ts +57 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +944 -0
- package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
- package/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/zod/src/v4/classic/iso.ts +20 -0
- package/node_modules/zod/src/v4/classic/parse.ts +88 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +2937 -0
- package/node_modules/zod/src/v4/core/api.ts +1875 -0
- package/node_modules/zod/src/v4/core/checks.ts +1266 -0
- package/node_modules/zod/src/v4/core/compile.ts +2322 -0
- package/node_modules/zod/src/v4/core/core.ts +230 -0
- package/node_modules/zod/src/v4/core/doc.ts +52 -0
- package/node_modules/zod/src/v4/core/errors.ts +543 -0
- package/node_modules/zod/src/v4/core/index.ts +19 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +131 -0
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +934 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +148 -0
- package/node_modules/zod/src/v4/core/memoizer.ts +331 -0
- package/node_modules/zod/src/v4/core/parse.ts +309 -0
- package/node_modules/zod/src/v4/core/regexes.ts +217 -0
- package/node_modules/zod/src/v4/core/registries.ts +105 -0
- package/node_modules/zod/src/v4/core/schemas.ts +5226 -0
- package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +857 -0
- package/node_modules/zod/src/v4/core/util.ts +1293 -0
- package/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/zod/src/v4/core/visit.ts +193 -0
- package/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/zod/src/v4/locales/ar.ts +120 -0
- package/node_modules/zod/src/v4/locales/az.ts +116 -0
- package/node_modules/zod/src/v4/locales/be.ts +188 -0
- package/node_modules/zod/src/v4/locales/bg.ts +133 -0
- package/node_modules/zod/src/v4/locales/bn.ts +123 -0
- package/node_modules/zod/src/v4/locales/ca.ts +121 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +140 -0
- package/node_modules/zod/src/v4/locales/cs.ts +123 -0
- package/node_modules/zod/src/v4/locales/da.ts +128 -0
- package/node_modules/zod/src/v4/locales/de.ts +121 -0
- package/node_modules/zod/src/v4/locales/el.ts +124 -0
- package/node_modules/zod/src/v4/locales/en.ts +136 -0
- package/node_modules/zod/src/v4/locales/eo.ts +123 -0
- package/node_modules/zod/src/v4/locales/es.ts +145 -0
- package/node_modules/zod/src/v4/locales/fa.ts +131 -0
- package/node_modules/zod/src/v4/locales/fi.ts +126 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +121 -0
- package/node_modules/zod/src/v4/locales/fr.ts +139 -0
- package/node_modules/zod/src/v4/locales/gu.ts +123 -0
- package/node_modules/zod/src/v4/locales/he.ts +253 -0
- package/node_modules/zod/src/v4/locales/hi.ts +126 -0
- package/node_modules/zod/src/v4/locales/hr.ts +135 -0
- package/node_modules/zod/src/v4/locales/hu.ts +122 -0
- package/node_modules/zod/src/v4/locales/hy.ts +175 -0
- package/node_modules/zod/src/v4/locales/id.ts +120 -0
- package/node_modules/zod/src/v4/locales/index.ts +63 -0
- package/node_modules/zod/src/v4/locales/is.ts +124 -0
- package/node_modules/zod/src/v4/locales/it.ts +121 -0
- package/node_modules/zod/src/v4/locales/ja.ts +119 -0
- package/node_modules/zod/src/v4/locales/ka.ts +128 -0
- package/node_modules/zod/src/v4/locales/kh.ts +7 -0
- package/node_modules/zod/src/v4/locales/km.ts +124 -0
- package/node_modules/zod/src/v4/locales/kn.ts +126 -0
- package/node_modules/zod/src/v4/locales/ko.ts +126 -0
- package/node_modules/zod/src/v4/locales/lt.ts +243 -0
- package/node_modules/zod/src/v4/locales/mk.ts +123 -0
- package/node_modules/zod/src/v4/locales/ms.ts +120 -0
- package/node_modules/zod/src/v4/locales/ne.ts +128 -0
- package/node_modules/zod/src/v4/locales/nl.ts +126 -0
- package/node_modules/zod/src/v4/locales/nn.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +121 -0
- package/node_modules/zod/src/v4/locales/ota.ts +122 -0
- package/node_modules/zod/src/v4/locales/pl.ts +123 -0
- package/node_modules/zod/src/v4/locales/ps.ts +131 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
- package/node_modules/zod/src/v4/locales/pt.ts +159 -0
- package/node_modules/zod/src/v4/locales/ro.ts +132 -0
- package/node_modules/zod/src/v4/locales/ru.ts +188 -0
- package/node_modules/zod/src/v4/locales/sk.ts +123 -0
- package/node_modules/zod/src/v4/locales/sl.ts +123 -0
- package/node_modules/zod/src/v4/locales/sv.ts +124 -0
- package/node_modules/zod/src/v4/locales/ta.ts +123 -0
- package/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/node_modules/zod/src/v4/locales/th.ts +124 -0
- package/node_modules/zod/src/v4/locales/tk.ts +113 -0
- package/node_modules/zod/src/v4/locales/tr.ts +116 -0
- package/node_modules/zod/src/v4/locales/ua.ts +7 -0
- package/node_modules/zod/src/v4/locales/uk.ts +122 -0
- package/node_modules/zod/src/v4/locales/ur.ts +124 -0
- package/node_modules/zod/src/v4/locales/uz.ts +120 -0
- package/node_modules/zod/src/v4/locales/vi.ts +122 -0
- package/node_modules/zod/src/v4/locales/yo.ts +129 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +121 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +120 -0
- package/node_modules/zod/src/v4/mini/checks.ts +33 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
- package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
- package/node_modules/zod/src/v4/mini/external.ts +52 -0
- package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
- package/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/zod/src/v4/mini/iso.ts +66 -0
- package/node_modules/zod/src/v4/mini/parse.ts +16 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +2051 -0
- package/node_modules/zod/src/v4-mini/index.ts +3 -0
- package/node_modules/zod/v3/ZodError.cjs +167 -0
- package/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/node_modules/zod/v3/ZodError.js +143 -0
- package/node_modules/zod/v3/errors.cjs +36 -0
- package/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/zod/v3/errors.d.ts +5 -0
- package/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/zod/v3/external.cjs +41 -0
- package/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/zod/v3/external.js +6 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +21 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +28 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/zod/v3/helpers/parseUtil.cjs +143 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +21 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +21 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/zod/v3/helpers/util.cjs +156 -0
- package/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/zod/v3/index.cjs +52 -0
- package/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/zod/v3/index.js +4 -0
- package/node_modules/zod/v3/locales/en.cjs +112 -0
- package/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/zod/v3/package.json +7 -0
- package/node_modules/zod/v3/standard-schema.cjs +21 -0
- package/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/zod/v3/types.cjs +3798 -0
- package/node_modules/zod/v3/types.d.cts +1034 -0
- package/node_modules/zod/v3/types.d.ts +1034 -0
- package/node_modules/zod/v3/types.js +3697 -0
- package/node_modules/zod/v4/classic/checks.cjs +53 -0
- package/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/zod/v4/classic/coerce.cjs +66 -0
- package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/zod/v4/classic/compat.cjs +80 -0
- package/node_modules/zod/v4/classic/compat.d.cts +48 -0
- package/node_modules/zod/v4/classic/compat.d.ts +48 -0
- package/node_modules/zod/v4/classic/compat.js +31 -0
- package/node_modules/zod/v4/classic/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.js +13 -0
- package/node_modules/zod/v4/classic/errors.cjs +102 -0
- package/node_modules/zod/v4/classic/errors.d.cts +29 -0
- package/node_modules/zod/v4/classic/errors.d.ts +29 -0
- package/node_modules/zod/v4/classic/errors.js +57 -0
- package/node_modules/zod/v4/classic/external.cjs +97 -0
- package/node_modules/zod/v4/classic/external.d.cts +19 -0
- package/node_modules/zod/v4/classic/external.d.ts +19 -0
- package/node_modules/zod/v4/classic/external.js +17 -0
- package/node_modules/zod/v4/classic/from-json-schema.cjs +926 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.js +881 -0
- package/node_modules/zod/v4/classic/in-out.cjs +82 -0
- package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
- package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
- package/node_modules/zod/v4/classic/in-out.js +36 -0
- package/node_modules/zod/v4/classic/index.cjs +52 -0
- package/node_modules/zod/v4/classic/index.d.cts +3 -0
- package/node_modules/zod/v4/classic/index.d.ts +3 -0
- package/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/zod/v4/classic/iso.cjs +68 -0
- package/node_modules/zod/v4/classic/iso.d.cts +7 -0
- package/node_modules/zod/v4/classic/iso.d.ts +7 -0
- package/node_modules/zod/v4/classic/iso.js +15 -0
- package/node_modules/zod/v4/classic/package.json +7 -0
- package/node_modules/zod/v4/classic/parse.cjs +63 -0
- package/node_modules/zod/v4/classic/parse.d.cts +44 -0
- package/node_modules/zod/v4/classic/parse.d.ts +44 -0
- package/node_modules/zod/v4/classic/parse.js +16 -0
- package/node_modules/zod/v4/classic/schemas.cjs +1676 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +816 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +816 -0
- package/node_modules/zod/v4/classic/schemas.js +1535 -0
- package/node_modules/zod/v4/core/api.cjs +1269 -0
- package/node_modules/zod/v4/core/api.d.cts +335 -0
- package/node_modules/zod/v4/core/api.d.ts +335 -0
- package/node_modules/zod/v4/core/api.js +1107 -0
- package/node_modules/zod/v4/core/checks.cjs +561 -0
- package/node_modules/zod/v4/core/checks.d.cts +294 -0
- package/node_modules/zod/v4/core/checks.d.ts +294 -0
- package/node_modules/zod/v4/core/checks.js +516 -0
- package/node_modules/zod/v4/core/compile.cjs +1916 -0
- package/node_modules/zod/v4/core/compile.d.cts +65 -0
- package/node_modules/zod/v4/core/compile.d.ts +65 -0
- package/node_modules/zod/v4/core/compile.js +1866 -0
- package/node_modules/zod/v4/core/core.cjs +167 -0
- package/node_modules/zod/v4/core/core.d.cts +82 -0
- package/node_modules/zod/v4/core/core.d.ts +82 -0
- package/node_modules/zod/v4/core/core.js +141 -0
- package/node_modules/zod/v4/core/doc.cjs +61 -0
- package/node_modules/zod/v4/core/doc.d.cts +16 -0
- package/node_modules/zod/v4/core/doc.d.ts +16 -0
- package/node_modules/zod/v4/core/doc.js +38 -0
- package/node_modules/zod/v4/core/errors.cjs +317 -0
- package/node_modules/zod/v4/core/errors.d.cts +225 -0
- package/node_modules/zod/v4/core/errors.d.ts +225 -0
- package/node_modules/zod/v4/core/errors.js +267 -0
- package/node_modules/zod/v4/core/index.cjs +70 -0
- package/node_modules/zod/v4/core/index.d.cts +19 -0
- package/node_modules/zod/v4/core/index.d.ts +19 -0
- package/node_modules/zod/v4/core/index.js +19 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +122 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.js +99 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +929 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +843 -0
- package/node_modules/zod/v4/core/json-schema.cjs +21 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +89 -0
- package/node_modules/zod/v4/core/json-schema.d.ts +89 -0
- package/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/zod/v4/core/memoizer.cjs +360 -0
- package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
- package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
- package/node_modules/zod/v4/core/memoizer.js +311 -0
- package/node_modules/zod/v4/core/package.json +7 -0
- package/node_modules/zod/v4/core/parse.cjs +233 -0
- package/node_modules/zod/v4/core/parse.d.cts +52 -0
- package/node_modules/zod/v4/core/parse.d.ts +52 -0
- package/node_modules/zod/v4/core/parse.js +175 -0
- package/node_modules/zod/v4/core/regexes.cjs +209 -0
- package/node_modules/zod/v4/core/regexes.d.cts +90 -0
- package/node_modules/zod/v4/core/regexes.d.ts +90 -0
- package/node_modules/zod/v4/core/regexes.js +156 -0
- package/node_modules/zod/v4/core/registries.cjs +75 -0
- package/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/zod/v4/core/schemas.cjs +2699 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1275 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1275 -0
- package/node_modules/zod/v4/core/schemas.js +2636 -0
- package/node_modules/zod/v4/core/standard-schema.cjs +21 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
- package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
- package/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +681 -0
- package/node_modules/zod/v4/core/to-json-schema.d.cts +154 -0
- package/node_modules/zod/v4/core/to-json-schema.d.ts +154 -0
- package/node_modules/zod/v4/core/to-json-schema.js +651 -0
- package/node_modules/zod/v4/core/util.cjs +964 -0
- package/node_modules/zod/v4/core/util.d.cts +280 -0
- package/node_modules/zod/v4/core/util.d.ts +280 -0
- package/node_modules/zod/v4/core/util.js +873 -0
- package/node_modules/zod/v4/core/versions.cjs +27 -0
- package/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/zod/v4/core/visit.cjs +214 -0
- package/node_modules/zod/v4/core/visit.d.cts +30 -0
- package/node_modules/zod/v4/core/visit.d.ts +30 -0
- package/node_modules/zod/v4/core/visit.js +169 -0
- package/node_modules/zod/v4/index.cjs +51 -0
- package/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/zod/v4/index.js +4 -0
- package/node_modules/zod/v4/locales/ar.cjs +138 -0
- package/node_modules/zod/v4/locales/ar.d.cts +5 -0
- package/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/v4/locales/ar.js +111 -0
- package/node_modules/zod/v4/locales/az.cjs +137 -0
- package/node_modules/zod/v4/locales/az.d.cts +5 -0
- package/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/v4/locales/az.js +110 -0
- package/node_modules/zod/v4/locales/be.cjs +195 -0
- package/node_modules/zod/v4/locales/be.d.cts +5 -0
- package/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/v4/locales/be.js +168 -0
- package/node_modules/zod/v4/locales/bg.cjs +152 -0
- package/node_modules/zod/v4/locales/bg.d.cts +5 -0
- package/node_modules/zod/v4/locales/bg.d.ts +4 -0
- package/node_modules/zod/v4/locales/bg.js +125 -0
- package/node_modules/zod/v4/locales/bn.cjs +140 -0
- package/node_modules/zod/v4/locales/bn.d.cts +5 -0
- package/node_modules/zod/v4/locales/bn.d.ts +4 -0
- package/node_modules/zod/v4/locales/bn.js +113 -0
- package/node_modules/zod/v4/locales/ca.cjs +139 -0
- package/node_modules/zod/v4/locales/ca.d.cts +5 -0
- package/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/v4/locales/ca.js +112 -0
- package/node_modules/zod/v4/locales/ckb.cjs +160 -0
- package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
- package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
- package/node_modules/zod/v4/locales/ckb.js +133 -0
- package/node_modules/zod/v4/locales/cs.cjs +143 -0
- package/node_modules/zod/v4/locales/cs.d.cts +5 -0
- package/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/v4/locales/cs.js +116 -0
- package/node_modules/zod/v4/locales/da.cjs +147 -0
- package/node_modules/zod/v4/locales/da.d.cts +5 -0
- package/node_modules/zod/v4/locales/da.d.ts +4 -0
- package/node_modules/zod/v4/locales/da.js +120 -0
- package/node_modules/zod/v4/locales/de.cjs +140 -0
- package/node_modules/zod/v4/locales/de.d.cts +5 -0
- package/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/v4/locales/de.js +113 -0
- package/node_modules/zod/v4/locales/el.cjs +139 -0
- package/node_modules/zod/v4/locales/el.d.cts +5 -0
- package/node_modules/zod/v4/locales/el.d.ts +4 -0
- package/node_modules/zod/v4/locales/el.js +112 -0
- package/node_modules/zod/v4/locales/en.cjs +152 -0
- package/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/zod/v4/locales/en.d.ts +4 -0
- package/node_modules/zod/v4/locales/en.js +125 -0
- package/node_modules/zod/v4/locales/eo.cjs +141 -0
- package/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/zod/v4/locales/eo.d.ts +4 -0
- package/node_modules/zod/v4/locales/eo.js +114 -0
- package/node_modules/zod/v4/locales/es.cjs +163 -0
- package/node_modules/zod/v4/locales/es.d.cts +5 -0
- package/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/v4/locales/es.js +136 -0
- package/node_modules/zod/v4/locales/fa.cjs +146 -0
- package/node_modules/zod/v4/locales/fa.d.cts +5 -0
- package/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/v4/locales/fa.js +119 -0
- package/node_modules/zod/v4/locales/fi.cjs +144 -0
- package/node_modules/zod/v4/locales/fi.d.cts +5 -0
- package/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/v4/locales/fi.js +117 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +139 -0
- package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.js +112 -0
- package/node_modules/zod/v4/locales/fr.cjs +156 -0
- package/node_modules/zod/v4/locales/fr.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr.js +129 -0
- package/node_modules/zod/v4/locales/gu.cjs +140 -0
- package/node_modules/zod/v4/locales/gu.d.cts +5 -0
- package/node_modules/zod/v4/locales/gu.d.ts +4 -0
- package/node_modules/zod/v4/locales/gu.js +113 -0
- package/node_modules/zod/v4/locales/he.cjs +248 -0
- package/node_modules/zod/v4/locales/he.d.cts +5 -0
- package/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/v4/locales/he.js +221 -0
- package/node_modules/zod/v4/locales/hi.cjs +138 -0
- package/node_modules/zod/v4/locales/hi.d.cts +5 -0
- package/node_modules/zod/v4/locales/hi.d.ts +4 -0
- package/node_modules/zod/v4/locales/hi.js +111 -0
- package/node_modules/zod/v4/locales/hr.cjs +153 -0
- package/node_modules/zod/v4/locales/hr.d.cts +5 -0
- package/node_modules/zod/v4/locales/hr.d.ts +4 -0
- package/node_modules/zod/v4/locales/hr.js +126 -0
- package/node_modules/zod/v4/locales/hu.cjs +140 -0
- package/node_modules/zod/v4/locales/hu.d.cts +5 -0
- package/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/v4/locales/hu.js +113 -0
- package/node_modules/zod/v4/locales/hy.cjs +185 -0
- package/node_modules/zod/v4/locales/hy.d.cts +5 -0
- package/node_modules/zod/v4/locales/hy.d.ts +4 -0
- package/node_modules/zod/v4/locales/hy.js +158 -0
- package/node_modules/zod/v4/locales/id.cjs +138 -0
- package/node_modules/zod/v4/locales/id.d.cts +5 -0
- package/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/v4/locales/id.js +111 -0
- package/node_modules/zod/v4/locales/index.cjs +152 -0
- package/node_modules/zod/v4/locales/index.d.cts +63 -0
- package/node_modules/zod/v4/locales/index.d.ts +63 -0
- package/node_modules/zod/v4/locales/index.js +63 -0
- package/node_modules/zod/v4/locales/is.cjs +141 -0
- package/node_modules/zod/v4/locales/is.d.cts +5 -0
- package/node_modules/zod/v4/locales/is.d.ts +4 -0
- package/node_modules/zod/v4/locales/is.js +114 -0
- package/node_modules/zod/v4/locales/it.cjs +140 -0
- package/node_modules/zod/v4/locales/it.d.cts +5 -0
- package/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/v4/locales/it.js +113 -0
- package/node_modules/zod/v4/locales/ja.cjs +139 -0
- package/node_modules/zod/v4/locales/ja.d.cts +5 -0
- package/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/v4/locales/ja.js +112 -0
- package/node_modules/zod/v4/locales/ka.cjs +144 -0
- package/node_modules/zod/v4/locales/ka.d.cts +5 -0
- package/node_modules/zod/v4/locales/ka.d.ts +4 -0
- package/node_modules/zod/v4/locales/ka.js +117 -0
- package/node_modules/zod/v4/locales/kh.cjs +12 -0
- package/node_modules/zod/v4/locales/kh.d.cts +5 -0
- package/node_modules/zod/v4/locales/kh.d.ts +5 -0
- package/node_modules/zod/v4/locales/kh.js +5 -0
- package/node_modules/zod/v4/locales/km.cjs +142 -0
- package/node_modules/zod/v4/locales/km.d.cts +5 -0
- package/node_modules/zod/v4/locales/km.d.ts +4 -0
- package/node_modules/zod/v4/locales/km.js +115 -0
- package/node_modules/zod/v4/locales/kn.cjs +143 -0
- package/node_modules/zod/v4/locales/kn.d.cts +5 -0
- package/node_modules/zod/v4/locales/kn.d.ts +4 -0
- package/node_modules/zod/v4/locales/kn.js +116 -0
- package/node_modules/zod/v4/locales/ko.cjs +143 -0
- package/node_modules/zod/v4/locales/ko.d.cts +5 -0
- package/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/v4/locales/ko.js +116 -0
- package/node_modules/zod/v4/locales/lt.cjs +234 -0
- package/node_modules/zod/v4/locales/lt.d.cts +5 -0
- package/node_modules/zod/v4/locales/lt.d.ts +4 -0
- package/node_modules/zod/v4/locales/lt.js +207 -0
- package/node_modules/zod/v4/locales/mk.cjs +141 -0
- package/node_modules/zod/v4/locales/mk.d.cts +5 -0
- package/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/v4/locales/mk.js +114 -0
- package/node_modules/zod/v4/locales/ms.cjs +139 -0
- package/node_modules/zod/v4/locales/ms.d.cts +5 -0
- package/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/v4/locales/ms.js +112 -0
- package/node_modules/zod/v4/locales/ne.cjs +138 -0
- package/node_modules/zod/v4/locales/ne.d.cts +5 -0
- package/node_modules/zod/v4/locales/ne.d.ts +4 -0
- package/node_modules/zod/v4/locales/ne.js +111 -0
- package/node_modules/zod/v4/locales/nl.cjs +142 -0
- package/node_modules/zod/v4/locales/nl.d.cts +5 -0
- package/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/v4/locales/nl.js +115 -0
- package/node_modules/zod/v4/locales/nn.cjs +140 -0
- package/node_modules/zod/v4/locales/nn.d.cts +5 -0
- package/node_modules/zod/v4/locales/nn.d.ts +4 -0
- package/node_modules/zod/v4/locales/nn.js +113 -0
- package/node_modules/zod/v4/locales/no.cjs +140 -0
- package/node_modules/zod/v4/locales/no.d.cts +5 -0
- package/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/v4/locales/no.js +113 -0
- package/node_modules/zod/v4/locales/ota.cjs +141 -0
- package/node_modules/zod/v4/locales/ota.d.cts +5 -0
- package/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/v4/locales/ota.js +114 -0
- package/node_modules/zod/v4/locales/package.json +7 -0
- package/node_modules/zod/v4/locales/pl.cjs +141 -0
- package/node_modules/zod/v4/locales/pl.d.cts +5 -0
- package/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/v4/locales/pl.js +114 -0
- package/node_modules/zod/v4/locales/ps.cjs +146 -0
- package/node_modules/zod/v4/locales/ps.d.cts +5 -0
- package/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/v4/locales/ps.js +119 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +170 -0
- package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt-BR.js +143 -0
- package/node_modules/zod/v4/locales/pt.cjs +169 -0
- package/node_modules/zod/v4/locales/pt.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt.js +142 -0
- package/node_modules/zod/v4/locales/ro.cjs +149 -0
- package/node_modules/zod/v4/locales/ro.d.cts +5 -0
- package/node_modules/zod/v4/locales/ro.d.ts +4 -0
- package/node_modules/zod/v4/locales/ro.js +122 -0
- package/node_modules/zod/v4/locales/ru.cjs +195 -0
- package/node_modules/zod/v4/locales/ru.d.cts +5 -0
- package/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/v4/locales/ru.js +168 -0
- package/node_modules/zod/v4/locales/sk.cjs +143 -0
- package/node_modules/zod/v4/locales/sk.d.cts +5 -0
- package/node_modules/zod/v4/locales/sk.d.ts +4 -0
- package/node_modules/zod/v4/locales/sk.js +116 -0
- package/node_modules/zod/v4/locales/sl.cjs +141 -0
- package/node_modules/zod/v4/locales/sl.d.cts +5 -0
- package/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/v4/locales/sl.js +114 -0
- package/node_modules/zod/v4/locales/sv.cjs +142 -0
- package/node_modules/zod/v4/locales/sv.d.cts +5 -0
- package/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/v4/locales/sv.js +115 -0
- package/node_modules/zod/v4/locales/ta.cjs +142 -0
- package/node_modules/zod/v4/locales/ta.d.cts +5 -0
- package/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/v4/locales/ta.js +115 -0
- package/node_modules/zod/v4/locales/tg.cjs +144 -0
- package/node_modules/zod/v4/locales/tg.d.cts +5 -0
- package/node_modules/zod/v4/locales/tg.d.ts +4 -0
- package/node_modules/zod/v4/locales/tg.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +142 -0
- package/node_modules/zod/v4/locales/th.d.cts +5 -0
- package/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/v4/locales/th.js +115 -0
- package/node_modules/zod/v4/locales/tk.cjs +134 -0
- package/node_modules/zod/v4/locales/tk.d.cts +5 -0
- package/node_modules/zod/v4/locales/tk.d.ts +4 -0
- package/node_modules/zod/v4/locales/tk.js +107 -0
- package/node_modules/zod/v4/locales/tr.cjs +137 -0
- package/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/zod/v4/locales/tr.d.ts +4 -0
- package/node_modules/zod/v4/locales/tr.js +110 -0
- package/node_modules/zod/v4/locales/ua.cjs +12 -0
- package/node_modules/zod/v4/locales/ua.d.cts +5 -0
- package/node_modules/zod/v4/locales/ua.d.ts +5 -0
- package/node_modules/zod/v4/locales/ua.js +5 -0
- package/node_modules/zod/v4/locales/uk.cjs +140 -0
- package/node_modules/zod/v4/locales/uk.d.cts +5 -0
- package/node_modules/zod/v4/locales/uk.d.ts +4 -0
- package/node_modules/zod/v4/locales/uk.js +113 -0
- package/node_modules/zod/v4/locales/ur.cjs +142 -0
- package/node_modules/zod/v4/locales/ur.d.cts +5 -0
- package/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/v4/locales/ur.js +115 -0
- package/node_modules/zod/v4/locales/uz.cjs +140 -0
- package/node_modules/zod/v4/locales/uz.d.cts +5 -0
- package/node_modules/zod/v4/locales/uz.d.ts +4 -0
- package/node_modules/zod/v4/locales/uz.js +113 -0
- package/node_modules/zod/v4/locales/vi.cjs +140 -0
- package/node_modules/zod/v4/locales/vi.d.cts +5 -0
- package/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/v4/locales/vi.js +113 -0
- package/node_modules/zod/v4/locales/yo.cjs +139 -0
- package/node_modules/zod/v4/locales/yo.d.cts +5 -0
- package/node_modules/zod/v4/locales/yo.d.ts +4 -0
- package/node_modules/zod/v4/locales/yo.js +112 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +141 -0
- package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.js +114 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +139 -0
- package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.js +112 -0
- package/node_modules/zod/v4/mini/checks.cjs +54 -0
- package/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/zod/v4/mini/coerce.cjs +71 -0
- package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/zod/v4/mini/coerce.js +22 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.js +13 -0
- package/node_modules/zod/v4/mini/external.cjs +95 -0
- package/node_modules/zod/v4/mini/external.d.cts +16 -0
- package/node_modules/zod/v4/mini/external.d.ts +16 -0
- package/node_modules/zod/v4/mini/external.js +16 -0
- package/node_modules/zod/v4/mini/in-out.cjs +82 -0
- package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
- package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
- package/node_modules/zod/v4/mini/in-out.js +36 -0
- package/node_modules/zod/v4/mini/index.cjs +51 -0
- package/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/zod/v4/mini/iso.cjs +83 -0
- package/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/zod/v4/mini/iso.js +34 -0
- package/node_modules/zod/v4/mini/package.json +7 -0
- package/node_modules/zod/v4/mini/parse.cjs +37 -0
- package/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/zod/v4/mini/schemas.cjs +1147 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +480 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +480 -0
- package/node_modules/zod/v4/mini/schemas.js +1002 -0
- package/node_modules/zod/v4/package.json +7 -0
- package/node_modules/zod/v4-mini/index.cjs +51 -0
- package/node_modules/zod/v4-mini/index.d.cts +3 -0
- package/node_modules/zod/v4-mini/index.d.ts +3 -0
- package/node_modules/zod/v4-mini/index.js +3 -0
- package/node_modules/zod/v4-mini/package.json +7 -0
- package/package.json +32 -4
- package/runtime.cjs +14 -0
- package/scripts/arguments.mjs +77 -0
- package/scripts/continuation.mjs +31 -0
- package/scripts/create-task.mjs +27 -0
- package/scripts/delete-task.mjs +3 -0
- package/scripts/entry.mjs +6 -0
- package/scripts/get-task.mjs +40 -0
- package/scripts/get-tasks.mjs +84 -0
- package/scripts/hook.mjs +89 -0
- package/scripts/inspect-blockers.mjs +76 -0
- package/scripts/install-launcher.mjs +28 -0
- package/scripts/install-migration.mjs +82 -0
- package/scripts/install-path.mjs +105 -0
- package/scripts/install-release.mjs +252 -0
- package/scripts/lifecycle.mjs +35 -0
- package/scripts/list-tasks.mjs +117 -0
- package/scripts/output.mjs +67 -0
- package/scripts/schema.mjs +41 -0
- package/scripts/search-tasks.mjs +96 -0
- package/scripts/task-write-input.mjs +80 -0
- package/scripts/transition-task.mjs +3 -0
- package/scripts/update-release.mjs +82 -0
- package/scripts/update-task.mjs +29 -0
- package/scripts/validate-task-stores.mjs +34 -0
- package/src/blockers.mjs +134 -0
- package/src/cache.mjs +50 -0
- package/src/config.mjs +30 -0
- package/src/create.mjs +145 -0
- package/src/cursor.mjs +30 -0
- package/src/destinations.mjs +74 -0
- package/src/errors.mjs +16 -0
- package/src/field-rules.mjs +105 -0
- package/src/fields.mjs +32 -0
- package/src/input.mjs +146 -0
- package/src/limits.mjs +5 -0
- package/src/locations.mjs +19 -0
- package/src/pagination.mjs +30 -0
- package/src/project-lock.mjs +74 -0
- package/src/projects.mjs +33 -0
- package/src/response.mjs +75 -0
- package/src/schema.mjs +76 -0
- package/src/search-index-worker.mjs +10 -0
- package/src/search-index.mjs +639 -0
- package/src/search.mjs +228 -0
- package/src/service.mjs +260 -0
- package/src/source.mjs +48 -0
- package/src/sqlite.mjs +17 -0
- package/src/storage-format.mjs +15 -0
- package/src/stores.mjs +337 -0
- package/src/tasks.mjs +290 -0
- package/src/timestamps.mjs +22 -0
- package/src/transition.mjs +181 -0
- package/src/update.mjs +56 -0
- package/src/validation.mjs +144 -0
- package/src/version.mjs +5 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { errorText, fail } from '../src/errors.mjs';
|
|
2
|
+
import { ownValue } from '../src/fields.mjs';
|
|
3
|
+
import { responseBytes } from '../src/limits.mjs';
|
|
4
|
+
import { jsonText, textBuffer } from '../src/response.mjs';
|
|
5
|
+
|
|
6
|
+
function valueText(value) {
|
|
7
|
+
if (value === undefined) return '(unset)';
|
|
8
|
+
return typeof value === 'object' ? jsonText(value, 0) : String(value);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function tableCell(value, maxWidth) {
|
|
12
|
+
const text = [...valueText(value).replace(/\s+/g, ' ')];
|
|
13
|
+
return text.length > maxWidth ? `${text.slice(0, maxWidth - 1).join('')}…` : text.join('');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function formatTable(records, fields, maxWidth, buffer) {
|
|
17
|
+
if ((fields.length - 1) * 2 * (records.length + 1) > responseBytes) return undefined;
|
|
18
|
+
const rows = [fields, ...records.map((record) => fields.map((field) => ownValue(record, field)))]
|
|
19
|
+
.map((row) => row.map((value) => tableCell(value, maxWidth)));
|
|
20
|
+
const widths = fields.map((_, column) => rows.reduce((width, row) => Math.max(width, [...row[column]].length), 0));
|
|
21
|
+
for (const row of rows) {
|
|
22
|
+
for (let column = 0; column < fields.length; column++) {
|
|
23
|
+
if (!buffer.add(row[column])) return undefined;
|
|
24
|
+
if (column < fields.length - 1 && !buffer.spaces(widths[column] - [...row[column]].length + 2)) return undefined;
|
|
25
|
+
}
|
|
26
|
+
if (!buffer.add('\n')) return undefined;
|
|
27
|
+
}
|
|
28
|
+
return buffer.finish();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function formatText(records, fields, buffer) {
|
|
32
|
+
for (let index = 0; index < records.length; index++) {
|
|
33
|
+
if (index && !buffer.add('\n')) return undefined;
|
|
34
|
+
for (const field of fields) {
|
|
35
|
+
if (!buffer.add(field) || !buffer.add(': ') || !buffer.add(valueText(ownValue(records[index], field)))
|
|
36
|
+
|| !buffer.add('\n')) return undefined;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return buffer.finish();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function formatOutput(data, fields, { format, maxWidth }, ceiling = responseBytes) {
|
|
43
|
+
if (format === 'json') {
|
|
44
|
+
const json = jsonText(data, 2, ceiling - 1);
|
|
45
|
+
return json === undefined ? undefined : `${json}\n`;
|
|
46
|
+
}
|
|
47
|
+
const records = Array.isArray(data) ? data : [data];
|
|
48
|
+
const buffer = textBuffer(ceiling);
|
|
49
|
+
if (format === 'ids') {
|
|
50
|
+
buffer.add(`${records.map((record) => record.id).join(' ')}\n`);
|
|
51
|
+
} else if (!records.length) buffer.add('no tasks on this page\n');
|
|
52
|
+
else if (format === 'table') return formatTable(records, fields, maxWidth, buffer);
|
|
53
|
+
else return formatText(records, fields, buffer);
|
|
54
|
+
return buffer.finish();
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function printOutput(data, fields, output) {
|
|
58
|
+
const text = formatOutput(data, fields, output);
|
|
59
|
+
if (text === undefined) fail('OUTPUT_TOO_LARGE', 'rendered response exceeds 32 KiB; select fewer --fields or a smaller --max-width');
|
|
60
|
+
process.stdout.write(text);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function reportError(error) {
|
|
64
|
+
const code = error.code?.startsWith('ERR_PARSE_ARGS') ? 'INVALID_INPUT' : (error.code ?? 'INVALID_INPUT');
|
|
65
|
+
process.stderr.write(`${code}: ${errorText(error.message)}\n`);
|
|
66
|
+
process.exitCode = 1;
|
|
67
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { parseArgs } from 'node:util';
|
|
3
|
+
import { inspectSchema, materialiseSchema } from '../src/schema.mjs';
|
|
4
|
+
import { fail } from '../src/errors.mjs';
|
|
5
|
+
import { parseProject, parseSchema, projectHelp } from './arguments.mjs';
|
|
6
|
+
import { isMain } from './entry.mjs';
|
|
7
|
+
import { reportError } from './output.mjs';
|
|
8
|
+
|
|
9
|
+
export const options = {
|
|
10
|
+
write: { type: 'boolean' }, replace: { type: 'boolean' },
|
|
11
|
+
'schema-path': { type: 'string' }, help: { type: 'boolean', short: 'h' },
|
|
12
|
+
};
|
|
13
|
+
export const usage = 'Usage: node app/scripts/schema.mjs [project-path] [options]';
|
|
14
|
+
export const help = `${usage}
|
|
15
|
+
|
|
16
|
+
Inspect the effective task schema as readable JSON, including default stores and groups.
|
|
17
|
+
${projectHelp}Schema inspection needs no task stores. Output is always JSON (a configuration document).
|
|
18
|
+
--write Materialise the effective schema at the selected schema path
|
|
19
|
+
--replace Allow --write to replace an existing schema; preserves custom fields
|
|
20
|
+
--schema-path <file> Select an existing project-relative schema
|
|
21
|
+
--help, -h Show this help
|
|
22
|
+
Without a schema, --write creates tasks/task-schema.json. Explicit paths must exist.
|
|
23
|
+
Task records are never changed. Existing stores must validate before writing.
|
|
24
|
+
An empty project can obtain a skeleton; validation needs a task store first.
|
|
25
|
+
Run tasks validate after editing the schema to refresh service metadata.
|
|
26
|
+
`;
|
|
27
|
+
|
|
28
|
+
export function main(args) {
|
|
29
|
+
const { values, positionals, tokens } = parseArgs({ args, options, allowPositionals: true, tokens: true });
|
|
30
|
+
if (values.help) { process.stdout.write(help); return; }
|
|
31
|
+
const { project } = parseProject(positionals, usage);
|
|
32
|
+
const schemaPath = parseSchema(values, tokens);
|
|
33
|
+
if (values.replace && !values.write) fail('INVALID_INPUT', '--replace requires --write');
|
|
34
|
+
const schema = values.write ? materialiseSchema(project, { schemaPath, replace: values.replace })
|
|
35
|
+
: inspectSchema(project, { schemaPath });
|
|
36
|
+
process.stdout.write(`${JSON.stringify(schema, null, 2)}\n`);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (isMain(import.meta.url)) {
|
|
40
|
+
try { main(process.argv.slice(2)); } catch (error) { reportError(error); }
|
|
41
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { parseArgs } from 'node:util';
|
|
3
|
+
import { readConfig } from '../src/config.mjs';
|
|
4
|
+
import { fail } from '../src/errors.mjs';
|
|
5
|
+
import { defaultLimit, maxLimit, responseBytes } from '../src/limits.mjs';
|
|
6
|
+
import { textBuffer } from '../src/response.mjs';
|
|
7
|
+
import { defaultSearchFields, searchTasks } from '../src/search.mjs';
|
|
8
|
+
import { cacheOptions, commonHelp, commonOptions, parseInteger, parseOutput, parseProject, parseSchema, parseSelection, projectHelp } from './arguments.mjs';
|
|
9
|
+
import { nextCommand } from './continuation.mjs';
|
|
10
|
+
import { isMain } from './entry.mjs';
|
|
11
|
+
import { formatOutput, reportError } from './output.mjs';
|
|
12
|
+
|
|
13
|
+
export const options = {
|
|
14
|
+
...commonOptions,
|
|
15
|
+
format: { type: 'string' },
|
|
16
|
+
'search-fields': { type: 'string' }, cursor: { type: 'string' },
|
|
17
|
+
limit: { type: 'string', default: String(defaultLimit) },
|
|
18
|
+
};
|
|
19
|
+
export const usage = 'Usage: node app/scripts/search-tasks.mjs [project-path] <query> [options]';
|
|
20
|
+
export const help = `${usage}
|
|
21
|
+
|
|
22
|
+
${projectHelp}Reads never change task files.
|
|
23
|
+
--search-fields <names> Comma-separated fields searched with OR semantics
|
|
24
|
+
(default: ${defaultSearchFields.join(',')})
|
|
25
|
+
--fields <names> Comma-separated result fields (default: id,title,status)
|
|
26
|
+
${commonHelp.replace(' --fields <names> Comma-separated field names\n', '').replace('text (default), table, json or ids', 'table (default), text, json or ids')} --limit <n> Page size from 1 to 50 (default: 10); responses up to 32 KiB
|
|
27
|
+
--cursor <cursor> Continue the same search from an opaque cursor
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
function splitNames(value, option) {
|
|
31
|
+
const names = value.split(',').map((name) => name.trim());
|
|
32
|
+
if (names.some((name) => !name)) fail('INVALID_INPUT', `${option} field names cannot be empty`);
|
|
33
|
+
return names;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function pageInfo(page, args, tokens, invocation) {
|
|
37
|
+
const buffer = textBuffer();
|
|
38
|
+
buffer.add(`Showing ${page.tasks.length} search match${page.tasks.length === 1 ? '' : 'es'}.\n`);
|
|
39
|
+
for (const advisory of page.advisories ?? []) {
|
|
40
|
+
buffer.add(`Advisory ${advisory.code}: ${advisory.message} (${advisory.elapsed_ms} ms)\n`);
|
|
41
|
+
}
|
|
42
|
+
if (page.hasMore) {
|
|
43
|
+
const command = nextCommand(args, tokens, 'cursor', page.next_cursor, invocation);
|
|
44
|
+
if (command === undefined) return undefined;
|
|
45
|
+
buffer.add(`Next page: ${command}\n`);
|
|
46
|
+
}
|
|
47
|
+
return buffer.finish();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function showPage(page, output, args, tokens, invocation) {
|
|
51
|
+
if (output.format === 'json') {
|
|
52
|
+
const text = formatOutput(page, page.fields, output);
|
|
53
|
+
if (text === undefined) fail('OUTPUT_TOO_LARGE', 'rendered search response exceeds 32 KiB; select fewer --fields or --search-fields');
|
|
54
|
+
process.stdout.write(text);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const info = pageInfo(page, args, tokens, invocation);
|
|
58
|
+
if (info === undefined) fail('OUTPUT_TOO_LARGE', 'search guidance exceeds 32 KiB; shorten the query or field selections');
|
|
59
|
+
const displayFields = [...page.fields, 'matched_fields', 'snippets'];
|
|
60
|
+
const text = formatOutput(page.tasks, displayFields, output, responseBytes - Buffer.byteLength(info, 'utf8'));
|
|
61
|
+
if (text === undefined) fail('OUTPUT_TOO_LARGE', 'rendered search response exceeds 32 KiB; select fewer --fields or --search-fields');
|
|
62
|
+
process.stdout.write(text);
|
|
63
|
+
process.stderr.write(info);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function main(args, guidance) {
|
|
67
|
+
const { values, positionals, tokens } = parseArgs({ args, options, allowPositionals: true, tokens: true });
|
|
68
|
+
if (values.help) {
|
|
69
|
+
process.stdout.write(help);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const { project, id: query } = parseProject(positionals, usage, true);
|
|
73
|
+
values.format ??= 'table';
|
|
74
|
+
const output = parseOutput(values);
|
|
75
|
+
const selection = parseSelection(values);
|
|
76
|
+
const queryOptions = {
|
|
77
|
+
...selection,
|
|
78
|
+
searchFields: values['search-fields'] === undefined
|
|
79
|
+
? defaultSearchFields : splitNames(values['search-fields'], '--search-fields'),
|
|
80
|
+
limit: parseInteger(values.limit, '--limit', 1, maxLimit), cursor: values.cursor,
|
|
81
|
+
schemaPath: parseSchema(values, tokens),
|
|
82
|
+
slowQueryMs: readConfig(guidance?.config).slowQueryMs,
|
|
83
|
+
refreshMode: 'detached',
|
|
84
|
+
...cacheOptions(values),
|
|
85
|
+
};
|
|
86
|
+
const page = searchTasks(project, query, queryOptions);
|
|
87
|
+
showPage(page, output, guidance?.args ?? args, guidance?.tokens ?? tokens, guidance?.invocation);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (isMain(import.meta.url)) {
|
|
91
|
+
try {
|
|
92
|
+
main(process.argv.slice(2));
|
|
93
|
+
} catch (error) {
|
|
94
|
+
reportError(error);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { fail } from '../src/errors.mjs';
|
|
2
|
+
import { decodeText, parseJson, readBudget, readJson } from '../src/input.mjs';
|
|
3
|
+
import { inputBytes } from '../src/limits.mjs';
|
|
4
|
+
import { parseInteger } from './arguments.mjs';
|
|
5
|
+
|
|
6
|
+
export const taskWriteOptions = {
|
|
7
|
+
json: { type: 'string', multiple: true }, input: { type: 'string', multiple: true },
|
|
8
|
+
title: { type: 'string' }, status: { type: 'string' }, priority: { type: 'string' }, blockers: { type: 'string' },
|
|
9
|
+
store: { type: 'string' }, format: { type: 'string', default: 'json' }, help: { type: 'boolean', short: 'h' },
|
|
10
|
+
'schema-path': { type: 'string' },
|
|
11
|
+
};
|
|
12
|
+
export const taskWriteHelp = ` --title <text> Replace the title
|
|
13
|
+
--status <status> Set an exact configured status
|
|
14
|
+
--priority <text> Replace priority
|
|
15
|
+
--blockers <ids> Replace blockers with comma-separated positive IDs; '' clears
|
|
16
|
+
--json <object> JSON input string, exclusive with --input; neither is repeatable
|
|
17
|
+
--input <file|-> Read JSON from a file or stdin (-); no interactive prompts
|
|
18
|
+
--store <name> Destination store (one); resolve ambiguous destinations
|
|
19
|
+
--schema-path <file> Project-relative schema file; overrides automatic selection
|
|
20
|
+
--format json Complete resulting task as JSON (default and only format)
|
|
21
|
+
--help, -h Show this help
|
|
22
|
+
Flags may mix with JSON only for disjoint fields. A field mentioned in any patch
|
|
23
|
+
operation cannot also be supplied by a flag. Repeated scalar options are errors.
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
export function checkOptions(tokens) {
|
|
27
|
+
const seen = new Set();
|
|
28
|
+
for (const token of tokens) {
|
|
29
|
+
if (token.kind !== 'option') continue;
|
|
30
|
+
if (seen.has(token.name)) fail('INVALID_INPUT', `--${token.name} may be supplied only once`);
|
|
31
|
+
seen.add(token.name);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export async function readTaskWriteInput(values, updating) {
|
|
36
|
+
const count = (values.json?.length ?? 0) + (values.input?.length ?? 0);
|
|
37
|
+
if (count > 1) fail('INVALID_INPUT', 'supply exactly one --json or --input source; repeated or combined sources are not allowed');
|
|
38
|
+
let input;
|
|
39
|
+
if (values.json !== undefined) {
|
|
40
|
+
const json = values.json[0];
|
|
41
|
+
if (Buffer.byteLength(json, 'utf8') > inputBytes) fail('INPUT_TOO_LARGE', 'task input exceeds the 8 MiB read budget');
|
|
42
|
+
input = parseJson(json, '--json');
|
|
43
|
+
} else if (values.input !== undefined) {
|
|
44
|
+
const source = values.input[0];
|
|
45
|
+
if (source === '-') {
|
|
46
|
+
const chunks = [];
|
|
47
|
+
let length = 0;
|
|
48
|
+
for await (const chunk of process.stdin) {
|
|
49
|
+
length += chunk.length;
|
|
50
|
+
if (length > inputBytes) fail('INPUT_TOO_LARGE', 'task input exceeds the 8 MiB read budget');
|
|
51
|
+
chunks.push(chunk);
|
|
52
|
+
}
|
|
53
|
+
input = parseJson(decodeText(Buffer.concat(chunks, length), 'stdin'), 'stdin');
|
|
54
|
+
} else {
|
|
55
|
+
if (!source) fail('INVALID_INPUT', '--input requires a file path or -');
|
|
56
|
+
input = readJson(source, readBudget());
|
|
57
|
+
}
|
|
58
|
+
} else input = {};
|
|
59
|
+
if (!input || typeof input !== 'object' || Array.isArray(input)) fail('INVALID_INPUT', 'JSON input must be an object');
|
|
60
|
+
const fields = {};
|
|
61
|
+
for (const name of ['title', 'status', 'priority', 'blockers']) {
|
|
62
|
+
if (values[name] === undefined) continue;
|
|
63
|
+
const collision = updating
|
|
64
|
+
? ['set', 'add', 'remove'].some((operation) => input[operation] && Object.hasOwn(input[operation], name))
|
|
65
|
+
|| (Array.isArray(input.unset) && input.unset.includes(name))
|
|
66
|
+
: Object.hasOwn(input, name);
|
|
67
|
+
if (collision) fail('INVALID_INPUT', `--${name} conflicts with JSON field ${name}`);
|
|
68
|
+
fields[name] = name === 'blockers'
|
|
69
|
+
? (values[name] === '' ? [] : values[name].split(',').map((id) => parseInteger(id.trim(), '--blockers', 1)))
|
|
70
|
+
: values[name];
|
|
71
|
+
}
|
|
72
|
+
if (!count && !Object.keys(fields).length) fail('INVALID_INPUT', 'supply standard field flags, --json or --input');
|
|
73
|
+
if (!Object.keys(fields).length) return input;
|
|
74
|
+
if (!updating) return { ...input, ...fields };
|
|
75
|
+
// Do not repair a malformed patch while adding convenient flags.
|
|
76
|
+
if (input.set !== undefined && (!input.set || typeof input.set !== 'object' || Array.isArray(input.set))) {
|
|
77
|
+
fail('INVALID_INPUT', 'set must be an object');
|
|
78
|
+
}
|
|
79
|
+
return { ...input, set: { ...input.set, ...fields } };
|
|
80
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { createWriteStream, mkdtempSync, readFileSync, rmSync } from 'node:fs';
|
|
3
|
+
import { tmpdir } from 'node:os';
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
import { Readable } from 'node:stream';
|
|
6
|
+
import { pipeline } from 'node:stream/promises';
|
|
7
|
+
import { spawnSync } from 'node:child_process';
|
|
8
|
+
|
|
9
|
+
const repository = 'henryh/outask';
|
|
10
|
+
export const latestReleaseUrl = `https://api.github.com/repos/${repository}/releases/latest`;
|
|
11
|
+
|
|
12
|
+
export function updateTarget(platform = process.platform, arch = process.arch) {
|
|
13
|
+
const target = `${platform === 'darwin' ? 'macos' : platform === 'win32' ? 'windows' : platform}-${arch}`;
|
|
14
|
+
if (!['linux-x64', 'macos-arm64', 'windows-x64'].includes(target)) throw new Error(`Unsupported platform ${target}; use a supported native host`);
|
|
15
|
+
return target;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function latestAsset(release, target) {
|
|
19
|
+
if (release.draft !== false || release.prerelease !== false || !/^v\d+\.\d+(?:\.\d+)?$/.test(release.tag_name)) {
|
|
20
|
+
throw new Error('GitHub Latest did not return a stable published release');
|
|
21
|
+
}
|
|
22
|
+
const version = release.tag_name.slice(1);
|
|
23
|
+
const name = `Outask-${version}-${target}.tar.gz`;
|
|
24
|
+
const url = `https://github.com/${repository}/releases/download/${release.tag_name}/${name}`;
|
|
25
|
+
const asset = release.assets?.find((item) => item.name === name && item.state === 'uploaded');
|
|
26
|
+
if (!asset || asset.browser_download_url !== url) throw new Error(`Latest release has no supported archive ${name}`);
|
|
27
|
+
return { ...asset, version };
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function run(args) {
|
|
31
|
+
const result = spawnSync(args[0], args.slice(1), { encoding: 'utf8', timeout: 120000, maxBuffer: 8 * 1024 * 1024 });
|
|
32
|
+
if (result.error) throw result.error;
|
|
33
|
+
if (result.status !== 0) throw new Error((result.stderr || result.stdout || `${args[0]} exited ${result.status}`).trim());
|
|
34
|
+
return result.stdout;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export async function updateRelease({ destination, bin, releases, fetchRelease = fetch, target = updateTarget(), log = console.log }) {
|
|
38
|
+
let work;
|
|
39
|
+
let stage = 'resolve latest release';
|
|
40
|
+
try {
|
|
41
|
+
const request = async (url) => {
|
|
42
|
+
const response = await fetchRelease(url, { headers: { Accept: 'application/vnd.github+json', 'User-Agent': 'outask-installer' }, signal: AbortSignal.timeout(120000) });
|
|
43
|
+
if (!response.ok) throw new Error(`HTTP ${response.status} from ${url}`);
|
|
44
|
+
return response;
|
|
45
|
+
};
|
|
46
|
+
const asset = latestAsset(await (await request(latestReleaseUrl)).json(), target);
|
|
47
|
+
const installed = JSON.parse(readFileSync(join(destination, 'release.json'), 'utf8'));
|
|
48
|
+
if (installed.version === asset.version && installed.target === target) {
|
|
49
|
+
log(`Outask v${asset.version} is already current.`);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
work = mkdtempSync(join(tmpdir(), 'outask-update-'));
|
|
53
|
+
const archive = join(work, asset.name);
|
|
54
|
+
stage = `download ${asset.name}`;
|
|
55
|
+
const response = await request(asset.browser_download_url);
|
|
56
|
+
await pipeline(Readable.fromWeb(response.body), createWriteStream(archive));
|
|
57
|
+
const bytes = readFileSync(archive);
|
|
58
|
+
if (bytes.length !== asset.size) throw new Error('Archive size differs from GitHub; retry the download');
|
|
59
|
+
if (asset.digest?.startsWith('sha256:') && `sha256:${createHash('sha256').update(bytes).digest('hex')}` !== asset.digest) {
|
|
60
|
+
throw new Error('Archive SHA256 differs from GitHub; retry the download');
|
|
61
|
+
}
|
|
62
|
+
stage = 'extract latest archive';
|
|
63
|
+
const names = run(['tar', '-tzf', archive]).trim().split(/\r?\n/);
|
|
64
|
+
const directory = 'Outask';
|
|
65
|
+
if (names.some((name) => !(name === directory || name.startsWith(`${directory}/`)) || name.includes('\\') || name.split('/').includes('..'))) {
|
|
66
|
+
throw new Error(`Archive contains paths outside ${directory}`);
|
|
67
|
+
}
|
|
68
|
+
run(['tar', '-xzf', archive, '-C', work]);
|
|
69
|
+
const source = join(work, directory);
|
|
70
|
+
const metadata = JSON.parse(readFileSync(join(source, 'release.json'), 'utf8'));
|
|
71
|
+
if (metadata.version !== asset.version || metadata.target !== target) throw new Error('Archive metadata differs from GitHub Latest');
|
|
72
|
+
stage = 'install latest release';
|
|
73
|
+
// The installer stages and verifies its payload before replacing the working copy.
|
|
74
|
+
const output = run([process.execPath, join(source, 'app/scripts/install-release.mjs'), 'install', '--bin-dir', bin, '--release-root', releases]);
|
|
75
|
+
log(output.trim());
|
|
76
|
+
log(`Updated to Outask v${asset.version}.`);
|
|
77
|
+
} catch (error) {
|
|
78
|
+
throw new Error(`UPDATE_FAILED: could not ${stage}: ${error.message}. Check network access, tar and directory permissions, then retry update.`);
|
|
79
|
+
} finally {
|
|
80
|
+
if (work) rmSync(work, { recursive: true, force: true });
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { parseArgs } from 'node:util';
|
|
3
|
+
import { updateTask } from '../src/update.mjs';
|
|
4
|
+
import { fail } from '../src/errors.mjs';
|
|
5
|
+
import { parseInteger, parseProject, parseSchema, projectHelp } from './arguments.mjs';
|
|
6
|
+
import { isMain } from './entry.mjs';
|
|
7
|
+
import { checkOptions, taskWriteHelp, readTaskWriteInput, taskWriteOptions } from './task-write-input.mjs';
|
|
8
|
+
import { reportError } from './output.mjs';
|
|
9
|
+
|
|
10
|
+
export const options = { ...taskWriteOptions, 'if-updated-at': { type: 'string' } };
|
|
11
|
+
export const usage = 'Usage: node app/scripts/update-task.mjs [project-path] <id> [field options | --json <object> | --input <file|->] [options]';
|
|
12
|
+
export const help = `${usage}\n${projectHelp}Update one retained task. Patch: {set:{field:value},add:{field:[values]},remove:{field:[values]},unset:[fields]}. Each field may occur once. Text, objects and arrays replace completely.\nArray additions deduplicate structurally; removals delete all equal elements. Absent removals and duplicate-only additions are silent no-ops. unset removes optional fields.\nid and updated_at cannot be patched. Actual changes advance updated_at; no-ops preserve it. --if-updated-at checks the exact timestamp, including no-ops.\n${taskWriteHelp} --if-updated-at <timestamp> Reject stale edits using the last-read UTC millisecond timestamp\n`;
|
|
13
|
+
|
|
14
|
+
export async function main(args) {
|
|
15
|
+
const { values, positionals, tokens } = parseArgs({ args, allowPositionals: true, tokens: true, options });
|
|
16
|
+
if (values.help) { process.stdout.write(help); return; }
|
|
17
|
+
checkOptions(tokens);
|
|
18
|
+
const { project, id } = parseProject(positionals, usage, true);
|
|
19
|
+
if (values.format !== 'json') fail('INVALID_INPUT', 'format must be json');
|
|
20
|
+
const input = await readTaskWriteInput(values, true);
|
|
21
|
+
const task = updateTask(project, parseInteger(id, 'id', 1), input, {
|
|
22
|
+
store: values.store, ifUpdatedAt: values['if-updated-at'], schemaPath: parseSchema(values, tokens),
|
|
23
|
+
});
|
|
24
|
+
process.stdout.write(`${JSON.stringify(task, null, 2)}\n`);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (isMain(import.meta.url)) {
|
|
28
|
+
try { await main(process.argv.slice(2)); } catch (error) { reportError(error); }
|
|
29
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { parseArgs } from 'node:util';
|
|
3
|
+
import { fail } from '../src/errors.mjs';
|
|
4
|
+
import { validateProject } from '../src/validation.mjs';
|
|
5
|
+
import { parseProject, parseSchema, projectHelp } from './arguments.mjs';
|
|
6
|
+
import { isMain } from './entry.mjs';
|
|
7
|
+
import { reportError } from './output.mjs';
|
|
8
|
+
|
|
9
|
+
export const options = {
|
|
10
|
+
format: { type: 'string', default: 'text' }, 'schema-path': { type: 'string' }, help: { type: 'boolean', short: 'h' },
|
|
11
|
+
};
|
|
12
|
+
export const usage = 'Usage: node app/scripts/validate-task-stores.mjs [project-path] [--format text|json]';
|
|
13
|
+
export const help = `${usage}\n${projectHelp}Validate all retained stores and refresh tasks/.task-tracker.json after success.\nTask files remain unchanged. --schema-path selects a project-relative schema file.\n`;
|
|
14
|
+
|
|
15
|
+
export function main(args) {
|
|
16
|
+
const { values, positionals, tokens } = parseArgs({ args, allowPositionals: true, options, tokens: true });
|
|
17
|
+
if (values.help) {
|
|
18
|
+
process.stdout.write(help);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const { project } = parseProject(positionals, usage);
|
|
22
|
+
if (!['text', 'json'].includes(values.format)) fail('INVALID_INPUT', usage);
|
|
23
|
+
const result = validateProject(project, { schemaPath: parseSchema(values, tokens) });
|
|
24
|
+
process.stdout.write(values.format === 'json' ? `${JSON.stringify(result)}\n`
|
|
25
|
+
: `Validation passed (${result.tasks} tasks, ${result.stores} stores). Counter: ${result.counter}; service state ${result.refreshed ? 'refreshed' : 'unchanged'}.\n`);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (isMain(import.meta.url)) {
|
|
29
|
+
try {
|
|
30
|
+
main(process.argv.slice(2));
|
|
31
|
+
} catch (error) {
|
|
32
|
+
reportError(error);
|
|
33
|
+
}
|
|
34
|
+
}
|
package/src/blockers.mjs
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { fail } from './errors.mjs';
|
|
2
|
+
import { advise, cacheSupported, cacheUnavailable, checkCacheOptions, onceAdvisory } from './cache.mjs';
|
|
3
|
+
import { defaultLimit, maxLimit, responseBytes } from './limits.mjs';
|
|
4
|
+
import { jsonBytes } from './response.mjs';
|
|
5
|
+
import { indexedBlockers, scheduleSearchRefresh, searchSourceState } from './search-index.mjs';
|
|
6
|
+
import { projectBudget } from './input.mjs';
|
|
7
|
+
import { openProject, recordEntries } from './stores.mjs';
|
|
8
|
+
|
|
9
|
+
export const defaultDepth = 1;
|
|
10
|
+
export const maxDepth = 20;
|
|
11
|
+
|
|
12
|
+
function findCycle(id, edges) {
|
|
13
|
+
const links = new Map();
|
|
14
|
+
for (const { from, to } of edges) {
|
|
15
|
+
if (!links.has(from)) links.set(from, []);
|
|
16
|
+
links.get(from).push(to);
|
|
17
|
+
}
|
|
18
|
+
const visited = new Set();
|
|
19
|
+
const path = [];
|
|
20
|
+
// The edge limit bounds this recursion, including the returned cycle path.
|
|
21
|
+
function visit(current) {
|
|
22
|
+
const ancestor = path.indexOf(current);
|
|
23
|
+
if (ancestor !== -1) return [...path.slice(ancestor), current];
|
|
24
|
+
if (visited.has(current)) return [];
|
|
25
|
+
visited.add(current);
|
|
26
|
+
path.push(current);
|
|
27
|
+
for (const next of links.get(current) ?? []) {
|
|
28
|
+
const cycle = visit(next);
|
|
29
|
+
if (cycle.length) return cycle;
|
|
30
|
+
}
|
|
31
|
+
path.pop();
|
|
32
|
+
return [];
|
|
33
|
+
}
|
|
34
|
+
return visit(id);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function inspectGraph(id, activeLinks, depth, limit) {
|
|
38
|
+
const graph = {
|
|
39
|
+
depth, limit, edges: [], cycle: [], cycleStatus: 'none',
|
|
40
|
+
truncated: { depth: false, limit: false, response: false },
|
|
41
|
+
};
|
|
42
|
+
const visited = new Set([id]);
|
|
43
|
+
const pending = [{ id, depth: 0 }];
|
|
44
|
+
for (let index = 0; index < pending.length; index++) {
|
|
45
|
+
const current = pending[index];
|
|
46
|
+
const blockers = activeLinks(current.id);
|
|
47
|
+
if (current.depth === depth) {
|
|
48
|
+
if (blockers.length) graph.truncated.depth = true;
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
for (const to of blockers) {
|
|
52
|
+
if (graph.edges.length === limit) {
|
|
53
|
+
graph.truncated.limit = true;
|
|
54
|
+
return graph;
|
|
55
|
+
}
|
|
56
|
+
graph.edges.push({ from: current.id, to });
|
|
57
|
+
if (!visited.has(to)) {
|
|
58
|
+
visited.add(to);
|
|
59
|
+
pending.push({ id: to, depth: current.depth + 1 });
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return graph;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function inspectBlockers(projectPath, id, options = {}) {
|
|
67
|
+
if (!Number.isSafeInteger(id) || id <= 0) fail('INVALID_INPUT', 'id must be a positive safe integer');
|
|
68
|
+
if (options === null || typeof options !== 'object' || Array.isArray(options)
|
|
69
|
+
|| Object.keys(options).some((key) => !['depth', 'limit', 'schemaPath', 'refreshMode', 'noCache', 'onAdvisory'].includes(key))) {
|
|
70
|
+
fail('INVALID_INPUT', 'options contains an unsupported blocker inspection setting');
|
|
71
|
+
}
|
|
72
|
+
const { noCache = false, onAdvisory } = options;
|
|
73
|
+
checkCacheOptions(noCache, onAdvisory);
|
|
74
|
+
const notify = onceAdvisory(onAdvisory);
|
|
75
|
+
const { depth = defaultDepth, limit = defaultLimit } = options;
|
|
76
|
+
if (!Number.isSafeInteger(depth) || depth < 1 || depth > maxDepth) {
|
|
77
|
+
fail('INVALID_INPUT', `depth must be an integer from 1 to ${maxDepth}`);
|
|
78
|
+
}
|
|
79
|
+
if (!Number.isSafeInteger(limit) || limit < 1 || limit > maxLimit) {
|
|
80
|
+
fail('INVALID_INPUT', `limit must be an integer from 1 to ${maxLimit}`);
|
|
81
|
+
}
|
|
82
|
+
const budget = projectBudget();
|
|
83
|
+
budget.fingerprints = {};
|
|
84
|
+
const project = openProject(projectPath, budget, false, true, options.schemaPath);
|
|
85
|
+
const useCache = !noCache && cacheSupported(notify);
|
|
86
|
+
const state = useCache ? searchSourceState(project) : undefined;
|
|
87
|
+
let active = useCache ? indexedBlockers(project, state) : undefined;
|
|
88
|
+
if (!active) {
|
|
89
|
+
if (useCache) {
|
|
90
|
+
try {
|
|
91
|
+
scheduleSearchRefresh(project.root, {
|
|
92
|
+
schemaPath: options.schemaPath, detached: options.refreshMode === 'detached',
|
|
93
|
+
});
|
|
94
|
+
} catch { advise(notify, cacheUnavailable); }
|
|
95
|
+
}
|
|
96
|
+
const { entries } = recordEntries(project, { group: 'Active' });
|
|
97
|
+
active = new Map();
|
|
98
|
+
for (const { record } of entries) {
|
|
99
|
+
active.set(record.id, Object.hasOwn(record, 'blockers') ? { blockers: record.blockers } : {});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
try {
|
|
103
|
+
if (!active.has(id)) fail('TASK_NOT_FOUND', `task ${id} was not found in Active; inspect history separately with get-task.mjs`);
|
|
104
|
+
const links = new Map();
|
|
105
|
+
function activeLinks(current) {
|
|
106
|
+
if (links.has(current)) return links.get(current);
|
|
107
|
+
const blockers = active.get(current).blockers;
|
|
108
|
+
if (blockers !== undefined && (!Array.isArray(blockers)
|
|
109
|
+
|| !blockers.every((blocker) => Number.isSafeInteger(blocker) && blocker > 0))) {
|
|
110
|
+
fail('INVALID_STORE', `task ${current}: blockers must be an array of positive safe integer local IDs, or omitted`);
|
|
111
|
+
}
|
|
112
|
+
const selected = [...new Set((blockers ?? []).filter((blocker) => active.has(blocker)))].sort((a, b) => a - b);
|
|
113
|
+
links.set(current, selected);
|
|
114
|
+
return selected;
|
|
115
|
+
}
|
|
116
|
+
const activeBlockers = activeLinks(id);
|
|
117
|
+
const graph = inspectGraph(id, activeLinks, depth, limit);
|
|
118
|
+
const result = { id, eligible: activeBlockers.length === 0, activeBlockers, graph };
|
|
119
|
+
// Preserve exact direct eligibility; only graph details may be shortened.
|
|
120
|
+
while (true) {
|
|
121
|
+
graph.cycle = findCycle(id, graph.edges);
|
|
122
|
+
graph.cycleStatus = graph.cycle.length ? 'found'
|
|
123
|
+
: Object.values(graph.truncated).some(Boolean) ? 'unknown' : 'none';
|
|
124
|
+
if (jsonBytes(result) + 1 <= responseBytes) return result;
|
|
125
|
+
if (!graph.edges.length) {
|
|
126
|
+
fail('OUTPUT_TOO_LARGE', `task ${id}: exact active blocker result exceeds 32 KiB; inspect smaller Active task selections with list/get`);
|
|
127
|
+
}
|
|
128
|
+
graph.edges.pop();
|
|
129
|
+
graph.truncated.response = true;
|
|
130
|
+
}
|
|
131
|
+
} finally {
|
|
132
|
+
active.close?.();
|
|
133
|
+
}
|
|
134
|
+
}
|
package/src/cache.mjs
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { databaseSync } from './sqlite.mjs';
|
|
2
|
+
|
|
3
|
+
export const cacheUnavailable = Object.freeze({
|
|
4
|
+
code: 'CACHE_UNAVAILABLE',
|
|
5
|
+
message: 'SQLite cache acceleration is unavailable; authoritative JSON was used.',
|
|
6
|
+
});
|
|
7
|
+
export const cacheFallback = Object.freeze({
|
|
8
|
+
code: 'CACHE_FALLBACK',
|
|
9
|
+
message: 'A current SQLite cache was unavailable; authoritative JSON was used while a refresh was requested.',
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
let support;
|
|
13
|
+
|
|
14
|
+
export function checkCacheOptions(noCache, onAdvisory) {
|
|
15
|
+
if (typeof noCache !== 'boolean') throw Object.assign(new Error('noCache must be a boolean'), { code: 'INVALID_INPUT' });
|
|
16
|
+
if (onAdvisory !== undefined && typeof onAdvisory !== 'function') {
|
|
17
|
+
throw Object.assign(new Error('onAdvisory must be a function'), { code: 'INVALID_INPUT' });
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function advise(onAdvisory, advisory) {
|
|
22
|
+
onAdvisory?.(advisory);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function onceAdvisory(onAdvisory) {
|
|
26
|
+
let sent = false;
|
|
27
|
+
return (advisory) => {
|
|
28
|
+
if (sent) return;
|
|
29
|
+
sent = true;
|
|
30
|
+
advise(onAdvisory, advisory);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function cacheSupported(onAdvisory) {
|
|
35
|
+
if (support === undefined) {
|
|
36
|
+
let database;
|
|
37
|
+
try {
|
|
38
|
+
const DatabaseSync = databaseSync();
|
|
39
|
+
database = new DatabaseSync(':memory:');
|
|
40
|
+
database.exec('SELECT 1');
|
|
41
|
+
support = true;
|
|
42
|
+
} catch {
|
|
43
|
+
support = false;
|
|
44
|
+
} finally {
|
|
45
|
+
try { database?.close(); } catch { support = false; }
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (!support) advise(onAdvisory, cacheUnavailable);
|
|
49
|
+
return support;
|
|
50
|
+
}
|
package/src/config.mjs
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { homedir } from 'node:os';
|
|
2
|
+
import { existsSync } from 'node:fs';
|
|
3
|
+
import { configPath } from './locations.mjs';
|
|
4
|
+
import { isAbsolute, join, resolve } from 'node:path';
|
|
5
|
+
import { fail } from './errors.mjs';
|
|
6
|
+
import { readBudget, readJson } from './input.mjs';
|
|
7
|
+
|
|
8
|
+
export const defaultSlowQueryMs = 150;
|
|
9
|
+
|
|
10
|
+
const object = (value) => value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
11
|
+
const absolute = (value) => typeof value === 'string' && isAbsolute(value) && !value.includes('\0');
|
|
12
|
+
|
|
13
|
+
export function readConfig(config, env = process.env) {
|
|
14
|
+
const current = configPath(env);
|
|
15
|
+
const legacy = join(env.XDG_CONFIG_HOME || join(env.HOME || homedir(), '.config'), 'task-tracker', 'config.json');
|
|
16
|
+
const path = resolve(config ?? env.TASK_TRACKER_CONFIG ?? (existsSync(current) || !existsSync(legacy) ? current : legacy));
|
|
17
|
+
const settings = readJson(path, readBudget(), true) ?? {};
|
|
18
|
+
if (!object(settings)) fail('INVALID_CONFIG', `${path}: program configuration must be an object`);
|
|
19
|
+
if ((settings.projects_root !== undefined && !absolute(settings.projects_root))
|
|
20
|
+
|| (settings.projects !== undefined && (!object(settings.projects)
|
|
21
|
+
|| Object.entries(settings.projects).some(([key, value]) => !key || key === '.' || key === '..'
|
|
22
|
+
|| /[\\/\0]/.test(key) || !absolute(value))))) {
|
|
23
|
+
fail('INVALID_CONFIG', `${path}: projects_root and projects mappings must use absolute directory paths and simple names`);
|
|
24
|
+
}
|
|
25
|
+
if (settings.slow_query_ms !== undefined
|
|
26
|
+
&& (!Number.isSafeInteger(settings.slow_query_ms) || settings.slow_query_ms < 0)) {
|
|
27
|
+
fail('INVALID_CONFIG', `${path}: slow_query_ms must be a non-negative safe integer`);
|
|
28
|
+
}
|
|
29
|
+
return { path, settings, slowQueryMs: settings.slow_query_ms ?? defaultSlowQueryMs };
|
|
30
|
+
}
|