@yunhozz/arc 0.1.10 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MANIFEST.sha256 +36 -27
- package/README.md +18 -30
- package/claude/skill/references/handoff.md +11 -1
- package/claude/skill/references/planning.md +6 -1
- package/claude/skill/runtime/bootstrap.mjs +1 -1
- package/claude/skill/runtime/cli.mjs +8 -0
- package/{lib/cli/workflow.mjs → claude/skill/runtime/command.mjs} +4 -4
- package/codex/skill/references/handoff.md +11 -1
- package/codex/skill/references/planning.md +6 -1
- package/codex/skill/runtime/bootstrap.mjs +1 -1
- package/codex/skill/runtime/cli.mjs +8 -0
- package/codex/skill/runtime/command.mjs +21 -0
- package/lib/cli/postinstall.mjs +3 -16
- package/lib/cli/root.mjs +8 -19
- package/lib/cli/upgrade.mjs +1 -57
- package/lib/installer/manifest.mjs +6 -1
- package/lib/installer/runtime-assets.mjs +25 -0
- package/lib/installer/shell-completion.mjs +15 -20
- package/lib/installer/uninstall.mjs +5 -1
- package/lib/installer/upgrade-state.mjs +2 -2
- package/lib/installer/upgrade.mjs +2 -5
- package/lib/management/operations.mjs +39 -0
- package/lib/management/status.mjs +18 -0
- package/lib/management/update.mjs +58 -0
- package/lib/management/workflow.mjs +51 -0
- package/lib/release/artifact.mjs +1 -1
- package/lib/runtime/bootstrap.mjs +1 -1
- package/lib/runtime/cli.mjs +8 -0
- package/lib/runtime/command.mjs +21 -0
- package/lib/tui/app.mjs +41 -0
- package/lib/tui/render.mjs +21 -0
- package/lib/tui/setup.mjs +20 -0
- package/lib/tui/terminal.mjs +71 -0
- package/lib/tui/workflow.mjs +12 -0
- package/package.json +1 -1
- package/scripts/postinstall.mjs +1 -3
- package/scripts/update-runtime-assets.mjs +6 -1
- package/lib/cli/choices.mjs +0 -47
- package/lib/cli/completion.mjs +0 -55
- package/lib/cli/index.mjs +0 -55
- package/lib/cli/preset.mjs +0 -29
- package/lib/cli/terminal.mjs +0 -19
- package/lib/cli/uninstall.mjs +0 -17
package/MANIFEST.sha256
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
229fc66b7d4e61998db35dc8a9228cec4e2828f117d9066473d81219a3891173 README.md
|
|
2
2
|
d41edeb8c6631dee30c67c705d4edad977aa1631627ec9de59c013f8990f4018 bin/arc-upgrade.mjs
|
|
3
3
|
484d9b2002ce542c87589bb719d644d3762706aad28a6ee010024875f8cc00e2 bin/arc.mjs
|
|
4
4
|
d8d9946fd380701c704b3e5c6cee6df7d8d126ee44c9d7ca4866f716a3792056 claude/agents/arc-implementer.md
|
|
@@ -14,17 +14,19 @@ eee9dd871028e52bce498b035e52ea93bb15e551f5985c6ca2e1855dfb47a5bb claude/skill/r
|
|
|
14
14
|
998ed10be1225aa1b059cbeccd42158a5902e54178dbf1e14fd234430fe8dea4 claude/skill/references/coordination.md
|
|
15
15
|
b2e788737de39779706453a75fa52fab1c87482613098cd7379f0b72dd2dbd2f claude/skill/references/git-recovery.md
|
|
16
16
|
3141af708711b15e0cf7827530a2a13736fbafe93a0cff623b8abcf520c29e11 claude/skill/references/handoff-prep.md
|
|
17
|
-
|
|
17
|
+
a3992e064b3fd5cffb14500ea40b3377b3630828153a57eaf5d1503bfa65b3ad claude/skill/references/handoff.md
|
|
18
18
|
4172c1c8ba397ceb561e437cc6ef02d4c2d7e7ed3df1400a4efbf4b46ddca4fa claude/skill/references/limits.md
|
|
19
|
-
|
|
19
|
+
4eb9385df76bf2e0d342cb2c45f8c160d3c4eb943a779309dcf85ad60f7aa213 claude/skill/references/planning.md
|
|
20
20
|
82b2a3a2094b09856d2238a230c159de029bd11a8a62ae7bf96c7e5960c1ca6d claude/skill/references/verification.md
|
|
21
21
|
cae43b5105a1300e87526bcc286516519863b2f8c5f70cd6fe1e0950b196a762 claude/skill/references/visual-companion.md
|
|
22
22
|
f9b4caf6a97d02f2bc4e2d72c2434a3c668db57961975a9cad57b1ed6a475db8 claude/skill/runtime/acceptance.mjs
|
|
23
23
|
30d8cdcb9d7ab6396cab09cd9f5cf6b8003f5490fb5c0ffe9f5acffbb0534978 claude/skill/runtime/adapters/claude.mjs
|
|
24
24
|
d30d118d3b42b805195ed05a3dea0ed3cf939eac811cf0228ca0b0cafeda7969 claude/skill/runtime/adapters/codex.mjs
|
|
25
25
|
a90abc679322f3b90ea4c1a9762dcd20877497991a09aec5fef68f787d63306b claude/skill/runtime/assignment.mjs
|
|
26
|
-
|
|
26
|
+
05e11b8522fedb446eec0818c985d29fda08a94b390f051f872419bccb6337ef claude/skill/runtime/bootstrap.mjs
|
|
27
27
|
c5a56ac147f13e9f946f673ac57a5dadbb4560d1f9deaa7c3b60e703f39b2d83 claude/skill/runtime/capabilities.mjs
|
|
28
|
+
028c3cdb169dc29f8713c63475a7f8463d317438a33bd7c5a4316c97d8f08795 claude/skill/runtime/cli.mjs
|
|
29
|
+
5c22404b2ee190681ffe549671e3227f624f25043f25ecc5fc3be5a918253218 claude/skill/runtime/command.mjs
|
|
28
30
|
8d32ce3957ebf1f720894cde534872206b8f812c9e5aee0f54b3c5ae125f6b38 claude/skill/runtime/cooperative-schema.mjs
|
|
29
31
|
a579f8b2703868f8c99f68e7cbc0a6237959cb0288a5e95763c1b5007cf85cf3 claude/skill/runtime/cooperative.mjs
|
|
30
32
|
9a5fe220e43825732e3089a5020d9496e88991b2096ad62209edde10b8d8c56f claude/skill/runtime/evaluate.mjs
|
|
@@ -53,17 +55,19 @@ e50106eb46439f88c3979cea861a7757c3e1fad2022795f86b34066a34148c77 codex/skill/SK
|
|
|
53
55
|
71e2ccbdd3490026de107ca115eba7501a8cb57fb148e4c22be36d9f0517ec4f codex/skill/references/git-recovery.md
|
|
54
56
|
547e789f266b58aa6477977928bfea18a35d91a9def57e4cb67f6309afa07ad9 codex/skill/references/handoff-prep.md
|
|
55
57
|
49db5d210c16d5ca575f4eb3254a0142821f148a468bb059a352210a1958a96f codex/skill/references/handoff-worktree.md
|
|
56
|
-
|
|
58
|
+
2e1b5b9d2f683ad066cf71f1445ee91f18cc7ab888e26707e0be6994ce6567d8 codex/skill/references/handoff.md
|
|
57
59
|
89ae51633112f8c7bd71ab15940085e01e57d6582fb0d977c9efdf9d77ce9fc3 codex/skill/references/limits.md
|
|
58
|
-
|
|
60
|
+
f5c25736d67effb839e0bc69fc227c833b354ee18368293bf96df8f5360ee5ca codex/skill/references/planning.md
|
|
59
61
|
ee0f4f095e03c3eb5023fe83f2167bef806d6456abbcc06bc6f86631031c0acf codex/skill/references/verification.md
|
|
60
62
|
23d928dc115b922e5418db9c89057dab2f19acb7c946420a55923d3bb5148417 codex/skill/references/visual-companion.md
|
|
61
63
|
f9b4caf6a97d02f2bc4e2d72c2434a3c668db57961975a9cad57b1ed6a475db8 codex/skill/runtime/acceptance.mjs
|
|
62
64
|
30d8cdcb9d7ab6396cab09cd9f5cf6b8003f5490fb5c0ffe9f5acffbb0534978 codex/skill/runtime/adapters/claude.mjs
|
|
63
65
|
d30d118d3b42b805195ed05a3dea0ed3cf939eac811cf0228ca0b0cafeda7969 codex/skill/runtime/adapters/codex.mjs
|
|
64
66
|
a90abc679322f3b90ea4c1a9762dcd20877497991a09aec5fef68f787d63306b codex/skill/runtime/assignment.mjs
|
|
65
|
-
|
|
67
|
+
05e11b8522fedb446eec0818c985d29fda08a94b390f051f872419bccb6337ef codex/skill/runtime/bootstrap.mjs
|
|
66
68
|
c5a56ac147f13e9f946f673ac57a5dadbb4560d1f9deaa7c3b60e703f39b2d83 codex/skill/runtime/capabilities.mjs
|
|
69
|
+
028c3cdb169dc29f8713c63475a7f8463d317438a33bd7c5a4316c97d8f08795 codex/skill/runtime/cli.mjs
|
|
70
|
+
5c22404b2ee190681ffe549671e3227f624f25043f25ecc5fc3be5a918253218 codex/skill/runtime/command.mjs
|
|
67
71
|
8d32ce3957ebf1f720894cde534872206b8f812c9e5aee0f54b3c5ae125f6b38 codex/skill/runtime/cooperative-schema.mjs
|
|
68
72
|
a579f8b2703868f8c99f68e7cbc0a6237959cb0288a5e95763c1b5007cf85cf3 codex/skill/runtime/cooperative.mjs
|
|
69
73
|
9a5fe220e43825732e3089a5020d9496e88991b2096ad62209edde10b8d8c56f codex/skill/runtime/evaluate.mjs
|
|
@@ -81,36 +85,34 @@ e2e768e62a46c8ef568fc3021ac8415c4dc68fa9843b9ffb3dbbbb2e5fa3a6af codex/skill/ru
|
|
|
81
85
|
57e93213dc97465757294cb9d0ae2f4eb2f1384b955c4ca2a39f2fa38f7a9bd7 codex/skill/scripts/apply-models.py
|
|
82
86
|
a82abc047e41f48f2b31ec58b8d7781a65c585d6d902710c4727b5c0f0b3b698 codex/skill/scripts/model_config.py
|
|
83
87
|
800964b417c573aa7b2a07a76759a4750652222de63a985bc133d50194739358 install.command
|
|
84
|
-
|
|
85
|
-
640d1bfdda880c2f17149209ce35933ee9f4318b35166df2e86ff49e271d8fc5 lib/cli/completion.mjs
|
|
86
|
-
0e0d5135fce87d00bda6a92c03ca39ad542841f80a785674d3f7ac446dbce014 lib/cli/index.mjs
|
|
87
|
-
fe34003f994ab962f60f6ec6e04e6c5f812ceb00936cef3d25365bc4c672707b lib/cli/postinstall.mjs
|
|
88
|
-
515132cf88973720bb6197a849d896face56c23f3c7fc4681ae9123ffc576318 lib/cli/preset.mjs
|
|
88
|
+
03f8bbab5f1bf37d20ebdb7f10bc9869d8399d0b1664d67390f9443f81d73992 lib/cli/postinstall.mjs
|
|
89
89
|
a575a94adc9461a7c5c051983b47d1a40a88fb8ee90fa469041cd99165cbb80f lib/cli/progress.mjs
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
85f25429f208a4b45a36e66f89933d2bbfb470d6f52f032f70971817063e45f0 lib/cli/uninstall.mjs
|
|
93
|
-
4fadbd52e4ecd0d95c7240037c84aa74714e1f9f764440e31d3ce3402c23b5b6 lib/cli/upgrade.mjs
|
|
94
|
-
85673d3186d7ad749997e341a9bc335c85f5e5df56a2ce21319acaa6012dad6a lib/cli/workflow.mjs
|
|
90
|
+
a52b6a309ad3d48a46e7b81021b9589f15ed60c388b0cbd4ff3d59f0dc898464 lib/cli/root.mjs
|
|
91
|
+
6b9dabe794bd463cadb796004bf3613d594bfff5b798d0b1e6aaad69ca7d8a28 lib/cli/upgrade.mjs
|
|
95
92
|
7719a16f6327ea3ba35206ee41c829ab967f865df9ebbd161129ca28babceb3d lib/installer/acquisition.mjs
|
|
96
93
|
66bc9a18523f70ddbb1d9a0844173d311aabd2d00d9ed5c06ca6679179ba8b06 lib/installer/global-config.mjs
|
|
97
94
|
061ff82e0c655f47b872610b6ad7bde5d1941eaf7c563491a44291c86b16a349 lib/installer/install.mjs
|
|
98
95
|
f9a0958fc424742f49ce6e2e0a49c7cf2bbe288e0cf3551d69a8a912c8f2709f lib/installer/language.mjs
|
|
99
96
|
64713575291e51971abc542df716baa99e9a530a489e92b2f8345b782e0ce4cd lib/installer/limits.mjs
|
|
100
|
-
|
|
97
|
+
062d0ef7346fc8d9f886011b45373faac94b90f92b987afef9e303768fce8092 lib/installer/manifest.mjs
|
|
101
98
|
1e6667f21dfa6eb427d7447df98038bbe534345ebb57d6b401f51efe1077f1ed lib/installer/package-references.mjs
|
|
102
99
|
6bb84ba262f850a6563eb360553896ad8d7992d3c7284fd3bd8bcdb0398ea557 lib/installer/plan.mjs
|
|
103
100
|
5a7860583cadb57295bdac8296a6c8caa4cedf0d1823e7d08c57846ed8342ba5 lib/installer/preset.mjs
|
|
101
|
+
ce12783a6389253c6e4afc1e44d56b945028e18ae6bf4d48ac368cb221c55231 lib/installer/runtime-assets.mjs
|
|
104
102
|
4892d61cfe498a85f47f4a8044a831c853660365c98543eb14f4f4449b727c2f lib/installer/runtime-config.mjs
|
|
105
|
-
|
|
103
|
+
bfc6c13638955fbd44b6002de3a5a2de911c50ad630a44ec1bcf0e987dfd825b lib/installer/shell-completion.mjs
|
|
106
104
|
c2ab7eda987cf62bba4dce1b7eb302f350a6c67679b0aaf063b3eea11eb010c5 lib/installer/stage-cleanup.mjs
|
|
107
105
|
9ddaba872ecb050698fdbd79d32a9329d61a748ed3ada62ed16ba312e4217827 lib/installer/superpowers.mjs
|
|
108
106
|
adc7696add7e9d1e61b1d4292aad078de8d7fb1156eecd512b9cc2852502cca6 lib/installer/targets.mjs
|
|
109
107
|
65ba12b4786b8b8c2cd65731a96475a64d1888644e8c68825bc369d74c266ab8 lib/installer/transaction.mjs
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
108
|
+
4ebb59a9c5a322a2dbb4d233bf01a1affa4d9991981a0f1cfd446224c535ee79 lib/installer/uninstall.mjs
|
|
109
|
+
053a5046aa5cf5a03fc316fcc76ceee7787e04ef9b367cdc690852a1336ef033 lib/installer/upgrade-state.mjs
|
|
110
|
+
98994d6a1f61551db803bc753d89c263565bdc6004a4204a4a2e38f353240239 lib/installer/upgrade.mjs
|
|
113
111
|
2946f055d61fbe2ffd6af1c182096e01d8c1a4bfb0aa274547ce5e147dccfd19 lib/limits.mjs
|
|
112
|
+
0890de2e40d71ca3bba68603a597afdb6fc1e54cb1e1588f57d289af62b87982 lib/management/operations.mjs
|
|
113
|
+
fbf9ddbc30f6cfc48df3ddae7c59e8e6569f4fbe88a39c2f1a446ff72f1c7053 lib/management/status.mjs
|
|
114
|
+
e76bf01f13edae25e1434cb5959634e6dd8693a9fd91b686f4a921f1bc6e515b lib/management/update.mjs
|
|
115
|
+
7ecda29faac49d98739319e3282db2f415b88474f78e85b67d1d52dd4f16167a lib/management/workflow.mjs
|
|
114
116
|
d2fb26c57191f4b5d3b67d0e1ea801f26952bd929224d2464a4c6522442f9de5 lib/models/config.mjs
|
|
115
117
|
a7afd79d4620abcf85f4954aab4599870d8e47b897490d1c5c774f256c5e8800 lib/models/index.mjs
|
|
116
118
|
7c93d509f92acca6238f6241d125c74089fa89ded028090d1c79bca66f1d67cf lib/models/profiles.mjs
|
|
@@ -121,13 +123,15 @@ ee81dee01b1623d95dda9b1d195ce2008811dfb54af3da8324a9e538238ac84e lib/npm/proces
|
|
|
121
123
|
79f5824a3b1b44ab0cd0e95243ed418c3fa15881927bb4d1789047b480747939 lib/policy/placement.mjs
|
|
122
124
|
2fd672429cf7d4032dd3755b92de9b73ac468b12128654fd19d2eec48b5d4a2c lib/policy/render.mjs
|
|
123
125
|
fad54e3dd1d30db2ce5b3c90c8750e28500c0d4be7a12a458088ec4dccf7c42e lib/policy/role-policy.json
|
|
124
|
-
|
|
126
|
+
ac293dd90abe1cc73c708a6aa070cdabc142b2ff152d367b6aeb21f5a678aeeb lib/release/artifact.mjs
|
|
125
127
|
f9b4caf6a97d02f2bc4e2d72c2434a3c668db57961975a9cad57b1ed6a475db8 lib/runtime/acceptance.mjs
|
|
126
128
|
30d8cdcb9d7ab6396cab09cd9f5cf6b8003f5490fb5c0ffe9f5acffbb0534978 lib/runtime/adapters/claude.mjs
|
|
127
129
|
d30d118d3b42b805195ed05a3dea0ed3cf939eac811cf0228ca0b0cafeda7969 lib/runtime/adapters/codex.mjs
|
|
128
130
|
a90abc679322f3b90ea4c1a9762dcd20877497991a09aec5fef68f787d63306b lib/runtime/assignment.mjs
|
|
129
|
-
|
|
131
|
+
05e11b8522fedb446eec0818c985d29fda08a94b390f051f872419bccb6337ef lib/runtime/bootstrap.mjs
|
|
130
132
|
c5a56ac147f13e9f946f673ac57a5dadbb4560d1f9deaa7c3b60e703f39b2d83 lib/runtime/capabilities.mjs
|
|
133
|
+
028c3cdb169dc29f8713c63475a7f8463d317438a33bd7c5a4316c97d8f08795 lib/runtime/cli.mjs
|
|
134
|
+
5c22404b2ee190681ffe549671e3227f624f25043f25ecc5fc3be5a918253218 lib/runtime/command.mjs
|
|
131
135
|
8d32ce3957ebf1f720894cde534872206b8f812c9e5aee0f54b3c5ae125f6b38 lib/runtime/cooperative-schema.mjs
|
|
132
136
|
a579f8b2703868f8c99f68e7cbc0a6237959cb0288a5e95763c1b5007cf85cf3 lib/runtime/cooperative.mjs
|
|
133
137
|
9a5fe220e43825732e3089a5020d9496e88991b2096ad62209edde10b8d8c56f lib/runtime/evaluate.mjs
|
|
@@ -143,9 +147,14 @@ e2e768e62a46c8ef568fc3021ac8415c4dc68fa9843b9ffb3dbbbb2e5fa3a6af lib/runtime/sc
|
|
|
143
147
|
4eb2401060533b54fa5f0335d7f4e142866892c0981aa7fa79514c209224a981 lib/runtime/verification.mjs
|
|
144
148
|
7e75d9bb51eac4bd1a6fccf45fb195c526bb3bc43cf0b04398b85ff7723f8689 lib/safe-fs/index.mjs
|
|
145
149
|
4174dfcfcd4d69a5486b91108ec03279cfd50644109c7457aa87f9ac877fb1ac lib/safe-fs/native.mjs
|
|
150
|
+
9192c38245afc9d4dbd7aaaf7f6f09a19867928441fd82c1dbd9974b5e3962e2 lib/tui/app.mjs
|
|
151
|
+
da5c8c79882554f08577d0faeb7e9bcf33f7505dd86d5b1ef8f09fbfdb6e934a lib/tui/render.mjs
|
|
152
|
+
7b0b7e372f1f9476676e58ea449261a67b773075d2d4763006377b99011e2054 lib/tui/setup.mjs
|
|
153
|
+
2610848e406cd27e985dc89a0a2c8028eab83f99532c86590fba77c09494eacd lib/tui/terminal.mjs
|
|
154
|
+
98c283d2ca91eed924c7c893e22c8f0e3bec5b72392b8ad15c18647dd7fef481 lib/tui/workflow.mjs
|
|
146
155
|
ff9c33c8b3c2bd466d54ffbe4c7139ccd87c79c7de34a6c4cde92e9f6e9b42d2 native/binding.c
|
|
147
156
|
205bedc1dee1a9ffa58124c6e21256a1f0cbe24f06f7c8d7cb0b99524cfab9d0 native/binding.gyp
|
|
148
|
-
|
|
157
|
+
7138a23c2399f06e3f836dce1739ea735eedf7cd99a3c1d2c356e7de5a2698ad package.json
|
|
149
158
|
208c65cfde244d39ce45c3cf1b0acb128f04d21199b6b3fb5466e62db5b64af9 prebuilds/darwin-arm64/arc_safe_fs.node
|
|
150
159
|
572887ac794d10a8b921d8168ea2328e31f05b45987611ff02c83114dba901af prebuilds/darwin-x64/arc_safe_fs.node
|
|
151
160
|
2bb9443021f9d873712b26321de733eddd6794c45f0bc79e2d5dc98669196635 prebuilds/index.json
|
|
@@ -154,11 +163,11 @@ b98bb4ac757ebd6e8f8fc1eb7a6a4389e3a8199984baf6bb1c327a6f952c2c0d prebuilds/linu
|
|
|
154
163
|
0750a576f8042248a35b55559ccc52ef787a7706de7901169ec929622f256643 scripts/build-native.mjs
|
|
155
164
|
aa394307b1bba68ea7146f76bec479a21f2cbeff9ea18d0786516c677a2d9fbb scripts/check-installer-parity.mjs
|
|
156
165
|
de88500b49726973d1de71c0bbdf9c993e28720a5b3f28751992c023b617e04c scripts/pack-release.mjs
|
|
157
|
-
|
|
166
|
+
0807cadae406606fd6bf047b6607339b9f0dc763cae40da8ad692b7acdfcf0bd scripts/postinstall.mjs
|
|
158
167
|
52aa4334c02e1877822304e66959b12f98a1649a547d51b9271623221ef3573a scripts/probe-runtime-hooks.mjs
|
|
159
168
|
9c6bce1c1ab29ba75b70742e4d67c1eb0d0a0cab31e06b8abd28b057253f32d0 scripts/update-manifest.mjs
|
|
160
169
|
e99ca8fd7dbde12840097e3d68bef06037f04284474fc5006976da40758cf6bb scripts/update-role-policy.mjs
|
|
161
|
-
|
|
170
|
+
25904c2ebed180355a7570b10254cda6d0d5b20b8b74ff116c40957aefc47690 scripts/update-runtime-assets.mjs
|
|
162
171
|
f7c5d8288905ed7a6f0e99e3668a34ed43a3c1a7a3157bc883f22ec94fe22e98 scripts/update-superpowers.mjs
|
|
163
172
|
40f41cc52354e02d9743c7b8d270c187856aac02cd9d7996d19b1f1089355d88 scripts/vendor-toml.mjs
|
|
164
173
|
a8884682a56e563b64931a2e0b025ec50a18bc758b0de7f5a92b7890ac36c4a5 scripts/verify-release.mjs
|
package/README.md
CHANGED
|
@@ -19,52 +19,40 @@ ARC brings clear roles, scoped handoffs, and verification to work in Codex and C
|
|
|
19
19
|
|
|
20
20
|
**Requirements:** Node.js 22+, npm, Git, and network access. Supported platforms are macOS 13+ and Linux with glibc 2.28+ (arm64 or x64). Windows and musl Linux are not supported. Python, a compiler, and `node-gyp` are not required.
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
전역 CLI를 설치한 뒤 터미널에서 ARC 관리 화면을 엽니다.
|
|
23
23
|
|
|
24
24
|
```sh
|
|
25
|
-
|
|
25
|
+
npm i -g @yunhozz/arc
|
|
26
|
+
arc
|
|
26
27
|
```
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
npm 설치는 CLI와 안내만 제공합니다. Harness 설치는 `arc`의 영어 TUI에서 진행합니다. 전역 설치 없이 `npx --yes @yunhozz/arc`로 같은 관리 화면을 열 수도 있습니다.
|
|
30
|
+
|
|
31
|
+
## ⚙️ 공개 명령
|
|
29
32
|
|
|
30
33
|
```sh
|
|
31
|
-
|
|
34
|
+
arc
|
|
35
|
+
arc --help
|
|
36
|
+
arc --version
|
|
32
37
|
```
|
|
33
38
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
| Option | Purpose |
|
|
37
|
-
|---|---|
|
|
38
|
-
| `--target <claude\|codex\|all>` | Choose where to install |
|
|
39
|
-
| `--preset <economy\|balanced\|smart>` | Choose specialist model settings |
|
|
40
|
-
| `--language <en\|ko>` | Set the default output language |
|
|
41
|
-
| `--max-total-subagents <count>` | Set the session-wide agent limit (default: 100) |
|
|
42
|
-
| `--max-concurrent-subagents <count>` | Set the simultaneous agent limit (default: 5) |
|
|
43
|
-
| `--check` | Validate without writing changes |
|
|
44
|
-
| `--dry-run` | Preview changes without applying them |
|
|
45
|
-
| `--skip-global` | Skip global instructions, native settings, and shell configuration |
|
|
39
|
+
`arc`는 입력과 출력이 모두 TTY인 터미널에서 실행해야 합니다. 파이프·CI·비TTY에서는 종료 코드 2로 끝납니다. `--help`와 `--version`은 터미널 없이 사용할 수 있습니다. 그 밖의 명령과 옵션은 지원하지 않습니다.
|
|
46
40
|
|
|
47
|
-
##
|
|
41
|
+
## Manage ARC
|
|
48
42
|
|
|
49
|
-
Change
|
|
43
|
+
TUI의 `Install / Reconfigure`, `Change Preset`, `Workflow`, `Update Harness`, `Uninstall Harness` 메뉴를 사용합니다. 설치 대상(Codex·Claude·둘 다), 모델 preset, agent 수 제한, harness 언어, 전역 설정 적용 여부를 선택하고 변경 내용을 검토한 뒤 `Apply`로 실행합니다. 검토 중 `Cancel`은 변경 없이 돌아가며 `Edit`는 선택을 수정합니다. 검증·상태 조회는 파일 변경이나 다운로드를 실행하지 않습니다.
|
|
50
44
|
|
|
51
|
-
|
|
52
|
-
npx --yes @yunhozz/arc preset smart --target codex
|
|
53
|
-
npx --yes @yunhozz/arc uninstall --target codex
|
|
54
|
-
```
|
|
45
|
+
TUI 표시 언어는 영어입니다. 선택한 harness 언어(`en` 또는 `ko`)는 설치 후 agent 응답에 적용되며 화면 언어와 별개입니다. 변경한 설정은 새 agent 세션에서 적용됩니다.
|
|
55
46
|
|
|
56
|
-
|
|
47
|
+
`Workflow`는 작업 디렉터리와 workflow를 선택해 상태 확인·검토·실행을 지원합니다. Codex와 Claude의 자동 workflow 연동은 설치된 내부 runtime endpoint를 계속 사용합니다. 화면에서 확인했다고 agent 승인 증거가 생기지는 않습니다.
|
|
57
48
|
|
|
58
|
-
|
|
49
|
+
`Update Harness`는 설치 설정을 보존합니다. 전역 CLI 교체를 시작하면 현재 관리 세션이 종료되므로 이후에는 `arc`를 다시 실행합니다. CLI 교체나 harness 갱신이 실패하면 표시된 대상별 결과와 복구 경로를 확인하고 `arc`를 다시 열어 `Update Harness`를 선택합니다. CLI가 실행되지 않으면 `npx --yes @yunhozz/arc@latest`로 화면을 열어 복구합니다. npx의 업데이트는 전역 CLI를 교체하지 않습니다.
|
|
59
50
|
|
|
60
|
-
|
|
61
|
-
npm i -g @yunhozz/arc
|
|
62
|
-
arc
|
|
63
|
-
```
|
|
51
|
+
`Uninstall Harness`는 선택한 harness와 관리 profile을 제거하며 CLI는 유지합니다. 전역 ARC 지침을 보존할 수 있고 사용자 파일·다른 skill·workflow 기록은 유지합니다. `npm uninstall -g @yunhozz/arc`는 CLI만 제거하며 설치된 harness를 남깁니다.
|
|
64
52
|
|
|
65
|
-
|
|
53
|
+
기존 ARC 관리 shell completion 블록은 harness 설치·업데이트·제거 시 정상 marker가 확인되는 경우에만 정리합니다. 상태 조회는 shell 파일을 바꾸지 않습니다. 사용자가 직접 작성한 shell 설정은 직접 확인해 정리해야 합니다.
|
|
66
54
|
|
|
67
|
-
##
|
|
55
|
+
## Models and language
|
|
68
56
|
|
|
69
57
|
The Orchestrator uses the current conversation's model. The five specialist roles use the selected preset from their platform model file: [Codex](codex/skill/models.toml) · [Claude Code](claude/skill/models.toml). The configured language applies across ARC; an explicit user language request takes precedence.
|
|
70
58
|
|
|
@@ -177,9 +177,19 @@ Generated from lib/policy/role-policy.json; do not edit this managed section man
|
|
|
177
177
|
## Initial Implementer assignment through the cooperative CLI
|
|
178
178
|
|
|
179
179
|
In approved plan mode, Orchestrator performs the following sequence. All mutation commands pass JSON through stdin with
|
|
180
|
-
`
|
|
180
|
+
`node "$ARC_RUNTIME_ENTRY" <command> --cwd "$ARC_CHECKOUT" --workflow "$ARC_WORKFLOW_ID" --input -`.
|
|
181
|
+
Resolve `ARC_RUNTIME_ENTRY` from the actual ARC skill directory selected by the installation resolver:
|
|
182
|
+
`<target-home>/skills/arc/runtime/cli.mjs`. Use the loaded skill's location, including a custom target home;
|
|
183
|
+
do not guess the default home or use a package, checkout or cache entry. Pass the resolved path, checkout and
|
|
184
|
+
workflow ID as separate argv values when using a process API. In a shell, assign values safely and double-quote
|
|
185
|
+
these variables; never interpolate paths into executable shell text or use `eval`.
|
|
181
186
|
Query `status` without `--input`.
|
|
182
187
|
|
|
188
|
+
The entry preserves the cooperative state path in the selected checkout's Git common directory. Installing or
|
|
189
|
+
updating the entry does not migrate state or renew approvals. Runtime/hash, target, actor and revision checks still
|
|
190
|
+
apply: runtime drift holds existing evidence; obtain the required current evidence and approval through the
|
|
191
|
+
existing recovery procedure. A new workflow cannot retroactively validate earlier execution.
|
|
192
|
+
|
|
183
193
|
1. Prepare the docs-only commit of the approved spec and plan, and verify the exact document set, objects and current files.
|
|
184
194
|
Perform `init`, approval `record` and `prepare` only after this commit verification, even when user approval preceded the document commit.
|
|
185
195
|
2. After document commit verification, pass `mode: "plan"`, `actor: {id: "operator"}` and `selection: {messageRef, contentHash}` to `init` at the final target HEAD.
|
|
@@ -287,7 +287,12 @@ Generated from lib/policy/role-policy.json; do not edit this managed section man
|
|
|
287
287
|
|
|
288
288
|
## Approved cooperative execution path within the repository
|
|
289
289
|
|
|
290
|
-
The
|
|
290
|
+
The approved installed workflow entry connects document commits to the initial Implementer assignment in plan mode.
|
|
291
|
+
Resolve `<target-home>/skills/arc/runtime/cli.mjs` from the actual loaded ARC skill location selected by the installation
|
|
292
|
+
resolver, including custom homes. Invoke `node` with that path and command options as separate arguments; for shell
|
|
293
|
+
calls use `node "$ARC_RUNTIME_ENTRY" <command> --cwd "$ARC_CHECKOUT" --workflow "$ARC_WORKFLOW_ID" --input -`
|
|
294
|
+
with safely assigned, quoted values. See [handoff](handoff.md) for invocation and continuity requirements.
|
|
295
|
+
An entry update does not migrate existing state or renew approvals; runtime/target drift still requires current evidence.
|
|
291
296
|
Its scope is decisions and records within the repository's cooperative path. It adds no authority to install native hooks/providers/installers or block direct tool calls.
|
|
292
297
|
`no-plan`/omission is unsupported by this CLI, and this boundary remains in Phases 2 and 3. This does not imply an omission policy violation or a new obligation to write documents.
|
|
293
298
|
|
|
@@ -5,7 +5,7 @@ import {validateCooperativeCommand,validateCooperativeState} from './cooperative
|
|
|
5
5
|
import {observeCooperativeTarget,validateObservedTarget,validateWorkflowId,workflowStatePath,inspectPath} from './scope.mjs';
|
|
6
6
|
import {saveDurableState} from './store.mjs';
|
|
7
7
|
export const COOPERATIVE_RUNTIME_MODULES=Object.freeze([
|
|
8
|
-
'bootstrap.mjs','cooperative-schema.mjs','cooperative.mjs','evaluate.mjs',
|
|
8
|
+
'cli.mjs','command.mjs','bootstrap.mjs','cooperative-schema.mjs','cooperative.mjs','evaluate.mjs',
|
|
9
9
|
'scope.mjs','store.mjs','git-evidence.mjs','assignment.mjs','verification.mjs','acceptance.mjs','external.mjs'
|
|
10
10
|
]);
|
|
11
11
|
export const cooperativeCoverage=()=>({enforcement:'cooperative',provenance:'operator-attested',nativeVerified:false});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import {fileURLToPath} from 'node:url';
|
|
3
|
+
import {runWorkflowCommand} from './command.mjs';
|
|
4
|
+
export {runWorkflowCommand};
|
|
5
|
+
// Importing the installed entry is safe for callers that own their own IO.
|
|
6
|
+
if(process.argv[1]&&fs.realpathSync(process.argv[1])===fileURLToPath(import.meta.url)){
|
|
7
|
+
process.exitCode=await runWorkflowCommand(process.argv.slice(2));
|
|
8
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import {initializeCooperativeWorkflow,commandResult} from '
|
|
4
|
-
import {runCooperativeCommand} from '
|
|
5
|
-
import {validateWorkflowId} from '
|
|
6
|
-
export async function
|
|
3
|
+
import {initializeCooperativeWorkflow,commandResult} from './bootstrap.mjs';
|
|
4
|
+
import {runCooperativeCommand} from './cooperative.mjs';
|
|
5
|
+
import {validateWorkflowId} from './scope.mjs';
|
|
6
|
+
export async function runWorkflowCommand(args,io={}){
|
|
7
7
|
const output=io.output??process.stdout;let workflowId=null;
|
|
8
8
|
try{
|
|
9
9
|
const [command,...rest]=args,options={};
|
|
@@ -244,9 +244,19 @@ Generated from lib/policy/role-policy.json; do not edit this managed section man
|
|
|
244
244
|
## Initial Implementer assignment through the cooperative CLI
|
|
245
245
|
|
|
246
246
|
In approved plan mode, Orchestrator performs the following sequence. All mutation commands pass JSON through stdin with
|
|
247
|
-
`
|
|
247
|
+
`node "$ARC_RUNTIME_ENTRY" <command> --cwd "$ARC_CHECKOUT" --workflow "$ARC_WORKFLOW_ID" --input -`.
|
|
248
|
+
Resolve `ARC_RUNTIME_ENTRY` from the actual ARC skill directory selected by the installation resolver:
|
|
249
|
+
`<target-home>/skills/arc/runtime/cli.mjs`. Use the loaded skill's location, including a custom target home;
|
|
250
|
+
do not guess the default home or use a package, checkout or cache entry. Pass the resolved path, checkout and
|
|
251
|
+
workflow ID as separate argv values when using a process API. In a shell, assign values safely and double-quote
|
|
252
|
+
these variables; never interpolate paths into executable shell text or use `eval`.
|
|
248
253
|
Query `status` without `--input`.
|
|
249
254
|
|
|
255
|
+
The entry preserves the cooperative state path in the selected checkout's Git common directory. Installing or
|
|
256
|
+
updating the entry does not migrate state or renew approvals. Runtime/hash, target, actor and revision checks still
|
|
257
|
+
apply: runtime drift holds existing evidence; obtain the required current evidence and approval through the
|
|
258
|
+
existing recovery procedure. A new workflow cannot retroactively validate earlier execution.
|
|
259
|
+
|
|
250
260
|
1. Prepare the docs-only commit of the approved spec and plan, and verify the exact document set, objects and current files.
|
|
251
261
|
Perform `init`, approval `record` and `prepare` only after this commit verification, even when user approval preceded the document commit.
|
|
252
262
|
2. After document commit verification, pass `mode: "plan"`, `actor: {id: "operator"}` and `selection: {messageRef, contentHash}` to `init` at the final target HEAD.
|
|
@@ -319,7 +319,12 @@ Generated from lib/policy/role-policy.json; do not edit this managed section man
|
|
|
319
319
|
|
|
320
320
|
## Approved cooperative execution path within the repository
|
|
321
321
|
|
|
322
|
-
The
|
|
322
|
+
The approved installed workflow entry connects document commits to the initial Implementer assignment in plan mode.
|
|
323
|
+
Resolve `<target-home>/skills/arc/runtime/cli.mjs` from the actual loaded ARC skill location selected by the installation
|
|
324
|
+
resolver, including custom homes. Invoke `node` with that path and command options as separate arguments; for shell
|
|
325
|
+
calls use `node "$ARC_RUNTIME_ENTRY" <command> --cwd "$ARC_CHECKOUT" --workflow "$ARC_WORKFLOW_ID" --input -`
|
|
326
|
+
with safely assigned, quoted values. See [handoff](handoff.md) for invocation and continuity requirements.
|
|
327
|
+
An entry update does not migrate existing state or renew approvals; runtime/target drift still requires current evidence.
|
|
323
328
|
Its scope is decisions and records within the repository's cooperative path. It adds no authority to install native hooks/providers/installers or block direct tool calls.
|
|
324
329
|
`no-plan`/omission is unsupported by this CLI, and this boundary remains in Phases 2 and 3. This does not imply an omission policy violation or a new obligation to write documents.
|
|
325
330
|
|
|
@@ -5,7 +5,7 @@ import {validateCooperativeCommand,validateCooperativeState} from './cooperative
|
|
|
5
5
|
import {observeCooperativeTarget,validateObservedTarget,validateWorkflowId,workflowStatePath,inspectPath} from './scope.mjs';
|
|
6
6
|
import {saveDurableState} from './store.mjs';
|
|
7
7
|
export const COOPERATIVE_RUNTIME_MODULES=Object.freeze([
|
|
8
|
-
'bootstrap.mjs','cooperative-schema.mjs','cooperative.mjs','evaluate.mjs',
|
|
8
|
+
'cli.mjs','command.mjs','bootstrap.mjs','cooperative-schema.mjs','cooperative.mjs','evaluate.mjs',
|
|
9
9
|
'scope.mjs','store.mjs','git-evidence.mjs','assignment.mjs','verification.mjs','acceptance.mjs','external.mjs'
|
|
10
10
|
]);
|
|
11
11
|
export const cooperativeCoverage=()=>({enforcement:'cooperative',provenance:'operator-attested',nativeVerified:false});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import {fileURLToPath} from 'node:url';
|
|
3
|
+
import {runWorkflowCommand} from './command.mjs';
|
|
4
|
+
export {runWorkflowCommand};
|
|
5
|
+
// Importing the installed entry is safe for callers that own their own IO.
|
|
6
|
+
if(process.argv[1]&&fs.realpathSync(process.argv[1])===fileURLToPath(import.meta.url)){
|
|
7
|
+
process.exitCode=await runWorkflowCommand(process.argv.slice(2));
|
|
8
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import {initializeCooperativeWorkflow,commandResult} from './bootstrap.mjs';
|
|
4
|
+
import {runCooperativeCommand} from './cooperative.mjs';
|
|
5
|
+
import {validateWorkflowId} from './scope.mjs';
|
|
6
|
+
export async function runWorkflowCommand(args,io={}){
|
|
7
|
+
const output=io.output??process.stdout;let workflowId=null;
|
|
8
|
+
try{
|
|
9
|
+
const [command,...rest]=args,options={};
|
|
10
|
+
if(!['init','record','status','reconcile','prepare','result'].includes(command))throw Error('Expected workflow command');
|
|
11
|
+
for(let i=0;i<rest.length;i+=2){const key=rest[i];if(!['--cwd','--workflow','--input'].includes(key)||options[key]!==undefined||typeof rest[i+1]!=='string')throw Error('Invalid workflow option');options[key]=rest[i+1];}
|
|
12
|
+
const cwd=options['--cwd'];workflowId=options['--workflow'];validateWorkflowId(workflowId);
|
|
13
|
+
if(typeof cwd!=='string'||!path.isAbsolute(cwd)||path.normalize(cwd)!==cwd)throw Error('Absolute workspace required');
|
|
14
|
+
if(command==='status'?options['--input']!==undefined:options['--input']!=='-')throw Error('Mutations require --input -; status takes no input');
|
|
15
|
+
// Check/review, commit and external intents are recorded for the operator.
|
|
16
|
+
// Actual Git mutations remain Orchestrator actions; reconciliation observes their results.
|
|
17
|
+
const input=command==='status'?undefined:JSON.parse(io.input??fs.readFileSync(0,'utf8'));
|
|
18
|
+
const result=await(command==='init'?initializeCooperativeWorkflow({cwd,workflowId,input}):runCooperativeCommand({cwd,workflowId,command,input}));
|
|
19
|
+
output.write(JSON.stringify(result)+'\n');return result.decision==='deny'?2:result.decision==='hold'?3:0;
|
|
20
|
+
}catch(error){output.write(JSON.stringify(commandResult({workflowId,decision:'hold',ruleId:'cooperative.error',error:error.message}))+'\n');return 1;}
|
|
21
|
+
}
|
package/lib/cli/postinstall.mjs
CHANGED
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {runCli} from './index.mjs';
|
|
5
|
-
export async function runPostinstall({packageRoot,env=process.env,cwd=process.cwd(),input=process.stdin,output=process.stdout,error=process.stderr,deps={}}){
|
|
6
|
-
let terminal;
|
|
7
|
-
try{
|
|
8
|
-
if(env.npm_lifecycle_event!=='postinstall'){output.write('Run arc to install the ARC harness.\n');return 0;}
|
|
9
|
-
const context=await(deps.inspectNpmContext??inspectNpmContext)({packageRoot,entryPath:path.join(packageRoot,'scripts/postinstall.mjs'),env,cwd});
|
|
10
|
-
if(context.kind!=='global'){output.write('Run arc to install the ARC harness.\n');return 0;}
|
|
11
|
-
terminal=(deps.openInstallerTerminal??openInstallerTerminal)({env,input,output,error});
|
|
12
|
-
if(terminal.kind==='skip'){output.write('Run arc to install the ARC harness.\n');return 0;}
|
|
13
|
-
const invocationCwd=resolveInvocationCwd({env,cwd,lifecycle:true});
|
|
14
|
-
return await(deps.runCli??runCli)([],{...terminal.io,cwd:invocationCwd,env});
|
|
15
|
-
}catch(cause){(terminal?.io.error??error).write(`Error: ${cause.message}\n`);return 1;}
|
|
16
|
-
finally{terminal?.dispose?.();}
|
|
1
|
+
export async function runPostinstall({output=process.stdout}={}){
|
|
2
|
+
output.write('Run arc to install or manage the ARC harness.\n');
|
|
3
|
+
return 0;
|
|
17
4
|
}
|
package/lib/cli/root.mjs
CHANGED
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
|
-
|
|
3
|
-
const usage='Usage: arc [installation options]\n arc preset [economy|balanced|smart] --target <codex|claude|all>\n arc uninstall --target <codex|claude|all>\n arc upgrade [--help]\n arc completion <zsh|bash> (shell setup)\n arc --help | --version';
|
|
4
|
-
const completionUsage='Usage: arc completion <zsh|bash>';
|
|
2
|
+
const usage='Usage: arc\n arc --help\n arc --version';
|
|
5
3
|
export async function runRoot(args=process.argv.slice(2),io={}){
|
|
6
|
-
const output=io.output??process.stdout,error=io.error??process.stderr;
|
|
7
|
-
|
|
8
|
-
if(
|
|
9
|
-
if(
|
|
10
|
-
if(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
if(command==='install'){error.write('Error: The install subcommand was removed. Run npx --yes @yunhozz/arc [installation options].\n');return 2;}
|
|
14
|
-
if(command===undefined||command.startsWith('--'))return(await import('./index.mjs')).runCli(args,io);
|
|
15
|
-
if(command==='uninstall')return(await import('./uninstall.mjs')).runCli(rest,io);
|
|
16
|
-
if(command==='completion'){
|
|
17
|
-
if(rest.length===1&&rest[0]==='--help'){output.write(completionUsage+'\n');return 0;}
|
|
18
|
-
if(rest.length===1&&['zsh','bash'].includes(rest[0])){output.write(renderCompletion(rest[0]));return 0;}
|
|
19
|
-
error.write('Error: Expected a completion shell (zsh or bash).\n'+completionUsage+'\n');return 2;
|
|
20
|
-
}
|
|
21
|
-
error.write(`Error: Unknown command: ${command}\n${usage}\n`);return 2;
|
|
4
|
+
const input=io.input??process.stdin,output=io.output??process.stdout,error=io.error??process.stderr;
|
|
5
|
+
if(args.length===1&&args[0]==='--help'){output.write(usage+'\n\nOpen ARC Management in an interactive terminal to install or manage the harness.\n');return 0;}
|
|
6
|
+
if(args.length===1&&args[0]==='--version'){output.write(JSON.parse(fs.readFileSync(new URL('../../package.json',import.meta.url))).version+'\n');return 0;}
|
|
7
|
+
if(args.length){error.write('Error: Unsupported arguments. Open arc to manage the harness.\n'+usage+'\n');return 2;}
|
|
8
|
+
if(!input.isTTY||!output.isTTY){error.write('Error: arc requires an interactive terminal. Run arc directly in a terminal.\n');return 2;}
|
|
9
|
+
const {runTui}=await import('../tui/app.mjs');
|
|
10
|
+
return runTui({...io,input,output,contextOptions:{...io.contextOptions,...(io.cwd?{cwd:io.cwd}:{}),...(io.env?{env:io.env}:{})}});
|
|
22
11
|
}
|
package/lib/cli/upgrade.mjs
CHANGED
|
@@ -1,57 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import os from 'node:os';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
import {fileURLToPath} from 'node:url';
|
|
5
|
-
const packageRoot=path.resolve(fileURLToPath(new URL('../../',import.meta.url)));
|
|
6
|
-
const usage='Usage: arc upgrade [--help]';
|
|
7
|
-
const inputError=message=>Object.assign(Error(message),{code:'ARC_CLI_INPUT'});
|
|
8
|
-
const configurationError=message=>Object.assign(Error(message),{code:'ARC_TARGET_CONFIGURATION'});
|
|
9
|
-
function identity(root){const pkg=JSON.parse(fs.readFileSync(path.join(root,'package.json'),'utf8'));if(pkg.name!=='@yunhozz/arc'||!/^\d+\.\d+\.\d+$/.test(pkg.version))throw configurationError('Invalid ARC package identity');return pkg;}
|
|
10
|
-
async function runtime(deps){
|
|
11
|
-
const [context,state,upgrade,npm]=await Promise.all([import('../npm/context.mjs'),import('../installer/upgrade-state.mjs'),import('../installer/upgrade.mjs'),import('../npm/upgrade.mjs')]);
|
|
12
|
-
let safeFs=deps.safeFs;if(!safeFs){const[{loadNative},{openRoot}]=await Promise.all([import('../safe-fs/native.mjs'),import('../safe-fs/index.mjs')]);const native=loadNative();safeFs={openRoot:root=>openRoot(root,{native})};}
|
|
13
|
-
return{...context,...state,...upgrade,...npm,...deps,safeFs};
|
|
14
|
-
}
|
|
15
|
-
function report(result,output,error){
|
|
16
|
-
for(const item of result.results){output.write(item.platform+': '+item.status+'; rollback: '+item.rollback+'\n');for(const filename of item.residualPaths??[])output.write('Residual path: '+filename+'\n');if(item.error)error.write('Error: '+item.error.message+'\n');}
|
|
17
|
-
if(result.interrupted)return 130;
|
|
18
|
-
if(result.results.every(item=>item.status==='installed'&&!item.error)){output.write('ARC version '+result.version+' harness upgraded! Previous harness version: not recorded.\nOpen a new shell session to use updated completion.\nzsh completion: eval "$(arc completion zsh)" for this session\n');return 0;}
|
|
19
|
-
error.write('Harness update did not complete. Retry arc upgrade or npx --yes @yunhozz/arc@latest upgrade.\n');return 1;
|
|
20
|
-
}
|
|
21
|
-
function failure(cause,error){error.write('Error: '+cause.message+'\n');return ['ARC_CANCELLED','ARC_NPM_CANCELLED'].includes(cause.code)?130:['ARC_CLI_INPUT','ARC_TARGET_CONFIGURATION','ARC_UNSUPPORTED_RUNTIME','ARC_NATIVE_UNAVAILABLE'].includes(cause.code)?2:1;}
|
|
22
|
-
export async function runCli(args=process.argv.slice(2),io={},deps={}){
|
|
23
|
-
const output=io.output??process.stdout,error=io.error??process.stderr;let controller,onInterrupt,packageStarted=false;
|
|
24
|
-
try{
|
|
25
|
-
if(args.length===1&&args[0]==='--help'){output.write(usage+'\nUpdates the global CLI and installed harness; npm exec updates the harness only.\n');return 0;}
|
|
26
|
-
if(args.length)throw inputError('Expected no arguments or --help');
|
|
27
|
-
const root=deps.packageRoot??packageRoot,pkg=identity(root),env=io.env??process.env,cwd=fs.realpathSync(io.cwd??process.cwd()),api=await runtime(deps);
|
|
28
|
-
const context=await api.inspectNpmContext({packageRoot:root,entryPath:path.join(root,'bin/arc.mjs'),env,cwd});
|
|
29
|
-
if(!['global','npx'].includes(context.kind))throw configurationError('Run upgrade from a verified global ARC installation or npx --yes @yunhozz/arc@latest upgrade');
|
|
30
|
-
const state=api.collectInstalledState({safeFs:api.safeFs,userHome:deps.userHome??os.homedir(),env,cwd});
|
|
31
|
-
if(!state.targets.length)throw configurationError('No installed ARC harness found. Run npx --yes @yunhozz/arc to install it first');
|
|
32
|
-
controller=new AbortController();onInterrupt=()=>controller.abort();process.once('SIGINT',onInterrupt);process.once('SIGTERM',onInterrupt);
|
|
33
|
-
if(context.kind==='npx')return report(await api.upgradeInstalledTargets({packageRoot:root,state,safeFs:api.safeFs,signal:controller.signal}),output,error);
|
|
34
|
-
const latest=await api.resolveLatest({context,env,cwd,signal:controller.signal});packageStarted=true;
|
|
35
|
-
const replaced=await api.upgradeGlobal({context,expectedVersion:latest.version,env,cwd,signal:controller.signal});
|
|
36
|
-
if(replaced.packageStatus!=='updated')throw replaced.error??Error('CLI replacement failed');
|
|
37
|
-
output.write('CLI: updated to '+latest.version+' (previous '+pkg.version+').\n');
|
|
38
|
-
const result=await api.runUpgradeChild({entryPath:path.join(context.packageRoot,'bin/arc-upgrade.mjs'),request:{protocol:1,expectedVersion:latest.version,invocationCwd:cwd,expectedStateToken:state.stateToken},env,cwd,signal:controller.signal});
|
|
39
|
-
if(result.stdout)output.write(result.stdout);if(result.stderr)error.write(result.stderr);
|
|
40
|
-
if(result.code===0&&!result.signal)return 0;
|
|
41
|
-
error.write('CLI was updated but the harness update did not complete. Retry arc upgrade or npx --yes @yunhozz/arc@latest upgrade.\n');return result.code===130?130:1;
|
|
42
|
-
}catch(cause){const code=failure(cause,error);if(cause.code==='ARC_CLI_INPUT')error.write(usage+'\n');if(packageStarted)error.write('CLI state may have changed. Retry arc upgrade; if it is unavailable, run npx --yes @yunhozz/arc@latest upgrade.\n');return code;}
|
|
43
|
-
finally{if(onInterrupt){process.removeListener('SIGINT',onInterrupt);process.removeListener('SIGTERM',onInterrupt);}}
|
|
44
|
-
}
|
|
45
|
-
export async function runChild(request,io={},deps={}){
|
|
46
|
-
const output=io.output??process.stdout,error=io.error??process.stderr;let onInterrupt;
|
|
47
|
-
try{
|
|
48
|
-
if(!request||Object.keys(request).sort().join(',')!=='expectedStateToken,expectedVersion,invocationCwd,protocol'||request.protocol!==1||typeof request.expectedVersion!=='string'||!/^\d+\.\d+\.\d+$/.test(request.expectedVersion)||typeof request.expectedStateToken!=='string'||!/^[a-f0-9]{64}$/.test(request.expectedStateToken)||typeof request.invocationCwd!=='string'||!path.isAbsolute(request.invocationCwd)||fs.realpathSync(request.invocationCwd)!==request.invocationCwd)throw inputError('Invalid private upgrade request');
|
|
49
|
-
const root=deps.packageRoot??packageRoot,pkg=identity(root);if(pkg.version!==request.expectedVersion)throw configurationError('The new ARC package version does not match the requested upgrade');
|
|
50
|
-
const api=await runtime(deps),env=io.env??process.env,cwd=request.invocationCwd,context=await api.inspectNpmContext({packageRoot:root,entryPath:path.join(root,'bin/arc-upgrade.mjs'),env,cwd});
|
|
51
|
-
if(context.kind!=='global'||context.packageRoot!==root)throw configurationError('Cannot verify the replaced global ARC package');
|
|
52
|
-
const state=api.collectInstalledState({safeFs:api.safeFs,userHome:deps.userHome??os.homedir(),env,cwd});if(state.stateToken!==request.expectedStateToken)throw configurationError('Installed ARC settings changed during CLI replacement; retry upgrade');
|
|
53
|
-
if(!state.targets.length)throw configurationError('No installed ARC harness found');
|
|
54
|
-
const controller=new AbortController();onInterrupt=()=>controller.abort();process.once('SIGINT',onInterrupt);process.once('SIGTERM',onInterrupt);
|
|
55
|
-
return report(await api.upgradeInstalledTargets({packageRoot:root,state,safeFs:api.safeFs,signal:controller.signal}),output,error);
|
|
56
|
-
}catch(cause){return failure(cause,error);}finally{if(onInterrupt){process.removeListener('SIGINT',onInterrupt);process.removeListener('SIGTERM',onInterrupt);}}
|
|
57
|
-
}
|
|
1
|
+
export async function runChild(...args){return(await import('../management/update.mjs')).runChild(...args);}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import {COOPERATIVE_RUNTIME_MODULES} from '../runtime/bootstrap.mjs';
|
|
2
|
+
import {RUNTIME_MODULE_PATHS} from './runtime-assets.mjs';
|
|
1
3
|
import {POLICY_TARGETS,buildPolicyOutputs} from '../policy/render.mjs';
|
|
2
4
|
import {isDynamicReferencePath,readReferenceBundle} from './superpowers.mjs';
|
|
3
5
|
import path from 'node:path';import crypto from 'node:crypto';import{loadModelConfig,resolveModelSettings,renderProfiles}from '../models/index.mjs';import{readCheckedFile,typeOf,sameIdentity,metadataOf}from './targets.mjs';
|
|
@@ -23,8 +25,11 @@ export function verifyPayload({packageRoot,safeFs}){
|
|
|
23
25
|
for(const item of FIXED)select(item,false);for(const item of ROOTS)select(item,true);
|
|
24
26
|
for(const platform of ['codex','claude'])if(!referenceTrees[platform])throw Error('Required superpowers reference tree is missing');
|
|
25
27
|
for(const name of listed.keys())if(!files.has(name))throw Error(`Manifest entry is missing: ${name}`);
|
|
26
|
-
const required=['claude/skill/hooks/role-git-guard.mjs','claude/skill/hooks/git-policy.json','lib/policy/claude-hook.mjs','lib/policy/role-policy.json','lib/policy/render.mjs','scripts/update-role-policy.mjs','lib/limits.mjs','lib/installer/limits.mjs','lib/installer/runtime-config.mjs','README.md','install.command','package.json','bin/arc.mjs','lib/cli/root.mjs','lib/cli/
|
|
28
|
+
const required=['claude/skill/hooks/role-git-guard.mjs','claude/skill/hooks/git-policy.json','lib/policy/claude-hook.mjs','lib/policy/role-policy.json','lib/policy/render.mjs','scripts/update-role-policy.mjs','lib/limits.mjs','lib/installer/limits.mjs','lib/installer/runtime-config.mjs','README.md','install.command','package.json','bin/arc.mjs','lib/cli/root.mjs','lib/tui/app.mjs','lib/tui/terminal.mjs','lib/tui/render.mjs','lib/tui/setup.mjs','lib/tui/workflow.mjs','lib/management/operations.mjs','lib/management/status.mjs','lib/management/update.mjs','lib/management/workflow.mjs','lib/cli/postinstall.mjs','scripts/postinstall.mjs','lib/cli/upgrade.mjs','bin/arc-upgrade.mjs','lib/installer/shell-completion.mjs','lib/installer/manifest.mjs','lib/installer/targets.mjs','lib/installer/global-config.mjs','lib/installer/plan.mjs','lib/safe-fs/index.mjs','lib/safe-fs/native.mjs','lib/models/index.mjs','lib/models/config.mjs','lib/models/profiles.mjs','vendor/toml/LICENSE','vendor/toml/package.json','vendor/toml/provenance.json','vendor/toml/dist/index.js','prebuilds/index.json'];
|
|
29
|
+
required.push('lib/installer/runtime-assets.mjs',...RUNTIME_MODULE_PATHS);
|
|
30
|
+
for(const platform of ['codex','claude'])required.push(`${platform}/skill/runtime/role-policy.json`,...RUNTIME_MODULE_PATHS.map(name=>`${platform}/skill/runtime/${name.slice('lib/runtime/'.length)}`));
|
|
27
31
|
for(const tuple of ['darwin-arm64','darwin-x64','linux-arm64-gnu','linux-x64-gnu'])required.push(`prebuilds/${tuple}/arc_safe_fs.node`);
|
|
32
|
+
for(const platform of ['codex','claude'])for(const name of [...COOPERATIVE_RUNTIME_MODULES,'role-policy.json'])required.push(`${platform}/skill/runtime/${name}`);
|
|
28
33
|
const modelInputs={};for(const platform of ['codex','claude']){const base=`${platform}/skill`;required.push(`${base}/SKILL.md`,`${base}/models.toml`,`${base}/references/limits.md`);const profiles=new Map();for(const role of ['scouter','planner','implementer','qa','reviewer']){const name=`arc-${role}.${platform==='codex'?'toml':'md'}`,key=`${platform}/agents/${name}`;required.push(key);profiles.set(name,files.get(key));}modelInputs[platform]={models:files.get(`${base}/models.toml`),profiles};}
|
|
29
34
|
for(const name of required)if(!files.has(name))throw Error(`Required runtime asset is missing: ${name}`);
|
|
30
35
|
const policyInputs=new Map(POLICY_TARGETS.map(({path:name})=>[name,files.get(name)]));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Installation inventory uses repository-root-relative POSIX paths.
|
|
2
|
+
// Keep install-only additions separate from cooperative runtime hash inputs.
|
|
3
|
+
export const RUNTIME_MODULE_PATHS = Object.freeze([
|
|
4
|
+
'lib/runtime/acceptance.mjs',
|
|
5
|
+
'lib/runtime/adapters/claude.mjs',
|
|
6
|
+
'lib/runtime/adapters/codex.mjs',
|
|
7
|
+
'lib/runtime/assignment.mjs',
|
|
8
|
+
'lib/runtime/bootstrap.mjs',
|
|
9
|
+
'lib/runtime/capabilities.mjs',
|
|
10
|
+
'lib/runtime/cli.mjs',
|
|
11
|
+
'lib/runtime/command.mjs',
|
|
12
|
+
'lib/runtime/cooperative-schema.mjs',
|
|
13
|
+
'lib/runtime/cooperative.mjs',
|
|
14
|
+
'lib/runtime/evaluate.mjs',
|
|
15
|
+
'lib/runtime/external.mjs',
|
|
16
|
+
'lib/runtime/gate.mjs',
|
|
17
|
+
'lib/runtime/git-evidence.mjs',
|
|
18
|
+
'lib/runtime/git-query.mjs',
|
|
19
|
+
'lib/runtime/identity.mjs',
|
|
20
|
+
'lib/runtime/operations.mjs',
|
|
21
|
+
'lib/runtime/schema.mjs',
|
|
22
|
+
'lib/runtime/scope.mjs',
|
|
23
|
+
'lib/runtime/store.mjs',
|
|
24
|
+
'lib/runtime/verification.mjs'
|
|
25
|
+
]);
|