@unbrained/pm-cli 2026.9.15 → 2026.9.17
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 +2 -2
- package/CHANGELOG.md +58 -0
- package/dist/cli/error-guidance.d.ts +1 -1
- package/dist/cli/error-guidance.js +1 -1
- package/dist/cli/register-setup.js +1 -1
- package/dist/cli-bundle/bundle-manifest.json +149 -149
- package/dist/cli-bundle/chunks/{chunk-3RB6Z7XE.js → chunk-5ZY4WE3F.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UKLOSZV6.js → chunk-C3MFMGCR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WLJJ4MAU.js → chunk-CPFBDM53.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YMMLKKEP.js → chunk-DN2RIHRN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5P5PYCZX.js → chunk-E67MIO3Z.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3AHONKLL.js → chunk-G2IJF244.js} +48 -48
- package/dist/cli-bundle/chunks/{chunk-RM2OGG65.js → chunk-LD2FH2YE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RKPUO75B.js → chunk-Q6KPZGMP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Y2P3DSSO.js → chunk-T526C5DX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BOZ4HVYL.js → chunk-UF75LUAK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-J4DRE3WN.js → chunk-UJSB6NO6.js} +76 -76
- package/dist/cli-bundle/chunks/{chunk-WDF7PP4P.js → chunk-YZXB4XGA.js} +4 -4
- package/dist/cli-bundle/chunks/{register-list-query-IWSPNFFD.js → register-list-query-ISM35VIX.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-3DVF4R64.js → register-mutation-KHMBJJS6.js} +2 -2
- package/dist/cli-bundle/chunks/{register-operations-LXP3MECQ.js → register-operations-HHDROJD6.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-KFQSNBDX.js → register-setup-YAURJMY5.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-533DCWPY.js → chunk-267N774W.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ZHX3433X.js → chunk-5FSGN4MP.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-BMATJLPT.js → chunk-5KYHDFDN.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-SHF57M2H.js → chunk-7S7XWMXC.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-AXDAIBT3.js → chunk-7ZC4CKOX.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-JKJYXCT6.js → chunk-BFUXTNZU.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-PBJC2ZNA.js → chunk-G4TKJZ4A.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ZOE2NSJB.js → chunk-GKSAMNBG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-63YRRGKX.js → chunk-IVWUQE7T.js} +51 -51
- package/dist/cli-bundle/focused-chunks/{chunk-6C3CUU2G.js → chunk-JZSLDLR4.js} +20 -20
- package/dist/cli-bundle/focused-chunks/{chunk-YBQTVE5S.js → chunk-LNM3BS45.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-5SBU4QDC.js → chunk-NOK652OP.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-OGGF2RBL.js → chunk-OCTTDZOU.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-MD7ADLME.js → chunk-OWDDVMAP.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-UACMCSCC.js → chunk-WUMGGQYN.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-4YTDKIPF.js → chunk-Z4PWEIMX.js} +21 -21
- package/dist/cli-bundle/main.js +11 -10
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +1 -1
- package/dist/cli-bundle/sdk-core.js +2 -2
- 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 +40 -40
- 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 +2 -2
- package/dist/core/diagnostics/remediation.js +1 -1
- package/dist/core/store/tracker-preflight.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/index.d.ts +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/init.d.ts +22 -1
- package/dist/sdk/init.js +1 -1
- package/dist/sdk/merge/install.js +2 -2
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/read-output-budget.d.ts +2 -0
- package/dist/sdk/read-output-budget.js +1 -1
- package/dist/sdk/read-output-contracts.d.ts +4 -0
- package/dist/sdk/read-output-contracts.js +1 -1
- package/docs/MERGE_SAFETY.md +13 -2
- package/docs/PACKED_FIRST_RUN.md +46 -0
- package/docs/QUICKSTART.md +16 -0
- package/docs/READ_OUTPUT_CONTRACTS.md +14 -0
- package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +6 -3
- package/marketplace.json +2 -2
- package/package.json +1 -1
- 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-codex/.codex-plugin/plugin.json +1 -1
|
@@ -1,38 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
|
-
"generation": "
|
|
3
|
+
"generation": "6c896f67b60d1e827651bb0235713d14dce3216253512d186b8858ffe65d309e",
|
|
4
4
|
"files": [
|
|
5
5
|
{
|
|
6
|
-
"path": "chunks/chunk-
|
|
7
|
-
"sha256": "
|
|
6
|
+
"path": "chunks/chunk-5ZY4WE3F.js",
|
|
7
|
+
"sha256": "ae63d5ea59c8083beb084de88dde20723119a1798400558e52064042d48a21a6"
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
|
-
"path": "chunks/chunk-
|
|
11
|
-
"sha256": "c1314c6e5a6d5d297cb6ab27ed65771db18689ec708aeb1d707ada9860b6756d"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"path": "chunks/chunk-3RB6Z7XE.js",
|
|
15
|
-
"sha256": "92f9842c7a927e14053010da35cce916f5bc631f93a0a5d44d2b88604951daf4"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"path": "chunks/chunk-3RB6Z7XE.js.map",
|
|
10
|
+
"path": "chunks/chunk-5ZY4WE3F.js.map",
|
|
19
11
|
"sha256": "9896c6afbbc7d8768ce5d0813fe4f33f36f6423e3566dc4b87c21d22ad92ebdc"
|
|
20
12
|
},
|
|
21
13
|
{
|
|
22
|
-
"path": "chunks/chunk-
|
|
23
|
-
"sha256": "
|
|
14
|
+
"path": "chunks/chunk-C3MFMGCR.js",
|
|
15
|
+
"sha256": "c4ff5c975638e3849bfdef3c87cb72f074e0a6f5b045530db96ed6f9df92d71b"
|
|
24
16
|
},
|
|
25
17
|
{
|
|
26
|
-
"path": "chunks/chunk-
|
|
27
|
-
"sha256": "
|
|
18
|
+
"path": "chunks/chunk-C3MFMGCR.js.map",
|
|
19
|
+
"sha256": "053120487fbd1b95278db3f9923a893a5d2321e4bb97dc03945cc1aa5ec48f68"
|
|
28
20
|
},
|
|
29
21
|
{
|
|
30
|
-
"path": "chunks/chunk-
|
|
31
|
-
"sha256": "
|
|
22
|
+
"path": "chunks/chunk-CPFBDM53.js",
|
|
23
|
+
"sha256": "2e67940abc836fd0d6a944af90931bcb0a0601e7c2052b1d61077d7962f3d115"
|
|
32
24
|
},
|
|
33
25
|
{
|
|
34
|
-
"path": "chunks/chunk-
|
|
35
|
-
"sha256": "
|
|
26
|
+
"path": "chunks/chunk-CPFBDM53.js.map",
|
|
27
|
+
"sha256": "070130cd3399cdec937dc38efe5e9b2564ae21352b7d1a2b9d13759ba4881303"
|
|
36
28
|
},
|
|
37
29
|
{
|
|
38
30
|
"path": "chunks/chunk-DEZPZOQ7.js",
|
|
@@ -43,29 +35,45 @@
|
|
|
43
35
|
"sha256": "ed562b0bba7ee7214e56ac7f728054b3496bec4597c94a4eb7b4179e6f5cb1c9"
|
|
44
36
|
},
|
|
45
37
|
{
|
|
46
|
-
"path": "chunks/chunk-
|
|
47
|
-
"sha256": "
|
|
38
|
+
"path": "chunks/chunk-DN2RIHRN.js",
|
|
39
|
+
"sha256": "b54ff056fe28b30af1fb8399144743b539bb5f0c3e6e3e9205f0f09a2303f4b3"
|
|
48
40
|
},
|
|
49
41
|
{
|
|
50
|
-
"path": "chunks/chunk-
|
|
51
|
-
"sha256": "
|
|
42
|
+
"path": "chunks/chunk-DN2RIHRN.js.map",
|
|
43
|
+
"sha256": "0200c9615da175537e969f543b56abac48b061648ad398b9bf42c17baf2fcb99"
|
|
52
44
|
},
|
|
53
45
|
{
|
|
54
|
-
"path": "chunks/chunk-
|
|
55
|
-
"sha256": "
|
|
46
|
+
"path": "chunks/chunk-E67MIO3Z.js",
|
|
47
|
+
"sha256": "42b0cb59be0fb66416e615c8114948b7e0d74962eaf7da65d768ad26b2ee79a1"
|
|
56
48
|
},
|
|
57
49
|
{
|
|
58
|
-
"path": "chunks/chunk-
|
|
59
|
-
"sha256": "
|
|
50
|
+
"path": "chunks/chunk-E67MIO3Z.js.map",
|
|
51
|
+
"sha256": "4aa0ba42b34a4b31464888bae04a1b908f072c323521ee6a7d02037b8177c3c8"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"path": "chunks/chunk-G2IJF244.js",
|
|
55
|
+
"sha256": "34c494feb41dd23ec2e5d333b574dd18acda94a5aba163ba90317d21be0faf27"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"path": "chunks/chunk-G2IJF244.js.map",
|
|
59
|
+
"sha256": "bc4776012157307e52972abb65dcb2a8dd20b4c5bdef5ebf0325948d34ed6ec4"
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
|
-
"path": "chunks/chunk-
|
|
63
|
-
"sha256": "
|
|
62
|
+
"path": "chunks/chunk-LD2FH2YE.js",
|
|
63
|
+
"sha256": "519b01727bf8daebab63722472db0ad36783bb3ba8f5f25b8cb25ed1d6fe49d9"
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
|
-
"path": "chunks/chunk-
|
|
66
|
+
"path": "chunks/chunk-LD2FH2YE.js.map",
|
|
67
67
|
"sha256": "9e73ba1e2cdcd01e9eff1902770b86141ebe926c56c1ae10ab103c5f0e343a59"
|
|
68
68
|
},
|
|
69
|
+
{
|
|
70
|
+
"path": "chunks/chunk-Q6KPZGMP.js",
|
|
71
|
+
"sha256": "83033f608c891729935863e00af1c8b7b5b3b67e9421d995b2a86d558043a68c"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"path": "chunks/chunk-Q6KPZGMP.js.map",
|
|
75
|
+
"sha256": "80a615273c13c3004a0977f41ade5169cca1e37b64c3942f2c9c9c33a5fc5965"
|
|
76
|
+
},
|
|
69
77
|
{
|
|
70
78
|
"path": "chunks/chunk-T3AMFUCN.js",
|
|
71
79
|
"sha256": "5aa6331872de44f7ed68e0022b6fefb1160af2430f92af36644debc28c719dfd"
|
|
@@ -75,132 +83,132 @@
|
|
|
75
83
|
"sha256": "ed562b0bba7ee7214e56ac7f728054b3496bec4597c94a4eb7b4179e6f5cb1c9"
|
|
76
84
|
},
|
|
77
85
|
{
|
|
78
|
-
"path": "chunks/chunk-
|
|
79
|
-
"sha256": "
|
|
86
|
+
"path": "chunks/chunk-T526C5DX.js",
|
|
87
|
+
"sha256": "e9be77ec02db179cbbe42455ba52f57182400c4f5ca4ce2306274d578d7c96d8"
|
|
80
88
|
},
|
|
81
89
|
{
|
|
82
|
-
"path": "chunks/chunk-
|
|
83
|
-
"sha256": "
|
|
90
|
+
"path": "chunks/chunk-T526C5DX.js.map",
|
|
91
|
+
"sha256": "4ecafbbb25636c127d089e04c0d40b287960e7a8f063eb1b954696229a28dc24"
|
|
84
92
|
},
|
|
85
93
|
{
|
|
86
|
-
"path": "chunks/chunk-
|
|
87
|
-
"sha256": "
|
|
94
|
+
"path": "chunks/chunk-UF75LUAK.js",
|
|
95
|
+
"sha256": "df55c36a408da98b8c3c2e31507f6395dc7085a3afd120635bcdcf66b3b4466e"
|
|
88
96
|
},
|
|
89
97
|
{
|
|
90
|
-
"path": "chunks/chunk-
|
|
91
|
-
"sha256": "
|
|
98
|
+
"path": "chunks/chunk-UF75LUAK.js.map",
|
|
99
|
+
"sha256": "2bb94a01280fa43c8137d74717350700dbe5ff525b0cdbb4974016c3eec85279"
|
|
92
100
|
},
|
|
93
101
|
{
|
|
94
|
-
"path": "chunks/chunk-
|
|
95
|
-
"sha256": "
|
|
102
|
+
"path": "chunks/chunk-UJSB6NO6.js",
|
|
103
|
+
"sha256": "518e53346328bd5ea8dce19c35be1d0e2f58a4a712db4b7103025b8e5c0aac97"
|
|
96
104
|
},
|
|
97
105
|
{
|
|
98
|
-
"path": "chunks/chunk-
|
|
99
|
-
"sha256": "
|
|
106
|
+
"path": "chunks/chunk-UJSB6NO6.js.map",
|
|
107
|
+
"sha256": "3317a8faed86eb768d5d36603eed9d103e50bab944f137f50780f38994b7ef6b"
|
|
100
108
|
},
|
|
101
109
|
{
|
|
102
|
-
"path": "chunks/chunk-
|
|
103
|
-
"sha256": "
|
|
110
|
+
"path": "chunks/chunk-YZXB4XGA.js",
|
|
111
|
+
"sha256": "32312f43745011061505ff12f6720f1cf5378ec28c01ad1f1c40806ddb7620be"
|
|
104
112
|
},
|
|
105
113
|
{
|
|
106
|
-
"path": "chunks/chunk-
|
|
107
|
-
"sha256": "
|
|
114
|
+
"path": "chunks/chunk-YZXB4XGA.js.map",
|
|
115
|
+
"sha256": "5404a988621b7a5fb41b0f0c6fcc175361a3004a22affd7bd1ec5dfdc7e87991"
|
|
108
116
|
},
|
|
109
117
|
{
|
|
110
|
-
"path": "chunks/
|
|
111
|
-
"sha256": "
|
|
118
|
+
"path": "chunks/register-list-query-ISM35VIX.js",
|
|
119
|
+
"sha256": "81fea1455958d97342284653a573557b6cbc1daa7ee72ce7b209638190a028d2"
|
|
112
120
|
},
|
|
113
121
|
{
|
|
114
|
-
"path": "chunks/
|
|
115
|
-
"sha256": "
|
|
122
|
+
"path": "chunks/register-list-query-ISM35VIX.js.map",
|
|
123
|
+
"sha256": "dbbce970dac9340c5b7850c3430f52a9b4096f972d956b84ee94d22b027f6f35"
|
|
116
124
|
},
|
|
117
125
|
{
|
|
118
|
-
"path": "chunks/register-
|
|
119
|
-
"sha256": "
|
|
126
|
+
"path": "chunks/register-mutation-KHMBJJS6.js",
|
|
127
|
+
"sha256": "dee5b87eb4b1d44b6a7a56e179c2fe272adaeb0f14b270a559eff19671bff976"
|
|
120
128
|
},
|
|
121
129
|
{
|
|
122
|
-
"path": "chunks/register-
|
|
123
|
-
"sha256": "
|
|
130
|
+
"path": "chunks/register-mutation-KHMBJJS6.js.map",
|
|
131
|
+
"sha256": "c2a7443a3c1ab415f881b8e5f390e843f3fb5e0faddad4b28eebf3edf44eeb06"
|
|
124
132
|
},
|
|
125
133
|
{
|
|
126
|
-
"path": "chunks/register-
|
|
127
|
-
"sha256": "
|
|
134
|
+
"path": "chunks/register-operations-HHDROJD6.js",
|
|
135
|
+
"sha256": "eece021ca74260a3532b1f5c7fdcea35be6e91adb2c5844a11b81afae0f11c24"
|
|
128
136
|
},
|
|
129
137
|
{
|
|
130
|
-
"path": "chunks/register-
|
|
131
|
-
"sha256": "
|
|
138
|
+
"path": "chunks/register-operations-HHDROJD6.js.map",
|
|
139
|
+
"sha256": "7ad2852b25c7a17ad44408cd28c810a7067f73c23435bfed2940a02eddde019c"
|
|
132
140
|
},
|
|
133
141
|
{
|
|
134
|
-
"path": "chunks/register-
|
|
135
|
-
"sha256": "
|
|
142
|
+
"path": "chunks/register-setup-YAURJMY5.js",
|
|
143
|
+
"sha256": "481c0d4d9f96704deb352620777fc03e17dd398d3913166ecf2dcf2787ab05eb"
|
|
136
144
|
},
|
|
137
145
|
{
|
|
138
|
-
"path": "chunks/register-
|
|
139
|
-
"sha256": "
|
|
146
|
+
"path": "chunks/register-setup-YAURJMY5.js.map",
|
|
147
|
+
"sha256": "a2f699acf541fc98baf14360f72176c8a0a179ddafea81677d53a1b8d00e487e"
|
|
140
148
|
},
|
|
141
149
|
{
|
|
142
|
-
"path": "chunks/
|
|
143
|
-
"sha256": "
|
|
150
|
+
"path": "focused-chunks/chunk-267N774W.js",
|
|
151
|
+
"sha256": "2f1e914eb65769a761b5b0c0f793057d6fa33a34adfe978d3b976f5f39679e03"
|
|
144
152
|
},
|
|
145
153
|
{
|
|
146
|
-
"path": "chunks/
|
|
147
|
-
"sha256": "
|
|
154
|
+
"path": "focused-chunks/chunk-267N774W.js.map",
|
|
155
|
+
"sha256": "bb288fb1ddb4f79bb931b6f84e4a17997b6478effc660f5a935b962bf2dcebc6"
|
|
148
156
|
},
|
|
149
157
|
{
|
|
150
|
-
"path": "focused-chunks/chunk-
|
|
151
|
-
"sha256": "
|
|
158
|
+
"path": "focused-chunks/chunk-5FSGN4MP.js",
|
|
159
|
+
"sha256": "53f16e77c6c0538fae4c9f7f688fb2f912d6618d4bc874bef00b6c4a84e599b7"
|
|
152
160
|
},
|
|
153
161
|
{
|
|
154
|
-
"path": "focused-chunks/chunk-
|
|
155
|
-
"sha256": "
|
|
162
|
+
"path": "focused-chunks/chunk-5FSGN4MP.js.map",
|
|
163
|
+
"sha256": "2e37055dcf514e1780679b94c1f7b531e15677c1721bbb95228f421081c0d5af"
|
|
156
164
|
},
|
|
157
165
|
{
|
|
158
|
-
"path": "focused-chunks/chunk-
|
|
159
|
-
"sha256": "
|
|
166
|
+
"path": "focused-chunks/chunk-5KYHDFDN.js",
|
|
167
|
+
"sha256": "8939f21e70ebca64951215ea2aa3465edf0d44d69b4e37bcab1ca8697bc66e61"
|
|
160
168
|
},
|
|
161
169
|
{
|
|
162
|
-
"path": "focused-chunks/chunk-
|
|
163
|
-
"sha256": "
|
|
170
|
+
"path": "focused-chunks/chunk-5KYHDFDN.js.map",
|
|
171
|
+
"sha256": "e38db2743f60700f534d954b34412f7ad8758e68c77e868fbee337e28c3816d4"
|
|
164
172
|
},
|
|
165
173
|
{
|
|
166
|
-
"path": "focused-chunks/chunk-
|
|
167
|
-
"sha256": "
|
|
174
|
+
"path": "focused-chunks/chunk-7S7XWMXC.js",
|
|
175
|
+
"sha256": "6982e9727faf965cdc30874070f0f69cf7c5798ea272fd5e0f763cfc144e1ea7"
|
|
168
176
|
},
|
|
169
177
|
{
|
|
170
|
-
"path": "focused-chunks/chunk-
|
|
171
|
-
"sha256": "
|
|
178
|
+
"path": "focused-chunks/chunk-7S7XWMXC.js.map",
|
|
179
|
+
"sha256": "58f81367e2e247b2c7be9049a3fd272f0e74931f802639d7dd102df52ef0e04f"
|
|
172
180
|
},
|
|
173
181
|
{
|
|
174
|
-
"path": "focused-chunks/chunk-
|
|
175
|
-
"sha256": "
|
|
182
|
+
"path": "focused-chunks/chunk-7ZC4CKOX.js",
|
|
183
|
+
"sha256": "0914e988b3f8b8c8a428a7267e9e30633f6b85075ba2889c4191b4104d6debc0"
|
|
176
184
|
},
|
|
177
185
|
{
|
|
178
|
-
"path": "focused-chunks/chunk-
|
|
179
|
-
"sha256": "
|
|
186
|
+
"path": "focused-chunks/chunk-7ZC4CKOX.js.map",
|
|
187
|
+
"sha256": "911ccb77305095f6fe09f43d764b58b676c890957f62912b06d0e757b2ffdcb3"
|
|
180
188
|
},
|
|
181
189
|
{
|
|
182
|
-
"path": "focused-chunks/chunk-
|
|
183
|
-
"sha256": "
|
|
190
|
+
"path": "focused-chunks/chunk-BFUXTNZU.js",
|
|
191
|
+
"sha256": "342a812ef841c340b2bbe5c322c3e3ef9cca36c990236f638226c2549cdff668"
|
|
184
192
|
},
|
|
185
193
|
{
|
|
186
|
-
"path": "focused-chunks/chunk-
|
|
187
|
-
"sha256": "
|
|
194
|
+
"path": "focused-chunks/chunk-BFUXTNZU.js.map",
|
|
195
|
+
"sha256": "d630bf56bd642198df70d31c5dda6fd3df81e66338e35d83c3b25084ab6f82de"
|
|
188
196
|
},
|
|
189
197
|
{
|
|
190
|
-
"path": "focused-chunks/chunk-
|
|
191
|
-
"sha256": "
|
|
198
|
+
"path": "focused-chunks/chunk-G4TKJZ4A.js",
|
|
199
|
+
"sha256": "8b5cda7ae533aeeba36bfe5b2691a17ebfee64adb5cdb1665594e4444dcf00df"
|
|
192
200
|
},
|
|
193
201
|
{
|
|
194
|
-
"path": "focused-chunks/chunk-
|
|
195
|
-
"sha256": "
|
|
202
|
+
"path": "focused-chunks/chunk-G4TKJZ4A.js.map",
|
|
203
|
+
"sha256": "3c85a304dc8d31b77b68df15d0c57b035c8405bc1a2a40fea766e0e812212520"
|
|
196
204
|
},
|
|
197
205
|
{
|
|
198
|
-
"path": "focused-chunks/chunk-
|
|
199
|
-
"sha256": "
|
|
206
|
+
"path": "focused-chunks/chunk-GKSAMNBG.js",
|
|
207
|
+
"sha256": "5c82cb2a4446feda73fa42dbb245d87787e05a6033699575b48182ac028c6786"
|
|
200
208
|
},
|
|
201
209
|
{
|
|
202
|
-
"path": "focused-chunks/chunk-
|
|
203
|
-
"sha256": "
|
|
210
|
+
"path": "focused-chunks/chunk-GKSAMNBG.js.map",
|
|
211
|
+
"sha256": "42bcf597246e4a69c85e59555fa5f74c17493b7bad05a810428016f2f2df2e43"
|
|
204
212
|
},
|
|
205
213
|
{
|
|
206
214
|
"path": "focused-chunks/chunk-HFAW3FJQ.js",
|
|
@@ -211,88 +219,80 @@
|
|
|
211
219
|
"sha256": "2536922ae21f29b6d28033a35d9aba3d921ee26867d733ba0a76857c97366cd9"
|
|
212
220
|
},
|
|
213
221
|
{
|
|
214
|
-
"path": "focused-chunks/chunk-
|
|
215
|
-
"sha256": "
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
"path": "focused-chunks/chunk-JKJYXCT6.js.map",
|
|
219
|
-
"sha256": "d630bf56bd642198df70d31c5dda6fd3df81e66338e35d83c3b25084ab6f82de"
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
"path": "focused-chunks/chunk-MD7ADLME.js",
|
|
223
|
-
"sha256": "43991ae09d17dc96ca927421b0cea8f3f4c2a30172d8cea4b36f2f89d19bf230"
|
|
222
|
+
"path": "focused-chunks/chunk-IVWUQE7T.js",
|
|
223
|
+
"sha256": "f30ced5b4e8422ac79985583de125f22782e5f9e83b8c893251a534a57c33844"
|
|
224
224
|
},
|
|
225
225
|
{
|
|
226
|
-
"path": "focused-chunks/chunk-
|
|
227
|
-
"sha256": "
|
|
226
|
+
"path": "focused-chunks/chunk-IVWUQE7T.js.map",
|
|
227
|
+
"sha256": "81457da31619dbda0e3b03060f3547a106881ed0c6a91f3544fdc7c0c175b17f"
|
|
228
228
|
},
|
|
229
229
|
{
|
|
230
|
-
"path": "focused-chunks/chunk-
|
|
231
|
-
"sha256": "
|
|
230
|
+
"path": "focused-chunks/chunk-JZSLDLR4.js",
|
|
231
|
+
"sha256": "1c7f17f433322160acb8bd9b0995e5d9eed21b6b5b04eef183500c0b46d5ba0f"
|
|
232
232
|
},
|
|
233
233
|
{
|
|
234
|
-
"path": "focused-chunks/chunk-
|
|
235
|
-
"sha256": "
|
|
234
|
+
"path": "focused-chunks/chunk-JZSLDLR4.js.map",
|
|
235
|
+
"sha256": "7d04a8af34b0eec3f0530e5cdd07226b6130920463eb9cc8408b20c235f4502c"
|
|
236
236
|
},
|
|
237
237
|
{
|
|
238
|
-
"path": "focused-chunks/chunk-
|
|
239
|
-
"sha256": "
|
|
238
|
+
"path": "focused-chunks/chunk-LNM3BS45.js",
|
|
239
|
+
"sha256": "5116de316a97a665441cbf7925f8effa4fd72392168faa9780e8ee9902b19fd2"
|
|
240
240
|
},
|
|
241
241
|
{
|
|
242
|
-
"path": "focused-chunks/chunk-
|
|
243
|
-
"sha256": "
|
|
242
|
+
"path": "focused-chunks/chunk-LNM3BS45.js.map",
|
|
243
|
+
"sha256": "974f8e877cfa8adb7e05770e5573548ae5f041e06cdf871f34b1fa2f4e63fd3e"
|
|
244
244
|
},
|
|
245
245
|
{
|
|
246
|
-
"path": "focused-chunks/chunk-
|
|
247
|
-
"sha256": "
|
|
246
|
+
"path": "focused-chunks/chunk-NOK652OP.js",
|
|
247
|
+
"sha256": "30d911b5e087761427f9d1f4dee82470a961e630a82a817ee233701fbdd6320d"
|
|
248
248
|
},
|
|
249
249
|
{
|
|
250
|
-
"path": "focused-chunks/chunk-
|
|
251
|
-
"sha256": "
|
|
250
|
+
"path": "focused-chunks/chunk-NOK652OP.js.map",
|
|
251
|
+
"sha256": "56f0297ef91e355cf1ae58b2e3244e0f246c67e230c6dd9e9be121e0d16dfd7d"
|
|
252
252
|
},
|
|
253
253
|
{
|
|
254
|
-
"path": "focused-chunks/chunk-
|
|
255
|
-
"sha256": "
|
|
254
|
+
"path": "focused-chunks/chunk-OCTTDZOU.js",
|
|
255
|
+
"sha256": "4b1381272f5ee6edea0ea01b3dee246a7e4a13f299aff3e616b3b6f2bd7df262"
|
|
256
256
|
},
|
|
257
257
|
{
|
|
258
|
-
"path": "focused-chunks/chunk-
|
|
259
|
-
"sha256": "
|
|
258
|
+
"path": "focused-chunks/chunk-OCTTDZOU.js.map",
|
|
259
|
+
"sha256": "73c92b5ae05038383dd008f67af6058b950d44432d9e1a4cd396e93b48048e68"
|
|
260
260
|
},
|
|
261
261
|
{
|
|
262
|
-
"path": "focused-chunks/chunk-
|
|
263
|
-
"sha256": "
|
|
262
|
+
"path": "focused-chunks/chunk-OWDDVMAP.js",
|
|
263
|
+
"sha256": "540be47552b1afee8a8c1353563bed5f3974f19183d85a3e58e0ad2f753aa20e"
|
|
264
264
|
},
|
|
265
265
|
{
|
|
266
|
-
"path": "focused-chunks/chunk-
|
|
267
|
-
"sha256": "
|
|
266
|
+
"path": "focused-chunks/chunk-OWDDVMAP.js.map",
|
|
267
|
+
"sha256": "d2b01bd51153c8bdcbc71ae3607bd97023430d4f5fd43f6ab95ba994e0546e65"
|
|
268
268
|
},
|
|
269
269
|
{
|
|
270
|
-
"path": "focused-chunks/chunk-
|
|
271
|
-
"sha256": "
|
|
270
|
+
"path": "focused-chunks/chunk-WUMGGQYN.js",
|
|
271
|
+
"sha256": "c8966c93cef34e090402498897e68f9b4f7015161ed0f58c14b58f3d0a0ff1a2"
|
|
272
272
|
},
|
|
273
273
|
{
|
|
274
|
-
"path": "focused-chunks/chunk-
|
|
275
|
-
"sha256": "
|
|
274
|
+
"path": "focused-chunks/chunk-WUMGGQYN.js.map",
|
|
275
|
+
"sha256": "3ecdd0fd36ef8ee19f218669737c155be6242e6a88ae0c9bf81209997d0bf70d"
|
|
276
276
|
},
|
|
277
277
|
{
|
|
278
|
-
"path": "focused-chunks/chunk-
|
|
279
|
-
"sha256": "
|
|
278
|
+
"path": "focused-chunks/chunk-Z4PWEIMX.js",
|
|
279
|
+
"sha256": "4e41a895177c711bddd5d8911a22109ce9d0f87b0594a977bb14826d6d958d58"
|
|
280
280
|
},
|
|
281
281
|
{
|
|
282
|
-
"path": "focused-chunks/chunk-
|
|
283
|
-
"sha256": "
|
|
282
|
+
"path": "focused-chunks/chunk-Z4PWEIMX.js.map",
|
|
283
|
+
"sha256": "895534863386c737071e419333110fdf0712e0c7e14eee821447f9e1658321f9"
|
|
284
284
|
},
|
|
285
285
|
{
|
|
286
286
|
"path": "main.js",
|
|
287
|
-
"sha256": "
|
|
287
|
+
"sha256": "2b8d063d0e0fe9c95c0fe1e89609481c8a32fd255844861672d2958b50ec1fa0"
|
|
288
288
|
},
|
|
289
289
|
{
|
|
290
290
|
"path": "main.js.map",
|
|
291
|
-
"sha256": "
|
|
291
|
+
"sha256": "e7e14d65277d640f4525a9547dd8737d15f4a3a3aa7d0de34077ece0e974d5e8"
|
|
292
292
|
},
|
|
293
293
|
{
|
|
294
294
|
"path": "sdk-authoring.js",
|
|
295
|
-
"sha256": "
|
|
295
|
+
"sha256": "cd013e6fc51c25bd22385ff9bed2926ecb3e6ae66f277ea858ce05dab1dc0803"
|
|
296
296
|
},
|
|
297
297
|
{
|
|
298
298
|
"path": "sdk-authoring.js.map",
|
|
@@ -300,7 +300,7 @@
|
|
|
300
300
|
},
|
|
301
301
|
{
|
|
302
302
|
"path": "sdk-contracts.js",
|
|
303
|
-
"sha256": "
|
|
303
|
+
"sha256": "92f31ca3d7ca2bdc59cb7be1bd530ab9c528964691f7fa9f9782c39ee01f5aa0"
|
|
304
304
|
},
|
|
305
305
|
{
|
|
306
306
|
"path": "sdk-contracts.js.map",
|
|
@@ -308,15 +308,15 @@
|
|
|
308
308
|
},
|
|
309
309
|
{
|
|
310
310
|
"path": "sdk-core.js",
|
|
311
|
-
"sha256": "
|
|
311
|
+
"sha256": "ed858b05268195448df64b7cf31fe941ef02a8d92c7e16e9a0135498d72ac959"
|
|
312
312
|
},
|
|
313
313
|
{
|
|
314
314
|
"path": "sdk-core.js.map",
|
|
315
|
-
"sha256": "
|
|
315
|
+
"sha256": "60ed37f917f89f3a90c0166b1ad7991e6f05b333aebb79966392259f1921bc8b"
|
|
316
316
|
},
|
|
317
317
|
{
|
|
318
318
|
"path": "sdk-governance.js",
|
|
319
|
-
"sha256": "
|
|
319
|
+
"sha256": "1500ef735f19e08c32c834c8de644015535e1ede485cdfc5152d38a51ea20217"
|
|
320
320
|
},
|
|
321
321
|
{
|
|
322
322
|
"path": "sdk-governance.js.map",
|
|
@@ -324,7 +324,7 @@
|
|
|
324
324
|
},
|
|
325
325
|
{
|
|
326
326
|
"path": "sdk-graph.js",
|
|
327
|
-
"sha256": "
|
|
327
|
+
"sha256": "a8bf3ff572050c67a7f7dafc5a7bb8fcbe6270ba28eeb59005d46220326ae957"
|
|
328
328
|
},
|
|
329
329
|
{
|
|
330
330
|
"path": "sdk-graph.js.map",
|
|
@@ -332,15 +332,15 @@
|
|
|
332
332
|
},
|
|
333
333
|
{
|
|
334
334
|
"path": "sdk-merge.js",
|
|
335
|
-
"sha256": "
|
|
335
|
+
"sha256": "f4c98cc01fbf078cceef965897e3fc3541a3da8052352e2b1eb990c85f3b1192"
|
|
336
336
|
},
|
|
337
337
|
{
|
|
338
338
|
"path": "sdk-merge.js.map",
|
|
339
|
-
"sha256": "
|
|
339
|
+
"sha256": "b6ff65ef455d9aa6158f99d39bda504a4c64909c775dc277ea8e50568210ca74"
|
|
340
340
|
},
|
|
341
341
|
{
|
|
342
342
|
"path": "sdk-query.js",
|
|
343
|
-
"sha256": "
|
|
343
|
+
"sha256": "9fa8f8715c60ba0561c067261a14180468a1cc967704af9988f4906fc0993d5f"
|
|
344
344
|
},
|
|
345
345
|
{
|
|
346
346
|
"path": "sdk-query.js.map",
|
|
@@ -348,7 +348,7 @@
|
|
|
348
348
|
},
|
|
349
349
|
{
|
|
350
350
|
"path": "sdk-runtime.js",
|
|
351
|
-
"sha256": "
|
|
351
|
+
"sha256": "139fde8b4ec8a5a28b6fb8ff2911bfc44c078b70a268cc16f642321bec95f122"
|
|
352
352
|
},
|
|
353
353
|
{
|
|
354
354
|
"path": "sdk-runtime.js.map",
|
|
@@ -356,7 +356,7 @@
|
|
|
356
356
|
},
|
|
357
357
|
{
|
|
358
358
|
"path": "sdk-testing.js",
|
|
359
|
-
"sha256": "
|
|
359
|
+
"sha256": "97802fd9ad98492212f047e7827f644be83dca364dff492c078b22ca1062b5be"
|
|
360
360
|
},
|
|
361
361
|
{
|
|
362
362
|
"path": "sdk-testing.js.map",
|
|
@@ -364,7 +364,7 @@
|
|
|
364
364
|
},
|
|
365
365
|
{
|
|
366
366
|
"path": "sdk.js",
|
|
367
|
-
"sha256": "
|
|
367
|
+
"sha256": "b1e4c68c70150022bf8d467eb61a2933ea361c1f8c90b318d0c9023fafb28f5d"
|
|
368
368
|
},
|
|
369
369
|
{
|
|
370
370
|
"path": "sdk.js.map",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Qb as x,Rb as F,Tb as b,Wb as J,Xa as B,Yb as W,Zb as V}from"./chunk-BOZ4HVYL.js";import{b as K}from"./chunk-3AHONKLL.js";import{Bd as C,D as O,Fl as j,Il as P,Mi as D,O as c,Oi as G,Q as d,ec as $,ff as U,fn as L,ln as z,oa as k,zd as N}from"./chunk-J4DRE3WN.js";(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]="4175f7f5-a689-5d05-982a-f92e21bc83e7")}catch{}})();import ce 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]="d6ceb51a-6085-5d65-aebe-31d09ea4d1d6")}catch{}})();var R=["op","id","reason","options"],Y=[...R,"ref"],q=["schema_version","mutations"],oe="[a-z][a-z0-9._-]{0,63}",H=new RegExp(`^${oe}$`,"u"),re=new RegExp(`(^|,)id=@(${oe})(?=,|$)`,"gu"),X=e=>e.slice(2).replaceAll(/-([a-z])/gu,(t,o)=>o.toUpperCase()),E=["item","linked","schedule","claim_state","children","omission_receipt","row_contract","context_intent"],ne=new Set(["created_at","updated_at","closed_at","version","format_version","path","author","collection_counts","notes_count","tests_count"]),de=new Set([...ne,"completed_at","id"]),_=new Set(["id","title","description","type","status","priority","tags","body","deadline","estimated_minutes","acceptance_criteria","definition_of_ready","order","rank","assignee",...O,"affected_version","fixed_version","component","regression","customer_impact","close_reason","completed_at","dependencies","comments","notes","learnings","files","tests","docs","reminders","events","type_options"]),Z={create:j.map(e=>e.target),update:P.map(e=>e.target),close:L.map(e=>X(e.flag)).filter(e=>e!=="reason"),release:z.map(e=>X(e.flag))};function St(e){let t={},o=e.createCompensation;if(o!==void 0){if(o!=="close"&&o!=="delete")throw new d("createCompensation must be close or delete.",c.USAGE);t.createCompensation=o}for(let r of["lockTtlSeconds","lockWaitMs"]){let n=e[r];if(n===void 0)continue;let i=typeof n=="number"||typeof n=="string"&&n.trim().length>0?Number(n):Number.NaN;if(!Number.isSafeInteger(i)||i<=0)throw new d(`${r} must be a positive safe integer.`,c.USAGE);t[r]=i}return t}function p(e){if(typeof e!="object"||e===null||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function g(e,t){let o=Math.max(1,Math.min(3,Math.floor(e.length/4)+1)),r;for(let n of t){let i=k(e,n,o);i!==null&&(r===void 0||i<r.distance)&&(r={key:n,distance:i})}return r?.key}function y(e,t,o){let r=g(t,o);return new d(r===void 0?`${e} does not recognize key "${t}". Allowed keys: ${o.join(", ")}.`:`${e} does not recognize key "${t}". Did you mean "${r}"?`,c.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 I(e,t){try{return JSON.parse(e)}catch(o){let r=o instanceof Error?o.message:String(o);throw new d(`${t} must be valid JSON: ${r}`,c.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 ue(e,t){if(!p(e))throw new d(`Mutation ${t+1} must be an object.`,c.USAGE);for(let o of Object.keys(e))if(!R.includes(o))throw y(`mutation ${t+1}`,o,R);return e}function pe(e,t,o){if(e!==void 0){if(!p(e))throw new d(`Mutation ${o+1} options must be an object.`,c.USAGE);for(let r of Object.keys(e))if(!Z[t].includes(r))throw y(`mutation ${o+1} ${t} options`,r,Z[t]);return e}}function le(e,t){let o=ue(e,t),{op:r,id:n,reason:i}=o;if(r!=="create"&&r!=="update"&&r!=="close"&&r!=="release")throw new d(`Mutation ${t+1} op must be create, update, close, or release.`,c.USAGE);let s=pe(o.options,r,t);if(typeof n!="string"||n.trim().length===0)throw new d(`Mutation ${t+1} requires a non-empty id.`,c.USAGE);let a=n.trim();if(r==="close"){if(typeof i!="string"||i.trim().length===0)throw new d(`Mutation ${t+1} close requires a non-empty reason.`,c.USAGE);return{op:r,id:a,reason:i.trim(),...s===void 0?{}:{options:s}}}if(r==="release")return{op:r,id:a,...s===void 0?{}:{options:s}};if(!p(s))throw new d(`Mutation ${t+1} ${r} requires an options object.`,c.USAGE);return{op:r,id:a,options:s}}function ie(e){let t=I(e,"Mutation batch"),o=Array.isArray(t)?t:p(t)&&Array.isArray(t.mutations)?t.mutations:void 0;if(o===void 0||o.length===0)throw new d("Mutation batch must be a non-empty JSON array or an object with a non-empty mutations array.",c.USAGE);return o.map((r,n)=>{let i=le(r,n);return i.options!==void 0&&N(i.options),i})}function me(e,t,o){let r=ce.createHash("sha256").update(e).update("\0").update(t).digest("hex"),n=BigInt(`0x${r.slice(0,16)}`).toString(36).padStart(13,"0").slice(-12);return`${D(o)}${n}`}function Q(e,t){if(typeof e!="string"||!e.startsWith("@"))return e;let o=e.slice(1),r=t[o];if(r===void 0)throw new d(`Unknown mutation reference "${e}".`,c.USAGE);return r}function ee(e,t){if(typeof e!="string")return e;let o=e.replace(re,(r,n,i)=>{let s=t[i];if(s===void 0)throw new d(`Unknown mutation reference "@${i}".`,c.USAGE);return`${n}id=${s}`});if(/(^|,)id=@/u.test(o))throw new d(`Malformed mutation reference in dependency "${e}".`,c.USAGE);return o}function fe(e){return typeof e!="string"?[]:e.startsWith("@")?[e.slice(1)]:[...e.matchAll(re)].map(t=>t[1]).filter(t=>t!==void 0)}function ye(e){let t=new Map;for(let i of e){if(i.op!=="create"||typeof i.ref!="string")continue;let s=p(i.options)?i.options:{},a=Array.isArray(s.dep)?s.dep:s.dep===void 0?[]:[s.dep];t.set(i.ref,[s.parent,s.blockedBy,...a].flatMap(fe))}let o=new Set,r=new Set,n=i=>{if(o.has(i))throw new d(`Mutation reference cycle includes "@${i}".`,c.USAGE);if(!r.has(i)){o.add(i);for(let s of t.get(i))t.has(s)&&n(s);o.delete(i),r.add(i)}};for(let i of t.keys())n(i)}function he(e){let t=I(e,"Mutation document"),o=Array.isArray(t)?{schema_version:1,mutations:t}:t;if(!p(o))throw new d("Mutation document must be a JSON array or object.",c.USAGE);for(let r of Object.keys(o))if(!q.includes(r))throw y("mutation document",r,q);if(o.schema_version!==void 0&&o.schema_version!==1)throw new d("Mutation document schema_version must be 1.",c.USAGE);if(!Array.isArray(o.mutations)||o.mutations.length===0)throw new d("Mutation document requires a non-empty mutations array.",c.USAGE);return o.mutations.map((r,n)=>{if(!p(r))throw new d(`Mutation ${n+1} must be an object.`,c.USAGE);for(let i of Object.keys(r))if(!Y.includes(i))throw y(`mutation ${n+1}`,i,Y);return{...r}})}function we(e,t){let o=Object.create(null);for(let[r,n]of e.entries())if(n.ref!==void 0){if(n.op!=="create")throw new d(`Mutation ${r+1} ref is only valid for create operations.`,c.USAGE);if(typeof n.ref!="string"||!H.test(n.ref))throw new d(`Mutation ${r+1} ref must match ${H.source}.`,c.USAGE);if(o[n.ref]!==void 0)throw new d(`Duplicate mutation ref "${n.ref}".`,c.USAGE);o[n.ref]=typeof n.id=="string"&&n.id.trim().length>0?G(n.id,t.idPrefix):me(t.transactionId,n.ref,t.idPrefix)}return o}function bt(e,t){let o=he(e),r=we(o,t);ye(o);let n=o.map(a=>{let u={...a},f=typeof u.ref=="string"?u.ref:void 0;if(delete u.ref,f!==void 0?u.id=r[f]:u.id=Q(u.id,r),p(u.options)){let l={...u.options};for(let w of["parent","blockedBy"])l[w]!==void 0&&(l[w]=Q(l[w],r));Array.isArray(l.dep)?l.dep=l.dep.map(w=>ee(w,r)):l.dep!==void 0&&(l.dep=ee(l.dep,r)),u.options=l}return u}),i=ie(JSON.stringify(n)),s=i.filter(a=>a.op==="create").map(a=>a.id);if(new Set(s).size!==s.length)throw new d("Duplicate resolved create id in mutation document.",c.USAGE);return{schema_version:1,mutations:i,references:r}}function se(e,t){return t.filter(o=>e[o]!==void 0&&e[o]!==null).map(o=>{let r=String(e[o]);return`${o}=${/[",\n\r\\]/u.test(r)?JSON.stringify(r):r}`}).join(",")}function _e(e,t,o){if(e!==void 0){if(!Array.isArray(e)||!e.every(p))throw new d(`${o} must be an array of objects.`,c.USAGE);return e.map(r=>se(r,t))}}function Ee(e,t){return e==="tags"&&Array.isArray(t)&&t.every(o=>typeof o=="string")?JSON.stringify(t):typeof t=="number"||typeof t=="boolean"?String(t):t}function te(e,t,o=!1){let r=[["dependencies","dep",["id","kind","created_at","author","source_kind"]],["comments","comment",["text","created_at","author"]],["notes","note",["text","created_at","author"]],["learnings","learning",["text","created_at","author"]],["files","file",["path","scope","note"]],["tests","test",["command","scope","timeout_seconds"]],["docs","doc",["path","scope","note"]],["reminders","reminder",["at","text","created_at"]],["events","event",["start_at","end_at","title","location"]],["type_options","typeOption",["key","value"]]];for(let[n,i,s]of r){let a=t[n],u=_e(o&&["comments","notes","learnings"].includes(n)&&Array.isArray(a)?a.filter(f=>!p(f)||f.created_at===void 0):a,s,n);u!==void 0&&u.length>0&&(e[i]=u)}}function ge(e,t){for(let o of Object.keys(e)){if(t){if(!E.includes(o))throw y("item envelope",o,E);continue}if(!_.has(o)&&g(o,[..._])===void 0&&g(o,E)==="item")throw y("item envelope",o,E)}}function Ae(e){let t=Object.hasOwn(e,"item");ge(e,t);let o=t?e.item:e;if(!p(o))throw new d("Item document item must be an object.",c.USAGE);return{item:o,...t&&p(e.linked)?{linked:e.linked}:{}}}function Te(e,t,o,r){if(!(r==="update"?de:ne).has(t)){if(!_.has(t)){if(g(t,[..._])!==void 0)throw y("item document",t,[..._]);let s=Array.isArray(e.field)?e.field:[];s.push(se({key:t,value:typeof o=="string"?o:JSON.stringify(o)},["key","value"])),e.field=s;return}["dependencies","comments","notes","learnings","files","tests","docs","reminders","events","type_options"].includes(t)||(e[t.replaceAll(/_([a-z])/gu,(i,s)=>s.toUpperCase())]=Ee(t,o))}}function Rt(e,t,o={}){let r=I(e,"Item document");if(!p(r))throw new d("Item document must be a JSON object.",c.USAGE);let{item:n,linked:i}=Ae(r),s={};for(let[a,u]of Object.entries(n))Te(s,a,u,t);return te(s,n,t==="update"),i!==void 0&&te(s,i),{...s,...Object.fromEntries(Object.entries(o).filter(([,a])=>a!==void 0)),stdinJson:void 0}}function It(e){return ie(JSON.stringify(e))}import Se from"node:crypto";import be 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]="4b7656bd-36a9-5b97-971f-60f717e8e81f")}catch{}})();function A(e,t){let o={...e,...t};return e===void 0?o:C(e,o)}async function m(e,t){try{let r=(await B(t,{},{pmRoot:e})).item;return{id:r.id,closedAt:r.closed_at,updatedAt:r.updated_at,assignee:r.assignee,claimPrincipal:r.claim_principal}}catch(o){if(o instanceof d&&o.exitCode===c.NOT_FOUND)return;throw o}}function v(e,t){let o=e.id.replaceAll(/[^a-zA-Z0-9._-]/gu,"_"),r=Se.createHash("sha256").update($(e)).digest("hex").slice(0,12);return`${t+1}-${e.op}-${o}-${r}`}function Re(e,t){let o=e.id.replaceAll(/[^a-zA-Z0-9._-]/gu,"_");return`${t+1}-${e.op}-${o}`}function h(e,t,o){return`bulk-item-transaction ${e} ${t} ${o}`}async function T(e,t,o,r){let n=await U(be.join(e,"history",`${t}.jsonl`),t),i=h(o,r,"apply"),s=h(o,r,"compensate");for(let a=n.length-1;a>=0;a-=1){let u=n[a].message;if(u===i)return!0;if(u===s)return!1}return!1}async function M(e,t){let o=await m(e,t.id);if(o?.updatedAt===void 0)throw new d(`Bulk ${t.op} target ${t.id} does not exist or has no restorable version`,c.NOT_FOUND);return{target_updated_at:o.updatedAt}}async function S(e,t,o,r){let n=r!==null&&typeof r=="object"&&!Array.isArray(r)?r.target_updated_at:void 0;typeof n=="string"&&await m(e.pmRoot,t)!==void 0&&await V(t,n,{force:!0,author:e.author,message:h(e.transactionId,o,"compensate")},{pmRoot:e.pmRoot})}function ae(e,t,o){return{id:o,async inspect(){let r=await m(e.pmRoot,t.id);return r===void 0?{state:"pending"}:{state:"applied",result:{id:r.id,op:"create"}}},async apply(){let n=(await x(A(t.options,{author:e.author,id:t.id}),{pmRoot:e.pmRoot})).item;return{id:String(n.id),op:"create"}},async compensate(){let r=await m(e.pmRoot,t.id);if(r!==void 0){if(e.createCompensation==="delete"){await W(t.id,{force:!0,author:e.author,message:`Compensate interrupted bulk transaction ${e.transactionId}`},{pmRoot:e.pmRoot});return}r.closedAt===void 0&&await b(t.id,`Compensated: interrupted bulk transaction ${e.transactionId}`,{force:!0,author:e.author},{pmRoot:e.pmRoot})}}}}function Ie(e,t,o){return{id:o,async inspect(){let r=await m(e.pmRoot,t.id);return r===void 0?{state:"pending"}:await T(e.pmRoot,r.id,e.transactionId,o)?{state:"applied",result:{id:r.id,op:"update"}}:{state:"pending"}},async prepareCompensation(){return M(e.pmRoot,t)},async apply(){let n=(await F(t.id,A(t.options,{author:e.author,message:h(e.transactionId,o,"apply")}),{pmRoot:e.pmRoot})).item;return{id:String(n.id),op:"update"}},async compensate(r){await S(e,t.id,o,r)}}}function ve(e,t,o){return{id:o,async inspect(){let r=await m(e.pmRoot,t.id);return r===void 0?{state:"pending"}:await T(e.pmRoot,r.id,e.transactionId,o)?{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 M(e.pmRoot,t)},async apply(){let n=(await b(t.id,t.reason,A(t.options,{author:e.author,message:h(e.transactionId,o,"apply")}),{pmRoot:e.pmRoot})).item;return{id:String(n.id),op:"close"}},async compensate(r){await S(e,t.id,o,r)}}}function Me(e,t,o){return{id:o,async inspect(){let r=await m(e.pmRoot,t.id);return r===void 0?{state:"pending"}:await T(e.pmRoot,r.id,e.transactionId,o)?{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 M(e.pmRoot,t)},async apply(){let n=(await J(t.id,A(t.options,{author:e.author,message:h(e.transactionId,o,"apply")}),{pmRoot:e.pmRoot})).item;return{id:String(n.id),op:"release"}},async compensate(r){await S(e,t.id,o,r)}}}function Oe(e,t,o){let r=v(t,o);switch(t.op){case"create":return ae(e,t,r);case"update":return Ie(e,t,r);case"close":return ve(e,t,r);case"release":return Me(e,t,r)}}function ke(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`)}async function $e(e){let t=[...e.mutations];if(t.length===0)throw new TypeError("Bulk item transaction requires at least one mutation");for(let[s,a]of t.entries())ke(a,s);let o=e.createCompensation??"close";if(!["close","delete"].includes(o))throw new TypeError("Bulk item transaction createCompensation must be close or delete");let r={pmRoot:e.pmRoot,author:e.author,transactionId:e.transactionId,createCompensation:o},n=await K({pmRoot:e.pmRoot,transactionId:e.transactionId,author:e.author,steps:t.map((s,a)=>Oe(r,s,a)),...e.lockTtlSeconds===void 0?{}:{lockTtlSeconds:e.lockTtlSeconds},...e.lockWaitMs===void 0?{}:{lockWaitMs:e.lockWaitMs},...e.onTransition===void 0?{}:{onTransition:e.onTransition}}),i={};for(let[s,a]of t.entries()){let u=v(a,s),f=n.results[u];i[Re(a,s)]=f}return{transactionId:n.transactionId,status:"committed",recovered:n.recovered,results:i}}function Ne(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 jt(e){return $e({pmRoot:e.pmRoot,transactionId:e.transactionId,author:e.author,mutations:Ne(e),...e.lockTtlSeconds===void 0?{}:{lockTtlSeconds:e.lockTtlSeconds},...e.lockWaitMs===void 0?{}:{lockWaitMs:e.lockWaitMs},...e.onTransition===void 0?{}:{onTransition:e.onTransition}})}var Pt={buildCreateStep:ae,bulkHistoryMarker:h,compensateByRestore:S,deriveStepId:v,isUpdateMarkerApplied:T,readItemSnapshot:m};export{St as a,ie as b,bt as c,Rt as d,It as e,$e as f,Ne as g,jt as h,Pt as i};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{Qb as x,Rb as F,Tb as b,Wb as J,Xa as B,Yb as W,Zb as V}from"./chunk-UF75LUAK.js";import{b as K}from"./chunk-G2IJF244.js";import{Bd as C,D as O,Fl as j,Il as P,Mi as D,O as c,Oi as G,Q as d,ec as $,ff as U,fn as L,ln as z,oa as k,zd as N}from"./chunk-UJSB6NO6.js";(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]="4175f7f5-a689-5d05-982a-f92e21bc83e7")}catch{}})();import ce 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]="d6ceb51a-6085-5d65-aebe-31d09ea4d1d6")}catch{}})();var R=["op","id","reason","options"],Y=[...R,"ref"],q=["schema_version","mutations"],oe="[a-z][a-z0-9._-]{0,63}",H=new RegExp(`^${oe}$`,"u"),re=new RegExp(`(^|,)id=@(${oe})(?=,|$)`,"gu"),X=e=>e.slice(2).replaceAll(/-([a-z])/gu,(t,o)=>o.toUpperCase()),E=["item","linked","schedule","claim_state","children","omission_receipt","row_contract","context_intent"],ne=new Set(["created_at","updated_at","closed_at","version","format_version","path","author","collection_counts","notes_count","tests_count"]),de=new Set([...ne,"completed_at","id"]),_=new Set(["id","title","description","type","status","priority","tags","body","deadline","estimated_minutes","acceptance_criteria","definition_of_ready","order","rank","assignee",...O,"affected_version","fixed_version","component","regression","customer_impact","close_reason","completed_at","dependencies","comments","notes","learnings","files","tests","docs","reminders","events","type_options"]),Z={create:j.map(e=>e.target),update:P.map(e=>e.target),close:L.map(e=>X(e.flag)).filter(e=>e!=="reason"),release:z.map(e=>X(e.flag))};function St(e){let t={},o=e.createCompensation;if(o!==void 0){if(o!=="close"&&o!=="delete")throw new d("createCompensation must be close or delete.",c.USAGE);t.createCompensation=o}for(let r of["lockTtlSeconds","lockWaitMs"]){let n=e[r];if(n===void 0)continue;let i=typeof n=="number"||typeof n=="string"&&n.trim().length>0?Number(n):Number.NaN;if(!Number.isSafeInteger(i)||i<=0)throw new d(`${r} must be a positive safe integer.`,c.USAGE);t[r]=i}return t}function p(e){if(typeof e!="object"||e===null||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function g(e,t){let o=Math.max(1,Math.min(3,Math.floor(e.length/4)+1)),r;for(let n of t){let i=k(e,n,o);i!==null&&(r===void 0||i<r.distance)&&(r={key:n,distance:i})}return r?.key}function y(e,t,o){let r=g(t,o);return new d(r===void 0?`${e} does not recognize key "${t}". Allowed keys: ${o.join(", ")}.`:`${e} does not recognize key "${t}". Did you mean "${r}"?`,c.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 I(e,t){try{return JSON.parse(e)}catch(o){let r=o instanceof Error?o.message:String(o);throw new d(`${t} must be valid JSON: ${r}`,c.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 ue(e,t){if(!p(e))throw new d(`Mutation ${t+1} must be an object.`,c.USAGE);for(let o of Object.keys(e))if(!R.includes(o))throw y(`mutation ${t+1}`,o,R);return e}function pe(e,t,o){if(e!==void 0){if(!p(e))throw new d(`Mutation ${o+1} options must be an object.`,c.USAGE);for(let r of Object.keys(e))if(!Z[t].includes(r))throw y(`mutation ${o+1} ${t} options`,r,Z[t]);return e}}function le(e,t){let o=ue(e,t),{op:r,id:n,reason:i}=o;if(r!=="create"&&r!=="update"&&r!=="close"&&r!=="release")throw new d(`Mutation ${t+1} op must be create, update, close, or release.`,c.USAGE);let s=pe(o.options,r,t);if(typeof n!="string"||n.trim().length===0)throw new d(`Mutation ${t+1} requires a non-empty id.`,c.USAGE);let a=n.trim();if(r==="close"){if(typeof i!="string"||i.trim().length===0)throw new d(`Mutation ${t+1} close requires a non-empty reason.`,c.USAGE);return{op:r,id:a,reason:i.trim(),...s===void 0?{}:{options:s}}}if(r==="release")return{op:r,id:a,...s===void 0?{}:{options:s}};if(!p(s))throw new d(`Mutation ${t+1} ${r} requires an options object.`,c.USAGE);return{op:r,id:a,options:s}}function ie(e){let t=I(e,"Mutation batch"),o=Array.isArray(t)?t:p(t)&&Array.isArray(t.mutations)?t.mutations:void 0;if(o===void 0||o.length===0)throw new d("Mutation batch must be a non-empty JSON array or an object with a non-empty mutations array.",c.USAGE);return o.map((r,n)=>{let i=le(r,n);return i.options!==void 0&&N(i.options),i})}function me(e,t,o){let r=ce.createHash("sha256").update(e).update("\0").update(t).digest("hex"),n=BigInt(`0x${r.slice(0,16)}`).toString(36).padStart(13,"0").slice(-12);return`${D(o)}${n}`}function Q(e,t){if(typeof e!="string"||!e.startsWith("@"))return e;let o=e.slice(1),r=t[o];if(r===void 0)throw new d(`Unknown mutation reference "${e}".`,c.USAGE);return r}function ee(e,t){if(typeof e!="string")return e;let o=e.replace(re,(r,n,i)=>{let s=t[i];if(s===void 0)throw new d(`Unknown mutation reference "@${i}".`,c.USAGE);return`${n}id=${s}`});if(/(^|,)id=@/u.test(o))throw new d(`Malformed mutation reference in dependency "${e}".`,c.USAGE);return o}function fe(e){return typeof e!="string"?[]:e.startsWith("@")?[e.slice(1)]:[...e.matchAll(re)].map(t=>t[1]).filter(t=>t!==void 0)}function ye(e){let t=new Map;for(let i of e){if(i.op!=="create"||typeof i.ref!="string")continue;let s=p(i.options)?i.options:{},a=Array.isArray(s.dep)?s.dep:s.dep===void 0?[]:[s.dep];t.set(i.ref,[s.parent,s.blockedBy,...a].flatMap(fe))}let o=new Set,r=new Set,n=i=>{if(o.has(i))throw new d(`Mutation reference cycle includes "@${i}".`,c.USAGE);if(!r.has(i)){o.add(i);for(let s of t.get(i))t.has(s)&&n(s);o.delete(i),r.add(i)}};for(let i of t.keys())n(i)}function he(e){let t=I(e,"Mutation document"),o=Array.isArray(t)?{schema_version:1,mutations:t}:t;if(!p(o))throw new d("Mutation document must be a JSON array or object.",c.USAGE);for(let r of Object.keys(o))if(!q.includes(r))throw y("mutation document",r,q);if(o.schema_version!==void 0&&o.schema_version!==1)throw new d("Mutation document schema_version must be 1.",c.USAGE);if(!Array.isArray(o.mutations)||o.mutations.length===0)throw new d("Mutation document requires a non-empty mutations array.",c.USAGE);return o.mutations.map((r,n)=>{if(!p(r))throw new d(`Mutation ${n+1} must be an object.`,c.USAGE);for(let i of Object.keys(r))if(!Y.includes(i))throw y(`mutation ${n+1}`,i,Y);return{...r}})}function we(e,t){let o=Object.create(null);for(let[r,n]of e.entries())if(n.ref!==void 0){if(n.op!=="create")throw new d(`Mutation ${r+1} ref is only valid for create operations.`,c.USAGE);if(typeof n.ref!="string"||!H.test(n.ref))throw new d(`Mutation ${r+1} ref must match ${H.source}.`,c.USAGE);if(o[n.ref]!==void 0)throw new d(`Duplicate mutation ref "${n.ref}".`,c.USAGE);o[n.ref]=typeof n.id=="string"&&n.id.trim().length>0?G(n.id,t.idPrefix):me(t.transactionId,n.ref,t.idPrefix)}return o}function bt(e,t){let o=he(e),r=we(o,t);ye(o);let n=o.map(a=>{let u={...a},f=typeof u.ref=="string"?u.ref:void 0;if(delete u.ref,f!==void 0?u.id=r[f]:u.id=Q(u.id,r),p(u.options)){let l={...u.options};for(let w of["parent","blockedBy"])l[w]!==void 0&&(l[w]=Q(l[w],r));Array.isArray(l.dep)?l.dep=l.dep.map(w=>ee(w,r)):l.dep!==void 0&&(l.dep=ee(l.dep,r)),u.options=l}return u}),i=ie(JSON.stringify(n)),s=i.filter(a=>a.op==="create").map(a=>a.id);if(new Set(s).size!==s.length)throw new d("Duplicate resolved create id in mutation document.",c.USAGE);return{schema_version:1,mutations:i,references:r}}function se(e,t){return t.filter(o=>e[o]!==void 0&&e[o]!==null).map(o=>{let r=String(e[o]);return`${o}=${/[",\n\r\\]/u.test(r)?JSON.stringify(r):r}`}).join(",")}function _e(e,t,o){if(e!==void 0){if(!Array.isArray(e)||!e.every(p))throw new d(`${o} must be an array of objects.`,c.USAGE);return e.map(r=>se(r,t))}}function Ee(e,t){return e==="tags"&&Array.isArray(t)&&t.every(o=>typeof o=="string")?JSON.stringify(t):typeof t=="number"||typeof t=="boolean"?String(t):t}function te(e,t,o=!1){let r=[["dependencies","dep",["id","kind","created_at","author","source_kind"]],["comments","comment",["text","created_at","author"]],["notes","note",["text","created_at","author"]],["learnings","learning",["text","created_at","author"]],["files","file",["path","scope","note"]],["tests","test",["command","scope","timeout_seconds"]],["docs","doc",["path","scope","note"]],["reminders","reminder",["at","text","created_at"]],["events","event",["start_at","end_at","title","location"]],["type_options","typeOption",["key","value"]]];for(let[n,i,s]of r){let a=t[n],u=_e(o&&["comments","notes","learnings"].includes(n)&&Array.isArray(a)?a.filter(f=>!p(f)||f.created_at===void 0):a,s,n);u!==void 0&&u.length>0&&(e[i]=u)}}function ge(e,t){for(let o of Object.keys(e)){if(t){if(!E.includes(o))throw y("item envelope",o,E);continue}if(!_.has(o)&&g(o,[..._])===void 0&&g(o,E)==="item")throw y("item envelope",o,E)}}function Ae(e){let t=Object.hasOwn(e,"item");ge(e,t);let o=t?e.item:e;if(!p(o))throw new d("Item document item must be an object.",c.USAGE);return{item:o,...t&&p(e.linked)?{linked:e.linked}:{}}}function Te(e,t,o,r){if(!(r==="update"?de:ne).has(t)){if(!_.has(t)){if(g(t,[..._])!==void 0)throw y("item document",t,[..._]);let s=Array.isArray(e.field)?e.field:[];s.push(se({key:t,value:typeof o=="string"?o:JSON.stringify(o)},["key","value"])),e.field=s;return}["dependencies","comments","notes","learnings","files","tests","docs","reminders","events","type_options"].includes(t)||(e[t.replaceAll(/_([a-z])/gu,(i,s)=>s.toUpperCase())]=Ee(t,o))}}function Rt(e,t,o={}){let r=I(e,"Item document");if(!p(r))throw new d("Item document must be a JSON object.",c.USAGE);let{item:n,linked:i}=Ae(r),s={};for(let[a,u]of Object.entries(n))Te(s,a,u,t);return te(s,n,t==="update"),i!==void 0&&te(s,i),{...s,...Object.fromEntries(Object.entries(o).filter(([,a])=>a!==void 0)),stdinJson:void 0}}function It(e){return ie(JSON.stringify(e))}import Se from"node:crypto";import be 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]="4b7656bd-36a9-5b97-971f-60f717e8e81f")}catch{}})();function A(e,t){let o={...e,...t};return e===void 0?o:C(e,o)}async function m(e,t){try{let r=(await B(t,{},{pmRoot:e})).item;return{id:r.id,closedAt:r.closed_at,updatedAt:r.updated_at,assignee:r.assignee,claimPrincipal:r.claim_principal}}catch(o){if(o instanceof d&&o.exitCode===c.NOT_FOUND)return;throw o}}function v(e,t){let o=e.id.replaceAll(/[^a-zA-Z0-9._-]/gu,"_"),r=Se.createHash("sha256").update($(e)).digest("hex").slice(0,12);return`${t+1}-${e.op}-${o}-${r}`}function Re(e,t){let o=e.id.replaceAll(/[^a-zA-Z0-9._-]/gu,"_");return`${t+1}-${e.op}-${o}`}function h(e,t,o){return`bulk-item-transaction ${e} ${t} ${o}`}async function T(e,t,o,r){let n=await U(be.join(e,"history",`${t}.jsonl`),t),i=h(o,r,"apply"),s=h(o,r,"compensate");for(let a=n.length-1;a>=0;a-=1){let u=n[a].message;if(u===i)return!0;if(u===s)return!1}return!1}async function M(e,t){let o=await m(e,t.id);if(o?.updatedAt===void 0)throw new d(`Bulk ${t.op} target ${t.id} does not exist or has no restorable version`,c.NOT_FOUND);return{target_updated_at:o.updatedAt}}async function S(e,t,o,r){let n=r!==null&&typeof r=="object"&&!Array.isArray(r)?r.target_updated_at:void 0;typeof n=="string"&&await m(e.pmRoot,t)!==void 0&&await V(t,n,{force:!0,author:e.author,message:h(e.transactionId,o,"compensate")},{pmRoot:e.pmRoot})}function ae(e,t,o){return{id:o,async inspect(){let r=await m(e.pmRoot,t.id);return r===void 0?{state:"pending"}:{state:"applied",result:{id:r.id,op:"create"}}},async apply(){let n=(await x(A(t.options,{author:e.author,id:t.id}),{pmRoot:e.pmRoot})).item;return{id:String(n.id),op:"create"}},async compensate(){let r=await m(e.pmRoot,t.id);if(r!==void 0){if(e.createCompensation==="delete"){await W(t.id,{force:!0,author:e.author,message:`Compensate interrupted bulk transaction ${e.transactionId}`},{pmRoot:e.pmRoot});return}r.closedAt===void 0&&await b(t.id,`Compensated: interrupted bulk transaction ${e.transactionId}`,{force:!0,author:e.author},{pmRoot:e.pmRoot})}}}}function Ie(e,t,o){return{id:o,async inspect(){let r=await m(e.pmRoot,t.id);return r===void 0?{state:"pending"}:await T(e.pmRoot,r.id,e.transactionId,o)?{state:"applied",result:{id:r.id,op:"update"}}:{state:"pending"}},async prepareCompensation(){return M(e.pmRoot,t)},async apply(){let n=(await F(t.id,A(t.options,{author:e.author,message:h(e.transactionId,o,"apply")}),{pmRoot:e.pmRoot})).item;return{id:String(n.id),op:"update"}},async compensate(r){await S(e,t.id,o,r)}}}function ve(e,t,o){return{id:o,async inspect(){let r=await m(e.pmRoot,t.id);return r===void 0?{state:"pending"}:await T(e.pmRoot,r.id,e.transactionId,o)?{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 M(e.pmRoot,t)},async apply(){let n=(await b(t.id,t.reason,A(t.options,{author:e.author,message:h(e.transactionId,o,"apply")}),{pmRoot:e.pmRoot})).item;return{id:String(n.id),op:"close"}},async compensate(r){await S(e,t.id,o,r)}}}function Me(e,t,o){return{id:o,async inspect(){let r=await m(e.pmRoot,t.id);return r===void 0?{state:"pending"}:await T(e.pmRoot,r.id,e.transactionId,o)?{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 M(e.pmRoot,t)},async apply(){let n=(await J(t.id,A(t.options,{author:e.author,message:h(e.transactionId,o,"apply")}),{pmRoot:e.pmRoot})).item;return{id:String(n.id),op:"release"}},async compensate(r){await S(e,t.id,o,r)}}}function Oe(e,t,o){let r=v(t,o);switch(t.op){case"create":return ae(e,t,r);case"update":return Ie(e,t,r);case"close":return ve(e,t,r);case"release":return Me(e,t,r)}}function ke(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`)}async function $e(e){let t=[...e.mutations];if(t.length===0)throw new TypeError("Bulk item transaction requires at least one mutation");for(let[s,a]of t.entries())ke(a,s);let o=e.createCompensation??"close";if(!["close","delete"].includes(o))throw new TypeError("Bulk item transaction createCompensation must be close or delete");let r={pmRoot:e.pmRoot,author:e.author,transactionId:e.transactionId,createCompensation:o},n=await K({pmRoot:e.pmRoot,transactionId:e.transactionId,author:e.author,steps:t.map((s,a)=>Oe(r,s,a)),...e.lockTtlSeconds===void 0?{}:{lockTtlSeconds:e.lockTtlSeconds},...e.lockWaitMs===void 0?{}:{lockWaitMs:e.lockWaitMs},...e.onTransition===void 0?{}:{onTransition:e.onTransition}}),i={};for(let[s,a]of t.entries()){let u=v(a,s),f=n.results[u];i[Re(a,s)]=f}return{transactionId:n.transactionId,status:"committed",recovered:n.recovered,results:i}}function Ne(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 jt(e){return $e({pmRoot:e.pmRoot,transactionId:e.transactionId,author:e.author,mutations:Ne(e),...e.lockTtlSeconds===void 0?{}:{lockTtlSeconds:e.lockTtlSeconds},...e.lockWaitMs===void 0?{}:{lockWaitMs:e.lockWaitMs},...e.onTransition===void 0?{}:{onTransition:e.onTransition}})}var Pt={buildCreateStep:ae,bulkHistoryMarker:h,compensateByRestore:S,deriveStepId:v,isUpdateMarkerApplied:T,readItemSnapshot:m};export{St as a,ie as b,bt as c,Rt as d,It as e,$e as f,Ne as g,jt as h,Pt as i};
|
|
2
|
+
//# sourceMappingURL=chunk-5ZY4WE3F.js.map
|