@unbrained/pm-cli 2026.9.10 → 2026.9.11
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 +31 -11
- package/dist/cli/command-namespaces.d.ts +2 -2
- package/dist/cli/command-namespaces.js +1 -1
- package/dist/cli/extension-command-help.js +3 -3
- package/dist/cli/main.d.ts +4 -0
- package/dist/cli/main.js +2 -2
- package/dist/cli/register-history-maintenance.js +2 -1
- package/dist/cli/register-list-query.js +2 -2
- package/dist/cli-bundle/bundle-manifest.json +147 -155
- package/dist/cli-bundle/chunks/{chunk-EOCKPCEY.js → chunk-BN5QVWNY.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-DAWH7TGV.js +3 -0
- package/dist/cli-bundle/chunks/chunk-FBY6PEIR.js +20 -0
- package/dist/cli-bundle/chunks/chunk-IRUNFLLG.js +2 -0
- package/dist/cli-bundle/chunks/chunk-JMQKJ7CJ.js +8 -0
- package/dist/cli-bundle/chunks/{chunk-I6XT3DLQ.js → chunk-QER6OSOP.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-RJQSCK74.js +6 -0
- package/dist/cli-bundle/chunks/chunk-RJZFAXBW.js +235 -0
- package/dist/cli-bundle/chunks/{chunk-MACGGTLQ.js → chunk-SGAKQIGQ.js} +29 -29
- package/dist/cli-bundle/chunks/{chunk-NKOYVKFM.js → chunk-TDKWJQD7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4SFBH77G.js → chunk-TFVKBJJ4.js} +164 -150
- package/dist/cli-bundle/chunks/{chunk-PYUITRSV.js → chunk-VFKBNGF6.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-CUIW7SSE.js → register-list-query-U6MY437C.js} +6 -6
- package/dist/cli-bundle/chunks/{register-mutation-5F5CYUWZ.js → register-mutation-HAPHD4S7.js} +2 -2
- package/dist/cli-bundle/chunks/{register-operations-XIZPLPQY.js → register-operations-EHWIZW3X.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-JVGPCAIL.js → register-setup-BZYL3HBL.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ZJHYQOTM.js → chunk-3JVTLBCW.js} +4 -4
- package/dist/cli-bundle/focused-chunks/chunk-6JF66HAG.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-SL5YVVPV.js → chunk-7WISPJRZ.js} +53 -52
- package/dist/cli-bundle/focused-chunks/chunk-BEQAW7OT.js +12 -0
- package/dist/cli-bundle/focused-chunks/{chunk-CRY5MHEI.js → chunk-DZ3ATEFS.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-FHUARRMA.js → chunk-FJDEFA64.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-7N5MRONP.js → chunk-GKUF7TM5.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-U5SHHU7E.js → chunk-HM6JS6Q3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-M74YW332.js +164 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ZDNAWWQI.js → chunk-MOT32PR2.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-ONDKO4EL.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-M36SF4GE.js → chunk-TGMSSI3Z.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-TWE3GPQM.js +30 -0
- package/dist/cli-bundle/focused-chunks/chunk-UJCQXUD2.js +8 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ZAWAL2CG.js → chunk-VS6MR2HT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-5YU75QLV.js → chunk-YOPNRWSX.js} +2 -2
- package/dist/cli-bundle/main.js +21 -21
- 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 +37 -37
- 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 +42 -42
- 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 +10 -10
- package/dist/core/history/digest.d.ts +12 -0
- package/dist/core/history/digest.js +2 -0
- package/dist/core/history/drift-scan.js +1 -1
- package/dist/core/history/history.d.ts +5 -3
- package/dist/core/history/history.js +2 -2
- package/dist/core/history/replay.d.ts +3 -2
- package/dist/core/history/replay.js +1 -1
- package/dist/core/telemetry/runtime.d.ts +1 -0
- package/dist/core/telemetry/runtime.js +2 -2
- package/dist/sdk/agent/command-recovery.js +1 -1
- package/dist/sdk/agent/item-addressing.js +1 -1
- package/dist/sdk/agent/refusal-corpus-contracts.js +1 -1
- package/dist/sdk/agent-capability-contracts.js +1 -1
- package/dist/sdk/cli-bootstrap.d.ts +2 -1
- package/dist/sdk/cli-bootstrap.js +1 -1
- package/dist/sdk/cli-contracts/command-aliases.d.ts +2 -0
- package/dist/sdk/cli-contracts/command-aliases.js +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.js +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +2 -0
- 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/grammar-contracts.js +1 -1
- package/dist/sdk/cli-contracts/runtime-contracts.js +1 -1
- package/dist/sdk/cli-contracts/tool-schema.d.ts +2 -2
- package/dist/sdk/cli-contracts/tool-schema.js +1 -1
- package/dist/sdk/cli-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts.js +1 -1
- package/dist/sdk/completion.d.ts +2 -0
- package/dist/sdk/completion.js +26 -14
- package/dist/sdk/contracts.d.ts +1 -0
- package/dist/sdk/contracts.js +1 -1
- package/dist/sdk/governance.d.ts +3 -0
- package/dist/sdk/governance.js +1 -1
- package/dist/sdk/history/attestation-command.d.ts +22 -0
- package/dist/sdk/history/attestation-command.js +3 -0
- package/dist/sdk/history/attestation-contract.d.ts +103 -0
- package/dist/sdk/history/attestation-contract.js +2 -0
- package/dist/sdk/history/attestation-scan.d.ts +16 -0
- package/dist/sdk/history/attestation-scan.js +2 -0
- package/dist/sdk/history/attestation.d.ts +8 -0
- package/dist/sdk/history/attestation.js +2 -0
- package/dist/sdk/history/salvage.js +1 -1
- package/dist/sdk/history-compact.js +1 -1
- package/dist/sdk/history-read.js +1 -1
- package/dist/sdk/history-redact.js +1 -1
- package/dist/sdk/history-repair.js +1 -1
- package/dist/sdk/index.d.ts +2 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/read-output-budget.d.ts +4 -10
- package/dist/sdk/read-output-budget.js +1 -1
- package/dist/sdk/read-output-contracts.d.ts +1 -1
- package/dist/sdk/read-output-contracts.js +1 -1
- package/dist/sdk/read-output-session.d.ts +1 -1
- package/dist/sdk/read-output-session.js +1 -1
- package/dist/sdk/runtime-input.js +1 -1
- package/dist/sdk/runtime.d.ts +3 -0
- package/dist/sdk/runtime.js +1 -1
- package/dist/types.d.ts +5 -1
- package/dist/types.js +1 -1
- package/docs/CLI_GRAMMAR.md +23 -0
- package/docs/HISTORY_ATTESTATION.md +164 -0
- package/docs/README.md +1 -0
- package/docs/READ_OUTPUT_CONTRACTS.md +13 -0
- package/docs/generated/AGENT_CAPABILITY_ROUTING.md +4 -4
- package/docs/generated/AGENT_COMMAND_SURFACE.md +5 -0
- package/docs/generated/FLAG_LEXICON_BUDGETS.md +5 -0
- package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +4 -4
- package/marketplace.json +2 -2
- package/package.json +4 -4
- 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/README.md +9 -7
- package/packages/pm-governance-audit/extensions/governance-audit/index.ts +6 -3
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +7 -19
- 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/README.md +9 -5
- package/packages/pm-search-advanced/extensions/search-advanced/index.ts +3 -2
- 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
- package/dist/cli-bundle/chunks/chunk-74RGSPLL.js +0 -2
- package/dist/cli-bundle/chunks/chunk-7WIHZI2M.js +0 -5
- package/dist/cli-bundle/chunks/chunk-GLQMKUGP.js +0 -2
- package/dist/cli-bundle/chunks/chunk-P6BEYAON.js +0 -8
- package/dist/cli-bundle/chunks/chunk-TSWEX72T.js +0 -20
- package/dist/cli-bundle/chunks/chunk-YKQTETJI.js +0 -235
- package/dist/cli-bundle/focused-chunks/chunk-26O2WB73.js +0 -10
- package/dist/cli-bundle/focused-chunks/chunk-B2CMFYRZ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-F6WKFXBT.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-OROZM37I.js +0 -177
- package/dist/cli-bundle/focused-chunks/chunk-PNGYYQY7.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-TPOL4TWE.js +0 -9
- package/dist/cli-bundle/focused-chunks/chunk-XSMA2W6Q.js +0 -12
|
@@ -1,30 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
|
-
"generation": "
|
|
3
|
+
"generation": "a615bd57fc72a51e4dbc104094cf76be4b67aaa0029eec74c7de6389c7720d36",
|
|
4
4
|
"files": [
|
|
5
5
|
{
|
|
6
|
-
"path": "chunks/chunk-
|
|
7
|
-
"sha256": "
|
|
6
|
+
"path": "chunks/chunk-BN5QVWNY.js",
|
|
7
|
+
"sha256": "2359b3512c9352488f2b4499788fca44c97f35e711c6c27b3c937e255a8be23f"
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
|
-
"path": "chunks/chunk-
|
|
11
|
-
"sha256": "
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"path": "chunks/chunk-74RGSPLL.js",
|
|
15
|
-
"sha256": "94c5060ad261d4f7ad3bd37b6143c8b7d97af9e2d0da8f8bb7d32c2e20f52a1d"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"path": "chunks/chunk-74RGSPLL.js.map",
|
|
19
|
-
"sha256": "b1e8fca1b5584ac97b3b8ba746a8b798bf47e6d8ad7c0b89beccebc0359e3f3c"
|
|
10
|
+
"path": "chunks/chunk-BN5QVWNY.js.map",
|
|
11
|
+
"sha256": "9896c6afbbc7d8768ce5d0813fe4f33f36f6423e3566dc4b87c21d22ad92ebdc"
|
|
20
12
|
},
|
|
21
13
|
{
|
|
22
|
-
"path": "chunks/chunk-
|
|
23
|
-
"sha256": "
|
|
14
|
+
"path": "chunks/chunk-DAWH7TGV.js",
|
|
15
|
+
"sha256": "3fda772d3de93d538f1d69364b3e9c0d82af4d571ea75153382ba808a9a8446e"
|
|
24
16
|
},
|
|
25
17
|
{
|
|
26
|
-
"path": "chunks/chunk-
|
|
27
|
-
"sha256": "
|
|
18
|
+
"path": "chunks/chunk-DAWH7TGV.js.map",
|
|
19
|
+
"sha256": "9e73ba1e2cdcd01e9eff1902770b86141ebe926c56c1ae10ab103c5f0e343a59"
|
|
28
20
|
},
|
|
29
21
|
{
|
|
30
22
|
"path": "chunks/chunk-DEZPZOQ7.js",
|
|
@@ -35,60 +27,60 @@
|
|
|
35
27
|
"sha256": "ed562b0bba7ee7214e56ac7f728054b3496bec4597c94a4eb7b4179e6f5cb1c9"
|
|
36
28
|
},
|
|
37
29
|
{
|
|
38
|
-
"path": "chunks/chunk-
|
|
39
|
-
"sha256": "
|
|
30
|
+
"path": "chunks/chunk-FBY6PEIR.js",
|
|
31
|
+
"sha256": "09a217932d40cb9ca95ea391e5417c0dc700eaff4d24779436c35d19595c555a"
|
|
40
32
|
},
|
|
41
33
|
{
|
|
42
|
-
"path": "chunks/chunk-
|
|
43
|
-
"sha256": "
|
|
34
|
+
"path": "chunks/chunk-FBY6PEIR.js.map",
|
|
35
|
+
"sha256": "da2d1b94247172973c2f6b4359adc10bcf742c5b6688b77e5bb1efea6a8ca49b"
|
|
44
36
|
},
|
|
45
37
|
{
|
|
46
|
-
"path": "chunks/chunk-
|
|
47
|
-
"sha256": "
|
|
38
|
+
"path": "chunks/chunk-IRUNFLLG.js",
|
|
39
|
+
"sha256": "5099bff1de1eff21a294db1c2613783cc7eba3a0fd2001c985005e4555183921"
|
|
48
40
|
},
|
|
49
41
|
{
|
|
50
|
-
"path": "chunks/chunk-
|
|
51
|
-
"sha256": "
|
|
42
|
+
"path": "chunks/chunk-IRUNFLLG.js.map",
|
|
43
|
+
"sha256": "2d1fc04f301e67cf0ad6e1aa0654a64d5ad01ee236d321c5f7cab760ff132e18"
|
|
52
44
|
},
|
|
53
45
|
{
|
|
54
|
-
"path": "chunks/chunk-
|
|
55
|
-
"sha256": "
|
|
46
|
+
"path": "chunks/chunk-JMQKJ7CJ.js",
|
|
47
|
+
"sha256": "bf87ead06db5b4100cc0bc44dcafeeb2f41c78274b2ae283c84abfecee7094d8"
|
|
56
48
|
},
|
|
57
49
|
{
|
|
58
|
-
"path": "chunks/chunk-
|
|
59
|
-
"sha256": "
|
|
50
|
+
"path": "chunks/chunk-JMQKJ7CJ.js.map",
|
|
51
|
+
"sha256": "4aa0ba42b34a4b31464888bae04a1b908f072c323521ee6a7d02037b8177c3c8"
|
|
60
52
|
},
|
|
61
53
|
{
|
|
62
|
-
"path": "chunks/chunk-
|
|
63
|
-
"sha256": "
|
|
54
|
+
"path": "chunks/chunk-QER6OSOP.js",
|
|
55
|
+
"sha256": "e87aca358b57576c89d614c4c2d79254b83a027f7a0d1b82ffcf8536598f8403"
|
|
64
56
|
},
|
|
65
57
|
{
|
|
66
|
-
"path": "chunks/chunk-
|
|
67
|
-
"sha256": "
|
|
58
|
+
"path": "chunks/chunk-QER6OSOP.js.map",
|
|
59
|
+
"sha256": "74d505b6fbe1f124dc25107bba6cce7aa5da7212eebf24c5ab874e6453315a13"
|
|
68
60
|
},
|
|
69
61
|
{
|
|
70
|
-
"path": "chunks/chunk-
|
|
71
|
-
"sha256": "
|
|
62
|
+
"path": "chunks/chunk-RJQSCK74.js",
|
|
63
|
+
"sha256": "106524f0729749994aa4aa432b69c5c2eef235981551c5efd0cfc4328c59b169"
|
|
72
64
|
},
|
|
73
65
|
{
|
|
74
|
-
"path": "chunks/chunk-
|
|
75
|
-
"sha256": "
|
|
66
|
+
"path": "chunks/chunk-RJQSCK74.js.map",
|
|
67
|
+
"sha256": "862752c77ef824fd46c44b16772e2e4c108a0f54c61c607c9092d73d0e529919"
|
|
76
68
|
},
|
|
77
69
|
{
|
|
78
|
-
"path": "chunks/chunk-
|
|
79
|
-
"sha256": "
|
|
70
|
+
"path": "chunks/chunk-RJZFAXBW.js",
|
|
71
|
+
"sha256": "3dde49f3e26e85ed8b65084a9eb970a844c65a57d88e27ab92d7ac63c2b5b6be"
|
|
80
72
|
},
|
|
81
73
|
{
|
|
82
|
-
"path": "chunks/chunk-
|
|
83
|
-
"sha256": "
|
|
74
|
+
"path": "chunks/chunk-RJZFAXBW.js.map",
|
|
75
|
+
"sha256": "16f62844fcdde04294290a150d0a6f523f1f8a876fbf16f3d0c8047217f8e94a"
|
|
84
76
|
},
|
|
85
77
|
{
|
|
86
|
-
"path": "chunks/chunk-
|
|
87
|
-
"sha256": "
|
|
78
|
+
"path": "chunks/chunk-SGAKQIGQ.js",
|
|
79
|
+
"sha256": "8021a96bbf7e56f389b1dca848afc02f5d60b9b82900b76e3095ce1f7c09b9f5"
|
|
88
80
|
},
|
|
89
81
|
{
|
|
90
|
-
"path": "chunks/chunk-
|
|
91
|
-
"sha256": "
|
|
82
|
+
"path": "chunks/chunk-SGAKQIGQ.js.map",
|
|
83
|
+
"sha256": "ec588c23635ddca52291a662db47ad42593634ff4ecfb62a08e8f61206be8ab2"
|
|
92
84
|
},
|
|
93
85
|
{
|
|
94
86
|
"path": "chunks/chunk-T3AMFUCN.js",
|
|
@@ -99,200 +91,200 @@
|
|
|
99
91
|
"sha256": "ed562b0bba7ee7214e56ac7f728054b3496bec4597c94a4eb7b4179e6f5cb1c9"
|
|
100
92
|
},
|
|
101
93
|
{
|
|
102
|
-
"path": "chunks/chunk-
|
|
103
|
-
"sha256": "
|
|
94
|
+
"path": "chunks/chunk-TDKWJQD7.js",
|
|
95
|
+
"sha256": "d42c8a040500fb5f941804727d6832c17059ad49ff7eca375711a474f5abda0e"
|
|
104
96
|
},
|
|
105
97
|
{
|
|
106
|
-
"path": "chunks/chunk-
|
|
107
|
-
"sha256": "
|
|
98
|
+
"path": "chunks/chunk-TDKWJQD7.js.map",
|
|
99
|
+
"sha256": "0200c9615da175537e969f543b56abac48b061648ad398b9bf42c17baf2fcb99"
|
|
108
100
|
},
|
|
109
101
|
{
|
|
110
|
-
"path": "chunks/chunk-
|
|
111
|
-
"sha256": "
|
|
102
|
+
"path": "chunks/chunk-TFVKBJJ4.js",
|
|
103
|
+
"sha256": "9cb33d3cca2a5108d4b75d126f6c65fbd10a322ad1808c3217714899793db87e"
|
|
112
104
|
},
|
|
113
105
|
{
|
|
114
|
-
"path": "chunks/chunk-
|
|
115
|
-
"sha256": "
|
|
106
|
+
"path": "chunks/chunk-TFVKBJJ4.js.map",
|
|
107
|
+
"sha256": "e005dff833b3e2692b0900f5ba272b79c21904781965d430ac60378e2b411309"
|
|
116
108
|
},
|
|
117
109
|
{
|
|
118
|
-
"path": "chunks/
|
|
119
|
-
"sha256": "
|
|
110
|
+
"path": "chunks/chunk-VFKBNGF6.js",
|
|
111
|
+
"sha256": "aff7e9d811b6fc26879559488e2dc1d0e750a9242fc8f5334df2d7976eb420cb"
|
|
120
112
|
},
|
|
121
113
|
{
|
|
122
|
-
"path": "chunks/
|
|
123
|
-
"sha256": "
|
|
114
|
+
"path": "chunks/chunk-VFKBNGF6.js.map",
|
|
115
|
+
"sha256": "80a615273c13c3004a0977f41ade5169cca1e37b64c3942f2c9c9c33a5fc5965"
|
|
124
116
|
},
|
|
125
117
|
{
|
|
126
|
-
"path": "chunks/register-
|
|
127
|
-
"sha256": "
|
|
118
|
+
"path": "chunks/register-list-query-U6MY437C.js",
|
|
119
|
+
"sha256": "68048e1ca381e86b0800a12fd5d7db76c4c8d4839134c4f872f86bda2aade39b"
|
|
128
120
|
},
|
|
129
121
|
{
|
|
130
|
-
"path": "chunks/register-
|
|
131
|
-
"sha256": "
|
|
122
|
+
"path": "chunks/register-list-query-U6MY437C.js.map",
|
|
123
|
+
"sha256": "dbbce970dac9340c5b7850c3430f52a9b4096f972d956b84ee94d22b027f6f35"
|
|
132
124
|
},
|
|
133
125
|
{
|
|
134
|
-
"path": "chunks/register-
|
|
135
|
-
"sha256": "
|
|
126
|
+
"path": "chunks/register-mutation-HAPHD4S7.js",
|
|
127
|
+
"sha256": "69f000d1be016cea42e48e351f24ff794d8f6f502615d1b667c86a1b609f15ab"
|
|
136
128
|
},
|
|
137
129
|
{
|
|
138
|
-
"path": "chunks/register-
|
|
139
|
-
"sha256": "
|
|
130
|
+
"path": "chunks/register-mutation-HAPHD4S7.js.map",
|
|
131
|
+
"sha256": "2e5c54a32f222e9ce960fe0a14b5c7326b28ae2bff1755863ed8e5e49231085f"
|
|
140
132
|
},
|
|
141
133
|
{
|
|
142
|
-
"path": "chunks/register-
|
|
143
|
-
"sha256": "
|
|
134
|
+
"path": "chunks/register-operations-EHWIZW3X.js",
|
|
135
|
+
"sha256": "23a7547cb7a70de89ede03921b93fc0827d0ab20b374e46785b16ae3b3d20be2"
|
|
144
136
|
},
|
|
145
137
|
{
|
|
146
|
-
"path": "chunks/register-
|
|
147
|
-
"sha256": "
|
|
138
|
+
"path": "chunks/register-operations-EHWIZW3X.js.map",
|
|
139
|
+
"sha256": "7ad2852b25c7a17ad44408cd28c810a7067f73c23435bfed2940a02eddde019c"
|
|
148
140
|
},
|
|
149
141
|
{
|
|
150
|
-
"path": "
|
|
151
|
-
"sha256": "
|
|
142
|
+
"path": "chunks/register-setup-BZYL3HBL.js",
|
|
143
|
+
"sha256": "154a500819a21cb97588d76f9b0d18cbcb2f361b773e2bbc7b3f6ddedb508f84"
|
|
152
144
|
},
|
|
153
145
|
{
|
|
154
|
-
"path": "
|
|
155
|
-
"sha256": "
|
|
146
|
+
"path": "chunks/register-setup-BZYL3HBL.js.map",
|
|
147
|
+
"sha256": "a6c098f8a9b94ed076922b2499cd916bade60df99004d705e1b3d801212c5a6e"
|
|
156
148
|
},
|
|
157
149
|
{
|
|
158
|
-
"path": "focused-chunks/chunk-
|
|
159
|
-
"sha256": "
|
|
150
|
+
"path": "focused-chunks/chunk-3JVTLBCW.js",
|
|
151
|
+
"sha256": "47db3421d81e6db5f5459becc9478cae18e50100e7dde804e7c4a18a97d773d5"
|
|
160
152
|
},
|
|
161
153
|
{
|
|
162
|
-
"path": "focused-chunks/chunk-
|
|
163
|
-
"sha256": "
|
|
154
|
+
"path": "focused-chunks/chunk-3JVTLBCW.js.map",
|
|
155
|
+
"sha256": "bb63246e7ffa1a57fdda371d1e6164a0141ecb139f555b8141f77d1ce8dd1d5f"
|
|
164
156
|
},
|
|
165
157
|
{
|
|
166
|
-
"path": "focused-chunks/chunk-
|
|
167
|
-
"sha256": "
|
|
158
|
+
"path": "focused-chunks/chunk-6JF66HAG.js",
|
|
159
|
+
"sha256": "9695deb4341d22278859576811446544dce985abef3a2fb496bf18d296ca196b"
|
|
168
160
|
},
|
|
169
161
|
{
|
|
170
|
-
"path": "focused-chunks/chunk-
|
|
171
|
-
"sha256": "
|
|
162
|
+
"path": "focused-chunks/chunk-6JF66HAG.js.map",
|
|
163
|
+
"sha256": "d2b01bd51153c8bdcbc71ae3607bd97023430d4f5fd43f6ab95ba994e0546e65"
|
|
172
164
|
},
|
|
173
165
|
{
|
|
174
|
-
"path": "focused-chunks/chunk-
|
|
175
|
-
"sha256": "
|
|
166
|
+
"path": "focused-chunks/chunk-7WISPJRZ.js",
|
|
167
|
+
"sha256": "b5fed397e266c70fc4f9aa3afbda0fccce8cffbbae919196f30a082d5ad44bcf"
|
|
176
168
|
},
|
|
177
169
|
{
|
|
178
|
-
"path": "focused-chunks/chunk-
|
|
179
|
-
"sha256": "
|
|
170
|
+
"path": "focused-chunks/chunk-7WISPJRZ.js.map",
|
|
171
|
+
"sha256": "1af201d8d6fca5b238f56a0129cbab026c2ba690ea21937c40ec1d6d9c6d7ba0"
|
|
180
172
|
},
|
|
181
173
|
{
|
|
182
|
-
"path": "focused-chunks/chunk-
|
|
183
|
-
"sha256": "
|
|
174
|
+
"path": "focused-chunks/chunk-BEQAW7OT.js",
|
|
175
|
+
"sha256": "4dca397ce48cfb3ed661a769179f6123f2661ee532c17578d2382ffb1346e764"
|
|
184
176
|
},
|
|
185
177
|
{
|
|
186
|
-
"path": "focused-chunks/chunk-
|
|
187
|
-
"sha256": "
|
|
178
|
+
"path": "focused-chunks/chunk-BEQAW7OT.js.map",
|
|
179
|
+
"sha256": "5ddf87727b82b0064f830d5978cbf8fd4697971b3349a73aeeb30a7849760e76"
|
|
188
180
|
},
|
|
189
181
|
{
|
|
190
|
-
"path": "focused-chunks/chunk-
|
|
191
|
-
"sha256": "
|
|
182
|
+
"path": "focused-chunks/chunk-DZ3ATEFS.js",
|
|
183
|
+
"sha256": "129984f6fedf1776ad5a6c75ff1a9e5f68bcdb8f26140f3351d0a2b6137bf7a0"
|
|
192
184
|
},
|
|
193
185
|
{
|
|
194
|
-
"path": "focused-chunks/chunk-
|
|
195
|
-
"sha256": "
|
|
186
|
+
"path": "focused-chunks/chunk-DZ3ATEFS.js.map",
|
|
187
|
+
"sha256": "358d32df0d0e3d5646c7559bdec8297f2508053cd191553d6827e88abfe47847"
|
|
196
188
|
},
|
|
197
189
|
{
|
|
198
|
-
"path": "focused-chunks/chunk-
|
|
199
|
-
"sha256": "
|
|
190
|
+
"path": "focused-chunks/chunk-FJDEFA64.js",
|
|
191
|
+
"sha256": "a6dfd1315dc7454c166d583c826776ae7f64c7f6df165634abedce67d4bb0c1b"
|
|
200
192
|
},
|
|
201
193
|
{
|
|
202
|
-
"path": "focused-chunks/chunk-
|
|
194
|
+
"path": "focused-chunks/chunk-FJDEFA64.js.map",
|
|
203
195
|
"sha256": "974f8e877cfa8adb7e05770e5573548ae5f041e06cdf871f34b1fa2f4e63fd3e"
|
|
204
196
|
},
|
|
205
197
|
{
|
|
206
|
-
"path": "focused-chunks/chunk-
|
|
207
|
-
"sha256": "
|
|
198
|
+
"path": "focused-chunks/chunk-GKUF7TM5.js",
|
|
199
|
+
"sha256": "47c45f918d881998be1bc9a51de98e6e474d4315f68abb60e0233f388828919b"
|
|
208
200
|
},
|
|
209
201
|
{
|
|
210
|
-
"path": "focused-chunks/chunk-
|
|
211
|
-
"sha256": "
|
|
202
|
+
"path": "focused-chunks/chunk-GKUF7TM5.js.map",
|
|
203
|
+
"sha256": "56f0297ef91e355cf1ae58b2e3244e0f246c67e230c6dd9e9be121e0d16dfd7d"
|
|
212
204
|
},
|
|
213
205
|
{
|
|
214
|
-
"path": "focused-chunks/chunk-
|
|
215
|
-
"sha256": "
|
|
206
|
+
"path": "focused-chunks/chunk-HM6JS6Q3.js",
|
|
207
|
+
"sha256": "c12aecade8fa4f8a1684dc9b065f2ba60760400ffe44e1630580ba2dec64704b"
|
|
216
208
|
},
|
|
217
209
|
{
|
|
218
|
-
"path": "focused-chunks/chunk-
|
|
219
|
-
"sha256": "
|
|
210
|
+
"path": "focused-chunks/chunk-HM6JS6Q3.js.map",
|
|
211
|
+
"sha256": "3c85a304dc8d31b77b68df15d0c57b035c8405bc1a2a40fea766e0e812212520"
|
|
220
212
|
},
|
|
221
213
|
{
|
|
222
|
-
"path": "focused-chunks/chunk-
|
|
223
|
-
"sha256": "
|
|
214
|
+
"path": "focused-chunks/chunk-M74YW332.js",
|
|
215
|
+
"sha256": "05b013f4689e817a142d9181294f3cd889aab1d8e1ddec9d4eda424f352f6ee8"
|
|
224
216
|
},
|
|
225
217
|
{
|
|
226
|
-
"path": "focused-chunks/chunk-
|
|
227
|
-
"sha256": "
|
|
218
|
+
"path": "focused-chunks/chunk-M74YW332.js.map",
|
|
219
|
+
"sha256": "42bf1a75e90dea96b7709f9439d693832b0c8d915260d9b7935c034cec9a3303"
|
|
228
220
|
},
|
|
229
221
|
{
|
|
230
|
-
"path": "focused-chunks/chunk-
|
|
231
|
-
"sha256": "
|
|
222
|
+
"path": "focused-chunks/chunk-MOT32PR2.js",
|
|
223
|
+
"sha256": "30952da806586721099a098ceaecc384d797daae09d82451a64fdec36cf9a297"
|
|
232
224
|
},
|
|
233
225
|
{
|
|
234
|
-
"path": "focused-chunks/chunk-
|
|
235
|
-
"sha256": "
|
|
226
|
+
"path": "focused-chunks/chunk-MOT32PR2.js.map",
|
|
227
|
+
"sha256": "e38db2743f60700f534d954b34412f7ad8758e68c77e868fbee337e28c3816d4"
|
|
236
228
|
},
|
|
237
229
|
{
|
|
238
|
-
"path": "focused-chunks/chunk-
|
|
239
|
-
"sha256": "
|
|
230
|
+
"path": "focused-chunks/chunk-ONDKO4EL.js",
|
|
231
|
+
"sha256": "d22c0f3905aeca3d384889da768e0fe2e697acf2f156c502678ae5a8ecbacb59"
|
|
240
232
|
},
|
|
241
233
|
{
|
|
242
|
-
"path": "focused-chunks/chunk-
|
|
243
|
-
"sha256": "
|
|
234
|
+
"path": "focused-chunks/chunk-ONDKO4EL.js.map",
|
|
235
|
+
"sha256": "d7cca91708b310530bc7139f35ef9fe0b34c59f0db5ab87efdacfb48699c1431"
|
|
244
236
|
},
|
|
245
237
|
{
|
|
246
|
-
"path": "focused-chunks/chunk-
|
|
247
|
-
"sha256": "
|
|
238
|
+
"path": "focused-chunks/chunk-TGMSSI3Z.js",
|
|
239
|
+
"sha256": "07e71fe4c1724c6a41eea01b9113481aa4d7d16d9bd1b043c9354f04550f63f4"
|
|
248
240
|
},
|
|
249
241
|
{
|
|
250
|
-
"path": "focused-chunks/chunk-
|
|
251
|
-
"sha256": "
|
|
242
|
+
"path": "focused-chunks/chunk-TGMSSI3Z.js.map",
|
|
243
|
+
"sha256": "73c92b5ae05038383dd008f67af6058b950d44432d9e1a4cd396e93b48048e68"
|
|
252
244
|
},
|
|
253
245
|
{
|
|
254
|
-
"path": "focused-chunks/chunk-
|
|
255
|
-
"sha256": "
|
|
246
|
+
"path": "focused-chunks/chunk-TWE3GPQM.js",
|
|
247
|
+
"sha256": "e00c9450e8d0d227175b8be7071eec403b890af91b9d3c766d744e5d134650fe"
|
|
256
248
|
},
|
|
257
249
|
{
|
|
258
|
-
"path": "focused-chunks/chunk-
|
|
259
|
-
"sha256": "
|
|
250
|
+
"path": "focused-chunks/chunk-TWE3GPQM.js.map",
|
|
251
|
+
"sha256": "8b1c72d6dd66df225e59b835091d5fede3a36f00a93e61ba3a6cf09017a5c1e1"
|
|
260
252
|
},
|
|
261
253
|
{
|
|
262
|
-
"path": "focused-chunks/chunk-
|
|
263
|
-
"sha256": "
|
|
254
|
+
"path": "focused-chunks/chunk-UJCQXUD2.js",
|
|
255
|
+
"sha256": "c294624f40e3c033a86957b6bc76c6fb6732602de5cf0104f59fb5ef2fd8a7a1"
|
|
264
256
|
},
|
|
265
257
|
{
|
|
266
|
-
"path": "focused-chunks/chunk-
|
|
267
|
-
"sha256": "
|
|
258
|
+
"path": "focused-chunks/chunk-UJCQXUD2.js.map",
|
|
259
|
+
"sha256": "d630bf56bd642198df70d31c5dda6fd3df81e66338e35d83c3b25084ab6f82de"
|
|
268
260
|
},
|
|
269
261
|
{
|
|
270
|
-
"path": "focused-chunks/chunk-
|
|
271
|
-
"sha256": "
|
|
262
|
+
"path": "focused-chunks/chunk-VS6MR2HT.js",
|
|
263
|
+
"sha256": "b1e14d2faae034e40437f8fd5d6270555ba70011f24fdfb8a539885621b06ea9"
|
|
272
264
|
},
|
|
273
265
|
{
|
|
274
|
-
"path": "focused-chunks/chunk-
|
|
275
|
-
"sha256": "
|
|
266
|
+
"path": "focused-chunks/chunk-VS6MR2HT.js.map",
|
|
267
|
+
"sha256": "5dfe085149b8749b6019a60fd2c99794743a25795d80272b34102ed025ff3da2"
|
|
276
268
|
},
|
|
277
269
|
{
|
|
278
|
-
"path": "focused-chunks/chunk-
|
|
279
|
-
"sha256": "
|
|
270
|
+
"path": "focused-chunks/chunk-YOPNRWSX.js",
|
|
271
|
+
"sha256": "5277afde91da62ae3ffefe11ae7a820768f5742db823673a752c58e0125e66cb"
|
|
280
272
|
},
|
|
281
273
|
{
|
|
282
|
-
"path": "focused-chunks/chunk-
|
|
283
|
-
"sha256": "
|
|
274
|
+
"path": "focused-chunks/chunk-YOPNRWSX.js.map",
|
|
275
|
+
"sha256": "460c9ac67c5d4605dbac0aa4ec917abbbd691a5a781799bfcafbedaad9db7bda"
|
|
284
276
|
},
|
|
285
277
|
{
|
|
286
278
|
"path": "main.js",
|
|
287
|
-
"sha256": "
|
|
279
|
+
"sha256": "b8cd3adc765c14030a1c0724d41cf8e6620f34e34f4f714a3d3eee311082eba8"
|
|
288
280
|
},
|
|
289
281
|
{
|
|
290
282
|
"path": "main.js.map",
|
|
291
|
-
"sha256": "
|
|
283
|
+
"sha256": "46d32e3e7ff2c2068bc1b5aa9b1b03ebc43f41a3b5f9f01339225c8d87c9c915"
|
|
292
284
|
},
|
|
293
285
|
{
|
|
294
286
|
"path": "sdk-authoring.js",
|
|
295
|
-
"sha256": "
|
|
287
|
+
"sha256": "dbb11539b685f62fd85ab15159bee4b2ca0efbd287b8734a4536af6c99f56c23"
|
|
296
288
|
},
|
|
297
289
|
{
|
|
298
290
|
"path": "sdk-authoring.js.map",
|
|
@@ -300,55 +292,55 @@
|
|
|
300
292
|
},
|
|
301
293
|
{
|
|
302
294
|
"path": "sdk-contracts.js",
|
|
303
|
-
"sha256": "
|
|
295
|
+
"sha256": "99f4427e61eb3905122d39f5228e5c2c79d57018efd73b89d058dc2f96f3d6da"
|
|
304
296
|
},
|
|
305
297
|
{
|
|
306
298
|
"path": "sdk-contracts.js.map",
|
|
307
|
-
"sha256": "
|
|
299
|
+
"sha256": "2f50c6bc4fce326d5f5d84c247889b2b46db1297c35f9ea6594739fb05c3f1f4"
|
|
308
300
|
},
|
|
309
301
|
{
|
|
310
302
|
"path": "sdk-core.js",
|
|
311
|
-
"sha256": "
|
|
303
|
+
"sha256": "c8382f20803f8850c2455fd9d3e5976d862666147711ca3bd89e8d4583292e49"
|
|
312
304
|
},
|
|
313
305
|
{
|
|
314
306
|
"path": "sdk-core.js.map",
|
|
315
|
-
"sha256": "
|
|
307
|
+
"sha256": "bf0178e4b04a077c1fc238cf288cf4d9d79f29290abed8329c56ed2278a55dd8"
|
|
316
308
|
},
|
|
317
309
|
{
|
|
318
310
|
"path": "sdk-governance.js",
|
|
319
|
-
"sha256": "
|
|
311
|
+
"sha256": "4a5006c470d13b136fc3e8332c24fb262b13ba4bfefd38bfcc524c9ed05a460e"
|
|
320
312
|
},
|
|
321
313
|
{
|
|
322
314
|
"path": "sdk-governance.js.map",
|
|
323
|
-
"sha256": "
|
|
315
|
+
"sha256": "d61213689d402415ca889b74a774370f403b923fd7d052d63f23dd694d74d70d"
|
|
324
316
|
},
|
|
325
317
|
{
|
|
326
318
|
"path": "sdk-graph.js",
|
|
327
|
-
"sha256": "
|
|
319
|
+
"sha256": "4bcadc232d94ba5c5b8e3a79dae15d922d4ffc6ccf750152bd498fc8c372d5f1"
|
|
328
320
|
},
|
|
329
321
|
{
|
|
330
322
|
"path": "sdk-graph.js.map",
|
|
331
|
-
"sha256": "
|
|
323
|
+
"sha256": "b82154fb6cffb2acd040565630b177b22c1f956c813adfb537aa79fba1ff2c86"
|
|
332
324
|
},
|
|
333
325
|
{
|
|
334
326
|
"path": "sdk-merge.js",
|
|
335
|
-
"sha256": "
|
|
327
|
+
"sha256": "3098c6543d40ec76c4bc3635855cd5d845d50284f07c4b6078cf1a7419ac32ed"
|
|
336
328
|
},
|
|
337
329
|
{
|
|
338
330
|
"path": "sdk-merge.js.map",
|
|
339
|
-
"sha256": "
|
|
331
|
+
"sha256": "b09c592adcec80095d648bf6751bf7dd412b7a36a15a8567bd3cd3daf52622c9"
|
|
340
332
|
},
|
|
341
333
|
{
|
|
342
334
|
"path": "sdk-query.js",
|
|
343
|
-
"sha256": "
|
|
335
|
+
"sha256": "00ddf822f6e353b16f1ff2de503f17225c01908f3d9d57494453989fa42c662c"
|
|
344
336
|
},
|
|
345
337
|
{
|
|
346
338
|
"path": "sdk-query.js.map",
|
|
347
|
-
"sha256": "
|
|
339
|
+
"sha256": "a4a2d05335b3c3b35a035438c04d7b803ec79462cd40cf54659f88cf9973f117"
|
|
348
340
|
},
|
|
349
341
|
{
|
|
350
342
|
"path": "sdk-runtime.js",
|
|
351
|
-
"sha256": "
|
|
343
|
+
"sha256": "0f30a534afca3fbd26fb4fc26b38076b90c4400d07cbe82e93ece7ff98f06423"
|
|
352
344
|
},
|
|
353
345
|
{
|
|
354
346
|
"path": "sdk-runtime.js.map",
|
|
@@ -356,7 +348,7 @@
|
|
|
356
348
|
},
|
|
357
349
|
{
|
|
358
350
|
"path": "sdk-testing.js",
|
|
359
|
-
"sha256": "
|
|
351
|
+
"sha256": "034174157141c35957719ca9f859322779c1a8b68673d3b0eefee83b3f4733a9"
|
|
360
352
|
},
|
|
361
353
|
{
|
|
362
354
|
"path": "sdk-testing.js.map",
|
|
@@ -364,11 +356,11 @@
|
|
|
364
356
|
},
|
|
365
357
|
{
|
|
366
358
|
"path": "sdk.js",
|
|
367
|
-
"sha256": "
|
|
359
|
+
"sha256": "f6320529c1fe60ed82c69f1fe914b114dc10d413666761ec1d73bae14b8b3392"
|
|
368
360
|
},
|
|
369
361
|
{
|
|
370
362
|
"path": "sdk.js.map",
|
|
371
|
-
"sha256": "
|
|
363
|
+
"sha256": "741b0546d7efe513b1dd3f77b3beca0d899ad47916c5fcacfb37ccf34678518e"
|
|
372
364
|
}
|
|
373
365
|
]
|
|
374
366
|
}
|
|
@@ -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-4SFBH77G.js";import{b as K}from"./chunk-I6XT3DLQ.js";import{Ad as C,Bi as G,C as O,Lm as L,N as c,P as d,Rm as z,Te as U,dc as $,kl as j,na as k,nl as P,yd as N,zi as D}from"./chunk-YKQTETJI.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-TFVKBJJ4.js";import{b as K}from"./chunk-QER6OSOP.js";import{Bd as C,D as O,Fi as D,Hi as G,O as c,Q as d,Sm as L,Ym as z,Ze as U,ec as $,oa as k,ql as j,tl as P,zd as N}from"./chunk-RJZFAXBW.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-BN5QVWNY.js.map
|