@unbrained/pm-cli 2026.11.13 → 2026.11.14
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/.claude-plugin/marketplace.json +1 -1
- package/dist/cli/register-mutation.js +2 -2
- package/dist/cli/register-operations.js +1 -1
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/{chunk-O6PBQMD7.js → chunk-25BUKX4W.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-O6T24Z3M.js → chunk-27FG6ROB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5LG5YZYF.js → chunk-547OEGDR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FAYX6C7H.js → chunk-5TGFB34A.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GWVP23RZ.js → chunk-65SBMIK6.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LKVFPQNY.js → chunk-AXTUB74T.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-L4F4ZHGR.js → chunk-BHH65KLL.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-C7M54YV6.js +122 -0
- package/dist/cli-bundle/chunks/{chunk-QSSENTXG.js → chunk-DMWL3K4A.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-36E4L2R4.js → chunk-DVN7CD5B.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4WD4CHVH.js → chunk-DZ7CWUVM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GXGMMIZN.js → chunk-EXO4PM5J.js} +50 -44
- package/dist/cli-bundle/chunks/chunk-FRCNYOTG.js +9 -0
- package/dist/cli-bundle/chunks/chunk-HXECILIE.js +31 -0
- package/dist/cli-bundle/chunks/{chunk-UYARS5XF.js → chunk-IDFRGH4X.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-URWNUZQZ.js → chunk-JSTBYDLL.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UFZQPKQS.js → chunk-MELSYAFE.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-OQCVU2SG.js → chunk-OTM6PXZQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-COTC2QOR.js → chunk-PC5DGK3C.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6UXBWMEM.js → chunk-PF3V443A.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CO7RWLCM.js → chunk-U2HVJVA5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-PUU5DXSV.js → chunk-V2OAXGHK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IYDIPXBO.js → chunk-VERRDW3Q.js} +2 -2
- package/dist/cli-bundle/chunks/{item-revision-G5OVYGZ5.js → item-revision-VGIHIWZM.js} +2 -2
- package/dist/cli-bundle/chunks/item-transaction-6OB6BGTD.js +2 -0
- package/dist/cli-bundle/chunks/{mutation-admission-SET4KY73.js → mutation-admission-LL6SGQYU.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-JNJY2D3N.js → register-list-query-MCNOV6ML.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-WTHZHPOP.js → register-mutation-KYXLYHOK.js} +4 -4
- package/dist/cli-bundle/chunks/register-operations-6RQF6IAE.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-THFZP23A.js → register-setup-XGPOFFD3.js} +2 -2
- package/dist/cli-bundle/chunks/{stage-JXJILTYE.js → stage-ZS7WNUD4.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-2A4JCFMI.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-FNIX62V6.js → chunk-2T6MQ7NP.js} +3 -3
- package/dist/cli-bundle/focused-chunks/chunk-32QYILXW.js +82 -0
- package/dist/cli-bundle/focused-chunks/{chunk-4LFE3FQL.js → chunk-3SUKWYR2.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-4WOF3Q6R.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-5IQPFV4Y.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-RIMNSVFA.js → chunk-6C7NBJ7A.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-JR75B6HU.js → chunk-7KNF6RCV.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-Q3OA5OAK.js → chunk-EAYRYXA6.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-VGFKTSGY.js → chunk-EH7JKGDH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ZJF6ZA7B.js → chunk-EXCVUBAE.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-3MB47JLT.js → chunk-FNLOLNPQ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-HRLGC3P7.js +28 -0
- package/dist/cli-bundle/focused-chunks/{chunk-IYV3IPRF.js → chunk-I7A5VP5E.js} +56 -56
- package/dist/cli-bundle/focused-chunks/{chunk-CSKDIMQP.js → chunk-JHC3X43E.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-VTOTZ5UC.js → chunk-MKYNDWT3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-WFVZ7GGR.js → chunk-RDTHL44U.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-TVJ2PHAK.js → chunk-TA4EGVE6.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ADBFVDTG.js → chunk-UCCLV5GJ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-W3RWCLEU.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-W57DSFSU.js +44 -0
- package/dist/cli-bundle/focused-chunks/{chunk-J3LQQP3N.js → chunk-YNYO7PMT.js} +4 -4
- package/dist/cli-bundle/focused-chunks/{item-revision-IF7E7BVY.js → item-revision-7J7WSCPC.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{item-transaction-5TFWIOXI.js → item-transaction-F5YMCPRB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{mutation-admission-KELM46JF.js → mutation-admission-2NRQEAOG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{stage-UAKMQTCI.js → stage-2KVCKOGC.js} +2 -2
- package/dist/cli-bundle/main.js +2 -2
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +2 -2
- package/dist/cli-bundle/sdk-core.js +1 -1
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +57 -57
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +11 -11
- package/dist/core/item/item-format-version.d.ts +6 -5
- package/dist/core/item/item-format-version.js +1 -1
- package/dist/core/item/item-format.js +1 -1
- package/dist/core/lock/lock.js +3 -3
- package/dist/core/output/linked-test-projection.js +6 -0
- package/dist/core/output/output.js +7 -5
- package/dist/core/session/session-state.js +1 -1
- package/dist/core/shared/text-normalization.d.ts +24 -0
- package/dist/core/shared/text-normalization.js +1 -1
- package/dist/core/shared/url-credentials.js +1 -1
- package/dist/core/test/run-selectors.d.ts +3 -1
- package/dist/core/test/run-selectors.js +1 -1
- package/dist/sdk/annotations.js +1 -1
- package/dist/sdk/cli-contracts/completeness.js +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +1 -1
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +1 -1
- package/dist/sdk/cli-contracts/tool-schema.d.ts +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +1 -1
- package/dist/sdk/completion/bash.js +1 -1
- package/dist/sdk/completion/fish.js +4 -1
- package/dist/sdk/completion/zsh.js +4 -1
- package/dist/sdk/context-intent-contracts.js +1 -1
- package/dist/sdk/docs.d.ts +3 -1
- package/dist/sdk/docs.js +1 -1
- package/dist/sdk/environment/project-runtime-compatibility.d.ts +8 -1
- package/dist/sdk/environment/project-runtime-compatibility.js +2 -2
- package/dist/sdk/files.d.ts +3 -1
- package/dist/sdk/files.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
- package/dist/sdk/guide-topics.js +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/lifecycle/claim.d.ts +5 -1
- package/dist/sdk/lifecycle/claim.js +1 -1
- package/dist/sdk/lifecycle/create.js +1 -1
- package/dist/sdk/lifecycle/mutation-facet-contracts.js +1 -1
- package/dist/sdk/lifecycle/plan.js +1 -1
- package/dist/sdk/linked-artifacts.d.ts +45 -3
- package/dist/sdk/linked-artifacts.js +2 -2
- package/dist/sdk/output/table-rows.d.ts +28 -4
- package/dist/sdk/output/table-rows.js +1 -1
- package/dist/sdk/output.d.ts +1 -1
- package/dist/sdk/output.js +1 -1
- package/dist/sdk/package-import-adapters.js +1 -1
- package/dist/sdk/pagination.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/read-output/continuation.js +1 -1
- package/dist/sdk/read-output-budget.js +1 -1
- package/dist/sdk/test/batch.d.ts +5 -2
- package/dist/sdk/test/batch.js +2 -2
- package/dist/sdk/test/command-args.js +1 -1
- package/dist/sdk/test/entry.js +2 -2
- package/dist/sdk/test/execution.d.ts +10 -7
- package/dist/sdk/test/execution.js +2 -2
- package/dist/sdk/test/parsers.js +1 -1
- package/dist/sdk/test/prerequisites.d.ts +1 -1
- package/dist/sdk/test/prerequisites.js +1 -1
- package/dist/sdk/test/run-phases.d.ts +44 -0
- package/dist/sdk/test/run-phases.js +2 -0
- package/dist/types.d.ts +3 -1
- package/dist/types.js +1 -1
- package/docs/AGENT_OUTPUT_ENCODINGS.md +16 -4
- package/docs/COMMANDS.md +22 -4
- package/docs/LINKED_TEST_EDITS.md +2 -1
- package/docs/OUTPUT_PROJECTION_CONTRACTS.md +6 -3
- package/docs/README.md +2 -2
- package/docs/READ_OUTPUT_CONTRACTS.md +23 -2
- package/docs/SDK.md +18 -1
- package/docs/TESTING.md +64 -1
- package/docs/WORKSPACE_CONCURRENCY.md +5 -1
- package/docs/generated/FLAG_LEXICON_BUDGETS.md +8 -8
- package/marketplace.json +1 -1
- package/package.json +1 -2
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/package.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/package.json +1 -1
- package/plugins/pm-codex/plugin.json +1 -1
- package/runtime-dependencies.json +1 -1
- package/CHANGELOG.md +0 -4793
- package/dist/cli-bundle/chunks/chunk-GIAJX2QJ.js +0 -9
- package/dist/cli-bundle/chunks/chunk-HQINCDF6.js +0 -116
- package/dist/cli-bundle/chunks/chunk-TCYIGAQG.js +0 -31
- package/dist/cli-bundle/chunks/item-transaction-I2X2P4TW.js +0 -2
- package/dist/cli-bundle/chunks/register-operations-EZP3EG6A.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2ZPGEGTB.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-5KTOMFLR.js +0 -44
- package/dist/cli-bundle/focused-chunks/chunk-5NTLNE54.js +0 -26
- package/dist/cli-bundle/focused-chunks/chunk-QGQJBQCH.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-VGJDKDKA.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-VGUQ4V47.js +0 -82
- package/dist/cli-bundle/focused-chunks/chunk-ZOGEQFGH.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schema_version":1,"generation":"747cfc069eb58b0f1c573d2a9a152e86ac86ce1227c0735dcab6d955d2b39f65","files":[{"path":"chunks/chunk-36E4L2R4.js","sha256":"2f9c894bb17e0928c5fed07617d7499bc4b32f499ecd61a46d3a8dbcd4a9ec30"},{"path":"chunks/chunk-36E4L2R4.js.map","sha256":"367f1c2c7c785d2c722224f7148e6e5bd0259c2e9749173bc7952289a895d1b6"},{"path":"chunks/chunk-4WD4CHVH.js","sha256":"4a5b4f17c3aaf79677340775ed74d563c32ebdfeaae656e710b290c8efc13665"},{"path":"chunks/chunk-4WD4CHVH.js.map","sha256":"7031b64b2fb737d26106e4aac790a2b15c943ad1f7996e621c91ce07b9691a10"},{"path":"chunks/chunk-5LG5YZYF.js","sha256":"4856835c4ea6c6da120ac1322ca8bb1cb976dd5cfe61e821662611cbc3d7aae6"},{"path":"chunks/chunk-5LG5YZYF.js.map","sha256":"2f88932107b68cc3a9ef3ef1b1a633522fec536f21b6c938200a1d4dd6e0e8ff"},{"path":"chunks/chunk-6UXBWMEM.js","sha256":"db0999d074f213fe816a003a2d2fec03378bfb7148b4d4434a7f48ed755ad9f0"},{"path":"chunks/chunk-6UXBWMEM.js.map","sha256":"4a5ca6e764c15fb0d450a503ccc2a44ed842607387bdd8736d4173063f5da2be"},{"path":"chunks/chunk-CO7RWLCM.js","sha256":"015d130cb2b286a4bb11d0bbaf702b7cb5e1fff9f1362cffde94cc719e2ab00b"},{"path":"chunks/chunk-CO7RWLCM.js.map","sha256":"a825a13fa2fffd1a1fb2f09aedaadbfde813be6be0570c74adefa421f37f03dd"},{"path":"chunks/chunk-COTC2QOR.js","sha256":"3a6baf4fb52aca087caada2e1ce5cb43707f72c2b6a700de82232602baae8da0"},{"path":"chunks/chunk-COTC2QOR.js.map","sha256":"deb4bbfb297c913646620f22e4c12925e689d7af6d39d07955c0526f712b82e9"},{"path":"chunks/chunk-DEZPZOQ7.js","sha256":"ef11ddab9ecc9533cac75ccc8ca41058a59382dfbe3262033fa21c7264d73b0d"},{"path":"chunks/chunk-DEZPZOQ7.js.map","sha256":"ed562b0bba7ee7214e56ac7f728054b3496bec4597c94a4eb7b4179e6f5cb1c9"},{"path":"chunks/chunk-FAYX6C7H.js","sha256":"73a3170c6ececbfc87b65b05d3cc9198d309d7f33367e98a89397a22b58dc254"},{"path":"chunks/chunk-FAYX6C7H.js.map","sha256":"fd1765929df526e5d7a2a0bd78c7a29c990cc79e70cd18810136cbca50ce975a"},{"path":"chunks/chunk-GIAJX2QJ.js","sha256":"ae0971d8beb9ffb751f06c5cce9b8b39b5edccb6fc9f50f95e786e6e8f610d15"},{"path":"chunks/chunk-GIAJX2QJ.js.map","sha256":"01248202ecf8ff112b8e96323ba60a840a0a26ccf07fa737ea46d0ca1f8375c5"},{"path":"chunks/chunk-GWVP23RZ.js","sha256":"3cadd5867af505d13b0404d9995259ecfca4949cee914f921d47386cac24686e"},{"path":"chunks/chunk-GWVP23RZ.js.map","sha256":"3ef6aaaab9d223b065b678a7eb29cc8fb1a241156372d5809b00812dd5a84afb"},{"path":"chunks/chunk-GXGMMIZN.js","sha256":"8f08517b85273419919cf91245ae1a6fa45eb238ae62c03a49a7af1a0b23d20b"},{"path":"chunks/chunk-GXGMMIZN.js.map","sha256":"dc1bf89cbbd9af6d54968ab88fa2da7f90f5f507552acaeae963a2d17247c314"},{"path":"chunks/chunk-HQINCDF6.js","sha256":"a5274e6b2cb254ac5f888913c71091f380a1b13d0818a0c12c68ffa1685ed15e"},{"path":"chunks/chunk-HQINCDF6.js.map","sha256":"f68df8b4f4a8fb1d1118b841393da82f8a9436895d4966d9621f7f30d16c6bdd"},{"path":"chunks/chunk-IB7UB5TE.js","sha256":"158940f663a676247075395b646afbce49c7b88138d677699bdabf9add9776df"},{"path":"chunks/chunk-IB7UB5TE.js.map","sha256":"ed562b0bba7ee7214e56ac7f728054b3496bec4597c94a4eb7b4179e6f5cb1c9"},{"path":"chunks/chunk-IYDIPXBO.js","sha256":"6262cf3ed3e15655bc412d14c1dbd92e1f65252bb0a16bf4b3ca091b08facb54"},{"path":"chunks/chunk-IYDIPXBO.js.map","sha256":"28a454c63b7b0f56502f9f039a994cc8d71e668e5430039fa7e666fc328d9baf"},{"path":"chunks/chunk-L4F4ZHGR.js","sha256":"f0eb00e1e69e026d98921dc2a4d82475c7a631d56111f7637ba3fba7d771c9b0"},{"path":"chunks/chunk-L4F4ZHGR.js.map","sha256":"504741aafd383ea493136c423efe05de384ed30da8f1815a78e6cac625c6ef00"},{"path":"chunks/chunk-LKVFPQNY.js","sha256":"92de6d113f7aef85baf072968e470490034d817612effa974a32dedd5b9ccea3"},{"path":"chunks/chunk-LKVFPQNY.js.map","sha256":"a293fc0d94c56a7f11857fdc95a5355cf5ceca2329c9a17dd21416824f947b0b"},{"path":"chunks/chunk-O4ZLEN4T.js","sha256":"c840a800fd85b0a9078b28e5cbc51b048ca15f14179bf5865e6840105093a8a6"},{"path":"chunks/chunk-O4ZLEN4T.js.map","sha256":"ac003ffbf6bca2076ea011786e029b165d5626153de1f2ad73053bbf3517b243"},{"path":"chunks/chunk-O6PBQMD7.js","sha256":"67080121c5c0d2f2c925cf1ea89d6705a82a7f181e00f62f372086fe8ecdbb9d"},{"path":"chunks/chunk-O6PBQMD7.js.map","sha256":"e6751e2d42b1cb31cd4796ce1c3f572c489e55ebf8cf8c549fc8ec47caf9afbc"},{"path":"chunks/chunk-O6T24Z3M.js","sha256":"ade4fe31a6603a7d97471576a9f82117f36d5d6323493b39469f13161a35ecb3"},{"path":"chunks/chunk-O6T24Z3M.js.map","sha256":"cb3599b08e31263e24a58443321712f9de9edfb61280744beb7beca07028cdaa"},{"path":"chunks/chunk-OQCVU2SG.js","sha256":"ebc1a1a9730c8c7281c5ac9684b2335bce74fce8b5868636892d2178c41707cb"},{"path":"chunks/chunk-OQCVU2SG.js.map","sha256":"6891e9179042addffd88d12c8e1e02a0598c5b577cc5857271cf485b72077c46"},{"path":"chunks/chunk-PUU5DXSV.js","sha256":"6099d3c75f7bccc01388332a68702c127de14eae957c1ddbf270b1c45ca299ab"},{"path":"chunks/chunk-PUU5DXSV.js.map","sha256":"65a6798e58abe05dd23155d9913808ddd605f59dafe8011040ad766caad3f7b8"},{"path":"chunks/chunk-QSSENTXG.js","sha256":"a7eda9b3c80fdfa466f64dc2a32c0b92c270fdf312155d85219b8f03c462bf69"},{"path":"chunks/chunk-QSSENTXG.js.map","sha256":"f1e584b9354ad751e18b64403de634a8803d8f96812588bca638cc8e583dda45"},{"path":"chunks/chunk-RSAN2YUU.js","sha256":"6d761ffb0fd8a6f76a78205e18eb54dc93cd51bfc24e17162a4731a2351399f2"},{"path":"chunks/chunk-RSAN2YUU.js.map","sha256":"f295630c5dc63081c1891c29b55fd197bac98d6452e29c09eaf97fdbc35554a0"},{"path":"chunks/chunk-SPPHDVZE.js","sha256":"ba82130f93656299c39dc713ba1f03fc47bec7a39fac6594c72e10ba398f04d3"},{"path":"chunks/chunk-SPPHDVZE.js.map","sha256":"3a5501d6ab3f711b0aaa21285ea5fba97feaf79460619089e0e6010785e3ad7e"},{"path":"chunks/chunk-TCYIGAQG.js","sha256":"a74ab1ea7bc0ec2742c8cd42fb3ff249cc6e97a5b3050c82250cb99befc31c98"},{"path":"chunks/chunk-TCYIGAQG.js.map","sha256":"bc7c1ab7979c5cf288a597d8fb07b53c368640b6d9a0d360aca9d4a11a2e332f"},{"path":"chunks/chunk-UFZQPKQS.js","sha256":"f0c7b5855cde9955aa9c382c76e521ff8764ce99b12bb39dd657ee0c8adc2807"},{"path":"chunks/chunk-UFZQPKQS.js.map","sha256":"4510dce459bdd00812b6a345f87d5aa1bd2bc900ea0038e6ee67a1cd901d9f3b"},{"path":"chunks/chunk-UJMQP2HP.js","sha256":"33d8da387462b3150d10560acf8d13d63ab2fbb654f247cd777e7cc45c5ab19c"},{"path":"chunks/chunk-UJMQP2HP.js.map","sha256":"26c92ca1dcf896743cae73cdf47c47a8133e4e9cff4590b313c02d7094087305"},{"path":"chunks/chunk-URWNUZQZ.js","sha256":"fd09ae7875cf37e0b55e69b6d6216dcc5f809bac390abfa63c2b9682ebecb9e0"},{"path":"chunks/chunk-URWNUZQZ.js.map","sha256":"9f46ba52257e0016fe485dd8c5b74874b7026b13cdb192bb5f008cb3424948bf"},{"path":"chunks/chunk-UYARS5XF.js","sha256":"185fe6ab2f0f56fd7cd38e69ef52bff1e60a3491dab17ade638ab4ae7c5b83a0"},{"path":"chunks/chunk-UYARS5XF.js.map","sha256":"e22f7df786c7252beb90e57f0e32634bbf3197a1ceab1c1e9f4ec93a8a426b26"},{"path":"chunks/chunk-VS565KBX.js","sha256":"f66d92e0d59add33123dc44938a2cf76a749b262d5c044d8bbccce24861f9351"},{"path":"chunks/chunk-VS565KBX.js.map","sha256":"562c753aa39adbfdbeefaf390e68fdadd1fe986bcb6e82f9355315e8d6a16ec9"},{"path":"chunks/chunk-XAWE4EAK.js","sha256":"9ec1c5760661739327050e0bfc643cdfb827f8f501fe1a57c28be01371f89128"},{"path":"chunks/chunk-XAWE4EAK.js.map","sha256":"ed562b0bba7ee7214e56ac7f728054b3496bec4597c94a4eb7b4179e6f5cb1c9"},{"path":"chunks/context-budget-recovery-L2WP5S26.js","sha256":"94308a0c40cb90380fb5f3c00c105b04df651eb699452e4a1eff4392936bad3e"},{"path":"chunks/context-budget-recovery-L2WP5S26.js.map","sha256":"bdec4d79334c795b8b4fdcf03f3820adac1f8a3a220767d3cf0de29c4d3a79e2"},{"path":"chunks/indexed-receipt-blobs-I6RQGD6Y.js","sha256":"6a9e5f49b8c0212d359d9a148334403e1ece480b71fe9056780a686ca49a4e06"},{"path":"chunks/indexed-receipt-blobs-I6RQGD6Y.js.map","sha256":"cd38ac9e4b9beec9644d2629c41c46fef0179d7fcd36a1df7cafd1cdf5f22489"},{"path":"chunks/item-revision-G5OVYGZ5.js","sha256":"72c5e0631f919088bdb4a3d984af7cac85db06bd9a03264dc21acc7316c152fb"},{"path":"chunks/item-revision-G5OVYGZ5.js.map","sha256":"ed562b0bba7ee7214e56ac7f728054b3496bec4597c94a4eb7b4179e6f5cb1c9"},{"path":"chunks/item-transaction-I2X2P4TW.js","sha256":"9c9ff9baab29a6c9a8e1e6f0c3e05b1e8114e41fc551110476ec35db25c8c523"},{"path":"chunks/item-transaction-I2X2P4TW.js.map","sha256":"ed562b0bba7ee7214e56ac7f728054b3496bec4597c94a4eb7b4179e6f5cb1c9"},{"path":"chunks/mutation-admission-SET4KY73.js","sha256":"cc774c9d5d856cac529a1f2142cc58cbc0d6d7faec1f212ecb22bd978b07fd24"},{"path":"chunks/mutation-admission-SET4KY73.js.map","sha256":"442edc3e0ad6c8e614c4729e5af935f14e79902c0af0c9779e3fe68fbc7248ea"},{"path":"chunks/register-list-query-JNJY2D3N.js","sha256":"076eb5862b482c069f12c02bcbfc3f583fa5a3fdf0e83f8e4c08c121053d2f9c"},{"path":"chunks/register-list-query-JNJY2D3N.js.map","sha256":"f98d8f279badbacfe3eaf4f7567acb7b7cb985ac13a0f55a8c4641dd15cd5910"},{"path":"chunks/register-mutation-WTHZHPOP.js","sha256":"79baff10880f862b221de76adad7102546dda4e670f4ba3f3ff0ea2b6ec45a94"},{"path":"chunks/register-mutation-WTHZHPOP.js.map","sha256":"5f1ce83df5853f6dcc564aab49dc1173e72c5669f40e727d302de8ec8a31dd44"},{"path":"chunks/register-operations-EZP3EG6A.js","sha256":"4f48bc42fef17ee8d50b8632ce449fce38f3c68e2f6afaa37c47b7e73ddf14af"},{"path":"chunks/register-operations-EZP3EG6A.js.map","sha256":"e9ffe521e0d8137fc21c2fb5928508be48e81d98350038d75bd738b5a984c1df"},{"path":"chunks/register-setup-THFZP23A.js","sha256":"26bd660b2bb4f9e4d25e59ceb999c54cf3847ec858aba2add704a0f268e397d3"},{"path":"chunks/register-setup-THFZP23A.js.map","sha256":"f05b4d69992dc1793327db69bfc5c7e5ad8090ffbba980fc38f63121a53f643b"},{"path":"chunks/settlement-hook-JHXLUBEN.js","sha256":"60574b6f2502b42ca6797b76a0a41d2ebfe8f4cd1087d19c9648ad7ed01cbf46"},{"path":"chunks/settlement-hook-JHXLUBEN.js.map","sha256":"6e0577b035532efe4968d1a3bbaf491e0d790074b735ff94448143e5a700c747"},{"path":"chunks/stage-JXJILTYE.js","sha256":"542e239ff90dc3c9284d2be65e43456015778fd818f6ac400caa649457b67fca"},{"path":"chunks/stage-JXJILTYE.js.map","sha256":"1cfaef9f0b1890e2dfed29ad9121a25281e2f074e8183edc9163c214e4b00437"},{"path":"focused-chunks/chunk-2ZPGEGTB.js","sha256":"7e2e0860933aaddec0ff8deb05b74b2cdbbaf305999e93babe0beb5783f8e4b5"},{"path":"focused-chunks/chunk-2ZPGEGTB.js.map","sha256":"48bdec726684e18d222aa7ec9d7df1354724398b145ca9d4dfd6ed6336d64dce"},{"path":"focused-chunks/chunk-3MB47JLT.js","sha256":"24100c8ca824fa53cabde2dd9642d8dea53e57f38a3c21a6ff018a6cb122723d"},{"path":"focused-chunks/chunk-3MB47JLT.js.map","sha256":"a4eb80021e5972a23bb79e9ff6da79ad628414c8ef97d4a556eba76b7afd5b90"},{"path":"focused-chunks/chunk-4LFE3FQL.js","sha256":"8525532403b884b1712d8471e2dbab78275ba326b9c61c77fb0a5003d005b812"},{"path":"focused-chunks/chunk-4LFE3FQL.js.map","sha256":"f169910643c9722f7af2f7c82ad2fc13744fc195f7e4f7e80847906b8b574906"},{"path":"focused-chunks/chunk-5KTOMFLR.js","sha256":"b4dafb66d1d41bea67927ca29e8a8811768a8c40cfd8912ae9d13ea0d359b305"},{"path":"focused-chunks/chunk-5KTOMFLR.js.map","sha256":"3be0961a5b7c34736e3f47a8d7ffac80baf49f0e425bd35afa08cea7199906da"},{"path":"focused-chunks/chunk-5NTLNE54.js","sha256":"7e2164475db8a2f6f85c164a93cd48c4a2df58401ba833de8dd5adabdb667e87"},{"path":"focused-chunks/chunk-5NTLNE54.js.map","sha256":"c3389716ec6994f8144f86ec533c9e2c1a8363db047220d01cbad8d980c38d44"},{"path":"focused-chunks/chunk-ADBFVDTG.js","sha256":"c0c46bb11b68c0838ff85b4a4e5d5b1b728c87dbe1db77b5c89729e1e9fd10dd"},{"path":"focused-chunks/chunk-ADBFVDTG.js.map","sha256":"8cceb2f21b2b0df0e9645fb6c151c8ec033af2023f755ed788c75efcf58fee54"},{"path":"focused-chunks/chunk-C3O6JJPO.js","sha256":"1f495890523f3550ee1050149240e68e386d729f0278be125ee51c337c2952c4"},{"path":"focused-chunks/chunk-C3O6JJPO.js.map","sha256":"7222eba51724ce2de54f854d9e01ca89dd73272e6407cdd8b9211be1cf9675c1"},{"path":"focused-chunks/chunk-CSKDIMQP.js","sha256":"19693c2d22866160884f3276fb2a98b7320be252b50bfb05b68f17cd739e23ce"},{"path":"focused-chunks/chunk-CSKDIMQP.js.map","sha256":"8b883458bd932973390e136ac0619dd520ae7f08f36bb0d058e6be72d90dcd0c"},{"path":"focused-chunks/chunk-EGN2HFRU.js","sha256":"60ca3c4b0c5584d8866c75892f5c5224db858ef11328a0d99265b2c94eb3815d"},{"path":"focused-chunks/chunk-EGN2HFRU.js.map","sha256":"3a5501d6ab3f711b0aaa21285ea5fba97feaf79460619089e0e6010785e3ad7e"},{"path":"focused-chunks/chunk-FNIX62V6.js","sha256":"a6e1188b00c5c17b299f0181d7ff20efcd90c98fed1c475ba665a5455b06c0f5"},{"path":"focused-chunks/chunk-FNIX62V6.js.map","sha256":"bc4624ebae9d8fd3b1864c875ed89dc69fdb4765f665a57b331197ec46e61b8c"},{"path":"focused-chunks/chunk-FOA7XKWP.js","sha256":"3e57188628de10dafcc17048ef3dcc5b9061c29ff4f34620a4d62de45ee606fa"},{"path":"focused-chunks/chunk-FOA7XKWP.js.map","sha256":"562c753aa39adbfdbeefaf390e68fdadd1fe986bcb6e82f9355315e8d6a16ec9"},{"path":"focused-chunks/chunk-G6ERMFJ5.js","sha256":"2b65658ea244174c234a3190965d9bdc6fec1f625cf7d34d019ee53ac89fdd52"},{"path":"focused-chunks/chunk-G6ERMFJ5.js.map","sha256":"22c39dcfda645869aaf1242d3287de74ff3e9b6186967a7cd17e9aafc7e26822"},{"path":"focused-chunks/chunk-GHQVM6K6.js","sha256":"79ea412a6b8b7c176f75f19aaaabf6fbbfbc826c4362254c90183003f4b8f1d6"},{"path":"focused-chunks/chunk-GHQVM6K6.js.map","sha256":"ed562b0bba7ee7214e56ac7f728054b3496bec4597c94a4eb7b4179e6f5cb1c9"},{"path":"focused-chunks/chunk-I5LGPUWH.js","sha256":"f2289c3bdd0121277e0e06133743ab4633ccb4384d70ba302df15b53ce1be45d"},{"path":"focused-chunks/chunk-I5LGPUWH.js.map","sha256":"5372543aa2680b9ab13778a97bd74f239974c09fdbc238233d00006a6c16021a"},{"path":"focused-chunks/chunk-IDAYTYNN.js","sha256":"4cf4b10a5600acff248e6fa45a40bfb028cce8d4def56901dcccca778f9e8058"},{"path":"focused-chunks/chunk-IDAYTYNN.js.map","sha256":"f295630c5dc63081c1891c29b55fd197bac98d6452e29c09eaf97fdbc35554a0"},{"path":"focused-chunks/chunk-IYV3IPRF.js","sha256":"f8ae8dee9b8b0246719f3aef7014eb4b110c8179d4be414a117d3f14ca980d93"},{"path":"focused-chunks/chunk-IYV3IPRF.js.map","sha256":"e566dcb143666d96ecdc3dd8a487df3f148d2c5f82307dd0ab9191739971e6c4"},{"path":"focused-chunks/chunk-J3LQQP3N.js","sha256":"d9948d1e5cf3f37779c627483b3a3868ea3fdd0e693f6609fcb0170c45d2d2fb"},{"path":"focused-chunks/chunk-J3LQQP3N.js.map","sha256":"39f902ba2491d7a181de153690c9c014c8b63742768bb3750e58d2171376104c"},{"path":"focused-chunks/chunk-JR75B6HU.js","sha256":"c192a0ca9473a3a078c392f31638d00af425f5580d7a52954d7b4478de1d7d4a"},{"path":"focused-chunks/chunk-JR75B6HU.js.map","sha256":"9ca435c648b846a712a78b78e0662989dd0ca012f7bd1f22af9052269d75eff4"},{"path":"focused-chunks/chunk-Q3OA5OAK.js","sha256":"df44a2c897cd88ddbaa371111623749a854650edac8e89f3b5e2ffa95a992cb9"},{"path":"focused-chunks/chunk-Q3OA5OAK.js.map","sha256":"2b3a95cd41fd97a89ef351323002637cdaeb093c80939a0278d05f9efd9d2118"},{"path":"focused-chunks/chunk-QGQJBQCH.js","sha256":"2509d4e7966a1cbc5931fd167665e5071a4002d65b036e26dd9bd25151e4d143"},{"path":"focused-chunks/chunk-QGQJBQCH.js.map","sha256":"50eb68785c481053e57ce2ba8aee1b1afe20788db9f1a0358283f44034e2214c"},{"path":"focused-chunks/chunk-RIMNSVFA.js","sha256":"ec498f8a73cb5b8148e68efb13e35461b941c06bc8ef6244654ff5f72dc0fd60"},{"path":"focused-chunks/chunk-RIMNSVFA.js.map","sha256":"6b01b8409eb1b5b7f2c0e382c9f9888811c4b1798a898ace781885f74e1c62e4"},{"path":"focused-chunks/chunk-SVOOGGAK.js","sha256":"cf84553a8001feee7147d6941274dc00cf8644ded0da1e4b611b542c02f6dcb5"},{"path":"focused-chunks/chunk-SVOOGGAK.js.map","sha256":"c6941ba9e7060fcb63add9bb1b246052f16f530b85845320f23076a4db57f341"},{"path":"focused-chunks/chunk-TVJ2PHAK.js","sha256":"1437a7415f1acf94763eb9ea775f16de0a0e8732a840414ecd650a7f3917c45d"},{"path":"focused-chunks/chunk-TVJ2PHAK.js.map","sha256":"26caacaf2e6171056f04695cb09bdf2f914364ad5fbf957b1f20a58e94579dde"},{"path":"focused-chunks/chunk-VGFKTSGY.js","sha256":"f94129c2e5367b15abbcc12693de15ca08bd8daf3891fe948f86ca1b8c684e19"},{"path":"focused-chunks/chunk-VGFKTSGY.js.map","sha256":"e27692e5f33d7d892f44ef51f07249e209463d941ba29599482b794019759709"},{"path":"focused-chunks/chunk-VGJDKDKA.js","sha256":"30c876ac81c473573d720710c4e8709d06540c71ffa95b90d3ed0fc7a290b499"},{"path":"focused-chunks/chunk-VGJDKDKA.js.map","sha256":"62a17e5857804855c8ae792c4546d3d44123b373bf7a3a8af298c23800f702ee"},{"path":"focused-chunks/chunk-VGUQ4V47.js","sha256":"1be6c2f50d00f085365139e1165871bf2a97acf390dec7eec6a6ed661c9304d3"},{"path":"focused-chunks/chunk-VGUQ4V47.js.map","sha256":"69cbaa90fd2321c7aaf2a90966aa9508773068738b54fa1c0d17aaee5d5792ea"},{"path":"focused-chunks/chunk-VTOTZ5UC.js","sha256":"cecbb2922e43ca4fe73a688c1482cf38d95c56b9eab7e2bb6c769a925f01ae75"},{"path":"focused-chunks/chunk-VTOTZ5UC.js.map","sha256":"a4a3bdf8029a940d65b72c2df55dcf17109229ab98850460e2679adf4a0164cb"},{"path":"focused-chunks/chunk-WFVZ7GGR.js","sha256":"329c32010b7795e6f327306f9fe15fef10a8a669070c212c6ce2d6ffcdc8487e"},{"path":"focused-chunks/chunk-WFVZ7GGR.js.map","sha256":"37a4a040b53d3967014e24c06713f3bb7f10ae8b6e2e67d36a4ea32b113769b8"},{"path":"focused-chunks/chunk-ZJF6ZA7B.js","sha256":"502c045bbcd5efc1e19af8dd216d73a2efd48536f1e53eec1e39fb2968878e97"},{"path":"focused-chunks/chunk-ZJF6ZA7B.js.map","sha256":"863073db0139bc67f4fdfcdd83f80ac9fff85f85127388cfd6c87807074699f2"},{"path":"focused-chunks/chunk-ZOGEQFGH.js","sha256":"461f7a4860baa7d53cb38129412cabf537b6da3bfdfc8effcef77cccda24ea2f"},{"path":"focused-chunks/chunk-ZOGEQFGH.js.map","sha256":"96c934e9b969c069680854f69c966091a270b883e97daf8d76c7e7930d57ef31"},{"path":"focused-chunks/context-budget-recovery-5MKOCGY5.js","sha256":"1f103ba5015f9f0dabbb93e2fa2cd59078036e68b9b1f3da2bd265025dbd44f1"},{"path":"focused-chunks/context-budget-recovery-5MKOCGY5.js.map","sha256":"3e209028283d24aafcd47b35e66acb6297ef80f0f13f6bf0e7e393a9f15d4317"},{"path":"focused-chunks/indexed-receipt-blobs-7XGVHYAO.js","sha256":"dcfeb93e2ae577f5dd834ff0b159b39faa05ba516cd1364f734206dcaf818860"},{"path":"focused-chunks/indexed-receipt-blobs-7XGVHYAO.js.map","sha256":"82230162c7538ff401bdb67dd28a671f3bb6c8e0c874fb375bd3f303db03e1cc"},{"path":"focused-chunks/item-revision-IF7E7BVY.js","sha256":"c32374fedf94ac0bb7545e326a609b708ef689ac2bb2042a7a699ed1b9eb1167"},{"path":"focused-chunks/item-revision-IF7E7BVY.js.map","sha256":"ed562b0bba7ee7214e56ac7f728054b3496bec4597c94a4eb7b4179e6f5cb1c9"},{"path":"focused-chunks/item-transaction-5TFWIOXI.js","sha256":"59f339bab9613bbf8756d436a6fb2c4b526ed9fc1138fcd3d0b8219a7023ede1"},{"path":"focused-chunks/item-transaction-5TFWIOXI.js.map","sha256":"ce3d7bdb82f993beb8748ee7e066a4ccb236ac7bdc97f2d43a913bcbc36d1024"},{"path":"focused-chunks/mutation-admission-KELM46JF.js","sha256":"5640dd560e939ea4e199496e26c7ddf509f1b2b6bb8e81148f8f12ad8bfe581f"},{"path":"focused-chunks/mutation-admission-KELM46JF.js.map","sha256":"da67cac3159b4a3ab6cfd23b3066ef3ea1bd5f30fe2509a24f2e0d2d2e7422e8"},{"path":"focused-chunks/settlement-hook-H56537UV.js","sha256":"1cf7677ed2a857da74d12353bed01a3aa5d5b99c94368f191424325873587c18"},{"path":"focused-chunks/settlement-hook-H56537UV.js.map","sha256":"d49b55f7df2dff3c6287f163f6a2bb801dca8caf522412c0b328eb9f74be5c7f"},{"path":"focused-chunks/stage-UAKMQTCI.js","sha256":"9f3a28a6dd5974da896c3f6856eaad2bb5ff233d0dfaaf65b096bdfbc4542003"},{"path":"focused-chunks/stage-UAKMQTCI.js.map","sha256":"459992e40035455aa340d185dfdd852ced4f004910301d0ed888bf8266c45535"},{"path":"main.js","sha256":"dcce95c00e9e9d231e02e773aacaa9e29d72de5baa4cefdd6dfced5a85f5234f"},{"path":"main.js.map","sha256":"1a3a69ca0119ea7da52a88ae4c36ed9584db62effa666619cc84ff7d7a771528"},{"path":"sdk-authoring.js","sha256":"a5b2b5f8143b7ac0392f9683b349fa8e4df0494c3a11fe56955674a627aa6429"},{"path":"sdk-authoring.js.map","sha256":"d99e513766bc491e2f9b8826f98ca5ab17cd80503440f1bffec1454533257e2c"},{"path":"sdk-contracts.js","sha256":"7e0aa755fe0b0c7b818a6aab42f6f61986b45ba6fcbc31663ee22b2f48fceedb"},{"path":"sdk-contracts.js.map","sha256":"73ba34a977695b31a454119294a2afaaff58790761af892f09ed0e60c2f0561a"},{"path":"sdk-core.js","sha256":"aed6cfbe3d5fc4f7790c29980d841b893b2516172ae90aa091702f4645ea5d38"},{"path":"sdk-core.js.map","sha256":"ed562b0bba7ee7214e56ac7f728054b3496bec4597c94a4eb7b4179e6f5cb1c9"},{"path":"sdk-governance.js","sha256":"82c579c3e53e61348c4703338363cbfc42dbbd2dc667f57b7500c0329a8dcace"},{"path":"sdk-governance.js.map","sha256":"6daac36d5524ac41ebe68f6403017b0c7ab206a1fdbbcbba37dd56bce43849f3"},{"path":"sdk-graph.js","sha256":"290b44bb585a087451240303dafa4a0223ade225c946ce1685c33cd4523a0616"},{"path":"sdk-graph.js.map","sha256":"e5a85af71ce564c10ed21e6feded88f81b39ee0147cb981f207ac095179ae9cf"},{"path":"sdk-merge.js","sha256":"cc5c9e5fa53836ae3731d9e5a4cbcb7a6bad3b799ac407ace652f287cfd1840d"},{"path":"sdk-merge.js.map","sha256":"28c0482e6151f4233a203c086afb08dc5a82d871754a317432844667a241e311"},{"path":"sdk-query.js","sha256":"626920042006c01ce278691f10f55a6d0b1a574340c2190c83a314afd14cb800"},{"path":"sdk-query.js.map","sha256":"29a379fafc726bbfb3d6a3404bc03acb7607cc32726bcd7ed6fe3a8cdc733520"},{"path":"sdk-runtime.js","sha256":"882fa03b07c90670958c7d8e5748f3d9d427db80b1ed7d3657736c1a70d3fd29"},{"path":"sdk-runtime.js.map","sha256":"ed562b0bba7ee7214e56ac7f728054b3496bec4597c94a4eb7b4179e6f5cb1c9"},{"path":"sdk-testing.js","sha256":"22ff65a85b3ac6a6c8e5a0e4a7d4e645a633993148b4d46cd890a06ae1cafdca"},{"path":"sdk-testing.js.map","sha256":"ed562b0bba7ee7214e56ac7f728054b3496bec4597c94a4eb7b4179e6f5cb1c9"},{"path":"sdk.js","sha256":"a09153c8872df209d36483c59c24fdf69318630c65d2122bfeae585cdf83342f"},{"path":"sdk.js.map","sha256":"ee49d5233528d921ce7c85d95fd52c51bcc2a42c535aee929d582d5e6df6f294"}]}
|
|
1
|
+
{"schema_version":1,"generation":"54c0ef40f375b2d27e40d0c37df5c2a1ad5b3f7a8af0ce57e2789c292f611c4f","files":[{"path":"chunks/chunk-25BUKX4W.js","sha256":"17c423fb6b7de15fd302b5937223b806eca8155c5445a99dab469ebc9fb83bab"},{"path":"chunks/chunk-25BUKX4W.js.map","sha256":"e6751e2d42b1cb31cd4796ce1c3f572c489e55ebf8cf8c549fc8ec47caf9afbc"},{"path":"chunks/chunk-27FG6ROB.js","sha256":"b7a6b688d54a0627b69e43530e67d81169e8059b64792bb194cdb2ca2efafbab"},{"path":"chunks/chunk-27FG6ROB.js.map","sha256":"cb3599b08e31263e24a58443321712f9de9edfb61280744beb7beca07028cdaa"},{"path":"chunks/chunk-547OEGDR.js","sha256":"2b9db7d01b2b3470942cf174bb8f3779c387516ef3d0d9f254e3342e314d295a"},{"path":"chunks/chunk-547OEGDR.js.map","sha256":"2f88932107b68cc3a9ef3ef1b1a633522fec536f21b6c938200a1d4dd6e0e8ff"},{"path":"chunks/chunk-5TGFB34A.js","sha256":"629800ad8244852612cc2a1c4ceeeb052e940677f6e91cbc163e117d5fa0fc14"},{"path":"chunks/chunk-5TGFB34A.js.map","sha256":"fd1765929df526e5d7a2a0bd78c7a29c990cc79e70cd18810136cbca50ce975a"},{"path":"chunks/chunk-65SBMIK6.js","sha256":"5654b9628f651407c2c05a10a6f11294054fd717c34df17aa322114b2112e0ca"},{"path":"chunks/chunk-65SBMIK6.js.map","sha256":"3ef6aaaab9d223b065b678a7eb29cc8fb1a241156372d5809b00812dd5a84afb"},{"path":"chunks/chunk-AXTUB74T.js","sha256":"8e5d9fc649e4de7c3b2821818dd2be7c6ed8cc92846766e517950590ca38a7c1"},{"path":"chunks/chunk-AXTUB74T.js.map","sha256":"a293fc0d94c56a7f11857fdc95a5355cf5ceca2329c9a17dd21416824f947b0b"},{"path":"chunks/chunk-BHH65KLL.js","sha256":"924d69210c3c543375e5be080d85cd0d10da7eab8636a37e9c20f49a7ac04131"},{"path":"chunks/chunk-BHH65KLL.js.map","sha256":"504741aafd383ea493136c423efe05de384ed30da8f1815a78e6cac625c6ef00"},{"path":"chunks/chunk-C7M54YV6.js","sha256":"73c964a9ca416cd1f8dedee1d59381b3c7302e5ddd696926e6e1db81e6d82627"},{"path":"chunks/chunk-C7M54YV6.js.map","sha256":"8750913c04de7153f9e12457f3372426906be16c33c5d0fc22daf9f9894f8448"},{"path":"chunks/chunk-DEZPZOQ7.js","sha256":"ef11ddab9ecc9533cac75ccc8ca41058a59382dfbe3262033fa21c7264d73b0d"},{"path":"chunks/chunk-DEZPZOQ7.js.map","sha256":"ed562b0bba7ee7214e56ac7f728054b3496bec4597c94a4eb7b4179e6f5cb1c9"},{"path":"chunks/chunk-DMWL3K4A.js","sha256":"b63fddce7bf7f69d482b2d53e1517f59ee3d38893467248ccb0786eabb8b33b6"},{"path":"chunks/chunk-DMWL3K4A.js.map","sha256":"f1e584b9354ad751e18b64403de634a8803d8f96812588bca638cc8e583dda45"},{"path":"chunks/chunk-DVN7CD5B.js","sha256":"e352b42b30ce3e6ed5583179a83bfb9c76c747dd73b16b8d42c43e6d4a164192"},{"path":"chunks/chunk-DVN7CD5B.js.map","sha256":"367f1c2c7c785d2c722224f7148e6e5bd0259c2e9749173bc7952289a895d1b6"},{"path":"chunks/chunk-DZ7CWUVM.js","sha256":"5bfc9a95d0abd1894b97f27cf062893936efa18acbd7668949be0817230e0675"},{"path":"chunks/chunk-DZ7CWUVM.js.map","sha256":"7031b64b2fb737d26106e4aac790a2b15c943ad1f7996e621c91ce07b9691a10"},{"path":"chunks/chunk-EXO4PM5J.js","sha256":"d29176a0aa514883722e05c8e412f499b2f4451151b082d60bb0c0d1dd680cdd"},{"path":"chunks/chunk-EXO4PM5J.js.map","sha256":"f79025cb1e315e53512a3b14885ec5858fb12968ce4a0d163fe52fd03439839a"},{"path":"chunks/chunk-FRCNYOTG.js","sha256":"1dc2ed3c173a97c2279a2d4ef766a5fd3c61e506a7932bc74ce5fe088a901cca"},{"path":"chunks/chunk-FRCNYOTG.js.map","sha256":"d925a922861335acd467b1ce4240f23c0302c088a2148aec81e7dff58c2579b8"},{"path":"chunks/chunk-HXECILIE.js","sha256":"4d487c6ef7210cbdf199a9e60a518a4ab5f16da97d532ea500008aa916955199"},{"path":"chunks/chunk-HXECILIE.js.map","sha256":"e684b4bca2f84304c58de5a1180fa10ceaa2ec9552cc190a4c54609e4be582b8"},{"path":"chunks/chunk-IB7UB5TE.js","sha256":"158940f663a676247075395b646afbce49c7b88138d677699bdabf9add9776df"},{"path":"chunks/chunk-IB7UB5TE.js.map","sha256":"ed562b0bba7ee7214e56ac7f728054b3496bec4597c94a4eb7b4179e6f5cb1c9"},{"path":"chunks/chunk-IDFRGH4X.js","sha256":"40124aca8f9fe91742e8469a71bdc05717b85a46310e1c51ca9b77cffebb4ecd"},{"path":"chunks/chunk-IDFRGH4X.js.map","sha256":"f973eccfa0678d073460746c274936115e5db3f8c8314ec25c63cb37df719b5e"},{"path":"chunks/chunk-JSTBYDLL.js","sha256":"c93f25994b2025eda2392d57c839c4ad8c707dfdd76cdfcd9364d0f05566e661"},{"path":"chunks/chunk-JSTBYDLL.js.map","sha256":"9f46ba52257e0016fe485dd8c5b74874b7026b13cdb192bb5f008cb3424948bf"},{"path":"chunks/chunk-MELSYAFE.js","sha256":"e88cabf4333e26a36f5c447599b674a8e0619ad10f448b482b4499b7c888b5fa"},{"path":"chunks/chunk-MELSYAFE.js.map","sha256":"bafc93dec44e3c58ae62d340dbac865c2d3d87239fef7e8093ddb6b9ac8ef00b"},{"path":"chunks/chunk-O4ZLEN4T.js","sha256":"c840a800fd85b0a9078b28e5cbc51b048ca15f14179bf5865e6840105093a8a6"},{"path":"chunks/chunk-O4ZLEN4T.js.map","sha256":"ac003ffbf6bca2076ea011786e029b165d5626153de1f2ad73053bbf3517b243"},{"path":"chunks/chunk-OTM6PXZQ.js","sha256":"0d0e17c3bbdadcaf42f33c3eb53f65a16b4da0464994e406e565af2f369a74d4"},{"path":"chunks/chunk-OTM6PXZQ.js.map","sha256":"6891e9179042addffd88d12c8e1e02a0598c5b577cc5857271cf485b72077c46"},{"path":"chunks/chunk-PC5DGK3C.js","sha256":"6533db2da751e3bd1816789aa1a53a512d397f8963c84426736bc35869b0bcd9"},{"path":"chunks/chunk-PC5DGK3C.js.map","sha256":"deb4bbfb297c913646620f22e4c12925e689d7af6d39d07955c0526f712b82e9"},{"path":"chunks/chunk-PF3V443A.js","sha256":"8eb4fb9d6243204f1e2990ba0c9a6ab62df00579e56d38abe2be57d6de86939a"},{"path":"chunks/chunk-PF3V443A.js.map","sha256":"4a5ca6e764c15fb0d450a503ccc2a44ed842607387bdd8736d4173063f5da2be"},{"path":"chunks/chunk-RSAN2YUU.js","sha256":"6d761ffb0fd8a6f76a78205e18eb54dc93cd51bfc24e17162a4731a2351399f2"},{"path":"chunks/chunk-RSAN2YUU.js.map","sha256":"f295630c5dc63081c1891c29b55fd197bac98d6452e29c09eaf97fdbc35554a0"},{"path":"chunks/chunk-SPPHDVZE.js","sha256":"ba82130f93656299c39dc713ba1f03fc47bec7a39fac6594c72e10ba398f04d3"},{"path":"chunks/chunk-SPPHDVZE.js.map","sha256":"3a5501d6ab3f711b0aaa21285ea5fba97feaf79460619089e0e6010785e3ad7e"},{"path":"chunks/chunk-U2HVJVA5.js","sha256":"25c5b1fc8ddd3cb64d042865fee2406008b86e1279a02b0c2f110827dc79fce0"},{"path":"chunks/chunk-U2HVJVA5.js.map","sha256":"a825a13fa2fffd1a1fb2f09aedaadbfde813be6be0570c74adefa421f37f03dd"},{"path":"chunks/chunk-UJMQP2HP.js","sha256":"33d8da387462b3150d10560acf8d13d63ab2fbb654f247cd777e7cc45c5ab19c"},{"path":"chunks/chunk-UJMQP2HP.js.map","sha256":"26c92ca1dcf896743cae73cdf47c47a8133e4e9cff4590b313c02d7094087305"},{"path":"chunks/chunk-V2OAXGHK.js","sha256":"9b1b4a4053d5ccac0d21b7a48d4045683913f33938d3904b286520573ce0fffa"},{"path":"chunks/chunk-V2OAXGHK.js.map","sha256":"65a6798e58abe05dd23155d9913808ddd605f59dafe8011040ad766caad3f7b8"},{"path":"chunks/chunk-VERRDW3Q.js","sha256":"a841a8803cb592b4155baae188974891939d38c507ff76a70d7f38ccee3e067b"},{"path":"chunks/chunk-VERRDW3Q.js.map","sha256":"28a454c63b7b0f56502f9f039a994cc8d71e668e5430039fa7e666fc328d9baf"},{"path":"chunks/chunk-VS565KBX.js","sha256":"f66d92e0d59add33123dc44938a2cf76a749b262d5c044d8bbccce24861f9351"},{"path":"chunks/chunk-VS565KBX.js.map","sha256":"562c753aa39adbfdbeefaf390e68fdadd1fe986bcb6e82f9355315e8d6a16ec9"},{"path":"chunks/chunk-XAWE4EAK.js","sha256":"9ec1c5760661739327050e0bfc643cdfb827f8f501fe1a57c28be01371f89128"},{"path":"chunks/chunk-XAWE4EAK.js.map","sha256":"ed562b0bba7ee7214e56ac7f728054b3496bec4597c94a4eb7b4179e6f5cb1c9"},{"path":"chunks/context-budget-recovery-L2WP5S26.js","sha256":"94308a0c40cb90380fb5f3c00c105b04df651eb699452e4a1eff4392936bad3e"},{"path":"chunks/context-budget-recovery-L2WP5S26.js.map","sha256":"bdec4d79334c795b8b4fdcf03f3820adac1f8a3a220767d3cf0de29c4d3a79e2"},{"path":"chunks/indexed-receipt-blobs-I6RQGD6Y.js","sha256":"6a9e5f49b8c0212d359d9a148334403e1ece480b71fe9056780a686ca49a4e06"},{"path":"chunks/indexed-receipt-blobs-I6RQGD6Y.js.map","sha256":"cd38ac9e4b9beec9644d2629c41c46fef0179d7fcd36a1df7cafd1cdf5f22489"},{"path":"chunks/item-revision-VGIHIWZM.js","sha256":"b3df14e1ef964026ee41591e9f1764d91fe29ad61966a91dbbb2a6fae827cf51"},{"path":"chunks/item-revision-VGIHIWZM.js.map","sha256":"ed562b0bba7ee7214e56ac7f728054b3496bec4597c94a4eb7b4179e6f5cb1c9"},{"path":"chunks/item-transaction-6OB6BGTD.js","sha256":"f7cebd74f265fcbbcca0838f853091c0f44aeef60da55c1b02f0e4c2ad04b660"},{"path":"chunks/item-transaction-6OB6BGTD.js.map","sha256":"ed562b0bba7ee7214e56ac7f728054b3496bec4597c94a4eb7b4179e6f5cb1c9"},{"path":"chunks/mutation-admission-LL6SGQYU.js","sha256":"cb3663f0e3a2cda263b135d0d33c8436106cb95c160b9903cf0acaa64c37ae0a"},{"path":"chunks/mutation-admission-LL6SGQYU.js.map","sha256":"442edc3e0ad6c8e614c4729e5af935f14e79902c0af0c9779e3fe68fbc7248ea"},{"path":"chunks/register-list-query-MCNOV6ML.js","sha256":"eee30ae9d8969a7879b041c77f0ad132d059aa7f3f05930e0093138504d768bb"},{"path":"chunks/register-list-query-MCNOV6ML.js.map","sha256":"f98d8f279badbacfe3eaf4f7567acb7b7cb985ac13a0f55a8c4641dd15cd5910"},{"path":"chunks/register-mutation-KYXLYHOK.js","sha256":"ad1336f972524b98de30a45453bf997156f64a4e4843b1fdc1f99baabc04c4bd"},{"path":"chunks/register-mutation-KYXLYHOK.js.map","sha256":"45c932d69f1a3e4684b6497282d32358243c50f9fbd4e1d09141eed3b54eb102"},{"path":"chunks/register-operations-6RQF6IAE.js","sha256":"2ddc15c3d0ecc12f007a7a85409f185b0e3f8811e7eb4d1847419fc7911640a4"},{"path":"chunks/register-operations-6RQF6IAE.js.map","sha256":"ca89410b4b891bb8f0a6305def8b647b666db5fe8276f5c3e1e74ee3cb2bb6ee"},{"path":"chunks/register-setup-XGPOFFD3.js","sha256":"fd6867e2cf965a73eef21d0a43e316298942e3495f300ee4b2b2af12789f6108"},{"path":"chunks/register-setup-XGPOFFD3.js.map","sha256":"f05b4d69992dc1793327db69bfc5c7e5ad8090ffbba980fc38f63121a53f643b"},{"path":"chunks/settlement-hook-JHXLUBEN.js","sha256":"60574b6f2502b42ca6797b76a0a41d2ebfe8f4cd1087d19c9648ad7ed01cbf46"},{"path":"chunks/settlement-hook-JHXLUBEN.js.map","sha256":"6e0577b035532efe4968d1a3bbaf491e0d790074b735ff94448143e5a700c747"},{"path":"chunks/stage-ZS7WNUD4.js","sha256":"5fec54a6aeb1bb79cd8f2d0fc90792be4427ac84e0a4ec1decaea7d867bf4084"},{"path":"chunks/stage-ZS7WNUD4.js.map","sha256":"1cfaef9f0b1890e2dfed29ad9121a25281e2f074e8183edc9163c214e4b00437"},{"path":"focused-chunks/chunk-2A4JCFMI.js","sha256":"4a9ecbebeaea8bc1bbb4347e8127c069c82b3b636bbbc5c54319c6fc1d67bac7"},{"path":"focused-chunks/chunk-2A4JCFMI.js.map","sha256":"fbe76c47a1c5f963993636b7c6b2aadf39d926145d50094fa4d68510bb21f099"},{"path":"focused-chunks/chunk-2T6MQ7NP.js","sha256":"33d063c0d519b6d65b36bdb842378da2f8914f20bfe8ccb2692fed9a25bd54e7"},{"path":"focused-chunks/chunk-2T6MQ7NP.js.map","sha256":"8546cc0048c0c43165a20ef22f64678f4050ab704fd5f24106f87919b276c755"},{"path":"focused-chunks/chunk-32QYILXW.js","sha256":"07bcf28633013a267b9ed4f536af78e64f6f8ba4e88b5202b97862913d8428eb"},{"path":"focused-chunks/chunk-32QYILXW.js.map","sha256":"3b6f954f79253214ec0949e8c8a12cb68bf0cd029c7697afb765bbc812e83b77"},{"path":"focused-chunks/chunk-3SUKWYR2.js","sha256":"be84b4c0c5e8ccdfef9fb60b803541877a03e363a934f151f54d2db79e3dee89"},{"path":"focused-chunks/chunk-3SUKWYR2.js.map","sha256":"f169910643c9722f7af2f7c82ad2fc13744fc195f7e4f7e80847906b8b574906"},{"path":"focused-chunks/chunk-4WOF3Q6R.js","sha256":"0656a531dd00dca89e4e6b3e58b7423ea20c584ece4c3480c9dc0becb9ea5e5d"},{"path":"focused-chunks/chunk-4WOF3Q6R.js.map","sha256":"cd0e98dcb3e0af5b843471965b4cbba9dac8deeca052587327f3f00c0d7b93d0"},{"path":"focused-chunks/chunk-5IQPFV4Y.js","sha256":"d424a84b5afe96294faa9e6e2bfc5f64cabf09c19b79586f2a7f334bb863d522"},{"path":"focused-chunks/chunk-5IQPFV4Y.js.map","sha256":"bfe324e86198585dd63d88606d482f8cc71cf5416ed34e77859689715af25b89"},{"path":"focused-chunks/chunk-6C7NBJ7A.js","sha256":"d3cff065541b3dd2ae81d446081dbb5457148db039018be06732aaa358b9da58"},{"path":"focused-chunks/chunk-6C7NBJ7A.js.map","sha256":"6b01b8409eb1b5b7f2c0e382c9f9888811c4b1798a898ace781885f74e1c62e4"},{"path":"focused-chunks/chunk-7KNF6RCV.js","sha256":"6c587991d11f0261984f7dc5ba5e94aa427a87dc235ba98efe4466d9bc32a553"},{"path":"focused-chunks/chunk-7KNF6RCV.js.map","sha256":"9ca435c648b846a712a78b78e0662989dd0ca012f7bd1f22af9052269d75eff4"},{"path":"focused-chunks/chunk-C3O6JJPO.js","sha256":"1f495890523f3550ee1050149240e68e386d729f0278be125ee51c337c2952c4"},{"path":"focused-chunks/chunk-C3O6JJPO.js.map","sha256":"7222eba51724ce2de54f854d9e01ca89dd73272e6407cdd8b9211be1cf9675c1"},{"path":"focused-chunks/chunk-EAYRYXA6.js","sha256":"541560c55488c4f4486311c98ea6ba7cce51fb29a4bf8bcb8420aaccd8780b10"},{"path":"focused-chunks/chunk-EAYRYXA6.js.map","sha256":"2b3a95cd41fd97a89ef351323002637cdaeb093c80939a0278d05f9efd9d2118"},{"path":"focused-chunks/chunk-EGN2HFRU.js","sha256":"60ca3c4b0c5584d8866c75892f5c5224db858ef11328a0d99265b2c94eb3815d"},{"path":"focused-chunks/chunk-EGN2HFRU.js.map","sha256":"3a5501d6ab3f711b0aaa21285ea5fba97feaf79460619089e0e6010785e3ad7e"},{"path":"focused-chunks/chunk-EH7JKGDH.js","sha256":"bf0fb5dd35314653623a5a6a02861cbfaaa25d111bf70441ff2536223908a685"},{"path":"focused-chunks/chunk-EH7JKGDH.js.map","sha256":"e27692e5f33d7d892f44ef51f07249e209463d941ba29599482b794019759709"},{"path":"focused-chunks/chunk-EXCVUBAE.js","sha256":"006d1012142bd97bc0adc206c86509b8bc4f2b6c23f177060d20b263706cc5dc"},{"path":"focused-chunks/chunk-EXCVUBAE.js.map","sha256":"863073db0139bc67f4fdfcdd83f80ac9fff85f85127388cfd6c87807074699f2"},{"path":"focused-chunks/chunk-FNLOLNPQ.js","sha256":"0dc5f216cf3f163049c00073864dc9491f0fd2dac95368b51c3e50de3ce35896"},{"path":"focused-chunks/chunk-FNLOLNPQ.js.map","sha256":"a4eb80021e5972a23bb79e9ff6da79ad628414c8ef97d4a556eba76b7afd5b90"},{"path":"focused-chunks/chunk-FOA7XKWP.js","sha256":"3e57188628de10dafcc17048ef3dcc5b9061c29ff4f34620a4d62de45ee606fa"},{"path":"focused-chunks/chunk-FOA7XKWP.js.map","sha256":"562c753aa39adbfdbeefaf390e68fdadd1fe986bcb6e82f9355315e8d6a16ec9"},{"path":"focused-chunks/chunk-G6ERMFJ5.js","sha256":"2b65658ea244174c234a3190965d9bdc6fec1f625cf7d34d019ee53ac89fdd52"},{"path":"focused-chunks/chunk-G6ERMFJ5.js.map","sha256":"22c39dcfda645869aaf1242d3287de74ff3e9b6186967a7cd17e9aafc7e26822"},{"path":"focused-chunks/chunk-GHQVM6K6.js","sha256":"79ea412a6b8b7c176f75f19aaaabf6fbbfbc826c4362254c90183003f4b8f1d6"},{"path":"focused-chunks/chunk-GHQVM6K6.js.map","sha256":"ed562b0bba7ee7214e56ac7f728054b3496bec4597c94a4eb7b4179e6f5cb1c9"},{"path":"focused-chunks/chunk-HRLGC3P7.js","sha256":"7cbc05d2d54eba6741ff0b620f1055a2c18c8e59c373870e0dc2c3d8e22cfffc"},{"path":"focused-chunks/chunk-HRLGC3P7.js.map","sha256":"4f2b8dc2691d95630fea75c1370779e3e535c166c515b28c3fc29d99ee7d4f2d"},{"path":"focused-chunks/chunk-I5LGPUWH.js","sha256":"f2289c3bdd0121277e0e06133743ab4633ccb4384d70ba302df15b53ce1be45d"},{"path":"focused-chunks/chunk-I5LGPUWH.js.map","sha256":"5372543aa2680b9ab13778a97bd74f239974c09fdbc238233d00006a6c16021a"},{"path":"focused-chunks/chunk-I7A5VP5E.js","sha256":"b19cf35a2700dbcee1675d2baf2be507236ac06794f1a5fdce5e67023aad8010"},{"path":"focused-chunks/chunk-I7A5VP5E.js.map","sha256":"372b5a9b6c325f70c705590c458c1718b657049494182d536929b6e6540eab93"},{"path":"focused-chunks/chunk-IDAYTYNN.js","sha256":"4cf4b10a5600acff248e6fa45a40bfb028cce8d4def56901dcccca778f9e8058"},{"path":"focused-chunks/chunk-IDAYTYNN.js.map","sha256":"f295630c5dc63081c1891c29b55fd197bac98d6452e29c09eaf97fdbc35554a0"},{"path":"focused-chunks/chunk-JHC3X43E.js","sha256":"25fca222b0e1623200a88afe4512cd6ef96f5828fc4a94717e271a281b34b6ee"},{"path":"focused-chunks/chunk-JHC3X43E.js.map","sha256":"8b883458bd932973390e136ac0619dd520ae7f08f36bb0d058e6be72d90dcd0c"},{"path":"focused-chunks/chunk-MKYNDWT3.js","sha256":"b1334604a2d40e651afa002e9ec19ccce775835ca121c8332ccc624ac6585258"},{"path":"focused-chunks/chunk-MKYNDWT3.js.map","sha256":"a4a3bdf8029a940d65b72c2df55dcf17109229ab98850460e2679adf4a0164cb"},{"path":"focused-chunks/chunk-RDTHL44U.js","sha256":"16147868b709be96766142aa62373f10866c012cb23e6607f01a12a3282793eb"},{"path":"focused-chunks/chunk-RDTHL44U.js.map","sha256":"37a4a040b53d3967014e24c06713f3bb7f10ae8b6e2e67d36a4ea32b113769b8"},{"path":"focused-chunks/chunk-SVOOGGAK.js","sha256":"cf84553a8001feee7147d6941274dc00cf8644ded0da1e4b611b542c02f6dcb5"},{"path":"focused-chunks/chunk-SVOOGGAK.js.map","sha256":"c6941ba9e7060fcb63add9bb1b246052f16f530b85845320f23076a4db57f341"},{"path":"focused-chunks/chunk-TA4EGVE6.js","sha256":"6a80b3dc576d371ffb6307cdd42409ee00269e02002b718e50a1f1bc803a4b62"},{"path":"focused-chunks/chunk-TA4EGVE6.js.map","sha256":"26caacaf2e6171056f04695cb09bdf2f914364ad5fbf957b1f20a58e94579dde"},{"path":"focused-chunks/chunk-UCCLV5GJ.js","sha256":"2fc738efbe5a5e512a2d07911d58f61d6718b06014f3d3231bf1ae82fb51e63b"},{"path":"focused-chunks/chunk-UCCLV5GJ.js.map","sha256":"8cceb2f21b2b0df0e9645fb6c151c8ec033af2023f755ed788c75efcf58fee54"},{"path":"focused-chunks/chunk-W3RWCLEU.js","sha256":"c7d37d9561288cb209a21feec8d23ffe7ea479f82cacc1a78d22c173dd1d8576"},{"path":"focused-chunks/chunk-W3RWCLEU.js.map","sha256":"2f513302643ad4da77cc42f983b240931cf5aa55c93e84f0049e004e3689c0ba"},{"path":"focused-chunks/chunk-W57DSFSU.js","sha256":"dcba01bc5d26639caf762083abd20f430238aaed223dddcd5935b5f92a33c6d4"},{"path":"focused-chunks/chunk-W57DSFSU.js.map","sha256":"8a6db1fbf84b1717a1bf8b07ce199b073dc05d3d0f271c0336df28e7373f354a"},{"path":"focused-chunks/chunk-YNYO7PMT.js","sha256":"67d9a5ef37c792351f9d813905f1b3f56803a3189e952e77e4a23a9e25aadd9c"},{"path":"focused-chunks/chunk-YNYO7PMT.js.map","sha256":"c3681ae4357e9a0ebbf25a86ed94ca0ef0bf6dea3532d5eb5707173f5708c41d"},{"path":"focused-chunks/context-budget-recovery-5MKOCGY5.js","sha256":"1f103ba5015f9f0dabbb93e2fa2cd59078036e68b9b1f3da2bd265025dbd44f1"},{"path":"focused-chunks/context-budget-recovery-5MKOCGY5.js.map","sha256":"3e209028283d24aafcd47b35e66acb6297ef80f0f13f6bf0e7e393a9f15d4317"},{"path":"focused-chunks/indexed-receipt-blobs-7XGVHYAO.js","sha256":"dcfeb93e2ae577f5dd834ff0b159b39faa05ba516cd1364f734206dcaf818860"},{"path":"focused-chunks/indexed-receipt-blobs-7XGVHYAO.js.map","sha256":"82230162c7538ff401bdb67dd28a671f3bb6c8e0c874fb375bd3f303db03e1cc"},{"path":"focused-chunks/item-revision-7J7WSCPC.js","sha256":"c0858d90be77dccbbcfaedd1279a797cd048f15a9987894a5a09b23e7d7e8769"},{"path":"focused-chunks/item-revision-7J7WSCPC.js.map","sha256":"ed562b0bba7ee7214e56ac7f728054b3496bec4597c94a4eb7b4179e6f5cb1c9"},{"path":"focused-chunks/item-transaction-F5YMCPRB.js","sha256":"5a68b0f80d8d8d9f339931e17d57f23ec14c6ee8c0a61b87e792823df993c448"},{"path":"focused-chunks/item-transaction-F5YMCPRB.js.map","sha256":"ce3d7bdb82f993beb8748ee7e066a4ccb236ac7bdc97f2d43a913bcbc36d1024"},{"path":"focused-chunks/mutation-admission-2NRQEAOG.js","sha256":"224cd343826656c069501454ca95f7a70bd927052428c1def43d008e3a5299ef"},{"path":"focused-chunks/mutation-admission-2NRQEAOG.js.map","sha256":"da67cac3159b4a3ab6cfd23b3066ef3ea1bd5f30fe2509a24f2e0d2d2e7422e8"},{"path":"focused-chunks/settlement-hook-H56537UV.js","sha256":"1cf7677ed2a857da74d12353bed01a3aa5d5b99c94368f191424325873587c18"},{"path":"focused-chunks/settlement-hook-H56537UV.js.map","sha256":"d49b55f7df2dff3c6287f163f6a2bb801dca8caf522412c0b328eb9f74be5c7f"},{"path":"focused-chunks/stage-2KVCKOGC.js","sha256":"bb1ebe987bd3dd02b69f2c87ea7a2505528903511de83426295cfa3d29661ae9"},{"path":"focused-chunks/stage-2KVCKOGC.js.map","sha256":"459992e40035455aa340d185dfdd852ced4f004910301d0ed888bf8266c45535"},{"path":"main.js","sha256":"f21744261e335d3eff7a5f74a8659d4c51c2a325edec7aca17a16fab26264e0e"},{"path":"main.js.map","sha256":"1a3a69ca0119ea7da52a88ae4c36ed9584db62effa666619cc84ff7d7a771528"},{"path":"sdk-authoring.js","sha256":"ef3eb2bcac60aff831bb6b048511928ed8f034be5d18f3cb2b9e95c5dc44a888"},{"path":"sdk-authoring.js.map","sha256":"d99e513766bc491e2f9b8826f98ca5ab17cd80503440f1bffec1454533257e2c"},{"path":"sdk-contracts.js","sha256":"d869556f61dff75ff97e1a7c5e4e0b80ffe5678c683407d814ce26130d5be616"},{"path":"sdk-contracts.js.map","sha256":"6fa9badbc2ab7619166cb70da5dd565fbac803c57c14d4f7b5b3e5d28ff0ede0"},{"path":"sdk-core.js","sha256":"1254118f6b98fdc4d604980f4b91c661eb9d9f46b291f8882c0c2319a714c38c"},{"path":"sdk-core.js.map","sha256":"ed562b0bba7ee7214e56ac7f728054b3496bec4597c94a4eb7b4179e6f5cb1c9"},{"path":"sdk-governance.js","sha256":"6ed64f767d651fe01cca020acbfbbe64e3849bbc9627f89d1e84abc362e9321f"},{"path":"sdk-governance.js.map","sha256":"6daac36d5524ac41ebe68f6403017b0c7ab206a1fdbbcbba37dd56bce43849f3"},{"path":"sdk-graph.js","sha256":"9b92a768cf6f1a98cf60fdc81599d75b2da7b7b215fe048d201cebbbdf2f16ab"},{"path":"sdk-graph.js.map","sha256":"e5a85af71ce564c10ed21e6feded88f81b39ee0147cb981f207ac095179ae9cf"},{"path":"sdk-merge.js","sha256":"2e377dd92deb8f83ef1a10f6bb65611f77ef42ad2c10346dac52f3380f82df0b"},{"path":"sdk-merge.js.map","sha256":"af0a8f15e7638545251c92ac7170fb5d88d06fb59310f7b6f214dfdd2ec57422"},{"path":"sdk-query.js","sha256":"b541d208478c9e24067be299b0bacb2d1b2a8d7a89d94111d5049b00257a98ea"},{"path":"sdk-query.js.map","sha256":"29a379fafc726bbfb3d6a3404bc03acb7607cc32726bcd7ed6fe3a8cdc733520"},{"path":"sdk-runtime.js","sha256":"4376d84bbd43f6c116c63e9dd93efe010de436627f5f0e83a835b52e3d0be5fc"},{"path":"sdk-runtime.js.map","sha256":"ed562b0bba7ee7214e56ac7f728054b3496bec4597c94a4eb7b4179e6f5cb1c9"},{"path":"sdk-testing.js","sha256":"9cf1f710c6cfd7253b789ec73aca8ff99b25ab98a869eec9213cf74e033ffbf9"},{"path":"sdk-testing.js.map","sha256":"ed562b0bba7ee7214e56ac7f728054b3496bec4597c94a4eb7b4179e6f5cb1c9"},{"path":"sdk.js","sha256":"43b6eb7a22cc8a80550f1058e9cf9500b76cb77320c1d9f01e8ec072471bb156"},{"path":"sdk.js.map","sha256":"74ae597be0f151627036091210e80a6c2219ed10e1214dfe4d218066eb0c9464"}]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as ve}from"./chunk-CO7RWLCM.js";import{Cd as g,Dd as b,Gc as ge,Hb as x,Hc as ye,Ib as k,Ob as _e,ad as Ie,hb as T,ib as ce,jb as B,kb as ae,lb as de,ob as le,pb as fe,qb as ue,rb as me,sb as he,tb as pe,ub as N}from"./chunk-UFZQPKQS.js";import{Ad as ne,Be as v,Ce as w,Fa as X,Ff as oe,Ha as J,N as V,Na as Q,Ta as Z,W as Y,dj as se,fc as p,ge as ie,hb as ee,ib as te,qi as re,za as j}from"./chunk-HQINCDF6.js";import{A as u,C as l,z as W}from"./chunk-O4ZLEN4T.js";import{readdir as Ke}from"node:fs/promises";import H from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a319e7d9-e248-573b-bf1f-35217ce49fd0")}catch{}})();function D(e,t){return(t===void 0?void 0:J(e,t))?.execution_role??j[e.trim().toLowerCase()]??"agent"}var O="blocked_by",be="blocks",Le=Object.freeze([O,be]),A="no-active-blocker";function d(e){return e.trim().toLowerCase()}function E(e,t){return t?`external:${e}`:`local:${d(e)}`}function _(e){let t=new Map,n=typeof e.blocked_by=="string"?e.blocked_by.trim():"";if(n.length>0&&d(n)!==A){let i=g(n);t.set(E(n,i),i?n:d(n))}for(let i of e.dependencies??[]){let o=typeof i.id=="string"?i.id.trim():"";if(p(i.kind)===O&&o.length>0&&d(o)!==A){let r=g(o)||b(i.source_kind);t.set(E(o,r),r?o:d(o))}}return[...t.values()].sort((i,o)=>i.localeCompare(o))}function C(e){let t=new Map;for(let n of e){let i=d(n.id);i.length!==0&&t.set(i,new Set(_(n)))}for(let n of e){let i=d(n.id);if(i.length!==0)for(let o of n.dependencies??[]){let r=p(o.kind)===be&&typeof o.id=="string"?d(o.id):"";if(r.length===0||r===A)continue;let c=t.get(r)??new Set;c.add(i),t.set(r,c)}}return new Map([...t].map(([n,i])=>[n,[...i].sort((o,r)=>o.localeCompare(r))]))}function we(e,t){let n=d(e.id);return n.length>0?C(t).get(n)??_(e):_(e)}function L(e,t,n,i){let o=e,r=typeof o.id=="string"?i?.get(d(o.id))??we(o,[...t.values()]):_(e),c=new Set((e.dependencies??[]).filter(s=>p(s.kind)===O&&b(s.source_kind)&&typeof s.id=="string"&&s.id.trim().length>0).map(s=>E(s.id.trim(),!0)));return r.map(s=>{if(g(s)||c.has(E(s,!0)))return{id:s,title:null,status:null,resolved:!1,external:!0,...typeof e.updated_at=="string"?{blocked_since:e.updated_at}:{},resolver:null};let a=t.get(d(s));return a?{id:s,title:a.title,status:a.status,resolved:w(a.status,n)}:{id:s,title:null,status:null,resolved:!1}})}function M(e,t,n){return L(e,t,n)}function Me(e,t){let n=new Map(e.map(c=>[d(c.id),c])),i=C(e),o=new Set([...xe(t),...t.blocked_statuses]),r=new Set;for(let c of e){let s=v(c.status,t);o.has(s)&&(t.blocked_statuses.has(s)||L(c,n,t,i).some(a=>!a.resolved))&&r.add(d(c.id))}return r}function He(e,t,n={},i){let o=[...e.ready,...e.decisions,...e.gates];n.includeContainers===!0&&o.push(...e.containers.filter(c=>c.open_blockers.length===0&&!t.blocked_statuses.has(v(c.item.status,t))));let r={ready:[],decisions:[],gates:[]};for(let c of o){let s=D(c.item.type,i);s==="human"&&n.includeDecisions!==!0?r.decisions.push(c):s==="gate"&&n.includeGates!==!0?r.gates.push(c):r.ready.push(c)}return r}function xe(e){return e.active_statuses.size>0?e.active_statuses:new Set([e.open_status])}function Pe(e,t,n){let i=[d(e)],o=new Set;for(;i.length>0;){let r=i.pop();if(!o.has(r)){o.add(r);for(let c of t.get(r)??[]){if(!w(c.status,n))return!0;i.push(d(c.id))}}}return!1}function $e(e){let t=new Map,n=new Map,i=new Map,o=C(e);for(let r of e){t.set(d(r.id),r);let c=typeof r.parent=="string"?r.parent.trim():"";if(c.length>0){let s=d(c),a=n.get(s)??[];a.push(r),n.set(s,a)}for(let s of o.get(d(r.id))){let a=d(s),m=i.get(a)??[];m.push(r.id),i.set(a,m)}}return{itemsById:t,childrenByParent:n,blockedByReverse:i,blockerIdsByItem:o}}function Fe(e,t,n,i){let{itemsById:o,childrenByParent:r,blockedByReverse:c,blockerIdsByItem:s}=$e(t),a=new Set([...xe(n),...n.blocked_statuses]),m=new Set(t.filter(f=>!w(f.status,n)).map(f=>d(f.id))),F=[],K=[],S=[],U=[],G=[],q=0;for(let f of e){if(!a.has(v(f.status,n)))continue;q+=1;let z=L(f,o,n,s).filter(h=>!h.resolved),Ae=(c.get(d(f.id))??[]).filter(h=>m.has(d(h))).sort((h,Oe)=>h.localeCompare(Oe)),I={item:f,open_blockers:z,unblocks:Ae};if(Pe(f.id,r,n)){S.push(I);continue}let De=n.blocked_statuses.has(v(f.status,n));if(z.length===0&&!De){let h=D(f.type,i);h==="human"?U.push(I):h==="gate"?G.push(I):F.push(I)}else K.push(I)}return{ready:F,blocked:K,containers:S,decisions:U,gates:G,active_count:q,container_count:S.length}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ae1c56b3-148d-502d-9450-e807fdfab4da")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e9b7731d-e6f5-51a8-970b-462c0b728a9c")}catch{}})();function Ue(e,t){let n=new Map;for(let i of e){let o=i.external?i.id:t.get(i.id.toLowerCase())?.id??i.id;n.set(i.external?`external:${o}`:`local:${o.toLowerCase()}`,{...i,id:o})}return[...n.values()]}async function P(e,t){let n=H.basename(e),i=(await Ke(H.dirname(e)).catch(o=>{throw ge("Cannot verify the blocker's physical file identity",{exitCode:u.GENERIC_FAILURE,context:{code:"blocker_identity_read_failed",required:"Restore access to the blocker item directory, then retry the item read."},cause:o})})).filter(o=>o.toLowerCase()===n.toLowerCase()).sort((o,r)=>+(r===n)-+(o===n)||o.localeCompare(r)).map(o=>H.parse(o).name)[0];if(i===void 0)throw new l(`Blocker canonical file disappeared during identity verification: ${t}`,u.CONFLICT,{code:"item_identity_conflict",required:"Restore the canonical blocker file and validate storage integrity before retrying the item read."});return i}async function ht(e){let t=_(e.metadata);if(t.length===0)return[];let n=new Map([e.metadata.blocked_by,...(e.metadata.dependencies??[]).filter(o=>p(o.kind)==="blocked_by").map(o=>o.id)].filter(o=>typeof o=="string").map(o=>[o.trim().toLowerCase(),o.trim()])),i=new Map;for(let o of t){if(g(o)||!/^(?!\.{1,2}$)[^/\\:\0]+$/u.test(o)||e.metadata.dependencies?.some(s=>s.id.trim()===o&&p(s.kind)==="blocked_by"&&b(s.source_kind)))continue;let r=await x(e.pmRoot,n.get(o),e.settings.id_prefix,e.settings.item_format,e.typeToFolder);if(r===null)continue;let c=await k(r,{schema:e.settings.schema});if(r.id=await P(r.itemPath,r.id),c.document.metadata.id!==r.id)throw new l(`Blocker identity differs from its canonical file: ${r.id}`,u.CONFLICT,{code:"item_identity_conflict",required:"Restore the canonical blocker identity and validate storage integrity before retrying the item read."});i.set(o.toLowerCase(),c.document.metadata)}return Ue(M({blocked_by:e.metadata.blocked_by,dependencies:e.metadata.dependencies,updated_at:e.metadata.updated_at},i,ie(e.settings.schema)),i)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="222cbba7-e2df-5afb-8d75-14f9f99b3bd2")}catch{}})();var Ee="item_revision_conflict",Ge=10,Ce=/^[0-9a-f]{64}$/u;function y(e,t){return new l(`Invalid expected revision ${JSON.stringify(e)}: ${t}.`,u.USAGE,{code:"expect_hash_invalid",value:e,required:"Pass the 64-character item_hash from pm get <id> --json, optionally as <id>=<item_hash>.",examples:["--expect-hash <item_hash>","--expect-hash pm-a1b2=<item_hash>"]})}function Re(e){let t=typeof e=="string"?e.trim().toLowerCase():"";if(!Ce.test(t))throw y(String(e),"the revision is not a 64-character hexadecimal item_hash");return t}function qe(e){return(e===void 0?[]:typeof e=="string"?[e]:e).flatMap(t=>{if(typeof t!="string")throw y(String(t),"expected a string");let n=t.split(",").map(o=>o.trim()).filter(o=>o.length>0);if(n.length===0)throw y(t,"the value is empty");let i=o=>te(t)===t?o:ee;return n.map(o=>{let r=o.lastIndexOf("="),c=r===-1?void 0:o.slice(0,r).trim();if(c!==void 0&&c.length===0)throw y(i(o),"the item id before = is empty");let s=r===-1?o:o.slice(r+1);if(!Ce.test(s.trim().toLowerCase()))throw y(i(s),"the revision is not a 64-character hexadecimal item_hash");let a=Re(s);return c===void 0?{itemHash:a}:{id:c,itemHash:a}})})}async function Se(e,t){let n=await se(e),i=X(n,ne()).type_to_folder,o=await x(e,t,n.id_prefix,n.item_format,i);if(o){let{document:r}=await k(o,{schema:n.schema});if(r.metadata.id!==await P(o.itemPath,o.id))throw new l(`Item file ${o.id} embeds the id ${r.metadata.id}; no revision can be bound to an item whose identity is in conflict.`,u.CONFLICT,{code:"item_identity_conflict",item_id:o.id,required:`Repair ${o.id}'s identity first (pm validate reports it; pm restore ${o.id} <version> recovers a recorded state), then read its item_hash again.`});return{id:r.metadata.id,document:r}}try{return{id:(await ve(e,t,n,i)).id,document:W}}catch{throw await _e(e,t,n.id_prefix,i)}}function $(e){return Q(e.cwd??process.cwd(),e.pmRoot)}async function Dt(e,t={}){let n=await Se($(t),e);return{id:n.id,item_hash:re(n.document)}}async function Te(e,t,n){let i=[];for(let o of t){let r=o.id??n;if(r===void 0||r.trim().length===0)throw new l("A bare expected revision needs an item to bind to.",u.USAGE,{code:"expect_hash_target_required",required:"This command has no single item argument; name each target as --expect-hash <id>=<item_hash>.",examples:["--expect-hash pm-a1b2=<item_hash>"]});i.push({id:(await Se(e,r)).id,itemHash:o.itemHash})}return i}function ze(e){return[...new Set(e.patch.map(t=>{let n=t.path.split("/");return String(n[1]==="metadata"?n[2]:n[1])}))].sort()}async function We(e,t,n){let i;try{i=await oe(Z(e,t),t)}catch{return}let o=-1;for(let s=i.length-1;s>=0;s-=1){let a=i[s];if(a.after_hash===n){o=s+1;break}if(a.before_hash===n){o=s;break}}if(o===-1)return{expected_revision_recorded:!1,changes_since:[],changes_since_omitted:0};let r=i.slice(o),c=r.slice(-Ge);return{expected_revision_recorded:!0,changes_since:c.map(s=>({ts:s.ts,op:s.op,author:s.author,fields:ze(s)})),changes_since_omitted:r.length-c.length}}async function Ot(e,t){if(!R(e))return{};let n=await Be(e,t);return{error_code:Ee,expected_revision:String(n.context.expected_revision),current_revision:String(n.context.current_revision),details:n.context.details}}function R(e){return ye(e)&&e.context.code===Ee}function Lt(e){let t=e.find(n=>R(n));if(t!==void 0)throw t}function Mt(){return new l("--expect-hash cannot guard an invocation an extension override rewrote: which item it writes is not provable.",u.USAGE,{code:"expect_hash_invocation_rewritten",required:"Run the command without the rewriting extension (--no-extensions), or drop --expect-hash.",why:"An extension parser or preflight override changed this invocation's tracker or arguments, and final dispatch, the extension SDK client and the guard do not share one rewritten view."})}function Ve(e,t){if(t===void 0||!R(e)||typeof e.context.item_id!="string"||he(e))return e;let n=e.context.reason===fe;if(!n&&e.context.reason!==le)return e;let i=pe(N(e,new l(e.message,e.exitCode,{...e.context,...ue(e.context.item_id,n,t)})));return i.stack=e.stack,i}async function Be(e,t,n){if(!me(e,t))return e;let i=Ve(e,n);if(!R(i)||i.context.details!==void 0)return i;let o=i.context.item_id,r=i.context.expected_revision;if(typeof o!="string"||typeof r!="string")return i;let c;try{c=await We(t,o,r)}catch{return i}if(c===void 0)return i;let s={expected_revision_recorded:c.expected_revision_recorded,changes_since:c.changes_since.map(m=>({ts:m.ts,op:m.op,author:m.author,fields:[...m.fields]})),changes_since_omitted:c.changes_since_omitted},a=N(i,new l(i.message,i.exitCode,{...i.context,details:s}));return a.stack=i.stack,a}async function Ne(e,t,n){try{return{result:await ce(e,t),...ae(e)}}catch(i){throw e.pmRoot===void 0?i:await Be(i,e.pmRoot,n)}}function Ye(e){return e.cwd===void 0&&e.pmRoot===void 0?void 0:{scopeArgs:["--pm-path",$(e)]}}async function Ht(e,t,n={}){return Ne(await je(e,n),t,Ye(n))}async function je(e,t={}){let n=$(t),i=e.map(({id:r,itemHash:c})=>({id:r,itemHash:Re(c)})),o=T();return B(o,n,await Te(n,i)),o}function Pt(e){let t=de(e);return t===void 0||t.length>0}function Xe(e){return`expect_hash_unchecked:${e}:no_locked_write_reached_this_item`}var ke=new Set(V);function Je(e,t={}){let n=e.trim().replace(/\s+/gu,"-"),i=ke.has(n)?n:e;if(ke.has(i)&&(!Ie(i)||i==="deps")&&!Y.has(i))throw Qe(i);if((i==="test"||i==="test-all")&&t.background===!0)throw new l(`--expect-hash cannot guard ${i} --background: the worker runs in another process.`,u.USAGE,{code:"expect_hash_background_unsupported",required:`Run ${i} in the foreground to guard its result recording, or drop --expect-hash for a background run.`})}function Qe(e){return new l(`--expect-hash guards item writes, and ${e} is not a mutation.`,u.USAGE,{code:"expect_hash_requires_mutation",required:"Use --expect-hash (MCP/SDK expectHash) only on a command or action that writes items."})}function Ze(e,t){if(t.length===0||typeof e!="object"||e===null||Array.isArray(e))return e;let n=e,i=Array.isArray(n.warnings)?n.warnings:[];return{...n,warnings:[...i,...t.map(Xe)]}}async function $t(e){let t=e.expectHash;if(t!==void 0&&typeof t!="string"&&!(Array.isArray(t)&&t.every(r=>typeof r=="string")))throw y(JSON.stringify(t)??String(t),"expected a string or an array of strings");let n=qe(t);if(n.length===0)return e.run();Je(e.action,{background:e.background===!0||e.options?.background===!0});let i=T();B(i,e.pmRoot,await Te(e.pmRoot,n,e.defaultId));let o=await Ne(i,e.run,e.invocation);return Ze(o.result,o.unchecked)}export{D as a,Le as b,_ as c,C as d,we as e,M as f,Me as g,He as h,Fe as i,ht as j,Ee as k,Ge as l,Re as m,qe as n,Dt as o,Te as p,We as q,Ot as r,R as s,Lt as t,Mt as u,Ve as v,Be as w,Ne as x,Ht as y,je as z,Pt as A,Xe as B,Je as C,Qe as D,$t as E};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as ve}from"./chunk-U2HVJVA5.js";import{Cd as g,Dd as b,Gc as ge,Hb as x,Hc as ye,Ib as k,Ob as _e,ad as Ie,hb as T,ib as ce,jb as B,kb as ae,lb as de,ob as le,pb as fe,qb as ue,rb as me,sb as he,tb as pe,ub as N}from"./chunk-MELSYAFE.js";import{Bd as ne,Ce as v,De as w,Fa as X,Gf as oe,Ha as J,N as V,Na as Q,Ta as Z,W as Y,ej as se,fc as p,hb as ee,he as ie,ib as te,ri as re,za as j}from"./chunk-C7M54YV6.js";import{A as u,C as l,z as W}from"./chunk-O4ZLEN4T.js";import{readdir as Ke}from"node:fs/promises";import H from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a319e7d9-e248-573b-bf1f-35217ce49fd0")}catch{}})();function D(e,t){return(t===void 0?void 0:J(e,t))?.execution_role??j[e.trim().toLowerCase()]??"agent"}var O="blocked_by",be="blocks",Le=Object.freeze([O,be]),A="no-active-blocker";function d(e){return e.trim().toLowerCase()}function E(e,t){return t?`external:${e}`:`local:${d(e)}`}function _(e){let t=new Map,n=typeof e.blocked_by=="string"?e.blocked_by.trim():"";if(n.length>0&&d(n)!==A){let i=g(n);t.set(E(n,i),i?n:d(n))}for(let i of e.dependencies??[]){let o=typeof i.id=="string"?i.id.trim():"";if(p(i.kind)===O&&o.length>0&&d(o)!==A){let r=g(o)||b(i.source_kind);t.set(E(o,r),r?o:d(o))}}return[...t.values()].sort((i,o)=>i.localeCompare(o))}function C(e){let t=new Map;for(let n of e){let i=d(n.id);i.length!==0&&t.set(i,new Set(_(n)))}for(let n of e){let i=d(n.id);if(i.length!==0)for(let o of n.dependencies??[]){let r=p(o.kind)===be&&typeof o.id=="string"?d(o.id):"";if(r.length===0||r===A)continue;let c=t.get(r)??new Set;c.add(i),t.set(r,c)}}return new Map([...t].map(([n,i])=>[n,[...i].sort((o,r)=>o.localeCompare(r))]))}function we(e,t){let n=d(e.id);return n.length>0?C(t).get(n)??_(e):_(e)}function L(e,t,n,i){let o=e,r=typeof o.id=="string"?i?.get(d(o.id))??we(o,[...t.values()]):_(e),c=new Set((e.dependencies??[]).filter(s=>p(s.kind)===O&&b(s.source_kind)&&typeof s.id=="string"&&s.id.trim().length>0).map(s=>E(s.id.trim(),!0)));return r.map(s=>{if(g(s)||c.has(E(s,!0)))return{id:s,title:null,status:null,resolved:!1,external:!0,...typeof e.updated_at=="string"?{blocked_since:e.updated_at}:{},resolver:null};let a=t.get(d(s));return a?{id:s,title:a.title,status:a.status,resolved:w(a.status,n)}:{id:s,title:null,status:null,resolved:!1}})}function M(e,t,n){return L(e,t,n)}function Me(e,t){let n=new Map(e.map(c=>[d(c.id),c])),i=C(e),o=new Set([...xe(t),...t.blocked_statuses]),r=new Set;for(let c of e){let s=v(c.status,t);o.has(s)&&(t.blocked_statuses.has(s)||L(c,n,t,i).some(a=>!a.resolved))&&r.add(d(c.id))}return r}function He(e,t,n={},i){let o=[...e.ready,...e.decisions,...e.gates];n.includeContainers===!0&&o.push(...e.containers.filter(c=>c.open_blockers.length===0&&!t.blocked_statuses.has(v(c.item.status,t))));let r={ready:[],decisions:[],gates:[]};for(let c of o){let s=D(c.item.type,i);s==="human"&&n.includeDecisions!==!0?r.decisions.push(c):s==="gate"&&n.includeGates!==!0?r.gates.push(c):r.ready.push(c)}return r}function xe(e){return e.active_statuses.size>0?e.active_statuses:new Set([e.open_status])}function Pe(e,t,n){let i=[d(e)],o=new Set;for(;i.length>0;){let r=i.pop();if(!o.has(r)){o.add(r);for(let c of t.get(r)??[]){if(!w(c.status,n))return!0;i.push(d(c.id))}}}return!1}function $e(e){let t=new Map,n=new Map,i=new Map,o=C(e);for(let r of e){t.set(d(r.id),r);let c=typeof r.parent=="string"?r.parent.trim():"";if(c.length>0){let s=d(c),a=n.get(s)??[];a.push(r),n.set(s,a)}for(let s of o.get(d(r.id))){let a=d(s),m=i.get(a)??[];m.push(r.id),i.set(a,m)}}return{itemsById:t,childrenByParent:n,blockedByReverse:i,blockerIdsByItem:o}}function Fe(e,t,n,i){let{itemsById:o,childrenByParent:r,blockedByReverse:c,blockerIdsByItem:s}=$e(t),a=new Set([...xe(n),...n.blocked_statuses]),m=new Set(t.filter(f=>!w(f.status,n)).map(f=>d(f.id))),F=[],K=[],S=[],U=[],G=[],q=0;for(let f of e){if(!a.has(v(f.status,n)))continue;q+=1;let z=L(f,o,n,s).filter(h=>!h.resolved),Ae=(c.get(d(f.id))??[]).filter(h=>m.has(d(h))).sort((h,Oe)=>h.localeCompare(Oe)),I={item:f,open_blockers:z,unblocks:Ae};if(Pe(f.id,r,n)){S.push(I);continue}let De=n.blocked_statuses.has(v(f.status,n));if(z.length===0&&!De){let h=D(f.type,i);h==="human"?U.push(I):h==="gate"?G.push(I):F.push(I)}else K.push(I)}return{ready:F,blocked:K,containers:S,decisions:U,gates:G,active_count:q,container_count:S.length}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ae1c56b3-148d-502d-9450-e807fdfab4da")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e9b7731d-e6f5-51a8-970b-462c0b728a9c")}catch{}})();function Ue(e,t){let n=new Map;for(let i of e){let o=i.external?i.id:t.get(i.id.toLowerCase())?.id??i.id;n.set(i.external?`external:${o}`:`local:${o.toLowerCase()}`,{...i,id:o})}return[...n.values()]}async function P(e,t){let n=H.basename(e),i=(await Ke(H.dirname(e)).catch(o=>{throw ge("Cannot verify the blocker's physical file identity",{exitCode:u.GENERIC_FAILURE,context:{code:"blocker_identity_read_failed",required:"Restore access to the blocker item directory, then retry the item read."},cause:o})})).filter(o=>o.toLowerCase()===n.toLowerCase()).sort((o,r)=>+(r===n)-+(o===n)||o.localeCompare(r)).map(o=>H.parse(o).name)[0];if(i===void 0)throw new l(`Blocker canonical file disappeared during identity verification: ${t}`,u.CONFLICT,{code:"item_identity_conflict",required:"Restore the canonical blocker file and validate storage integrity before retrying the item read."});return i}async function ht(e){let t=_(e.metadata);if(t.length===0)return[];let n=new Map([e.metadata.blocked_by,...(e.metadata.dependencies??[]).filter(o=>p(o.kind)==="blocked_by").map(o=>o.id)].filter(o=>typeof o=="string").map(o=>[o.trim().toLowerCase(),o.trim()])),i=new Map;for(let o of t){if(g(o)||!/^(?!\.{1,2}$)[^/\\:\0]+$/u.test(o)||e.metadata.dependencies?.some(s=>s.id.trim()===o&&p(s.kind)==="blocked_by"&&b(s.source_kind)))continue;let r=await x(e.pmRoot,n.get(o),e.settings.id_prefix,e.settings.item_format,e.typeToFolder);if(r===null)continue;let c=await k(r,{schema:e.settings.schema});if(r.id=await P(r.itemPath,r.id),c.document.metadata.id!==r.id)throw new l(`Blocker identity differs from its canonical file: ${r.id}`,u.CONFLICT,{code:"item_identity_conflict",required:"Restore the canonical blocker identity and validate storage integrity before retrying the item read."});i.set(o.toLowerCase(),c.document.metadata)}return Ue(M({blocked_by:e.metadata.blocked_by,dependencies:e.metadata.dependencies,updated_at:e.metadata.updated_at},i,ie(e.settings.schema)),i)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="222cbba7-e2df-5afb-8d75-14f9f99b3bd2")}catch{}})();var Ee="item_revision_conflict",Ge=10,Ce=/^[0-9a-f]{64}$/u;function y(e,t){return new l(`Invalid expected revision ${JSON.stringify(e)}: ${t}.`,u.USAGE,{code:"expect_hash_invalid",value:e,required:"Pass the 64-character item_hash from pm get <id> --json, optionally as <id>=<item_hash>.",examples:["--expect-hash <item_hash>","--expect-hash pm-a1b2=<item_hash>"]})}function Re(e){let t=typeof e=="string"?e.trim().toLowerCase():"";if(!Ce.test(t))throw y(String(e),"the revision is not a 64-character hexadecimal item_hash");return t}function qe(e){return(e===void 0?[]:typeof e=="string"?[e]:e).flatMap(t=>{if(typeof t!="string")throw y(String(t),"expected a string");let n=t.split(",").map(o=>o.trim()).filter(o=>o.length>0);if(n.length===0)throw y(t,"the value is empty");let i=o=>te(t)===t?o:ee;return n.map(o=>{let r=o.lastIndexOf("="),c=r===-1?void 0:o.slice(0,r).trim();if(c!==void 0&&c.length===0)throw y(i(o),"the item id before = is empty");let s=r===-1?o:o.slice(r+1);if(!Ce.test(s.trim().toLowerCase()))throw y(i(s),"the revision is not a 64-character hexadecimal item_hash");let a=Re(s);return c===void 0?{itemHash:a}:{id:c,itemHash:a}})})}async function Se(e,t){let n=await se(e),i=X(n,ne()).type_to_folder,o=await x(e,t,n.id_prefix,n.item_format,i);if(o){let{document:r}=await k(o,{schema:n.schema});if(r.metadata.id!==await P(o.itemPath,o.id))throw new l(`Item file ${o.id} embeds the id ${r.metadata.id}; no revision can be bound to an item whose identity is in conflict.`,u.CONFLICT,{code:"item_identity_conflict",item_id:o.id,required:`Repair ${o.id}'s identity first (pm validate reports it; pm restore ${o.id} <version> recovers a recorded state), then read its item_hash again.`});return{id:r.metadata.id,document:r}}try{return{id:(await ve(e,t,n,i)).id,document:W}}catch{throw await _e(e,t,n.id_prefix,i)}}function $(e){return Q(e.cwd??process.cwd(),e.pmRoot)}async function Dt(e,t={}){let n=await Se($(t),e);return{id:n.id,item_hash:re(n.document)}}async function Te(e,t,n){let i=[];for(let o of t){let r=o.id??n;if(r===void 0||r.trim().length===0)throw new l("A bare expected revision needs an item to bind to.",u.USAGE,{code:"expect_hash_target_required",required:"This command has no single item argument; name each target as --expect-hash <id>=<item_hash>.",examples:["--expect-hash pm-a1b2=<item_hash>"]});i.push({id:(await Se(e,r)).id,itemHash:o.itemHash})}return i}function ze(e){return[...new Set(e.patch.map(t=>{let n=t.path.split("/");return String(n[1]==="metadata"?n[2]:n[1])}))].sort()}async function We(e,t,n){let i;try{i=await oe(Z(e,t),t)}catch{return}let o=-1;for(let s=i.length-1;s>=0;s-=1){let a=i[s];if(a.after_hash===n){o=s+1;break}if(a.before_hash===n){o=s;break}}if(o===-1)return{expected_revision_recorded:!1,changes_since:[],changes_since_omitted:0};let r=i.slice(o),c=r.slice(-Ge);return{expected_revision_recorded:!0,changes_since:c.map(s=>({ts:s.ts,op:s.op,author:s.author,fields:ze(s)})),changes_since_omitted:r.length-c.length}}async function Ot(e,t){if(!R(e))return{};let n=await Be(e,t);return{error_code:Ee,expected_revision:String(n.context.expected_revision),current_revision:String(n.context.current_revision),details:n.context.details}}function R(e){return ye(e)&&e.context.code===Ee}function Lt(e){let t=e.find(n=>R(n));if(t!==void 0)throw t}function Mt(){return new l("--expect-hash cannot guard an invocation an extension override rewrote: which item it writes is not provable.",u.USAGE,{code:"expect_hash_invocation_rewritten",required:"Run the command without the rewriting extension (--no-extensions), or drop --expect-hash.",why:"An extension parser or preflight override changed this invocation's tracker or arguments, and final dispatch, the extension SDK client and the guard do not share one rewritten view."})}function Ve(e,t){if(t===void 0||!R(e)||typeof e.context.item_id!="string"||he(e))return e;let n=e.context.reason===fe;if(!n&&e.context.reason!==le)return e;let i=pe(N(e,new l(e.message,e.exitCode,{...e.context,...ue(e.context.item_id,n,t)})));return i.stack=e.stack,i}async function Be(e,t,n){if(!me(e,t))return e;let i=Ve(e,n);if(!R(i)||i.context.details!==void 0)return i;let o=i.context.item_id,r=i.context.expected_revision;if(typeof o!="string"||typeof r!="string")return i;let c;try{c=await We(t,o,r)}catch{return i}if(c===void 0)return i;let s={expected_revision_recorded:c.expected_revision_recorded,changes_since:c.changes_since.map(m=>({ts:m.ts,op:m.op,author:m.author,fields:[...m.fields]})),changes_since_omitted:c.changes_since_omitted},a=N(i,new l(i.message,i.exitCode,{...i.context,details:s}));return a.stack=i.stack,a}async function Ne(e,t,n){try{return{result:await ce(e,t),...ae(e)}}catch(i){throw e.pmRoot===void 0?i:await Be(i,e.pmRoot,n)}}function Ye(e){return e.cwd===void 0&&e.pmRoot===void 0?void 0:{scopeArgs:["--pm-path",$(e)]}}async function Ht(e,t,n={}){return Ne(await je(e,n),t,Ye(n))}async function je(e,t={}){let n=$(t),i=e.map(({id:r,itemHash:c})=>({id:r,itemHash:Re(c)})),o=T();return B(o,n,await Te(n,i)),o}function Pt(e){let t=de(e);return t===void 0||t.length>0}function Xe(e){return`expect_hash_unchecked:${e}:no_locked_write_reached_this_item`}var ke=new Set(V);function Je(e,t={}){let n=e.trim().replace(/\s+/gu,"-"),i=ke.has(n)?n:e;if(ke.has(i)&&(!Ie(i)||i==="deps")&&!Y.has(i))throw Qe(i);if((i==="test"||i==="test-all")&&t.background===!0)throw new l(`--expect-hash cannot guard ${i} --background: the worker runs in another process.`,u.USAGE,{code:"expect_hash_background_unsupported",required:`Run ${i} in the foreground to guard its result recording, or drop --expect-hash for a background run.`})}function Qe(e){return new l(`--expect-hash guards item writes, and ${e} is not a mutation.`,u.USAGE,{code:"expect_hash_requires_mutation",required:"Use --expect-hash (MCP/SDK expectHash) only on a command or action that writes items."})}function Ze(e,t){if(t.length===0||typeof e!="object"||e===null||Array.isArray(e))return e;let n=e,i=Array.isArray(n.warnings)?n.warnings:[];return{...n,warnings:[...i,...t.map(Xe)]}}async function $t(e){let t=e.expectHash;if(t!==void 0&&typeof t!="string"&&!(Array.isArray(t)&&t.every(r=>typeof r=="string")))throw y(JSON.stringify(t)??String(t),"expected a string or an array of strings");let n=qe(t);if(n.length===0)return e.run();Je(e.action,{background:e.background===!0||e.options?.background===!0});let i=T();B(i,e.pmRoot,await Te(e.pmRoot,n,e.defaultId));let o=await Ne(i,e.run,e.invocation);return Ze(o.result,o.unchecked)}export{D as a,Le as b,_ as c,C as d,we as e,M as f,Me as g,He as h,Fe as i,ht as j,Ee as k,Ge as l,Re as m,qe as n,Dt as o,Te as p,We as q,Ot as r,R as s,Lt as t,Mt as u,Ve as v,Be as w,Ne as x,Ht as y,je as z,Pt as A,Xe as B,Je as C,Qe as D,$t as E};
|
|
2
|
+
//# sourceMappingURL=chunk-25BUKX4W.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$b as He,Sb as ze,Tb as Be,Vb as ne,Yb as Ve,Za as te,_b as Ye,a as xe,vc as Xe}from"./chunk-GXGMMIZN.js";import{u as We}from"./chunk-COTC2QOR.js";import{qc as Je}from"./chunk-TCYIGAQG.js";import{b as N,c as Q,d as Ge,e as ee,f as qe}from"./chunk-5LG5YZYF.js";import{qa as Ke,vb as U,wa as Le,yb as j}from"./chunk-GIAJX2QJ.js";import{Lb as Fe,Mc as Pe,Va as Z,d as be,gb as C,ia as Ne,ka as I,t as Ee,u as Oe,v as W}from"./chunk-UFZQPKQS.js";import{$d as Me,Ad as V,Fa as B,Ff as A,Oa as Te,Ui as Ue,Yi as je,a as Se,ac as $e,be as Y,ce as Re,dj as De,ef as Ce,fe as Ie,je as O,li as R,pe as H,qi as X,zd as ke}from"./chunk-HQINCDF6.js";import{A as u,C as d,G as z,I as Ae,J as k,l as ge,q as $,t as ve,y as _e}from"./chunk-O4ZLEN4T.js";import ue from"node:crypto";import{constants as se}from"node:fs";import{cp as mn,lstat as vt,mkdir as fn,mkdtemp as _t,open as hn,readdir as yn,realpath as St,rm as bt,stat as pe,writeFile as Et}from"node:fs/promises";import{tmpdir as Ot}from"node:os";import l from"node:path";import ct from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="01728cbc-2037-50d2-8318-5f106714b8da")}catch{}})();var b=new Set(["id","title","description","type","status","priority","tags","body","deadline","estimated_minutes","acceptance_criteria","definition_of_ready","order","rank","assignee",...ge,"affected_version","fixed_version","component","regression","customer_impact","close_reason","completed_at","dependencies","comments","notes","learnings","files","tests","docs","reminders","events","type_options"]);function Ze(e){if(e===void 0)return;let t=e.replace(/[A-Z]/gu,n=>`_${n.toLowerCase()}`);return b.has(t)?t:e}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6456f85b-e076-5048-9c21-03d477267259")}catch{}})();function D(e,t,n){let r=e?.estimatedMinutes;if(!(r===void 0||typeof r=="string"))throw new d(`Mutation ${n+1} ${t} option "estimatedMinutes" must be a string.`,u.USAGE,{code:"mutation_option_value_invalid",required:'Pass estimatedMinutes as a string, for example "45", in raw mutation options.',why:"Raw options use the create/update command option types; item documents accept numeric estimated_minutes instead.",nextSteps:["Quote the estimatedMinutes value or use an item document with numeric estimated_minutes, then retry the transaction."]})}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a17df3f5-aee8-5734-b1ce-b643482be3a7")}catch{}})();var re=["op","id","reason","options","unique","match"],Ct=[...re,"ref"],Qe=[...Ct,"item"],Nt="mutate-",et="row-",tt=["schema_version","mutations"],dt="[a-z][a-z0-9._-]{0,63}",nt=new RegExp(`^${dt}$`,"u"),ut=new RegExp(`(^|,)id=@(${dt})(?=,|$)`,"gu"),rt=e=>e.slice(2).replaceAll(/-([a-z])/gu,(t,n)=>n.toUpperCase()),F=["item","item_hash","linked","schedule","claim_state","children","omission_receipt","row_contract","context_intent"],pt=new Set(["created_at","updated_at","closed_at","version","format_version","path","author","collection_counts","notes_count","tests_count"]),Ut=new Set([...pt,"completed_at","id"]),lt={create:U.map(e=>e.target),update:j.map(e=>e.target),close:Ke.map(e=>rt(e.flag)).filter(e=>e!=="reason"),release:Le.map(e=>rt(e.flag))};function tr(e){let t=ct.createHash("sha256").update(e).digest("hex");return`${Nt}${t.slice(0,24)}`}function nr(e){let t={},n=e.createCompensation;if(n!==void 0){if(n!=="close"&&n!=="delete")throw new d("createCompensation must be close or delete.",u.USAGE);t.createCompensation=n}for(let r of["lockTtlSeconds","lockWaitMs"]){let i=e[r];if(i===void 0)continue;let o=typeof i=="number"||typeof i=="string"&&i.trim().length>0?Number(i):Number.NaN;if(!Number.isSafeInteger(o)||o<=0)throw new d(`${r} must be a positive safe integer.`,u.USAGE);t[r]=o}return t}function w(e){if(typeof e!="object"||e===null||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function P(e,t){let n=Math.max(1,Math.min(3,Math.floor(e.length/4)+1)),r;for(let i of t){let o=$e(e,i,n);o!==null&&(r===void 0||o<r.distance)&&(r={key:i,distance:o})}return r?.key}function E(e,t,n){let r=P(t,n);return new d(r===void 0?`${e} does not recognize key "${t}". Allowed keys: ${n.join(", ")}.`:`${e} does not recognize key "${t}". Did you mean "${r}"?`,u.USAGE,{code:"stdin_json_unknown_key",required:`Use documented ${e} keys only.`,why:"Strict structured input prevents silent typos from creating incomplete or unintended mutations.",nextSteps:[r===void 0?`Remove or correct "${t}".`:`Replace "${t}" with "${r}".`]})}function ae(e,t){try{return JSON.parse(e)}catch(n){let r=n instanceof Error?n.message:String(n);throw new d(`${t} must be valid JSON: ${r}`,u.USAGE,{code:"stdin_json_invalid",required:`Pipe one valid JSON ${t.toLowerCase()} into stdin.`,why:"Structured mutation input must parse deterministically before any tracker write begins."})}}function jt(e,t){if(!w(e))throw new d(`Mutation ${t+1} must be an object.`,u.USAGE);for(let n of Object.keys(e))if(!re.includes(n))throw E(`mutation ${t+1}`,n,re);return e}function Dt(e,t,n,r){if(e===void 0)return;if(!w(e))throw new d(`Mutation ${n+1} options must be an object.`,u.USAGE);let i=[...lt[t],...ht(t,r)];for(let o of Object.keys(e))if(!i.includes(o))throw E(`mutation ${n+1} ${t} options`,o,i);return D(e,t,n),e}function it(e,t,n,r){if(e===void 0)return;let i=r==="unique"?"create":"update";if(t!==i)throw new d(`Mutation ${n+1} ${r} is only valid for ${i} operations.`,u.USAGE);let o=w(e)&&typeof e.key=="string"?e.key.trim():"";if(!w(e)||o.length===0||e.value===void 0||e.value===null)throw new d(`Mutation ${n+1} ${r} must be an object with a non-empty key and a value.`,u.USAGE);return{key:o,value:e.value}}function Ft(e,t,n){let r=jt(e,t),{op:i,id:o,reason:a}=r;if(i!=="create"&&i!=="update"&&i!=="close"&&i!=="release")throw new d(`Mutation ${t+1} op must be create, update, close, or release.`,u.USAGE);let s=Dt(r.options,i,t,n),c=it(r.unique,i,t,"unique"),m=it(r.match,i,t,"match");if(typeof o!="string"||o.trim().length===0)throw new d(`Mutation ${t+1} requires a non-empty id.`,u.USAGE);let p=o.trim();if(i==="close"){if(typeof a!="string"||a.trim().length===0)throw new d(`Mutation ${t+1} close requires a non-empty reason.`,u.USAGE);return{op:i,id:p,reason:a.trim(),...s===void 0?{}:{options:s}}}if(i==="release")return{op:i,id:p,...s===void 0?{}:{options:s}};if(!w(s))throw new d(`Mutation ${t+1} ${i} requires an options object.`,u.USAGE);return{op:i,id:p,options:s,...c===void 0?{}:{unique:c},...m===void 0?{}:{match:m}}}function mt(e,t={}){let n=ae(e,"Mutation batch"),r=Array.isArray(n)?n:w(n)&&Array.isArray(n.mutations)?n.mutations:void 0;if(r===void 0||r.length===0)throw new d("Mutation batch must be a non-empty JSON array or an object with a non-empty mutations array.",u.USAGE);let i=t.runtimeFields??[];return r.map((o,a)=>{let s=Ft(o,a,i);return s.options!==void 0&&Ee(s.options),s})}function Pt(e,t,n){let r=ct.createHash("sha256").update(e).update("\0").update(t).digest("hex"),i=BigInt(`0x${r.slice(0,16)}`).toString(36).padStart(13,"0").slice(-12);return`${Ne(n)}${i}`}function ot(e,t){if(typeof e!="string"||!e.startsWith("@"))return e;let n=e.slice(1),r=t[n];if(r===void 0)throw new d(`Unknown mutation reference "${e}".`,u.USAGE);return r}function at(e,t){if(typeof e!="string")return e;let n=e.replace(ut,(r,i,o)=>{let a=t[o];if(a===void 0)throw new d(`Unknown mutation reference "@${o}".`,u.USAGE);return`${i}id=${a}`});if(/(^|,)id=@/u.test(n))throw new d(`Malformed mutation reference in dependency "${e}".`,u.USAGE);return n}function xt(e){return typeof e!="string"?[]:e.startsWith("@")?[e.slice(1)]:[...e.matchAll(ut)].map(t=>t[1]).filter(t=>t!==void 0)}function Gt(e,t){let n=new Map;for(let[a,s]of e.entries()){let c=t[a];if(c===void 0)continue;let m=w(s.options)?s.options:{},p=Array.isArray(m.dep)?m.dep:m.dep===void 0?[]:[m.dep];n.set(c,[m.parent,m.blockedBy,...p].flatMap(xt))}let r=new Set,i=new Set,o=a=>{if(r.has(a))throw new d(`Mutation reference cycle includes "@${a}".`,u.USAGE);if(!i.has(a)){r.add(a);for(let s of n.get(a))n.has(s)&&o(s);r.delete(a),i.add(a)}};for(let a of n.keys())o(a)}function qt(e){let t=e.split(/\r?\n/u).map((o,a)=>({line:o.trim(),number:a+1})).filter(o=>o.line.length>0);if(t.length<2)return null;let n=t.map(o=>{try{return{...o,ok:!0,value:JSON.parse(o.line)}}catch(a){return{...o,ok:!1,error:a}}}),r=n[0];if(!r.ok&&(r.line.startsWith("[")||r.line==="{"||n.at(-1).line==="}")||!n.some(o=>o.ok&&w(o.value)))return null;let i=[];for(let o of n){if(!o.ok)throw new d(`Mutation document line ${o.number} must be one valid JSON object: ${Pe(o.error)}`,u.USAGE,{code:"stdin_json_invalid",required:"Provide one JSON object per line (JSON Lines), a JSON array, or a {schema_version, mutations} document.",why:"Structured mutation input must parse deterministically before any tracker write begins."});if(!w(o.value))throw new d(`Mutation document line ${o.number} must be a JSON object.`,u.USAGE);i.push(o.value)}return i}function Kt(e){return Object.hasOwn(e,"mutations")||Object.hasOwn(e,"schema_version")}function Lt(e){let t;try{t=ae(e,"Mutation document")}catch(n){let r=qt(e);if(r===null)throw n;return{schema_version:1,mutations:r}}return Array.isArray(t)?{schema_version:1,mutations:t}:w(t)&&!Kt(t)?{schema_version:1,mutations:[t]}:t}function Jt(e,t){let n=Object.hasOwn(e,"op")?Wt(e,t):zt(e,t);if(n.op==="create"&&n.id===void 0&&w(n.item)&&n.item.id!==void 0){if(typeof n.item.id!="string")throw new d(`Mutation ${t+1} item id must be a string.`,u.USAGE);n.id=n.item.id}return n}function Wt(e,t){for(let n of Object.keys(e))if(!Qe.includes(n))throw E(`mutation ${t+1}`,n,Qe);if(e.item!==void 0&&e.op!=="create")throw new d(`Mutation ${t+1} item documents are only valid for create operations.`,u.USAGE);if(e.item!==void 0&&e.options!==void 0)throw new d(`Mutation ${t+1} must declare either item or options, not both.`,u.USAGE);return{...e}}function zt(e,t){let{ref:n,id:r,item:i,...o}=e,a=i!==void 0?i:o;if(i!==void 0&&Object.keys(o).length>0)throw new d(`Mutation ${t+1} must not mix item document keys with top-level fields.`,u.USAGE);if(!w(a))throw new d(`Mutation ${t+1} item document must be an object.`,u.USAGE);return{op:"create",...n===void 0?{}:{ref:n},...r===void 0?{}:{id:r},item:a}}function Bt(e){let t=Lt(e);if(!w(t))throw new d("Mutation document must be a JSON array or object.",u.USAGE);for(let n of Object.keys(t))if(!tt.includes(n))throw E("mutation document",n,tt);if(t.schema_version!==void 0&&t.schema_version!==1)throw new d("Mutation document schema_version must be 1.",u.USAGE);if(!Array.isArray(t.mutations)||t.mutations.length===0)throw new d("Mutation document requires a non-empty mutations array.",u.USAGE);return t.mutations.map((n,r)=>{if(!w(n))throw new d(`Mutation ${r+1} must be an object.`,u.USAGE);return Jt(n,r)})}function Vt(e,t,n){let r=new Set(Object.values(wt(t,n,Object.create(null))));for(let i of t)i.op==="create"&&typeof i.id=="string"&&i.id.trim().length>0&&r.add(I(i.id,n.idPrefix));return{...e,existing:e.existing.filter(i=>!r.has(i.id))}}function Yt(e){let t=new Set(e.map(n=>n.ref).filter(n=>typeof n=="string"));for(let[n,r]of e.entries()){if(r.op!=="create"||r.ref!==void 0||typeof r.id=="string"&&r.id.trim().length>0)continue;let i=`${et}${n+1}`;if(t.has(i))throw new d(`Mutation ${n+1} receives the synthesized ref "${i}", but another row declares that ref. Rename it or give mutation ${n+1} its own ref; ${et}<n> aliases are reserved for rows without one.`,u.USAGE);r.ref=i}}function ft(e,t,n){let r=ln(JSON.stringify(e),t,{},n);return delete r.stdinJson,delete r.documentAnnotationSnapshot,r}function ht(e,t){return e!=="create"&&e!=="update"?[]:t.filter(n=>n.commands.includes(e)).map(n=>O(n))}function Ht(e,t){for(let n of e)w(n.item)&&(n.options=ft(n.item,"create",t),delete n.item)}function yt(e,t){return t.some(n=>n.metadata_key===e)?e:Ze(e)}function ie(e,t,n){let r=t.replaceAll(/_([a-z])/gu,(a,s)=>s.toUpperCase());if(w(e.item)){if(e.item[t]!==void 0)return e.item[t];if(yt(r,n)===t&&e.item[r]!==void 0)return e.item[r]}let i=w(e.options)?e.options:{},o=n.find(a=>a.metadata_key===t);return o!==void 0&&i[O(o)]!==void 0?i[O(o)]:i[t]!==void 0?i[t]:i[r]!==void 0?i[r]:(Array.isArray(i.field)?i.field:[]).map(String).find(a=>a.startsWith(`${t}=`))?.slice(t.length+1)}function Xt(e,t){return e<t?-1:+(e!==t)}function oe(e){return Array.isArray(e)?e.map(oe):w(e)?Object.fromEntries(Object.entries(e).sort(([t],[n])=>Xt(t,n)).map(([t,n])=>[t,oe(n)])):e}function _(e){return typeof e=="string"?e.trim():JSON.stringify(oe(e))}function Zt(e,t,n,r,i){let o=t.key.trim();if(o.length===0)throw new d("Upsert key must be a non-empty field name.",u.USAGE);let a=Qt(t.existing),s=new Map,c=new Set;for(let[m,p]of e.entries()){if(p.op!=="create")continue;let h=en(p,o,m,s,r),f=tn(a.get(h)??[],o,h);if(f===void 0){p.unique={key:o,value:ie(p,o,r)};continue}let y=I(f,n);typeof p.ref=="string"&&(i[p.ref]=y),nn(p,y,r,{key:o,value:ie(p,o,r)}),c.add(m)}return c}function Qt(e){let t=new Map;for(let n of e){if(n.value===void 0||n.value===null)continue;let r=_(n.value);t.set(r,[...t.get(r)??[],n.id])}return t}function en(e,t,n,r,i){let o=ie(e,t,i);if(o==null||o==="")throw new d(`Mutation ${n+1} is missing the upsert key "${t}".`,u.USAGE,{code:"upsert_key_missing",required:`Every create record must carry a non-empty "${t}" value when --upsert-key ${t} is set.`,why:"Keyed upsert identifies existing items by that field; a record without it cannot be matched or safely created."});let a=_(o),s=r.get(a);if(s!==void 0)throw new d(`Mutations ${s+1} and ${n+1} share the upsert key value ${JSON.stringify(a)} for "${t}".`,u.USAGE,{code:"upsert_key_duplicate",required:"Each record must carry a distinct upsert key value within one batch.",why:"Two records with the same key would race for the same existing item."});return r.set(a,n),a}function tn(e,t,n){if(e.length>1)throw new d(`Upsert key "${t}" value ${JSON.stringify(n)} matches ${e.length} existing items: ${e.join(", ")}.`,u.CONFLICT,{code:"upsert_key_ambiguous",required:"Resolve the duplicate existing items or choose a key that is unique per item.",why:"An ambiguous key cannot select one item to update without guessing."});return e[0]}function nn(e,t,n,r){let i=new Set([...lt.update,...ht("update",n)]),o=w(e.item)?ft(e.item,"update",n):Object.fromEntries(Object.entries(e.options).filter(([a])=>i.has(a)));delete e.item,delete e.ref,e.op="update",e.id=t,e.options=o,e.match=r}function wt(e,t,n){for(let[r,i]of e.entries())if(i.ref!==void 0){if(i.op!=="create")throw new d(`Mutation ${r+1} ref is only valid for create operations.`,u.USAGE);if(typeof i.ref!="string"||!nt.test(i.ref))throw new d(`Mutation ${r+1} ref must match ${nt.source}.`,u.USAGE);if(n[i.ref]!==void 0)throw new d(`Duplicate mutation ref "${i.ref}".`,u.USAGE);n[i.ref]=typeof i.id=="string"&&i.id.trim().length>0?I(i.id,t.idPrefix):Pt(t.transactionId,i.ref,t.idPrefix)}return n}function rr(e,t){let n=Bt(e);Yt(n);let r=n.map(p=>typeof p.ref=="string"?p.ref:void 0),i=Object.create(null),o=t.upsert===void 0?new Set:Zt(n,Vt(t.upsert,n,t),t.idPrefix,t.runtimeFields??[],i);Ht(n,t.runtimeFields??[]),wt(n,t,i),Gt(n,r);let a=n.map(p=>{let h={...p},f=typeof h.ref=="string"?h.ref:void 0;if(delete h.ref,f!==void 0?h.id=i[f]:h.id=ot(h.id,i),w(h.options)){let y={...h.options};for(let g of["parent","blockedBy"])y[g]!==void 0&&(y[g]=ot(y[g],i));Array.isArray(y.dep)?y.dep=y.dep.map(g=>at(g,i)):y.dep!==void 0&&(y.dep=at(y.dep,i)),h.options=y}return h}),s=mt(JSON.stringify(a),{runtimeFields:t.runtimeFields??[]}),c=s.filter(p=>p.op==="create").map(p=>p.id);if(new Set(c).size!==c.length)throw new d("Duplicate resolved create id in mutation document.",u.USAGE);let m=s.map((p,h)=>{let f=r[h];return{index:h,...typeof f=="string"?{ref:f}:{},id:p.id,op:p.op,...o.has(h)?{upserted:!0}:{}}});return{schema_version:1,mutations:s,references:i,rows:m}}function rn(e,t){return t.filter(n=>e[n]!==void 0&&e[n]!==null).map(n=>{let r=String(e[n]);return`${n}=${/[",\n\r\\]/u.test(r)?JSON.stringify(r):r}`}).join(",")}function on(e,t,n){if(e!==void 0){if(!Array.isArray(e)||!e.every(w))throw new d(`${n} must be an array of objects.`,u.USAGE);return e.map(r=>rn(r,t))}}function an(e,t){return e==="tags"&&Array.isArray(t)&&t.every(n=>typeof n=="string")?JSON.stringify(t):typeof t=="number"||typeof t=="boolean"?String(t):t}function st(e,t,n=!1){for(let[r,i,o]of Je){let a=t[r],s=on(n&&["comments","notes","learnings"].includes(r)&&Array.isArray(a)?a.filter(c=>!w(c)||c.created_at===void 0):a,o,r);s!==void 0&&s.length>0&&(e[i]=s)}}function sn(e,t){for(let n of Object.keys(e)){if(t){if(!F.includes(n))throw E("item envelope",n,F);continue}if(!b.has(n)&&P(n,[...b])===void 0&&P(n,F)==="item")throw E("item envelope",n,F)}}function cn(e){let t=Object.hasOwn(e,"item");sn(e,t);let n=t?e.item:e;if(!w(n))throw new d("Item document item must be an object.",u.USAGE);return{item:n,...t&&w(e.linked)?{linked:e.linked}:{}}}function dn(e,t,n,r,i,o){if((r==="update"?Ut:pt).has(t))return;let a=i.find(s=>s.metadata_key===t&&s.commands.includes(r));if(a!==void 0){let s=H(o,a);e[O(a)]=s!==void 0?s:a.type==="array"||a.type==="object"?JSON.stringify(n):n;return}if(!b.has(t)){if(P(t,[...b])!==void 0)throw E("item document",t,[...b]);let s=Array.isArray(e.field)?e.field:[];s.push(`${t}=${typeof n=="string"?n:JSON.stringify(n)}`),e.field=s;return}["dependencies","comments","notes","learnings","files","tests","docs","reminders","events","type_options"].includes(t)||(e[t.replaceAll(/_([a-z])/gu,(s,c)=>c.toUpperCase())]=an(t,n))}function un(e,t,n){let r=new Set(Object.entries(e).filter(([,o])=>o!==void 0).map(([o])=>o)),i=t==="create"?U:j;for(let{target:o,keys:a}of i)a.some(s=>r.has(s))&&r.add(o);for(let o of n)H(e,o)!==void 0&&r.add(O(o));return r}function pn(e,t,n){let r=t==="create"?U:j;for(let{target:i}of r)i!=="field"&&n.has(i)&&delete e[i]}function ln(e,t,n={},r=[]){let i=ae(e,"Item document");if(!w(i))throw new d("Item document must be a JSON object.",u.USAGE);let{item:o,linked:a}=cn(i),s={};for(let[h,f]of Object.entries(o)){let y=yt(h,r);y!==h&&Object.hasOwn(o,y)||dn(s,y,f,t,r,n)}st(s,o,t==="update"),a!==void 0&&st(s,a);let c=un(n,t,r);if(pn(s,t,c),t==="update"){let h=Object.fromEntries(["comments","notes","learnings"].filter(f=>Object.hasOwn(o,f)&&!c.has(f.slice(0,-1))).map(f=>[f,o[f].filter(y=>w(y)&&y.created_at!==void 0)]));Object.keys(h).length>0&&(s.documentAnnotationSnapshot=h)}let m={...s,...Object.fromEntries(Object.entries(n).filter(([,h])=>h!==void 0)),...Array.isArray(s.field)&&Array.isArray(n.field)?{field:[...s.field,...n.field]}:{},stdinJson:void 0},p=Object.keys(s).filter(h=>!c.has(h));return Oe(be(m,p),p)}function ir(e){return mt(JSON.stringify(e))}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="49806fc6-ff49-5b67-9b3f-c182ace00c20")}catch{}})();async function wn(e,t){if(!je(e))return{schema:Y(t.schema),typeDefinitionsFromFile:[]};let n=await Mn(e,t.schema);return{schema:n.schema,typeDefinitionsFromFile:n.type_definitions_from_file??[]}}async function gn(e,t,n,r){let i=B({...t,item_types:{...t.item_types,definitions:[...t.item_types?.definitions??[],...n.typeDefinitionsFromFile]}},V());return(await Fe(e,t.item_format,i.type_to_folder,void 0,n.schema)).flatMap(o=>{let a=o[r];return a==null?[]:[{id:o.id,value:a}]})}function le(e){let t=new Map,n=async r=>{let i=await De(e),o=await wn(e,i),a=new Map;for(let s of await gn(e,i,o,r)){let c=_(s.value);a.set(c,[...a.get(c)??[],s.id])}return a};return{lookup(r){let i=t.get(r)??n(r);return t.set(r,i),i},async recordCreate(r){for(let[i,o]of t){let a=r[i];if(a==null)continue;let s=await o,c=_(a);s.set(c,[...s.get(c)??[],String(r.id)])}},invalidate(){t.clear()}}}async function vn(e,t){let n=_(t.value),r=(await e.lookup(t.key)).get(n)??[];if(r.length!==0)throw new d(`Upsert key "${t.key}" value ${JSON.stringify(n)} now matches existing item ${r.join(", ")}; the plan was resolved before it existed.`,u.CONFLICT,{code:"upsert_key_conflict",required:"Re-plan the document so the row updates the existing item instead of creating a duplicate.",why:"Keyed upsert is resolved before the writer lock, so every remaining create is re-checked under the lock; concurrent imports therefore cannot create two items for one key value.",nextSteps:["Re-run pm item mutate with the same document and --upsert-key; the re-plan turns the row into an update of the existing item.","Inspect the existing item first when its content should win over the document row."]})}function _n(e,t,n){let r=e.metadata[n.key],i=_(n.value);if(_(r)!==i)throw new d(`Item ${t} no longer carries upsert key "${n.key}" value ${JSON.stringify(i)}; the plan selected it before the key changed.`,u.CONFLICT,{code:"upsert_match_changed",required:"Re-plan the document so the row is resolved against the current key values.",why:"Keyed upsert selects its target before the writer lock, so the update re-reads the key under the lock instead of updating a mismatched item blindly.",nextSteps:["Re-run pm item mutate with the same document and --upsert-key; the re-plan creates or re-targets the row from the current key values."]})}function gt(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;let t=e;return typeof t.key=="string"&&t.key.trim().length>0&&t.value!==void 0&&t.value!==null}function K(e,t){let n={...e,...t};return e===void 0?n:W(e,n)}async function S(e,t){try{let n=(await te(t,{},{pmRoot:e})).item;return{id:n.id,closedAt:n.closed_at,updatedAt:n.updated_at,assignee:n.assignee,claimPrincipal:n.claim_principal}}catch(n){if(n instanceof d&&n.exitCode===u.NOT_FOUND)return;throw n}}function me(e,t){let n=e.id.replaceAll(/[^a-zA-Z0-9._-]/gu,"_"),r=ue.createHash("sha256").update(Se(e)).digest("hex").slice(0,12);return`${t+1}-${e.op}-${n}-${r}`}function Sn(e,t){let n=e.id.replaceAll(/[^a-zA-Z0-9._-]/gu,"_");return`${t+1}-${e.op}-${n}`}function v(e,t,n){return`bulk-item-transaction ${e} ${t} ${n}`}async function M(e,t,n,r){let i=await A(l.join(e,"history",`${t}.jsonl`),t),o=v(n,r,"apply"),a=v(n,r,"compensate");for(let s=i.length-1;s>=0;s-=1){let c=i[s].message;if(c===o)return!0;if(c===a)return!1}return!1}async function fe(e,t){let n=await S(e,t.id);if(n?.updatedAt===void 0)throw new d(`Bulk ${t.op} target ${t.id} does not exist or has no restorable version`,u.NOT_FOUND);let r=await A(l.join(e,"history",`${n.id}.jsonl`),n.id);if(r.length===0)throw new d(`Bulk ${t.op} target ${t.id} has no restorable history`,u.NOT_FOUND);return{target_updated_at:n.updatedAt,target_version:String(Z(r)+r.length),target_history_hash:R(r),target_history_length:r.length}}function T(e,t,n){return new d(`Transaction ${e.transactionId} cannot safely compensate incomplete step ${n}; review item ${t} history before recovery.`,u.CONFLICT,{code:"transaction_partial_mutation",item_id:t,required:"Reconcile the item's partial or intervening changes before resuming this transaction.",why:"The retained history does not prove exclusive ownership of the changes to undo. The journal remains compensating instead of claiming a rollback or overwriting another writer.",nextSteps:[`Run pm history ${t} and inspect this transaction's retained compensation data before explicitly restoring or reconciling the item.`]})}function At(e,t){let n=`bulk-item-transaction ${t} `;return[e.message,e.context?.item_transaction_step].some(r=>typeof r=="string"&&r.startsWith(n))}function bn(e,t,n){let{expectedHistory:r,length:i,version:o}=t;if(R(e)===r)return!1;if(typeof i!="number"||!Number.isSafeInteger(i)||i<1||R(e.slice(0,i))!==r||o!==String(Z(e)+i))throw T(n,n.itemId,n.stepId);let a=v(n.transactionId,n.stepId,"apply"),s=e.slice(i),c=f=>f.message===a||f.context?.item_transaction_step===a,m=v(n.transactionId,n.stepId,"compensate");if(s.filter(f=>c(f)||f.message===m).at(-1)?.message===m)return!1;let p=s.filter(c);if(p.length===0)return!1;let h=e.at(-1).after_hash===p.at(-1).after_hash&&s.every(f=>At(f,n.transactionId));if(p.length!==s.length&&!h)throw T(n,n.itemId,n.stepId);return!0}async function L(e,t,n,r){let i=r!==null&&typeof r=="object"&&!Array.isArray(r)?r:void 0;if(i===void 0||typeof i.target_updated_at!="string")return;let o=i.target_updated_at,a=await S(e.pmRoot,t);if(a===void 0)return;let s=await A(l.join(e.pmRoot,"history",`${a.id}.jsonl`),a.id),c=i.target_history_hash;if(typeof c=="string"){if(!bn(s,{expectedHistory:c,length:i.target_history_length,version:i.target_version},{...e,itemId:a.id,stepId:n}))return}else{if(a.updatedAt===o)return;if(!await M(e.pmRoot,a.id,e.transactionId,n))throw T(e,a.id,n)}let m=()=>He(t,typeof i.target_version=="string"?i.target_version:o,{force:!0,author:e.author,message:v(e.transactionId,n,"compensate")},{pmRoot:e.pmRoot});await C({pmRoot:e.pmRoot,id:a.id,validate:p=>{if(X(p)!==s.at(-1).after_hash)throw T(e,a.id,n)}},m)}function Tt(e,t,n){return{id:n,async inspect(){let r=await S(e.pmRoot,t.id);if(r===void 0)return{state:"pending"};if(r.closedAt!==void 0){let i=await A(l.join(e.pmRoot,"history",`${r.id}.jsonl`),r.id),o=`Compensated: interrupted bulk transaction ${e.transactionId}`;if(i.filter(a=>a.op==="close").at(-1)?.patch.some(a=>a.op==="add"||a.op==="replace"?a.path==="/metadata/close_reason"&&a.value===o:!1)??!1)throw new d(`Created item ${r.id} remains closed by transaction compensation; explicitly reopen or reconcile it before retrying.`,u.CONFLICT,{code:"transaction_create_compensated",item_id:r.id,required:"Review the compensated item and explicitly reopen it before retrying the same document.",why:"This item's latest closure belongs to transaction compensation. Automatically reopening it could overwrite later lifecycle decisions.",nextSteps:[`Run pm item reopen ${r.id} "Retry compensated creation" after reviewing its history, then retry the transaction.`]})}return{state:"applied",result:{id:r.id,op:"create"}}},async apply(){t.unique!==void 0&&await vn(e.uniqueIndex,t.unique);let r=await ze(K(t.options,{author:e.author,id:t.id,message:v(e.transactionId,n,"apply")}),{pmRoot:e.pmRoot}),i=r.item;return e.onCreateWarnings?.(String(i.id),r.warnings),await e.uniqueIndex.recordCreate(i),{id:String(i.id),op:"create"}},async compensate(){await En(e,t.id,n)}}}async function En(e,t,n){let r=await S(e.pmRoot,t);if(r===void 0||e.createCompensation==="close"&&r.closedAt!==void 0)return;let i=await A(l.join(e.pmRoot,"history",`${r.id}.jsonl`),r.id),o=v(e.transactionId,n,"apply"),a=v(e.transactionId,n,"compensate"),s=i.filter(c=>c.message===o||c.message===a).at(-1);if(s?.message!==a){if(s===void 0||!i.every(c=>At(c,e.transactionId)))throw T(e,r.id,n);await C({pmRoot:e.pmRoot,id:r.id,validate:c=>{if(X(c)!==i.at(-1).after_hash)throw T(e,r.id,n)}},async()=>{let c={force:!0,author:e.author,message:a};e.createCompensation==="delete"?await Ye(t,c,{pmRoot:e.pmRoot}):await ne(t,`Compensated: interrupted bulk transaction ${e.transactionId}`,c,{pmRoot:e.pmRoot})})}}function On(e,t,n){return{id:n,compensatePending:!0,async inspect(){let r=await S(e.pmRoot,t.id);return r===void 0?{state:"pending"}:await M(e.pmRoot,r.id,e.transactionId,n)?{state:"applied",result:{id:r.id,op:"update"}}:{state:"pending"}},async prepareCompensation(){return fe(e.pmRoot,t)},async apply(){let r=()=>Be(t.id,K(t.options,{author:e.author,message:v(e.transactionId,n,"apply")}),{pmRoot:e.pmRoot}),i=t.match,o=i,a=(await C({pmRoot:e.pmRoot,id:String((await te(t.id,{},{pmRoot:e.pmRoot})).item.id),validate:s=>{o!==void 0&&_n(s,t.id,o)},committed:s=>{i!==void 0&&(o={key:i.key,value:structuredClone(s.metadata[i.key])})},historyContext:{item_transaction_step:v(e.transactionId,n,"apply")}},r)).item;return e.uniqueIndex.invalidate(),{id:String(a.id),op:"update"}},async compensate(r){await L(e,t.id,n,r)}}}function An(e,t,n){return{id:n,async inspect(){let r=await S(e.pmRoot,t.id);return r===void 0?{state:"pending"}:await M(e.pmRoot,r.id,e.transactionId,n)?{state:"applied",result:{id:r.id,op:"close"}}:r.closedAt===void 0?{state:"pending"}:{state:"applied",result:{id:r.id,op:"close"}}},async prepareCompensation(){return fe(e.pmRoot,t)},async apply(){let r=(await ne(t.id,t.reason,K(t.options,{author:e.author,message:v(e.transactionId,n,"apply")}),{pmRoot:e.pmRoot})).item;return e.uniqueIndex.invalidate(),{id:String(r.id),op:"close"}},async compensate(r){await L(e,t.id,n,r)}}}function Tn(e,t,n){return{id:n,async inspect(){let r=await S(e.pmRoot,t.id);return r===void 0?{state:"pending"}:await M(e.pmRoot,r.id,e.transactionId,n)?{state:"applied",result:{id:r.id,op:"release"}}:r.assignee!==void 0||r.claimPrincipal!==void 0?{state:"pending"}:{state:"applied",result:{id:r.id,op:"release"}}},async prepareCompensation(){return fe(e.pmRoot,t)},async apply(){let r=(await Ve(t.id,K(t.options,{author:e.author,message:v(e.transactionId,n,"apply")}),{pmRoot:e.pmRoot})).item;return e.uniqueIndex.invalidate(),{id:String(r.id),op:"release"}},async compensate(r){await L(e,t.id,n,r)}}}function he(e,t,n){let r=me(t,n);switch(t.op){case"create":return Tt(e,t,r);case"update":return On(e,t,r);case"close":return An(e,t,r);case"release":return Tn(e,t,r)}}function $n(e,t){if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError(`Bulk mutation ${t+1} must be an object`);if(!["create","update","close","release"].includes(e.op))throw new TypeError(`Bulk mutation ${t+1} op must be create, update, close, or release`);if(typeof e.id!="string"||e.id.trim().length===0)throw new TypeError(`Bulk mutation ${t+1} requires a non-empty id`);if(e.op==="close"&&(typeof e.reason!="string"||e.reason.trim().length===0))throw new TypeError(`Bulk close mutation ${t+1} requires a non-empty reason`);if(e.op==="create"&&e.unique!==void 0&&!gt(e.unique))throw new TypeError(`Bulk create mutation ${t+1} unique must be an object with a non-empty key and a value`);if(e.op==="update"&&e.match!==void 0&&!gt(e.match))throw new TypeError(`Bulk update mutation ${t+1} match must be an object with a non-empty key and a value`);D(e.options,e.op,t)}function $t(e){if(e.length===0)throw new TypeError("Bulk item transaction requires at least one mutation");let t=new Map;for(let[n,r]of e.entries()){if($n(r,n),r.op!=="create"||r.unique===void 0)continue;let{key:i,value:o}=r.unique,a=t.get(i)??new Map,s=_(o),c=a.get(s);if(c!==void 0)throw new d(`Bulk create mutations ${c+1} and ${n+1} share the upsert key value ${JSON.stringify(s)} for "${i}".`,u.USAGE,{code:"upsert_key_duplicate",required:"Each create must carry a distinct unique key value within one batch.",why:"Direct SDK batches must preserve the same uniqueness invariant as planned document rows."});a.set(s,n),t.set(i,a)}}function kt(e){let t=[...e];return $t(t),t.map(n=>{let r=structuredClone(n);return n.options!==void 0&&r.options!==void 0&&W(n.options,r.options),r})}function Mt(e,t=""){return e===null||typeof e!="object"?[]:Object.entries(e).flatMap(([n,r])=>{let i=`${t}/${n.replaceAll("~","~0").replaceAll("/","~1")}`;return/^(created_at|updated_at|closed_at|completed_at|timestamp)$/u.test(n)?[i]:Mt(r,i)})}async function ce(e,t,n){try{return await n()}catch(r){throw r instanceof d?new d(r.message,r.exitCode,{...r.context,transaction_operation:{index:t,op:e.op,id:e.id}}):r}}function Rt(e,t,n,r){let i=l.relative(e,t),o=i.split(l.sep);return o[0]==="extensions"&&o[2]==="node_modules"&&!r.some(a=>i===a||i.startsWith(`${a}${l.sep}`)||a.startsWith(`${i}${l.sep}`))?!1:["locks","runtime","search"].includes(i.split(l.sep)[0])?r.some(a=>i===a||i.startsWith(`${a}${l.sep}`)||a.startsWith(`${i}${l.sep}`)):i===""||n===void 0||n.some(a=>i===a||i.startsWith(`${a}${l.sep}`)||a.startsWith(`${i}${l.sep}`))}async function G(e,t){let n=await vt(t);if(n.isSymbolicLink())await pe(t);else if(n.isDirectory()||n.isFile())return n;throw k(l.relative(e,t))}async function kn(e,t){let n=await hn(t,se.O_RDONLY|se.O_NOFOLLOW|se.O_NONBLOCK);try{let r=await n.stat();if(!r.isFile())throw k(l.relative(e,t));let i=ue.createHash("sha256");if(r.size>0)for await(let o of n.createReadStream({highWaterMark:64*1024,end:r.size-1,autoClose:!1}))i.update(o);return i.digest()}finally{await n.close()}}async function de(e,t,n){let r=ue.createHash("sha256");async function i(o){for(let a of(await yn(o)).sort()){let s=l.join(o,a);Rt(e,s,t,n)&&((await G(e,s)).isDirectory()?await i(s):(r.update(JSON.stringify(l.relative(e,s))),r.update(await kn(e,s))))}}return await i(e),r.digest("hex")}function x(){return new d("Tracker changed while preparing the transaction preview; retry against stable state.",u.CONFLICT,{code:"transaction_preview_snapshot_changed"})}async function ye(e){if(!z(e))return!1;let t=e.path;if(typeof t!="string")return!1;let n=l.resolve(t),r=n;for(;;)try{let i=await vt(r);return r!==n&&i.isDirectory()}catch(i){if(!z(i))return!1;let o=l.dirname(r);if(o===r)return!1;r=o}}async function q(e,t){let n=l.join(e,t);try{let r=e;for(let i of t.split(l.sep).slice(0,-1))r=l.join(r,i),await G(e,r);if(!(await G(e,n)).isFile())throw k(t);return await Ae(n,k(t))}catch(r){if(await ye(r))return;throw r}}async function It(e,t,n,r){let i=Y(n);for(let[o,a]of Object.entries(i.files)){let s=l.relative(e,Re(e,a,Me[o]));if(s===""||!l.resolve(e,s).startsWith(l.join(e,l.sep)))throw new d("Transaction preview requires schema files inside the selected tracker root; relocate the configured schema file before retrying.",u.USAGE,{code:"transaction_preview_external_schema",field:`schema.files.${o}`});i.files[o]=s;let c=await q(e,s);if(r?.set(s,c),c!==void 0){let m=l.join(t,s);await fn(l.dirname(m),{recursive:!0}),await Et(m,c)}}return Ie(t,i)}async function Mn(e,t){await pe(e);let n=await _t(l.join(Ot(),"pm-schema-plan-"));try{let r=await St(e);return await It(r,l.join(n,"configuration"),t)}catch(r){throw await ye(r)?x():r}finally{await bt(n,{recursive:!0,force:!0})}}async function Rn(e,t,n){let r=new Map,i=await q(e,$);r.set($,i);let o;try{o=JSON.parse(i??"null")}catch{o=null}let a=Ue(o),s=a.success?a.data:void 0,c=await It(e,t,s?.schema,r),m=c.schema,p=l.relative(e,Ce(e));r.set(p,await q(e,p));let h=B({..._e,item_types:{definitions:[...s?.item_types?.definitions??[],...c.type_definitions_from_file??[]]}},n),f=Te(e)===e?[...ve.filter(Boolean),$,xe,"transactions",...h.folders,...r.keys()].map(g=>l.normalize(g)):void 0,y=s===void 0?void 0:JSON.stringify({...o,schema:{...s.schema,files:m.files}});return{configuration:r,ownedPaths:f,stagedSettings:y,registryFolders:h.folders}}async function In(e,t,n){await pe(e);try{let r=await St(e),i=await Rn(r,l.join(l.dirname(t),"configuration"),n),o=[...i.configuration.keys(),...i.registryFolders].map(m=>l.normalize(m)),a=await de(r,i.ownedPaths,o);await mn(r,t,{recursive:!0,dereference:!1,filter:async m=>Rt(r,m,i.ownedPaths,o)?(await G(r,m),!0):!1});let[s,c]=await Promise.all([de(r,i.ownedPaths,o),de(t,i.ownedPaths,o)]);if(a!==s||a!==c)throw x();for(let[m,p]of i.configuration)if(await q(t,m)!==p)throw x();i.stagedSettings!==void 0&&await Et(l.join(t,$),i.stagedSettings)}catch(r){throw await ye(r)?x():r}}async function Ur(e){let t=N(e),n=kt(e.mutations),r=V(),i=await _t(l.join(Ot(),"pm-transaction-preview-")),o=l.join(i,"tracker");try{await In(t.pmRoot,o,r);let a=!1,s=[],c=[],m=new Set;return await Xe({path:o,noExtensions:!0},async()=>{ke(r);let p={...t,pmRoot:o,createCompensation:"close",uniqueIndex:le(o)},h=n.map((f,y)=>{let g=he({...p,onCreateWarnings:(J,we)=>{we.length>0&&s.push({index:y,id:J,op:"create",warnings:we})}},f,y);return{...g,inspect:()=>ce(f,y,()=>g.inspect()),prepareCompensation:()=>ce(f,y,async()=>g.prepareCompensation?.()),apply:()=>ce(f,y,async()=>{let J=await g.apply();return m.add(y),J})}});if(await Q({...t,pmRoot:o,steps:h,onTransition:({transition:f})=>{f==="committed"&&(a=!0)}}),a)for(let[f,y]of n.entries()){let g=(await We(y.id,{path:o},{full:!0})).item;c.push({index:f,id:String(g.id),op:y.op,execution:m.has(f)?"applied":"adopted",item:g,commit_time_fields:Mt(g)})}}),{records:c,validated:a,state:a?"staged_snapshot":"replayed_committed_plan",warnings:s,unresolved_commit_constraints:["concurrent_tracker_changes","extension_mutation_guards_and_hooks","derived_extension_dependencies_excluded","generated_timestamps_and_provenance"]}}finally{await bt(i,{recursive:!0,force:!0})}}async function Cn(e){let t=N(e),n=kt(e.mutations),r=e.createCompensation??"close";if(!["close","delete"].includes(r))throw new TypeError("Bulk item transaction createCompensation must be close or delete");let i={...t,createCompensation:r,uniqueIndex:le(t.pmRoot)},o=await Q({...t,steps:n.map((s,c)=>he(i,s,c)),recoveryData:JSON.parse(JSON.stringify({kind:"item-mutations-v1",mutations:n,createCompensation:r})),...e.lockTtlSeconds===void 0?{}:{lockTtlSeconds:e.lockTtlSeconds},...e.lockWaitMs===void 0?{}:{lockWaitMs:e.lockWaitMs},...e.onTransition===void 0?{}:{onTransition:e.onTransition}}),a={};for(let[s,c]of n.entries()){let m=me(c,s),p=o.results[m];a[Sn(c,s)]=p}return{transactionId:o.transactionId,status:"committed",recovered:o.recovered,results:a}}function Nn(e){let t=[];return e.evidence!==void 0&&Object.keys(e.evidence).length>0&&t.push({op:"update",id:e.id,options:e.evidence}),t.push({op:"close",id:e.id,reason:e.reason,...e.closeOptions===void 0?{}:{options:e.closeOptions}},{op:"release",id:e.id,...e.releaseOptions===void 0?{}:{options:e.releaseOptions}}),t}function jr(e){return Cn({pmRoot:e.pmRoot,transactionId:e.transactionId,author:e.author,mutations:Nn(e),...e.lockTtlSeconds===void 0?{}:{lockTtlSeconds:e.lockTtlSeconds},...e.lockWaitMs===void 0?{}:{lockWaitMs:e.lockWaitMs},...e.onTransition===void 0?{}:{onTransition:e.onTransition}})}var Dr={buildCreateStep:Tt,bulkHistoryMarker:v,compensateByRestore:L,deriveStepId:me,isUpdateMarkerApplied:M,readItemSnapshot:S};async function Fr(e,t){let n=await Ge(e,t);return n===void 0?void 0:{journal:n,planDigest:ee(n)}}function Un(e,t){let n=t.recoveryData;if(n===null||typeof n!="object"||Array.isArray(n)||n.kind!=="item-mutations-v1"||!Array.isArray(n.mutations)||!["close","delete"].includes(String(n.createCompensation)))throw new d("Transaction has no supported item recovery plan",u.CONFLICT,{code:"transaction_recovery_plan_missing",required:"Resume with the original plan and its original adapter.",why:"Legacy or foreign journals cannot safely reconstruct item compensation."});let r=n.mutations;$t(r);let i={...e,createCompensation:n.createCompensation,uniqueIndex:le(e.pmRoot)};return r.map((o,a)=>he(i,o,a))}async function Pr(e){let t=N(e),n=await qe({...e,...t,resolveSteps:r=>Un({...e,...t},r)});return{journal:n,planDigest:ee(n)}}export{Ze as a,tr as b,nr as c,mt as d,_ as e,rr as f,ln as g,ir as h,wn as i,gn as j,Mn as k,Ur as l,Cn as m,Nn as n,jr as o,Dr as p,Fr as q,Pr as r};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{$b as He,Sb as ze,Tb as Be,Vb as ne,Yb as Ve,Za as te,_b as Ye,a as xe,vc as Xe}from"./chunk-EXO4PM5J.js";import{u as We}from"./chunk-PC5DGK3C.js";import{sc as Je}from"./chunk-HXECILIE.js";import{b as N,c as Q,d as Ge,e as ee,f as qe}from"./chunk-547OEGDR.js";import{qa as Ke,vb as U,wa as Le,yb as j}from"./chunk-FRCNYOTG.js";import{Lb as Fe,Mc as Pe,Va as Z,d as be,gb as C,ia as Ne,ka as I,t as Ee,u as Oe,v as W}from"./chunk-MELSYAFE.js";import{Ad as ke,Bd as V,Fa as B,Gf as A,Oa as Te,Vi as Ue,Zi as je,a as Se,ac as $e,ae as Me,ce as Y,de as Re,ej as De,ff as Ce,ge as Ie,ke as O,mi as R,qe as H,ri as X}from"./chunk-C7M54YV6.js";import{A as u,C as d,G as z,I as Ae,J as k,l as ge,q as $,t as ve,y as _e}from"./chunk-O4ZLEN4T.js";import ue from"node:crypto";import{constants as se}from"node:fs";import{cp as mn,lstat as vt,mkdir as fn,mkdtemp as _t,open as hn,readdir as yn,realpath as St,rm as bt,stat as pe,writeFile as Et}from"node:fs/promises";import{tmpdir as Ot}from"node:os";import l from"node:path";import ct from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="01728cbc-2037-50d2-8318-5f106714b8da")}catch{}})();var b=new Set(["id","title","description","type","status","priority","tags","body","deadline","estimated_minutes","acceptance_criteria","definition_of_ready","order","rank","assignee",...ge,"affected_version","fixed_version","component","regression","customer_impact","close_reason","completed_at","dependencies","comments","notes","learnings","files","tests","docs","reminders","events","type_options"]);function Ze(e){if(e===void 0)return;let t=e.replace(/[A-Z]/gu,n=>`_${n.toLowerCase()}`);return b.has(t)?t:e}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6456f85b-e076-5048-9c21-03d477267259")}catch{}})();function D(e,t,n){let r=e?.estimatedMinutes;if(!(r===void 0||typeof r=="string"))throw new d(`Mutation ${n+1} ${t} option "estimatedMinutes" must be a string.`,u.USAGE,{code:"mutation_option_value_invalid",required:'Pass estimatedMinutes as a string, for example "45", in raw mutation options.',why:"Raw options use the create/update command option types; item documents accept numeric estimated_minutes instead.",nextSteps:["Quote the estimatedMinutes value or use an item document with numeric estimated_minutes, then retry the transaction."]})}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a17df3f5-aee8-5734-b1ce-b643482be3a7")}catch{}})();var re=["op","id","reason","options","unique","match"],Ct=[...re,"ref"],Qe=[...Ct,"item"],Nt="mutate-",et="row-",tt=["schema_version","mutations"],dt="[a-z][a-z0-9._-]{0,63}",nt=new RegExp(`^${dt}$`,"u"),ut=new RegExp(`(^|,)id=@(${dt})(?=,|$)`,"gu"),rt=e=>e.slice(2).replaceAll(/-([a-z])/gu,(t,n)=>n.toUpperCase()),F=["item","item_hash","linked","schedule","claim_state","children","omission_receipt","row_contract","context_intent"],pt=new Set(["created_at","updated_at","closed_at","version","format_version","path","author","collection_counts","notes_count","tests_count"]),Ut=new Set([...pt,"completed_at","id"]),lt={create:U.map(e=>e.target),update:j.map(e=>e.target),close:Ke.map(e=>rt(e.flag)).filter(e=>e!=="reason"),release:Le.map(e=>rt(e.flag))};function tr(e){let t=ct.createHash("sha256").update(e).digest("hex");return`${Nt}${t.slice(0,24)}`}function nr(e){let t={},n=e.createCompensation;if(n!==void 0){if(n!=="close"&&n!=="delete")throw new d("createCompensation must be close or delete.",u.USAGE);t.createCompensation=n}for(let r of["lockTtlSeconds","lockWaitMs"]){let i=e[r];if(i===void 0)continue;let o=typeof i=="number"||typeof i=="string"&&i.trim().length>0?Number(i):Number.NaN;if(!Number.isSafeInteger(o)||o<=0)throw new d(`${r} must be a positive safe integer.`,u.USAGE);t[r]=o}return t}function w(e){if(typeof e!="object"||e===null||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function P(e,t){let n=Math.max(1,Math.min(3,Math.floor(e.length/4)+1)),r;for(let i of t){let o=$e(e,i,n);o!==null&&(r===void 0||o<r.distance)&&(r={key:i,distance:o})}return r?.key}function E(e,t,n){let r=P(t,n);return new d(r===void 0?`${e} does not recognize key "${t}". Allowed keys: ${n.join(", ")}.`:`${e} does not recognize key "${t}". Did you mean "${r}"?`,u.USAGE,{code:"stdin_json_unknown_key",required:`Use documented ${e} keys only.`,why:"Strict structured input prevents silent typos from creating incomplete or unintended mutations.",nextSteps:[r===void 0?`Remove or correct "${t}".`:`Replace "${t}" with "${r}".`]})}function ae(e,t){try{return JSON.parse(e)}catch(n){let r=n instanceof Error?n.message:String(n);throw new d(`${t} must be valid JSON: ${r}`,u.USAGE,{code:"stdin_json_invalid",required:`Pipe one valid JSON ${t.toLowerCase()} into stdin.`,why:"Structured mutation input must parse deterministically before any tracker write begins."})}}function jt(e,t){if(!w(e))throw new d(`Mutation ${t+1} must be an object.`,u.USAGE);for(let n of Object.keys(e))if(!re.includes(n))throw E(`mutation ${t+1}`,n,re);return e}function Dt(e,t,n,r){if(e===void 0)return;if(!w(e))throw new d(`Mutation ${n+1} options must be an object.`,u.USAGE);let i=[...lt[t],...ht(t,r)];for(let o of Object.keys(e))if(!i.includes(o))throw E(`mutation ${n+1} ${t} options`,o,i);return D(e,t,n),e}function it(e,t,n,r){if(e===void 0)return;let i=r==="unique"?"create":"update";if(t!==i)throw new d(`Mutation ${n+1} ${r} is only valid for ${i} operations.`,u.USAGE);let o=w(e)&&typeof e.key=="string"?e.key.trim():"";if(!w(e)||o.length===0||e.value===void 0||e.value===null)throw new d(`Mutation ${n+1} ${r} must be an object with a non-empty key and a value.`,u.USAGE);return{key:o,value:e.value}}function Ft(e,t,n){let r=jt(e,t),{op:i,id:o,reason:a}=r;if(i!=="create"&&i!=="update"&&i!=="close"&&i!=="release")throw new d(`Mutation ${t+1} op must be create, update, close, or release.`,u.USAGE);let s=Dt(r.options,i,t,n),c=it(r.unique,i,t,"unique"),m=it(r.match,i,t,"match");if(typeof o!="string"||o.trim().length===0)throw new d(`Mutation ${t+1} requires a non-empty id.`,u.USAGE);let p=o.trim();if(i==="close"){if(typeof a!="string"||a.trim().length===0)throw new d(`Mutation ${t+1} close requires a non-empty reason.`,u.USAGE);return{op:i,id:p,reason:a.trim(),...s===void 0?{}:{options:s}}}if(i==="release")return{op:i,id:p,...s===void 0?{}:{options:s}};if(!w(s))throw new d(`Mutation ${t+1} ${i} requires an options object.`,u.USAGE);return{op:i,id:p,options:s,...c===void 0?{}:{unique:c},...m===void 0?{}:{match:m}}}function mt(e,t={}){let n=ae(e,"Mutation batch"),r=Array.isArray(n)?n:w(n)&&Array.isArray(n.mutations)?n.mutations:void 0;if(r===void 0||r.length===0)throw new d("Mutation batch must be a non-empty JSON array or an object with a non-empty mutations array.",u.USAGE);let i=t.runtimeFields??[];return r.map((o,a)=>{let s=Ft(o,a,i);return s.options!==void 0&&Ee(s.options),s})}function Pt(e,t,n){let r=ct.createHash("sha256").update(e).update("\0").update(t).digest("hex"),i=BigInt(`0x${r.slice(0,16)}`).toString(36).padStart(13,"0").slice(-12);return`${Ne(n)}${i}`}function ot(e,t){if(typeof e!="string"||!e.startsWith("@"))return e;let n=e.slice(1),r=t[n];if(r===void 0)throw new d(`Unknown mutation reference "${e}".`,u.USAGE);return r}function at(e,t){if(typeof e!="string")return e;let n=e.replace(ut,(r,i,o)=>{let a=t[o];if(a===void 0)throw new d(`Unknown mutation reference "@${o}".`,u.USAGE);return`${i}id=${a}`});if(/(^|,)id=@/u.test(n))throw new d(`Malformed mutation reference in dependency "${e}".`,u.USAGE);return n}function xt(e){return typeof e!="string"?[]:e.startsWith("@")?[e.slice(1)]:[...e.matchAll(ut)].map(t=>t[1]).filter(t=>t!==void 0)}function Gt(e,t){let n=new Map;for(let[a,s]of e.entries()){let c=t[a];if(c===void 0)continue;let m=w(s.options)?s.options:{},p=Array.isArray(m.dep)?m.dep:m.dep===void 0?[]:[m.dep];n.set(c,[m.parent,m.blockedBy,...p].flatMap(xt))}let r=new Set,i=new Set,o=a=>{if(r.has(a))throw new d(`Mutation reference cycle includes "@${a}".`,u.USAGE);if(!i.has(a)){r.add(a);for(let s of n.get(a))n.has(s)&&o(s);r.delete(a),i.add(a)}};for(let a of n.keys())o(a)}function qt(e){let t=e.split(/\r?\n/u).map((o,a)=>({line:o.trim(),number:a+1})).filter(o=>o.line.length>0);if(t.length<2)return null;let n=t.map(o=>{try{return{...o,ok:!0,value:JSON.parse(o.line)}}catch(a){return{...o,ok:!1,error:a}}}),r=n[0];if(!r.ok&&(r.line.startsWith("[")||r.line==="{"||n.at(-1).line==="}")||!n.some(o=>o.ok&&w(o.value)))return null;let i=[];for(let o of n){if(!o.ok)throw new d(`Mutation document line ${o.number} must be one valid JSON object: ${Pe(o.error)}`,u.USAGE,{code:"stdin_json_invalid",required:"Provide one JSON object per line (JSON Lines), a JSON array, or a {schema_version, mutations} document.",why:"Structured mutation input must parse deterministically before any tracker write begins."});if(!w(o.value))throw new d(`Mutation document line ${o.number} must be a JSON object.`,u.USAGE);i.push(o.value)}return i}function Kt(e){return Object.hasOwn(e,"mutations")||Object.hasOwn(e,"schema_version")}function Lt(e){let t;try{t=ae(e,"Mutation document")}catch(n){let r=qt(e);if(r===null)throw n;return{schema_version:1,mutations:r}}return Array.isArray(t)?{schema_version:1,mutations:t}:w(t)&&!Kt(t)?{schema_version:1,mutations:[t]}:t}function Jt(e,t){let n=Object.hasOwn(e,"op")?Wt(e,t):zt(e,t);if(n.op==="create"&&n.id===void 0&&w(n.item)&&n.item.id!==void 0){if(typeof n.item.id!="string")throw new d(`Mutation ${t+1} item id must be a string.`,u.USAGE);n.id=n.item.id}return n}function Wt(e,t){for(let n of Object.keys(e))if(!Qe.includes(n))throw E(`mutation ${t+1}`,n,Qe);if(e.item!==void 0&&e.op!=="create")throw new d(`Mutation ${t+1} item documents are only valid for create operations.`,u.USAGE);if(e.item!==void 0&&e.options!==void 0)throw new d(`Mutation ${t+1} must declare either item or options, not both.`,u.USAGE);return{...e}}function zt(e,t){let{ref:n,id:r,item:i,...o}=e,a=i!==void 0?i:o;if(i!==void 0&&Object.keys(o).length>0)throw new d(`Mutation ${t+1} must not mix item document keys with top-level fields.`,u.USAGE);if(!w(a))throw new d(`Mutation ${t+1} item document must be an object.`,u.USAGE);return{op:"create",...n===void 0?{}:{ref:n},...r===void 0?{}:{id:r},item:a}}function Bt(e){let t=Lt(e);if(!w(t))throw new d("Mutation document must be a JSON array or object.",u.USAGE);for(let n of Object.keys(t))if(!tt.includes(n))throw E("mutation document",n,tt);if(t.schema_version!==void 0&&t.schema_version!==1)throw new d("Mutation document schema_version must be 1.",u.USAGE);if(!Array.isArray(t.mutations)||t.mutations.length===0)throw new d("Mutation document requires a non-empty mutations array.",u.USAGE);return t.mutations.map((n,r)=>{if(!w(n))throw new d(`Mutation ${r+1} must be an object.`,u.USAGE);return Jt(n,r)})}function Vt(e,t,n){let r=new Set(Object.values(wt(t,n,Object.create(null))));for(let i of t)i.op==="create"&&typeof i.id=="string"&&i.id.trim().length>0&&r.add(I(i.id,n.idPrefix));return{...e,existing:e.existing.filter(i=>!r.has(i.id))}}function Yt(e){let t=new Set(e.map(n=>n.ref).filter(n=>typeof n=="string"));for(let[n,r]of e.entries()){if(r.op!=="create"||r.ref!==void 0||typeof r.id=="string"&&r.id.trim().length>0)continue;let i=`${et}${n+1}`;if(t.has(i))throw new d(`Mutation ${n+1} receives the synthesized ref "${i}", but another row declares that ref. Rename it or give mutation ${n+1} its own ref; ${et}<n> aliases are reserved for rows without one.`,u.USAGE);r.ref=i}}function ft(e,t,n){let r=ln(JSON.stringify(e),t,{},n);return delete r.stdinJson,delete r.documentAnnotationSnapshot,r}function ht(e,t){return e!=="create"&&e!=="update"?[]:t.filter(n=>n.commands.includes(e)).map(n=>O(n))}function Ht(e,t){for(let n of e)w(n.item)&&(n.options=ft(n.item,"create",t),delete n.item)}function yt(e,t){return t.some(n=>n.metadata_key===e)?e:Ze(e)}function ie(e,t,n){let r=t.replaceAll(/_([a-z])/gu,(a,s)=>s.toUpperCase());if(w(e.item)){if(e.item[t]!==void 0)return e.item[t];if(yt(r,n)===t&&e.item[r]!==void 0)return e.item[r]}let i=w(e.options)?e.options:{},o=n.find(a=>a.metadata_key===t);return o!==void 0&&i[O(o)]!==void 0?i[O(o)]:i[t]!==void 0?i[t]:i[r]!==void 0?i[r]:(Array.isArray(i.field)?i.field:[]).map(String).find(a=>a.startsWith(`${t}=`))?.slice(t.length+1)}function Xt(e,t){return e<t?-1:+(e!==t)}function oe(e){return Array.isArray(e)?e.map(oe):w(e)?Object.fromEntries(Object.entries(e).sort(([t],[n])=>Xt(t,n)).map(([t,n])=>[t,oe(n)])):e}function _(e){return typeof e=="string"?e.trim():JSON.stringify(oe(e))}function Zt(e,t,n,r,i){let o=t.key.trim();if(o.length===0)throw new d("Upsert key must be a non-empty field name.",u.USAGE);let a=Qt(t.existing),s=new Map,c=new Set;for(let[m,p]of e.entries()){if(p.op!=="create")continue;let h=en(p,o,m,s,r),f=tn(a.get(h)??[],o,h);if(f===void 0){p.unique={key:o,value:ie(p,o,r)};continue}let y=I(f,n);typeof p.ref=="string"&&(i[p.ref]=y),nn(p,y,r,{key:o,value:ie(p,o,r)}),c.add(m)}return c}function Qt(e){let t=new Map;for(let n of e){if(n.value===void 0||n.value===null)continue;let r=_(n.value);t.set(r,[...t.get(r)??[],n.id])}return t}function en(e,t,n,r,i){let o=ie(e,t,i);if(o==null||o==="")throw new d(`Mutation ${n+1} is missing the upsert key "${t}".`,u.USAGE,{code:"upsert_key_missing",required:`Every create record must carry a non-empty "${t}" value when --upsert-key ${t} is set.`,why:"Keyed upsert identifies existing items by that field; a record without it cannot be matched or safely created."});let a=_(o),s=r.get(a);if(s!==void 0)throw new d(`Mutations ${s+1} and ${n+1} share the upsert key value ${JSON.stringify(a)} for "${t}".`,u.USAGE,{code:"upsert_key_duplicate",required:"Each record must carry a distinct upsert key value within one batch.",why:"Two records with the same key would race for the same existing item."});return r.set(a,n),a}function tn(e,t,n){if(e.length>1)throw new d(`Upsert key "${t}" value ${JSON.stringify(n)} matches ${e.length} existing items: ${e.join(", ")}.`,u.CONFLICT,{code:"upsert_key_ambiguous",required:"Resolve the duplicate existing items or choose a key that is unique per item.",why:"An ambiguous key cannot select one item to update without guessing."});return e[0]}function nn(e,t,n,r){let i=new Set([...lt.update,...ht("update",n)]),o=w(e.item)?ft(e.item,"update",n):Object.fromEntries(Object.entries(e.options).filter(([a])=>i.has(a)));delete e.item,delete e.ref,e.op="update",e.id=t,e.options=o,e.match=r}function wt(e,t,n){for(let[r,i]of e.entries())if(i.ref!==void 0){if(i.op!=="create")throw new d(`Mutation ${r+1} ref is only valid for create operations.`,u.USAGE);if(typeof i.ref!="string"||!nt.test(i.ref))throw new d(`Mutation ${r+1} ref must match ${nt.source}.`,u.USAGE);if(n[i.ref]!==void 0)throw new d(`Duplicate mutation ref "${i.ref}".`,u.USAGE);n[i.ref]=typeof i.id=="string"&&i.id.trim().length>0?I(i.id,t.idPrefix):Pt(t.transactionId,i.ref,t.idPrefix)}return n}function rr(e,t){let n=Bt(e);Yt(n);let r=n.map(p=>typeof p.ref=="string"?p.ref:void 0),i=Object.create(null),o=t.upsert===void 0?new Set:Zt(n,Vt(t.upsert,n,t),t.idPrefix,t.runtimeFields??[],i);Ht(n,t.runtimeFields??[]),wt(n,t,i),Gt(n,r);let a=n.map(p=>{let h={...p},f=typeof h.ref=="string"?h.ref:void 0;if(delete h.ref,f!==void 0?h.id=i[f]:h.id=ot(h.id,i),w(h.options)){let y={...h.options};for(let g of["parent","blockedBy"])y[g]!==void 0&&(y[g]=ot(y[g],i));Array.isArray(y.dep)?y.dep=y.dep.map(g=>at(g,i)):y.dep!==void 0&&(y.dep=at(y.dep,i)),h.options=y}return h}),s=mt(JSON.stringify(a),{runtimeFields:t.runtimeFields??[]}),c=s.filter(p=>p.op==="create").map(p=>p.id);if(new Set(c).size!==c.length)throw new d("Duplicate resolved create id in mutation document.",u.USAGE);let m=s.map((p,h)=>{let f=r[h];return{index:h,...typeof f=="string"?{ref:f}:{},id:p.id,op:p.op,...o.has(h)?{upserted:!0}:{}}});return{schema_version:1,mutations:s,references:i,rows:m}}function rn(e,t){return t.filter(n=>e[n]!==void 0&&e[n]!==null).map(n=>{let r=String(e[n]);return`${n}=${/[",\n\r\\]/u.test(r)?JSON.stringify(r):r}`}).join(",")}function on(e,t,n){if(e!==void 0){if(!Array.isArray(e)||!e.every(w))throw new d(`${n} must be an array of objects.`,u.USAGE);return e.map(r=>rn(r,t))}}function an(e,t){return e==="tags"&&Array.isArray(t)&&t.every(n=>typeof n=="string")?JSON.stringify(t):typeof t=="number"||typeof t=="boolean"?String(t):t}function st(e,t,n=!1){for(let[r,i,o]of Je){let a=t[r],s=on(n&&["comments","notes","learnings"].includes(r)&&Array.isArray(a)?a.filter(c=>!w(c)||c.created_at===void 0):a,o,r);s!==void 0&&s.length>0&&(e[i]=s)}}function sn(e,t){for(let n of Object.keys(e)){if(t){if(!F.includes(n))throw E("item envelope",n,F);continue}if(!b.has(n)&&P(n,[...b])===void 0&&P(n,F)==="item")throw E("item envelope",n,F)}}function cn(e){let t=Object.hasOwn(e,"item");sn(e,t);let n=t?e.item:e;if(!w(n))throw new d("Item document item must be an object.",u.USAGE);return{item:n,...t&&w(e.linked)?{linked:e.linked}:{}}}function dn(e,t,n,r,i,o){if((r==="update"?Ut:pt).has(t))return;let a=i.find(s=>s.metadata_key===t&&s.commands.includes(r));if(a!==void 0){let s=H(o,a);e[O(a)]=s!==void 0?s:a.type==="array"||a.type==="object"?JSON.stringify(n):n;return}if(!b.has(t)){if(P(t,[...b])!==void 0)throw E("item document",t,[...b]);let s=Array.isArray(e.field)?e.field:[];s.push(`${t}=${typeof n=="string"?n:JSON.stringify(n)}`),e.field=s;return}["dependencies","comments","notes","learnings","files","tests","docs","reminders","events","type_options"].includes(t)||(e[t.replaceAll(/_([a-z])/gu,(s,c)=>c.toUpperCase())]=an(t,n))}function un(e,t,n){let r=new Set(Object.entries(e).filter(([,o])=>o!==void 0).map(([o])=>o)),i=t==="create"?U:j;for(let{target:o,keys:a}of i)a.some(s=>r.has(s))&&r.add(o);for(let o of n)H(e,o)!==void 0&&r.add(O(o));return r}function pn(e,t,n){let r=t==="create"?U:j;for(let{target:i}of r)i!=="field"&&n.has(i)&&delete e[i]}function ln(e,t,n={},r=[]){let i=ae(e,"Item document");if(!w(i))throw new d("Item document must be a JSON object.",u.USAGE);let{item:o,linked:a}=cn(i),s={};for(let[h,f]of Object.entries(o)){let y=yt(h,r);y!==h&&Object.hasOwn(o,y)||dn(s,y,f,t,r,n)}st(s,o,t==="update"),a!==void 0&&st(s,a);let c=un(n,t,r);if(pn(s,t,c),t==="update"){let h=Object.fromEntries(["comments","notes","learnings"].filter(f=>Object.hasOwn(o,f)&&!c.has(f.slice(0,-1))).map(f=>[f,o[f].filter(y=>w(y)&&y.created_at!==void 0)]));Object.keys(h).length>0&&(s.documentAnnotationSnapshot=h)}let m={...s,...Object.fromEntries(Object.entries(n).filter(([,h])=>h!==void 0)),...Array.isArray(s.field)&&Array.isArray(n.field)?{field:[...s.field,...n.field]}:{},stdinJson:void 0},p=Object.keys(s).filter(h=>!c.has(h));return Oe(be(m,p),p)}function ir(e){return mt(JSON.stringify(e))}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="49806fc6-ff49-5b67-9b3f-c182ace00c20")}catch{}})();async function wn(e,t){if(!je(e))return{schema:Y(t.schema),typeDefinitionsFromFile:[]};let n=await Mn(e,t.schema);return{schema:n.schema,typeDefinitionsFromFile:n.type_definitions_from_file??[]}}async function gn(e,t,n,r){let i=B({...t,item_types:{...t.item_types,definitions:[...t.item_types?.definitions??[],...n.typeDefinitionsFromFile]}},V());return(await Fe(e,t.item_format,i.type_to_folder,void 0,n.schema)).flatMap(o=>{let a=o[r];return a==null?[]:[{id:o.id,value:a}]})}function le(e){let t=new Map,n=async r=>{let i=await De(e),o=await wn(e,i),a=new Map;for(let s of await gn(e,i,o,r)){let c=_(s.value);a.set(c,[...a.get(c)??[],s.id])}return a};return{lookup(r){let i=t.get(r)??n(r);return t.set(r,i),i},async recordCreate(r){for(let[i,o]of t){let a=r[i];if(a==null)continue;let s=await o,c=_(a);s.set(c,[...s.get(c)??[],String(r.id)])}},invalidate(){t.clear()}}}async function vn(e,t){let n=_(t.value),r=(await e.lookup(t.key)).get(n)??[];if(r.length!==0)throw new d(`Upsert key "${t.key}" value ${JSON.stringify(n)} now matches existing item ${r.join(", ")}; the plan was resolved before it existed.`,u.CONFLICT,{code:"upsert_key_conflict",required:"Re-plan the document so the row updates the existing item instead of creating a duplicate.",why:"Keyed upsert is resolved before the writer lock, so every remaining create is re-checked under the lock; concurrent imports therefore cannot create two items for one key value.",nextSteps:["Re-run pm item mutate with the same document and --upsert-key; the re-plan turns the row into an update of the existing item.","Inspect the existing item first when its content should win over the document row."]})}function _n(e,t,n){let r=e.metadata[n.key],i=_(n.value);if(_(r)!==i)throw new d(`Item ${t} no longer carries upsert key "${n.key}" value ${JSON.stringify(i)}; the plan selected it before the key changed.`,u.CONFLICT,{code:"upsert_match_changed",required:"Re-plan the document so the row is resolved against the current key values.",why:"Keyed upsert selects its target before the writer lock, so the update re-reads the key under the lock instead of updating a mismatched item blindly.",nextSteps:["Re-run pm item mutate with the same document and --upsert-key; the re-plan creates or re-targets the row from the current key values."]})}function gt(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;let t=e;return typeof t.key=="string"&&t.key.trim().length>0&&t.value!==void 0&&t.value!==null}function K(e,t){let n={...e,...t};return e===void 0?n:W(e,n)}async function S(e,t){try{let n=(await te(t,{},{pmRoot:e})).item;return{id:n.id,closedAt:n.closed_at,updatedAt:n.updated_at,assignee:n.assignee,claimPrincipal:n.claim_principal}}catch(n){if(n instanceof d&&n.exitCode===u.NOT_FOUND)return;throw n}}function me(e,t){let n=e.id.replaceAll(/[^a-zA-Z0-9._-]/gu,"_"),r=ue.createHash("sha256").update(Se(e)).digest("hex").slice(0,12);return`${t+1}-${e.op}-${n}-${r}`}function Sn(e,t){let n=e.id.replaceAll(/[^a-zA-Z0-9._-]/gu,"_");return`${t+1}-${e.op}-${n}`}function v(e,t,n){return`bulk-item-transaction ${e} ${t} ${n}`}async function M(e,t,n,r){let i=await A(l.join(e,"history",`${t}.jsonl`),t),o=v(n,r,"apply"),a=v(n,r,"compensate");for(let s=i.length-1;s>=0;s-=1){let c=i[s].message;if(c===o)return!0;if(c===a)return!1}return!1}async function fe(e,t){let n=await S(e,t.id);if(n?.updatedAt===void 0)throw new d(`Bulk ${t.op} target ${t.id} does not exist or has no restorable version`,u.NOT_FOUND);let r=await A(l.join(e,"history",`${n.id}.jsonl`),n.id);if(r.length===0)throw new d(`Bulk ${t.op} target ${t.id} has no restorable history`,u.NOT_FOUND);return{target_updated_at:n.updatedAt,target_version:String(Z(r)+r.length),target_history_hash:R(r),target_history_length:r.length}}function T(e,t,n){return new d(`Transaction ${e.transactionId} cannot safely compensate incomplete step ${n}; review item ${t} history before recovery.`,u.CONFLICT,{code:"transaction_partial_mutation",item_id:t,required:"Reconcile the item's partial or intervening changes before resuming this transaction.",why:"The retained history does not prove exclusive ownership of the changes to undo. The journal remains compensating instead of claiming a rollback or overwriting another writer.",nextSteps:[`Run pm history ${t} and inspect this transaction's retained compensation data before explicitly restoring or reconciling the item.`]})}function At(e,t){let n=`bulk-item-transaction ${t} `;return[e.message,e.context?.item_transaction_step].some(r=>typeof r=="string"&&r.startsWith(n))}function bn(e,t,n){let{expectedHistory:r,length:i,version:o}=t;if(R(e)===r)return!1;if(typeof i!="number"||!Number.isSafeInteger(i)||i<1||R(e.slice(0,i))!==r||o!==String(Z(e)+i))throw T(n,n.itemId,n.stepId);let a=v(n.transactionId,n.stepId,"apply"),s=e.slice(i),c=f=>f.message===a||f.context?.item_transaction_step===a,m=v(n.transactionId,n.stepId,"compensate");if(s.filter(f=>c(f)||f.message===m).at(-1)?.message===m)return!1;let p=s.filter(c);if(p.length===0)return!1;let h=e.at(-1).after_hash===p.at(-1).after_hash&&s.every(f=>At(f,n.transactionId));if(p.length!==s.length&&!h)throw T(n,n.itemId,n.stepId);return!0}async function L(e,t,n,r){let i=r!==null&&typeof r=="object"&&!Array.isArray(r)?r:void 0;if(i===void 0||typeof i.target_updated_at!="string")return;let o=i.target_updated_at,a=await S(e.pmRoot,t);if(a===void 0)return;let s=await A(l.join(e.pmRoot,"history",`${a.id}.jsonl`),a.id),c=i.target_history_hash;if(typeof c=="string"){if(!bn(s,{expectedHistory:c,length:i.target_history_length,version:i.target_version},{...e,itemId:a.id,stepId:n}))return}else{if(a.updatedAt===o)return;if(!await M(e.pmRoot,a.id,e.transactionId,n))throw T(e,a.id,n)}let m=()=>He(t,typeof i.target_version=="string"?i.target_version:o,{force:!0,author:e.author,message:v(e.transactionId,n,"compensate")},{pmRoot:e.pmRoot});await C({pmRoot:e.pmRoot,id:a.id,validate:p=>{if(X(p)!==s.at(-1).after_hash)throw T(e,a.id,n)}},m)}function Tt(e,t,n){return{id:n,async inspect(){let r=await S(e.pmRoot,t.id);if(r===void 0)return{state:"pending"};if(r.closedAt!==void 0){let i=await A(l.join(e.pmRoot,"history",`${r.id}.jsonl`),r.id),o=`Compensated: interrupted bulk transaction ${e.transactionId}`;if(i.filter(a=>a.op==="close").at(-1)?.patch.some(a=>a.op==="add"||a.op==="replace"?a.path==="/metadata/close_reason"&&a.value===o:!1)??!1)throw new d(`Created item ${r.id} remains closed by transaction compensation; explicitly reopen or reconcile it before retrying.`,u.CONFLICT,{code:"transaction_create_compensated",item_id:r.id,required:"Review the compensated item and explicitly reopen it before retrying the same document.",why:"This item's latest closure belongs to transaction compensation. Automatically reopening it could overwrite later lifecycle decisions.",nextSteps:[`Run pm item reopen ${r.id} "Retry compensated creation" after reviewing its history, then retry the transaction.`]})}return{state:"applied",result:{id:r.id,op:"create"}}},async apply(){t.unique!==void 0&&await vn(e.uniqueIndex,t.unique);let r=await ze(K(t.options,{author:e.author,id:t.id,message:v(e.transactionId,n,"apply")}),{pmRoot:e.pmRoot}),i=r.item;return e.onCreateWarnings?.(String(i.id),r.warnings),await e.uniqueIndex.recordCreate(i),{id:String(i.id),op:"create"}},async compensate(){await En(e,t.id,n)}}}async function En(e,t,n){let r=await S(e.pmRoot,t);if(r===void 0||e.createCompensation==="close"&&r.closedAt!==void 0)return;let i=await A(l.join(e.pmRoot,"history",`${r.id}.jsonl`),r.id),o=v(e.transactionId,n,"apply"),a=v(e.transactionId,n,"compensate"),s=i.filter(c=>c.message===o||c.message===a).at(-1);if(s?.message!==a){if(s===void 0||!i.every(c=>At(c,e.transactionId)))throw T(e,r.id,n);await C({pmRoot:e.pmRoot,id:r.id,validate:c=>{if(X(c)!==i.at(-1).after_hash)throw T(e,r.id,n)}},async()=>{let c={force:!0,author:e.author,message:a};e.createCompensation==="delete"?await Ye(t,c,{pmRoot:e.pmRoot}):await ne(t,`Compensated: interrupted bulk transaction ${e.transactionId}`,c,{pmRoot:e.pmRoot})})}}function On(e,t,n){return{id:n,compensatePending:!0,async inspect(){let r=await S(e.pmRoot,t.id);return r===void 0?{state:"pending"}:await M(e.pmRoot,r.id,e.transactionId,n)?{state:"applied",result:{id:r.id,op:"update"}}:{state:"pending"}},async prepareCompensation(){return fe(e.pmRoot,t)},async apply(){let r=()=>Be(t.id,K(t.options,{author:e.author,message:v(e.transactionId,n,"apply")}),{pmRoot:e.pmRoot}),i=t.match,o=i,a=(await C({pmRoot:e.pmRoot,id:String((await te(t.id,{},{pmRoot:e.pmRoot})).item.id),validate:s=>{o!==void 0&&_n(s,t.id,o)},committed:s=>{i!==void 0&&(o={key:i.key,value:structuredClone(s.metadata[i.key])})},historyContext:{item_transaction_step:v(e.transactionId,n,"apply")}},r)).item;return e.uniqueIndex.invalidate(),{id:String(a.id),op:"update"}},async compensate(r){await L(e,t.id,n,r)}}}function An(e,t,n){return{id:n,async inspect(){let r=await S(e.pmRoot,t.id);return r===void 0?{state:"pending"}:await M(e.pmRoot,r.id,e.transactionId,n)?{state:"applied",result:{id:r.id,op:"close"}}:r.closedAt===void 0?{state:"pending"}:{state:"applied",result:{id:r.id,op:"close"}}},async prepareCompensation(){return fe(e.pmRoot,t)},async apply(){let r=(await ne(t.id,t.reason,K(t.options,{author:e.author,message:v(e.transactionId,n,"apply")}),{pmRoot:e.pmRoot})).item;return e.uniqueIndex.invalidate(),{id:String(r.id),op:"close"}},async compensate(r){await L(e,t.id,n,r)}}}function Tn(e,t,n){return{id:n,async inspect(){let r=await S(e.pmRoot,t.id);return r===void 0?{state:"pending"}:await M(e.pmRoot,r.id,e.transactionId,n)?{state:"applied",result:{id:r.id,op:"release"}}:r.assignee!==void 0||r.claimPrincipal!==void 0?{state:"pending"}:{state:"applied",result:{id:r.id,op:"release"}}},async prepareCompensation(){return fe(e.pmRoot,t)},async apply(){let r=(await Ve(t.id,K(t.options,{author:e.author,message:v(e.transactionId,n,"apply")}),{pmRoot:e.pmRoot})).item;return e.uniqueIndex.invalidate(),{id:String(r.id),op:"release"}},async compensate(r){await L(e,t.id,n,r)}}}function he(e,t,n){let r=me(t,n);switch(t.op){case"create":return Tt(e,t,r);case"update":return On(e,t,r);case"close":return An(e,t,r);case"release":return Tn(e,t,r)}}function $n(e,t){if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError(`Bulk mutation ${t+1} must be an object`);if(!["create","update","close","release"].includes(e.op))throw new TypeError(`Bulk mutation ${t+1} op must be create, update, close, or release`);if(typeof e.id!="string"||e.id.trim().length===0)throw new TypeError(`Bulk mutation ${t+1} requires a non-empty id`);if(e.op==="close"&&(typeof e.reason!="string"||e.reason.trim().length===0))throw new TypeError(`Bulk close mutation ${t+1} requires a non-empty reason`);if(e.op==="create"&&e.unique!==void 0&&!gt(e.unique))throw new TypeError(`Bulk create mutation ${t+1} unique must be an object with a non-empty key and a value`);if(e.op==="update"&&e.match!==void 0&&!gt(e.match))throw new TypeError(`Bulk update mutation ${t+1} match must be an object with a non-empty key and a value`);D(e.options,e.op,t)}function $t(e){if(e.length===0)throw new TypeError("Bulk item transaction requires at least one mutation");let t=new Map;for(let[n,r]of e.entries()){if($n(r,n),r.op!=="create"||r.unique===void 0)continue;let{key:i,value:o}=r.unique,a=t.get(i)??new Map,s=_(o),c=a.get(s);if(c!==void 0)throw new d(`Bulk create mutations ${c+1} and ${n+1} share the upsert key value ${JSON.stringify(s)} for "${i}".`,u.USAGE,{code:"upsert_key_duplicate",required:"Each create must carry a distinct unique key value within one batch.",why:"Direct SDK batches must preserve the same uniqueness invariant as planned document rows."});a.set(s,n),t.set(i,a)}}function kt(e){let t=[...e];return $t(t),t.map(n=>{let r=structuredClone(n);return n.options!==void 0&&r.options!==void 0&&W(n.options,r.options),r})}function Mt(e,t=""){return e===null||typeof e!="object"?[]:Object.entries(e).flatMap(([n,r])=>{let i=`${t}/${n.replaceAll("~","~0").replaceAll("/","~1")}`;return/^(created_at|updated_at|closed_at|completed_at|timestamp)$/u.test(n)?[i]:Mt(r,i)})}async function ce(e,t,n){try{return await n()}catch(r){throw r instanceof d?new d(r.message,r.exitCode,{...r.context,transaction_operation:{index:t,op:e.op,id:e.id}}):r}}function Rt(e,t,n,r){let i=l.relative(e,t),o=i.split(l.sep);return o[0]==="extensions"&&o[2]==="node_modules"&&!r.some(a=>i===a||i.startsWith(`${a}${l.sep}`)||a.startsWith(`${i}${l.sep}`))?!1:["locks","runtime","search"].includes(i.split(l.sep)[0])?r.some(a=>i===a||i.startsWith(`${a}${l.sep}`)||a.startsWith(`${i}${l.sep}`)):i===""||n===void 0||n.some(a=>i===a||i.startsWith(`${a}${l.sep}`)||a.startsWith(`${i}${l.sep}`))}async function G(e,t){let n=await vt(t);if(n.isSymbolicLink())await pe(t);else if(n.isDirectory()||n.isFile())return n;throw k(l.relative(e,t))}async function kn(e,t){let n=await hn(t,se.O_RDONLY|se.O_NOFOLLOW|se.O_NONBLOCK);try{let r=await n.stat();if(!r.isFile())throw k(l.relative(e,t));let i=ue.createHash("sha256");if(r.size>0)for await(let o of n.createReadStream({highWaterMark:64*1024,end:r.size-1,autoClose:!1}))i.update(o);return i.digest()}finally{await n.close()}}async function de(e,t,n){let r=ue.createHash("sha256");async function i(o){for(let a of(await yn(o)).sort()){let s=l.join(o,a);Rt(e,s,t,n)&&((await G(e,s)).isDirectory()?await i(s):(r.update(JSON.stringify(l.relative(e,s))),r.update(await kn(e,s))))}}return await i(e),r.digest("hex")}function x(){return new d("Tracker changed while preparing the transaction preview; retry against stable state.",u.CONFLICT,{code:"transaction_preview_snapshot_changed"})}async function ye(e){if(!z(e))return!1;let t=e.path;if(typeof t!="string")return!1;let n=l.resolve(t),r=n;for(;;)try{let i=await vt(r);return r!==n&&i.isDirectory()}catch(i){if(!z(i))return!1;let o=l.dirname(r);if(o===r)return!1;r=o}}async function q(e,t){let n=l.join(e,t);try{let r=e;for(let i of t.split(l.sep).slice(0,-1))r=l.join(r,i),await G(e,r);if(!(await G(e,n)).isFile())throw k(t);return await Ae(n,k(t))}catch(r){if(await ye(r))return;throw r}}async function It(e,t,n,r){let i=Y(n);for(let[o,a]of Object.entries(i.files)){let s=l.relative(e,Re(e,a,Me[o]));if(s===""||!l.resolve(e,s).startsWith(l.join(e,l.sep)))throw new d("Transaction preview requires schema files inside the selected tracker root; relocate the configured schema file before retrying.",u.USAGE,{code:"transaction_preview_external_schema",field:`schema.files.${o}`});i.files[o]=s;let c=await q(e,s);if(r?.set(s,c),c!==void 0){let m=l.join(t,s);await fn(l.dirname(m),{recursive:!0}),await Et(m,c)}}return Ie(t,i)}async function Mn(e,t){await pe(e);let n=await _t(l.join(Ot(),"pm-schema-plan-"));try{let r=await St(e);return await It(r,l.join(n,"configuration"),t)}catch(r){throw await ye(r)?x():r}finally{await bt(n,{recursive:!0,force:!0})}}async function Rn(e,t,n){let r=new Map,i=await q(e,$);r.set($,i);let o;try{o=JSON.parse(i??"null")}catch{o=null}let a=Ue(o),s=a.success?a.data:void 0,c=await It(e,t,s?.schema,r),m=c.schema,p=l.relative(e,Ce(e));r.set(p,await q(e,p));let h=B({..._e,item_types:{definitions:[...s?.item_types?.definitions??[],...c.type_definitions_from_file??[]]}},n),f=Te(e)===e?[...ve.filter(Boolean),$,xe,"transactions",...h.folders,...r.keys()].map(g=>l.normalize(g)):void 0,y=s===void 0?void 0:JSON.stringify({...o,schema:{...s.schema,files:m.files}});return{configuration:r,ownedPaths:f,stagedSettings:y,registryFolders:h.folders}}async function In(e,t,n){await pe(e);try{let r=await St(e),i=await Rn(r,l.join(l.dirname(t),"configuration"),n),o=[...i.configuration.keys(),...i.registryFolders].map(m=>l.normalize(m)),a=await de(r,i.ownedPaths,o);await mn(r,t,{recursive:!0,dereference:!1,filter:async m=>Rt(r,m,i.ownedPaths,o)?(await G(r,m),!0):!1});let[s,c]=await Promise.all([de(r,i.ownedPaths,o),de(t,i.ownedPaths,o)]);if(a!==s||a!==c)throw x();for(let[m,p]of i.configuration)if(await q(t,m)!==p)throw x();i.stagedSettings!==void 0&&await Et(l.join(t,$),i.stagedSettings)}catch(r){throw await ye(r)?x():r}}async function Ur(e){let t=N(e),n=kt(e.mutations),r=V(),i=await _t(l.join(Ot(),"pm-transaction-preview-")),o=l.join(i,"tracker");try{await In(t.pmRoot,o,r);let a=!1,s=[],c=[],m=new Set;return await Xe({path:o,noExtensions:!0},async()=>{ke(r);let p={...t,pmRoot:o,createCompensation:"close",uniqueIndex:le(o)},h=n.map((f,y)=>{let g=he({...p,onCreateWarnings:(J,we)=>{we.length>0&&s.push({index:y,id:J,op:"create",warnings:we})}},f,y);return{...g,inspect:()=>ce(f,y,()=>g.inspect()),prepareCompensation:()=>ce(f,y,async()=>g.prepareCompensation?.()),apply:()=>ce(f,y,async()=>{let J=await g.apply();return m.add(y),J})}});if(await Q({...t,pmRoot:o,steps:h,onTransition:({transition:f})=>{f==="committed"&&(a=!0)}}),a)for(let[f,y]of n.entries()){let g=(await We(y.id,{path:o},{full:!0})).item;c.push({index:f,id:String(g.id),op:y.op,execution:m.has(f)?"applied":"adopted",item:g,commit_time_fields:Mt(g)})}}),{records:c,validated:a,state:a?"staged_snapshot":"replayed_committed_plan",warnings:s,unresolved_commit_constraints:["concurrent_tracker_changes","extension_mutation_guards_and_hooks","derived_extension_dependencies_excluded","generated_timestamps_and_provenance"]}}finally{await bt(i,{recursive:!0,force:!0})}}async function Cn(e){let t=N(e),n=kt(e.mutations),r=e.createCompensation??"close";if(!["close","delete"].includes(r))throw new TypeError("Bulk item transaction createCompensation must be close or delete");let i={...t,createCompensation:r,uniqueIndex:le(t.pmRoot)},o=await Q({...t,steps:n.map((s,c)=>he(i,s,c)),recoveryData:JSON.parse(JSON.stringify({kind:"item-mutations-v1",mutations:n,createCompensation:r})),...e.lockTtlSeconds===void 0?{}:{lockTtlSeconds:e.lockTtlSeconds},...e.lockWaitMs===void 0?{}:{lockWaitMs:e.lockWaitMs},...e.onTransition===void 0?{}:{onTransition:e.onTransition}}),a={};for(let[s,c]of n.entries()){let m=me(c,s),p=o.results[m];a[Sn(c,s)]=p}return{transactionId:o.transactionId,status:"committed",recovered:o.recovered,results:a}}function Nn(e){let t=[];return e.evidence!==void 0&&Object.keys(e.evidence).length>0&&t.push({op:"update",id:e.id,options:e.evidence}),t.push({op:"close",id:e.id,reason:e.reason,...e.closeOptions===void 0?{}:{options:e.closeOptions}},{op:"release",id:e.id,...e.releaseOptions===void 0?{}:{options:e.releaseOptions}}),t}function jr(e){return Cn({pmRoot:e.pmRoot,transactionId:e.transactionId,author:e.author,mutations:Nn(e),...e.lockTtlSeconds===void 0?{}:{lockTtlSeconds:e.lockTtlSeconds},...e.lockWaitMs===void 0?{}:{lockWaitMs:e.lockWaitMs},...e.onTransition===void 0?{}:{onTransition:e.onTransition}})}var Dr={buildCreateStep:Tt,bulkHistoryMarker:v,compensateByRestore:L,deriveStepId:me,isUpdateMarkerApplied:M,readItemSnapshot:S};async function Fr(e,t){let n=await Ge(e,t);return n===void 0?void 0:{journal:n,planDigest:ee(n)}}function Un(e,t){let n=t.recoveryData;if(n===null||typeof n!="object"||Array.isArray(n)||n.kind!=="item-mutations-v1"||!Array.isArray(n.mutations)||!["close","delete"].includes(String(n.createCompensation)))throw new d("Transaction has no supported item recovery plan",u.CONFLICT,{code:"transaction_recovery_plan_missing",required:"Resume with the original plan and its original adapter.",why:"Legacy or foreign journals cannot safely reconstruct item compensation."});let r=n.mutations;$t(r);let i={...e,createCompensation:n.createCompensation,uniqueIndex:le(e.pmRoot)};return r.map((o,a)=>he(i,o,a))}async function Pr(e){let t=N(e),n=await qe({...e,...t,resolveSteps:r=>Un({...e,...t},r)});return{journal:n,planDigest:ee(n)}}export{Ze as a,tr as b,nr as c,mt as d,_ as e,rr as f,ln as g,ir as h,wn as i,gn as j,Mn as k,Ur as l,Cn as m,Nn as n,jr as o,Dr as p,Fr as q,Pr as r};
|
|
2
|
+
//# sourceMappingURL=chunk-27FG6ROB.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as mi,n as ui,p as fi}from"./chunk-
|
|
1
|
+
import{i as mi,n as ui,p as fi}from"./chunk-OTM6PXZQ.js";import{kc as Rt}from"./chunk-FRCNYOTG.js";import{$a as ni,Ca as Xa,Da as Pe,Ea as it,Eb as si,Fa as Za,Ga as Qa,Ha as ae,Hb as Ot,Ia as Ue,Ib as Ct,Ja as ei,Ka as se,Lb as Ne,Qb as ci,R as Ra,Rb as gn,ab as ai,bb as $e,cb as ii,db as ri,ia as Ee,nd as li,wc as di,yb as oi}from"./chunk-MELSYAFE.js";import{$d as A,Bd as J,Da as Ea,Ea as $a,Ef as q,Fa as W,Fb as Oa,G as Sa,Gf as Ba,Hc as La,Jc as Fa,Li as Ha,Mc as Re,Md as B,Mi as Ka,Na as F,Oa as Ia,Oi as fn,Pa as Ce,Pi as Va,Qa as Aa,Qi as Ya,Rb as T,Ri as Se,Xi as ti,_i as fe,ac as Ca,ae as V,aj as hn,be as Ja,ce as K,d as St,db as H,de as Q,df as ee,e as wa,ea as $t,ed as un,ej as I,f as cn,fa as pn,fb as Ta,fd as Ma,fe as qa,fj as he,g as dn,ga as mn,gb as oe,gd as It,h as ln,he as at,id as ke,j as va,je as Tt,k as ba,kd as xe,n as ka,nc as be,nd as Ua,pd as At,qd as za,rd as Ga,rj as ze,uc as Pa,vc as Na,x as xa,yc as Da,zc as ja,zf as Wa}from"./chunk-C7M54YV6.js";import{f as pi}from"./chunk-RSAN2YUU.js";import{A as h,C as u,E as k,F as Et,G as ve,H as M,K as ue,a as ha,d as xt,m as ga,t as sn,v as ya,y as _a}from"./chunk-O4ZLEN4T.js";import{mkdir as Ds,readFile as js}from"node:fs/promises";import gi from"node:path";import{createHash as Ls}from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="24a18484-0b8b-55d7-aa23-08a23b8d78ce")}catch{}})();var yn=class extends Error{constructor(t="Workspace transaction interrupted"){super(t),this.name="WorkspaceTransactionInterruptedError"}},yi="sdk-workspace-transaction",_i=/^[a-zA-Z0-9._-]+$/,wi=30,vi=3e3;function kn(e,t){if(typeof e!="string")throw new TypeError(`${t} must be a string`);let n=e.trim();if(!n||!_i.test(n))throw new TypeError(`${t} must match [a-zA-Z0-9._-]+`);return n}function _n(e,t){if(typeof e!="string")throw new TypeError(`${t} must be a string`);let n=e.trim();if(!n)throw new TypeError(`${t} must be non-empty`);return n}function xn(e){return{pmRoot:_n(e.pmRoot,"Transaction pmRoot"),transactionId:kn(e.transactionId,"Transaction id"),author:_n(e.author,"Transaction author")}}function Nt(e,t,n){let a=e??t;if(!Number.isInteger(a)||a<=0)throw new TypeError(`${n} must be a positive integer`);return a}function bi(e,t){return gi.join(e,"transactions","sdk",`${t}.json`)}async function ce(e,t){t.updatedAt=T();let n=bi(e,t.transactionId);await Ds(gi.dirname(n),{recursive:!0}),await ue(n,`${JSON.stringify(t,null,2)}
|
|
2
2
|
`)}function Fs(e){return Number.isInteger(e.attempt)&&typeof e.author=="string"&&typeof e.createdAt=="string"&&typeof e.updatedAt=="string"&&Ms(e)}function Ms(e){let t=e.abandonment;return t===void 0?e.schemaVersion===1&&e.status!=="abandoned":e.schemaVersion!==2||t===null||typeof t!="object"||e.status==="committed"?!1:typeof t.reason=="string"&&t.reason.trim().length>0&&typeof t.author=="string"&&t.author.trim().length>0&&(t.supersededBy===void 0||typeof t.supersededBy=="string"&&_i.test(t.supersededBy)&&t.supersededBy!==e.transactionId)}function De(e){return Object.assign(Object.create(null),e)}function ki(e,t){try{let n=JSON.stringify(e,(a,i)=>{if(typeof i=="number"&&!Number.isFinite(i))throw new TypeError(`${t} contains a non-finite number`);if(i===void 0||typeof i=="function"||typeof i=="symbol")throw new TypeError(`${t} contains a non-JSON value`);return i});return JSON.parse(n)}catch(n){throw new TypeError(`${t} must be JSON serializable`,{cause:n})}}function wn(e,t){return e===void 0?void 0:ki(e,t)}function vn(e,t,n,a){let i=wn(n,a);i===void 0?delete e[t]:e[t]=i}function hi(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function bn(e,t){return Array.isArray(e)&&new Set(e).size===e.length&&e.every(n=>typeof n=="string"&&t.includes(n))}function Us(e,t){if(!bn(e.startedStepIds,t)||!bn(e.completedStepIds,t)||!hi(e.results)||!hi(e.compensationData))return!1;let n=e.startedStepIds,a=new Set(n),i=e.completedStepIds,r=new Set(i);return Object.keys(e.compensationData).some(o=>!a.has(o))||Object.keys(e.results).some(o=>!r.has(o))?!1:e.status==="committed"?t.every(o=>r.has(o)):!["compensated","abandoned"].includes(e.status??"")||r.size===0&&a.size===0}function Pt(e,t){return new u(`Workspace transaction ${e} journal is invalid (${t})`,h.CONFLICT,{code:"transaction_journal_invalid",required:"A valid durable journal is required before transaction recovery can continue.",why:"Corrupt journal data cannot establish which steps applied or still require compensation.",nextSteps:["Preserve the journal and inspect its integrity or restore a verified backup before retrying.","Do not switch to a new transaction id to bypass an unreadable journal; previously applied work may remain."]})}function xi(e){return new u(`Workspace transaction ${e} journal does not match the supplied plan`,h.CONFLICT,{code:"transaction_plan_mismatch",required:"Replay the original plan or safely abandon the interrupted transaction before replacing it.",why:"A journal records the plan it is resuming; applying a different plan under the same id could skip or duplicate steps.",nextSteps:["Re-run with the original document to resume or replay it.","For item batches use client.itemTransactions.status(transactionId), then client.itemTransactions.abandon(transactionId, { reason }) before committing a changed plan with a new transactionId.","Run pm ops gc --scope transactions --dry-run to inspect retention; active and explicitly abandoned journals remain protected."]})}function zs(e,t,n){return n===void 0||e.abandonment!==void 0||e.status==="compensated"||t.length===n.length&&t.every((a,i)=>a===n[i])}function Gs(e,t,n){let a;try{a=JSON.parse(e)}catch{throw Pt(t,"invalid JSON")}if(!a||typeof a!="object"||Array.isArray(a))throw Pt(t,"expected an object");let i=a;if(!((i.schemaVersion===1||i.schemaVersion===2)&&i.transactionId===t))throw Pt(t,"schema version or transaction id does not match the journal file");let r=i.stepIds;if(!Array.isArray(r)||!bn(r,r)||!Us(i,r)||!Fs(i)||typeof i.status!="string"||!["applying","compensating","compensated","committed","abandoned"].includes(i.status))throw Pt(t,"invalid lifecycle, metadata, status or step ids");if(!zs(i,r,n))throw xi(t);return{...i,results:De(i.results),compensationData:De(i.compensationData)}}async function Js(e,t,n,a,i){let r=i,o=r!==void 0;if(r?.status==="compensating"&&await Sn(e,r),r===void 0||r.status==="compensated"){let s=T();r={schemaVersion:1,transactionId:t,author:n,status:"applying",attempt:(r?.attempt??0)+1,createdAt:r?.createdAt??s,updatedAt:s,stepIds:a,startedStepIds:[],completedStepIds:[],results:De(),compensationData:De(),...e.recoveryData===void 0?{}:{recoveryData:ki(e.recoveryData,"Transaction recovery data")}},await ce(e.pmRoot,r),await ge(e,r,"prepared")}return{journal:r,recovered:o}}async function qs(e,t,n){try{await Ws(t,e.steps),await ce(e.pmRoot,t);let a=new Set(t.completedStepIds),i=new Set(t.startedStepIds);for(let r of e.steps){if(a.has(r.id))continue;let o=await r.inspect(),s=wn(o.result,`Step ${r.id} result`);if(o.state!=="applied"){let d=await r.prepareCompensation?.();vn(t.compensationData,r.id,d,`Step ${r.id} compensation data`),i.add(r.id),t.startedStepIds=e.steps.map(l=>l.id).filter(l=>i.has(l)),await ce(e.pmRoot,t);let c=await r.apply();s=wn(c,`Step ${r.id} result`)}await ge(e,t,"step_applied",r.id),a.add(r.id),t.completedStepIds=e.steps.map(d=>d.id).filter(d=>a.has(d)),vn(t.results,r.id,s,`Step ${r.id} result`),await ce(e.pmRoot,t),await ge(e,t,"step_recorded",r.id)}return await ge(e,t,"committing"),t.status="committed",await ce(e.pmRoot,t),await ge(e,t,"committed"),{transactionId:t.transactionId,status:"committed",recovered:n,results:De(t.results)}}catch(a){if(a instanceof yn||t.status==="committed")throw a;try{await Sn(e,t)}catch(i){throw new AggregateError([a,i],`Workspace transaction failed and compensation failed: ${String(i)}`,{cause:i})}throw a}}async function Dt(e,t,n){try{return Gs(await js(bi(e,t),"utf8"),t,n)}catch(a){if(a!==null&&typeof a=="object"&&"code"in a&&ve(a))return;throw a}}async function ge(e,t,n,a){await e.onTransition?.({transactionId:t.transactionId,attempt:t.attempt,transition:n,...a===void 0?{}:{stepId:a}})}async function Ws(e,t){let n=new Set,a=De();for(let i of t){let r=await i.inspect();r.state==="applied"&&(n.add(i.id),vn(a,i.id,r.result,`Step ${i.id} result`))}e.results=a,e.completedStepIds=t.map(i=>i.id).filter(i=>n.has(i))}async function Sn(e,t){t.status="compensating",await ce(e.pmRoot,t),await ge(e,t,"compensating");let n=new Set(t.completedStepIds),a=new Set(t.startedStepIds);for(let i of[...e.steps].reverse()){if(!a.has(i.id)&&!n.has(i.id))continue;let r;try{let o=(await i.inspect()).state;r=a.has(i.id)&&(o==="applied"||o==="pending"&&i.compensatePending===!0)}catch{r=a.has(i.id)}r&&(await ge(e,t,"step_compensating",i.id),await i.compensate(t.compensationData[i.id])),n.delete(i.id),a.delete(i.id),t.completedStepIds=e.steps.map(o=>o.id).filter(o=>n.has(o)),t.startedStepIds=e.steps.map(o=>o.id).filter(o=>a.has(o)),delete t.results[i.id],delete t.compensationData[i.id],await ce(e.pmRoot,t),await ge(e,t,"step_compensated",i.id)}t.status="compensated",await ce(e.pmRoot,t),await ge(e,t,"compensated")}async function Si(e){let{pmRoot:t,transactionId:n,author:a}=xn(e),i=Nt(e.lockTtlSeconds,wi,"Transaction lock TTL"),r=Nt(e.lockWaitMs,vi,"Transaction lock wait"),o=[...e.steps];if(o.length===0)throw new TypeError("Workspace transaction requires at least one step");let s=o.map(l=>{let p=kn(l.id,"Transaction step id");if(p!==l.id)throw new TypeError("Transaction step id must not contain surrounding whitespace");return p});if(new Set(s).size!==s.length)throw new TypeError("Workspace transaction step ids must be unique");let d={...e,pmRoot:t,transactionId:n,author:a,steps:o,lockTtlSeconds:i,lockWaitMs:r},c=await ee(t,yi,i,a,!1,!1,r);try{let l=await Dt(t,n,s);if(l?.status==="abandoned"||l?.abandonment!==void 0)throw Ei(l);let p=l!==void 0;if(l?.status==="committed")return{transactionId:n,status:"committed",recovered:!0,results:De(l.results)};let m=await Js(d,n,a,s,l);return await qs(d,m.journal,p||m.recovered)}finally{await c()}}function Ei(e){let t=e.status!=="abandoned",n=e.abandonment.supersededBy,a=n===void 0?`Retry abandonment without supersededBy to finish retirement of ${JSON.stringify(e.transactionId)}.`:`Retry abandonment with supersededBy ${JSON.stringify(n)} to finish retirement of ${JSON.stringify(e.transactionId)}.`;return new u(t?`Transaction ${e.transactionId} retirement is incomplete`:`Transaction ${e.transactionId} has been abandoned`,h.CONFLICT,{code:"transaction_abandoned",required:t?a:"Use a new transactionId for the replacement plan.",why:t?"Forward replay is fenced, but the recorded retirement has not finished. Preserve its replacement identity.":"An explicitly retired transaction identity cannot be resumed.",...t?{retirement:{state:"pending",superseded_by:n??null},nextSteps:[a]}:{}})}async function Uu(e,t){let n=xn({pmRoot:e,transactionId:t,author:"reader"});return Dt(n.pmRoot,n.transactionId)}function Bs(e){return Ls("sha256").update(JSON.stringify(e.stepIds)).digest("hex")}async function zu(e){let t=xn(e),n=_n(e.reason,"Abandonment reason"),a=e.supersededBy===void 0?void 0:kn(e.supersededBy,"Replacement transaction id");if(a===t.transactionId)throw new TypeError("Replacement transaction id must differ from the abandoned id");let i=Nt(e.lockTtlSeconds,wi,"Transaction lock TTL"),r=Nt(e.lockWaitMs,vi,"Transaction lock wait"),o=await ee(t.pmRoot,yi,i,t.author,!1,!1,r);try{let s=await Dt(t.pmRoot,t.transactionId);if(s===void 0)throw new u(`Transaction ${t.transactionId} was not found`,h.NOT_FOUND);if(s.status==="committed")throw new u(`Transaction ${t.transactionId} is committed and cannot be abandoned`,h.CONFLICT,{code:"transaction_committed",required:"Plan a separate explicit corrective mutation.",why:"Recovery cannot silently undo committed work."});if(s.abandonment!==void 0&&s.abandonment.supersededBy!==a)throw Ei(s);if(s.status==="abandoned")return s;let d=e.resolveSteps(structuredClone(s));if(JSON.stringify(d.map(c=>c.id))!==JSON.stringify(s.stepIds))throw xi(t.transactionId);if(s.abandonment===void 0){if(a!==void 0&&await Dt(t.pmRoot,a)!==void 0)throw new u(`Replacement transaction ${a} already exists`,h.CONFLICT);s.schemaVersion=2,s.abandonment={reason:n,author:t.author,...a===void 0?{}:{supersededBy:a}},await ce(t.pmRoot,s)}return s.status!=="compensated"&&await Sn({...e,...t,steps:d},s),await Hs(s,t.pmRoot,i,r),s.status="abandoned",await ce(t.pmRoot,s),s}finally{await o()}}async function Hs(e,t,n,a){let i=Bs(e);if((await Ba(Ka(t),Ha)).some(o=>o.op==="transaction_abandon"&&o.context?.transaction_id===e.transactionId&&o.context?.attempt===e.attempt&&o.context?.plan_digest===i))return;let r=e.abandonment;await Va({pmRoot:t,author:r.author,lockTtlSeconds:n,lockWaitMs:a,op:"transaction_abandon",message:r.reason,context:{transaction_id:e.transactionId,attempt:e.attempt,plan_digest:i,...r.supersededBy===void 0?{}:{superseded_by:r.supersededBy}}})}import Ks from"node:fs/promises";import Vs from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7be00b26-4a56-5399-94f6-f2f67cc5c1e6")}catch{}})();function En(e){return Vs.join(e,"extension-migrations.json")}function $i(e,t){let n=e.definition.id;return typeof n=="string"&&n.trim().length>0?n.trim():`migration-${String(t+1).padStart(3,"0")}`}function Ii(e,t){return`${e.layer}:${e.name}:${t}`}async function Ys(e){let t=En(e);if(!await k(t))return{version:1,updated_at:"",entries:[]};let n=JSON.parse(await Ks.readFile(t,"utf8"));return{version:1,updated_at:typeof n.updated_at=="string"?n.updated_at:"",entries:Array.isArray(n.entries)?n.entries.filter(a=>typeof a?.key=="string"&&(a.status==="applied"||a.status==="failed")):[]}}async function Xs(e,t){let n=await Ys(e),a=new Map(n.entries.map(i=>[i.key,i]));return t.forEach((i,r)=>{let o=$i(i,r),s=a.get(Ii(i,o));s&&(i.definition.status=s.status,s.status==="failed"?i.definition.reason=s.error:(delete i.definition.reason,delete i.definition.error,delete i.definition.message))}),n}async function Zs(e){let t=await Xs(e.pmRoot,e.migrations),n=new Map(t.entries.map(l=>[l.key,l])),a=[],i=!1,r=e.migrations.map((l,p)=>({migration:l,index:p})).filter(({migration:l})=>e.scope===void 0||l.layer===e.scope);for(let{migration:l,index:p}of r){let m=$i(l,p),y=Ii(l,m),g=n.get(y),_=String(l.definition.status??"pending").toLowerCase(),f=g?.status??(_==="applied"||_==="failed"?_:"pending");if(f==="applied"){a.push({key:y,layer:l.layer,extension:l.name,id:m,before:f,outcome:"skipped"});continue}if(e.dryRun===!0){a.push({key:y,layer:l.layer,extension:l.name,id:m,before:f,outcome:"pending"});continue}let w=l.runtime_definition?.run??l.definition.run;if(typeof w!="function"){a.push({key:y,layer:l.layer,extension:l.name,id:m,before:f,outcome:"pending"});continue}let v=new Date().toISOString();try{await Promise.resolve(w({id:m,command:"migration",layer:l.layer,extension:l.name,pm_root:e.pmRoot,status:f}));let E={key:y,layer:l.layer,extension:l.name,id:m,status:"applied",attempted_at:v};n.set(y,E),l.definition.status="applied",delete l.definition.reason,delete l.definition.error,delete l.definition.message,a.push({key:y,layer:l.layer,extension:l.name,id:m,before:f,outcome:"applied"}),i=!0}catch(E){let S=E instanceof Error?E.message:String(E),C={key:y,layer:l.layer,extension:l.name,id:m,status:"failed",attempted_at:v,error:S};n.set(y,C),l.definition.status="failed",l.definition.reason=S,a.push({key:y,layer:l.layer,extension:l.name,id:m,before:f,outcome:"failed",error:S}),i=!0}}if(i){let l=await I(e.pmRoot),p={version:1,updated_at:new Date().toISOString(),entries:[...n.values()].sort((m,y)=>m.key.localeCompare(y.key))};await Se({pmRoot:e.pmRoot,filePath:En(e.pmRoot),raw:`${JSON.stringify(p,null,2)}
|
|
3
3
|
`,op:"extension_migrations_apply",author:e.author,lockTtlSeconds:l.locks.ttl_seconds,lockWaitMs:l.locks.wait_ms})}let o=a.filter(l=>l.outcome==="pending").length,s=a.filter(l=>l.outcome==="applied").length,d=a.filter(l=>l.outcome==="skipped").length,c=a.filter(l=>l.outcome==="failed").length;return{ok:c===0,dry_run:e.dryRun===!0,state_path:En(e.pmRoot),total:a.length,pending_count:o,applied_count:s,skipped_count:d,failed_count:c,migrations:a}}async function Ai(e){let t=await I(e.resolvedRoots.settings_root),n=await ke({pmRoot:e.resolvedRoots.pm_root,settings:t,cwd:process.cwd(),noExtensions:e.global.noExtensions===!0}),a=await xe(n);e.warnings.push(...n.warnings,...a.warnings);let i=await Zs({pmRoot:e.resolvedRoots.pm_root,migrations:a.registrations.migrations,author:typeof e.global.author=="string"&&e.global.author.trim().length>0?e.global.author.trim():"pm-extension-migration",dryRun:e.options.dryRun===!0,...e.scope==="global"?{scope:"global"}:{}});return e.withResult({migration:i,load_failure_count:n.failed.length,activation_failure_count:a.failed.length},i.ok)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="184c43e0-a543-5b0b-ac09-9139ba5ded6a")}catch{}})();var Qs=[["beforeCommand","before_command"],["beforeMutation","before_mutation"],["afterCommand","after_command"],["onWrite","on_write"],["onRead","on_read"],["onIndex","on_index"]];function Ge(e,t={}){let n=new Set;t.extensionName!==void 0&&n.add(At(t.extensionName));for(let f of t.extensionNames??[])n.add(At(f));let a=f=>n.size===0||n.has(At(f)),i=(f,w)=>Ti(f.filter(v=>a(v.name)).map(w)),r=(f,w)=>Ti(f.filter(v=>a(v.name)).flatMap(w)),{registrations:o,commands:s,parsers:d,preflight:c,services:l,renderers:p,hooks:m}=e,y=r(o.relationship_kinds??[],f=>f.definitions.map(w=>w.kind)),g=p.overrides.filter(f=>a(f.name)&&((f.commands?.length??0)>0||f.resultDiscriminator!==void 0)).map(f=>({format:f.format,commands:[...f.commands??[]],result_discriminator:f.resultDiscriminator!==void 0})).sort((f,w)=>f.format.localeCompare(w.format)),_=i(o.assurance_providers??[],f=>f.definition.id);return{capabilities:za(e,t),commands:i(o.commands,f=>f.command),command_overrides:i(s.overrides,f=>f.command),command_handlers:i(s.handlers,f=>f.command),hooks:Qs.filter(([f])=>m[f].some(w=>a(w.name))).map(([,f])=>f),flag_commands:i(o.flags,f=>f.target_command),item_types:r(o.item_types,f=>f.types.map(w=>w.name)),item_fields:r(o.item_fields,f=>f.fields.map(w=>w.name)),...y.length>0?{relationship_kinds:y}:{},migrations:r(o.migrations,f=>typeof f.definition.id=="string"?[f.definition.id]:[]),profiles:i(o.profiles,f=>f.profile.name),importers:i(o.importers,f=>f.importer),exporters:i(o.exporters,f=>f.exporter),search_providers:i(o.search_providers,f=>f.definition.name),vector_store_adapters:i(o.vector_store_adapters,f=>f.definition.name),..._.length>0?{assurance_providers:_}:{},parser_overrides:i(d.overrides,f=>f.command),service_overrides:i(l.overrides,f=>f.service),renderer_overrides:i(p.overrides,f=>f.format),...g.length>0?{renderer_ownership:g}:{},preflight_overrides:c.overrides.filter(f=>a(f.name)).length,preflight_ownership:c.overrides.filter(f=>a(f.name)).map(f=>({commands:[...f.commands??[]]}))}}function Ti(e){return[...new Set(e)].sort((t,n)=>t.localeCompare(n))}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="caa9f916-c7ce-5e74-a00b-dd0fc6a41b5d")}catch{}})();var rt={type:"string",minLength:1,maxLength:128,pattern:"\\S"},jt={type:"array",minItems:1,maxItems:cn,items:rt},Oi={...jt,items:{...rt,pattern:"^(?!(?:.*\\.)?(?:__proto__|constructor|prototype)(?:\\.|$))[a-zA-Z_][a-zA-Z0-9_]*(?:\\.[a-zA-Z_][a-zA-Z0-9_]*){0,7}$"}},ec={type:"object",additionalProperties:!1,required:["id","rule"],properties:{id:{type:"string",minLength:1,maxLength:128,pattern:"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},description:{type:"string",minLength:1,maxLength:500,pattern:"\\S"},effect:{enum:["advise","warn","refuse"]},subject:{type:"object",additionalProperties:!1,properties:{...Object.fromEntries(["types","tags","statuses","operations","parents"].map(e=>[e,jt])),dependency:{type:"object",additionalProperties:!1,required:["kind"],properties:{kind:rt,id:rt}}}},rule:{oneOf:[{type:"object",additionalProperties:!1,required:["kind","fields"],properties:{kind:{const:"require_fields"},fields:Oi}},{type:"object",additionalProperties:!1,required:["kind","authors"],properties:{kind:{const:"authors"},authors:jt}},...["field_writers","approval"].map(e=>({type:"object",additionalProperties:!1,required:["kind","fields","authors"],properties:{kind:{const:e},fields:Oi,authors:jt}})),{type:"object",additionalProperties:!1,required:["kind","allowed"],properties:{kind:{const:"transition"},allowed:{type:"array",maxItems:cn,items:{type:"array",minItems:2,maxItems:2,items:rt}}}}]}}},Qu={$schema:"https://json-schema.org/draft/2020-12/schema",title:"pm workflow policy registry",type:"object",additionalProperties:!1,required:["version","policies"],properties:{version:{const:1},enforcement:{enum:["advise","refuse"],default:"advise"},policies:{type:"array",maxItems:wa,items:ec}}};(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="808f3bb5-cca5-5f9c-b557-7923c79ae6ce")}catch{}})();async function af(e,t,n,a){let i=await $e(e).catch(()=>null);return i===null?{check:{name:"completeness",status:"error",ok:!1,details:{policy_registry_readable:!1,policy_registry_path:"schema/policies.json",remediation_hint:"Repair schema/policies.json, then rerun pm validate."}},warnings:["validate_completeness_policy_registry_unreadable"]}:Ci(i,t,n,a)}function tc(e,t,n){return e===0?"undeclared":t===0?"empty":n===0?"inapplicable":n===t?"covered":"partial"}function Ci(e,t,n=5,a=!1){let i=[],r=new Map,o=e.policies.filter(f=>f.rule.kind==="require_fields"),s=o.filter(f=>f.subject?.operations===void 0),d=new Set,c=0,l=0,p=0,m=0,y=0,g=ka(e);for(let f of t){let w=g({operation:"",author:"",before:f,after:f,completeness_only:!0});c+=+(w.decisions.length>0),l+=w.decisions.length,w.decisions.forEach(S=>d.add(S.policy_id));let v=w.decisions.filter(S=>!S.satisfied);if(v.length===0)continue;m+=1;let E=r.get(f.type)??{items:0,violations:0,missing_fields:0};E.items+=1;for(let S of v)p+=1,E.violations+=1,E.missing_fields+=S.missing_fields.length,S.effect==="refuse"&&(y+=1),i.length<n&&i.push({id:f.id,type:f.type,status:f.status,decision:S});r.set(f.type,E)}let _=a||y>0?"error":p>0?"warn":"ok";return{check:{name:"completeness",status:_,ok:_==="ok",details:{scope:"operation_independent_require_fields",declared_requirement_count:o.length,state_requirement_count:s.length,applicable_requirement_count:d.size,requirement_application_count:l,governed_items:c,ungoverned_items:t.length-c,contract_status:tc(o.length,t.length,c),applied_policy_ids:[...d].sort().slice(0,Math.max(0,n)),applied_policy_ids_truncated:d.size>Math.max(0,n),checked_items:t.length,incomplete_items:m,violation_count:p,refused_violations:y,missing_by_type:Object.fromEntries(r),violations:i,violations_truncated:i.length<p,enforcement:e.enforcement}},warnings:[...p>0?[`validate_completeness_missing_fields:${p}`]:[],...a?["validate_completeness_source_incomplete"]:[]]}}import nc from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="0c3bed4d-4a17-5004-a1c5-65f6acec2a9b")}catch{}})();function ac(){return{version:1,enforcement:"advise",policies:[...[["Epic",["goal","objective","body"]],["Story",["description","value","acceptance_criteria"]],["Decision",["body","resolution"]],["Feature",["acceptance_criteria","expected_result"]],["Task",["description"]],["Issue",["repro_steps","expected_result"]],["Chore",["description"]]].map(([e,t])=>({id:`completeness-${e.toLowerCase()}`,effect:"advise",description:`Evidence expected when ${e} work reaches completion.`,subject:{types:[e],statuses:["closed"]},rule:{kind:"require_fields",fields:[...t]}})),{id:"completeness-resolution",effect:"advise",subject:{statuses:["closed"]},rule:{kind:"require_fields",fields:["resolution","expected_result","actual_result"]}}]}}function Ni(e){let t=e;if(typeof e=="string")try{t=JSON.parse(e)}catch{throw new u("Policy definition must be valid JSON.",h.USAGE)}if(typeof t!="object"||t===null||Array.isArray(t))throw new u("Policy definition must be an object.",h.USAGE);return t}async function ic(e,t){let n=F(process.cwd(),e.path);await ze(n);let a=await I(n);return{pmRoot:n,settings:a,author:q(t,a.author_default)}}function Ri(e,t,n,a){if(e==="policy-mode")return ln({...n,enforcement:t});let i=n.policies.filter(s=>s.id!==t);if(e==="policy-remove")return{...n,policies:i};let r=dn(a.definition),o=ln({...n,policies:[...i,r].sort((s,d)=>s.id.localeCompare(d.id))});if(Buffer.byteLength(`${JSON.stringify(o,null,2)}
|
|
4
4
|
`)>ni)throw new u("Policy registry exceeds its byte ceiling.",h.USAGE);return o}async function Pi(e,t,n,a){if(n.dryRun)return{policy_result:!0,action:e,changed:!1,result:Ri(e,t,await $e(a.pmRoot),n)};let i=await Ya({pmRoot:a.pmRoot,filePath:nc.join(a.pmRoot,"schema","policies.json"),op:`schema:${e}`,author:a.author,message:n.message,lockTtlSeconds:a.settings.locks.ttl_seconds,lockWaitMs:a.settings.locks.wait_ms,mutate(r){let o=Ri(e,t,ai(r),n);return{raw:`${JSON.stringify(o,null,2)}
|
|
@@ -67,4 +67,4 @@ Agent guidance check
|
|
|
67
67
|
`),X.write(`Telemetry helps improve reliability. The choice applies to this CLI install; change it with pm config global set telemetry-tracking.
|
|
68
68
|
`);let l=await n.question(`Enable telemetry for this CLI install? [${t?"Y/n":"y/N"}] `);c=vs(l,t)}return X.write(`
|
|
69
69
|
`),{prefix:r,preset:d,telemetry_enabled:c}}finally{n.close()}}function uu(e){return{presetFromOption:pa(e.preset),useDefaults:e.defaults===!0,authorFromOption:gs(e.author),installBundledPackages:e.withPackages===!0,agentGuidanceMode:ws(e.agentGuidance),typePreset:hs(e.typePreset)}}function fu(e){let t=[];return e.prefixArg!==void 0&&e.settings.id_prefix!==e.normalizedPrefix&&t.push("id_prefix"),e.presetFromOption!==void 0&&e.settings.governance.preset!==e.presetFromOption&&t.push("governance_preset"),e.authorFromOption!==void 0&&e.settings.author_default!==e.authorFromOption&&t.push("author_default"),t}function hu(e,t,n,a){if(t.length===0||n)return;let i=a.discovery==="ancestor";throw new u(`${i?`No tracker exists in ${a.requested_cwd}; pm init found an ancestor tracker at ${a.tracker_root}. `:""}Refusing to update existing tracker settings at ${e} without --force.`,h.USAGE,{code:"init_existing_settings_requires_force",type:"urn:pm-cli:error:init_existing_settings_requires_force",required:`--force for ${t.join(", ")}`,why:i?"Ancestor discovery is useful for normal commands, but init must make the selected existing workspace explicit before changing its identity or policy settings.":"pm init is safe to rerun, but changing id prefix, governance preset, or default author on an existing tracker can corrupt long-lived project context when an agent meant to initialize a sandbox path.",resolved_path:a.tracker_root,requested_path:a.requested_cwd,suggested_path:a.suggested_current_tracker_root,examples:["pm init --yes","pm init ./sandbox-pm --yes",...i?['pm init <name> --yes --pm-path "$PWD/.agents/pm"']:[],"pm init acme --yes --force"],nextSteps:[...i?['To create a new tracker in the current directory, rerun with --pm-path "$PWD/.agents/pm".']:[],"If you meant to initialize a sandbox tracker, pass a path-like positional such as ./sandbox-pm or /tmp/pm-test.","If you intentionally want to rewrite this existing tracker's init-managed settings, rerun with --force."]})}function gu(e){let t=!1;return e.prefixArg!==void 0&&e.settings.id_prefix!==e.normalizedPrefix&&(e.settings.id_prefix=e.normalizedPrefix,e.warnings.push(`updated:id_prefix:${e.normalizedPrefix}`),t=!0),e.presetFromOption!==void 0&&e.settings.governance.preset!==e.presetFromOption&&(ma(e.settings,e.presetFromOption),e.warnings.push(`updated:governance_preset:${e.presetFromOption}`),t=!0),e.authorFromOption!==void 0&&e.settings.author_default!==e.authorFromOption&&(e.settings.author_default=e.authorFromOption,e.warnings.push(`updated:author_default:${e.authorFromOption}`),t=!0),t}async function yu(e){let t=await I(e.pmRoot);e.warnings.push(`already_exists:${e.settingsPath}`);let n=fu({settings:t,normalizedPrefix:e.normalizedPrefix,prefixArg:e.prefixArg,presetFromOption:e.normalizedOptions.presetFromOption,authorFromOption:e.normalizedOptions.authorFromOption});return hu(e.settingsPath,n,e.options.force===!0,e.target),gu({settings:t,normalizedPrefix:e.normalizedPrefix,prefixArg:e.prefixArg,presetFromOption:e.normalizedOptions.presetFromOption,authorFromOption:e.normalizedOptions.authorFromOption,warnings:e.warnings})&&await he(e.pmRoot,t),{settings:t,normalizedPrefix:e.normalizedPrefix,chosenPreset:e.normalizedOptions.presetFromOption,wizardUsed:!1}}async function _u(e){let t=e.normalizedPrefix,n=e.normalizedOptions.presetFromOption,a,i=!1;if(e.normalizedOptions.presetFromOption===void 0&&!e.normalizedOptions.useDefaults&&process.stdin.isTTY===!0&&process.stdout.isTTY===!0){let c=await $s(t,await wu());t=c.prefix,n=c.preset,a=c.telemetry_enabled,i=!0}let r=n??"minimal",o=lu();o.id_prefix=t,ma(o,r);let s=Wa()?.trim()||void 0;o.author_default=e.normalizedOptions.authorFromOption??s??"";let d=Is(e.pmRoot);return a!==void 0&&(o.telemetry.enabled=a,o.telemetry.first_run_prompt_completed=!0),await he(e.pmRoot,o,void 0,d),a!==void 0&&d.omitSections&&await vu(a,e.warnings),{settings:o,normalizedPrefix:t,chosenPreset:n,wizardUsed:i}}function Is(e){return P.resolve(e)===P.resolve(Ce(process.cwd()))?{}:{omitSections:["telemetry"]}}async function wu(){let e=await I(Ce(process.cwd()));if(!(di().telemetry_disabled||e.telemetry.first_run_prompt_completed||hn(e)))return e.telemetry.enabled}async function vu(e,t){let n=Ce(process.cwd()),a=await I(n);if(hn(a)){t.push("telemetry_consent_not_recorded:global_settings_unreadable");return}let i=!1;a.telemetry.enabled=e,a.telemetry.first_run_prompt_completed=!0,await he(n,a,"telemetry:first_run_prompt",{skipIfStored:r=>i=r.telemetry?.first_run_prompt_completed===!0}),i&&t.push("telemetry_consent_kept:recorded_while_prompting")}async function bu(e){let{telemetry:t}=await I(Ce(process.cwd()));return{...e,telemetry:{...e.telemetry,enabled:t.enabled,first_run_prompt_completed:t.first_run_prompt_completed,capture_level:t.capture_level}}}async function ps(e){return e.settingsExists?await yu(e):await _u({pmRoot:e.pmRoot,normalizedPrefix:e.normalizedPrefix,normalizedOptions:e.normalizedOptions,warnings:e.warnings})}async function ku(e){let t=await ls({pm_root:e.pmRoot,cwd:e.cwd,mode:e.agentGuidanceMode,interactive:process.stdin.isTTY===!0&&process.stdout.isTTY===!0,settings:e.settings});return e.warnings.push(...t.warnings),t.settings_changed&&await he(e.pmRoot,e.settings,void 0,Is(e.pmRoot)),{...t.summary,next_steps:t.next_steps}}async function xu(e,t){let n=[],a=[],i=await qa(e,t.schema);for(let r of i.created_paths)n.push(r),a.push(...await B({path:r,scope:"project",op:"init:runtime_schema_file"}));return{createdDirs:n,warnings:a}}async function Su(e){if(e.typePreset===void 0)return;let t=await ks(e.pmRoot,e.settings,e.typePreset);return e.warnings.push(`registered_type_preset:${e.typePreset}`),e.warnings.push(...await B({path:t.file,scope:"project",op:"init:type_preset"})),t}async function Eu(e){let t=W(e.settings,J()).folders.filter(a=>!sn.includes(a)),n=await Es(e.pmRoot,t);e.createdDirs.push(...n.createdDirs),e.warnings.push(...n.warnings)}function $u(e){let t=P.resolve(e.tracker_root),n=P.dirname(t);return P.basename(t)==="pm"&&P.basename(n)===".agents"?P.dirname(n):e.workspace_root}async function Iu(e,t,n,a){if(!e)return;let i=await na("all",{install:!0,project:!0},{...t,path:n});a.push(...i.warnings);let r=bs(i),o=r.packages.filter(s=>!s.ok).map(s=>s.alias);if(!r.installed_all||o.length>0)throw new u(`pm init --with-packages did not install all bundled packages successfully${o.length>0?`: ${o.join(", ")}`:"."}`,h.GENERIC_FAILURE);return r}function As(e){let t=a=>oe([...e.target.mode==="workspace-discovery"?[]:["--pm-path",e.target.tracker_root],...a]),n=[`Create your first item: ${t(["create","--type","Task","--title","<title>"])}`,`List active items: ${t(["list"])}`,`Get agent-friendly project context: ${t(["context"])}`];e.installBundledPackages?n.push(`Explore newly-available commands: ${t(["cal"])}, ${t(["templates"])}, ${t(["guide"])}`):(n.push(`Add optional packages for richer workflows: ${t(["install","calendar","--project"])}, ${t(["install","templates","--project"])}, ${t(["install","guide-shell","--project"])}`),n.push(`Or install everything bundled: ${t(["init","--with-packages"])} (idempotent on re-run)`)),e.registeredTypePreset&&n.push(`Inspect registered preset types: ${t(["schema","list"])}, ${t(["schema","show",e.registeredTypePreset.registered[0]??e.registeredTypePreset.updated[0]])}`),n.push("Supported agent harnesses are attributed automatically; use --author or PM_AUTHOR only when an explicit identity override is required.");for(let a of e.agentGuidanceNextSteps){let i=e.target.mode==="workspace-discovery"?a:a.replace(/\bpm (?=[a-z])/g,()=>`${t([])} `);n.includes(i)||n.push(i)}return n}async function Ts(e,t,n,a=fi){if(t===null){n.push("merge_fence_skipped:not_git_repository:run pm merge install after moving the tracker into a Git repository");return}try{let i=await a({pmRoot:e,workspaceRoot:t});i.gitattributes.changed&&n.push(`updated:merge_fence:${i.gitattributes.path}`)}catch(i){if(!(i instanceof u))throw i;n.push(`merge_fence_skipped:install_failed:${i.context.code??"pm_error"}:${i.message}:run pm merge install after resolving the Git repository error`)}}async function Au(e,t,n,a){if(e==null||n==="status")return;let i=await pi(e,{pmRoot:t});i.changed&&a.push(`updated:gitignore:${i.path}`)}async function uv(e,t,n={}){let a=t[cu],i=typeof a=="string"?a:process.cwd(),r=ys(i,t,e,n.workspace),o=r.pmRoot;e=_s(r.prefixArg,n.idPrefix);let s=uu(n);await Ss(o,r.target.mode==="tracker-path",n.force===!0);let d=[],c=[],l=P.join(o,"settings.json"),p=await k(l),m;p&&(m=await ps({pmRoot:o,settingsPath:l,settingsExists:p,normalizedPrefix:Ee(e),prefixArg:e,options:n,normalizedOptions:s,warnings:c,target:r.target}));let y=await Es(o,sn);d.push(...y.createdDirs),c.push(...y.warnings),m??=await ps({pmRoot:o,settingsPath:l,settingsExists:p,normalizedPrefix:Ee(e),prefixArg:e,options:n,normalizedOptions:s,warnings:c,target:r.target});let{settings:g}=m,_=$u(r.target),f=await mi(_??P.dirname(o)),w=_??f,v=await ku({pmRoot:o,cwd:w??i,agentGuidanceMode:s.agentGuidanceMode,settings:g,warnings:c}),E=await xu(o,g);d.push(...E.createdDirs),c.push(...E.warnings);let S=await Su({pmRoot:o,settings:g,typePreset:s.typePreset,warnings:c});S&&(g=await I(o)),await Eu({pmRoot:o,settings:g,createdDirs:d,warnings:c}),await Au(w,o,s.agentGuidanceMode,c),!p&&n.mergeFence!==!1&&s.agentGuidanceMode!=="status"&&await Ts(o,f,c);let C=await Iu(s.installBundledPackages,t,o,c),ne=As({installBundledPackages:s.installBundledPackages,registeredTypePreset:S,agentGuidanceNextSteps:v.next_steps,target:r.target});return{ok:!0,path:o,target:r.target,settings:await bu(g),created_dirs:d,warnings:c,governance_preset:g.governance.preset,wizard_used:m.wizardUsed,...S?{registered_type_preset:S}:{},...C?{installed_packages:C}:{},next_steps:ne,agent_guidance:v}}export{yn as a,xn as b,Si as c,Uu as d,Bs as e,zu as f,En as g,Ys as h,Xs as i,Zs as j,Ai as k,Jl as l,Ge as m,Ji as n,We as o,Be as p,qi as q,Ui as r,Je as s,qe as t,zi as u,ec as v,Qu as w,af as x,Ci as y,ac as z,bf as A,Yi as B,er as C,Gc as D,Jc as E,xy as F,$y as G,Iy as H,_t as I,Ay as J,Ty as K,Oy as L,Cy as M,Ry as N,Py as O,Ny as P,Dy as Q,jy as R,Ly as S,Fy as T,My as U,Uy as V,zy as W,Gy as X,Jy as Y,qy as Z,Wy as _,By as $,Hy as aa,Ky as ba,Vy as ca,Yy as da,Xy as ea,Zy as fa,Z as ga,b as ha,Rn as ia,od as ja,le as ka,Ft as la,qc as ma,ot as na,Mt as oa,hr as pa,Sr as qa,Wn as ra,Lr as sa,hg as ta,so as ua,pp as va,wo as wa,vo as xa,Xn as ya,Vr as za,Fl as Aa,$p as Ba,Xr as Ca,na as Da,Zo as Ea,Uw as Fa,ls as Ga,cu as Ha,pv as Ia,mv as Ja,uv as Ka};
|
|
70
|
-
//# sourceMappingURL=chunk-
|
|
70
|
+
//# sourceMappingURL=chunk-547OEGDR.js.map
|