workspai 0.52.3 → 0.54.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/README.md +2 -0
- package/contracts/artifact-remediation-plan.v1.json +23 -3
- package/contracts/cli-runtime-command-inventory.v1.snapshot.json +36 -0
- package/contracts/doctor-project-evidence.v1.json +21 -2
- package/contracts/doctor-remediation-plan.v1.json +22 -3
- package/contracts/doctor-workspace-evidence.v1.json +21 -2
- package/contracts/extension-cli-compatibility.v1.json +24 -2
- package/contracts/published-contract-catalog.v1.json +113 -2
- package/contracts/runtime-command-surface.v1.json +216 -5
- package/contracts/studio-card-repair-capabilities.v1.json +378 -0
- package/contracts/workspace-intelligence/doctor-dependency-repair-transaction.v1.json +52 -13
- package/contracts/workspace-intelligence/workspace-repair-proposal.v1.json +78 -0
- package/contracts/workspace-intelligence/workspace-repair-transaction.v1.json +299 -0
- package/contracts/workspace-intelligence-chain.v1.json +6 -0
- package/contracts/workspace-repair-capabilities.v1.json +364 -0
- package/dist/analyze-AAZEJ4FC.js +1 -0
- package/dist/artifact-remediation-plan-A2PRCUNA.js +1 -0
- package/dist/autopilot-release-63XHNGR6.js +1 -0
- package/dist/{chunk-OTDGTAZJ.js → chunk-2FJW6GSW.js} +1 -1
- package/dist/chunk-3DONU3DU.js +1 -0
- package/dist/chunk-3LVJBH7V.js +5 -0
- package/dist/chunk-44VJHNZB.js +1 -0
- package/dist/chunk-4HTSZGEU.js +88 -0
- package/dist/chunk-5XDPQ3CB.js +1 -0
- package/dist/chunk-7AR5PDLD.js +1 -0
- package/dist/chunk-7KKP7RNB.js +3 -0
- package/dist/chunk-AMB42V2F.js +1 -0
- package/dist/chunk-BPACED27.js +8 -0
- package/dist/chunk-BYVTHIC3.js +2 -0
- package/dist/{chunk-6PBSAAS5.js → chunk-EBKYSDCX.js} +1 -1
- package/dist/chunk-FQLB4BIC.js +7 -0
- package/dist/{chunk-ICLYL3N5.js → chunk-FZCYTRBQ.js} +1 -1
- package/dist/{chunk-ZVOEPWQM.js → chunk-GDU7VP6G.js} +1 -1
- package/dist/chunk-H7P7SSUW.js +75 -0
- package/dist/{chunk-MZFSINY7.js → chunk-HRN5J6PW.js} +12 -12
- package/dist/chunk-HY3RMPW5.js +10 -0
- package/dist/chunk-I5CGTCP5.js +1 -0
- package/dist/chunk-IQQWQ3II.js +3 -0
- package/dist/chunk-KFKZOPZC.js +1 -0
- package/dist/{chunk-HPWLSLMC.js → chunk-KVUYAYTY.js} +1 -1
- package/dist/chunk-MQ73VS4E.js +2 -0
- package/dist/{chunk-2OIBHUVH.js → chunk-MRFN5ZQP.js} +1 -1
- package/dist/{chunk-4UVGTFOX.js → chunk-NYHVCFBT.js} +1 -1
- package/dist/{chunk-IO54DFWR.js → chunk-OLX6LX77.js} +1 -1
- package/dist/chunk-OUBBBC7T.js +36 -0
- package/dist/{chunk-WJY7ZXVJ.js → chunk-P7K5RHJC.js} +1 -1
- package/dist/chunk-QZ7PNMVP.js +1 -0
- package/dist/chunk-RA24WQLF.js +1 -0
- package/dist/{chunk-3PTIIBRY.js → chunk-RMXXK64P.js} +1 -1
- package/dist/{chunk-PTTZPDLX.js → chunk-S7Z4DP3P.js} +1 -1
- package/dist/chunk-SJLUE6AY.js +1 -0
- package/dist/chunk-UFOCUHG3.js +1 -0
- package/dist/chunk-WD2XDMGB.js +1 -0
- package/dist/chunk-WIO6L24E.js +2 -0
- package/dist/{chunk-QURMI7ID.js → chunk-WZA5ISAQ.js} +1 -1
- package/dist/chunk-XVRJVKOX.js +1 -0
- package/dist/chunk-ZLYEYHMH.js +1 -0
- package/dist/{create-ESK3CQPK.js → create-R6A7EHQZ.js} +1 -1
- package/dist/{doctor-MYRJ5BFF.js → doctor-HJ3O7SAO.js} +1 -1
- package/dist/index.d.ts +92 -23
- package/dist/index.js +246 -244
- package/dist/pipeline-TDQK5QYQ.js +5 -0
- package/dist/{project-intelligence-lens-Q4SZDI2N.js → project-intelligence-lens-ZOAWXYC5.js} +1 -1
- package/dist/project-test-coverage-44ZPCOPV.js +1 -0
- package/dist/{verified-goal-PSQF2TF2.js → verified-goal-S2PEBJUV.js} +1 -1
- package/dist/{workspace-LSOZM2CG.js → workspace-B53XH35L.js} +1 -1
- package/dist/{workspace-agent-sync-RZBQXCNJ.js → workspace-agent-sync-446AXPHJ.js} +1 -1
- package/dist/{workspace-archive-ZOWQXWJ6.js → workspace-archive-VHUPOBAV.js} +1 -1
- package/dist/{workspace-context-IYJKO5BN.js → workspace-context-XSECHC7O.js} +1 -1
- package/dist/{workspace-contract-AZFISDLS.js → workspace-contract-AYFTZIKM.js} +1 -1
- package/dist/workspace-explain-SZI2WAAD.js +1 -0
- package/dist/workspace-explain-contract-N2XQHAPM.js +1 -0
- package/dist/{workspace-feedback-LIHEWTNV.js → workspace-feedback-WXE7NVMV.js} +1 -1
- package/dist/{workspace-foundation-H5UTAUXQ.js → workspace-foundation-FFNCK5ZD.js} +1 -1
- package/dist/{workspace-graph-stream-KUDOZE73.js → workspace-graph-stream-AJPS45FD.js} +1 -1
- package/dist/{workspace-history-HULG5EFN.js → workspace-history-YY7YRDOH.js} +1 -1
- package/dist/{workspace-intelligence-A4UE4DZK.js → workspace-intelligence-FWRB47EJ.js} +1 -1
- package/dist/{workspace-intelligence-evaluation-AOLGHYHC.js → workspace-intelligence-evaluation-UP2K3L35.js} +1 -1
- package/dist/{workspace-intelligence-runner-5VAAMKMK.js → workspace-intelligence-runner-EQFLRVRL.js} +1 -1
- package/dist/workspace-intelligence-runtime-registry-MRSF7RTT.js +1 -0
- package/dist/{workspace-knowledge-graph-LEM6X5CM.js → workspace-knowledge-graph-BMMM2FUE.js} +1 -1
- package/dist/{workspace-mcp-serve-N2QPR7VJ.js → workspace-mcp-serve-COA4FMCA.js} +1 -1
- package/dist/{workspace-model-FJXX3NET.js → workspace-model-MNJOGBPP.js} +1 -1
- package/dist/{workspace-onboarding-IKFISWWY.js → workspace-onboarding-2B7CYZ5H.js} +1 -1
- package/dist/{workspace-readme-E2M35RJH.js → workspace-readme-4S6PJ74A.js} +1 -1
- package/dist/{workspace-registry-summary-HOQ3OBNT.js → workspace-registry-summary-GPJEL7K7.js} +1 -1
- package/dist/workspace-repair-engine-OZXOXVVV.js +3 -0
- package/dist/workspace-run-VPXRRHDK.js +1 -0
- package/dist/{workspace-verify-32AWCJQG.js → workspace-verify-C6HWHRLJ.js} +1 -1
- package/dist/{workspace-watch-4WVNB26E.js → workspace-watch-DLPHLF5R.js} +1 -1
- package/docs/README.md +2 -0
- package/docs/commands-reference.md +10 -8
- package/docs/contracts/ARTIFACT_CATALOG.md +27 -22
- package/docs/contracts/README.md +3 -0
- package/docs/contracts/RUNTIME_ACCEPTANCE_MATRIX.md +20 -11
- package/docs/doctor-command.md +16 -4
- package/docs/workspace-intelligence-runner.md +2 -1
- package/docs/workspace-knowledge-graph.md +6 -1
- package/docs/workspace-operations.md +3 -1
- package/docs/workspace-repair-engine.md +122 -0
- package/docs/workspace-run.md +17 -14
- package/package.json +3 -2
- package/scripts/enterprise-package-smoke.mjs +9 -6
- package/dist/analyze-J7VNZMDH.js +0 -1
- package/dist/artifact-remediation-plan-IDCJGULX.js +0 -3
- package/dist/autopilot-release-XRNPBYC6.js +0 -1
- package/dist/chunk-23JDMHSD.js +0 -86
- package/dist/chunk-2E6WGUN6.js +0 -1
- package/dist/chunk-2ZRMYFJG.js +0 -1
- package/dist/chunk-3D3PFPP5.js +0 -1
- package/dist/chunk-4D7DIGAB.js +0 -1
- package/dist/chunk-5XJRCP3D.js +0 -36
- package/dist/chunk-62K2H72S.js +0 -1
- package/dist/chunk-7MQZQ4UU.js +0 -1
- package/dist/chunk-AL237TSJ.js +0 -7
- package/dist/chunk-B4CPDK6J.js +0 -2
- package/dist/chunk-CZC5P2MF.js +0 -1
- package/dist/chunk-DZ4VKAXB.js +0 -75
- package/dist/chunk-FUPHQOJB.js +0 -1
- package/dist/chunk-GHB6QMQH.js +0 -1
- package/dist/chunk-LOCPNNSK.js +0 -1
- package/dist/chunk-LPCL4U4L.js +0 -1
- package/dist/chunk-MBRU3VWJ.js +0 -2
- package/dist/chunk-NHVHRBBV.js +0 -4
- package/dist/chunk-OXNV7OJM.js +0 -8
- package/dist/chunk-P4OSLAVD.js +0 -3
- package/dist/chunk-Q6CUJ3WF.js +0 -10
- package/dist/chunk-ULR66OJR.js +0 -2
- package/dist/chunk-XHRHNVCZ.js +0 -1
- package/dist/chunk-ZTKIBREF.js +0 -1
- package/dist/pipeline-P6DFMDL4.js +0 -5
- package/dist/project-test-coverage-A677ZLW3.js +0 -1
- package/dist/workspace-explain-26UGV7L4.js +0 -1
- package/dist/workspace-explain-contract-GIWPCCEF.js +0 -1
- package/dist/workspace-intelligence-runtime-registry-YOQ5GFFJ.js +0 -1
- package/dist/workspace-run-HRKCACGR.js +0 -1
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "workspai.workspace-repair-capabilities.v1",
|
|
3
|
+
"owner": "Workspai CLI",
|
|
4
|
+
"workflow": [
|
|
5
|
+
"plan",
|
|
6
|
+
"preconditions",
|
|
7
|
+
"approval",
|
|
8
|
+
"checkpoint",
|
|
9
|
+
"execute",
|
|
10
|
+
"reconcile",
|
|
11
|
+
"audit",
|
|
12
|
+
"test",
|
|
13
|
+
"build",
|
|
14
|
+
"canonical-verify",
|
|
15
|
+
"close-or-rollback-or-decision"
|
|
16
|
+
],
|
|
17
|
+
"invariants": {
|
|
18
|
+
"multiAdapterProjects": true,
|
|
19
|
+
"missingTools": "decision-required",
|
|
20
|
+
"unsupportedEcosystems": "decision-required",
|
|
21
|
+
"silentFallbackToModelExecution": false,
|
|
22
|
+
"approvalBoundToPlanHash": true,
|
|
23
|
+
"canonicalVerificationRequired": true,
|
|
24
|
+
"rollbackConflictDetection": true
|
|
25
|
+
},
|
|
26
|
+
"adapters": [
|
|
27
|
+
{
|
|
28
|
+
"id": "node",
|
|
29
|
+
"ecosystem": "JavaScript / TypeScript",
|
|
30
|
+
"manifests": [
|
|
31
|
+
"package.json"
|
|
32
|
+
],
|
|
33
|
+
"lockfiles": [
|
|
34
|
+
"package-lock.json",
|
|
35
|
+
"npm-shrinkwrap.json",
|
|
36
|
+
"pnpm-lock.yaml",
|
|
37
|
+
"yarn.lock",
|
|
38
|
+
"bun.lock",
|
|
39
|
+
"bun.lockb"
|
|
40
|
+
],
|
|
41
|
+
"packageManagers": [
|
|
42
|
+
"npm",
|
|
43
|
+
"pnpm",
|
|
44
|
+
"yarn",
|
|
45
|
+
"bun"
|
|
46
|
+
],
|
|
47
|
+
"support": "full",
|
|
48
|
+
"stages": {
|
|
49
|
+
"reconcile": "native",
|
|
50
|
+
"audit": "native",
|
|
51
|
+
"test": "declared",
|
|
52
|
+
"build": "declared"
|
|
53
|
+
},
|
|
54
|
+
"requiredToolFamilies": [
|
|
55
|
+
"selected package manager"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"id": "python",
|
|
60
|
+
"ecosystem": "Python",
|
|
61
|
+
"manifests": [
|
|
62
|
+
"pyproject.toml",
|
|
63
|
+
"requirements.txt"
|
|
64
|
+
],
|
|
65
|
+
"lockfiles": [
|
|
66
|
+
"uv.lock",
|
|
67
|
+
"poetry.lock",
|
|
68
|
+
"requirements.txt"
|
|
69
|
+
],
|
|
70
|
+
"packageManagers": [
|
|
71
|
+
"uv",
|
|
72
|
+
"poetry",
|
|
73
|
+
"pip"
|
|
74
|
+
],
|
|
75
|
+
"support": "conditional",
|
|
76
|
+
"stages": {
|
|
77
|
+
"reconcile": "conditional",
|
|
78
|
+
"audit": "conditional",
|
|
79
|
+
"test": "conditional",
|
|
80
|
+
"build": "declared"
|
|
81
|
+
},
|
|
82
|
+
"requiredToolFamilies": [
|
|
83
|
+
"isolated Python",
|
|
84
|
+
"selected environment manager",
|
|
85
|
+
"pip-audit or governed Doctor audit"
|
|
86
|
+
],
|
|
87
|
+
"limitation": "A bounded isolated environment and an installed audit surface are required."
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"id": "go",
|
|
91
|
+
"ecosystem": "Go",
|
|
92
|
+
"manifests": [
|
|
93
|
+
"go.mod"
|
|
94
|
+
],
|
|
95
|
+
"lockfiles": [
|
|
96
|
+
"go.sum"
|
|
97
|
+
],
|
|
98
|
+
"packageManagers": [
|
|
99
|
+
"go modules"
|
|
100
|
+
],
|
|
101
|
+
"support": "conditional",
|
|
102
|
+
"stages": {
|
|
103
|
+
"reconcile": "native",
|
|
104
|
+
"audit": "conditional",
|
|
105
|
+
"test": "native",
|
|
106
|
+
"build": "native"
|
|
107
|
+
},
|
|
108
|
+
"requiredToolFamilies": [
|
|
109
|
+
"go",
|
|
110
|
+
"govulncheck"
|
|
111
|
+
],
|
|
112
|
+
"limitation": "govulncheck must be installed; the engine never fetches an unreviewed tool."
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"id": "rust",
|
|
116
|
+
"ecosystem": "Rust",
|
|
117
|
+
"manifests": [
|
|
118
|
+
"Cargo.toml"
|
|
119
|
+
],
|
|
120
|
+
"lockfiles": [
|
|
121
|
+
"Cargo.lock"
|
|
122
|
+
],
|
|
123
|
+
"packageManagers": [
|
|
124
|
+
"cargo"
|
|
125
|
+
],
|
|
126
|
+
"support": "conditional",
|
|
127
|
+
"stages": {
|
|
128
|
+
"reconcile": "native",
|
|
129
|
+
"audit": "conditional",
|
|
130
|
+
"test": "native",
|
|
131
|
+
"build": "native"
|
|
132
|
+
},
|
|
133
|
+
"requiredToolFamilies": [
|
|
134
|
+
"cargo",
|
|
135
|
+
"cargo-audit"
|
|
136
|
+
],
|
|
137
|
+
"limitation": "The cargo-audit subcommand must already be installed."
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"id": "php-composer",
|
|
141
|
+
"ecosystem": "PHP",
|
|
142
|
+
"manifests": [
|
|
143
|
+
"composer.json"
|
|
144
|
+
],
|
|
145
|
+
"lockfiles": [
|
|
146
|
+
"composer.lock"
|
|
147
|
+
],
|
|
148
|
+
"packageManagers": [
|
|
149
|
+
"composer"
|
|
150
|
+
],
|
|
151
|
+
"support": "full",
|
|
152
|
+
"stages": {
|
|
153
|
+
"reconcile": "native",
|
|
154
|
+
"audit": "native",
|
|
155
|
+
"test": "declared",
|
|
156
|
+
"build": "declared"
|
|
157
|
+
},
|
|
158
|
+
"requiredToolFamilies": [
|
|
159
|
+
"composer"
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"id": "ruby-bundler",
|
|
164
|
+
"ecosystem": "Ruby",
|
|
165
|
+
"manifests": [
|
|
166
|
+
"Gemfile"
|
|
167
|
+
],
|
|
168
|
+
"lockfiles": [
|
|
169
|
+
"Gemfile.lock"
|
|
170
|
+
],
|
|
171
|
+
"packageManagers": [
|
|
172
|
+
"bundler"
|
|
173
|
+
],
|
|
174
|
+
"support": "conditional",
|
|
175
|
+
"stages": {
|
|
176
|
+
"reconcile": "native",
|
|
177
|
+
"audit": "conditional",
|
|
178
|
+
"test": "declared",
|
|
179
|
+
"build": "declared"
|
|
180
|
+
},
|
|
181
|
+
"requiredToolFamilies": [
|
|
182
|
+
"bundle",
|
|
183
|
+
"bundle-audit"
|
|
184
|
+
],
|
|
185
|
+
"limitation": "bundle-audit and the declared Rake tasks must already exist."
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"id": "elixir-mix",
|
|
189
|
+
"ecosystem": "Elixir",
|
|
190
|
+
"manifests": [
|
|
191
|
+
"mix.exs"
|
|
192
|
+
],
|
|
193
|
+
"lockfiles": [
|
|
194
|
+
"mix.lock"
|
|
195
|
+
],
|
|
196
|
+
"packageManagers": [
|
|
197
|
+
"mix"
|
|
198
|
+
],
|
|
199
|
+
"support": "conditional",
|
|
200
|
+
"stages": {
|
|
201
|
+
"reconcile": "native",
|
|
202
|
+
"audit": "conditional",
|
|
203
|
+
"test": "native",
|
|
204
|
+
"build": "native"
|
|
205
|
+
},
|
|
206
|
+
"requiredToolFamilies": [
|
|
207
|
+
"mix",
|
|
208
|
+
"Hex audit task"
|
|
209
|
+
],
|
|
210
|
+
"limitation": "The project must expose the Hex audit task used by its dependency policy."
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"id": "deno",
|
|
214
|
+
"ecosystem": "Deno",
|
|
215
|
+
"manifests": [
|
|
216
|
+
"deno.json",
|
|
217
|
+
"deno.jsonc"
|
|
218
|
+
],
|
|
219
|
+
"lockfiles": [
|
|
220
|
+
"deno.lock"
|
|
221
|
+
],
|
|
222
|
+
"packageManagers": [
|
|
223
|
+
"deno"
|
|
224
|
+
],
|
|
225
|
+
"support": "full",
|
|
226
|
+
"stages": {
|
|
227
|
+
"reconcile": "native",
|
|
228
|
+
"audit": "native",
|
|
229
|
+
"test": "declared",
|
|
230
|
+
"build": "declared"
|
|
231
|
+
},
|
|
232
|
+
"requiredToolFamilies": [
|
|
233
|
+
"deno"
|
|
234
|
+
]
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"id": "dotnet",
|
|
238
|
+
"ecosystem": ".NET",
|
|
239
|
+
"manifests": [
|
|
240
|
+
"*.sln",
|
|
241
|
+
"*.csproj",
|
|
242
|
+
"*.fsproj",
|
|
243
|
+
"*.vbproj"
|
|
244
|
+
],
|
|
245
|
+
"lockfiles": [
|
|
246
|
+
"Directory.Packages.props",
|
|
247
|
+
"packages.lock.json"
|
|
248
|
+
],
|
|
249
|
+
"packageManagers": [
|
|
250
|
+
"NuGet / dotnet"
|
|
251
|
+
],
|
|
252
|
+
"support": "full",
|
|
253
|
+
"stages": {
|
|
254
|
+
"reconcile": "native",
|
|
255
|
+
"audit": "native",
|
|
256
|
+
"test": "native",
|
|
257
|
+
"build": "native"
|
|
258
|
+
},
|
|
259
|
+
"requiredToolFamilies": [
|
|
260
|
+
"dotnet"
|
|
261
|
+
]
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"id": "jvm-maven",
|
|
265
|
+
"ecosystem": "JVM / Maven",
|
|
266
|
+
"manifests": [
|
|
267
|
+
"pom.xml"
|
|
268
|
+
],
|
|
269
|
+
"lockfiles": [],
|
|
270
|
+
"packageManagers": [
|
|
271
|
+
"Maven Wrapper",
|
|
272
|
+
"Maven"
|
|
273
|
+
],
|
|
274
|
+
"support": "conditional",
|
|
275
|
+
"stages": {
|
|
276
|
+
"reconcile": "native",
|
|
277
|
+
"audit": "conditional",
|
|
278
|
+
"test": "native",
|
|
279
|
+
"build": "native"
|
|
280
|
+
},
|
|
281
|
+
"requiredToolFamilies": [
|
|
282
|
+
"mvnw or mvn",
|
|
283
|
+
"governed Doctor audit"
|
|
284
|
+
],
|
|
285
|
+
"limitation": "A project-specific dependency audit command must be declared by Doctor evidence."
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"id": "jvm-gradle",
|
|
289
|
+
"ecosystem": "JVM / Gradle",
|
|
290
|
+
"manifests": [
|
|
291
|
+
"build.gradle.kts",
|
|
292
|
+
"build.gradle"
|
|
293
|
+
],
|
|
294
|
+
"lockfiles": [
|
|
295
|
+
"gradle.lockfile",
|
|
296
|
+
"gradle/libs.versions.toml"
|
|
297
|
+
],
|
|
298
|
+
"packageManagers": [
|
|
299
|
+
"Gradle Wrapper",
|
|
300
|
+
"Gradle"
|
|
301
|
+
],
|
|
302
|
+
"support": "conditional",
|
|
303
|
+
"stages": {
|
|
304
|
+
"reconcile": "native",
|
|
305
|
+
"audit": "conditional",
|
|
306
|
+
"test": "native",
|
|
307
|
+
"build": "native"
|
|
308
|
+
},
|
|
309
|
+
"requiredToolFamilies": [
|
|
310
|
+
"gradlew or gradle",
|
|
311
|
+
"governed Doctor audit"
|
|
312
|
+
],
|
|
313
|
+
"limitation": "A project-specific dependency audit command must be declared by Doctor evidence."
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"id": "clojure",
|
|
317
|
+
"ecosystem": "Clojure",
|
|
318
|
+
"manifests": [
|
|
319
|
+
"deps.edn",
|
|
320
|
+
"project.clj"
|
|
321
|
+
],
|
|
322
|
+
"lockfiles": [],
|
|
323
|
+
"packageManagers": [
|
|
324
|
+
"Clojure CLI",
|
|
325
|
+
"Leiningen"
|
|
326
|
+
],
|
|
327
|
+
"support": "conditional",
|
|
328
|
+
"stages": {
|
|
329
|
+
"reconcile": "native",
|
|
330
|
+
"audit": "conditional",
|
|
331
|
+
"test": "conditional",
|
|
332
|
+
"build": "conditional"
|
|
333
|
+
},
|
|
334
|
+
"requiredToolFamilies": [
|
|
335
|
+
"clojure or lein",
|
|
336
|
+
"governed project audit"
|
|
337
|
+
],
|
|
338
|
+
"limitation": "Tests and builds run only when the selected Clojure project surface declares a deterministic entrypoint."
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"id": "scala-sbt",
|
|
342
|
+
"ecosystem": "Scala / sbt",
|
|
343
|
+
"manifests": [
|
|
344
|
+
"build.sbt"
|
|
345
|
+
],
|
|
346
|
+
"lockfiles": [],
|
|
347
|
+
"packageManagers": [
|
|
348
|
+
"sbt"
|
|
349
|
+
],
|
|
350
|
+
"support": "conditional",
|
|
351
|
+
"stages": {
|
|
352
|
+
"reconcile": "native",
|
|
353
|
+
"audit": "conditional",
|
|
354
|
+
"test": "native",
|
|
355
|
+
"build": "native"
|
|
356
|
+
},
|
|
357
|
+
"requiredToolFamilies": [
|
|
358
|
+
"sbt",
|
|
359
|
+
"governed project audit"
|
|
360
|
+
],
|
|
361
|
+
"limitation": "A project-specific dependency audit command must be declared by Doctor evidence."
|
|
362
|
+
}
|
|
363
|
+
]
|
|
364
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{b as printAnalyzeReport,a as runAnalyze}from'./chunk-KVUYAYTY.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as buildArtifactRemediationPlan,b as writeArtifactRemediationPlan}from'./chunk-IQQWQ3II.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{b as AUTOPILOT_RELEASE_ALIAS_FILENAME,a as AUTOPILOT_RELEASE_LAST_RUN_FILENAME,c as runAutopilotRelease}from'./chunk-BPACED27.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'path';import N from'fs-extra';import F from'chalk';async function K(n,o={}){let t=e.resolve(n),{WORKSPACE_CONTRACT_PATH:i,syncWorkspaceContract:c,verifyWorkspaceContract:m,writeWorkspaceContractVerifyEvidence:k}=await import('./workspace-contract-
|
|
1
|
+
import e from'path';import N from'fs-extra';import F from'chalk';async function K(n,o={}){let t=e.resolve(n),{WORKSPACE_CONTRACT_PATH:i,syncWorkspaceContract:c,verifyWorkspaceContract:m,writeWorkspaceContractVerifyEvidence:k}=await import('./workspace-contract-AYFTZIKM.js'),p=await c({workspacePath:t,strict:true}),{syncWorkspaceReadme:f,WORKSPACE_README_PATH:d}=await import('./workspace-readme-4S6PJ74A.js'),h=await f({workspacePath:t,workspaceName:p.contract.workspace.name,profile:p.contract.workspace.profile??"minimal",projectCount:p.contract.projects.length}),{buildWorkspaceModel:u,writeWorkspaceModel:g}=await import('./workspace-model-MNJOGBPP.js'),a=await u({workspacePath:t,includeEvidence:true}),P=await g(a,t),{buildWorkspaceImpact:W,buildWorkspaceModelSnapshot:C,diffWorkspaceModel:y,writeWorkspaceImpact:A,writeWorkspaceModelDiff:j,writeWorkspaceModelSnapshot:E}=await import('./workspace-intelligence-FWRB47EJ.js'),{WORKSPACE_INTELLIGENCE_ARTIFACTS:s}=await import('./workspace-intelligence-runtime-registry-MRSF7RTT.js'),R=e.join(t,s.snapshot),l=false;if(!await N.pathExists(R)){let r=await C({workspacePath:t,model:a});await E(r,t),l=true;}let S=await y({workspacePath:t,fromPath:s.snapshot,model:a}),b=await j(S,t),v=await W({workspacePath:t,fromPath:s.diff}),O=await A(v,t),T=await m({workspacePath:t,strict:true}),_=await k({workspacePath:t,result:T}),{syncWorkspaceAgentGrounding:M}=await import('./workspace-agent-sync-446AXPHJ.js'),w=await M({workspacePath:t,model:a,write:true,refreshContext:true,strict:false,preset:"enterprise",targets:["all"],projectGrounding:o.projectGrounding??"managed"}),x=[i,(await import('./workspace-registry-summary-GPJEL7K7.js')).WORKSPACE_REGISTRY_SUMMARY_RELATIVE_PATH,e.relative(t,h).split(e.sep).join("/")||d,e.relative(t,P).split(e.sep).join("/"),s.knowledgeGraph,...l?[s.snapshot]:[],e.relative(t,b).split(e.sep).join("/"),e.relative(t,O).split(e.sep).join("/"),e.relative(t,_).split(e.sep).join("/"),...w.writtenFiles].filter((r,I,G)=>G.indexOf(r)===I);return o.silent||console.log(F.gray(`\u2713 Workspace Intelligence synced \xB7 ${a.summary.projectCount} project(s) \xB7 model + graph + agent grounding`)),{workspacePath:t,projectCount:a.summary.projectCount,baselineCreated:l,writtenFiles:x,warnings:w.projectLenses?.skipped.map(r=>`${r.name}: ${r.reason}`)??[]}}async function D(n,o={}){let t=e.resolve(n),i=o.workspaceName??e.basename(t),{registerWorkspaceStrict:c}=await import('./workspace-B53XH35L.js');return await c(t,i),K(t,{silent:o.silent})}export{K as a,D as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-A5FBGRJA.js';import {g,p}from'./chunk-MQ73VS4E.js';import {d as d$1,e as e$1}from'./chunk-WIO6L24E.js';import {e,d}from'./chunk-44VJHNZB.js';import {s}from'./chunk-MOSXTVPU.js';import {s as s$1,q}from'./chunk-RJIYCDVC.js';import a from'path';import {existsSync}from'fs';import m from'fs-extra';var f=e.workspaceRegistry,w=d.workspaceRegistry.schemaVersion;function E(r){return {slug:r.slug,relativePath:r.relativePath,framework:r.framework,kit:r.kit,source:r.source}}async function b(r){let e=s(r,"workspace.json").find(t=>existsSync(t));if(!e)return {exists:false,legacyProjectCount:0};try{let t=await m.readJson(e),c=Array.isArray(t.projects)?t.projects.length:0,o=typeof t.workspace_name=="string"&&t.workspace_name.trim()||typeof t.name=="string"&&t.name.trim()||a.basename(r);return {exists:true,manifestPath:e,workspaceName:o,profile:typeof t.profile=="string"?t.profile:void 0,legacyProjectCount:c}}catch{return {exists:true,manifestPath:e,legacyProjectCount:0,workspaceName:a.basename(r)}}}async function _(r){let e=a$1(r);for(let t of s$1())if(await m.pathExists(t))try{let o=((await m.readJson(t)).workspaces||[]).find(s=>a$1(s.path)===e);if(o)return {exists:true,projectCount:Array.isArray(o.projects)?o.projects.length:0,registryPath:t}}catch{continue}return {exists:false,projectCount:0,registryPath:a.join(q(),"workspaces.json")}}async function T(r,e){let t=a.resolve(r),c=await d$1(t,g),o=await b(t),s=await _(t),i=e?.contract!==void 0||!!c,n=[];if(e?.contract)n=e.contract.projects||[];else if(i)try{let{contract:A}=await p({workspacePath:t});n=A.projects||[];}catch{n=[];}let d={contract:{exists:i,projectCount:n.length,path:g},globalRegistry:{exists:s.exists,projectCount:s.projectCount,path:s.registryPath},legacyWorkspaceJson:{exists:o.exists,projectCount:o.legacyProjectCount,path:o.manifestPath?a.relative(t,o.manifestPath):void 0}},p$1="none",u=[],y=0;return i?(p$1="workspace.contract.json",u=n.map(E),y=u.length):s.projectCount>0?(p$1="global-registry",y=s.projectCount):o.legacyProjectCount>0&&(p$1="legacy-workspace.json",y=o.legacyProjectCount),{contractExists:i,summary:{schemaVersion:w,kind:"rapidkit.workspace.registry",workspacePath:t,workspaceName:o.workspaceName||a.basename(t),profile:o.profile,projectCount:y,authority:p$1,contractPath:g,projects:u,sources:d}}}async function U(r){let e=await d$1(r,f);if(!e)return null;try{let t=await m.readJson(e);return t?.schemaVersion!==w?null:t}catch{return null}}async function D(r,e){let t=await M(r,e);return await e$1(r,f,t),t}async function M(r,e){return {...(await T(r,{contract:e?.contract})).summary,generatedAt:(e?.now??new Date).toISOString(),registrySummaryPath:f}}function F(r,e=""){return r.projectCount>0?r.authority==="workspace.contract.json"?`${r.projectCount} project(s) registered in workspace contract${e}.`:r.authority==="global-registry"?`${r.projectCount} project(s) registered in global workspace registry${e}.`:`${r.projectCount} project(s) registered in legacy workspace manifest${e}.`:`Workspace state exists, but no projects are registered yet${e}.`}export{f as a,w as b,T as c,U as d,D as e,M as f,F as g};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import {d,b,e}from'./chunk-WD2XDMGB.js';import {d as d$2}from'./chunk-S5KTATOU.js';import {a}from'./chunk-27UR373Z.js';import {p as p$1,w as w$1,t as t$1}from'./chunk-6HJJHEL6.js';import {h,j,f,e as e$2}from'./chunk-2PY65U6X.js';import {d as d$1}from'./chunk-WIO6L24E.js';import {e as e$1}from'./chunk-44VJHNZB.js';import {a as a$1}from'./chunk-TQEMLBAG.js';import {t,p,s}from'./chunk-MOSXTVPU.js';import {e as e$3,g}from'./chunk-RJIYCDVC.js';import K from'fs';import w from'path';import E from'chalk';import {execa}from'execa';function Ce(e){return K.existsSync(w.join(e,"bun.lock"))||K.existsSync(w.join(e,"bunfig.toml"))?"bun":K.existsSync(w.join(e,"pnpm-lock.yaml"))?"pnpm":K.existsSync(w.join(e,"yarn.lock"))?"yarn":(K.existsSync(w.join(e,"package-lock.json")),"npm")}function Pe(e,r,t=Ce(e)){return t==="npm"?`npm run ${r}`:`${t} run ${r}`}function Ae(e,r=Ce(e)){return `${r} install`}var Ve={"python-fastapi":{runtime:"python",framework:"FastAPI",markers:["pyproject.toml","fastapi"],commands:{init:"python -m pip install -e .",test:"pytest",build:"python -m build",start:"uvicorn main:app --reload"},errorPatterns:{setup:["ModuleNotFoundError","No module named","pip: command not found"],"test-failure":["FAILED","ERROR","test session started"],dependency:["ImportError","missing.*dependency"],runtime:["TypeError","AttributeError","ValueError"],timeout:["timeout","Timeout","timed out"],unknown:[]},healthCheck:{stage:"start",type:"http",value:"http://localhost:8000/docs"},validation:{command:"python -m pip list | grep fastapi",error:"FastAPI not installed"}},"python-django":{runtime:"python",framework:"Django",markers:["manage.py","django"],commands:{init:"python manage.py migrate",test:"python manage.py test",build:"python manage.py collectstatic --noinput",start:"python manage.py runserver 0.0.0.0:8000"},errorPatterns:{setup:["ModuleNotFoundError","ProgrammingError.*migrate"],"test-failure":["FAILED","ERROR","Ran.*test"],dependency:["ImportError","missing.*dependency"],runtime:["DatabaseError","ImproperlyConfigured"],timeout:["timeout","Timeout"],unknown:[]},healthCheck:{stage:"start",type:"port",value:8e3},dependencies:["init"]},"node-nestjs":{runtime:"node",framework:"NestJS",markers:["package.json","@nestjs/core"],commands:{init:"npm install",test:"npm run test",build:"npm run build",start:"npm run start"},errorPatterns:{setup:["npm ERR!","ENOENT","not found"],"test-failure":["Tests.*failed","FAIL","fail.*test"],dependency:["Cannot find module","ERR_MODULE_NOT_FOUND"],runtime:["TypeError","Error: ","ReferenceError"],timeout:["timeout","TIMEOUT"],unknown:[]},healthCheck:{stage:"start",type:"port",value:3e3}},"node-express":{runtime:"node",framework:"Express",markers:["package.json","express"],commands:{init:"npm install",test:"npm run test",build:"npm run build",start:"npm start"},errorPatterns:{setup:["npm ERR!","ENOENT"],"test-failure":["failed","FAIL"],dependency:["Cannot find module"],runtime:["Error","TypeError"],timeout:["timeout"],unknown:[]}},"go-fiber":{runtime:"go",framework:"Fiber",markers:["go.mod","fiber"],commands:{init:"go mod download && go mod tidy",test:"go test ./...",build:"go build -o app .",start:"./app"},errorPatterns:{setup:["go: .*not found","cannot find","go mod tidy"],"test-failure":["FAIL","--- FAIL"],dependency:["missing.*module"],runtime:["panic","fatal","Error"],timeout:["timeout","context deadline"],unknown:[]},dependencies:["init"]},"go-gin":{runtime:"go",framework:"Gin",markers:["go.mod","gin-gonic"],commands:{init:"go mod download && go mod tidy",test:"go test ./...",build:"go build -o app .",start:"./app"},errorPatterns:{setup:["go: .*not found"],"test-failure":["FAIL"],dependency:["missing.*module"],runtime:["panic"],timeout:["timeout"],unknown:[]}},"java-springboot":{runtime:"java",framework:"Spring Boot",markers:["pom.xml","build.gradle","spring-boot"],commands:{init:"mvn dependency:go-offline",test:"mvn test",build:"mvn package -DskipTests",start:"mvn spring-boot:run"},errorPatterns:{setup:["\\[ERROR\\]","BUILD FAILURE","missing dependencies"],"test-failure":["\\[ERROR\\] Tests run:","BUILD FAILURE"],dependency:["missing.*dependency"],runtime:["Exception","Error","NullPointerException"],timeout:["timeout","Timeout"],unknown:[]},healthCheck:{stage:"start",type:"port",value:8080}},"php-laravel":{runtime:"php",framework:"Laravel",markers:["composer.json","artisan","app/Models"],commands:{init:"composer install && php artisan migrate:fresh --seed",test:"php artisan test",build:"php artisan config:cache && php artisan route:cache && php artisan view:cache",start:"php artisan serve --host=0.0.0.0 --port=8000"},errorPatterns:{setup:["Composer.*lock","Fatal error","Class.*not found"],"test-failure":["FAILED","Tests.*failed"],dependency:["Class.*not found","require.*failed"],runtime:["Fatal error","Exception","Error"],timeout:["timeout","Timeout"],unknown:[]},healthCheck:{stage:"start",type:"port",value:8e3},dependencies:["init"]},"php-symfony":{runtime:"php",framework:"Symfony",markers:["composer.json","symfony.lock","bin/console"],commands:{init:"composer install && php bin/console doctrine:database:create",test:"php bin/phpunit",build:"php bin/console cache:clear --env=prod",start:"symfony serve --no-tls"},errorPatterns:{setup:["Composer.*error","Fatal error"],"test-failure":["FAILED","failure"],dependency:["Class.*not found"],runtime:["Fatal error","Exception"],timeout:["timeout"],unknown:[]},dependencies:["init"]},"rust-actix":{runtime:"rust",framework:"Actix-web",markers:["Cargo.toml","actix"],commands:{init:"cargo fetch",test:"cargo test",build:"cargo build --release",start:"cargo run --release"},errorPatterns:{setup:["error: .*could not find","failed.*download"],"test-failure":["test result:","FAILED"],dependency:["can.t find.*crate"],runtime:["error\\[E","thread.*panicked"],timeout:["timeout"],unknown:[]},validation:{command:"cargo --version",error:"Rust/Cargo not installed"}},"rust-axum":{runtime:"rust",framework:"Axum",markers:["Cargo.toml","axum"],commands:{init:"cargo fetch",test:"cargo test",build:"cargo build --release",start:"cargo run --release"},errorPatterns:{setup:["error: .*could not find"],"test-failure":["test result:","FAILED"],dependency:["can.t find.*crate"],runtime:["error\\[E"],timeout:["timeout"],unknown:[]}},"rust-rocket":{runtime:"rust",framework:"Rocket",markers:["Cargo.toml","rocket"],commands:{init:"cargo fetch",test:"cargo test",build:"cargo build --release",start:"cargo run --release"},errorPatterns:{setup:["error: .*could not find"],"test-failure":["FAILED"],dependency:["can.t find"],runtime:["error\\[E"],timeout:["timeout"],unknown:[]}},"dotnet-aspnetcore":{runtime:"dotnet",framework:"ASP.NET Core",markers:[".csproj",".sln","Program.cs"],commands:{init:"dotnet restore",test:"dotnet test",build:"dotnet build -c Release",start:"dotnet run"},errorPatterns:{setup:["error CS","CSPROJ.*not found","NuGet.*restore"],"test-failure":["Failed:.*test","FAILED"],dependency:["error NU1101"],runtime:["error CS","Exception"],timeout:["timeout"],unknown:[]},healthCheck:{stage:"start",type:"port",value:5e3}},"elixir-phoenix":{runtime:"elixir",framework:"Phoenix",markers:["mix.exs","phoenix"],commands:{init:"mix setup",test:"mix test",build:"mix compile --all-warnings",start:"mix phx.server"},errorPatterns:{setup:["\\*\\* \\(.*Error\\)","Mix.InstallError"],"test-failure":["\\d+\\sfailed","FAILED"],dependency:["dependencies are not available"],runtime:["\\*\\* \\(","RuntimeError"],timeout:["timeout"],unknown:[]},healthCheck:{stage:"start",type:"port",value:4e3},dependencies:["init"]},"ruby-rails":{runtime:"ruby",framework:"Rails",markers:["Gemfile","config/application.rb","bin/rails"],commands:{init:"bundle install && rails db:prepare",test:"rails test",build:"rails assets:precompile",start:"rails server --binding=0.0.0.0 --port=3000"},errorPatterns:{setup:["Bundler::.*Error","Gem::.*Error"],"test-failure":["failures,","error,","FAILED"],dependency:["Could not find.*gem"],runtime:["Error","Exception","NoMethodError"],timeout:["timeout"],unknown:[]},healthCheck:{stage:"start",type:"port",value:3e3},dependencies:["init"]},"ruby-sinatra":{runtime:"ruby",framework:"Sinatra",markers:["Gemfile","app.rb","sinatra"],commands:{init:"bundle install",test:"rspec",build:`echo "Sinatra apps don't require build"`,start:"ruby app.rb"},errorPatterns:{setup:["Bundler.*Error","Gem.*Error"],"test-failure":["failure","FAILED"],dependency:["Could not find.*gem"],runtime:["Error","NoMethodError"],timeout:["timeout"],unknown:[]}}},Je={init:{python:["pip install -e .","poetry install","pip install -r requirements.txt"],node:["npm install","pnpm install","yarn install"],go:["go mod download && go mod tidy","go get ./..."],java:["mvn dependency:go-offline","gradle dependencies"],php:["composer install"],rust:["cargo fetch"],dotnet:["dotnet restore"],elixir:["mix deps.get"],ruby:["bundle install"],"jvm-generic":["mvn dependency:go-offline","gradle dependencies"],unknown:[]},test:{python:["pytest","python -m unittest","python -m pytest"],node:["npm test","npm run test"],go:["go test ./...","make test"],java:["mvn test","gradle test"],php:["php artisan test","phpunit","pest"],rust:["cargo test"],dotnet:["dotnet test"],elixir:["mix test"],ruby:["rspec","ruby -m minitest"],"jvm-generic":["mvn test","gradle test"],unknown:[]},build:{python:["python -m build","python setup.py build"],node:["npm run build"],go:["go build -o app .","go build ./..."],java:["mvn package -DskipTests","gradle build -x test"],php:['echo "PHP build: typically no build step"'],rust:["cargo build --release"],dotnet:["dotnet build -c Release"],elixir:["mix compile"],ruby:["gem build *.gemspec"],"jvm-generic":["mvn package -DskipTests","gradle build"],unknown:[]},start:{python:["python app.py","python main.py","uvicorn main:app --reload"],node:["npm start","node index.js","node src/index.js"],go:["./app","go run main.go","go run ./..."],java:["mvn spring-boot:run","gradle bootRun","java -jar target/*.jar"],php:["php -S 0.0.0.0:8000","php artisan serve"],rust:["cargo run --release","./target/release/app"],dotnet:["dotnet run"],elixir:["mix phx.server","iex -S mix"],ruby:["rails server","ruby app.rb","bundle exec puma"],"jvm-generic":["java -jar *.jar","gradle run"],unknown:[]}};function Y(e,r){if(r){let t=r.trim().toLowerCase().replace(/[_.\s]+/g,"-"),n=e$2(r),s=`${e}-${n==="gofiber"?"fiber":n==="gogin"?"gin":n==="dotnet"?"aspnetcore":n!=="unknown"?n:t==="fiber"?"fiber":t==="aspnetcore"||t==="asp-net-core"?"aspnetcore":t}`;return Ve[s]}}function Oe(e,r,t){if(r){let n=Y(e,r);if(n&&n.commands[t])return n.commands[t]}if(["init","test","build","start"].includes(t)){let n=Je[t]?.[e]??[];return n.length>0?n[0]:void 0}}var qe={test:"test",build:"build",start:"start"};function ie(e){if(e.stage==="init")return e.runtime==="node"?Ae(e.projectPath):Oe(e.runtime,e.framework,e.stage);if(e.runtime==="node"){let r=qe[e.stage];if(r){let t=t$1(e.projectPath,r,{framework:e.framework});if(t)return Pe(e.projectPath,t.scriptName)}}return Oe(e.runtime,e.framework,e.stage)}function Ye(e){let r=h(e).map(t=>t==="python"?"python":t==="node"||t==="bun"?"node":t==="go"?"go":t==="java"?"java":t==="php"?"php":t==="rust"?"rust":t==="dotnet"?"dotnet":t==="elixir"?"elixir":t==="ruby"?"ruby":t==="clojure"||t==="scala"||t==="kotlin"?"jvm-generic":null).filter(t=>t!==null).filter((t,n,o)=>o.indexOf(t)===n);return {primary:r.length>0?r[0]:"unknown",secondary:r.slice(1)}}function We(e){return Ye(e).primary}function ue(e,r){if(!e)return "unknown";r||(r={setup:["ModuleNotFoundError","No module named","npm ERR!","error:","not found"],"test-failure":["FAILED","FAIL","failed"],dependency:["cannot find module","import.*error"],runtime:["Exception","Error:","panic","TypeError"],timeout:["timeout","Timeout","deadline exceeded"],unknown:[]});for(let[t,n]of Object.entries(r))for(let o of n)if(new RegExp(o,"i").test(e))return t;return "unknown"}async function Q(e){let r=e.split(/[&|;]\s*/)[0].trim().split(/\s+/)[0];if(["echo","cd","pwd","test","true","false","exit"].includes(r))return {valid:true};try{let n=process.platform==="win32"?"where":"which";if((await execa(n,[r],{reject:false})).exitCode===0)return {valid:true}}catch{}return {valid:false,reason:`Command '${r}' not found or not executable`}}function Me(e,r,t){if(!r)return e;let n=typeof r=="object"&&!Array.isArray(r)&&("dev"in r||"staging"in r||"prod"in r||"default"in r)&&!Object.keys(r).some(o=>["init","test","build","start"].includes(o))?r:{};return t&&typeof n[t]=="string"?n[t]:typeof n.default=="string"?n.default:e}async function De(e,r){if(!e)return {healthy:true};switch(e.type){case "port":{let t=e.value;try{let n=await import('net');return new Promise(o=>{let s=new n.Socket,u=5e3;s.setTimeout(u),s.on("connect",()=>{s.destroy(),o({healthy:true,reason:`Port ${t} is listening`});}),s.on("timeout",()=>{s.destroy(),o({healthy:false,reason:`Port ${t} timeout after ${u}ms`});}),s.on("error",c=>{s.destroy(),o({healthy:false,reason:`Port ${t} error: ${String(c)}`});}),s.connect(t,"localhost");})}catch(n){return {healthy:false,reason:`Port check error: ${n instanceof Error?n.message:String(n)}`}}}case "http":{let t=e.value,n;try{let o=new AbortController;n=setTimeout(()=>o.abort(),5e3);let s=await fetch(t,{method:"GET",signal:o.signal});return {healthy:s.status===200,reason:`HTTP ${s.status}`,metadata:{status:s.status}}}catch(o){return {healthy:false,reason:`HTTP check error: ${o instanceof Error?o.message:String(o)}`}}finally{n&&clearTimeout(n);}}case "log":{let t=e.value;if(!r)return {healthy:true};try{let n=[w.join(r,".workspai","last-run.log"),w.join(r,".rapidkit","last-run.log")].find(o=>K.existsSync(o));if(n){let o=K.readFileSync(n,"utf-8"),s=new RegExp(t,"i");return {healthy:s.test(o),reason:s.test(o)?"Log pattern found":"Log pattern not found"}}return {healthy:true,reason:"No log file to check"}}catch(n){return {healthy:false,reason:`Log check error: ${n instanceof Error?n.message:String(n)}`}}}case "command":{let t=e.value;try{let n=await execa(t,[],{cwd:r,reject:false,shell:true});return {healthy:n.exitCode===0,reason:n.exitCode===0?"Health check passed":"Health check failed",metadata:{exitCode:n.exitCode}}}catch(n){return {healthy:false,reason:`Command check error: ${n instanceof Error?n.message:String(n)}`}}}default:return {healthy:true}}}var Ie={init:"init",test:"test",build:"build",start:"start"};function Qe(e){return e in Ie?Ie[e]:null}function Xe(e,r){let n=p$1(e)?.contextJson?.commands;if(!n||typeof n!="object"||Array.isArray(n))return;let o=n[r];if(typeof o=="string"&&o.trim().length>0)return o.trim();if(o&&typeof o=="object"&&!Array.isArray(o)){let s=o,u=s.default??s.dev;if(typeof u=="string"&&u.trim().length>0)return u.trim()}}function $e(e,r,t=w$1(e)){let n=Qe(r);if(!n)return Xe(e,r)?{supported:true}:{supported:false,reason:`Workspace stage "${r}" is not part of the Workspai fleet contract.`};if(!t.projectRoot)return {supported:false,reason:"No Workspai project metadata was detected for this target."};let o=t.commandMap[n];if(!o||o.status!=="supported"){let s=t.runtimeSupportTier==="observed"||t.frameworkSupportTier==="observed";return {supported:false,reason:o?.reason??`Command "${n}" is not supported for this project runtime/framework.`,shouldFail:!s}}return {supported:true}}var Ze=new Set(["init","test","build","start"]),et=new Set([".git","node_modules",".workspai",".rapidkit",".venv","dist","build","coverage","htmlcov"]);async function L(e){try{return await K.promises.access(e,K.constants.F_OK),true}catch{return false}}async function tt(e){for(let r of e)if(await L(r))return true;return false}async function rt(e,r,t){if(r==="python"){let o=[w.join(e,".workspai","cli.py"),w.join(e,".rapidkit","cli.py")];for(let s of o)if(await L(s))return {valid:true};return {valid:false,reason:"Project-local .workspai/cli.py is missing. Run `workspai init` in this project first."}}let n=t.trim().split(/\s+/)[0];if(n&&["npm","npx","pnpm","yarn"].includes(n)){let o=e$3(n);if((await execa(o.command,[...o.prefixArgs,"--version"],{reject:false,env:g()})).exitCode===0)return {valid:true}}return Q(t)}async function le(e){let r=await K.promises.readFile(e,"utf-8");return JSON.parse(r)}function T(e){return e.replace(/\\/g,"/")}function nt(e){let r=e?.trim();return r?r.startsWith("project:")?r.slice(8).trim()||null:r:null}async function ot(e){return a(e,{skipDirs:et,includeHiddenDirs:false,descendIntoMatchedProjects:false,isProjectDir:async(r,t$1)=>await tt([...t(r,"context.json"),...t(r,"project.json")])?true:w.resolve(r)===w.resolve(t$1)?false:h(r).length>0})}async function st(e){for(let r of [w.join(".workspai","project.json"),w.join(".workspai","context.json"),w.join(".rapidkit","project.json"),w.join(".rapidkit","context.json")]){let t=w.join(e,r);if(await L(t))try{let n=await le(t),o=n.name??n.projectName??n.slug;if(typeof o=="string"&&o.trim())return o.trim()}catch{}}return null}async function at(e,r,t){let n=nt(t);if(!n)return {projects:r,normalizedScope:null};let o=T(n).toLowerCase(),s=[];for(let u of r){let c=T(w.relative(e,u)),p=w.basename(u),m=await st(u);[c,p,m].filter(a=>typeof a=="string"&&a.length>0).map(a=>T(a).toLowerCase()).includes(o)&&s.push(u);}if(s.length===0)throw new Error(`Workspace run scope did not match any project: ${t}`);return {projects:s,normalizedScope:n}}async function it(e,r,t){let n=await execa("git",["diff","--name-only",`${t}...HEAD`],{cwd:e,reject:false,env:a$1()});if(n.exitCode!==0)return new Set(r);let o=n.stdout.split(/\r?\n/).map(u=>u.trim()).filter(u=>u.length>0).map(u=>T(u));if(o.length===0)return new Set;let s=new Set;for(let u of r){let c=T(w.relative(e,u));if(!c||c===".")continue;let p=`${c}/`;o.some(m=>m===c||m.startsWith(p))&&s.add(u);}return s}async function ut(e,r,t){let n=await d$1(e,e$1.workspaceContract)??p(e,"workspace.contract.json");if(await L(n))try{let d=await ct(e,r,t,n);if(d.graphStatus!=="missing")return d}catch{return {expanded:t,graphStatus:"invalid",expansionDepth:0}}let o=await d$1(e,".workspai/workspace-dependency-graph.json")??p(e,"workspace-dependency-graph.json");if(!await L(o))return {expanded:t,graphStatus:"missing",expansionDepth:0};let s;try{s=await le(o);}catch{return {expanded:t,graphStatus:"invalid",expansionDepth:0}}let u=new Set(r.map(d=>w.resolve(d))),c=new Map;if(!s||typeof s!="object"||Array.isArray(s))return {expanded:t,graphStatus:"invalid",expansionDepth:0};let p$1=Array.isArray(s.projects)?s.projects:[];for(let d of p$1){if(!d||typeof d!="object"||Array.isArray(d))continue;let a=d,l=typeof a.path=="string"?a.path:"",y=w.resolve(e,l);if(!u.has(y))continue;let h=Array.isArray(a.dependsOn)?a.dependsOn.filter(R=>typeof R=="string"):[];for(let R of h){let g=w.resolve(e,R);u.has(g)&&(c.has(g)||c.set(g,new Set),c.get(g)?.add(y));}}let m=d$2(c,t);return {expanded:m.reached,graphStatus:"loaded",expansionDepth:m.added}}async function ct(e,r,t,n){let o=await le(n);if(!o||typeof o!="object"||Array.isArray(o))return {expanded:t,graphStatus:"invalid",expansionDepth:0};let s=o,u=Array.isArray(s.projects)?s.projects:null;if(!u)return {expanded:t,graphStatus:"invalid",expansionDepth:0};let c=new Map,p=new Map;for(let y of r){let h=T(w.relative(e,y));p.set(h,w.resolve(y));}let m=new Map,d=new Map,a=new Map;for(let y of u){if(!y||typeof y!="object"||Array.isArray(y))continue;let h=y,R=typeof h.slug=="string"?h.slug:"",g=typeof h.relativePath=="string"?T(h.relativePath):R,x=p.get(g);!R||!x||c.set(R,x);}for(let y of u){if(!y||typeof y!="object"||Array.isArray(y))continue;let h=y,R=typeof h.slug=="string"?h.slug:"",g=c.get(R);if(!g)continue;let x=h.contracts&&typeof h.contracts=="object"&&!Array.isArray(h.contracts)?h.contracts:{},S=Array.isArray(x.dependsOn)?x.dependsOn.filter(v=>typeof v=="string"):[],W=Array.isArray(x.publishes)?x.publishes.filter(v=>typeof v=="string"):[],I=Array.isArray(x.consumes)?x.consumes.filter(v=>typeof v=="string"):[];for(let v of S){let j=c.get(v);j&&(a.has(j)||a.set(j,new Set),a.get(j)?.add(g));}for(let v of W)m.has(v)||m.set(v,new Set),m.get(v)?.add(g);for(let v of I)d.has(v)||d.set(v,new Set),d.get(v)?.add(g);}for(let[y,h]of m.entries()){let R=d.get(y);if(R)for(let g of h){a.has(g)||a.set(g,new Set);for(let x of R)x!==g&&a.get(g)?.add(x);}}let l=d$2(a,t);return {expanded:l.reached,graphStatus:"loaded",expansionDepth:l.added}}async function dt(e,r){if(typeof r=="boolean")return r;let t=s(e,"policies.yml").find(s=>K.existsSync(s))??p(e,"policies.yml");if(!await L(t))return true;let n="";try{n=await K.promises.readFile(t,"utf-8");}catch{return true}let o=n.match(/^[\t ]*rules\.enforce_workspace_run_gates:\s*(true|false)\s*(?:#.*)?$/m);return o?o[1]==="true":true}function lt(e){let r=process.env.RAPIDKIT_WORKSPACE_RUN_STAGE_TIMEOUT_MS;if(r){let t=Number.parseInt(r,10);if(Number.isFinite(t)&&t>0)return t}return e==="init"?12e4:9e4}function _e(e,r){let t=Number.parseInt(process.env[e]??"",10);return Number.isFinite(t)&&t>0?t:r}function ce(e){return new Promise(r=>setTimeout(r,e))}async function pt(e){let r=process.argv[1];if(e.useRapidkitWrapper&&!r)return {exitCode:1,stdout:"",stderr:"Workspai entrypoint is unavailable for startup verification.",healthStatus:{healthy:false,reason:"Workspai entrypoint is unavailable."}};let t=e.useRapidkitWrapper&&r?execa(process.execPath,[r,"start"],{cwd:e.projectPath,reject:false,timeout:e.timeoutMs,env:{...process.env,RAPIDKIT_WORKSPACE_RUN_CHILD:"1"}}):execa(e.finalCommand,[],{cwd:e.projectPath,reject:false,shell:true,timeout:e.timeoutMs}),n=Promise.resolve(t).then(d=>({kind:"exit",result:d}),d=>({kind:"error",error:d})),o=_e("WORKSPAI_WORKSPACE_RUN_STARTUP_GRACE_MS",2e3),s=await Promise.race([n,ce(o).then(()=>({kind:"alive"}))]);if(s.kind==="error"){let d=typeof s.error=="object"&&s.error!==null&&"timedOut"in s.error&&!!s.error.timedOut;return {exitCode:d?124:1,stdout:"",stderr:s.error instanceof Error?s.error.message:String(s.error),timedOut:d,healthStatus:{healthy:false,reason:"The start command failed before readiness."}}}if(s.kind==="exit"){let d=Number(s.result.exitCode??0);return {exitCode:d,stdout:String(s.result.stdout??""),stderr:String(s.result.stderr??""),healthStatus:{healthy:d===0,reason:d===0?"The start command completed successfully.":`The start command exited with code ${d} before readiness.`}}}let u=Y(e.runtime,e.framework)?.healthCheck,c=u?{healthy:false,reason:"The configured health check has not passed yet."}:{healthy:true,reason:`The service remained alive for ${o}ms (bounded startup smoke).`};if(u){let d=_e("WORKSPAI_WORKSPACE_RUN_STARTUP_HEALTH_TIMEOUT_MS",15e3),a=Date.now()+d;for(;Date.now()<a;){let l=await De(u,e.projectPath);if(c={healthy:l.healthy,reason:l.reason},l.healthy)break;if((await Promise.race([n,ce(350).then(()=>({kind:"alive"}))])).kind!=="alive"){c={healthy:false,reason:"The service exited before its configured health check passed."};break}}}try{t.kill?.("SIGTERM",{forceKillAfterDelay:1e3});}catch{try{t.kill?.();}catch{}}let p=await Promise.race([n,ce(2e3).then(()=>({kind:"alive"}))]),m=p.kind==="exit"?p.result:void 0;return {exitCode:c.healthy?0:1,stdout:String(m?.stdout??""),stderr:String(m?.stderr??""),healthStatus:c}}async function de(e,r,t){let n=process.argv[1];if(!n)return {exitCode:1,stdout:"",stderr:"RapidKit entrypoint is unavailable for nested workspace-run execution."};try{let o=await execa(process.execPath,[n,...e],{cwd:r,reject:false,timeout:t,env:{...process.env,RAPIDKIT_WORKSPACE_RUN_CHILD:"1"}});return {exitCode:Number(o.exitCode??1),stdout:o.stdout,stderr:o.stderr}}catch(o){return {exitCode:typeof o=="object"&&o!==null&&"timedOut"in o&&!!o.timedOut?124:1,stdout:typeof o=="object"&&o!==null&&"stdout"in o?String(o.stdout??""):"",stderr:typeof o=="object"&&o!==null&&"stderr"in o?String(o.stderr??""):o instanceof Error?o.message:String(o)}}}function mt(e){return e==="node"||e==="go"||e==="java"||e==="python"||e==="dotnet"||e==="rust"||e==="php"}function ft(){return process.env.VITEST==="true"||process.env.VITEST==="1"||process.env.NODE_ENV==="test"}function gt(e,r=8){if(e.length<=r)return e.join(`
|
|
2
|
+
`);let t=3;return [...e.slice(0,t),...e.slice(-(r-t))].join(`
|
|
3
|
+
`)}function yt(e){let r=/(?:\bnot found\b|\bno such\b|\bmissing\b|\bfailed\b|\berror\b|\bexception\b|\bcannot\b|\bdenied\b|\btimeout\b|\btimed out\b|\benoent\b|\beacces\b|\beperm\b)/i;return [...e].reverse().find(t=>r.test(t))??e.at(-1)}async function ht(e){let r=process.cwd();try{process.chdir(e);let{handleInitCommand:t}=await import('./index.js');return {exitCode:await t(["init"]),stdout:"",stderr:""}}finally{process.chdir(r);}}async function kt(e){let r=a=>{let l=f(a);return l==="node"||l==="bun"?"node":l==="python"?"python":l==="go"?"go":l==="java"?"java":l==="php"?"php":l==="ruby"?"ruby":l==="rust"?"rust":l==="dotnet"?"dotnet":l==="elixir"?"elixir":l==="clojure"||l==="scala"||l==="kotlin"?"jvm-generic":We(e)},t=a=>{if(!a)return;let l=e$2(a);if(new Set(["fastapi","django","flask","nestjs","express","fastify","koa","gofiber","gogin","echo","springboot","laravel","symfony","rails","sinatra","dotnet","actix","axum","rocket","phoenix"]).has(l))return l},n=p$1(e),o=n?.detection??j(e,n?.projectJson??null),s=n?.contextJson,u=r(o.runtime),c=t(o.key),p={},m=new Set(["init","test","build","start"]);if(s?.commands&&typeof s.commands=="object")for(let[a,l]of Object.entries(s.commands))typeof l=="string"&&m.has(a)&&(p[a]=l);let d;if(s?.commandEnvironments&&typeof s.commandEnvironments=="object"){let a=s.commandEnvironments;d={dev:typeof a.dev=="string"?a.dev:void 0,staging:typeof a.staging=="string"?a.staging:void 0,prod:typeof a.prod=="string"?a.prod:void 0,default:typeof a.default=="string"?a.default:void 0};}return {runtime:u,framework:c,commandOverrides:Object.keys(p).length>0?p:void 0,environmentCommandVariants:d,environment:typeof s?.environment=="string"?s.environment:void 0}}async function bt(e,r,t,n,o,s,u){let c=!o?.[r]&&mt(t),p;if(o&&o[r]?p=o[r]:c?p=`rapidkit ${r}`:p=ie({projectPath:e,runtime:t,framework:n,stage:r}),!p)return {exitCode:127,command:`<stage not supported for ${t}>`,message:`No stage command found for runtime '${t}' and framework '${n||"unknown"}'`,errorCategory:"runtime"};let m=Me(p,s,u);if(!m)return {exitCode:127,command:p,message:"Failed to resolve stage command",errorCategory:"runtime"};let d=ie({projectPath:e,runtime:t,framework:n,stage:r});if(c){if(d){let k=c?await rt(e,t,d):await Q(d);if(!k.valid)return {exitCode:127,command:m,message:k.reason||"Command not available",errorCategory:"setup"}}}else {let k=await Q(m);if(!k.valid)return {exitCode:127,command:m,message:k.reason||"Command not available",errorCategory:"setup"}}let a=0,l="",y="",h,R,g=lt(r),x=Date.now();try{let k=r==="start"?await pt({projectPath:e,finalCommand:m,useRapidkitWrapper:c,runtime:t,framework:n,timeoutMs:g}):c?r==="init"&&ft()?await ht(e):await de([r],e,g):await execa(m,[],{cwd:e,reject:false,shell:true,timeout:g});if(a=Number(k.exitCode??0),l=k.stdout,y=k.stderr,R=r==="start"?k.healthStatus:void 0,a!==0){let M=`${l}
|
|
4
|
+
${y}`,G=Date.now()-x;h=a===124||ue(M)==="timeout"||a===143&&G>=Math.floor(g*.8)?"timeout":ue(M);}}catch(k){let M=typeof k=="object"&&k!==null&&"timedOut"in k&&!!k.timedOut;return {exitCode:M?124:1,command:m,message:M?`Stage timed out after ${g}ms`:k instanceof Error?k.message:"Command execution failed",errorCategory:M?"timeout":"runtime"}}let S=`${l}
|
|
5
|
+
${y}`.split(/\r?\n/).map(k=>k.trim()).filter(Boolean),W=gt(S),I=yt(S),v=Date.now()-x,j=a===124||h==="timeout"||a===143&&v>=Math.floor(g*.8),P=a===0?void 0:j?"timeout":h,O=a===0||!P?void 0:{category:P,exitCode:a,command:m,timedOut:j,timeoutMs:g,...W?{outputExcerpt:W}:{}};return {exitCode:a,command:m,errorCategory:P,healthStatus:R,failureDiagnostic:O,message:j?`Stage timed out after ${g}ms`:a!==0?I?`Stage failed with exit code ${a}: ${I}`:`Stage failed with exit code ${a}`:void 0}}function Le(e){try{return JSON.parse(e)}catch{return null}}function wt(e){switch(e){case "dotnet":return "Install .NET 8+ SDK, then rerun `npx workspai setup dotnet` or `npx workspai init`.";case "go":return "Install Go 1.21+, then rerun `npx workspai setup go` or `npx workspai init`.";case "java":case "jvm-generic":return "Install Java 21+ and Maven/Gradle, then rerun `npx workspai setup java` or `npx workspai init`.";case "node":return "Install Node.js LTS and npm/pnpm/yarn, then rerun `npx workspai setup node` or `npx workspai init`.";case "python":return "Install Python 3.10+ and pip/Poetry, then rerun `npx workspai setup python` or `npx workspai init`.";default:return null}}async function xt(e){let r=[],t=await de(["doctor","workspace","--json"],e);if(t.exitCode!==0)r.push({gate:"doctor-workspace",status:"fail",summary:"doctor workspace command failed"});else {let s=Le(t.stdout)?.healthScore,u=Number(s?.errors??0);Number.isFinite(u)&&u>0?r.push({gate:"doctor-workspace",status:"fail",summary:`doctor workspace reports ${u} error(s)`}):r.push({gate:"doctor-workspace",status:"pass",summary:"doctor workspace passed"});}let n=await de(["readiness","--json"],e);if(n.exitCode!==0)r.push({gate:"readiness",status:"fail",summary:"readiness command failed"});else {let o=Le(n.stdout),s=String(o?.overallStatus??"").toLowerCase();s==="fail"?r.push({gate:"readiness",status:"fail",summary:"readiness overall status is fail"}):s==="warn"?r.push({gate:"readiness",status:"warn",summary:"readiness overall status is warn"}):r.push({gate:"readiness",status:"pass",summary:"readiness overall status is pass"});}return r}var vt=new Set(["dev","stop"]);function Rt(e){let r=e.trim();return !r||vt.has(r.toLowerCase())?false:Ze.has(r)?true:/^[a-z][a-z0-9_-]*$/i.test(r)}function Ge(e,r,t){let n=T(w.relative(t,r));return (Array.isArray(e.projects)?e.projects:[]).some(s=>{if(!s||typeof s!="object")return false;let u=s,c=[u.relativePath,u.path].filter(p=>typeof p=="string"&&p.length>0).map(p=>T(p));return u.status==="passed"&&(c.includes(n)||c.some(p=>p.endsWith(`/${n}`)))})}function St(e,r){return Y(e,r)?.dependencies??[]}function jt(e,r){let t=Math.max(1,Math.min(4,r)),n=Number(e??t);return Number.isFinite(n)?Math.max(1,Math.min(16,Math.trunc(n))):t}async function ar(e$1){if(!Rt(e$1.stage))throw new Error(`Unsupported workspace run stage: ${e$1.stage}`);let r=Date.now(),t=w.resolve(e$1.workspacePath),n=await d(t),o=await ot(t),{projects:s,normalizedScope:u}=await at(t,o,e$1.scope),c=e$1.affected===true,p=e$1.blastRadius===true,m=e$1.since?.trim()||"HEAD~1",d$1=c?await it(t,s,m):new Set(s),a,l="not-applicable",y=0,h="all";if(c&&p){let f=await ut(t,o,d$1);a=f.expanded,l=f.graphStatus,y=f.expansionDepth,h="affected+blast-radius";}else c?(a=d$1,h="affected"):(a=d$1,h="all");let R=e$1.stage==="init"?false:await dt(t,e$1.enforceGates),g=R?await xt(t):[{gate:"doctor-workspace",status:"skipped",summary:"workspace run gates disabled"},{gate:"readiness",status:"skipped",summary:"workspace run gates disabled"}],x=g.find(f=>f.status==="fail"),S=s.filter(f=>a.has(f)),W=e$1.continueOnError===true||e$1.stage==="init",I=e$1.parallel===true,v=jt(e$1.maxWorkers,S.length),j=S.length,P=0;e$1.json||console.log(E.gray(`Workspace run (${e$1.stage}) started: ${j} target(s), ${I?`parallel x${v}`:"sequential"}`));let O=new Map;for(let f of o){let b=T(w.relative(t,f)),i=s.includes(f),A=i&&a.has(f);O.set(f,{path:f,relativePath:b,projectName:w.basename(b)||w.basename(f),selected:A,affected:A,status:"skipped",exitCode:null,durationMs:0,reason:A?void 0:i?"not affected":"outside scope",framework:void 0,runtimeDetected:void 0,executionCommand:void 0});}if(x)for(let f of S){let b=O.get(f);b&&(b.status="skipped",b.reason=`blocked by ${x.gate}`);}else {let f=async b=>{let i=O.get(b);if(!i)return;let A=T(w.relative(t,b));e$1.json||console.log(E.gray(`\u23F3 [${P}/${j}] ${e$1.stage} ${A}`)),i.selected=true,i.affected=true;let F=Date.now(),{runtime:C,framework:N,commandOverrides:Ue,environmentCommandVariants:He,environment:ze}=await kt(b);i.runtimeDetected=C,i.framework=N;let Z=$e(b,e$1.stage);if(!Z.supported){i.status=Z.shouldFail===false?"skipped":"failed",i.reason=Z.reason??`stage "${e$1.stage}" unsupported for project`,i.durationMs=Date.now()-F,i.exitCode=i.status==="failed"?127:null,i.status==="failed"&&(i.errorCategory="setup",i.errorMessage=i.reason),P+=1;return}if(e$1.reusePassed&&n){let D=n.stages[e$1.stage]??n.stages[e$1.stage];if(D&&Ge(D,b,t)){i.status="passed",i.reason="reused passed result from workspace-run-last.json",i.durationMs=Date.now()-F,i.exitCode=0,P+=1,e$1.json||console.log(E.gray(`\u21BA reused passed cache for ${A}`));return}}let fe=St(C,N).filter(D=>D!==e$1.stage);if(fe.length>0&&n){let D=fe.find(ee=>{let B=n.stages[ee];return !B||!Ge(B,b,t)});if(D){i.status="skipped",i.reason=`dependency stage "${D}" not satisfied in workspace-run-last.json`,i.durationMs=Date.now()-F,i.exitCode=null,P+=1;return}}let $=await bt(b,e$1.stage,C,N,Ue,He,ze);if(i.executionCommand=$.command,i.errorCategory=$.errorCategory,i.healthStatus=$.healthStatus,i.failureDiagnostic=$.failureDiagnostic,i.durationMs=Date.now()-F,i.exitCode=$.exitCode,$.exitCode===0?(i.status="passed",i.reason=void 0):(i.status="failed",i.reason=$.message||"stage command failed",i.errorMessage=$.message),P+=1,!e$1.json){let D=j>0?Math.round(P/j*100):100,ee=i.status==="passed"?E.green("\u2705"):E.red("\u274C");if(console.log(E.gray(`${ee} [${P}/${j}] (${D}%) ${A} ${i.durationMs}ms`)),i.status==="failed"){i.reason&&console.log(E.red(` Reason: ${i.reason}`)),i.executionCommand&&console.log(E.gray(` Command: ${i.executionCommand}`));let B=wt(i.runtimeDetected);B&&i.errorCategory==="setup"&&console.log(E.gray(` Hint: ${B}`));}}};if(I&&S.length>1){let b=0,i=false,A=new Array(v).fill(null).map(async()=>{for(;b<S.length;){if(i&&!W)return;let F=b;b+=1;let C=S[F];await f(C),O.get(C)?.status==="failed"&&(i=true);}});if(await Promise.all(A),!W&&i){let F=false;for(let C of S){let N=O.get(C);if(N){if(N.status==="failed"){F=true;continue}F&&N.status==="skipped"&&(N.reason=N.reason||"stopped after failure");}}}}else for(let b of S){await f(b);let i=O.get(b);if(!W&&i?.status==="failed"){let A=S.slice(S.indexOf(b)+1);for(let F of A){let C=O.get(F);C&&(C.status="skipped",C.reason="stopped after failure");}break}}}let k=[];for(let f of o){let b=O.get(f);b&&k.push(b);}let M=k.filter(f=>f.status==="passed").length,G=k.filter(f=>f.status==="failed").length,X=k.filter(f=>f.status==="skipped").length,pe=e$1.strict===true,Be=G>0||pe&&g.some(f=>f.status==="fail"||f.status==="warn")?1:0,me={schemaVersion:"1.0",workspacePath:t,stage:e$1.stage,generatedAt:new Date().toISOString(),durationMs:Date.now()-r,options:{affected:c,blastRadius:p,since:c?m:null,parallel:I,maxWorkers:v,continueOnError:W,strict:pe,enforceGates:R,scope:u,reusePassed:e$1.reusePassed===true},selection:{mode:h,since:c?m:null,scope:u,graphStatus:l,expansionDepth:y},gates:{enforced:R,results:g,blocked:!!x,blockingGate:x?.gate},summary:{projectCount:o.length,selectedCount:S.length,passed:M,failed:G,skipped:X,exitCode:Be},projects:k,enterpriseControls:{jsonReady:true,evidencePath:b}},Ke=w.join(t,b);return await e(t,me),e$1.json||(x&&(console.log(E.red(`\u274C Workspace run blocked by ${x.gate}`)),console.log(E.gray(` ${x.summary}`))),console.log(E.cyan(`Workspace run (${e$1.stage}) => passed: ${M}, failed: ${G}, skipped: ${X}`)),console.log(E.gray(`Report: ${Ke}`))),me}export{ar as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var o={model:".workspai/reports/workspace-model.json",knowledgeGraph:".workspai/reports/workspace-knowledge-graph.json",snapshot:".workspai/reports/workspace-model-snapshot.json",diff:".workspai/reports/workspace-model-diff-last-run.json",impact:".workspai/reports/workspace-impact-last-run.json",analyze:".workspai/reports/analyze-last-run.json",doctor:".workspai/reports/doctor-last-run.json",contractVerify:".workspai/reports/workspace-contract-verify-last-run.json",readiness:".workspai/reports/release-readiness-last-run.json",verify:".workspai/reports/workspace-verify-last-run.json",history:".workspai/reports/workspace-intelligence-history.json",agentContext:".workspai/reports/workspace-context-agent.json",agentIndex:".workspai/reports/INDEX.json",agentCustomizationPack:".workspai/reports/agent-customization-pack.json",skillsIndex:".workspai/reports/workspace-skills-index.json",agents:"AGENTS.md",explain:".workspai/reports/workspace-explain-last-run.json",intelligenceRun:".workspai/reports/workspace-intelligence-run-last-run.json",evaluationLive:".workspai/reports/workspace-intelligence-evaluation-live.json",evaluationLastRun:".workspai/reports/workspace-intelligence-evaluation-last-run.json",verifiedGoalStatus:".workspai/reports/verified-goal-last-run.json",repairTransaction:".workspai/reports/workspace-repair-last-run.json"},r={model:"workspace-model.v1",knowledgeGraph:"workspace-knowledge-graph.v1",snapshot:"workspace-model-snapshot.v1",diff:"workspace-model-diff.v1",impact:"workspace-impact.v1",analyze:"rapidkit-analyze-v1",doctor:"doctor-workspace-evidence-v1",contractVerify:"workspace-contract-verify.v1",readiness:"release-readiness-v1",verify:"workspace-verify.v1",history:"workspace-intelligence-history.v1",agentContext:"workspace-context.v1",agentIndex:"rapidkit-agent-reports-index.v1",agentCustomizationPack:"rapidkit-agent-customization-pack.v1",skillsIndex:"workspace-skills-index.v1",agents:null,explain:"workspace-explain.v1",intelligenceRun:"workspace-intelligence-run.v1",evaluationLive:"workspace-intelligence-evaluation.v1",evaluationLastRun:"workspace-intelligence-evaluation.v1",verifiedGoalStatus:"workspai.verified-goal-status.v1",repairTransaction:"workspai.workspace-repair-transaction.v1"},t={model:"contracts/workspace-intelligence/workspace-model.v1.json",knowledgeGraph:"contracts/workspace-intelligence/workspace-knowledge-graph.v1.json",snapshot:"contracts/workspace-intelligence/workspace-model-snapshot.v1.json",diff:"contracts/workspace-intelligence/workspace-model-diff.v1.json",impact:"contracts/workspace-intelligence/workspace-impact.v1.json",analyze:"contracts/analyze-last-run.v1.json",doctor:"contracts/doctor-workspace-evidence.v1.json",contractVerify:"contracts/workspace-intelligence/workspace-contract-verify.v1.json",readiness:"contracts/release-readiness.v1.json",verify:"contracts/workspace-intelligence/workspace-verify.v1.json",history:"contracts/workspace-intelligence/workspace-intelligence-history.v1.json",agentContext:"contracts/workspace-intelligence/workspace-context.v1.json",agentIndex:"contracts/workspace-intelligence/agent-reports-index.v1.json",agentCustomizationPack:"contracts/workspace-intelligence/agent-customization-pack-report.v1.json",skillsIndex:"contracts/workspace-intelligence/workspace-skills-index.v1.json",agents:null,explain:"contracts/workspace-intelligence/workspace-explain.v1.json",intelligenceRun:"contracts/workspace-intelligence/workspace-intelligence-run.v1.json",evaluationLive:"contracts/workspace-intelligence/workspace-intelligence-evaluation.v1.json",evaluationLastRun:"contracts/workspace-intelligence/workspace-intelligence-evaluation.v1.json",verifiedGoalStatus:"contracts/workspace-intelligence/verified-goal-status.v1.json",repairTransaction:"contracts/workspace-intelligence/workspace-repair-transaction.v1.json"},n={projectWorkspaceLink:{artifactPath:".workspai/workspace-link.local.json",schemaVersion:"project-workspace-link.v1",contractPath:"contracts/project-workspace-link.v1.json",producerCommands:[["adopt"],["import"],["project","workspace","relink"],["workspace","sync"]]},projectContextAgent:{artifactPath:".workspai/reports/project-context-agent.json",schemaVersion:"project-context-agent.v1",contractPath:"contracts/workspace-intelligence/project-context-agent.v1.json",producerCommands:[["adopt"],["import"],["workspace","sync"],["workspace","agent-sync","--write"]]},workspaceContract:{artifactPath:".workspai/workspace.contract.json",schemaVersion:1,contractPath:"contracts/workspace-contract.v1.json",producerCommands:[["workspace","sync"],["workspace","contract","sync"]]},workspaceModelCache:{artifactPath:".workspai/cache/workspace-model.v1.json",schemaVersion:"workspace-model-cache.v1",contractPath:"contracts/workspace-model-cache.v1.json",producerCommands:[["workspace","model"]]},workspaceRegistry:{artifactPath:".workspai/workspace-registry.v1.json",schemaVersion:"workspace-registry.v1",contractPath:"contracts/workspace-registry.v1.json",producerCommands:[["workspace","sync"]]},compatibilityMatrix:{artifactPath:".workspai/compatibility-matrix.json",schemaVersion:"rapidkit.compatibility-matrix.v1",contractPath:"contracts/compatibility-matrix.v1.json",producerCommands:[["bootstrap"]]},doctorWorkspaceCache:{artifactPath:".workspai/reports/doctor-workspace-cache.json",schemaVersion:"doctor-workspace-cache-v2",contractPath:"contracts/doctor-workspace-cache.v2.json",producerCommands:[["doctor","workspace"]]},bootstrapCompliance:{artifactPath:".workspai/reports/bootstrap-compliance.latest.json",schemaVersion:"bootstrap-compliance.v1",contractPath:"contracts/bootstrap-compliance.v1.json",producerCommands:[["bootstrap"]]},mirrorOps:{artifactPath:".workspai/reports/mirror-ops.latest.json",schemaVersion:"mirror-ops.v1",contractPath:"contracts/mirror-ops.v1.json",producerCommands:[["mirror","status"]]},transparencyEvidence:{artifactPath:".workspai/reports/transparency-evidence.latest.json",schemaVersion:"transparency-evidence.v1",contractPath:"contracts/transparency-evidence.v1.json",producerCommands:[["mirror","sync"]]},workspaceShareBundle:{artifactPath:".workspai/reports/share-bundle.json",schemaVersion:"1.1",schemaVersionField:"schema_version",contractPath:"contracts/workspace-share-bundle.v1.json",producerCommands:[["workspace","share"]]},doctorProject:{artifactPath:".workspai/reports/doctor-project-last-run.json",schemaVersion:"doctor-project-evidence-v1",contractPath:"contracts/doctor-project-evidence.v1.json",producerCommands:[["doctor","project"]]},projectTestCoverage:{artifactPath:".workspai/reports/project-test-coverage-last-run.json",schemaVersion:"workspai.project-test-coverage.v1",contractPath:"contracts/project-test-coverage.v1.json",producerCommands:[["project","coverage"]]},doctorRemediationPlan:{artifactPath:".workspai/reports/doctor-remediation-plan-last-run.json",schemaVersion:"doctor-remediation-plan-v2",contractPath:"contracts/doctor-remediation-plan.v2.json",producerCommands:[["workspace","remediation-plan"]]},artifactRemediationPlan:{artifactPath:".workspai/reports/artifact-remediation-plan-last-run.json",schemaVersion:"artifact-remediation-plan-v1",contractPath:"contracts/artifact-remediation-plan.v1.json",producerCommands:[["workspace","remediation-plan"]]},doctorFixResult:{artifactPath:".workspai/reports/doctor-fix-result-last-run.json",schemaVersion:"rapidkit-doctor-fix-result-v1",contractPath:"contracts/workspace-intelligence/doctor-fix-result.v1.json",producerCommands:[["doctor","workspace"]]},pipelineLastRun:{artifactPath:".workspai/reports/pipeline-last-run.json",schemaVersion:"rapidkit-pipeline-v1",contractPath:"contracts/pipeline-last-run.v1.json",producerCommands:[["pipeline"]]},autopilotReleaseLastRun:{artifactPath:".workspai/reports/autopilot-release-last-run.json",schemaVersion:"autopilot-release-v1",contractPath:"contracts/autopilot-release.v1.json",producerCommands:[["autopilot","release"]]},autopilotReleaseAlias:{artifactPath:".workspai/reports/autopilot-release.json",schemaVersion:"autopilot-release-v1",contractPath:"contracts/autopilot-release.v1.json",producerCommands:[["autopilot","release"]]},workspaceRunLast:{artifactPath:".workspai/reports/workspace-run-last.json",schemaVersion:"workspace-run-v1",contractPath:"contracts/workspace-run-last.v1.json",producerCommands:[["workspace","run"]]},workspaiMcpDesign:{artifactPath:".workspai/reports/workspai-mcp-design.json",schemaVersion:"workspai-mcp-design.v1",contractPath:"contracts/workspace-intelligence/mcp-design.v1.json",producerCommands:[["workspace","agent-sync","--write"]]},legacyMcpDesign:{artifactPath:".workspai/reports/rapidkit-mcp-design.json",schemaVersion:"workspai-mcp-design.v1",contractPath:"contracts/workspace-intelligence/mcp-design.v1.json",producerCommands:[["workspace","agent-sync","--write"]]},workspaceWhy:{artifactPath:".workspai/reports/workspace-why-last-run.json",schemaVersion:r.explain,contractPath:t.explain,producerCommands:[["workspace","why"]]},workspaceTrace:{artifactPath:".workspai/reports/workspace-trace-last-run.json",schemaVersion:r.explain,contractPath:t.explain,producerCommands:[["workspace","trace"]]},agentHooks:{artifactPath:".vscode/workspai-agent-hooks.json",schemaVersion:"workspai-agent-hooks.v1",contractPath:"contracts/workspace-intelligence/agent-hooks.v1.json",producerCommands:[["workspace","agent-sync"]]},infraPlan:{artifactPath:".workspai/reports/infra-plan.json",schemaVersion:"rapidkit.infra-plan.v1",contractPath:"contracts/infra-plan.v1.json",producerCommands:[["infra","plan"]]}},l=Object.freeze(Object.fromEntries(Object.entries(n).map(([a,s])=>[a,s.artifactPath]))),k={[o.intelligenceRun]:[["workspace","intelligence","run"]],[o.snapshot]:[["workspace","snapshot"]],[o.history]:[["workspace","feedback","record","--json"]],[o.evaluationLive]:[["workspace","eval","init"],["workspace","eval","record","--json"]],[o.evaluationLastRun]:[["workspace","eval","report","--json"]],[o.verifiedGoalStatus]:[["workspace","goal","plan"],["workspace","goal","verify"]],[o.repairTransaction]:[["workspace","repair","plan"],["workspace","repair","propose"],["workspace","repair","approve"],["workspace","repair","decide"],["workspace","repair","execute"],["workspace","repair","resume"],["workspace","repair","rollback"],["workspace","repair","cancel"]]},d={analyze:"analyze",workspace:"workspace <action> [subaction] [key] [value]",doctor:"doctor [scope]",readiness:"readiness"},w=["analyze","readiness","doctor","workspace"],m=["model","diff","impact","doctor-evidence","contract-evidence","analyze-evidence","readiness-evidence","verify","context","agent-sync","explain"],v=["sync","baseline"],u={sync:[".workspai/workspace.contract.json",".workspai/workspace-registry.v1.json"],baseline:[o.snapshot]},e=o,c={model:{command:["workspace","model","--json","--write"],produces:[e.model,e.knowledgeGraph]},diff:{command:["workspace","diff","--from",e.snapshot,"--json"],produces:[e.diff]},impact:{command:["workspace","impact","--from",e.diff,"--json"],produces:[e.impact]},"doctor-evidence":{command:["doctor","workspace","--json"],produces:[e.doctor]},"contract-evidence":{command:["workspace","contract","verify","--strict","--json"],produces:[e.contractVerify]},"analyze-evidence":{command:["analyze","--json"],produces:[e.analyze]},"readiness-evidence":{command:["readiness","--json","--skip-verify"],produces:[e.readiness]},verify:{command:["workspace","verify","--from-impact",e.impact,"--json"],produces:[e.verify,e.history]},context:{command:["workspace","context","--for-agent","--json","--write","--no-agent-sync"],produces:[e.agentContext]},"agent-sync":{command:["workspace","agent-sync","--write","--json","--preset","enterprise"],produces:[e.agentIndex,e.agentCustomizationPack,e.skillsIndex,e.agents]},explain:{command:["workspace","explain","release-blocked","--json","--write"],produces:[e.explain]}};function g(a){return c[a]}export{o as a,r as b,t as c,n as d,l as e,k as f,d as g,w as h,m as i,v as j,u as k,c as l,g as m};
|